Skip to contentSkip to conversation

booting-without-of: bindings for FHCI USB, GPIO LEDs, MCU, and NAND on UPM

RFC Superseded Anton Vorontsov 6 participants 11 messages Apr 22, 2008 – Apr 24, 2008 Documentation

lore
Share & tools
lore
#0 lore raw

RFC 1/1 booting-without-of: bindings for FHCI USB, GPIO LEDs, MCU, and NAND on UPM

Hi all,

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Comments and suggestions are highly appreciated.

Thanks.

Documentation/powerpc/booting-without-of.txt +138 -0
index c350623..38fe3e9 100644
@@ -59,6 +59,11 @@ Table of Contents
       p) Freescale Synchronous Serial Interface
       q) USB EHCI controllers
       r) Freescale General-purpose Timers Module
+      s) Freescale USB Parameter RAM:
+      t) Freescale QUICC Engine USB Controller
+      u) LEDs on GPIOs
+      v) Freescale MCU with MPC8349E-mITX compatible firmware
+      w) NAND on UPM-driven Freescale Localbus
 
   VII - Marvell Discovery mv64[345]6x System Controller chips
     1) The /system-controller node
@@ -2866,6 +2871,139 @@ platforms are moved over to use the flattened-device-tree model.
     	clock-frequency = <0>;
     };
 
+    s) Freescale USB Parameter RAM:
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-muram-usb-pram",
+        "fsl,qe-muram-usb-pram", "fsl,cpm-muram-usb-pram".
+      - reg : should contain USB PRAM location and length.
+
+    Example:
+
+	usb-pram@8b00 {
+		compatible = "fsl,mpc8360-qe-muram-usb-pram",
+			     "fsl,qe-muram-usb-pram",
+			     "fsl,cpm-muram-usb-pram";
+		reg = <0x8b00 0x100>;
+	};
+
+    t) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"
+      - reg : should contain gtm registers location and length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source.
+      - fsl,usb-mode : should be "host".
+      - linux,hub-power-budget : optional, USB power budget for the root hub
+        in mA.
+      - gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
+        USBRN, SPEED (optional), and SUSPEND (optional).
+
+    Example:
+
+	usb@6c0 {
+		compatible = "fsl,mpc8360-qe-usb", "fsl,qe-usb",
+			     "fsl,usb-fhci";
+		reg = <0x6c0 0x40>;
+		interrupts = <11>;
+		interrupt-parent = <&qeic>;
+		fsl,fullspeed-clock = "clk21";
+		fsl,usb-mode = "host";
+		gpios = <&qe_pio_b  2 0 /* USBOE */
+			 &qe_pio_b  3 0 /* USBTP */
+			 &qe_pio_b  8 0 /* USBTN */
+			 &qe_pio_b  9 0 /* USBRP */
+			 &qe_pio_b 11 0 /* USBRN */
+			 &qe_pio_e 20 0 /* SPEED */
+			 &qe_pio_e 21 0 /* SUSPN */>;
+	};
+
+    u) LEDs on GPIOs
+
+    Required properties:
+      - compatible : should be "linux,gpio-led".
+      - linux,name : LED name.
+      - linux,active-low : property should be present if LED wired as
+        active-low.
+      - linux,default-trigger : Linux default trigger for this LED.
+      - linux,brightness : default brightness.
+      - gpios : should specify LED GPIO.
+
+    Example:
+
+	led@0 {
+		compatible = "linux,gpio-led";
+		linux,name = "pwr";
+		linux,brightness = <1>;
+		linux,active-low;
+		gpios = <&mcu_pio 0>;
+	};
+
+	led@1 {
+	        compatible = "linux,gpio-led";
+	        linux,name = "hdd";
+	        linux,default-trigger = "ide-disk";
+		linux,active-low;
+		gpios = <&mcu_pio 1>;
+	};
+
+    v) Freescale MCU with MPC8349E-mITX compatible firmware
+
+    Required properties:
+      - compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx",
+        "simple-bus";
+      - reg : should specify I2C address (0x0a).
+      - #address-cells : should be 0.
+      - #size-cells : should be 0.
+      - #gpio-cells : should be 1.
+      - gpio-controller : should be present;
+
+    Example:
+
+	mcu_pio: mcu@0a {
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#gpio-cells = <1>;
+		compatible = "fsl,mc9s08qg8-mpc8349emitx",
+			     "fsl,mcu-mpc8349emitx",
+			     "simple-bus";
+		reg = <0x0a>;
+		gpio-controller;
+	};
+
+    w) NAND on UPM-driven Freescale Localbus
+
+      Required properties:
+      - compatible : "fsl,upm-nand".
+      - reg : should specify localbus chip select and size used for the chip.
+      - width : should specify port size in bytes.
+      - fsl,upm-addr-offset : UPM pattern offset for the address latch.
+      - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
+      - fsl,wait-pattern : should be present if NAND chip requires waiting
+        for Ready-Not-Busy pin after each executed pattern.
+      - fsl,wait-write : should be present if NAND chip needs waiting on
+        Ready-Not-Busy pin after each write cycle.
+      - linux,chip-delay : optional, may contain delay value in milliseconds
+        (in case when Ready-Not-Busy pin was unspecified).
+      - gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.
+
+      Example:
+
+	flash@1,0 {
+		compatible = "stmicro,NAND512W3A2BN6E", "fsl,upm-nand";
+		reg = <1 0 1>;
+		width = <1>;
+		fsl,upm-addr-offset = <16>;
+		fsl,upm-cmd-offset = <8>;
+		fsl,wait-pattern;
+		fsl,wait-write;
+		gpios = <&qe_pio_e 18 0>;
+	};
+
 VII - Marvell Discovery mv64[345]6x System Controller chips
 ===========================================================
 
#1 lore raw
Quoted 8 lines · Anton Vorontsov

