Skip to contentSkip to conversation

Oops with TQM5200 on TQM5200

PATCH RESEND In review Wolfgang Grandegger 7 participants 31 messages Mar 20, 2008 – Mar 26, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

TIA.

Wolfgang.

## Booting image at 00200000 ...

   Image Name:   Linux-2.6.25-rc6-01058-gf8937ce-
   Created:      2008-03-20  13:19:36 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1697503 Bytes =  1.6 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
   Booting using the fdt at 0x400000
[    0.000000] Using mpc5200-simple-platform machine description
[    0.000000] Linux version 2.6.25-rc6-01058-gf8937ce-dirty ([email protected]) (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) #14 Thu Mar 20 14:19:25 CET 2008
[    0.000000] PCI host bridge /pci@f0000d00 (primary) ranges:
[    0.000000]  MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
[    0.000000]  MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000 
[    0.000000]   IO 0x00000000a0000000..0x00000000a0ffffff -> 0x0000000000000000
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->    16384
[    0.000000]   Normal      16384 ->    16384
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0:        0 ->    16384
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/nfs rw nfsroot=10.0.30.2:/opt/eldk/ppc_6xx ip=10.0.30.210:10.0.30.2:::tqm5200:eth0:off panic=1 console=ttyPSC0,115200
[    0.000000] MPC52xx PIC is up and running!
[    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[    0.000014] clocksource: timebase mult[79364d9] shift[22] registered
[    0.000241] console [ttyPSC0] enabled
[    0.004376] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.008573] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.021186] Memory: 61236k/65536k available (3328k kernel code, 4236k reserved, 120k data, 149k bss, 180k init)
[    0.024179] SLUB: Genslabs=12, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
[    0.120160] Mount-cache hash table entries: 512
[    0.128111] net_namespace: 152 bytes
[    0.133162] NET: Registered protocol family 16
[    0.150957] PCI: Probing PCI hardware
[    0.168836] SCSI subsystem initialized
[    0.174379] usbcore: registered new interface driver usbfs
[    0.176629] usbcore: registered new interface driver hub
[    0.180942] usbcore: registered new device driver usb
[    0.200000] Time: timebase clocksource has been installed.
[    0.208268] NET: Registered protocol family 2
[    0.252350] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.260660] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.268181] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.272125] TCP: Hash tables configured (established 2048 bind 2048)
[    0.276028] TCP reno registered
[    0.338145] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.342627] io scheduler noop registered
[    0.344114] io scheduler anticipatory registered (default)
[    0.348032] io scheduler deadline registered
[    0.352847] io scheduler cfq registered
[    0.778513] Generic RTC Driver v1.07
[    0.780658] Serial: MPC52xx PSC UART driver
[    0.784474] f0002000.serial: ttyPSC0 at MMIO 0xf0002000 (irq = 129) is a MPC52xx PSC
[    0.793028] f0002200.serial: ttyPSC1 at MMIO 0xf0002200 (irq = 130) is a MPC52xx PSC
[    0.797297] f0002400.serial: ttyPSC2 at MMIO 0xf0002400 (irq = 131) is a MPC52xx PSC
[    0.814501] brd: module loaded
[    0.823106] loop: module loaded
[    0.824132] vcan: Virtual CAN interface driver
[    0.828033] slcan: serial line CAN interface driver
[    0.832030] slcan: 10 dynamic interface channels.
[    0.840408] mpc52xx-mscan mpc52xx-mscan.0: probe for port at 0xC5062900 done (irq 145)
[    0.846001] mpc52xx-mscan mpc52xx-mscan.1: probe for port at 0xC5064980 done (irq 146)
[    0.852251] Unable to handle kernel paging request for data at address 0x0000000c
[    0.860026] Faulting instruction address: 0xc0017fec
[    0.864036] Oops: Kernel access of bad area, sig: 11 [#1]
[    0.868000] mpc5200-simple-platform
[    0.868000] Modules linked in:
[    0.868000] NIP: c0017fec LR: c0019064 CTR: 00000010
[    0.868000] REGS: c381fd20 TRAP: 0300   Not tainted  (2.6.25-rc6-01058-gf8937ce-dirty)
[    0.868000] MSR: 00009032 <EE,ME,IR,DR>  CR: 28000028  XER: 2000005f
[    0.868000] DAR: 0000000c, DSISR: 20000000
[    0.868000] TASK = c3812400[1] 'swapper' THREAD: c381e000
[    0.868000] GPR00: 00000010 c381fdd0 c3812400 00000100 00000008 00000008 fcff7000 c382ca00 
[    0.868000] GPR08: 00002000 00000000 00000000 f00035a9 f0003000 fefd7f7f 07fb3000 04000000 
[    0.868000] GPR16: 00000000 007fff00 00000000 c02c0000 c0340000 c0330000 07fb2678 00000000 
[    0.868000] GPR24: c0330000 00000008 c0360000 00000100 00000008 f0003184 000005f2 00000000 
[    0.868000] NIP [c0017fec] bcom_task_alloc+0x30/0x198
[    0.868000] LR [c0019064] bcom_fec_rx_init+0x24/0x74
[    0.868000] Call Trace:
[    0.868000] [c381fdd0] [c006863c] __get_vm_area_node+0x80/0x1b8 (unreliable)
[    0.868000] [c381fe00] [c0019064] bcom_fec_rx_init+0x24/0x74
[    0.868000] [c381fe20] [c028428c] 0xc028428c
[    0.868000] [c381fe60] [c01ea26c] of_platform_device_probe+0x58/0x80
[    0.868000] [c381fe80] [c017ddd0] driver_probe_device+0xb8/0x1cc
[    0.868000] [c381fea0] [c017e0bc] __driver_attach+0xcc/0xf8
[    0.868000] [c381fec0] [c017c93c] bus_for_each_dev+0x58/0x94
[    0.868000] [c381fef0] [c017db00] driver_attach+0x24/0x34
[    0.868000] [c381ff00] [c017d9c0] bus_add_driver+0x188/0x250
[    0.868000] [c381ff20] [c017e598] driver_register+0x48/0x130
[    0.868000] [c381ff40] [c01ea48c] of_register_driver+0x54/0x70
[    0.868000] [c381ff50] [c032c6b4] mpc52xx_fec_init+0x64/0x80
[    0.868000] [c381ff70] [c0313858] kernel_init+0x98/0x28c
[    0.868000] [c381fff0] [c001229c] kernel_thread+0x44/0x60
[    0.868000] Instruction dump:
[    0.868000] 7c0802a6 9421ffd0 bf210014 3f40c036 7c7b1b78 7c992378 90010034 38000010 
[    0.868000] 7cbc2b78 813a5224 7c0903a6 3be00000 <8129000c> 80090004 57fd2834 2f800000 
[    0.868081] ---[ end trace ab0c326e02602f58 ]---
[    0.872036] Kernel panic - not syncing: Attempted to kill init!
[    0.876034] Rebooting in 1 seconds..

U-Boot 1.3.1-g5f7f945a-dirty (Dec 19 2007 - 16:58:01)

CPU: MPC5200B v2.2, Core v1.4 at 396 MHz

       Bus 132 MHz, IPB 132 MHz, PCI 66 MHz
Board: TQM5200 (TQ-Components GmbH)
       on a STK52xx carrier board
I2C:   85 kHz, ready
DRAM:  128 MB
#1 lore raw
Quoted 6 lines · Wolfgang Grandegger

Hello,

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

TIA.

Hmm, I haven't seen this issue on any of my 5200 boards. To state the obvious, it's an issue in the bestcomm code. What source line is "bcom_task_alloc+0x30/0x198" on?

Cheers,
g.

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

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

Anatolij
--

arch/powerpc/boot/dts/tqm5200.dts +0 -0
index c86464f..7c23bb3 100644
@@ -83,6 +83,7 @@
		};

		dma-controller@1200 {
+			device_type = "dma-controller";
			compatible = "fsl,mpc5200-bestcomm";
			reg = <1200 80>;
			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -127,10 +128,25 @@
		ethernet@3000 {
			device_type = "network";
			compatible = "fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
			local-mac-address = [ 00 00 00 00 00 00 ];
			interrupts = <2 5 0>;
			interrupt-parent = <&mpc5200_pic>;

+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;

+			};
		};

		ata@3a00 {
#3 lore raw
Quoted 10 lines · Anatolij Gustschin

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

It helps 2.6.25-rc6 too - thanks Anatolij.

arch/powerpc/boot/dts/tqm5200.dts line 86

Quoted 12 lines

Anatolij

arch/powerpc/boot/dts/tqm5200.dts +1 -0
index c86464f..7c23bb3 100644
@@ -83,6 +83,7 @@
        };
 
        dma-controller@1200 {
+            device_type = "dma-controller";

This actually fixes the Oops.

Quoted 23 lines
arch/powerpc/boot/dts/tqm5200.dts +9 -1
            compatible = "fsl,mpc5200-bestcomm";
            reg = <1200 80>;
            interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -127,10 +128,25 @@
        ethernet@3000 {
            device_type = "network";
            compatible = "fsl,mpc5200-fec";
-            reg = <3000 800>;
+            reg = <3000 400>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <2 5 0>;
            interrupt-parent = <&mpc5200_pic>;
+            phy-handle = <&phy0>;
+        };
+
+        mdio@3000 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+            compatible = "fsl,mpc5200b-mdio";
+            reg = <3000 400>;       // fec range, since we need to 

setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command
finished", not link changes & co.

arch/powerpc/boot/dts/tqm5200.dts

Quoted 6 lines
arch/powerpc/boot/dts/tqm5200.dts +6 -0
+            interrupt-parent = <&mpc5200_pic>;
+
+            phy0:ethernet-phy@0 {
+                device_type = "ethernet-phy";
+                reg = <0>;
+            };

And this fixes networking issues (NFS-mounted rootfs timeouts, etc).
BTW: it's been posted a while back
(http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197) but didn't get merged.

Grant -- any chances these fixes could be rushed upstream?

Regards,
Bartlomiej

#7 lore raw
In reply to Anatolij Gustschin

Hi Anatolij,

Quoted 19 lines · Anatolij Gustschin

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

Anatolij

arch/powerpc/boot/dts/tqm5200.dts +0 -0
index c86464f..7c23bb3 100644

arch/powerpc/boot/dts/tqm5200.dts line 86

Quoted 4 lines
arch/powerpc/boot/dts/tqm5200.dts +1 -0
@@ -83,6 +83,7 @@
        };
 
        dma-controller@1200 {
+            device_type = "dma-controller";

This one actually fixes the Oops. I already had the following fixes.

arch/powerpc/boot/dts/tqm5200.dts line 131

Quoted 9 lines
arch/powerpc/boot/dts/tqm5200.dts +1 -1
            compatible = "fsl,mpc5200-bestcomm";
            reg = <1200 80>;
            interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -127,10 +128,25 @@
        ethernet@3000 {
            device_type = "network";
            compatible = "fsl,mpc5200-fec";
-            reg = <3000 800>;
+            reg = <3000 400>;

This has already been fixed a long time ago, IIRC.

Quoted 14 lines
arch/powerpc/boot/dts/tqm5200.dts +8 -0
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <2 5 0>;
            interrupt-parent = <&mpc5200_pic>;
+            phy-handle = <&phy0>;
+        };
+
+        mdio@3000 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+            compatible = "fsl,mpc5200b-mdio";
+            reg = <3000 400>;       // fec range, since we need to

setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command
finished", not link changes & co.

arch/powerpc/boot/dts/tqm5200.dts

Quoted 6 lines
arch/powerpc/boot/dts/tqm5200.dts +6 -0
+            interrupt-parent = <&mpc5200_pic>;
+
+            phy0:ethernet-phy@0 {
+                device_type = "ethernet-phy";
+                reg = <0>;
+            };

Another question. Is it possible to configure Linux without explicit PHY-handling.

Thanks,

Wolfgang.

#4 lore raw
In reply to Bartlomiej Sieka
Quoted 26 lines · Bartlomiej Sieka
Quoted 10 lines · Anatolij Gustschin

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

It helps 2.6.25-rc6 too - thanks Anatolij.

Quoted 11 lines

Anatolij
--

arch/powerpc/boot/dts/tqm5200.dts +0 -0
index c86464f..7c23bb3 100644
@@ -83,6 +83,7 @@
        };
 
