* TQM8349 and ARCH = powerpc @ 2008-09-09 14:25 Oliver Rutsch 2008-09-09 16:22 ` Kim Phillips 2008-09-09 18:31 ` Wolfgang Denk 0 siblings, 2 replies; 8+ messages in thread From: Oliver Rutsch @ 2008-09-09 14:25 UTC (permalink / raw) To: Linuxppc-dev Hi, currently I'm evaluating a TQM8349 (MPC8349E-based) module on a STK85xx. I wonder if anybody has already managed to get this module running under ARCH=powerpc. As I did not found anything on the net I tried the following: U-Boot (1.3.4): Appended the file include/configs/TQM834x.h to support fdt: #define CONFIG_OF_LIBFDT 1 #define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_OF_STDOUT_VIA_ALIAS 1 Appended the file board/tqc/tqm834x/tqm834x.c: #if defined(CONFIG_OF_BOARD_SETUP) void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); #ifdef CONFIG_PCI ft_pci_setup(blob, bd); #endif } U-Boot compiled fine and it looks good after flashing. In U-Boot everything seems to work. Kernel (Linux-2.6.27-rc5): I took arch/powerpc/boot/dts/mpc8349emitx.dts as a template for a tqm8349.dts and stripped the IDE interface from it. So for me the dts does not look board specific anymore and the network/console should work. I compiled a dtb with: dtc -b 0 -S 0x3000 -R 4 -I dts -O dtb -f arch/powerpc/boot/dts/tqm8349.dts > tqm8349.dtb Then I build the kernel with make mpc83xx_defconfig make menuconfig (I made some minor modifications) make uImage Unfortunately the kernel stops booting after decompressing. I tried a lot of things, but without any success. So any help to get this running is greatly appreciated. Below there is the printout of my U-Boot session. Thanks in advance and bye. => run nfsargs addip addtty => print bootargs bootargs=root=/dev/nfs rw nfsroot=172.20.3.118:/home/rutsch/eldk4/ppc_6xx ip=172.20.3.250:172.20.3.118:192.168.1.1:255.255.192.0:tqm83xx:eth0:off panic=1 console=ttyS0,115200 => print net_nfs net_nfs=tftp 200000 ${bootfile};tftp 400000 ${dtbfile};run nfsargs addip addtty;bootm 200000 - 400000 => run net_nfs Speed: 1000, full duplex Using TSEC0 device TFTP from server 172.20.3.118; our IP address is 172.20.3.250 Filename 'uImage_tqm8349'. Load address: 0x200000 Loading: ################################################################# ############################################################ done Bytes transferred = 1822793 (1bd049 hex) Speed: 1000, full duplex Using TSEC0 device TFTP from server 172.20.3.118; our IP address is 172.20.3.250 Filename 'tqm8349.dtb'. Load address: 0x400000 Loading: # done Bytes transferred = 12288 (3000 hex) ## Booting kernel from Legacy Image at 00200000 ... Image Name: Linux-2.6.27-rc5-01142-gc66bf97 Created: 2008-09-09 13:42:42 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1822729 Bytes = 1.7 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 00400000 Booting using the fdt blob at 0x400000 Uncompressing Kernel Image ... OK -- Dipl. Ing. Oliver Rutsch EMail: orutsch@sympatec.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-09 14:25 TQM8349 and ARCH = powerpc Oliver Rutsch @ 2008-09-09 16:22 ` Kim Phillips 2008-09-10 6:06 ` Oliver Rutsch 2008-09-10 14:12 ` Oliver Rutsch 2008-09-09 18:31 ` Wolfgang Denk 1 sibling, 2 replies; 8+ messages in thread From: Kim Phillips @ 2008-09-09 16:22 UTC (permalink / raw) To: Oliver Rutsch; +Cc: Linuxppc-dev On Tue, 09 Sep 2008 16:25:39 +0200 Oliver Rutsch <orutsch@sympatec.com> wrote: > U-Boot (1.3.4): > Appended the file include/configs/TQM834x.h to support fdt: > > #define CONFIG_OF_LIBFDT 1 > #define CONFIG_OF_BOARD_SETUP 1 > #define CONFIG_OF_STDOUT_VIA_ALIAS 1 > > Appended the file board/tqc/tqm834x/tqm834x.c: > #if defined(CONFIG_OF_BOARD_SETUP) > void ft_board_setup(void *blob, bd_t *bd) > { > ft_cpu_setup(blob, bd); > #ifdef CONFIG_PCI > ft_pci_setup(blob, bd); > #endif > } > > U-Boot compiled fine and it looks good after flashing. In U-Boot > everything seems to work. > > Kernel (Linux-2.6.27-rc5): > I took arch/powerpc/boot/dts/mpc8349emitx.dts as a template > for a tqm8349.dts and stripped the IDE interface from it. > So for me the dts does not look board specific anymore and > the network/console should work. u-boot assigns the IMMR to 0xff400000 in TQM834x.h, whereas the device tree you picked has it at 0xe0000000 (it's defined in the soc node). Don't forget to match up the PCI addresses too. patches welcome, of course (we don't have tqm boards). Kim ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-09 16:22 ` Kim Phillips @ 2008-09-10 6:06 ` Oliver Rutsch 2008-09-10 14:12 ` Oliver Rutsch 1 sibling, 0 replies; 8+ messages in thread From: Oliver Rutsch @ 2008-09-10 6:06 UTC (permalink / raw) To: Linuxppc-dev Hi Kim, > > u-boot assigns the IMMR to 0xff400000 in TQM834x.h, whereas the device > tree you picked has it at 0xe0000000 (it's defined in the soc node). > Don't forget to match up the PCI addresses too. patches welcome, of > course (we don't have tqm boards). > Thanks for this important information! I'll do my best to get this kind of hardware running. Just copying the dts was a too naive approach ;-) Maybe I ask TQ if they want to contribute something. It would be a pity if this module line would not be supported anymore. Thanks and bye, -- Dipl. Ing. Oliver Rutsch EMail: orutsch@sympatec.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-09 16:22 ` Kim Phillips 2008-09-10 6:06 ` Oliver Rutsch @ 2008-09-10 14:12 ` Oliver Rutsch 2008-09-10 14:26 ` Kim Phillips 2008-09-12 0:36 ` David Gibson 1 sibling, 2 replies; 8+ messages in thread From: Oliver Rutsch @ 2008-09-10 14:12 UTC (permalink / raw) To: Linuxppc-dev Hi again, > > u-boot assigns the IMMR to 0xff400000 in TQM834x.h, whereas the device > tree you picked has it at 0xe0000000 (it's defined in the soc node). > Don't forget to match up the PCI addresses too. patches welcome, of > course (we don't have tqm boards). > So I modified the dts to match the IMMRMBAR and the pci section at 0xff400000. In U-Boot I disabled the PCI_CONFIG because I don't need the PCI bus. But the result is always the same. It looks like the kernel stops booting at an earlier stage. I hope it's OK to post my current tqm8349.dts here: Any suggestions are welcome. Thanks and bye, /dts-v1/; / { model = "tqc,tqm834x"; compatible = "tqc,tqm834x"; #address-cells = <1>; #size-cells = <1>; aliases { ethernet0 = &enet0; ethernet1 = &enet1; serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; /*pci1 = &pci1;*/ }; cpus { #address-cells = <1>; #size-cells = <0>; PowerPC,8349@0 { device_type = "cpu"; reg = <0x0>; d-cache-line-size = <32>; i-cache-line-size = <32>; d-cache-size = <32768>; i-cache-size = <32768>; timebase-frequency = <0>; // from bootloader bus-frequency = <0>; // from bootloader clock-frequency = <0>; // from bootloader }; }; memory { device_type = "memory"; reg = <0x00000000 0x10000000>; }; soc8349@ff40000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; compatible = "simple-bus"; ranges = <0x0 0xff400000 0x00100000>; reg = <0xff400000 0x00000200>; bus-frequency = <0>; // from bootloader wdt@200 { device_type = "watchdog"; compatible = "mpc83xx_wdt"; reg = <0x200 0x100>; }; i2c@3000 { #address-cells = <1>; #size-cells = <0>; cell-index = <0>; compatible = "fsl-i2c"; reg = <0x3000 0x100>; interrupts = <14 0x8>; interrupt-parent = <&ipic>; dfsrr; }; i2c@3100 { #address-cells = <1>; #size-cells = <0>; cell-index = <1>; compatible = "fsl-i2c"; reg = <0x3100 0x100>; interrupts = <15 0x8>; interrupt-parent = <&ipic>; dfsrr; }; spi@7000 { cell-index = <0>; compatible = "fsl,spi"; reg = <0x7000 0x1000>; interrupts = <16 0x8>; interrupt-parent = <&ipic>; mode = "cpu"; }; dma@82a8 { #address-cells = <1>; #size-cells = <1>; compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; reg = <0x82a8 4>; ranges = <0 0x8100 0x1a8>; interrupt-parent = <&ipic>; interrupts = <71 8>; cell-index = <0>; dma-channel@0 { compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; reg = <0 0x80>; interrupt-parent = <&ipic>; interrupts = <71 8>; }; dma-channel@80 { compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; reg = <0x80 0x80>; interrupt-parent = <&ipic>; interrupts = <71 8>; }; dma-channel@100 { compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; reg = <0x100 0x80>; interrupt-parent = <&ipic>; interrupts = <71 8>; }; dma-channel@180 { compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; reg = <0x180 0x28>; interrupt-parent = <&ipic>; interrupts = <71 8>; }; }; usb@22000 { compatible = "fsl-usb2-mph"; reg = <0x22000 0x1000>; #address-cells = <1>; #size-cells = <0>; interrupt-parent = <&ipic>; interrupts = <39 0x8>; phy_type = "ulpi"; port1; }; usb@23000 { compatible = "fsl-usb2-dr"; reg = <0x23000 0x1000>; #address-cells = <1>; #size-cells = <0>; interrupt-parent = <&ipic>; interrupts = <38 0x8>; dr_mode = "peripheral"; phy_type = "ulpi"; }; mdio@24520 { #address-cells = <1>; #size-cells = <0>; compatible = "fsl,gianfar-mdio"; reg = <0x24520 0x20>; phy0: ethernet-phy@0 { interrupt-parent = <&ipic>; interrupts = <17 0x8>; reg = <0x0>; device_type = "ethernet-phy"; }; phy1: ethernet-phy@1 { interrupt-parent = <&ipic>; interrupts = <18 0x8>; reg = <0x1>; device_type = "ethernet-phy"; }; }; enet0: ethernet@24000 { cell-index = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <0x24000 0x1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <32 0x8 33 0x8 34 0x8>; interrupt-parent = <&ipic>; phy-handle = <&phy0>; linux,network-index = <0>; }; enet1: ethernet@25000 { cell-index = <1>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <0x25000 0x1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <35 0x8 36 0x8 37 0x8>; interrupt-parent = <&ipic>; phy-handle = <&phy1>; linux,network-index = <1>; }; serial0: serial@4500 { cell-index = <0>; device_type = "serial"; compatible = "ns16550"; reg = <0x4500 0x100>; clock-frequency = <0>; // from bootloader interrupts = <9 0x8>; interrupt-parent = <&ipic>; }; serial1: serial@4600 { cell-index = <1>; device_type = "serial"; compatible = "ns16550"; reg = <0x4600 0x100>; clock-frequency = <0>; // from bootloader interrupts = <10 0x8>; interrupt-parent = <&ipic>; }; crypto@30000 { compatible = "fsl,sec2.0"; reg = <0x30000 0x10000>; interrupts = <11 0x8>; interrupt-parent = <&ipic>; fsl,num-channels = <4>; fsl,channel-fifo-len = <24>; fsl,exec-units-mask = <0x7e>; fsl,descriptor-types-mask = <0x01010ebf>; }; ipic: pic@700 { interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; reg = <0x700 0x100>; device_type = "ipic"; }; }; pci0: pci@ff408500 { cell-index = <1>; interrupt-map-mask = <0xf800 0x0 0x0 0x7>; interrupt-map = < /* IDSEL 0x10 - SATA */ 0x8000 0x0 0x0 0x1 &ipic 22 0x8 /* SATA_INTA */ >; interrupt-parent = <&ipic>; interrupts = <66 0x8>; bus-range = <0x0 0x0>; ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x01000000>; clock-frequency = <66666666>; #interrupt-cells = <1>; #size-cells = <2>; #address-cells = <3>; reg = <0xff408500 0x100>; compatible = "fsl,mpc8349-pci"; device_type = "pci"; }; localbus@ff405000 { #address-cells = <2>; #size-cells = <1>; compatible = "fsl,mpc8349e-localbus", "fsl,pq2pro-localbus"; reg = <0xff405000 0xd8>; ranges = <0x3 0x0 0xf0000000 0x210>; }; }; -- Dipl. Ing. Oliver Rutsch EMail: orutsch@sympatec.com · Tel.:+49 5323 717514 Sympatec GmbH · Am Pulverhaus 1 · D-38678 Clausthal-Zellerfeld · Germany Geschaeftsfuehrer: Dr.-Ing. E.h. Stephan Roethele · Handelsregister: Amtsgericht Braunschweig, HRB 110809 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-10 14:12 ` Oliver Rutsch @ 2008-09-10 14:26 ` Kim Phillips 2008-09-12 8:11 ` Oliver Rutsch 2008-09-12 0:36 ` David Gibson 1 sibling, 1 reply; 8+ messages in thread From: Kim Phillips @ 2008-09-10 14:26 UTC (permalink / raw) To: Oliver Rutsch; +Cc: Linuxppc-dev On Wed, 10 Sep 2008 16:12:22 +0200 Oliver Rutsch <orutsch@sympatec.com> wrote: > model = "tqc,tqm834x"; > compatible = "tqc,tqm834x"; you need a arch/powerpc/platforms/83xx/tqm834x.c file that matches this. Kim ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-10 14:26 ` Kim Phillips @ 2008-09-12 8:11 ` Oliver Rutsch 0 siblings, 0 replies; 8+ messages in thread From: Oliver Rutsch @ 2008-09-12 8:11 UTC (permalink / raw) Cc: Linuxppc-dev Hi, > On Wed, 10 Sep 2008 16:12:22 +0200 > Oliver Rutsch <orutsch@sympatec.com> wrote: > >> model = "tqc,tqm834x"; >> compatible = "tqc,tqm834x"; > > you need a arch/powerpc/platforms/83xx/tqm834x.c file that matches this. > > Kim O.K. I read "booting-without-of.txt" the third (or fourth?) time and so I made the entries for this board in the KConfig and the Makefile and I created tqm834x.c, which is essentially a copy of mpc834x_itx.c. As I did not found any board specific details, the most significant change is the of_device_id: static struct of_device_id tqm834x_ids[] = { { .type = "soc", }, { .compatible = "soc", }, { .compatible = "simple-bus", }, {}, }; I hope that this is correct. And so I selected the board and the kernel just compiled fine. But the result was always the same. So I warmed up my BDI2000 and debugged the kernel. I can stop the kernel in the "start_here" function but it seems to run wild after line 1012. As the kernel dies at a very early stage, I don't think that it is device tree related. Here's my gdb session: ----------------------------------------------------- start_here () at arch/powerpc/kernel/head_32.S:1011 1011 lis r1,init_thread_union@ha (gdb) start_here () at arch/powerpc/kernel/head_32.S:1012 1012 addi r1,r1,init_thread_union@l (gdb) Program received signal SIGSTOP, Stopped (signal). 0x000006fc in ?? () (gdb) bt #0 0x000006fc in ?? () #1 0x000003e0 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) si Program received signal SIGSTOP, Stopped (signal). 0x000012fc in ?? () (gdb) Program received signal SIGSTOP, Stopped (signal). 0x000006fc in ?? () ----------------------------------------------------- Then it toggles between 0x6fc and 0x12fc. These addresses look totally wrong. As always, all ideas are welcome. Thanks for all suggestions so far! Bye, -- Dipl. Ing. Oliver Rutsch EMail: orutsch@sympatec.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-10 14:12 ` Oliver Rutsch 2008-09-10 14:26 ` Kim Phillips @ 2008-09-12 0:36 ` David Gibson 1 sibling, 0 replies; 8+ messages in thread From: David Gibson @ 2008-09-12 0:36 UTC (permalink / raw) To: Oliver Rutsch; +Cc: Linuxppc-dev On Wed, Sep 10, 2008 at 04:12:22PM +0200, Oliver Rutsch wrote: > Hi again, > >> >> u-boot assigns the IMMR to 0xff400000 in TQM834x.h, whereas the device >> tree you picked has it at 0xe0000000 (it's defined in the soc node). >> Don't forget to match up the PCI addresses too. patches welcome, of >> course (we don't have tqm boards). >> > So I modified the dts to match the IMMRMBAR and the pci section at > 0xff400000. In U-Boot I disabled the PCI_CONFIG because I don't need the > PCI bus. But the result is always the same. It looks like the kernel > stops booting at an earlier stage. > > I hope it's OK to post my current tqm8349.dts here: > Any suggestions are welcome. > > Thanks and bye, > > /dts-v1/; [snip] > wdt@200 { > device_type = "watchdog"; Drop this device_type. > compatible = "mpc83xx_wdt"; > reg = <0x200 0x100>; > }; [snip] > usb@22000 { > compatible = "fsl-usb2-mph"; > reg = <0x22000 0x1000>; > #address-cells = <1>; > #size-cells = <0>; > interrupt-parent = <&ipic>; > interrupts = <39 0x8>; > phy_type = "ulpi"; > port1; Yuck.. is this 'port1' thing in the binding? It's a terrible property name... > }; [snip] > enet0: ethernet@24000 { > cell-index = <0>; > device_type = "network"; > model = "TSEC"; > compatible = "gianfar"; Didn't someone finally get around to rewriting the gianfar binding with a better compatible string? > reg = <0x24000 0x1000>; > local-mac-address = [ 00 00 00 00 00 00 ]; > interrupts = <32 0x8 33 0x8 34 0x8>; > interrupt-parent = <&ipic>; > phy-handle = <&phy0>; > linux,network-index = <0>; linux,network-index shouldn't be necessary any more. > }; [snip] > pci0: pci@ff408500 { > cell-index = <1>; I don't think cell-index belongs here. > interrupt-map-mask = <0xf800 0x0 0x0 0x7>; > interrupt-map = < > /* IDSEL 0x10 - SATA */ > 0x8000 0x0 0x0 0x1 &ipic 22 0x8 /* SATA_INTA */ > >; > interrupt-parent = <&ipic>; > interrupts = <66 0x8>; > bus-range = <0x0 0x0>; > ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 > 0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 > 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x01000000>; > clock-frequency = <66666666>; > #interrupt-cells = <1>; > #size-cells = <2>; > #address-cells = <3>; > reg = <0xff408500 0x100>; > compatible = "fsl,mpc8349-pci"; > device_type = "pci"; > }; > > localbus@ff405000 { > #address-cells = <2>; > #size-cells = <1>; > compatible = "fsl,mpc8349e-localbus", > "fsl,pq2pro-localbus"; > reg = <0xff405000 0xd8>; > ranges = <0x3 0x0 0xf0000000 0x210>; > > > }; > }; > > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TQM8349 and ARCH = powerpc 2008-09-09 14:25 TQM8349 and ARCH = powerpc Oliver Rutsch 2008-09-09 16:22 ` Kim Phillips @ 2008-09-09 18:31 ` Wolfgang Denk 1 sibling, 0 replies; 8+ messages in thread From: Wolfgang Denk @ 2008-09-09 18:31 UTC (permalink / raw) To: Oliver Rutsch; +Cc: Linuxppc-dev, Michel Pecchia Dear Oliver, In message <48C68763.6030606@sympatec.com> you wrote: > > currently I'm evaluating a TQM8349 (MPC8349E-based) module on a STK85xx. > I wonder if anybody has already managed to get this module running under > ARCH=powerpc. No such attempts were made by us. So far, TQ did not voice any inte- rest in keeping Linux support for this board alive, even though they are aware that it died completely with the removal of the arch/ppc tree. Nor did anybody else. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Quantum particles: The dreams that stuff is made of. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-09-12 8:11 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-09 14:25 TQM8349 and ARCH = powerpc Oliver Rutsch 2008-09-09 16:22 ` Kim Phillips 2008-09-10 6:06 ` Oliver Rutsch 2008-09-10 14:12 ` Oliver Rutsch 2008-09-10 14:26 ` Kim Phillips 2008-09-12 8:11 ` Oliver Rutsch 2008-09-12 0:36 ` David Gibson 2008-09-09 18:31 ` Wolfgang Denk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).