add default device trees for MPC837x MDS board
Subsystems (4)
PATCH 1/3 add default device trees for MPC837x MDS board
---
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(-)
arch/powerpc/boot/dts/mpc8377_mds.dts new file +277 -0
@@ -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"; + }; +};
arch/powerpc/boot/dts/mpc8378_mds.dts new file +263 -0
263 lines not on this page · raw message
arch/powerpc/boot/dts/mpc8379_mds.dts new file +291 -0
291 lines not on this page · raw message
PATCH 2/3 add MPC837x USB platform support
Add chip specific and board specific initialization for MPC837x USB.
--- 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(-)
arch/powerpc/platforms/83xx/mpc837x_mds.c +48 -0
@@ -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[] = {
arch/powerpc/platforms/83xx/mpc83xx.h +3 -0
@@ -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
arch/powerpc/platforms/83xx/usb.c +39 -0
@@ -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 */
Signature · 1 line
1.5.3.5.643.g40e25
PATCH 3/3 USB device tree cleanups
Remove device_type = "usb"
--- 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(-)
Documentation/powerpc/booting-without-of.txt +0 -4
@@ -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>;
arch/powerpc/boot/dts/mpc8313erdb.dts +0 -1
@@ -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>;
arch/powerpc/boot/dts/mpc832x_mds.dts +0 -1
@@ -200,7 +200,6 @@ }; usb@6c0 { - device_type = "usb"; compatible = "qe_udc"; reg = <6c0 40 8B00 100>; interrupts = <b>;
arch/powerpc/boot/dts/mpc8349emitx.dts +0 -2
@@ -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>;
arch/powerpc/boot/dts/mpc8349emitxgp.dts +0 -1
@@ -78,7 +78,6 @@ }; usb@23000 { - device_type = "usb"; compatible = "fsl-usb2-dr"; reg = <23000 1000>; #address-cells = <1>;
arch/powerpc/boot/dts/mpc834x_mds.dts +0 -2
@@ -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>;
arch/powerpc/boot/dts/mpc836x_mds.dts +0 -1
@@ -231,7 +231,6 @@ }; usb@6c0 { - device_type = "usb"; compatible = "qe_udc"; reg = <6c0 40 8B00 100>; interrupts = <b>;
arch/powerpc/platforms/83xx/usb.c +4 -4
@@ -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 );
arch/powerpc/sysdev/fsl_soc.c +2 -6
@@ -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 ;
Signature · 1 line
1.5.3.5.643.g40e25
Re: [PATCH 3/3] USB device tree cleanups
arch/powerpc/sysdev/fsl_soc.c static int __init fsl_usb_of_init(void) · line 536
Quoted 10 lines · On Mon, 7 Jan 2008 20:03:20 +0800 Li Yang <[email protected]> wrote:
+++
b/arch/powerpc/sysdev/fsl_soc.carch/powerpc/sysdev/fsl_soc.c +1
-3@@ -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).
arch/powerpc/sysdev/fsl_soc.c static int __init fsl_usb_of_init(void) · line 581
Quoted 11 lines
arch/powerpc/sysdev/fsl_soc.c +1
-3struct 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.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
RE: [PATCH 3/3] USB device tree cleanups
Quoted 20 lines
-----Original Message-----
From: [email protected]=20 [mailto:[email protected]]=20 On Behalf Of Stephen Rothwell
Sent: Tuesday, January 08, 2008 7:10 AM
To: Li Yang
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 3/3] USB device tree cleanups
=20Review
Quoted 8 lines · On Mon, 7 Jan 2008 20:03:20 +0800 Li Yang=20 <[email protected]> wrote:
+++
b/arch/powerpc/sysdev/fsl_soc.c(quoted diff) +0
-0@@ -533,9 +533,7 @@ static int __init fsl_usb_of_init(void) *usb_dev_dr_client =3D NULL; int ret;=20
(quoted diff) +0
-2- for (np =3D NULL, i =3D 0; - (np =3D of_find_compatible_node(np, "usb",=20"fsl-usb2-mph")) !=3D NULL;
Quoted 5 lines
arch/powerpc/sysdev/fsl_soc.c static int __init fsl_usb_of_init(void) · line 536
Quoted 2 lines
arch/powerpc/sysdev/fsl_soc.c +1
-1- 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
Re: [PATCH 2/3] add MPC837x USB platform support
In reply to Li YangHi,
Just a couple of comments.
arch/powerpc/platforms/83xx/mpc837x_mds.c unsigned long isa_io_base = 0; · line 59
Quoted 6 lines · On Mon, 7 Jan 2008 20:03:19 +0800 Li Yang <[email protected]> wrote:
arch/powerpc/platforms/83xx/mpc837x_mds.c +4
-0+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
Quoted 5 lines
arch/powerpc/platforms/83xx/mpc837x_mds.c +5
-0+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 ;
arch/powerpc/platforms/83xx/mpc837x_mds.c unsigned long isa_io_base = 0; · line 74
Quoted 10 lines
arch/powerpc/platforms/83xx/mpc837x_mds.c +10
-0+ 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)
arch/powerpc/platforms/83xx/usb.c int mpc831x_usb_cfg(void) · line 196
Quoted 10 lines
arch/powerpc/platforms/83xx/usb.c +9
-0+#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.
arch/powerpc/platforms/83xx/usb.c int mpc831x_usb_cfg(void) · line 198
Quoted 2 lines
arch/powerpc/platforms/83xx/usb.c +2
-0+printk (KERN_WARNING "837x USB PHY type not supported\n" ); +return -EINVAL ;
No of_node_put(np)
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 11 lines · Li Yang
Signed-off-by Li Yang <[email protected]>---
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
Quoted 19 lines
-----Original Message-----
From: Kumar Gala [mailto:[email protected]]=20
Sent: Tuesday, January 08, 2008 3:37 PM
To: Li Yang
Cc: [email protected]; [email protected]
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:
=20Quoted 5 lines
Signed-off-by Li Yang <[email protected]>---
address comments and use new dts spec.
arch/powerpc/boot/dts/mpc8377_mds.dts| 277=20++++++++++++++++++++++++
Quoted 2 lines
+++++++
arch/powerpc/boot/dts/mpc8378_mds.dts| 263=20
Quoted 8 lines
++++++++++++++++++++++++
Quoted 2 lines
+++++
arch/powerpc/boot/dts/mpc8379_mds.dts| 291=20++++++++++++++++++++++++
Quoted 2 lines
+++++++++
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
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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
Hi Leo,
comments below. I've made my comments on the first file, but they apply to the other two also.
Cheers,
g.
Quoted 19 lines · Li Yang
Signed-off-by Li Yang <[email protected]>---
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(-)arch/powerpc/boot/dts/mpc8377_mds.dts new file +4
-0@@ -0,0 +1,277 @@ +/* + * MPC8377E MDS Device Tree Source + * + * Copyright 2007 Freescale Semiconductor Inc.
arch/powerpc/boot/dts/mpc8377_mds.dts line 14
Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +10
-0+ * + * 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.
Quoted 27 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +27
-0+ #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>; + }; + };
arch/powerpc/boot/dts/mpc8377_mds.dts line 51
Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +10
-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";'
arch/powerpc/boot/dts/mpc8377_mds.dts line 57
Quoted 6 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +6
-0+ 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.
Quoted 32 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +32
-0+ 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"; + };
arch/powerpc/boot/dts/mpc8377_mds.dts line 99
Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +10
-0+ + /* 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.
Quoted 15 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +15
-0+ }; + + 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 >;
arch/powerpc/boot/dts/mpc8377_mds.dts line 124
Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +10
-0+ interrupts = <12 8>; + reg = <3>; + device_type = "ethernet-phy"; + }; + }; + + enet0: ethernet@24000 { + cell-index = <0>; + device_type = "network"; + model = "eTSEC";
Drop model property
arch/powerpc/boot/dts/mpc8377_mds.dts line 137
Quoted 13 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +13
-0+ 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.
Quoted 21 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +21
-0+ 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>;
arch/powerpc/boot/dts/mpc8377_mds.dts line 168
Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +10
-0+ 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.
Quoted 4 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +4
-0+ compatible = "talitos"; + reg = <30000 10000>; + interrupts = <b 8>; + interrupt-parent = < &ipic >;
arch/powerpc/boot/dts/mpc8377_mds.dts line 182
Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +10
-0+ /* 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".
Quoted 105 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +95
-0+ 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"; + }; +};arch/powerpc/boot/dts/mpc8378_mds.dts new file +4
-0@@ -0,0 +1,263 @@ +/* + * MPC8378E MDS Device Tree Source + * + * Copyright 2007 Freescale Semiconductor Inc.
arch/powerpc/boot/dts/mpc8378_mds.dts line 14
Quoted 10 lines
arch/powerpc/boot/dts/mpc8378_mds.dts new file +10
-0+ * + * 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.
Quoted 27 lines
arch/powerpc/boot/dts/mpc8378_mds.dts new file +27
-0+ #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>; + }; + };
arch/powerpc/boot/dts/mpc8378_mds.dts line 51
Quoted 10 lines
arch/powerpc/boot/dts/mpc8378_mds.dts new file +10
-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
Quoted 514 lines
arch/powerpc/boot/dts/mpc8378_mds.dts new file +212
-0+ 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"; + }; +};arch/powerpc/boot/dts/mpc8379_mds.dts new file +291
-0@@ -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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 7 lines · Grant Likely
arch/powerpc/boot/dts/mpc8377_mds.dts line 51
Quoted 4 lines · Li Yang
arch/powerpc/boot/dts/mpc8377_mds.dts new file +4
-0+ soc@e0000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc";I recommend dropping
device_typeand adding 'compatible = "fsl,mpc8377-immr";'
I recommend fixing the code that looks for this device_type before recommending that people drop it. :-)
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ 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"?
Quoted 11 lines
arch/powerpc/boot/dts/mpc8377_mds.dts line 99
Quoted 9 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +9
-0+ /* 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.
Quoted 6 lines
arch/powerpc/boot/dts/mpc8377_mds.dts line 124
Quoted 4 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +4
-0+ enet0: ethernet@24000 { + cell-index = <0>; + device_type = "network"; + model = "eTSEC";Drop model property
Fix the code that checks for it.
-Scott
Quoted 9 lines · Scott Wood
Quoted 4 lines · Grant Likely
Quoted 1 line · Li Yang
+
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.
Quoted 3 lines
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.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 17 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On=20 Behalf Of Grant Likely
Sent: Wednesday, January 09, 2008 1:54 AM
To: Wood Scott
Cc: Li Yang; [email protected]; [email protected]
Subject: Re: [PATCH 1/3] add default device trees for MPC837x=20 MDS board
=20Quoted 7 lines · Scott Wood
Quoted 4 lines · Grant Likely
Quoted 1 line · Li Yang
+
phy_type=3D "utmi_wide";fsl,phy_type please.
Again, code will break. Can we stop ambushing people=20
Quoted 8 lines
submitting board=20
Quoted 2 lines
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
Quoted 7 lines · Grant Likely
Hi Leo,
comments below. I've made my comments on the first file, but they apply to the other two also.
Cheers,
g.
[snip]
Quoted 8 lines
arch/powerpc/boot/dts/mpc8377_mds.dts line 57
Quoted 6 lines
arch/powerpc/boot/dts/mpc8377_mds.dts new file +6
-0+ 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.
Signature · 4 lines
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
Quoted 7 lines · David Gibson
Quoted 3 lines · Grant Likely
Quoted 1 line
+ 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.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Kumar Gala
AppliedQuoted 11 lines · Li Yang
Signed-off-by Li Yang <[email protected]>---
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