Quoted 4 lines

arch/powerpc/boot/dts/tqm5200.dts line 86

Quoted 2 lines
arch/powerpc/boot/dts/tqm5200.dts +1 -0
        dma-controller@1200 {
+            device_type = "dma-controller";

This actually fixes the Oops.

Hmm, this sounds like a band-aid; the kernel shouldn't oops if this is missing from the device tree. Fail, perhaps, but oops is worrisome. Would someone like to investigate?

In fact, device_type should not be necessary at all, but that's beside the point.

Quoted 32 lines
Quoted 20 lines
arch/powerpc/boot/dts/tqm5200.dts +9 -1
@@ -127,10 +128,25 @@
        ethernet@3000 {
            device_type = "network";
            compatible = "fsl,mpc5200-fec";
-            reg = <3000 800>;
+            reg = <3000 400>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <2 5 0>;
            interrupt-parent = <&mpc5200_pic>;
+            phy-handle = <&phy0>;
+        };
+
+        mdio@3000 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+            compatible = "fsl,mpc5200b-mdio";
+            reg = <3000 400>;       // fec range, since we need to

setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command
finished", not link changes & co.

arch/powerpc/boot/dts/tqm5200.dts

Quoted 6 lines
arch/powerpc/boot/dts/tqm5200.dts +6 -0
+            interrupt-parent = <&mpc5200_pic>;
+
+            phy0:ethernet-phy@0 {
+                device_type = "ethernet-phy";
+                reg = <0>;
+            };

And this fixes networking issues (NFS-mounted rootfs timeouts, etc).
BTW: it's been posted a while back
(http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197) but didn't get merged.

Quoted 1 line

Grant -- any chances these fixes could be rushed upstream?

Nuts, I dropped it on the floor. I'll pick this up.

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Acked-by
#8 lore raw
In reply to Anatolij Gustschin

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Cheers,
g.

Quoted 58 lines · Anatolij Gustschin

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

Anatolij
--
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index c86464f..7c23bb3 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -83,6 +83,7 @@

                };

                dma-controller@1200 {
 +                       device_type = "dma-controller";
                        compatible = "fsl,mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
 @@ -127,10 +128,25 @@
                ethernet@3000 {
                        device_type = "network";
                        compatible = "fsl,mpc5200-fec";
 -                       reg = <3000 800>;
 +                       reg = <3000 400>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <2 5 0>;
                        interrupt-parent = <&mpc5200_pic>;
 +                       phy-handle = <&phy0>;
 +               };
 +
 +               mdio@3000 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       compatible = "fsl,mpc5200b-mdio";
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
 +
 +                       phy0:ethernet-phy@0 {
 +                               device_type = "ethernet-phy";
 +                               reg = <0>;
 +                       };
                };

                ata@3a00 {

_______________________________________________
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.
#9 lore raw
Quoted 2 lines · Grant Likely

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Could we also have similar fixes for cm5200.dts and motionpro.dts picked up? I could provide the patches within a day -- will this be OK?

Regards,
Bartlomiej

Quoted 60 lines

Cheers,
g.

Quoted 53 lines · Anatolij Gustschin

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

Anatolij
--
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index c86464f..7c23bb3 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -83,6 +83,7 @@

                };

                dma-controller@1200 {
 +                       device_type = "dma-controller";
                        compatible = "fsl,mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
 @@ -127,10 +128,25 @@
                ethernet@3000 {
                        device_type = "network";
                        compatible = "fsl,mpc5200-fec";
 -                       reg = <3000 800>;
 +                       reg = <3000 400>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <2 5 0>;
                        interrupt-parent = <&mpc5200_pic>;
 +                       phy-handle = <&phy0>;
 +               };
 +
 +               mdio@3000 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       compatible = "fsl,mpc5200b-mdio";
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
 +
 +                       phy0:ethernet-phy@0 {
 +                               device_type = "ethernet-phy";
 +                               reg = <0>;
 +                       };
                };

                ata@3a00 {
#10 lore raw
Quoted 6 lines · Bartlomiej Sieka
Quoted 2 lines · Grant Likely

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Could we also have similar fixes for cm5200.dts and motionpro.dts picked up? I could provide the patches within a day -- will this be OK?

Yes, please do; heck put them all into one patch if you like; and I'll ack them.

g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#27 lore raw
In reply to Bartlomiej Sieka
Quoted 6 lines · Bartlomiej Sieka
Quoted 2 lines · Grant Likely

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Could we also have similar fixes for cm5200.dts and motionpro.dts picked up? I could provide the patches within a day -- will this be OK?

At that occasion, could you please also add two CAN nodes to tqm5200.dts as shown:

s$ diff -u tqm5200.dts tqm5200.dts.CAN

tqm5200.dts.CAN 2008-03-21 07:27:49.000000000 +0100 renamed from tqm5200.dts 2008-03-20 18:44:40.000000000 +0100 +16 -0
@@ -68,6 +68,22 @@
                        fsl,has-wdt;
                };
 
