Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/85xx: Add QE USB support for MPC8569E-MDS boards

- Add gpio-controller node for BCSR17, it is used to control USB
speed and VBUS;
- Add timer node for QE GTM, needed for USB host;
- Add usb node itself;
- Add some probing code for BCSR GPIOs.

NOTE: QE USB doesn't work on prototype boards, but should work on
pilot boards if specs and schematics are correct, though we
don't have the pilot boards to actually test it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Anton Vorontsov and committed by
Kumar Gala
9b9d401b 818fcac5

+49
+45
arch/powerpc/boot/dts/mpc8569mds.dts
··· 99 99 }; 100 100 101 101 bcsr@1,0 { 102 + #address-cells = <1>; 103 + #size-cells = <1>; 102 104 compatible = "fsl,mpc8569mds-bcsr"; 103 105 reg = <1 0 0x8000>; 106 + ranges = <0 1 0 0x8000>; 107 + 108 + bcsr17: gpio-controller@11 { 109 + #gpio-cells = <2>; 110 + compatible = "fsl,mpc8569mds-bcsr-gpio"; 111 + reg = <0x11 0x1>; 112 + gpio-controller; 113 + }; 104 114 }; 105 115 106 116 nand@3,0 { ··· 325 315 gpio-controller; 326 316 }; 327 317 318 + qe_pio_f: gpio-controller@a0 { 319 + #gpio-cells = <2>; 320 + compatible = "fsl,mpc8569-qe-pario-bank", 321 + "fsl,mpc8323-qe-pario-bank"; 322 + reg = <0xa0 0x18>; 323 + gpio-controller; 324 + }; 325 + 328 326 pio1: ucc_pin@01 { 329 327 pio-map = < 330 328 /* port pin dir open_drain assignment has_irq */ ··· 437 419 interrupt-parent = <&mpic>; 438 420 }; 439 421 422 + timer@440 { 423 + compatible = "fsl,mpc8569-qe-gtm", 424 + "fsl,qe-gtm", "fsl,gtm"; 425 + reg = <0x440 0x40>; 426 + interrupts = <12 13 14 15>; 427 + interrupt-parent = <&qeic>; 428 + /* Filled in by U-Boot */ 429 + clock-frequency = <0>; 430 + }; 431 + 440 432 spi@4c0 { 441 433 #address-cells = <1>; 442 434 #size-cells = <0>; ··· 472 444 interrupts = <1>; 473 445 interrupt-parent = <&qeic>; 474 446 mode = "cpu"; 447 + }; 448 + 449 + usb@6c0 { 450 + compatible = "fsl,mpc8569-qe-usb", 451 + "fsl,mpc8323-qe-usb"; 452 + reg = <0x6c0 0x40 0x8b00 0x100>; 453 + interrupts = <11>; 454 + interrupt-parent = <&qeic>; 455 + fsl,fullspeed-clock = "clk5"; 456 + fsl,lowspeed-clock = "brg10"; 457 + gpios = <&qe_pio_f 3 0 /* USBOE */ 458 + &qe_pio_f 4 0 /* USBTP */ 459 + &qe_pio_f 5 0 /* USBTN */ 460 + &qe_pio_f 6 0 /* USBRP */ 461 + &qe_pio_f 8 0 /* USBRN */ 462 + &bcsr17 6 0 /* SPEED */ 463 + &bcsr17 5 1>; /* POWER */ 475 464 }; 476 465 477 466 enet0: ucc@2000 {
+4
arch/powerpc/platforms/85xx/mpc85xx_mds.c
··· 47 47 #include <asm/udbg.h> 48 48 #include <sysdev/fsl_soc.h> 49 49 #include <sysdev/fsl_pci.h> 50 + #include <sysdev/simple_gpio.h> 50 51 #include <asm/qe.h> 51 52 #include <asm/qe_ic.h> 52 53 #include <asm/mpic.h> ··· 305 304 306 305 static int __init mpc85xx_publish_devices(void) 307 306 { 307 + if (machine_is(mpc8569_mds)) 308 + simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); 309 + 308 310 /* Publish the QE devices */ 309 311 of_platform_bus_probe(NULL, mpc85xx_ids, NULL); 310 312