Hi all,

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Comments and suggestions are highly appreciated.

Thanks for cc'ing me. Mostly looks good, comments below.

Cheers,
g.

Quoted 17 lines
Documentation/powerpc/booting-without-of.txt +5 -0
index c350623..38fe3e9 100644
@@ -59,6 +59,11 @@ Table of Contents
      p) Freescale Synchronous Serial Interface
      q) USB EHCI controllers
      r) Freescale General-purpose Timers Module
+      s) Freescale USB Parameter RAM:
+      t) Freescale QUICC Engine USB Controller
+      u) LEDs on GPIOs
+      v) Freescale MCU with MPC8349E-mITX compatible firmware
+      w) NAND on UPM-driven Freescale Localbus
 
  VII - Marvell Discovery mv64[345]6x System Controller chips
    1) The /system-controller node

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2880

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +7 -0
@@ -2866,6 +2871,139 @@ platforms are moved over to use the flattened-device-tree model.
       clock-frequency = <0>;
    };
 
+    s) Freescale USB Parameter RAM:
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-muram-usb-pram",
+        "fsl,qe-muram-usb-pram", "fsl,cpm-muram-usb-pram".
+      - reg : should contain USB PRAM location and length.
+

Personally, I'd leave out "fsl,qe-muram-usb-pram" and "fsl,cpm-muram-usb-pram", but otherwise looks good to me.

Quoted 4 lines
Documentation/powerpc/booting-without-of.txt +4 -0
+    Example:
+
+       usb-pram@8b00 {
+               compatible = "fsl,mpc8360-qe-muram-usb-pram",

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2894

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+                            "fsl,qe-muram-usb-pram",
+                            "fsl,cpm-muram-usb-pram";
+               reg = <0x8b00 0x100>;
+       };
+
+    t) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"

Again, I'd leave out "fsl,qe-usb" and "fsl,usb-fhci".

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2899

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+      - reg : should contain gtm registers location and length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source.

What is the format of the clock properties?

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2900

Quoted 1 line
Documentation/powerpc/booting-without-of.txt +1 -0
+      - fsl,usb-mode : should be "host".

What other options are there? Is this something that would be better encoded into "compatible" for driver binding? (I've seen both approaches; I don't have a firm opinion on which is best)

Quoted 24 lines
Documentation/powerpc/booting-without-of.txt +24 -0
+      - linux,hub-power-budget : optional, USB power budget for the root hub
+        in mA.
+      - gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
+        USBRN, SPEED (optional), and SUSPEND (optional).
+
+    Example:
+
+       usb@6c0 {
+               compatible = "fsl,mpc8360-qe-usb", "fsl,qe-usb",
+                            "fsl,usb-fhci";
+               reg = <0x6c0 0x40>;
+               interrupts = <11>;
+               interrupt-parent = <&qeic>;
+               fsl,fullspeed-clock = "clk21";
+               fsl,usb-mode = "host";
+               gpios = <&qe_pio_b  2 0 /* USBOE */
+                        &qe_pio_b  3 0 /* USBTP */
+                        &qe_pio_b  8 0 /* USBTN */
+                        &qe_pio_b  9 0 /* USBRP */
+                        &qe_pio_b 11 0 /* USBRN */
+                        &qe_pio_e 20 0 /* SPEED */
+                        &qe_pio_e 21 0 /* SUSPN */>;
+       };
+

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2934

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+    u) LEDs on GPIOs
+
+    Required properties:
+      - compatible : should be "linux,gpio-led".
+      - linux,name : LED name.
+      - linux,active-low : property should be present if LED wired as
+        active-low.
+      - linux,default-trigger : Linux default trigger for this LED.
+      - linux,brightness : default brightness.
+      - gpios : should specify LED GPIO.

Looks good to me.

Quoted 14 lines
Documentation/powerpc/booting-without-of.txt +14 -0
+
+    Example:
+
+       led@0 {
+               compatible = "linux,gpio-led";
+               linux,name = "pwr";
+               linux,brightness = <1>;
+               linux,active-low;
+               gpios = <&mcu_pio 0>;
+       };
+
+       led@1 {
+               compatible = "linux,gpio-led";
+               linux,name = "hdd";

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2958

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+               linux,default-trigger = "ide-disk";
+               linux,active-low;
+               gpios = <&mcu_pio 1>;
+       };
+
+    v) Freescale MCU with MPC8349E-mITX compatible firmware
+
+    Required properties:
+      - compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx",
+        "simple-bus";

I don't think "simple-bus" is appropriate here. This device doesn't have any sub nodes so is not a bus. (I'm talking about the binding here; and I understand that simple-bus is convenient for causing subnodes to be picked up into of_platform and that you'll be putting the LED nodes as children of this one. It just shouldn't be part of this binding documentation.)

Also, since this node describes a device+firmware instead of just a device, then "fsl,mcu-mpc8349emitx" should uniquely identify the device from all other possibilities. It appears to be a very board specific thing.

Quoted 24 lines
Documentation/powerpc/booting-without-of.txt +24 -0
+      - reg : should specify I2C address (0x0a).
+      - #address-cells : should be 0.
+      - #size-cells : should be 0.
+      - #gpio-cells : should be 1.
+      - gpio-controller : should be present;
+
+    Example:
+
+       mcu_pio: mcu@0a {
+               #address-cells = <0>;
+               #size-cells = <0>;
+               #gpio-cells = <1>;
+               compatible = "fsl,mc9s08qg8-mpc8349emitx",
+                            "fsl,mcu-mpc8349emitx",
+                            "simple-bus";
+               reg = <0x0a>;
+               gpio-controller;
+       };
+
+    w) NAND on UPM-driven Freescale Localbus
+
+      Required properties:
+      - compatible : "fsl,upm-nand".
+      - reg : should specify localbus chip select and size used for the chip.

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2992

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+      - width : should specify port size in bytes.
+      - fsl,upm-addr-offset : UPM pattern offset for the address latch.
+      - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
+      - fsl,wait-pattern : should be present if NAND chip requires waiting
+        for Ready-Not-Busy pin after each executed pattern.
+      - fsl,wait-write : should be present if NAND chip needs waiting on
+        Ready-Not-Busy pin after each write cycle.
+      - linux,chip-delay : optional, may contain delay value in milliseconds
+        (in case when Ready-Not-Busy pin was unspecified).
+      - gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.