+               can@900 {
+                       compatible = "fsl,mpc5200-mscan";
+                       cell-index = <0>;
+                       interrupts = <2 11 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       reg = <900 80>;
+               };
+
+               can@980 {
+                       compatible = "fsl,mpc5200-mscan";
+                       cell-index = <1>;
+                       interrupts = <2 12 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       reg = <980 80>;
+               };
+
                gpio@b00 {
                        compatible = "fsl,mpc5200-gpio";
                        reg = <b00 40>;

Thanks a lot.

Wolfgang.

Acked-by
#28 lore raw
Quoted 10 lines · Wolfgang Grandegger
Quoted 6 lines · Bartlomiej Sieka
Quoted 2 lines · Grant Likely

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Could we also have similar fixes for cm5200.dts and motionpro.dts picked up? I could provide the patches within a day -- will this be OK?

At that occasion, could you please also add two CAN nodes to tqm5200.dts as shown:

Quoted 28 lines

s$ diff -u tqm5200.dts tqm5200.dts.CAN
--- tqm5200.dts 2008-03-20 18:44:40.000000000 +0100
+++ tqm5200.dts.CAN 2008-03-21 07:27:49.000000000 +0100
@@ -68,6 +68,22 @@

                        fsl,has-wdt;
                };

+ can@900 {

 +                       compatible = "fsl,mpc5200-mscan";
 +                       cell-index = <0>;
 +                       interrupts = <2 11 0>;
 +                       interrupt-parent = <&mpc5200_pic>;
 +                       reg = <900 80>;
 +               };
 +
 +               can@980 {
 +                       compatible = "fsl,mpc5200-mscan";
 +                       cell-index = <1>;
 +                       interrupts = <2 12 0>;
 +                       interrupt-parent = <&mpc5200_pic>;
 +                       reg = <980 80>;
 +               };
 +
                gpio@b00 {
                        compatible = "fsl,mpc5200-gpio";
                        reg = <b00 40>;
Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#11 lore raw

[POWERPC] mpc52xx: Amalgamated dts fixes and updates

In reply to Grant Likely

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates, in particluar one posted by Anatolij Gustschin, which fixes an Oops during boot.

---
Anatolij, would you like to add your S-O-B?

arch/powerpc/boot/dts/cm5200.dts +38 -1
index 30737ea..8b2e8e4 100644
@@ -159,6 +159,7 @@
 		};
 
 		dma-controller@1200 {
+			device_type = "dma-controller";
 			compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
 			reg = <1200 80>;
 			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -212,13 +213,31 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";
+			compatible = "fsl,mpc5200b-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};
 		};
 
 		i2c@3d40 {
+		#address-cells = <1>;
+		#size-cells = <0>;
 			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
@@ -231,4 +250,22 @@
 			reg = <8000 4000>;
 		};
 	};
+
+	lpb {
+		model = "fsl,lpb";
+		compatible = "fsl,lpb";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 fc000000 2000000>;
+
+		// 16-bit flash device at LocalPlus Bus CS0
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 2000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
 };
arch/powerpc/boot/dts/motionpro.dts +44 -28

122 lines not on this page · raw message

arch/powerpc/boot/dts/tqm5200.dts +43 -1

76 lines not on this page · raw message

#12 lore raw

Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates

Quoted 14 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates, in particluar one posted by Anatolij Gustschin, which fixes an Oops during boot.

