* [PATCH 1/3] add default device trees for MPC837x MDS board
@ 2008-01-07 12:03 Li Yang
2008-01-07 12:03 ` [PATCH 2/3] add MPC837x USB platform support Li Yang
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Li Yang @ 2008-01-07 12:03 UTC (permalink / raw)
To: galak, linuxppc-dev; +Cc: Li Yang, paulus
Signed-off-by: Li Yang <leoli@freescale.com>
---
address comments and use new dts spec.
arch/powerpc/boot/dts/mpc8377_mds.dts | 277 +++++++++++++++++++++++++++++++
arch/powerpc/boot/dts/mpc8378_mds.dts | 263 +++++++++++++++++++++++++++++
arch/powerpc/boot/dts/mpc8379_mds.dts | 291 +++++++++++++++++++++++++++++++++
3 files changed, 831 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
new file mode 100644
index 0000000..b50b5f9
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -0,0 +1,277 @@
+/*
+ * MPC8377E MDS Device Tree Source
+ *
+ * Copyright 2007 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/ {
+ model = "fsl,mpc8377emds";
+ compatible = "fsl,mpc8377emds","fsl,mpc837xmds";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aliases {
+ ethernet0 = &enet0;
+ ethernet1 = &enet1;
+ serial0 = &serial0;
+ serial1 = &serial1;
+ pci0 = &pci0;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ PowerPC,8377@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <20>;
+ i-cache-line-size = <20>;
+ d-cache-size = <8000>; // L1, 32K
+ i-cache-size = <8000>; // L1, 32K
+ timebase-frequency = <0>;
+ bus-frequency = <0>;
+ clock-frequency = <0>;
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <00000000 20000000>; // 512MB at 0
+ };
+
+ soc@e0000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ device_type = "soc";
+ ranges = <0 e0000000 00100000>;
+ reg = <e0000000 00000200>;
+ bus-frequency = <0>;
+
+ wdt@200 {
+ compatible = "mpc83xx_wdt";
+ reg = <200 100>;
+ };
+
+ i2c@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cell-index = <0>;
+ compatible = "fsl-i2c";
+ reg = <3000 100>;
+ interrupts = <e 8>;
+ interrupt-parent = < &ipic >;
+ dfsrr;
+ };
+
+ i2c@3100 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cell-index = <1>;
+ compatible = "fsl-i2c";
+ reg = <3100 100>;
+ interrupts = <f 8>;
+ interrupt-parent = < &ipic >;
+ dfsrr;
+ };
+
+ spi@7000 {
+ compatible = "fsl_spi";
+ reg = <7000 1000>;
+ interrupts = <10 8>;
+ interrupt-parent = < &ipic >;
+ mode = "cpu";
+ };
+
+ /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+ usb@23000 {
+ compatible = "fsl-usb2-dr";
+ reg = <23000 1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupt-parent = < &ipic >;
+ interrupts = <26 8>;
+ phy_type = "utmi_wide";
+ };
+
+ mdio@24520 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,gianfar-mdio";
+ reg = <24520 20>;
+ phy2: ethernet-phy@2 {
+ interrupt-parent = < &ipic >;
+ interrupts = <11 8>;
+ reg = <2>;
+ device_type = "ethernet-phy";
+ };
+ phy3: ethernet-phy@3 {
+ interrupt-parent = < &ipic >;
+ interrupts = <12 8>;
+ reg = <3>;
+ device_type = "ethernet-phy";
+ };
+ };
+
+ enet0: ethernet@24000 {
+ cell-index = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <24000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <20 8 21 8 22 8>;
+ phy-connection-type = "mii";
+ interrupt-parent = < &ipic >;
+ phy-handle = < &phy2 >;
+ };
+
+ enet1: ethernet@25000 {
+ cell-index = <1>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <25000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <23 8 24 8 25 8>;
+ phy-connection-type = "mii";
+ interrupt-parent = < &ipic >;
+ phy-handle = < &phy3 >;
+ };
+
+ serial0: serial@4500 {
+ cell-index = <0>;
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4500 100>;
+ clock-frequency = <0>;
+ interrupts = <9 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ serial1: serial@4600 {
+ cell-index = <1>;
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4600 100>;
+ clock-frequency = <0>;
+ interrupts = <a 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ crypto@30000 {
+ model = "SEC3";
+ compatible = "talitos";
+ reg = <30000 10000>;
+ interrupts = <b 8>;
+ interrupt-parent = < &ipic >;
+ /* Rev. 3.0 geometry */
+ num-channels = <4>;
+ channel-fifo-len = <18>;
+ exec-units-mask = <000001fe>;
+ descriptor-types-mask = <03ab0ebf>;
+ };
+
+ sdhc@2e000 {
+ model = "eSDHC";
+ compatible = "fsl,esdhc";
+ reg = <2e000 1000>;
+ interrupts = <2a 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ sata@18000 {
+ compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
+ reg = <18000 1000>;
+ interrupts = <2c 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ sata@19000 {
+ compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
+ reg = <19000 1000>;
+ interrupts = <2d 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ /* IPIC
+ * interrupts cell = <intr #, sense>
+ * sense values match linux IORESOURCE_IRQ_* defines:
+ * sense == 8: Level, low assertion
+ * sense == 2: Edge, high-to-low change
+ */
+ ipic: pic@700 {
+ compatible = "fsl,ipic";
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ reg = <700 100>;
+ };
+ };
+
+ pci0: pci@e0008500 {
+ cell-index = <0>;
+ interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map = <
+
+ /* IDSEL 0x11 */
+ 8800 0 0 1 &ipic 14 8
+ 8800 0 0 2 &ipic 15 8
+ 8800 0 0 3 &ipic 16 8
+ 8800 0 0 4 &ipic 17 8
+
+ /* IDSEL 0x12 */
+ 9000 0 0 1 &ipic 16 8
+ 9000 0 0 2 &ipic 17 8
+ 9000 0 0 3 &ipic 14 8
+ 9000 0 0 4 &ipic 15 8
+
+ /* IDSEL 0x13 */
+ 9800 0 0 1 &ipic 17 8
+ 9800 0 0 2 &ipic 14 8
+ 9800 0 0 3 &ipic 15 8
+ 9800 0 0 4 &ipic 16 8
+
+ /* IDSEL 0x15 */
+ a800 0 0 1 &ipic 14 8
+ a800 0 0 2 &ipic 15 8
+ a800 0 0 3 &ipic 16 8
+ a800 0 0 4 &ipic 17 8
+
+ /* IDSEL 0x16 */
+ b000 0 0 1 &ipic 17 8
+ b000 0 0 2 &ipic 14 8
+ b000 0 0 3 &ipic 15 8
+ b000 0 0 4 &ipic 16 8
+
+ /* IDSEL 0x17 */
+ b800 0 0 1 &ipic 16 8
+ b800 0 0 2 &ipic 17 8
+ b800 0 0 3 &ipic 14 8
+ b800 0 0 4 &ipic 15 8
+
+ /* IDSEL 0x18 */
+ c000 0 0 1 &ipic 15 8
+ c000 0 0 2 &ipic 16 8
+ c000 0 0 3 &ipic 17 8
+ c000 0 0 4 &ipic 14 8>;
+ interrupt-parent = < &ipic >;
+ interrupts = <42 8>;
+ bus-range = <0 0>;
+ ranges = <02000000 0 90000000 90000000 0 10000000
+ 42000000 0 80000000 80000000 0 10000000
+ 01000000 0 00000000 e0300000 0 00100000>;
+ clock-frequency = <0>;
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <e0008500 100>;
+ compatible = "fsl,mpc8349-pci";
+ device_type = "pci";
+ };
+};
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
new file mode 100644
index 0000000..bd9545d
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -0,0 +1,263 @@
+/*
+ * MPC8378E MDS Device Tree Source
+ *
+ * Copyright 2007 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/ {
+ model = "fsl,mpc8378emds";
+ compatible = "fsl,mpc8378emds","fsl,mpc837xmds";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aliases {
+ ethernet0 = &enet0;
+ ethernet1 = &enet1;
+ serial0 = &serial0;
+ serial1 = &serial1;
+ pci0 = &pci0;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ PowerPC,8378@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <20>;
+ i-cache-line-size = <20>;
+ d-cache-size = <8000>; // L1, 32K
+ i-cache-size = <8000>; // L1, 32K
+ timebase-frequency = <0>;
+ bus-frequency = <0>;
+ clock-frequency = <0>;
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <00000000 20000000>; // 512MB at 0
+ };
+
+ soc@e0000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ device_type = "soc";
+ ranges = <0 e0000000 00100000>;
+ reg = <e0000000 00000200>;
+ bus-frequency = <0>;
+
+ wdt@200 {
+ compatible = "mpc83xx_wdt";
+ reg = <200 100>;
+ };
+
+ i2c@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cell-index = <0>;
+ compatible = "fsl-i2c";
+ reg = <3000 100>;
+ interrupts = <e 8>;
+ interrupt-parent = < &ipic >;
+ dfsrr;
+ };
+
+ i2c@3100 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cell-index = <1>;
+ compatible = "fsl-i2c";
+ reg = <3100 100>;
+ interrupts = <f 8>;
+ interrupt-parent = < &ipic >;
+ dfsrr;
+ };
+
+ spi@7000 {
+ compatible = "fsl_spi";
+ reg = <7000 1000>;
+ interrupts = <10 8>;
+ interrupt-parent = < &ipic >;
+ mode = "cpu";
+ };
+
+ /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+ usb@23000 {
+ compatible = "fsl-usb2-dr";
+ reg = <23000 1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupt-parent = < &ipic >;
+ interrupts = <26 8>;
+ phy_type = "utmi_wide";
+ };
+
+ mdio@24520 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,gianfar-mdio";
+ reg = <24520 20>;
+ phy2: ethernet-phy@2 {
+ interrupt-parent = < &ipic >;
+ interrupts = <11 8>;
+ reg = <2>;
+ device_type = "ethernet-phy";
+ };
+ phy3: ethernet-phy@3 {
+ interrupt-parent = < &ipic >;
+ interrupts = <12 8>;
+ reg = <3>;
+ device_type = "ethernet-phy";
+ };
+ };
+
+ enet0: ethernet@24000 {
+ cell-index = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <24000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <20 8 21 8 22 8>;
+ phy-connection-type = "mii";
+ interrupt-parent = < &ipic >;
+ phy-handle = < &phy2 >;
+ };
+
+ enet1: ethernet@25000 {
+ cell-index = <1>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <25000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <23 8 24 8 25 8>;
+ phy-connection-type = "mii";
+ interrupt-parent = < &ipic >;
+ phy-handle = < &phy3 >;
+ };
+
+ serial0: serial@4500 {
+ cell-index = <0>;
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4500 100>;
+ clock-frequency = <0>;
+ interrupts = <9 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ serial1: serial@4600 {
+ cell-index = <1>;
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4600 100>;
+ clock-frequency = <0>;
+ interrupts = <a 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ crypto@30000 {
+ model = "SEC3";
+ compatible = "talitos";
+ reg = <30000 10000>;
+ interrupts = <b 8>;
+ interrupt-parent = < &ipic >;
+ /* Rev. 3.0 geometry */
+ num-channels = <4>;
+ channel-fifo-len = <18>;
+ exec-units-mask = <000001fe>;
+ descriptor-types-mask = <03ab0ebf>;
+ };
+
+ sdhc@2e000 {
+ model = "eSDHC";
+ compatible = "fsl,esdhc";
+ reg = <2e000 1000>;
+ interrupts = <2a 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ /* IPIC
+ * interrupts cell = <intr #, sense>
+ * sense values match linux IORESOURCE_IRQ_* defines:
+ * sense == 8: Level, low assertion
+ * sense == 2: Edge, high-to-low change
+ */
+ ipic: pic@700 {
+ compatible = "fsl,ipic";
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ reg = <700 100>;
+ };
+ };
+
+ pci0: pci@e0008500 {
+ cell-index = <0>;
+ interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map = <
+
+ /* IDSEL 0x11 */
+ 8800 0 0 1 &ipic 14 8
+ 8800 0 0 2 &ipic 15 8
+ 8800 0 0 3 &ipic 16 8
+ 8800 0 0 4 &ipic 17 8
+
+ /* IDSEL 0x12 */
+ 9000 0 0 1 &ipic 16 8
+ 9000 0 0 2 &ipic 17 8
+ 9000 0 0 3 &ipic 14 8
+ 9000 0 0 4 &ipic 15 8
+
+ /* IDSEL 0x13 */
+ 9800 0 0 1 &ipic 17 8
+ 9800 0 0 2 &ipic 14 8
+ 9800 0 0 3 &ipic 15 8
+ 9800 0 0 4 &ipic 16 8
+
+ /* IDSEL 0x15 */
+ a800 0 0 1 &ipic 14 8
+ a800 0 0 2 &ipic 15 8
+ a800 0 0 3 &ipic 16 8
+ a800 0 0 4 &ipic 17 8
+
+ /* IDSEL 0x16 */
+ b000 0 0 1 &ipic 17 8
+ b000 0 0 2 &ipic 14 8
+ b000 0 0 3 &ipic 15 8
+ b000 0 0 4 &ipic 16 8
+
+ /* IDSEL 0x17 */
+ b800 0 0 1 &ipic 16 8
+ b800 0 0 2 &ipic 17 8
+ b800 0 0 3 &ipic 14 8
+ b800 0 0 4 &ipic 15 8
+
+ /* IDSEL 0x18 */
+ c000 0 0 1 &ipic 15 8
+ c000 0 0 2 &ipic 16 8
+ c000 0 0 3 &ipic 17 8
+ c000 0 0 4 &ipic 14 8>;
+ interrupt-parent = < &ipic >;
+ interrupts = <42 8>;
+ bus-range = <0 0>;
+ ranges = <02000000 0 90000000 90000000 0 10000000
+ 42000000 0 80000000 80000000 0 10000000
+ 01000000 0 00000000 e0300000 0 00100000>;
+ clock-frequency = <0>;
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <e0008500 100>;
+ compatible = "fsl,mpc8349-pci";
+ device_type = "pci";
+ };
+};
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
new file mode 100644
index 0000000..4d651a3
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -0,0 +1,291 @@
+/*
+ * MPC8379E MDS Device Tree Source
+ *
+ * Copyright 2007 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/ {
+ model = "fsl,mpc8379emds";
+ compatible = "fsl,mpc8379emds","fsl,mpc837xmds";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aliases {
+ ethernet0 = &enet0;
+ ethernet1 = &enet1;
+ serial0 = &serial0;
+ serial1 = &serial1;
+ pci0 = &pci0;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ PowerPC,8379@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <20>;
+ i-cache-line-size = <20>;
+ d-cache-size = <8000>; // L1, 32K
+ i-cache-size = <8000>; // L1, 32K
+ timebase-frequency = <0>;
+ bus-frequency = <0>;
+ clock-frequency = <0>;
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <00000000 20000000>; // 512MB at 0
+ };
+
+ soc@e0000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ device_type = "soc";
+ ranges = <0 e0000000 00100000>;
+ reg = <e0000000 00000200>;
+ bus-frequency = <0>;
+
+ wdt@200 {
+ compatible = "mpc83xx_wdt";
+ reg = <200 100>;
+ };
+
+ i2c@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cell-index = <0>;
+ compatible = "fsl-i2c";
+ reg = <3000 100>;
+ interrupts = <e 8>;
+ interrupt-parent = < &ipic >;
+ dfsrr;
+ };
+
+ i2c@3100 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cell-index = <1>;
+ compatible = "fsl-i2c";
+ reg = <3100 100>;
+ interrupts = <f 8>;
+ interrupt-parent = < &ipic >;
+ dfsrr;
+ };
+
+ spi@7000 {
+ compatible = "fsl_spi";
+ reg = <7000 1000>;
+ interrupts = <10 8>;
+ interrupt-parent = < &ipic >;
+ mode = "cpu";
+ };
+
+ /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+ usb@23000 {
+ compatible = "fsl-usb2-dr";
+ reg = <23000 1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupt-parent = < &ipic >;
+ interrupts = <26 8>;
+ phy_type = "utmi_wide";
+ };
+
+ mdio@24520 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,gianfar-mdio";
+ reg = <24520 20>;
+ phy2: ethernet-phy@2 {
+ interrupt-parent = < &ipic >;
+ interrupts = <11 8>;
+ reg = <2>;
+ device_type = "ethernet-phy";
+ };
+ phy3: ethernet-phy@3 {
+ interrupt-parent = < &ipic >;
+ interrupts = <12 8>;
+ reg = <3>;
+ device_type = "ethernet-phy";
+ };
+ };
+
+ enet0: ethernet@24000 {
+ cell-index = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <24000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <20 8 21 8 22 8>;
+ phy-connection-type = "mii";
+ interrupt-parent = < &ipic >;
+ phy-handle = < &phy2 >;
+ };
+
+ enet1: ethernet@25000 {
+ cell-index = <1>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <25000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <23 8 24 8 25 8>;
+ phy-connection-type = "mii";
+ interrupt-parent = < &ipic >;
+ phy-handle = < &phy3 >;
+ };
+
+ serial0: serial@4500 {
+ cell-index = <0>;
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4500 100>;
+ clock-frequency = <0>;
+ interrupts = <9 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ serial1: serial@4600 {
+ cell-index = <1>;
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4600 100>;
+ clock-frequency = <0>;
+ interrupts = <a 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ crypto@30000 {
+ model = "SEC3";
+ compatible = "talitos";
+ reg = <30000 10000>;
+ interrupts = <b 8>;
+ interrupt-parent = < &ipic >;
+ /* Rev. 3.0 geometry */
+ num-channels = <4>;
+ channel-fifo-len = <18>;
+ exec-units-mask = <000001fe>;
+ descriptor-types-mask = <03ab0ebf>;
+ };
+
+ sdhc@2e000 {
+ model = "eSDHC";
+ compatible = "fsl,esdhc";
+ reg = <2e000 1000>;
+ interrupts = <2a 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ sata@18000 {
+ compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
+ reg = <18000 1000>;
+ interrupts = <2c 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ sata@19000 {
+ compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
+ reg = <19000 1000>;
+ interrupts = <2d 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ sata@1a000 {
+ compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
+ reg = <1a000 1000>;
+ interrupts = <2e 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ sata@1b000 {
+ compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
+ reg = <1b000 1000>;
+ interrupts = <2f 8>;
+ interrupt-parent = < &ipic >;
+ };
+
+ /* IPIC
+ * interrupts cell = <intr #, sense>
+ * sense values match linux IORESOURCE_IRQ_* defines:
+ * sense == 8: Level, low assertion
+ * sense == 2: Edge, high-to-low change
+ */
+ ipic: pic@700 {
+ compatible = "fsl,ipic";
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ reg = <700 100>;
+ };
+ };
+
+ pci0: pci@e0008500 {
+ cell-index = <0>;
+ interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map = <
+
+ /* IDSEL 0x11 */
+ 8800 0 0 1 &ipic 14 8
+ 8800 0 0 2 &ipic 15 8
+ 8800 0 0 3 &ipic 16 8
+ 8800 0 0 4 &ipic 17 8
+
+ /* IDSEL 0x12 */
+ 9000 0 0 1 &ipic 16 8
+ 9000 0 0 2 &ipic 17 8
+ 9000 0 0 3 &ipic 14 8
+ 9000 0 0 4 &ipic 15 8
+
+ /* IDSEL 0x13 */
+ 9800 0 0 1 &ipic 17 8
+ 9800 0 0 2 &ipic 14 8
+ 9800 0 0 3 &ipic 15 8
+ 9800 0 0 4 &ipic 16 8
+
+ /* IDSEL 0x15 */
+ a800 0 0 1 &ipic 14 8
+ a800 0 0 2 &ipic 15 8
+ a800 0 0 3 &ipic 16 8
+ a800 0 0 4 &ipic 17 8
+
+ /* IDSEL 0x16 */
+ b000 0 0 1 &ipic 17 8
+ b000 0 0 2 &ipic 14 8
+ b000 0 0 3 &ipic 15 8
+ b000 0 0 4 &ipic 16 8
+
+ /* IDSEL 0x17 */
+ b800 0 0 1 &ipic 16 8
+ b800 0 0 2 &ipic 17 8
+ b800 0 0 3 &ipic 14 8
+ b800 0 0 4 &ipic 15 8
+
+ /* IDSEL 0x18 */
+ c000 0 0 1 &ipic 15 8
+ c000 0 0 2 &ipic 16 8
+ c000 0 0 3 &ipic 17 8
+ c000 0 0 4 &ipic 14 8>;
+ interrupt-parent = < &ipic >;
+ interrupts = <42 8>;
+ bus-range = <0 0>;
+ ranges = <02000000 0 90000000 90000000 0 10000000
+ 42000000 0 80000000 80000000 0 10000000
+ 01000000 0 00000000 e0300000 0 00100000>;
+ clock-frequency = <0>;
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <e0008500 100>;
+ compatible = "fsl,mpc8349-pci";
+ device_type = "pci";
+ };
+};
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] add MPC837x USB platform support
2008-01-07 12:03 [PATCH 1/3] add default device trees for MPC837x MDS board Li Yang
@ 2008-01-07 12:03 ` Li Yang
2008-01-07 12:03 ` [PATCH 3/3] USB device tree cleanups Li Yang
2008-01-07 23:05 ` [PATCH 2/3] add MPC837x USB platform support Stephen Rothwell
2008-01-08 7:36 ` [PATCH 1/3] add default device trees for MPC837x MDS board Kumar Gala
` (2 subsequent siblings)
3 siblings, 2 replies; 16+ messages in thread
From: Li Yang @ 2008-01-07 12:03 UTC (permalink / raw)
To: galak, linuxppc-dev; +Cc: Li Yang, paulus
Add chip specific and board specific initialization for MPC837x USB.
Signed-off-by: Li Yang <leoli@freescale.com>
---
arch/powerpc/platforms/83xx/mpc837x_mds.c | 48 +++++++++++++++++++++++++++++
arch/powerpc/platforms/83xx/mpc83xx.h | 3 ++
arch/powerpc/platforms/83xx/usb.c | 39 +++++++++++++++++++++++
3 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index 166c111..de60872 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -27,6 +27,53 @@ unsigned long isa_io_base = 0;
unsigned long isa_mem_base = 0;
#endif
+#define BCSR12_USB_SER_MASK 0x8a
+#define BCSR12_USB_SER_PIN 0x80
+#define BCSR12_USB_SER_DEVICE 0x02
+extern int mpc837x_usb_cfg(void);
+
+static int mpc837xmds_usb_cfg(void)
+{
+ struct device_node *np;
+ const void *phy_type, *mode;
+ void __iomem *bcsr_regs = NULL;
+ u8 bcsr12;
+ int ret;
+
+ ret = mpc837x_usb_cfg();
+ if (ret)
+ return ret;
+ /* Map BCSR area */
+ np = of_find_node_by_name(NULL, "bcsr");
+ if (np) {
+ struct resource res;
+
+ of_address_to_resource(np, 0, &res);
+ bcsr_regs = ioremap(res.start, res.end - res.start + 1);
+ of_node_put(np);
+ }
+ if (!bcsr_regs)
+ return -1;
+
+ np = of_find_node_by_name(NULL, "usb");
+ phy_type = of_get_property(np, "phy_type", NULL);
+ if (phy_type && !strcmp(phy_type, "ulpi")) {
+ clrbits8(bcsr_regs + 12, BCSR12_USB_SER_PIN);
+ } else if (phy_type && !strcmp(phy_type, "serial")) {
+ mode = of_get_property(np, "dr_mode", NULL);
+ bcsr12 = in_8(bcsr_regs + 12) & ~BCSR12_USB_SER_MASK;
+ bcsr12 |= BCSR12_USB_SER_PIN;
+ if (mode && !strcmp(mode, "peripheral"))
+ bcsr12 |= BCSR12_USB_SER_DEVICE;
+ out_8(bcsr_regs + 12, bcsr12);
+ } else {
+ printk(KERN_ERR "USB DR: unsupported PHY\n");
+ }
+
+ iounmap(bcsr_regs);
+ return 0;
+}
+
/* ************************************************************************
*
* Setup the architecture
@@ -45,6 +92,7 @@ static void __init mpc837x_mds_setup_arch(void)
for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
mpc83xx_add_bridge(np);
#endif
+ mpc837xmds_usb_cfg();
}
static struct of_device_id mpc837x_ids[] = {
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index b778cb4..88bb748 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -14,6 +14,7 @@
#define MPC83XX_SCCR_USB_DRCM_11 0x00300000
#define MPC83XX_SCCR_USB_DRCM_01 0x00100000
#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
+#define MPC837X_SCCR_USB_DRCM_11 0x00c00000
/* system i/o configuration register low */
#define MPC83XX_SICRL_OFFS 0x114
@@ -22,6 +23,8 @@
#define MPC834X_SICRL_USB1 0x20000000
#define MPC831X_SICRL_USB_MASK 0x00000c00
#define MPC831X_SICRL_USB_ULPI 0x00000800
+#define MPC837X_SICRL_USB_MASK 0xf0000000
+#define MPC837X_SICRL_USB_ULPI 0x50000000
/* system i/o configuration register high */
#define MPC83XX_SICRH_OFFS 0x118
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index b45160f..2985c9c 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -179,3 +179,42 @@ int mpc831x_usb_cfg(void)
return ret;
}
#endif /* CONFIG_PPC_MPC831x */
+
+#ifdef CONFIG_PPC_MPC837x
+int mpc837x_usb_cfg(void)
+{
+ void __iomem *immap;
+ struct device_node *np = NULL;
+ const void *prop;
+ int ret = 0;
+
+ np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
+ if (!np)
+ return -ENODEV;
+ prop = of_get_property(np, "phy_type", NULL);
+
+ if (strcmp(prop, "ulpi") && strcmp(prop, "serial")) {
+ printk(KERN_WARNING "837x USB PHY type not supported\n");
+ return -EINVAL;
+ }
+
+ /* Map IMMR space for pin and clock settings */
+ immap = ioremap(get_immrbase(), 0x1000);
+ if (!immap) {
+ of_node_put(np);
+ return -ENOMEM;
+ }
+
+ /* Configure clock */
+ clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, MPC837X_SCCR_USB_DRCM_11,
+ MPC837X_SCCR_USB_DRCM_11);
+
+ /* Configure pin mux for ULPI/serial */
+ clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USB_MASK,
+ MPC837X_SICRL_USB_ULPI);
+
+ iounmap(immap);
+ of_node_put(np);
+ return ret;
+}
+#endif /* CONFIG_PPC_MPC837x */
--
1.5.3.5.643.g40e25
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] USB device tree cleanups
2008-01-07 12:03 ` [PATCH 2/3] add MPC837x USB platform support Li Yang
@ 2008-01-07 12:03 ` Li Yang
2008-01-07 23:10 ` Stephen Rothwell
2008-01-07 23:05 ` [PATCH 2/3] add MPC837x USB platform support Stephen Rothwell
1 sibling, 1 reply; 16+ messages in thread
From: Li Yang @ 2008-01-07 12:03 UTC (permalink / raw)
To: galak, linuxppc-dev; +Cc: Li Yang, paulus
Remove device_type = "usb"
Signed-off-by: Li Yang <leoli@freescale.com>
---
Documentation/powerpc/booting-without-of.txt | 4 ----
arch/powerpc/boot/dts/mpc8313erdb.dts | 1 -
arch/powerpc/boot/dts/mpc832x_mds.dts | 1 -
arch/powerpc/boot/dts/mpc8349emitx.dts | 2 --
arch/powerpc/boot/dts/mpc8349emitxgp.dts | 1 -
arch/powerpc/boot/dts/mpc834x_mds.dts | 2 --
arch/powerpc/boot/dts/mpc836x_mds.dts | 1 -
arch/powerpc/platforms/83xx/usb.c | 8 ++++----
arch/powerpc/sysdev/fsl_soc.c | 8 ++------
9 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index e9a3cb1..65e8baa 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1408,7 +1408,6 @@ platforms are moved over to use the flattened-device-tree model.
Example multi port host USB controller device node :
usb@22000 {
- device_type = "usb";
compatible = "fsl-usb2-mph";
reg = <22000 1000>;
#address-cells = <1>;
@@ -1422,7 +1421,6 @@ platforms are moved over to use the flattened-device-tree model.
Example dual role USB controller device node :
usb@23000 {
- device_type = "usb";
compatible = "fsl-usb2-dr";
reg = <23000 1000>;
#address-cells = <1>;
@@ -1586,7 +1584,6 @@ platforms are moved over to use the flattened-device-tree model.
iii) USB (Universal Serial Bus Controller)
Required properties:
- - device_type : should be "usb".
- compatible : could be "qe_udc" or "fhci-hcd".
- mode : the could be "host" or "slave".
- reg : Offset and length of the register set for the device
@@ -1600,7 +1597,6 @@ platforms are moved over to use the flattened-device-tree model.
Example(slave):
usb@6c0 {
- device_type = "usb";
compatible = "qe_udc";
reg = <6c0 40>;
interrupts = <8b 0>;
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 9e7eba9..b48b9e2 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -80,7 +80,6 @@
/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
usb@23000 {
- device_type = "usb";
compatible = "fsl-usb2-dr";
reg = <23000 1000>;
#address-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index c64f303..0d40adb 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -200,7 +200,6 @@
};
usb@6c0 {
- device_type = "usb";
compatible = "qe_udc";
reg = <6c0 40 8B00 100>;
interrupts = <b>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5072f6d..9d411f8 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -78,7 +78,6 @@
};
usb@22000 {
- device_type = "usb";
compatible = "fsl-usb2-mph";
reg = <22000 1000>;
#address-cells = <1>;
@@ -90,7 +89,6 @@
};
usb@23000 {
- device_type = "usb";
compatible = "fsl-usb2-dr";
reg = <23000 1000>;
#address-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index 074f7a2..17c4858 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -78,7 +78,6 @@
};
usb@23000 {
- device_type = "usb";
compatible = "fsl-usb2-dr";
reg = <23000 1000>;
#address-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 49363f8..fe2928b 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -95,7 +95,6 @@
/* phy type (ULPI or SERIAL) are only types supportted for MPH */
/* port = 0 or 1 */
usb@22000 {
- device_type = "usb";
compatible = "fsl-usb2-mph";
reg = <22000 1000>;
#address-cells = <1>;
@@ -107,7 +106,6 @@
};
/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
usb@23000 {
- device_type = "usb";
compatible = "fsl-usb2-dr";
reg = <23000 1000>;
#address-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 0b2d2b5..6fa418a 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -231,7 +231,6 @@
};
usb@6c0 {
- device_type = "usb";
compatible = "qe_udc";
reg = <6c0 40 8B00 100>;
interrupts = <b>;
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 2985c9c..2f0a051 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -41,7 +41,7 @@ int mpc834x_usb_cfg(void)
sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
- np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
+ np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
if (np) {
sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
@@ -67,7 +67,7 @@ int mpc834x_usb_cfg(void)
port0_is_dr = 1;
of_node_put(np);
}
- np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
+ np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
if (np) {
sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
@@ -111,7 +111,7 @@ int mpc831x_usb_cfg(void)
const void *dr_mode;
#endif
- np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
+ np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
if (!np)
return -ENODEV;
prop = of_get_property(np, "phy_type", NULL);
@@ -188,7 +188,7 @@ int mpc837x_usb_cfg(void)
const void *prop;
int ret = 0;
- np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
+ np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
if (!np)
return -ENODEV;
prop = of_get_property(np, "phy_type", NULL);
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3ace747..f5f1bef 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -533,9 +533,7 @@ static int __init fsl_usb_of_init(void)
*usb_dev_dr_client = NULL;
int ret;
- for (np = NULL, i = 0;
- (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
- i++) {
+ for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
struct resource r[2];
struct fsl_usb2_platform_data usb_data;
const unsigned char *prop = NULL;
@@ -580,9 +578,7 @@ static int __init fsl_usb_of_init(void)
goto unreg_mph;
}
- for (np = NULL;
- (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
- i++) {
+ for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
struct resource r[2];
struct fsl_usb2_platform_data usb_data;
const unsigned char *prop = NULL;
--
1.5.3.5.643.g40e25
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] add MPC837x USB platform support
2008-01-07 12:03 ` [PATCH 2/3] add MPC837x USB platform support Li Yang
2008-01-07 12:03 ` [PATCH 3/3] USB device tree cleanups Li Yang
@ 2008-01-07 23:05 ` Stephen Rothwell
1 sibling, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2008-01-07 23:05 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
Hi,
Just a couple of comments.
On Mon, 7 Jan 2008 20:03:19 +0800 Li Yang <leoli@freescale.com> wrote:
>
> +static int mpc837xmds_usb_cfg(void)
> +{
>
> + np = of_find_node_by_name(NULL, "usb");
> + phy_type = of_get_property(np, "phy_type", NULL);
No check for np being NULL
> + if (phy_type && !strcmp(phy_type, "ulpi")) {
> + clrbits8(bcsr_regs + 12, BCSR12_USB_SER_PIN);
> + } else if (phy_type && !strcmp(phy_type, "serial")) {
> + mode = of_get_property(np, "dr_mode", NULL);
> + bcsr12 = in_8(bcsr_regs + 12) & ~BCSR12_USB_SER_MASK;
> + bcsr12 |= BCSR12_USB_SER_PIN;
> + if (mode && !strcmp(mode, "peripheral"))
> + bcsr12 |= BCSR12_USB_SER_DEVICE;
> + out_8(bcsr_regs + 12, bcsr12);
> + } else {
> + printk(KERN_ERR "USB DR: unsupported PHY\n");
> + }
> +
> + iounmap(bcsr_regs);
> + return 0;
No of_node_put(np)
> +#ifdef CONFIG_PPC_MPC837x
> +int mpc837x_usb_cfg(void)
> +{
>
> + np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
> + if (!np)
> + return -ENODEV;
> + prop = of_get_property(np, "phy_type", NULL);
> +
> + if (strcmp(prop, "ulpi") && strcmp(prop, "serial")) {
No check for prop being NULL.
> + printk(KERN_WARNING "837x USB PHY type not supported\n");
> + return -EINVAL;
No of_node_put(np)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] USB device tree cleanups
2008-01-07 12:03 ` [PATCH 3/3] USB device tree cleanups Li Yang
@ 2008-01-07 23:10 ` Stephen Rothwell
2008-01-08 3:32 ` Li Yang
0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2008-01-07 23:10 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]
On Mon, 7 Jan 2008 20:03:20 +0800 Li Yang <leoli@freescale.com> wrote:
>
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -533,9 +533,7 @@ static int __init fsl_usb_of_init(void)
> *usb_dev_dr_client = NULL;
> int ret;
>
> - for (np = NULL, i = 0;
> - (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
> - i++) {
> + for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
'i' is no longer being updated (or indeed set to anything) but is still
used in the loop - at least in Paulus' current tree).
> struct resource r[2];
> struct fsl_usb2_platform_data usb_data;
> const unsigned char *prop = NULL;
> @@ -580,9 +578,7 @@ static int __init fsl_usb_of_init(void)
> goto unreg_mph;
> }
>
> - for (np = NULL;
> - (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
> - i++) {
> + for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
Same here.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 3/3] USB device tree cleanups
2008-01-07 23:10 ` Stephen Rothwell
@ 2008-01-08 3:32 ` Li Yang
0 siblings, 0 replies; 16+ messages in thread
From: Li Yang @ 2008-01-08 3:32 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
> -----Original Message-----
> From: linuxppc-dev-bounces+leoli=3Dfreescale.com@ozlabs.org=20
> [mailto:linuxppc-dev-bounces+leoli=3Dfreescale.com@ozlabs.org]=20
> On Behalf Of Stephen Rothwell
> Sent: Tuesday, January 08, 2008 7:10 AM
> To: Li Yang
> Cc: linuxppc-dev@ozlabs.org; paulus@samba.org
> Subject: Re: [PATCH 3/3] USB device tree cleanups
>=20
> On Mon, 7 Jan 2008 20:03:20 +0800 Li Yang=20
> <leoli@freescale.com> wrote:
> >
> > +++ b/arch/powerpc/sysdev/fsl_soc.c
> > @@ -533,9 +533,7 @@ static int __init fsl_usb_of_init(void)
> > *usb_dev_dr_client =3D NULL;
> > int ret;
> > =20
> > - for (np =3D NULL, i =3D 0;
> > - (np =3D of_find_compatible_node(np, "usb",=20
> "fsl-usb2-mph")) !=3D NULL;
> > - i++) {
> > + for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
>=20
> 'i' is no longer being updated (or indeed set to anything)=20
> but is still used in the loop - at least in Paulus' current tree).
Good catch. My careless mistake. Thanks.
- Leo
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-07 12:03 [PATCH 1/3] add default device trees for MPC837x MDS board Li Yang
2008-01-07 12:03 ` [PATCH 2/3] add MPC837x USB platform support Li Yang
@ 2008-01-08 7:36 ` Kumar Gala
2008-01-08 7:57 ` Li Yang
2008-01-08 15:58 ` Grant Likely
2008-01-18 6:31 ` Kumar Gala
3 siblings, 1 reply; 16+ messages in thread
From: Kumar Gala @ 2008-01-08 7:36 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
On Jan 7, 2008, at 6:03 AM, Li Yang wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> address comments and use new dts spec.
>
> arch/powerpc/boot/dts/mpc8377_mds.dts | 277 ++++++++++++++++++++++++
> +++++++
> arch/powerpc/boot/dts/mpc8378_mds.dts | 263 ++++++++++++++++++++++++
> +++++
> arch/powerpc/boot/dts/mpc8379_mds.dts | 291 ++++++++++++++++++++++++
> +++++++++
> 3 files changed, 831 insertions(+), 0 deletions(-)
Could I convince you to convert these to dts-v1 format?
- k
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-08 7:36 ` [PATCH 1/3] add default device trees for MPC837x MDS board Kumar Gala
@ 2008-01-08 7:57 ` Li Yang
2008-01-08 15:18 ` Kumar Gala
0 siblings, 1 reply; 16+ messages in thread
From: Li Yang @ 2008-01-08 7:57 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> Sent: Tuesday, January 08, 2008 3:37 PM
> To: Li Yang
> Cc: linuxppc-dev@ozlabs.org; paulus@samba.org
> Subject: Re: [PATCH 1/3] add default device trees for MPC837x=20
> MDS board
>=20
>=20
> On Jan 7, 2008, at 6:03 AM, Li Yang wrote:
>=20
> > Signed-off-by: Li Yang <leoli@freescale.com>
> > ---
> > address comments and use new dts spec.
> >
> > arch/powerpc/boot/dts/mpc8377_mds.dts | 277=20
> ++++++++++++++++++++++++
> > +++++++
> > arch/powerpc/boot/dts/mpc8378_mds.dts | 263=20
> ++++++++++++++++++++++++
> > +++++
> > arch/powerpc/boot/dts/mpc8379_mds.dts | 291=20
> ++++++++++++++++++++++++
> > +++++++++
> > 3 files changed, 831 insertions(+), 0 deletions(-)
>=20
> Could I convince you to convert these to dts-v1 format?
Ok, I can do it. The DTS spec changes too much lately. :(
- Leo
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-08 7:57 ` Li Yang
@ 2008-01-08 15:18 ` Kumar Gala
0 siblings, 0 replies; 16+ messages in thread
From: Kumar Gala @ 2008-01-08 15:18 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
>>>
>>
>> Could I convince you to convert these to dts-v1 format?
>
> Ok, I can do it. The DTS spec changes too much lately. :(
Thanks. I'll merge the two patches into one when I commit. Its open
source development ;)
- k
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-07 12:03 [PATCH 1/3] add default device trees for MPC837x MDS board Li Yang
2008-01-07 12:03 ` [PATCH 2/3] add MPC837x USB platform support Li Yang
2008-01-08 7:36 ` [PATCH 1/3] add default device trees for MPC837x MDS board Kumar Gala
@ 2008-01-08 15:58 ` Grant Likely
2008-01-08 17:38 ` Scott Wood
2008-01-09 23:42 ` David Gibson
2008-01-18 6:31 ` Kumar Gala
3 siblings, 2 replies; 16+ messages in thread
From: Grant Likely @ 2008-01-08 15:58 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
Hi Leo,
comments below. I've made my comments on the first file, but they
apply to the other two also.
Cheers,
g.
On 1/7/08, Li Yang <leoli@freescale.com> wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> address comments and use new dts spec.
>
> arch/powerpc/boot/dts/mpc8377_mds.dts | 277 +++++++++++++++++++++++++++++++
> arch/powerpc/boot/dts/mpc8378_mds.dts | 263 +++++++++++++++++++++++++++++
> arch/powerpc/boot/dts/mpc8379_mds.dts | 291 +++++++++++++++++++++++++++++++++
> 3 files changed, 831 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
> new file mode 100644
> index 0000000..b50b5f9
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
> @@ -0,0 +1,277 @@
> +/*
> + * MPC8377E MDS Device Tree Source
> + *
> + * Copyright 2007 Freescale Semiconductor Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +/ {
> + model = "fsl,mpc8377emds";
> + compatible = "fsl,mpc8377emds","fsl,mpc837xmds";
Compatibility at the board level is a really hard thing to claim. I'd
drop the "fsl,mpc837xmds" here and make the platform code bind to
either.
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + aliases {
> + ethernet0 = &enet0;
> + ethernet1 = &enet1;
> + serial0 = &serial0;
> + serial1 = &serial1;
> + pci0 = &pci0;
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,8377@0 {
> + device_type = "cpu";
> + reg = <0>;
> + d-cache-line-size = <20>;
> + i-cache-line-size = <20>;
> + d-cache-size = <8000>; // L1, 32K
> + i-cache-size = <8000>; // L1, 32K
> + timebase-frequency = <0>;
> + bus-frequency = <0>;
> + clock-frequency = <0>;
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <00000000 20000000>; // 512MB at 0
> + };
> +
> + soc@e0000000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + device_type = "soc";
I recommend dropping device_type and adding 'compatible = "fsl,mpc8377-immr";'
> + ranges = <0 e0000000 00100000>;
> + reg = <e0000000 00000200>;
> + bus-frequency = <0>;
> +
> + wdt@200 {
> + compatible = "mpc83xx_wdt";
"fsl,mpc8377_wdt", "fsl,mpc83xx_wdt" as per generic names recommended practice.
> + reg = <200 100>;
> + };
> +
> + i2c@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + cell-index = <0>;
> + compatible = "fsl-i2c";
> + reg = <3000 100>;
> + interrupts = <e 8>;
> + interrupt-parent = < &ipic >;
> + dfsrr;
> + };
> +
> + i2c@3100 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + cell-index = <1>;
> + compatible = "fsl-i2c";
> + reg = <3100 100>;
> + interrupts = <f 8>;
> + interrupt-parent = < &ipic >;
> + dfsrr;
> + };
> +
> + spi@7000 {
> + compatible = "fsl_spi";
> + reg = <7000 1000>;
> + interrupts = <10 8>;
> + interrupt-parent = < &ipic >;
> + mode = "cpu";
> + };
> +
> + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
> + usb@23000 {
> + compatible = "fsl-usb2-dr";
> + reg = <23000 1000>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupt-parent = < &ipic >;
> + interrupts = <26 8>;
> + phy_type = "utmi_wide";
fsl,phy_type please.
> + };
> +
> + mdio@24520 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,gianfar-mdio";
> + reg = <24520 20>;
> + phy2: ethernet-phy@2 {
> + interrupt-parent = < &ipic >;
> + interrupts = <11 8>;
> + reg = <2>;
> + device_type = "ethernet-phy";
> + };
> + phy3: ethernet-phy@3 {
> + interrupt-parent = < &ipic >;
> + interrupts = <12 8>;
> + reg = <3>;
> + device_type = "ethernet-phy";
> + };
> + };
> +
> + enet0: ethernet@24000 {
> + cell-index = <0>;
> + device_type = "network";
> + model = "eTSEC";
Drop model property
> + compatible = "gianfar";
> + reg = <24000 1000>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <20 8 21 8 22 8>;
> + phy-connection-type = "mii";
> + interrupt-parent = < &ipic >;
> + phy-handle = < &phy2 >;
> + };
> +
> + enet1: ethernet@25000 {
> + cell-index = <1>;
> + device_type = "network";
> + model = "eTSEC";
Drop model property.
> + compatible = "gianfar";
> + reg = <25000 1000>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <23 8 24 8 25 8>;
> + phy-connection-type = "mii";
> + interrupt-parent = < &ipic >;
> + phy-handle = < &phy3 >;
> + };
> +
> + serial0: serial@4500 {
> + cell-index = <0>;
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <4500 100>;
> + clock-frequency = <0>;
> + interrupts = <9 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + serial1: serial@4600 {
> + cell-index = <1>;
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <4600 100>;
> + clock-frequency = <0>;
> + interrupts = <a 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + crypto@30000 {
> + model = "SEC3";
Drop model property and encode relevant info into compatible.
> + compatible = "talitos";
> + reg = <30000 10000>;
> + interrupts = <b 8>;
> + interrupt-parent = < &ipic >;
> + /* Rev. 3.0 geometry */
> + num-channels = <4>;
> + channel-fifo-len = <18>;
> + exec-units-mask = <000001fe>;
> + descriptor-types-mask = <03ab0ebf>;
> + };
> +
> + sdhc@2e000 {
> + model = "eSDHC";
> + compatible = "fsl,esdhc";
Drop the model property and change compatible to "fsl,mpc8377-esdhc".
> + reg = <2e000 1000>;
> + interrupts = <2a 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + sata@18000 {
> + compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
> + reg = <18000 1000>;
> + interrupts = <2c 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + sata@19000 {
> + compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
> + reg = <19000 1000>;
> + interrupts = <2d 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + /* IPIC
> + * interrupts cell = <intr #, sense>
> + * sense values match linux IORESOURCE_IRQ_* defines:
> + * sense == 8: Level, low assertion
> + * sense == 2: Edge, high-to-low change
> + */
> + ipic: pic@700 {
> + compatible = "fsl,ipic";
> + interrupt-controller;
> + #address-cells = <0>;
> + #interrupt-cells = <2>;
> + reg = <700 100>;
> + };
> + };
> +
> + pci0: pci@e0008500 {
> + cell-index = <0>;
> + interrupt-map-mask = <f800 0 0 7>;
> + interrupt-map = <
> +
> + /* IDSEL 0x11 */
> + 8800 0 0 1 &ipic 14 8
> + 8800 0 0 2 &ipic 15 8
> + 8800 0 0 3 &ipic 16 8
> + 8800 0 0 4 &ipic 17 8
> +
> + /* IDSEL 0x12 */
> + 9000 0 0 1 &ipic 16 8
> + 9000 0 0 2 &ipic 17 8
> + 9000 0 0 3 &ipic 14 8
> + 9000 0 0 4 &ipic 15 8
> +
> + /* IDSEL 0x13 */
> + 9800 0 0 1 &ipic 17 8
> + 9800 0 0 2 &ipic 14 8
> + 9800 0 0 3 &ipic 15 8
> + 9800 0 0 4 &ipic 16 8
> +
> + /* IDSEL 0x15 */
> + a800 0 0 1 &ipic 14 8
> + a800 0 0 2 &ipic 15 8
> + a800 0 0 3 &ipic 16 8
> + a800 0 0 4 &ipic 17 8
> +
> + /* IDSEL 0x16 */
> + b000 0 0 1 &ipic 17 8
> + b000 0 0 2 &ipic 14 8
> + b000 0 0 3 &ipic 15 8
> + b000 0 0 4 &ipic 16 8
> +
> + /* IDSEL 0x17 */
> + b800 0 0 1 &ipic 16 8
> + b800 0 0 2 &ipic 17 8
> + b800 0 0 3 &ipic 14 8
> + b800 0 0 4 &ipic 15 8
> +
> + /* IDSEL 0x18 */
> + c000 0 0 1 &ipic 15 8
> + c000 0 0 2 &ipic 16 8
> + c000 0 0 3 &ipic 17 8
> + c000 0 0 4 &ipic 14 8>;
> + interrupt-parent = < &ipic >;
> + interrupts = <42 8>;
> + bus-range = <0 0>;
> + ranges = <02000000 0 90000000 90000000 0 10000000
> + 42000000 0 80000000 80000000 0 10000000
> + 01000000 0 00000000 e0300000 0 00100000>;
> + clock-frequency = <0>;
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + reg = <e0008500 100>;
> + compatible = "fsl,mpc8349-pci";
> + device_type = "pci";
> + };
> +};
> diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
> new file mode 100644
> index 0000000..bd9545d
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
> @@ -0,0 +1,263 @@
> +/*
> + * MPC8378E MDS Device Tree Source
> + *
> + * Copyright 2007 Freescale Semiconductor Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +/ {
> + model = "fsl,mpc8378emds";
> + compatible = "fsl,mpc8378emds","fsl,mpc837xmds";
Again, board level compatibility is very difficult to claim.
fsl,mpc837xmds doesn't make much sense here. Just make the platform
code bind on all the variants.
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + aliases {
> + ethernet0 = &enet0;
> + ethernet1 = &enet1;
> + serial0 = &serial0;
> + serial1 = &serial1;
> + pci0 = &pci0;
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,8378@0 {
> + device_type = "cpu";
> + reg = <0>;
> + d-cache-line-size = <20>;
> + i-cache-line-size = <20>;
> + d-cache-size = <8000>; // L1, 32K
> + i-cache-size = <8000>; // L1, 32K
> + timebase-frequency = <0>;
> + bus-frequency = <0>;
> + clock-frequency = <0>;
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <00000000 20000000>; // 512MB at 0
> + };
> +
> + soc@e0000000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + device_type = "soc";
Drop device_type and add compatible
> + ranges = <0 e0000000 00100000>;
> + reg = <e0000000 00000200>;
> + bus-frequency = <0>;
> +
> + wdt@200 {
> + compatible = "mpc83xx_wdt";
> + reg = <200 100>;
> + };
> +
> + i2c@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + cell-index = <0>;
> + compatible = "fsl-i2c";
> + reg = <3000 100>;
> + interrupts = <e 8>;
> + interrupt-parent = < &ipic >;
> + dfsrr;
> + };
> +
> + i2c@3100 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + cell-index = <1>;
> + compatible = "fsl-i2c";
> + reg = <3100 100>;
> + interrupts = <f 8>;
> + interrupt-parent = < &ipic >;
> + dfsrr;
> + };
> +
> + spi@7000 {
> + compatible = "fsl_spi";
> + reg = <7000 1000>;
> + interrupts = <10 8>;
> + interrupt-parent = < &ipic >;
> + mode = "cpu";
> + };
> +
> + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
> + usb@23000 {
> + compatible = "fsl-usb2-dr";
> + reg = <23000 1000>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupt-parent = < &ipic >;
> + interrupts = <26 8>;
> + phy_type = "utmi_wide";
> + };
> +
> + mdio@24520 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,gianfar-mdio";
> + reg = <24520 20>;
> + phy2: ethernet-phy@2 {
> + interrupt-parent = < &ipic >;
> + interrupts = <11 8>;
> + reg = <2>;
> + device_type = "ethernet-phy";
> + };
> + phy3: ethernet-phy@3 {
> + interrupt-parent = < &ipic >;
> + interrupts = <12 8>;
> + reg = <3>;
> + device_type = "ethernet-phy";
> + };
> + };
> +
> + enet0: ethernet@24000 {
> + cell-index = <0>;
> + device_type = "network";
> + model = "eTSEC";
> + compatible = "gianfar";
> + reg = <24000 1000>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <20 8 21 8 22 8>;
> + phy-connection-type = "mii";
> + interrupt-parent = < &ipic >;
> + phy-handle = < &phy2 >;
> + };
> +
> + enet1: ethernet@25000 {
> + cell-index = <1>;
> + device_type = "network";
> + model = "eTSEC";
> + compatible = "gianfar";
> + reg = <25000 1000>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <23 8 24 8 25 8>;
> + phy-connection-type = "mii";
> + interrupt-parent = < &ipic >;
> + phy-handle = < &phy3 >;
> + };
> +
> + serial0: serial@4500 {
> + cell-index = <0>;
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <4500 100>;
> + clock-frequency = <0>;
> + interrupts = <9 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + serial1: serial@4600 {
> + cell-index = <1>;
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <4600 100>;
> + clock-frequency = <0>;
> + interrupts = <a 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + crypto@30000 {
> + model = "SEC3";
> + compatible = "talitos";
> + reg = <30000 10000>;
> + interrupts = <b 8>;
> + interrupt-parent = < &ipic >;
> + /* Rev. 3.0 geometry */
> + num-channels = <4>;
> + channel-fifo-len = <18>;
> + exec-units-mask = <000001fe>;
> + descriptor-types-mask = <03ab0ebf>;
> + };
> +
> + sdhc@2e000 {
> + model = "eSDHC";
> + compatible = "fsl,esdhc";
> + reg = <2e000 1000>;
> + interrupts = <2a 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + /* IPIC
> + * interrupts cell = <intr #, sense>
> + * sense values match linux IORESOURCE_IRQ_* defines:
> + * sense == 8: Level, low assertion
> + * sense == 2: Edge, high-to-low change
> + */
> + ipic: pic@700 {
> + compatible = "fsl,ipic";
> + interrupt-controller;
> + #address-cells = <0>;
> + #interrupt-cells = <2>;
> + reg = <700 100>;
> + };
> + };
> +
> + pci0: pci@e0008500 {
> + cell-index = <0>;
> + interrupt-map-mask = <f800 0 0 7>;
> + interrupt-map = <
> +
> + /* IDSEL 0x11 */
> + 8800 0 0 1 &ipic 14 8
> + 8800 0 0 2 &ipic 15 8
> + 8800 0 0 3 &ipic 16 8
> + 8800 0 0 4 &ipic 17 8
> +
> + /* IDSEL 0x12 */
> + 9000 0 0 1 &ipic 16 8
> + 9000 0 0 2 &ipic 17 8
> + 9000 0 0 3 &ipic 14 8
> + 9000 0 0 4 &ipic 15 8
> +
> + /* IDSEL 0x13 */
> + 9800 0 0 1 &ipic 17 8
> + 9800 0 0 2 &ipic 14 8
> + 9800 0 0 3 &ipic 15 8
> + 9800 0 0 4 &ipic 16 8
> +
> + /* IDSEL 0x15 */
> + a800 0 0 1 &ipic 14 8
> + a800 0 0 2 &ipic 15 8
> + a800 0 0 3 &ipic 16 8
> + a800 0 0 4 &ipic 17 8
> +
> + /* IDSEL 0x16 */
> + b000 0 0 1 &ipic 17 8
> + b000 0 0 2 &ipic 14 8
> + b000 0 0 3 &ipic 15 8
> + b000 0 0 4 &ipic 16 8
> +
> + /* IDSEL 0x17 */
> + b800 0 0 1 &ipic 16 8
> + b800 0 0 2 &ipic 17 8
> + b800 0 0 3 &ipic 14 8
> + b800 0 0 4 &ipic 15 8
> +
> + /* IDSEL 0x18 */
> + c000 0 0 1 &ipic 15 8
> + c000 0 0 2 &ipic 16 8
> + c000 0 0 3 &ipic 17 8
> + c000 0 0 4 &ipic 14 8>;
> + interrupt-parent = < &ipic >;
> + interrupts = <42 8>;
> + bus-range = <0 0>;
> + ranges = <02000000 0 90000000 90000000 0 10000000
> + 42000000 0 80000000 80000000 0 10000000
> + 01000000 0 00000000 e0300000 0 00100000>;
> + clock-frequency = <0>;
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + reg = <e0008500 100>;
> + compatible = "fsl,mpc8349-pci";
> + device_type = "pci";
> + };
> +};
> diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
> new file mode 100644
> index 0000000..4d651a3
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
> @@ -0,0 +1,291 @@
> +/*
> + * MPC8379E MDS Device Tree Source
> + *
> + * Copyright 2007 Freescale Semiconductor Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +/ {
> + model = "fsl,mpc8379emds";
> + compatible = "fsl,mpc8379emds","fsl,mpc837xmds";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + aliases {
> + ethernet0 = &enet0;
> + ethernet1 = &enet1;
> + serial0 = &serial0;
> + serial1 = &serial1;
> + pci0 = &pci0;
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,8379@0 {
> + device_type = "cpu";
> + reg = <0>;
> + d-cache-line-size = <20>;
> + i-cache-line-size = <20>;
> + d-cache-size = <8000>; // L1, 32K
> + i-cache-size = <8000>; // L1, 32K
> + timebase-frequency = <0>;
> + bus-frequency = <0>;
> + clock-frequency = <0>;
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <00000000 20000000>; // 512MB at 0
> + };
> +
> + soc@e0000000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + device_type = "soc";
> + ranges = <0 e0000000 00100000>;
> + reg = <e0000000 00000200>;
> + bus-frequency = <0>;
> +
> + wdt@200 {
> + compatible = "mpc83xx_wdt";
> + reg = <200 100>;
> + };
> +
> + i2c@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + cell-index = <0>;
> + compatible = "fsl-i2c";
> + reg = <3000 100>;
> + interrupts = <e 8>;
> + interrupt-parent = < &ipic >;
> + dfsrr;
> + };
> +
> + i2c@3100 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + cell-index = <1>;
> + compatible = "fsl-i2c";
> + reg = <3100 100>;
> + interrupts = <f 8>;
> + interrupt-parent = < &ipic >;
> + dfsrr;
> + };
> +
> + spi@7000 {
> + compatible = "fsl_spi";
> + reg = <7000 1000>;
> + interrupts = <10 8>;
> + interrupt-parent = < &ipic >;
> + mode = "cpu";
> + };
> +
> + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
> + usb@23000 {
> + compatible = "fsl-usb2-dr";
> + reg = <23000 1000>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupt-parent = < &ipic >;
> + interrupts = <26 8>;
> + phy_type = "utmi_wide";
> + };
> +
> + mdio@24520 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,gianfar-mdio";
> + reg = <24520 20>;
> + phy2: ethernet-phy@2 {
> + interrupt-parent = < &ipic >;
> + interrupts = <11 8>;
> + reg = <2>;
> + device_type = "ethernet-phy";
> + };
> + phy3: ethernet-phy@3 {
> + interrupt-parent = < &ipic >;
> + interrupts = <12 8>;
> + reg = <3>;
> + device_type = "ethernet-phy";
> + };
> + };
> +
> + enet0: ethernet@24000 {
> + cell-index = <0>;
> + device_type = "network";
> + model = "eTSEC";
> + compatible = "gianfar";
> + reg = <24000 1000>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <20 8 21 8 22 8>;
> + phy-connection-type = "mii";
> + interrupt-parent = < &ipic >;
> + phy-handle = < &phy2 >;
> + };
> +
> + enet1: ethernet@25000 {
> + cell-index = <1>;
> + device_type = "network";
> + model = "eTSEC";
> + compatible = "gianfar";
> + reg = <25000 1000>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <23 8 24 8 25 8>;
> + phy-connection-type = "mii";
> + interrupt-parent = < &ipic >;
> + phy-handle = < &phy3 >;
> + };
> +
> + serial0: serial@4500 {
> + cell-index = <0>;
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <4500 100>;
> + clock-frequency = <0>;
> + interrupts = <9 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + serial1: serial@4600 {
> + cell-index = <1>;
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <4600 100>;
> + clock-frequency = <0>;
> + interrupts = <a 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + crypto@30000 {
> + model = "SEC3";
> + compatible = "talitos";
> + reg = <30000 10000>;
> + interrupts = <b 8>;
> + interrupt-parent = < &ipic >;
> + /* Rev. 3.0 geometry */
> + num-channels = <4>;
> + channel-fifo-len = <18>;
> + exec-units-mask = <000001fe>;
> + descriptor-types-mask = <03ab0ebf>;
> + };
> +
> + sdhc@2e000 {
> + model = "eSDHC";
> + compatible = "fsl,esdhc";
> + reg = <2e000 1000>;
> + interrupts = <2a 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + sata@18000 {
> + compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
> + reg = <18000 1000>;
> + interrupts = <2c 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + sata@19000 {
> + compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
> + reg = <19000 1000>;
> + interrupts = <2d 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + sata@1a000 {
> + compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
> + reg = <1a000 1000>;
> + interrupts = <2e 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + sata@1b000 {
> + compatible = "fsl,mpc8379-sata", "fsl,pq2pro-sata";
> + reg = <1b000 1000>;
> + interrupts = <2f 8>;
> + interrupt-parent = < &ipic >;
> + };
> +
> + /* IPIC
> + * interrupts cell = <intr #, sense>
> + * sense values match linux IORESOURCE_IRQ_* defines:
> + * sense == 8: Level, low assertion
> + * sense == 2: Edge, high-to-low change
> + */
> + ipic: pic@700 {
> + compatible = "fsl,ipic";
> + interrupt-controller;
> + #address-cells = <0>;
> + #interrupt-cells = <2>;
> + reg = <700 100>;
> + };
> + };
> +
> + pci0: pci@e0008500 {
> + cell-index = <0>;
> + interrupt-map-mask = <f800 0 0 7>;
> + interrupt-map = <
> +
> + /* IDSEL 0x11 */
> + 8800 0 0 1 &ipic 14 8
> + 8800 0 0 2 &ipic 15 8
> + 8800 0 0 3 &ipic 16 8
> + 8800 0 0 4 &ipic 17 8
> +
> + /* IDSEL 0x12 */
> + 9000 0 0 1 &ipic 16 8
> + 9000 0 0 2 &ipic 17 8
> + 9000 0 0 3 &ipic 14 8
> + 9000 0 0 4 &ipic 15 8
> +
> + /* IDSEL 0x13 */
> + 9800 0 0 1 &ipic 17 8
> + 9800 0 0 2 &ipic 14 8
> + 9800 0 0 3 &ipic 15 8
> + 9800 0 0 4 &ipic 16 8
> +
> + /* IDSEL 0x15 */
> + a800 0 0 1 &ipic 14 8
> + a800 0 0 2 &ipic 15 8
> + a800 0 0 3 &ipic 16 8
> + a800 0 0 4 &ipic 17 8
> +
> + /* IDSEL 0x16 */
> + b000 0 0 1 &ipic 17 8
> + b000 0 0 2 &ipic 14 8
> + b000 0 0 3 &ipic 15 8
> + b000 0 0 4 &ipic 16 8
> +
> + /* IDSEL 0x17 */
> + b800 0 0 1 &ipic 16 8
> + b800 0 0 2 &ipic 17 8
> + b800 0 0 3 &ipic 14 8
> + b800 0 0 4 &ipic 15 8
> +
> + /* IDSEL 0x18 */
> + c000 0 0 1 &ipic 15 8
> + c000 0 0 2 &ipic 16 8
> + c000 0 0 3 &ipic 17 8
> + c000 0 0 4 &ipic 14 8>;
> + interrupt-parent = < &ipic >;
> + interrupts = <42 8>;
> + bus-range = <0 0>;
> + ranges = <02000000 0 90000000 90000000 0 10000000
> + 42000000 0 80000000 80000000 0 10000000
> + 01000000 0 00000000 e0300000 0 00100000>;
> + clock-frequency = <0>;
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + reg = <e0008500 100>;
> + compatible = "fsl,mpc8349-pci";
> + device_type = "pci";
> + };
> +};
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-08 15:58 ` Grant Likely
@ 2008-01-08 17:38 ` Scott Wood
2008-01-08 17:53 ` Grant Likely
2008-01-09 23:42 ` David Gibson
1 sibling, 1 reply; 16+ messages in thread
From: Scott Wood @ 2008-01-08 17:38 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Li Yang, paulus
On Tue, Jan 08, 2008 at 08:58:17AM -0700, Grant Likely wrote:
> On 1/7/08, Li Yang <leoli@freescale.com> wrote:
> > + soc@e0000000 {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + device_type = "soc";
>
> I recommend dropping device_type and adding 'compatible = "fsl,mpc8377-immr";'
I recommend fixing the code that looks for this device_type before
recommending that people drop it. :-)
> > + wdt@200 {
> > + compatible = "mpc83xx_wdt";
>
> "fsl,mpc8377_wdt", "fsl,mpc83xx_wdt" as per generic names recommended practice.
Speaking of generic names, can we change the node name to "watchdog"?
> > + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
> > + usb@23000 {
> > + compatible = "fsl-usb2-dr";
> > + reg = <23000 1000>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + interrupt-parent = < &ipic >;
> > + interrupts = <26 8>;
> > + phy_type = "utmi_wide";
>
> fsl,phy_type please.
Again, code will break. Can we stop ambushing people submitting board
support with complaints against existing, non-board-specific code/device
trees? Fix that first, then complain if new code reintroduces the crud.
Also, if we're going to change the property name, we should also change the
underscore to a dash.
> > + enet0: ethernet@24000 {
> > + cell-index = <0>;
> > + device_type = "network";
> > + model = "eTSEC";
>
> Drop model property
Fix the code that checks for it.
-Scott
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-08 17:38 ` Scott Wood
@ 2008-01-08 17:53 ` Grant Likely
2008-01-09 8:38 ` Li Yang
0 siblings, 1 reply; 16+ messages in thread
From: Grant Likely @ 2008-01-08 17:53 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, Li Yang, paulus
On 1/8/08, Scott Wood <scottwood@freescale.com> wrote:
> On Tue, Jan 08, 2008 at 08:58:17AM -0700, Grant Likely wrote:
> > On 1/7/08, Li Yang <leoli@freescale.com> wrote:
> > > + phy_type = "utmi_wide";
> >
> > fsl,phy_type please.
>
> Again, code will break. Can we stop ambushing people submitting board
> support with complaints against existing, non-board-specific code/device
> trees? Fix that first, then complain if new code reintroduces the crud.
I disagree (about bringing up these comments). New board port is the
time to bring these issue up. It keeps the issue in the forefront so
it actually gets fixed.
>
> Also, if we're going to change the property name, we should also change the
> underscore to a dash.
Good point, I missed that
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-08 17:53 ` Grant Likely
@ 2008-01-09 8:38 ` Li Yang
0 siblings, 0 replies; 16+ messages in thread
From: Li Yang @ 2008-01-09 8:38 UTC (permalink / raw)
To: Grant Likely, Wood Scott; +Cc: linuxppc-dev, paulus
> -----Original Message-----
> From: glikely@secretlab.ca [mailto:glikely@secretlab.ca] On=20
> Behalf Of Grant Likely
> Sent: Wednesday, January 09, 2008 1:54 AM
> To: Wood Scott
> Cc: Li Yang; linuxppc-dev@ozlabs.org; paulus@samba.org
> Subject: Re: [PATCH 1/3] add default device trees for MPC837x=20
> MDS board
>=20
> On 1/8/08, Scott Wood <scottwood@freescale.com> wrote:
> > On Tue, Jan 08, 2008 at 08:58:17AM -0700, Grant Likely wrote:
> > > On 1/7/08, Li Yang <leoli@freescale.com> wrote:
> > > > + phy_type =3D "utmi_wide";
> > >
> > > fsl,phy_type please.
> >
> > Again, code will break. Can we stop ambushing people=20
> submitting board=20
> > support with complaints against existing, non-board-specific=20
> > code/device trees? Fix that first, then complain if new=20
> code reintroduces the crud.
>=20
> I disagree (about bringing up these comments). New board=20
> port is the time to bring these issue up. It keeps the issue=20
> in the forefront so it actually gets fixed.
Hi,
I agree that it's good to bring these issues up for a better standarized =
device tree definition. It will be even better if the guidelines are =
documented rather than nuncupated on the mail list. However, I think =
that adding new board support is independent of fixing preexistent =
issues. I do prefer to fix these issues together with other occurrences =
by separated patches rather than respin the new board support over and =
over again.
- Leo
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-08 15:58 ` Grant Likely
2008-01-08 17:38 ` Scott Wood
@ 2008-01-09 23:42 ` David Gibson
2008-01-10 0:59 ` Grant Likely
1 sibling, 1 reply; 16+ messages in thread
From: David Gibson @ 2008-01-09 23:42 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Li Yang, paulus
On Tue, Jan 08, 2008 at 08:58:17AM -0700, Grant Likely wrote:
> Hi Leo,
>
> comments below. I've made my comments on the first file, but they
> apply to the other two also.
>
> Cheers,
> g.
[snip]
> > + ranges = <0 e0000000 00100000>;
> > + reg = <e0000000 00000200>;
> > + bus-frequency = <0>;
> > +
> > + wdt@200 {
> > + compatible = "mpc83xx_wdt";
>
> "fsl,mpc8377_wdt", "fsl,mpc83xx_wdt" as per generic names recommended practice.
Uh.. that's reasonable advice, but it has nothing to do with the
generic names recommended practice.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-09 23:42 ` David Gibson
@ 2008-01-10 0:59 ` Grant Likely
0 siblings, 0 replies; 16+ messages in thread
From: Grant Likely @ 2008-01-10 0:59 UTC (permalink / raw)
To: Grant Likely, Li Yang, linuxppc-dev, paulus
On 1/9/08, David Gibson <david@gibson.dropbear.id.au> wrote:
> On Tue, Jan 08, 2008 at 08:58:17AM -0700, Grant Likely wrote:
> > > + compatible = "mpc83xx_wdt";
> >
> > "fsl,mpc8377_wdt", "fsl,mpc83xx_wdt" as per generic names recommended practice.
>
> Uh.. that's reasonable advice, but it has nothing to do with the
> generic names recommended practice.
Actually, that *is* advice given in the generic names recommended
practice document:
http://www.openfirmware.org/1275/practice/gnames/gnamv14a.html#HDR11
Section 6.2, last sentence.
:-)
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
2008-01-07 12:03 [PATCH 1/3] add default device trees for MPC837x MDS board Li Yang
` (2 preceding siblings ...)
2008-01-08 15:58 ` Grant Likely
@ 2008-01-18 6:31 ` Kumar Gala
3 siblings, 0 replies; 16+ messages in thread
From: Kumar Gala @ 2008-01-18 6:31 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
On Jan 7, 2008, at 6:03 AM, Li Yang wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> address comments and use new dts spec.
>
> arch/powerpc/boot/dts/mpc8377_mds.dts | 277 ++++++++++++++++++++++++
> +++++++
> arch/powerpc/boot/dts/mpc8378_mds.dts | 263 ++++++++++++++++++++++++
> +++++
> arch/powerpc/boot/dts/mpc8379_mds.dts | 291 ++++++++++++++++++++++++
> +++++++++
> 3 files changed, 831 insertions(+), 0 deletions(-)
applied.
- k
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-01-18 6:31 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07 12:03 [PATCH 1/3] add default device trees for MPC837x MDS board Li Yang
2008-01-07 12:03 ` [PATCH 2/3] add MPC837x USB platform support Li Yang
2008-01-07 12:03 ` [PATCH 3/3] USB device tree cleanups Li Yang
2008-01-07 23:10 ` Stephen Rothwell
2008-01-08 3:32 ` Li Yang
2008-01-07 23:05 ` [PATCH 2/3] add MPC837x USB platform support Stephen Rothwell
2008-01-08 7:36 ` [PATCH 1/3] add default device trees for MPC837x MDS board Kumar Gala
2008-01-08 7:57 ` Li Yang
2008-01-08 15:18 ` Kumar Gala
2008-01-08 15:58 ` Grant Likely
2008-01-08 17:38 ` Scott Wood
2008-01-08 17:53 ` Grant Likely
2008-01-09 8:38 ` Li Yang
2008-01-09 23:42 ` David Gibson
2008-01-10 0:59 ` Grant Likely
2008-01-18 6:31 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).