I'm not competent to comment on this binding; I haven't spent any time looking at NAND binding conventions.

Quoted 18 lines
Documentation/powerpc/booting-without-of.txt +14 -0
+
+      Example:
+
+       flash@1,0 {
+               compatible = "stmicro,NAND512W3A2BN6E", "fsl,upm-nand";
+               reg = <1 0 1>;
+               width = <1>;
+               fsl,upm-addr-offset = <16>;
+               fsl,upm-cmd-offset = <8>;
+               fsl,wait-pattern;
+               fsl,wait-write;
+               gpios = <&qe_pio_e 18 0>;
+       };
+
 VII - Marvell Discovery mv64[345]6x System Controller chips
 ===========================================================
 
Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#2 lore raw
Quoted 8 lines · Grant Likely

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2888

Quoted 8 lines
Documentation/powerpc/booting-without-of.txt +8 -0
+    Example:
+
+       usb-pram@8b00 {
+               compatible = "fsl,mpc8360-qe-muram-usb-pram",
+                            "fsl,qe-muram-usb-pram",
+                            "fsl,cpm-muram-usb-pram";
+               reg = <0x8b00 0x100>;
+       };

Why not put it as an additional reg resource on the ucc node, instead of in its own node? That's how existing CPM bindings do it.

Quoted 7 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2894

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+    t) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"

Again, I'd leave out "fsl,qe-usb" and "fsl,usb-fhci".

QE is the name of a specific IP block, and is unlikely to be broken in a non-backwards-compatible manner without having a new name such as QE2. I think this is taking "no generic names" too far. If these names *are* left out, then at least document which chip we're supposed to pick out of a hat to claim compatibility with.

-Scott

#3 lore raw
Quoted 10 lines · Scott Wood
Quoted 8 lines · Grant Likely

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2888

Quoted 8 lines
Documentation/powerpc/booting-without-of.txt +8 -0
+    Example:
+
+       usb-pram@8b00 {
+               compatible = "fsl,mpc8360-qe-muram-usb-pram",
+                            "fsl,qe-muram-usb-pram",
+                            "fsl,cpm-muram-usb-pram";
+               reg = <0x8b00 0x100>;
+       };
Quoted 2 lines

Why not put it as an additional reg resource on the ucc node, instead of in its own node? That's how existing CPM bindings do it.

hmmm, yeah, that sounds like a better approach.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+    t) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"
Quoted 5 lines
Quoted 1 line

Again, I'd leave out "fsl,qe-usb" and "fsl,usb-fhci".

QE is the name of a specific IP block, and is unlikely to be broken in a non-backwards-compatible manner without having a new name such as QE2. I think this is taking "no generic names" too far.

I'll just leave my comment as "I disagree" and resist the temptation to rehash my argument. :-)

Quoted 3 lines

If these names *are*
left out, then at least document which chip we're supposed to pick out of a hat to claim compatibility with.

I agree with that.

Quoted 3 lines

-Scott

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#4 lore raw
In reply to Grant Likely
Quoted 19 lines · Grant Likely
Quoted 6 lines · Anton Vorontsov

Hi all,

Documentation/powerpc/booting-without-of.txt +5 -0
+    w) NAND on UPM-driven Freescale Localbus
+
+      Required properties:
+      - compatible : "fsl,upm-nand".
+      - reg : should specify localbus chip select and size used for the chip.

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2992

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+      - width : should specify port size in bytes.
+      - fsl,upm-addr-offset : UPM pattern offset for the address latch.
+      - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
+      - fsl,wait-pattern : should be present if NAND chip requires waiting
+        for Ready-Not-Busy pin after each executed pattern.
+      - fsl,wait-write : should be present if NAND chip needs waiting on
+        Ready-Not-Busy pin after each write cycle.
+      - linux,chip-delay : optional, may contain delay value in milliseconds
+        (in case when Ready-Not-Busy pin was unspecified).
+      - gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.
Quoted 2 lines

I'm not competent to comment on this binding; I haven't spent any time looking at NAND binding conventions.

That's because there are none, and every time someone proposes one it's like this. Full of weird $board specific stuff that have nothing to do with the actual NAND chip.

For example, why is fsl,wait-write defined as an fsl specific property? It seems generic to the NAND chip itself. Also, why in the example is the specific NAND chip part number listed, followed by fsl,upm-nand? It's almost as if people want to mix the NAND chip and NAND controller definitions together. Maybe there is a good reason for it, but it's really confusing.

josh

#5 lore raw
Quoted 27 lines · Josh Boyer
Quoted 19 lines · Grant Likely
Quoted 6 lines · Anton Vorontsov

Hi all,

Documentation/powerpc/booting-without-of.txt +5 -0
+    w) NAND on UPM-driven Freescale Localbus
+
+      Required properties:
+      - compatible : "fsl,upm-nand".
+      - reg : should specify localbus chip select and size used for the chip.

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2992

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+      - width : should specify port size in bytes.
+      - fsl,upm-addr-offset : UPM pattern offset for the address latch.
+      - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
+      - fsl,wait-pattern : should be present if NAND chip requires waiting
+        for Ready-Not-Busy pin after each executed pattern.
+      - fsl,wait-write : should be present if NAND chip needs waiting on
+        Ready-Not-Busy pin after each write cycle.
+      - linux,chip-delay : optional, may contain delay value in milliseconds
+        (in case when Ready-Not-Busy pin was unspecified).
+      - gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.
Quoted 2 lines