---
Anatolij, would you like to add your S-O-B?

arch/powerpc/boot/dts/cm5200.dts +0 -0
index 30737ea..8b2e8e4 100644

arch/powerpc/boot/dts/cm5200.dts line 162

Quoted 4 lines
arch/powerpc/boot/dts/cm5200.dts +1 -0
@@ -159,6 +159,7 @@
 		};
 
 		dma-controller@1200 {
+			device_type = "dma-controller";

This is not right. If adding device_type here fixes something, then the driver is wrong and should be fixed instead.

[snip]

arch/powerpc/boot/dts/cm5200.dts line 226

Quoted 4 lines
arch/powerpc/boot/dts/cm5200.dts +4 -0
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";

Likewise device_type should not appear here.

[snip]

arch/powerpc/boot/dts/cm5200.dts line 240

Quoted 3 lines
arch/powerpc/boot/dts/cm5200.dts +2 -0
 		i2c@3d40 {
+		#address-cells = <1>;
+		#size-cells = <0>;

Looks like incorrect indentation here.

[snip]

arch/powerpc/boot/dts/cm5200.dts

Quoted 2 lines
arch/powerpc/boot/dts/cm5200.dts +2 -0
+		mscan@900 {
+			compatible = "mpc5200b-mscan\0mpc5200-mscan";

Use "mpc5200b-mscan", "mpc5200-mscan" instead of the embedded \0.

[snip]

arch/powerpc/boot/dts/cm5200.dts

Quoted 2 lines
arch/powerpc/boot/dts/cm5200.dts +1 -0
 		dma-controller@1200 {
+			device_type = "dma-controller";

As above.

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
#14 lore raw

Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates

In reply to Bartlomiej Sieka
Quoted 8 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates, in particluar one posted by Anatolij Gustschin, which fixes an Oops during boot.

---
Anatolij, would you like to add your S-O-B?

Quoted 288 lines
arch/powerpc/boot/dts/cm5200.dts +38 -1
index 30737ea..8b2e8e4 100644
@@ -159,6 +159,7 @@
 		};
 
 		dma-controller@1200 {
+			device_type = "dma-controller";
 			compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
 			reg = <1200 80>;
 			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -212,13 +213,31 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";
+			compatible = "fsl,mpc5200b-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};
 		};
 
 		i2c@3d40 {
+		#address-cells = <1>;
+		#size-cells = <0>;
 			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
@@ -231,4 +250,22 @@
 			reg = <8000 4000>;
 		};
 	};
+
+	lpb {
+		model = "fsl,lpb";
+		compatible = "fsl,lpb";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 fc000000 2000000>;
+
+		// 16-bit flash device at LocalPlus Bus CS0
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 2000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
 };
arch/powerpc/boot/dts/motionpro.dts +44 -28
index 76951ab..9ca81ff 100644
@@ -127,6 +127,13 @@
 			interrupt-parent = <&mpc5200_pic>;
 		};
 
+		mscan@900 {
+			compatible = "mpc5200b-mscan\0mpc5200-mscan";
+			interrupts = <2 11 0>;
+			interrupt-parent = <&mpc5200_pic>;
+			reg = <900 80>;
+		};
+
 		mscan@980 {
 			compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
 			interrupts = <2 12 0>;
@@ -148,7 +155,6 @@
 			interrupt-parent = <&mpc5200_pic>;
 		};
 
-
 		spi@f00 {
 			compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
 			reg = <f00 20>;
@@ -164,6 +170,7 @@
 		};
 
 		dma-controller@1200 {
+			device_type = "dma-controller";
 			compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
 			reg = <1200 80>;
 			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -209,10 +216,26 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";
+			compatible = "fsl,mpc5200b-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <2>;
+			};
 		};
 
 		ata@3a00 {
@@ -223,11 +246,19 @@
 		};
 
 		i2c@3d40 {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
 			interrupt-parent = <&mpc5200_pic>;
 			fsl5200-clocking;
+
+			rtc@68 {
+				device_type = "rtc";
+				compatible = "dallas,ds1339";
+				reg = <68>;
+			};
 		};
 
 		sram@8000 {
@@ -240,7 +271,8 @@
 		compatible = "fsl,lpb";
 		#address-cells = <2>;
 		#size-cells = <1>;
-		ranges = <1 0 50000000 00010000
+		ranges = <0 0 ff000000 01000000
+			  1 0 50000000 00010000
 			  2 0 50010000 00010000
 			  3 0 50020000 00010000>;
 
@@ -271,31 +303,15 @@
 			compatible = "promess,pro_module_dio";
 			reg = <3 800 2>;
 		};
-	};
 
-	pci@f0000d00 {
-		#interrupt-cells = <1>;
-		#size-cells = <2>;
-		#address-cells = <3>;
-		device_type = "pci";
-		compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
-		reg = <f0000d00 100>;
-		interrupt-map-mask = <f800 0 0 7>;
-		interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
-				 c000 0 0 2 &mpc5200_pic 1 1 3
-				 c000 0 0 3 &mpc5200_pic 1 2 3
-				 c000 0 0 4 &mpc5200_pic 1 3 3
-
-				 c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
-				 c800 0 0 2 &mpc5200_pic 1 2 3
-				 c800 0 0 3 &mpc5200_pic 1 3 3
-				 c800 0 0 4 &mpc5200_pic 0 0 3>;
-		clock-frequency = <0>; // From boot loader
-		interrupts = <2 8 0 2 9 0 2 a 0>;
-		interrupt-parent = <&mpc5200_pic>;
-		bus-range = <0 0>;
-		ranges = <42000000 0 80000000 80000000 0 20000000
-			  02000000 0 a0000000 a0000000 0 10000000
-			  01000000 0 00000000 b0000000 0 01000000>;
+		// 16-bit flash device at LocalPlus Bus CS0
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 01000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
 	};
 };
arch/powerpc/boot/dts/tqm5200.dts +43 -1
index c86464f..bbac984 100644
@@ -83,6 +83,7 @@
 		};
 
 		dma-controller@1200 {
+			device_type = "dma-controller";
 			compatible = "fsl,mpc5200-bestcomm";
 			reg = <1200 80>;
 			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -127,10 +128,26 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";
+			compatible = "fsl,mpc5200b-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};
 		};
 
 		ata@3a00 {
@@ -141,11 +158,19 @@
 		};
 
 		i2c@3d40 {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			compatible = "fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
 			interrupt-parent = <&mpc5200_pic>;
 			fsl5200-clocking;
+
+			 rtc@68 {
+				device_type = "rtc";
+				compatible = "dallas,ds1307";
+				reg = <68>;
+			};
 		};
 
 		sram@8000 {
@@ -154,6 +179,23 @@
 		};
 	};
 
