* Help with device tree binding for SMC serial @ 2008-01-09 19:18 Rune Torgersen 2008-01-09 19:45 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-09 19:18 UTC (permalink / raw) To: linuxppc-dev Hi We're trying to get a SMC serial port on a8280 to work. I cannot find any ecxamples on the binding, so we've tried to make one. is this anywhere close to workable? serial@11a80 { device_type =3D "serial"; compatible =3D "fsl,mpc8280-smc-uart", "fsl,cpm2-smc-uart"; reg =3D <11a80 10 87fc 2>; interrupts =3D <4 8>; interrupt-parent =3D <&PIC>; fsl,cpm-brg =3D <7>; fsl,cpm-command =3D <01000000>; }; ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-09 19:18 Help with device tree binding for SMC serial Rune Torgersen @ 2008-01-09 19:45 ` Scott Wood 2008-01-09 22:22 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Scott Wood @ 2008-01-09 19:45 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev Rune Torgersen wrote: > Hi > > We're trying to get a SMC serial port on a8280 to work. > I cannot find any ecxamples on the binding, so we've tried to make one. > > is this anywhere close to workable? > > serial@11a80 { > device_type = "serial"; > compatible = "fsl,mpc8280-smc-uart", > "fsl,cpm2-smc-uart"; > reg = <11a80 10 87fc 2>; The current binding has the actual parameter ram block as the second reg property, not the two-byte pointer. If your firmware doesn't initialize the pointer, you'll have to do it in platform code. > interrupts = <4 8>; > interrupt-parent = <&PIC>; > fsl,cpm-brg = <7>; > fsl,cpm-command = <01000000>; > }; cpm-command should be <1d000000> for SMC1. Otherwise, it looks OK. -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-09 19:45 ` Scott Wood @ 2008-01-09 22:22 ` Rune Torgersen 2008-01-09 22:29 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-09 22:22 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Scott Wood=20 > Sent: Wednesday, January 09, 2008 1:46 PM > > We're trying to get a SMC serial port on a8280 to work. > > I cannot find any ecxamples on the binding, so we've tried=20 > to make one. > >=20 > > is this anywhere close to workable? > >=20 > > serial@11a80 { > > device_type =3D "serial"; > > compatible =3D "fsl,mpc8280-smc-uart", > > "fsl,cpm2-smc-uart"; > > reg =3D <11a80 10 87fc 2>; >=20 > The current binding has the actual parameter ram block as the=20 > second reg=20 > property, not the two-byte pointer. If your firmware doesn't=20 > initialize=20 > the pointer, you'll have to do it in platform code. >=20 > > interrupts =3D <4 8>; > > interrupt-parent =3D <&PIC>; > > fsl,cpm-brg =3D <7>; > > fsl,cpm-command =3D <01000000>; > > }; >=20 > cpm-command should be <1d000000> for SMC1. >=20 > Otherwise, it looks OK. Ok we're now using serial@11a80 { device_type =3D "serial"; compatible =3D "fsl,mpc8280-smc-uart", "fsl,cpm2-smc-uart"; reg =3D <11a80 10 0 40>; // <base_address length parameter_ram_address length> interrupts =3D <4 8>; // Interrupt from table 4.3 of mpc8280rm, interrupt is level or edge interrupt-parent =3D <&PIC>; fsl,cpm-brg =3D <7>; fsl,cpm-command =3D <1d000000>; // Page and Sub-block code of the CPCR }; Right now we're trying to just get a kernel to give us some serial output, so we can continue the porting job. We're unsig a cuImage (using the pq2fads code right now). Now our problem is that the serial port is spitting out 0x0a's as fast as it can. Seems to be repeadtin the linefeed at the end of "Uncompressing Kernel Image ... OK" ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-09 22:22 ` Rune Torgersen @ 2008-01-09 22:29 ` Scott Wood 2008-01-09 22:37 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Scott Wood @ 2008-01-09 22:29 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev Rune Torgersen wrote: > Ok we're now using > serial@11a80 { > device_type = "serial"; > compatible = "fsl,mpc8280-smc-uart", > "fsl,cpm2-smc-uart"; > reg = <11a80 10 0 40>; // <base_address length > parameter_ram_address length> > interrupts = <4 8>; // Interrupt from table 4.3 > of mpc8280rm, interrupt is level or edge > interrupt-parent = <&PIC>; > fsl,cpm-brg = <7>; > fsl,cpm-command = <1d000000>; // Page and Sub-block code > of the CPCR > }; Looks good. > Right now we're trying to just get a kernel to give us some serial > output, so we can continue the porting job. > We're unsig a cuImage (using the pq2fads code right now). > > Now our problem is that the serial port is spitting out 0x0a's as fast > as it can. Don't forget to exclude the SMC parameter RAM from the muram data area in /soc/cpm/muram/data/reg. If you have an older device tree binding that has no /soc/cpm/muram node, but instead has two resources in /soc/cpm/reg, you need to move to head-of-tree to get this to work. -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-09 22:29 ` Scott Wood @ 2008-01-09 22:37 ` Rune Torgersen 2008-01-09 22:40 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-09 22:37 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Scott Wood > Don't forget to exclude the SMC parameter RAM from the muram=20 > data area=20 > in /soc/cpm/muram/data/reg. If you have an older device tree binding=20 > that has no /soc/cpm/muram node, but instead has two resources in=20 > /soc/cpm/reg, you need to move to head-of-tree to get this to work. Did that, now we get e checkstop resert. Time to hook up the BDI-2000.... Is there a way to have the bootwrapper use the u-boot serial for a while (like a early srial port) for debugging? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-09 22:37 ` Rune Torgersen @ 2008-01-09 22:40 ` Scott Wood 2008-01-09 23:07 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Scott Wood @ 2008-01-09 22:40 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev Rune Torgersen wrote: >> From: Scott Wood >> Don't forget to exclude the SMC parameter RAM from the muram >> data area >> in /soc/cpm/muram/data/reg. If you have an older device tree binding >> that has no /soc/cpm/muram node, but instead has two resources in >> /soc/cpm/reg, you need to move to head-of-tree to get this to work. > > Did that, now we get e checkstop resert. Time to hook up the > BDI-2000.... > Is there a way to have the bootwrapper use the u-boot serial for a while > (like a early srial port) for debugging? If you mean calling into u-boot for a console, no, there's no code for that. What do your cpm and muram nodes look like? -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-09 22:40 ` Scott Wood @ 2008-01-09 23:07 ` Rune Torgersen 2008-01-10 17:53 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-09 23:07 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Scott Wood [mailto:scottwood@freescale.com]=20 > Rune Torgersen wrote: > >> From: Scott Wood > >> Don't forget to exclude the SMC parameter RAM from the muram=20 > >> data area=20 > >> in /soc/cpm/muram/data/reg. If you have an older device=20 > tree binding=20 > >> that has no /soc/cpm/muram node, but instead has two resources in=20 > >> /soc/cpm/reg, you need to move to head-of-tree to get this to work. > >=20 > > Did that, now we get e checkstop resert. Time to hook up the > > BDI-2000.... > > Is there a way to have the bootwrapper use the u-boot=20 > serial for a while > > (like a early srial port) for debugging? >=20 > If you mean calling into u-boot for a console, no, there's no=20 > code for that. >=20 > What do your cpm and muram nodes look like? cpm@119c0 { #address-cells =3D <1>; #size-cells =3D <1>; #interrupt-cells =3D <2>; compatible =3D "fsl,mpc8280-cpm", "fsl,cpm2"; reg =3D <119c0 30>; ranges; muram@0 { #address-cells =3D <1>; #size-cells =3D <1>; ranges =3D <0 0 10000>; data@0 { compatible =3D "fsl,cpm-muram-data"; reg =3D <100 1f00 9800 800>; }; }; brg@119f0 { compatible =3D "fsl,mpc8280-brg", "fsl,cpm2-brg", "fsl,cpm-brg"; reg =3D <119f0 10 115f0 10>; }; serial@11a80 { device_type =3D "serial"; compatible =3D "fsl,mpc8280-smc-uart", "fsl,cpm2-smc-uart"; reg =3D <11a80 10 0 40>; // <base_address length parameter_ram_address length> interrupts =3D <4 8>; // Interrupt from table 4.3 of mpc8280rm, interrupt is level or edge interrupt-parent =3D <&PIC>; fsl,cpm-brg =3D <7>; fsl,cpm-command =3D <1d000000>; // Page and Sub-block code of the CPCR }; }; and chosen node (not sure if needed) chosen { linux,stdout-path =3D "/soc/cpm/serial@11a80"; bootargs =3D "console=3DttyS0,115200"; }; ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-09 23:07 ` Rune Torgersen @ 2008-01-10 17:53 ` Scott Wood 2008-01-10 19:10 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Scott Wood @ 2008-01-10 17:53 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev On Wed, Jan 09, 2008 at 05:07:23PM -0600, Rune Torgersen wrote: > > From: Scott Wood [mailto:scottwood@freescale.com] > > Rune Torgersen wrote: > > > Did that, now we get e checkstop resert. Time to hook up the > > > BDI-2000.... Is there a way to have the bootwrapper use the u-boot > > > serial for a while (like a early srial port) for debugging? > > > > If you mean calling into u-boot for a console, no, there's no > > code for that. > > > > What do your cpm and muram nodes look like? [snip tree] The tree looks OK. The checkstop may be from erratum SIU18; I had this issue on the ep8248e board. Try clearing BCR[PLDP]. -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-10 17:53 ` Scott Wood @ 2008-01-10 19:10 ` Rune Torgersen 2008-01-10 19:19 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-10 19:10 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Scott Wood >=20 > The tree looks OK. The checkstop may be from erratum SIU18; > I had this issue on the ep8248e board. >=20 > Try clearing BCR[PLDP]. Not sure what was wrong. We took a step back, and redid some stuff, and now we have serial output from the boot-wrapper. THe checkstop came from the wrapper grying to access the bcsr and doing the chip select fixup. We don';t have a bcsr on our board, and the cs layout is different. Now our problem is that the kernel doesn't want to output anything to hte serial port. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-10 19:10 ` Rune Torgersen @ 2008-01-10 19:19 ` Scott Wood 2008-01-11 0:07 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Scott Wood @ 2008-01-10 19:19 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev Rune Torgersen wrote: > Not sure what was wrong. We took a step back, and redid some stuff, and > now we have serial output from the boot-wrapper. > THe checkstop came from the wrapper grying to access the bcsr and doing > the chip select fixup. We don';t have a bcsr on our board, and the cs > layout is different. There's no bcsr access in the upstream bootwrapper (the mention of bcsr in cuboot-pq2.c is just one reason why some boards require us to do the CS programming), and the CS programming is chip-level, not board-level (it just requires that the device tree have a correct localbus node for the board). -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-10 19:19 ` Scott Wood @ 2008-01-11 0:07 ` Rune Torgersen 2008-01-11 14:13 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-11 0:07 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Scott Wood [ > Rune Torgersen wrote: > > Not sure what was wrong. We took a step back, and redid=20 > some stuff, and > > now we have serial output from the boot-wrapper. > > THe checkstop came from the wrapper grying to access the=20 > bcsr and doing > > the chip select fixup. We don';t have a bcsr on our board,=20 > and the cs > > layout is different. >=20 > There's no bcsr access in the upstream bootwrapper (the=20 > mention of bcsr=20 > in cuboot-pq2.c is just one reason why some boards require us=20 > to do the=20 > CS programming), and the CS programming is chip-level, not=20 > board-level=20 > (it just requires that the device tree have a correct=20 > localbus node for=20 > the board). Finally got it (sort-of) working. Turned out that for some reason the console init is setting the baudrate to 9600 the options string passed in to the console init fuunction is NULL. Any idea oon how this should be passed in from u-boot? ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-11 0:07 ` Rune Torgersen @ 2008-01-11 14:13 ` Rune Torgersen 2008-01-11 17:24 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-11 14:13 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Rune Torgersen > Finally got it (sort-of) working. > Turned out that for some reason the console init is setting=20 > the baudrate > to 9600 > the options string passed in to the console init fuunction is NULL. >=20 > Any idea oon how this should be passed in from u-boot? Ok, needed a valid console=3D line on the command line. WHen we tried that, we had a typo, so it was not recognized. Our old 2.6.18 arch/ppc kernel didn't need a console parameter, it got the baudrate from u-boot somehow. Anyway of doing that here too? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-11 14:13 ` Rune Torgersen @ 2008-01-11 17:24 ` Scott Wood 2008-01-11 18:11 ` Rune Torgersen 0 siblings, 1 reply; 15+ messages in thread From: Scott Wood @ 2008-01-11 17:24 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev Rune Torgersen wrote: > Ok, needed a valid console= line on the command line. WHen we tried > that, we had a typo, so it was not recognized. > Our old 2.6.18 arch/ppc kernel didn't need a console parameter, it got > the baudrate from u-boot somehow. > Anyway of doing that here too? You could add something to the cuboot code to fill in current-speed based on the value in the bd_t. -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Help with device tree binding for SMC serial 2008-01-11 17:24 ` Scott Wood @ 2008-01-11 18:11 ` Rune Torgersen 2008-01-11 18:15 ` Scott Wood 0 siblings, 1 reply; 15+ messages in thread From: Rune Torgersen @ 2008-01-11 18:11 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev > From: Scott Wood=20 >=20 > You could add something to the cuboot code to fill in current-speed=20 > based on the value in the bd_t. >=20 Ahh.. That was what I'm missing. Where in the devicetree is that supposed to be at? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Help with device tree binding for SMC serial 2008-01-11 18:11 ` Rune Torgersen @ 2008-01-11 18:15 ` Scott Wood 0 siblings, 0 replies; 15+ messages in thread From: Scott Wood @ 2008-01-11 18:15 UTC (permalink / raw) To: Rune Torgersen; +Cc: linuxppc-dev Rune Torgersen wrote: >> From: Scott Wood >> >> You could add something to the cuboot code to fill in current-speed >> based on the value in the bd_t. >> > > Ahh.. That was what I'm missing. > Where in the devicetree is that supposed to be at? In the serial node. -Scott ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-01-11 18:15 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-09 19:18 Help with device tree binding for SMC serial Rune Torgersen 2008-01-09 19:45 ` Scott Wood 2008-01-09 22:22 ` Rune Torgersen 2008-01-09 22:29 ` Scott Wood 2008-01-09 22:37 ` Rune Torgersen 2008-01-09 22:40 ` Scott Wood 2008-01-09 23:07 ` Rune Torgersen 2008-01-10 17:53 ` Scott Wood 2008-01-10 19:10 ` Rune Torgersen 2008-01-10 19:19 ` Scott Wood 2008-01-11 0:07 ` Rune Torgersen 2008-01-11 14:13 ` Rune Torgersen 2008-01-11 17:24 ` Scott Wood 2008-01-11 18:11 ` Rune Torgersen 2008-01-11 18:15 ` Scott Wood
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).