I'm not competent to comment on this binding; I haven't spent any time looking at NAND binding conventions.

That's because there are none, and every time someone proposes one it's like this. Full of weird $board specific stuff that have nothing to do with the actual NAND chip.

Quoted 6 lines

For example, why is fsl,wait-write defined as an fsl specific property? It seems generic to the NAND chip itself. Also, why in the example is the specific NAND chip part number listed, followed by fsl,upm-nand? It's almost as if people want to mix the NAND chip and NAND controller definitions together. Maybe there is a good reason for it, but it's really confusing.

Much thanks for the idea, I should indeed separate UPM NAND controller and NAND chip itself.

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#6 lore raw
In reply to Grant Likely
Quoted 4 lines · Grant Likely
Quoted 2 lines · Anton Vorontsov

Hi all,

Quoted 8 lines
Quoted 6 lines

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Comments and suggestions are highly appreciated.

Thanks for cc'ing me. Mostly looks good, comments below.

Thanks for the comments!

Quoted 23 lines

Cheers,
g.

Quoted 20 lines
Documentation/powerpc/booting-without-of.txt +5 -0
index c350623..38fe3e9 100644
@@ -59,6 +59,11 @@ Table of Contents
      p) Freescale Synchronous Serial Interface
      q) USB EHCI controllers
      r) Freescale General-purpose Timers Module
+      s) Freescale USB Parameter RAM:
+      t) Freescale QUICC Engine USB Controller
+      u) LEDs on GPIOs
+      v) Freescale MCU with MPC8349E-mITX compatible firmware
+      w) NAND on UPM-driven Freescale Localbus
 
  VII - Marvell Discovery mv64[345]6x System Controller chips
    1) The /system-controller node
@@ -2866,6 +2871,139 @@ platforms are moved over to use the flattened-device-tree model.
       clock-frequency = <0>;
    };
 
Quoted 10 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2880

Quoted 7 lines
Documentation/powerpc/booting-without-of.txt +7 -0
+    s) Freescale USB Parameter RAM:
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-muram-usb-pram",
+        "fsl,qe-muram-usb-pram", "fsl,cpm-muram-usb-pram".
+      - reg : should contain USB PRAM location and length.
+

Personally, I'd leave out "fsl,qe-muram-usb-pram" and "fsl,cpm-muram-usb-pram", but otherwise looks good to me.

Per Scott comment I'll try to fold pram address into usb node, so this node isn't relevant anymore.

Quoted 8 lines
Quoted 8 lines
Documentation/powerpc/booting-without-of.txt +8 -0
+    Example:
+
+       usb-pram@8b00 {
+               compatible = "fsl,mpc8360-qe-muram-usb-pram",
+                            "fsl,qe-muram-usb-pram",
+                            "fsl,cpm-muram-usb-pram";
+               reg = <0x8b00 0x100>;
+       };
Quoted 8 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2894

Quoted 6 lines
Documentation/powerpc/booting-without-of.txt +6 -0
+
+    t) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"

Again, I'd leave out "fsl,qe-usb" and "fsl,usb-fhci".

Given that mpc8323 is the first (IIRC) chip that supports QE USB, do I understand correctly that you're purposing something like this (e.g. for mpc8360):

       usb@6c0 {
               compatible = "fsl,mpc8360-qe-usb", "fsl,mpc8323-qe-usb";

Or... do I have to write somthing like this in the driver itself:

static const struct of_device_id of_fhci_match[] = {
	{ .compatible = "fsl,mpc8323-qe-usb", },
	{ .compatible = "fsl,mpc8360-qe-usb", },
	{ ...new chips... }
	{},
};

And specify only "fsl,mpc8360-qe-usb" (for mpc8360 case again)?

I have no objections to either of this, just want some clarity.

Quoted 7 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2899

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+      - reg : should contain gtm registers location and length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source.

What is the format of the clock properties?

I'll make it clear in the next revision (the format is "clk<NUM>" or "brg<NUM>").

Quoted 5 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2900

Quoted 1 line
Documentation/powerpc/booting-without-of.txt +1 -0
+      - fsl,usb-mode : should be "host".

What other options are there? Is this something that would be better encoded into "compatible" for driver binding? (I've seen both approaches; I don't have a firm opinion on which is best)

Well, no. QE USB is the same device, but it can be used as either host or gadget (peripheral). Peripheral mode isn't yet supported, so binding lists only host mode.

Quoted 60 lines
Quoted 24 lines
Documentation/powerpc/booting-without-of.txt +24 -0
+      - linux,hub-power-budget : optional, USB power budget for the root hub
+        in mA.
+      - gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
+        USBRN, SPEED (optional), and SUSPEND (optional).
+
+    Example:
+
+       usb@6c0 {
+               compatible = "fsl,mpc8360-qe-usb", "fsl,qe-usb",
+                            "fsl,usb-fhci";
+               reg = <0x6c0 0x40>;
+               interrupts = <11>;
+               interrupt-parent = <&qeic>;
+               fsl,fullspeed-clock = "clk21";
+               fsl,usb-mode = "host";
+               gpios = <&qe_pio_b  2 0 /* USBOE */
+                        &qe_pio_b  3 0 /* USBTP */
+                        &qe_pio_b  8 0 /* USBTN */
+                        &qe_pio_b  9 0 /* USBRP */
+                        &qe_pio_b 11 0 /* USBRN */
+                        &qe_pio_e 20 0 /* SPEED */
+                        &qe_pio_e 21 0 /* SUSPN */>;
+       };
+

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2934

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+    u) LEDs on GPIOs
+
+    Required properties:
+      - compatible : should be "linux,gpio-led".
+      - linux,name : LED name.
+      - linux,active-low : property should be present if LED wired as
+        active-low.
+      - linux,default-trigger : Linux default trigger for this LED.
+      - linux,brightness : default brightness.
+      - gpios : should specify LED GPIO.