+	lpb {
+		model = "fsl,lpb";
+		compatible = "fsl,lpb";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 fc000000 02000000>;
+
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 02000000>;
+			bank-width = <4>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
+
 	pci@f0000d00 {
 		#interrupt-cells = <1>;
 		#size-cells = <2>;
#15 lore raw

Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates

In reply to Bartlomiej Sieka
Quoted 6 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates, in particluar one posted by Anatolij Gustschin, which fixes an Oops during boot.

Comments below.

Quoted 23 lines

---
Anatolij, would you like to add your S-O-B?

diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts index 30737ea..8b2e8e4 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -159,6 +159,7 @@

                };

                dma-controller@1200 {
 +                       device_type = "dma-controller";
                        compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
 @@ -212,13 +213,31 @@
                ethernet@3000 {
                        device_type = "network";
                        compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
 -                       reg = <3000 800>;
 +                       reg = <3000 400>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <2 5 0>;
Quoted 8 lines
                        interrupt-parent = <&mpc5200_pic>;
 +                       phy-handle = <&phy0>;
 +               };
 +
 +               mdio@3000 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       device_type = "mdio";

Drop device type; it's unneeded and unused.

Quoted 1 line

+ compatible = "fsl,mpc5200b-mdio";

Should technically be "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; (I know the lite5200b.dts doesn't have this either, but I'll write a patch right now to fix it so that it's correct in .25)

I regret introducing "fsl,mpc5200b-*" at all since the 5200b is really just a bug fix of the 5200 except for a very few incompatible device changes. Just the nodes for specific incompatible devices need to claim 5200b-<blah> in their compatible string (without claiming 5200-<blah>). It seems to me that specific silicon revision differences by conventional is too fine grained for the compatible field and if really needed can be discovered from the SVR.

I may even drop it in the .26 series. All device trees in the wild claim compatibility with both so it won't break any existing boards.

heh; I guess that's just a long winded way to say make sure fsl,mpc5200-mdio is in there so it remains possible to drop mpc5200b-mdio in the future.

Quoted 11 lines
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
 +
 +                       phy0:ethernet-phy@0 {
 +                               device_type = "ethernet-phy";
 +                               reg = <0>;
 +                       };
                };

                i2c@3d40 {
Quoted 2 lines

+ #address-cells = <1>;
+ #size-cells = <0>;

inconsistent indentation?

Quoted 34 lines
                        compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
                        reg = <3d40 40>;
                        interrupts = <2 10 0>;
 @@ -231,4 +250,22 @@
                        reg = <8000 4000>;
                };
        };
 +
 +       lpb {
 +               model = "fsl,lpb";
 +               compatible = "fsl,lpb";
 +               #address-cells = <2>;
 +               #size-cells = <1>;
 +               ranges = <0 0 fc000000 2000000>;
 +
 +               // 16-bit flash device at LocalPlus Bus CS0
 +               flash@0,0 {
 +                       compatible = "cfi-flash";
 +                       reg = <0 0 2000000>;
 +                       bank-width = <2>;
 +                       device-width = <2>;
 +                       #size-cells = <1>;
 +                       #address-cells = <1>;
 +               };
 +       };
  };
 diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
 index 76951ab..9ca81ff 100644
 --- a/arch/powerpc/boot/dts/motionpro.dts
 +++ b/arch/powerpc/boot/dts/motionpro.dts
 @@ -127,6 +127,13 @@
                        interrupt-parent = <&mpc5200_pic>;
                };
Quoted 2 lines

+ mscan@900 {
+ compatible = "mpc5200b-mscan\0mpc5200-mscan";

"mpc5200b-mscan", "mpc5200-mscan"; The '\0' is depreciated.

Quoted 32 lines
 +                       interrupts = <2 11 0>;
 +                       interrupt-parent = <&mpc5200_pic>;
 +                       reg = <900 80>;
 +               };
 +
                mscan@980 {
                        compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
                        interrupts = <2 12 0>;
 @@ -148,7 +155,6 @@
                        interrupt-parent = <&mpc5200_pic>;
                };

-

                spi@f00 {
                        compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
                        reg = <f00 20>;
 @@ -164,6 +170,7 @@
                };

                dma-controller@1200 {
 +                       device_type = "dma-controller";
                        compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
 @@ -209,10 +216,26 @@
                ethernet@3000 {
                        device_type = "network";
                        compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
 -                       reg = <3000 800>;
 +                       reg = <3000 400>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <2 5 0>;
Quoted 8 lines
                        interrupt-parent = <&mpc5200_pic>;
 +                       phy-handle = <&phy0>;
 +               };
 +
 +               mdio@3000 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       device_type = "mdio";

Drop device type

Quoted 1 line

+ compatible = "fsl,mpc5200b-mdio";

Same here; should include fsl,mpc5200-mdio

Quoted 102 lines
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
 +
 +                       phy0:ethernet-phy@0 {
 +                               device_type = "ethernet-phy";
 +                               reg = <2>;
 +                       };
                };

                ata@3a00 {
 @@ -223,11 +246,19 @@
                };

                i2c@3d40 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
                        compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
                        reg = <3d40 40>;
                        interrupts = <2 10 0>;
                        interrupt-parent = <&mpc5200_pic>;
                        fsl5200-clocking;
 +
 +                       rtc@68 {
 +                               device_type = "rtc";
 +                               compatible = "dallas,ds1339";
 +                               reg = <68>;
 +                       };
                };

                sram@8000 {
 @@ -240,7 +271,8 @@
                compatible = "fsl,lpb";
                #address-cells = <2>;
                #size-cells = <1>;
 -               ranges = <1 0 50000000 00010000
 +               ranges = <0 0 ff000000 01000000
 +                         1 0 50000000 00010000
                          2 0 50010000 00010000
                          3 0 50020000 00010000>;

@@ -271,31 +303,15 @@

                        compatible = "promess,pro_module_dio";
                        reg = <3 800 2>;
                };

- };

- pci@f0000d00 {

 -               #interrupt-cells = <1>;
 -               #size-cells = <2>;
 -               #address-cells = <3>;
 -               device_type = "pci";
 -               compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
 -               reg = <f0000d00 100>;
 -               interrupt-map-mask = <f800 0 0 7>;
 -               interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
 -                                c000 0 0 2 &mpc5200_pic 1 1 3
 -                                c000 0 0 3 &mpc5200_pic 1 2 3
 -                                c000 0 0 4 &mpc5200_pic 1 3 3
 -
 -                                c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
 -                                c800 0 0 2 &mpc5200_pic 1 2 3
 -                                c800 0 0 3 &mpc5200_pic 1 3 3
 -                                c800 0 0 4 &mpc5200_pic 0 0 3>;
 -               clock-frequency = <0>; // From boot loader
 -               interrupts = <2 8 0 2 9 0 2 a 0>;
 -               interrupt-parent = <&mpc5200_pic>;
 -               bus-range = <0 0>;
 -               ranges = <42000000 0 80000000 80000000 0 20000000
 -                         02000000 0 a0000000 a0000000 0 10000000
 -                         01000000 0 00000000 b0000000 0 01000000>;
 +               // 16-bit flash device at LocalPlus Bus CS0
 +               flash@0,0 {
 +                       compatible = "cfi-flash";
 +                       reg = <0 0 01000000>;
 +                       bank-width = <2>;
 +                       device-width = <2>;
 +                       #size-cells = <1>;
 +                       #address-cells = <1>;
 +               };
        };
  };
 diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
 index c86464f..bbac984 100644
 --- a/arch/powerpc/boot/dts/tqm5200.dts
 +++ b/arch/powerpc/boot/dts/tqm5200.dts
 @@ -83,6 +83,7 @@
                };

                dma-controller@1200 {
 +                       device_type = "dma-controller";
                        compatible = "fsl,mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
 @@ -127,10 +128,26 @@
                ethernet@3000 {
                        device_type = "network";
                        compatible = "fsl,mpc5200-fec";
 -                       reg = <3000 800>;
 +                       reg = <3000 400>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <2 5 0>;
Quoted 8 lines
                        interrupt-parent = <&mpc5200_pic>;
 +                       phy-handle = <&phy0>;
 +               };
 +
 +               mdio@3000 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       device_type = "mdio";

ditto

Quoted 1 line

+ compatible = "fsl,mpc5200b-mdio";

ditto

Quoted 56 lines
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
 +
 +                       phy0:ethernet-phy@0 {
 +                               device_type = "ethernet-phy";
 +                               reg = <0>;
 +                       };
                };

                ata@3a00 {
 @@ -141,11 +158,19 @@
                };

                i2c@3d40 {
 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
                        compatible = "fsl,mpc5200-i2c","fsl-i2c";
                        reg = <3d40 40>;
                        interrupts = <2 10 0>;
                        interrupt-parent = <&mpc5200_pic>;
                        fsl5200-clocking;
 +
 +                        rtc@68 {
 +                               device_type = "rtc";
 +                               compatible = "dallas,ds1307";
 +                               reg = <68>;
 +                       };
                };

                sram@8000 {
 @@ -154,6 +179,23 @@
                };
        };

+ lpb {

 +               model = "fsl,lpb";
 +               compatible = "fsl,lpb";
 +               #address-cells = <2>;
 +               #size-cells = <1>;
 +               ranges = <0 0 fc000000 02000000>;
 +
 +               flash@0,0 {
 +                       compatible = "cfi-flash";
 +                       reg = <0 0 02000000>;
 +                       bank-width = <4>;
 +                       device-width = <2>;
 +                       #size-cells = <1>;
 +                       #address-cells = <1>;
 +               };
 +       };
 +
        pci@f0000d00 {
                #interrupt-cells = <1>;
                #size-cells = <2>;
Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#13 lore raw

Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates

In reply to David Gibson
Quoted 8 lines · David Gibson
Quoted 7 lines · Bartlomiej Sieka
arch/powerpc/boot/dts/cm5200.dts +0 -0
index 30737ea..8b2e8e4 100644
@@ -159,6 +159,7 @@
              };
 
Quoted 5 lines

arch/powerpc/boot/dts/cm5200.dts line 162

Quoted 2 lines
arch/powerpc/boot/dts/cm5200.dts +1 -0
              dma-controller@1200 {
+                     device_type = "dma-controller";

This is not right. If adding device_type here fixes something, then the driver is wrong and should be fixed instead.

I just sent a patch that fixes the driver bug.

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#5 lore raw
In reply to Grant Likely
Quoted 27 lines · Grant Likely
Quoted 26 lines · Bartlomiej Sieka
Quoted 10 lines · Anatolij Gustschin

Hello Wolfgang,

Quoted 2 lines · Wolfgang Grandegger

I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached oops. Are there any known patches fixing the problems?

try the patch below for tqm5200.dts, rebuild dtb and boot again. Not sure if it works for Linux 2.6.25-rc6, but for 2.6.25-rc3 it does.

It helps 2.6.25-rc6 too - thanks Anatolij.

Quoted 11 lines

Anatolij
--

arch/powerpc/boot/dts/tqm5200.dts +0 -0
index c86464f..7c23bb3 100644
@@ -83,6 +83,7 @@
        };
 
Quoted 8 lines
Quoted 4 lines

arch/powerpc/boot/dts/tqm5200.dts line 86