Looks good to me.

Quoted 23 lines
Documentation/powerpc/booting-without-of.txt +23 -0
+
+    Example:
+
+       led@0 {
+               compatible = "linux,gpio-led";
+               linux,name = "pwr";
+               linux,brightness = <1>;
+               linux,active-low;
+               gpios = <&mcu_pio 0>;
+       };
+
+       led@1 {
+               compatible = "linux,gpio-led";
+               linux,name = "hdd";
+               linux,default-trigger = "ide-disk";
+               linux,active-low;
+               gpios = <&mcu_pio 1>;
+       };
+
+    v) Freescale MCU with MPC8349E-mITX compatible firmware
+
+    Required properties:
+      - compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx",
Quoted 8 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2958

Quoted 1 line
Documentation/powerpc/booting-without-of.txt +1 -0
+        "simple-bus";

I don't think "simple-bus" is appropriate here. This device doesn't have any sub nodes so is not a bus. (I'm talking about the binding here; and I understand that simple-bus is convenient for causing subnodes to be picked up into of_platform and that you'll be putting the LED nodes as children of this one. It just shouldn't be part of this binding documentation.)

Ok, I'll remove simple-bus from the bindings.

Quoted 4 lines

Also, since this node describes a device+firmware instead of just a device, then "fsl,mcu-mpc8349emitx" should uniquely identify the device from all other possibilities. It appears to be a very board specific thing.

Yes, it is board specific. For example, for MPC8377E-RDB boards I'll write this:

compatible = "fsl,mc9s08qg8-mpc8377erdb", "fsl,mcu-mpc8349emitx",

	     "simple-bus";

I.e. "very-specific", "device-that-compatible", "simple-bus".

Is that ok?

Quoted 31 lines
Quoted 31 lines
Documentation/powerpc/booting-without-of.txt +30 -0
+        "simple-bus";
 
+      - reg : should specify I2C address (0x0a).
+      - #address-cells : should be 0.
+      - #size-cells : should be 0.
+      - #gpio-cells : should be 1.
+      - gpio-controller : should be present;
+
+    Example:
+
+       mcu_pio: mcu@0a {
+               #address-cells = <0>;
+               #size-cells = <0>;
+               #gpio-cells = <1>;
+               compatible = "fsl,mc9s08qg8-mpc8349emitx",
+                            "fsl,mcu-mpc8349emitx",
+                            "simple-bus";
+               reg = <0x0a>;
+               gpio-controller;
+       };
+
+    w) NAND on UPM-driven Freescale Localbus
+
+      Required properties:
+      - compatible : "fsl,upm-nand".
+      - reg : should specify localbus chip select and size used for the chip.
+      - width : should specify port size in bytes.
+      - fsl,upm-addr-offset : UPM pattern offset for the address latch.
+      - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
+      - fsl,wait-pattern : should be present if NAND chip requires waiting
+        for Ready-Not-Busy pin after each executed pattern.
Quoted 8 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2992

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+      - fsl,wait-write : should be present if NAND chip needs waiting on
+        Ready-Not-Busy pin after each write cycle.
+      - linux,chip-delay : optional, may contain delay value in milliseconds
+        (in case when Ready-Not-Busy pin was unspecified).
+      - gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.

I'm not competent to comment on this binding; I haven't spent any time looking at NAND binding conventions.

Thanks for bringing it up though, Josh Boyer evolved it into neat idea. :-)

Quoted 16 lines
Quoted 16 lines
Documentation/powerpc/booting-without-of.txt +14 -0
+
+      Example:
+
+       flash@1,0 {
+               compatible = "stmicro,NAND512W3A2BN6E", "fsl,upm-nand";
+               reg = <1 0 1>;
+               width = <1>;
+               fsl,upm-addr-offset = <16>;
+               fsl,upm-cmd-offset = <8>;
+               fsl,wait-pattern;
+               fsl,wait-write;
+               gpios = <&qe_pio_e 18 0>;
+       };
+
 VII - Marvell Discovery mv64[345]6x System Controller chips
 ===========================================================
Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#7 lore raw
Quoted 11 lines · Anton Vorontsov
Quoted 9 lines · Grant Likely
Quoted 7 lines · Anton Vorontsov

Hi all,

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Comments and suggestions are highly appreciated.

Thanks for cc'ing me. Mostly looks good, comments below.

Thanks for the comments!

np.

Quoted 31 lines
Quoted 8 lines
Quoted 8 lines
Documentation/powerpc/booting-without-of.txt +8 -0
+    Example:
+
+       usb-pram@8b00 {
+               compatible = "fsl,mpc8360-qe-muram-usb-pram",
+                            "fsl,qe-muram-usb-pram",
+                            "fsl,cpm-muram-usb-pram";
+               reg = <0x8b00 0x100>;
+       };
Quoted 8 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2894

Quoted 6 lines
Documentation/powerpc/booting-without-of.txt +6 -0
+
+    t) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"

Again, I'd leave out "fsl,qe-usb" and "fsl,usb-fhci".