Quoted 2 lines
arch/powerpc/boot/dts/tqm5200.dts +1 -0
        dma-controller@1200 {
+            device_type = "dma-controller";

This actually fixes the Oops.

Hmm, this sounds like a band-aid; the kernel shouldn't oops if this is missing from the device tree. Fail, perhaps, but oops is worrisome. Would someone like to investigate?

results of some further investigation:

the "bestcomm-core" driver defines its of_match table as follows

static struct of_device_id mpc52xx_bcom_of_match[] = {
	{ .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
	{ .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
	{},
};

so while registering the driver the drivers probe function won't be called because of_match_node shows unexpected behavior in the case that device tree node lacks device_type = "dma-controller" definition.

here is the current of_match_node code for quick reference:
drivers/of/base.c:309
const struct of_device_id *of_match_node(const struct of_device_id *matches,
const struct device_node *node)

{
	while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
		int match = 1;
		if (matches->name[0])
			match &= node->name
				&& !strcmp(matches->name, node->name);
		if (matches->type[0])
			match &= node->type
				&& !strcmp(matches->type, node->type);
		if (matches->compatible[0])
			match &= of_device_is_compatible(node,
						matches->compatible);
		if (match)
			return matches;
		matches++;
	}
	return NULL;
}

So, the bestcomm-core driver provided the type field, but the device tree node lacks it. The "if (matches->type[0])" case is true and "node->type && !strcmp(matches->type, node->type)" evaluates to zero, so match flag is set to zero. Now there is still a chance that compatible property will match but even if it is the case, match flag remains zero:
"match &= of_device_is_compatible(node, matches->compatible)" always sets match flag to zero if match was zero previously. of_match_node returns NULL, the bestcomm-core driver probe won't be called and thus the drivers bcom_engine structure won't be allocated. Referencing this structure later causes observed Oops.

Checking bcom_eng pointer for NULL before referencing data pointed by it prevents oopsing, but fec driver still doesn't work (because of the lost bestcomm match and resulted task allocation failure). Actually the compatible property exists and should match and so the fec driver shoud work.

I suggest removing .type = "dma-controller" from the bestcomm driver's mpc52xx_bcom_of_match table to solve the problem.

What do you think?

---

arch/powerpc/sysdev/bestcomm/bestcomm.c +0 -0
index f589999..137d830 100644
@@ -484,8 +484,8 @@ mpc52xx_bcom_remove(struct of_device *op)

}

static struct of_device_id mpc52xx_bcom_of_match[] = {
- { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
- { .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
+ { .compatible = "fsl,mpc5200-bestcomm", },
+ { .compatible = "mpc5200-bestcomm", },

	{},
};
Acked-by
#6 lore raw
Quoted 10 lines · Anatolij Gustschin

Checking bcom_eng pointer for NULL before referencing data pointed by it prevents oopsing, but fec driver still doesn't work (because of the lost bestcomm match and resulted task allocation failure). Actually the compatible property exists and should match and so the fec driver shoud work.

I suggest removing .type = "dma-controller" from the bestcomm driver's mpc52xx_bcom_of_match table to solve the problem.

What do you think?

Yes, I agree. .compatible is completely sufficient to match the device so .type is superfluous in this case. Removing it is appropriate.

I've already sent a patch to fix the null pointer deref.

Paul, here's one more bug fix to pick up for .25. (I think we're done now)

Cheers,
g.

Quoted 19 lines

---
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index f589999..137d830 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -484,8 +484,8 @@ mpc52xx_bcom_remove(struct of_device *op)
}

static struct of_device_id mpc52xx_bcom_of_match[] = {

 -       { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
 -       { .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
 +       { .compatible = "fsl,mpc5200-bestcomm", },
 +       { .compatible = "mpc5200-bestcomm", },
        {},

};

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#29 lore raw
In reply to Wolfgang Grandegger
Quoted 10 lines · Wolfgang Grandegger
Quoted 6 lines · Bartlomiej Sieka
Quoted 2 lines · Grant Likely

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Could we also have similar fixes for cm5200.dts and motionpro.dts picked up? I could provide the patches within a day -- will this be OK?

At that occasion, could you please also add two CAN nodes to tqm5200.dts as shown:

Does this really need to go in for 2.6.25 -- i.e., does it fix a regression or a serious bug (not just a missing feature)? If so, please send it with a proper subject and patch description, with your Signed-off-by.

Paul.

#26 lore raw

Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates

In reply to Bartlomiej Sieka
Quoted 82 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates, in particluar one posted by Anatolij Gustschin, which fixes an Oops during boot.

---
Anatolij, would you like to add your S-O-B?

arch/powerpc/boot/dts/cm5200.dts +38 -1
index 30737ea..8b2e8e4 100644
@@ -159,6 +159,7 @@
 		};
 
 		dma-controller@1200 {
+			device_type = "dma-controller";
 			compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
 			reg = <1200 80>;
 			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
@@ -212,13 +213,31 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";
+			compatible = "fsl,mpc5200b-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};
 		};
 
 		i2c@3d40 {
+		#address-cells = <1>;
+		#size-cells = <0>;
 			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
@@ -231,4 +250,22 @@
 			reg = <8000 4000>;
 		};
 	};
+
+	lpb {
+		model = "fsl,lpb";
+		compatible = "fsl,lpb";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 fc000000 2000000>;
+
+		// 16-bit flash device at LocalPlus Bus CS0
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 2000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
 };
arch/powerpc/boot/dts/motionpro.dts +0 -0
index 76951ab..9ca81ff 100644

arch/powerpc/boot/dts/motionpro.dts line 136

Quoted 10 lines
arch/powerpc/boot/dts/motionpro.dts +7 -0
@@ -127,6 +127,13 @@
 			interrupt-parent = <&mpc5200_pic>;
 		};
 
+		mscan@900 {
+			compatible = "mpc5200b-mscan\0mpc5200-mscan";
+			interrupts = <2 11 0>;
+			interrupt-parent = <&mpc5200_pic>;
+			reg = <900 80>;
+		};
+

If I remember correctly, the motionpro board has only _one_ MSCAN port wired. Therefore please discard the above hunk.

Wolfgang.

#30 lore raw
In reply to Paul Mackerras
Quoted 7 lines · Paul Mackerras
Quoted 6 lines · Wolfgang Grandegger
Quoted 5 lines · Bartlomiej Sieka
Quoted 2 lines · Grant Likely

Paul, my git server is down at the moment. Can you please pick this one up for .25? It is needed to boot the tqm5200 board.

Could we also have similar fixes for cm5200.dts and motionpro.dts picked up? I could provide the patches within a day -- will this be OK?

Quoted 7 lines
Quoted 2 lines

At that occasion, could you please also add two CAN nodes to tqm5200.dts as shown:

Does this really need to go in for 2.6.25 -- i.e., does it fix a regression or a serious bug (not just a missing feature)? If so, please send it with a proper subject and patch description, with your Signed-off-by.

It's not a serious bug fix, of course, but the mentioned DTS file needs fixing anyhow and I asked Bartlomiej to add the two CAN nodes at that occasion to avoid another round of updates.

Thanks,

Wolfgang.

#16 lore raw

PATCH RESEND 1/1 mpc5200: Amalgamated dts fixes and updates

In reply to Grant Likely

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates.

---
Addressed comments from the list; would appreciate picking up as the patch fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous, but not tested due to hardware unavailability).

arch/powerpc/boot/dts/cm5200.dts +36 -1
index 30737ea..2d25ca8 100644
@@ -212,13 +212,30 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};
 		};
 
 		i2c@3d40 {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
@@ -231,4 +248,22 @@
 			reg = <8000 4000>;
 		};
 	};
+
+	lpb {
+		model = "fsl,lpb";
+		compatible = "fsl,lpb";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 fc000000 2000000>;
+
+		// 16-bit flash device at LocalPlus Bus CS0
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 2000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
 };
arch/powerpc/boot/dts/motionpro.dts +35 -28

101 lines not on this page · raw message

arch/powerpc/boot/dts/tqm5200.dts +41 -1

68 lines not on this page · raw message

#17 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

Quoted 9 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates.

---
Addressed comments from the list; would appreciate picking up as the patch fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous, but not tested due to hardware unavailability).

I see one obvious error; but other than that it looks good. Once that is fixed I can recommend for Paul to pick it up for .25. It's just dts changes, so I don't expect it to be a problem.

Cheers,
g.

Quoted 12 lines

diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts index 76951ab..f27256b 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -209,10 +208,25 @@
+ mdio@3000 {

 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
Quoted 4 lines

+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <2>;

This doesn't look right. Reg should match the value in "ethernet-phy@0"

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#18 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

Quoted 35 lines · Grant Likely
Quoted 9 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates.

---
Addressed comments from the list; would appreciate picking up as the patch fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous, but not tested due to hardware unavailability).

I see one obvious error; but other than that it looks good. Once that is fixed I can recommend for Paul to pick it up for .25. It's just dts changes, so I don't expect it to be a problem.

Cheers,
g.

Quoted 12 lines

diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts index 76951ab..f27256b 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -209,10 +208,25 @@
+ mdio@3000 {

 +                       #address-cells = <1>;
 +                       #size-cells = <0>;
 +                       compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
 +                       reg = <3000 400>;       // fec range, since we need to setup fec interrupts
 +                       interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
 +                       interrupt-parent = <&mpc5200_pic>;
Quoted 4 lines

+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <2>;

Quoted 1 line

This doesn't look right. Reg should match the value in "ethernet-phy@0"

And whats about the two CAN nodes for tqm5200.dts? Do we have them already?

Thanks,

Wolfgang.

#21 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

In reply to Bartlomiej Sieka

arch/powerpc/boot/dts/cm5200.dts line 233

Quoted 5 lines · Bartlomiej Sieka
arch/powerpc/boot/dts/cm5200.dts +5 -0
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};