Given that mpc8323 is the first (IIRC) chip that supports QE USB, do I understand correctly that you're purposing something like this (e.g. for mpc8360):

       usb@6c0 {
               compatible = "fsl,mpc8360-qe-usb", "fsl,mpc8323-qe-usb";

Or... do I have to write somthing like this in the driver itself:

 static const struct of_device_id of_fhci_match[] = {
        { .compatible = "fsl,mpc8323-qe-usb", },
        { .compatible = "fsl,mpc8360-qe-usb", },
        { ...new chips... }
        {},
Quoted 5 lines

};

And specify only "fsl,mpc8360-qe-usb" (for mpc8360 case again)?

I have no objections to either of this, just want some clarity.

*Both* are perfectly valid options. Personally, I'd choose the first option as it keeps the size of the driver match table small. However, the option is always there to add entries to the match table if somebody ships a board with wonky firmware that has a never-before-seen value in compatible (so the system is fault-tolerant).

Quoted 10 lines
Quoted 7 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2899

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+      - reg : should contain gtm registers location and length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source.

What is the format of the clock properties?

I'll make it clear in the next revision (the format is "clk<NUM>" or "brg<NUM>").

Does the clock come from another device that is represented in the tree? If so, should it have a phandle to that node?

Quoted 24 lines
Quoted 6 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2958

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+    v) Freescale MCU with MPC8349E-mITX compatible firmware
+
+    Required properties:
+      - compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx",
+        "simple-bus";
Quoted 6 lines

I don't think "simple-bus" is appropriate here. This device doesn't have any sub nodes so is not a bus. (I'm talking about the binding here; and I understand that simple-bus is convenient for causing subnodes to be picked up into of_platform and that you'll be putting the LED nodes as children of this one. It just shouldn't be part of this binding documentation.)

Ok, I'll remove simple-bus from the bindings.

Quoted 4 lines

Also, since this node describes a device+firmware instead of just a device, then "fsl,mcu-mpc8349emitx" should uniquely identify the device from all other possibilities. It appears to be a very board specific thing.

Yes, it is board specific. For example, for MPC8377E-RDB boards I'll write this:

Quoted 6 lines

compatible = "fsl,mc9s08qg8-mpc8377erdb", "fsl,mcu-mpc8349emitx",

             "simple-bus";

I.e. "very-specific", "device-that-compatible", "simple-bus".

Is that ok?

Ah; okay. I think I understand what you're doing now. Yes, this is fine.

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#8 lore raw
In reply to Anton Vorontsov

Hi Anton,

Quoted 7 lines · Anton Vorontsov

Hi all,

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Review

Quoted 5 lines

Comments and suggestions are highly appreciated.

Thanks.

(quoted diff) +0 -0

b/Documentation/powerpc/booting-without-of.txt

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the

Quoted 16 lines

index c350623..38fe3e9 100644

Documentation/powerpc/booting-without-of.txt +5 -0
@@ -59,6 +59,11 @@ Table of Contents
       p) Freescale Synchronous Serial Interface
       q) USB EHCI controllers
       r) Freescale General-purpose Timers Module
+      s) Freescale USB Parameter RAM:
+      t) Freescale QUICC Engine USB Controller
+      u) LEDs on GPIOs
+      v) Freescale MCU with MPC8349E-mITX compatible firmware
+      w) NAND on UPM-driven Freescale Localbus
 
   VII - Marvell Discovery mv64[345]6x System Controller chips
     1) The /system-controller node
@@ -2866,6 +2871,139 @@ platforms are moved over to use the 

flattened-device-tree model.

Quoted 21 lines
Documentation/powerpc/booting-without-of.txt +18 -0
     	clock-frequency = <0>;
     };
 
+    s) Freescale USB Parameter RAM:
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-muram-usb-pram",
+        "fsl,qe-muram-usb-pram", "fsl,cpm-muram-usb-pram".
+      - reg : should contain USB PRAM location and length.
+
+    Example:
+
+	usb-pram@8b00 {
+		compatible = "fsl,mpc8360-qe-muram-usb-pram",
+			     "fsl,qe-muram-usb-pram",
+			     "fsl,cpm-muram-usb-pram";
+		reg = <0x8b00 0x100>;
+	};
+
+    t) Freescale QUICC Engine USB Controller
+

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model.

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"
+      - reg : should contain gtm registers location and length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source.
+      - fsl,usb-mode : should be "host".
+      - linux,hub-power-budget : optional, USB power budget for the root 

hub

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the · line 2903

Quoted 2 lines
Documentation/powerpc/booting-without-of.txt +2 -0
+        in mA.
+      - gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, 

USBRP,

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2904

Quoted 1 line
Documentation/powerpc/booting-without-of.txt +1 -0
+        USBRN, SPEED (optional), and SUSPEND (optional).

Suspend should in my opinion be renamed power (or bus power or anything similar), as it controls the USB power and not USB PHY sleep mode.

Quoted 16 lines
Documentation/powerpc/booting-without-of.txt +16 -0
+    Example:
+
+	usb@6c0 {
+		compatible = "fsl,mpc8360-qe-usb", "fsl,qe-usb",
+			     "fsl,usb-fhci";
+		reg = <0x6c0 0x40>;
+		interrupts = <11>;
+		interrupt-parent = <&qeic>;
+		fsl,fullspeed-clock = "clk21";
+		fsl,usb-mode = "host";
+		gpios = <&qe_pio_b  2 0 /* USBOE */
+			 &qe_pio_b  3 0 /* USBTP */
+			 &qe_pio_b  8 0 /* USBTN */
+			 &qe_pio_b  9 0 /* USBRP */
+			 &qe_pio_b 11 0 /* USBRN */
+			 &qe_pio_e 20 0 /* SPEED */

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2931

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+			 &qe_pio_e 21 0 /* SUSPN */>;
+	};
+
+    u) LEDs on GPIOs
+
+    Required properties:
+      - compatible : should be "linux,gpio-led".
+      - linux,name : LED name.
+      - linux,active-low : property should be present if LED wired as
+        active-low.

Just thinking out loud, wasn't the third GPIO cell supposed to be used to encode such properties ?

Quoted 21 lines
Documentation/powerpc/booting-without-of.txt +21 -0
+      - linux,default-trigger : Linux default trigger for this LED.
+      - linux,brightness : default brightness.
+      - gpios : should specify LED GPIO.
+
+    Example:
+
+	led@0 {
+		compatible = "linux,gpio-led";
+		linux,name = "pwr";
+		linux,brightness = <1>;
+		linux,active-low;
+		gpios = <&mcu_pio 0>;
+	};
+
+	led@1 {
+	        compatible = "linux,gpio-led";
+	        linux,name = "hdd";
+	        linux,default-trigger = "ide-disk";
+		linux,active-low;
+		gpios = <&mcu_pio 1>;
+	};

[snip]

Signature · 9 lines
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
#9 lore raw
Quoted 65 lines · Laurent Pinchart

Hi Anton,

Quoted 7 lines · Anton Vorontsov

Hi all,

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Review

Quoted 5 lines

Comments and suggestions are highly appreciated.

Thanks.

(quoted diff) +0 -0

b/Documentation/powerpc/booting-without-of.txt

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the

Quoted 16 lines

index c350623..38fe3e9 100644

Documentation/powerpc/booting-without-of.txt +5 -0
@@ -59,6 +59,11 @@ Table of Contents
       p) Freescale Synchronous Serial Interface
       q) USB EHCI controllers
       r) Freescale General-purpose Timers Module
+      s) Freescale USB Parameter RAM:
+      t) Freescale QUICC Engine USB Controller
+      u) LEDs on GPIOs
+      v) Freescale MCU with MPC8349E-mITX compatible firmware
+      w) NAND on UPM-driven Freescale Localbus
 
   VII - Marvell Discovery mv64[345]6x System Controller chips
     1) The /system-controller node
@@ -2866,6 +2871,139 @@ platforms are moved over to use the 

flattened-device-tree model.

Quoted 21 lines
Documentation/powerpc/booting-without-of.txt +18 -0
     	clock-frequency = <0>;
     };
 
+    s) Freescale USB Parameter RAM:
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-muram-usb-pram",
+        "fsl,qe-muram-usb-pram", "fsl,cpm-muram-usb-pram".
+      - reg : should contain USB PRAM location and length.
+
+    Example:
+
+	usb-pram@8b00 {
+		compatible = "fsl,mpc8360-qe-muram-usb-pram",
+			     "fsl,qe-muram-usb-pram",
+			     "fsl,cpm-muram-usb-pram";
+		reg = <0x8b00 0x100>;
+	};
+
+    t) Freescale QUICC Engine USB Controller
+

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model.

Quoted 10 lines
Documentation/powerpc/booting-without-of.txt +10 -0
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,qe-usb",
+        "fsl,usb-fhci"
+      - reg : should contain gtm registers location and length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source.
+      - fsl,usb-mode : should be "host".
+      - linux,hub-power-budget : optional, USB power budget for the root 

hub

Quoted 7 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the · line 2903

Quoted 2 lines
Documentation/powerpc/booting-without-of.txt +2 -0
+        in mA.
+      - gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, 

USBRP,

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2904

Quoted 1 line
Documentation/powerpc/booting-without-of.txt +1 -0
+        USBRN, SPEED (optional), and SUSPEND (optional).

Suspend should in my opinion be renamed power (or bus power or anything similar), as it controls the USB power and not USB PHY sleep mode.

Thanks, I'll rename it.

Quoted 21 lines
Quoted 21 lines
Documentation/powerpc/booting-without-of.txt +21 -0
+    Example:
+
+	usb@6c0 {
+		compatible = "fsl,mpc8360-qe-usb", "fsl,qe-usb",
+			     "fsl,usb-fhci";
+		reg = <0x6c0 0x40>;
+		interrupts = <11>;
+		interrupt-parent = <&qeic>;
+		fsl,fullspeed-clock = "clk21";
+		fsl,usb-mode = "host";
+		gpios = <&qe_pio_b  2 0 /* USBOE */
+			 &qe_pio_b  3 0 /* USBTP */
+			 &qe_pio_b  8 0 /* USBTN */
+			 &qe_pio_b  9 0 /* USBRP */
+			 &qe_pio_b 11 0 /* USBRN */
+			 &qe_pio_e 20 0 /* SPEED */
+			 &qe_pio_e 21 0 /* SUSPN */>;
+	};
+
+    u) LEDs on GPIOs
+
Quoted 8 lines

Documentation/powerpc/booting-without-of.txt platforms are moved over to use the flattened-device-tree model. · line 2931

Quoted 5 lines
Documentation/powerpc/booting-without-of.txt +5 -0
+    Required properties:
+      - compatible : should be "linux,gpio-led".
+      - linux,name : LED name.
+      - linux,active-low : property should be present if LED wired as
+        active-low.

Just thinking out loud, wasn't the third GPIO cell supposed to be used to encode such properties ?