What's the parsing of this pan out to? What does it mean?

Having colons in device names is totally contrary to OF device naming spec. Does the part after the colon have a special meaning to the DTC?

I also was under the impression that device_type was invalid in a DTS file, have we changed our minds again?

Signature · 2 lines
Matt Sealey <[email protected]>
Genesi, Manager, Developer Relations
#20 lore raw

[RESEND2][POWERPC] mpc5200: Amalgamated dts fixes and updates

In reply to Grant Likely

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates.

arch/powerpc/boot/dts/cm5200.dts +36 -1
index 30737ea..2d25ca8 100644
@@ -212,13 +212,30 @@
 		ethernet@3000 {
 			device_type = "network";
 			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
-			reg = <3000 800>;
+			reg = <3000 400>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+			reg = <3000 400>;       // fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;   // these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@0 {
+				device_type = "ethernet-phy";
+				reg = <0>;
+			};
 		};
 
 		i2c@3d40 {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
 			reg = <3d40 40>;
 			interrupts = <2 10 0>;
@@ -231,4 +248,22 @@
 			reg = <8000 4000>;
 		};
 	};
+
+	lpb {
+		model = "fsl,lpb";
+		compatible = "fsl,lpb";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 fc000000 2000000>;
+
+		// 16-bit flash device at LocalPlus Bus CS0
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 2000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
 };
arch/powerpc/boot/dts/motionpro.dts +35 -28

101 lines not on this page · raw message

arch/powerpc/boot/dts/tqm5200.dts +41 -1

68 lines not on this page · raw message

#22 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

In reply to Matt Sealey
Quoted 11 lines · Matt Sealey

arch/powerpc/boot/dts/cm5200.dts line 233

Quoted 5 lines · Bartlomiej Sieka
arch/powerpc/boot/dts/cm5200.dts +5 -0
+
+                     phy0:ethernet-phy@0 {
+                             device_type = "ethernet-phy";@0"
+                             reg = <0>;
+                     };

What's the parsing of this pan out to? What does it mean?

Having colons in device names is totally contrary to OF device naming spec. Does the part after the colon have a special meaning to the DTC?

"phy0:" is a label used by dtc.
"ethernet-phy@0" is the node name.

Quoted 3 lines

I also was under the impression that device_type was invalid in a DTS file, have we changed our minds again?

No, we haven't. It kind of sneaked back in for ethernet phys. I don't know why.

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#19 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

In reply to Wolfgang Grandegger
Quoted 16 lines · Wolfgang Grandegger
Quoted 15 lines · Grant Likely
Quoted 9 lines · Bartlomiej Sieka

The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few other updates.

---
Addressed comments from the list; would appreciate picking up as the patch fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous, but not tested due to hardware unavailability).

I see one obvious error; but other than that it looks good. Once that is fixed I can recommend for Paul to pick it up for .25. It's just dts changes, so I don't expect it to be a problem.

Cheers,

[...]

Quoted 1 line

And whats about the two CAN nodes for tqm5200.dts? Do we have them already?

Hello Wolfgang,

patchwork shows your updates as "Awaiting Upstream"
(http://patchwork.ozlabs.org/linuxppc/patch?q=Grandegger&id=17444), so I haven't included them in my patch. I suppose you should follow-up with Grant/Paulus on the status?

Regards,
Bartlomiej

#23 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

In reply to Grant Likely
Quoted 8 lines · Grant Likely
Quoted 7 lines · Matt Sealey
Quoted 5 lines · Bartlomiej Sieka
arch/powerpc/boot/dts/cm5200.dts +5 -0
+
+                     phy0:ethernet-phy@0 {
+                             device_type = "ethernet-phy";@0"
+                             reg = <0>;
+                     };
Quoted 7 lines
Quoted 4 lines

What's the parsing of this pan out to? What does it mean?

Having colons in device names is totally contrary to OF device naming spec. Does the part after the colon have a special meaning to the DTC?

"phy0:" is a label used by dtc.
"ethernet-phy@0" is the node name.

I would suggest a space after the colon though, to make this clearer. That's the style I've been using in all my dts files.

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
#24 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

Quoted 11 lines · David Gibson
Quoted 10 lines · Grant Likely
Quoted 9 lines · Matt Sealey

arch/powerpc/boot/dts/cm5200.dts line 233

Quoted 5 lines · Bartlomiej Sieka
arch/powerpc/boot/dts/cm5200.dts +5 -0
+
+                     phy0:ethernet-phy@0 {
+                             device_type = "ethernet-phy";@0"
+                             reg = <0>;
+                     };

What's the parsing of this pan out to? What does it mean?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Having colons in device names is totally contrary to OF device naming spec. Does the part after the colon have a special meaning to the DTC?

"phy0:" is a label used by dtc.
"ethernet-phy@0" is the node name.

I would suggest a space after the colon though, to make this clearer. That's the style I've been using in all my dts files.

I would suggest taking a hint from C structures...

ethernet-phy@0 {
	name = "ethernet-phy";
	reg = <0>;
	foo = bar;
} phy0;

I mean, this is really intuitive, we all do this every day...

Signature · 2 lines
Matt Sealey <[email protected]>
Genesi, Manager, Developer Relations
#25 lore raw

Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates

Quoted 21 lines · Matt Sealey
Quoted 9 lines · David Gibson
Quoted 8 lines · Grant Likely
Quoted 7 lines · Matt Sealey
Quoted 5 lines · Bartlomiej Sieka
arch/powerpc/boot/dts/cm5200.dts +5 -0
+
+                     phy0:ethernet-phy@0 {
+                             device_type = "ethernet-phy";@0"
+                             reg = <0>;
+                     };
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

What's the parsing of this pan out to? What does it mean?

Having colons in device names is totally contrary to OF device naming spec. Does the part after the colon have a special meaning to the DTC?

"phy0:" is a label used by dtc.
"ethernet-phy@0" is the node name.

I would suggest a space after the colon though, to make this clearer. That's the style I've been using in all my dts files.

I would suggest taking a hint from C structures...

Quoted 7 lines
ethernet-phy@0 {
	name = "ethernet-phy";
	reg = <0>;
	foo = bar;
} phy0;

I mean, this is really intuitive, we all do this every day...

That's a terrible analogy though. The OF name is in no way like a structure's type, which is what would go there. Plus it separates the label from the top of the node which will make it harder to read.

The label syntax is already based on C labels, and can be used more places than just nodes. Putting a space should make it rather clearer, and is also closer to normal C style (how many people would write

	out:return(err);
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