Oh well, yes, origianally I wrote that it `may' encode this information. Encoding this would be really useful if node is using many gpios that are wired in some random inverted/not-inverted way...

gpios <&qe_pio 2 1   /* wired active-low */
       &qe_pio 3 0   /* wired active-high */
       &qe_pio 4 1   /* wired active-low */
       &qe_pio 5 0   /* wired active-high */
       &qe_pio 6 1>; /* wired active-low */

But we didn't see this setup yet, and I'm not sure if I want to implement this support now just for the LEDs. Specifying this information via gpios = <> property or separate one isn't going to conflict anyhow and when we'll implement actual flags for GPIOs, we'll easily could switch to it in backwards compatible way.

Thanks for brining it up though.

Quoted 21 lines
Quoted 21 lines
Documentation/powerpc/booting-without-of.txt +21 -0
+      - linux,default-trigger : Linux default trigger for this LED.
+      - linux,brightness : default brightness.
+      - gpios : should specify LED GPIO.
+
+    Example:
+
+	led@0 {
+		compatible = "linux,gpio-led";
+		linux,name = "pwr";
+		linux,brightness = <1>;
+		linux,active-low;
+		gpios = <&mcu_pio 0>;
+	};
+
+	led@1 {
+	        compatible = "linux,gpio-led";
+	        linux,name = "hdd";
+	        linux,default-trigger = "ide-disk";
+		linux,active-low;
+		gpios = <&mcu_pio 1>;
+	};
Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#10 lore raw

RFC v2 1/1 booting-without-of: bindings for FHCI USB, GPIO LEDs, MCU, and NAND on UPM

In reply to Anton Vorontsov
Quoted 8 lines · Anton Vorontsov

Hi all,

Here is purposed bindings draft for the new drivers that I would like to send for this or next merge window, depending on results of this RFC. ;-) (The new bindings needs to be in-tree or at least Acked before I could send the drivers.)

Comments and suggestions are highly appreciated.

Much thanks for the comments on previous version. Here is the new one, please speak up if there is anything I could improve.

Thanks in advance.

Documentation/powerpc/booting-without-of.txt +125 -0
index c350623..b560dc5 100644
@@ -59,6 +59,10 @@ Table of Contents
       p) Freescale Synchronous Serial Interface
       q) USB EHCI controllers
       r) Freescale General-purpose Timers Module
+      s) Freescale QUICC Engine USB Controller
+      t) LEDs on GPIOs
+      u) Freescale MCU with MPC8349E-mITX compatible firmware
+      v) NAND on UPM-driven Freescale Localbus
 
   VII - Marvell Discovery mv64[345]6x System Controller chips
     1) The /system-controller node
@@ -2866,6 +2870,128 @@ platforms are moved over to use the flattened-device-tree model.
     	clock-frequency = <0>;
     };
 
+    s) Freescale QUICC Engine USB Controller
+
+    Required properties:
+      - compatible : should be "fsl,<chip>-qe-usb", "fsl,mpc8323-qe-usb";
+      - reg : the first two cells should contain gtm registers location and
+        length, the next two two cells should contain PRAM location and
+        length.
+      - interrupts : should contain USB interrupt.
+      - interrupt-parent : interrupt source phandle.
+      - fsl,fullspeed-clock : specifies the full speed USB clock source in
+        "clk<num>" or "brg<num>" format.
+      - fsl,lowspeed-clock : specifies the low speed USB clock source in
+        "clk<num>" or "brg<num>" format.
+      - fsl,usb-mode : should be "host".
+      - linux,hub-power-budget : optional, USB power budget for the root hub
+        in mA.
+      - gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
+        USBRN, SPEED (optional), and POWER (optional).
+
+    Example:
+
+	usb@6c0 {
+		compatible = "fsl,mpc8360-qe-usb", "fsl,mpc8323-qe-usb";
+		reg = <0x6c0 0x40 0x8b00 0x100>;
+		interrupts = <11>;
+		interrupt-parent = <&qeic>;
+		fsl,fullspeed-clock = "clk21";
+		fsl,usb-mode = "host";
+		gpios = <&qe_pio_b  2 0 /* USBOE */
+			 &qe_pio_b  3 0 /* USBTP */
+			 &qe_pio_b  8 0 /* USBTN */
+			 &qe_pio_b  9 0 /* USBRP */
+			 &qe_pio_b 11 0 /* USBRN */
+			 &qe_pio_e 20 0 /* SPEED */
+			 &qe_pio_e 21 0 /* POWER */>;
+	};
+
+    t) LEDs on GPIOs
+
+    Required properties:
+      - compatible : should be "linux,gpio-led".
+      - linux,name : LED name.
+      - linux,active-low : property should be present if LED wired as
+        active-low.
+      - linux,default-trigger : Linux default trigger for this LED.
+      - linux,brightness : default brightness.
+      - gpios : should specify LED GPIO.
+
+    Example:
+
+	led@0 {
+		compatible = "linux,gpio-led";
+		linux,name = "pwr";
+		linux,brightness = <1>;
+		linux,active-low;
+		gpios = <&mcu_pio 0>;
+	};
+
+	led@1 {
+	        compatible = "linux,gpio-led";
+	        linux,name = "hdd";
+	        linux,default-trigger = "ide-disk";
+		linux,active-low;
+		gpios = <&mcu_pio 1>;
+	};
+
+    u) Freescale MCU with MPC8349E-mITX compatible firmware
+
+    Required properties:
+      - compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx";
+      - reg : should specify I2C address (0x0a).
+      - #address-cells : should be 0.
+      - #size-cells : should be 0.
+      - #gpio-cells : should be 2.
+      - gpio-controller : should be present;
+
+    Example:
+
+	mcu_pio: mcu@0a {
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#gpio-cells = <2>;
+		compatible = "fsl,mc9s08qg8-mpc8349emitx",
+			     "fsl,mcu-mpc8349emitx";
+		reg = <0x0a>;
+		gpio-controller;
+	};
+
+    v) Freescale Localbus UPM programmed to work with NAND flash
+
+      Required properties:
+      - #address-cells : should be 0;
+      - #size-cells : should be 0;
+      - compatible : "fsl,upm-nand".
+      - reg : should specify localbus chip select and size used for the chip.
+      - fsl,upm-addr-offset : UPM pattern offset for the address latch.
+      - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
+      - gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.
+
+      Example:
+
+	upm@1,0 {
+		#address-cells = <0>;
+		#size-cells = <0>;
+		compatible = "fsl,upm-nand";
+		reg = <1 0 1>;
+		fsl,upm-addr-offset = <16>;
+		fsl,upm-cmd-offset = <8>;
+		gpios = <&qe_pio_e 18 0>;
+
+		flash {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "stmicro,NAND512W3A2BN6E";
+
+			partition@0 {
+				...
+			};
+		};
+	};
+
 VII - Marvell Discovery mv64[345]6x System Controller chips
 ===========================================================