More small davinci device tree fixes
cover More small davinci device tree fixes
Here is another set of small davinci device tree fixes.
Tested working on LEGO MINDSTORMS EV3.
David Lechner (3):
ARM: davinci: add spi0 to da850 device tree
ARM: davinci: disable mdio and eth0 in da850.dtsi
ARM: davinci: da850: There are 101 interrupts.
arch/arm/boot/dts/da850-enbw-cmc.dts | 6 ++++++ arch/arm/boot/dts/da850.dtsi | 14 +++++++++++++- arch/arm/mach-davinci/da8xx-dt.c | 1 + 3 files changed, 20 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
PATCH 1/3 ARM: DTS: da850: add node for spi0
Adds device definition for soc spi0 and also a aux data that is needed for clock matching.
--- arch/arm/boot/dts/da850.dtsi | 10 ++++++++++ arch/arm/mach-davinci/da8xx-dt.c | 1 + 2 files changed, 11 insertions(+)
arch/arm/boot/dts/da850.dtsi +10 -0
@@ -295,6 +295,16 @@ reg = <0x308000 0x80>; status = "disabled"; }; + spi0: spi at 41000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,da830-spi"; + reg = <0x41000 0x1000>; + num-cs = <6>; + ti,davinci-spi-intr-line = <1>; + interrupts = <20>; + status = "disabled"; + }; spi1: spi at 30e000 { #address-cells = <1>; #size-cells = <0>;
arch/arm/mach-davinci/da8xx-dt.c +1 -0
@@ -28,6 +28,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {OF_DEV_AUXDATA ("ti,da850-ecap" ,0x01f06000 ,"ecap" ,NULL ),OF_DEV_AUXDATA ("ti,da850-ecap" ,0x01f07000 ,"ecap" ,NULL ),OF_DEV_AUXDATA ("ti,da850-ecap" ,0x01f08000 ,"ecap" ,NULL ), +OF_DEV_AUXDATA ("ti,da830-spi" ,0x01c41000 ,"spi_davinci.0" ,NULL ),OF_DEV_AUXDATA ("ti,da830-spi" ,0x01f0e000 ,"spi_davinci.1" ,NULL ),OF_DEV_AUXDATA ("ns16550a" ,0x01c42000 ,"serial8250.0" ,NULL ), OF_DEV_AUXDATA("ns16550a", 0x01d0c000, "serial8250.1", NULL),
Signature · 1 line
1.9.1
PATCH 2/3 ARM: DTS: da850: disable mdio and eth0 by default
In reply to David LechnerAll other devices are disabled by default and not all boards will use these devices, so these should be disabled too.
da850-evm.dtb already had status = "okay" for these devices. da850-enbw-cmc.dts did not, so they were added.
--- arch/arm/boot/dts/da850-enbw-cmc.dts | 6 ++++++ arch/arm/boot/dts/da850.dtsi | 2 ++ 2 files changed, 8 insertions(+)
arch/arm/boot/dts/da850-enbw-cmc.dts +6 -0
@@ -26,6 +26,12 @@ serial2: serial at 10d000 { status = "okay"; }; + mdio: mdio at 224000 { + status = "okay"; + }; + eth0: ethernet at 220000 { + status = "okay"; + }; }; };
arch/arm/boot/dts/da850.dtsi +2 -0
@@ -322,6 +322,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <0x224000 0x1000>; + status = "disabled"; }; eth0: ethernet at 220000 { compatible = "ti,davinci-dm6467-emac";
@@ -336,6 +337,7 @@ 35 36 >; + status = "disabled"; }; usbphy: usbphy { compatible = "ti,da830-usbphy";
Signature · 1 line
1.9.1
PATCH 3/3 ARM: DTS: da850: There are 101 interrupts.
In reply to David LechnerFix off by one error in da850 device tree.
--- arch/arm/boot/dts/da850.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/da850.dtsi +1 -1
@@ -19,7 +19,7 @@ compatible = "ti,cp-intc"; interrupt-controller; #interrupt-cells = <1>; - ti,intc-size = <100>; + ti,intc-size = <101>; reg = <0xfffee000 0x2000>; }; };
Signature · 1 line
1.9.1
Quoted 3 lines · David Lechner
Here is another set of small davinci device tree fixes.
Tested working on LEGO MINDSTORMS EV3.
Also boot tested on da850-evm.
Kevin
Re: [PATCH 1/3] ARM: DTS: da850: add node for spi0
In reply to David LechnerQuoted 14 lines · David Lechner
Adds device definition for soc spi0 and also a aux data that is needed for clock matching.
Signed-off-by David Lechner <[email protected]>--- arch/arm/boot/dts/da850.dtsi | 10 ++++++++++ arch/arm/mach-davinci/da8xx-dt.c | 1 + 2 files changed, 11 insertions(+)arch/arm/boot/dts/da850.dtsi +0
-0
arch/arm/boot/dts/da850.dtsi line 303
Quoted 9 lines
arch/arm/boot/dts/da850.dtsi +6
-0@@ -295,6 +295,16 @@ reg = <0x308000 0x80>; status = "disabled"; }; + spi0: spi at 41000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,da830-spi"; + reg = <0x41000 0x1000>; + num-cs = <6>;
This made me notice that num-cs is populated wrongly for spi1. It actually has 8 chip selects. This is fine though.
Also, it will be nice to add pinctrl entries for spi0 like it is done for spi1. You will need those anyway for using the interface.
Quoted 12 lines
arch/arm/boot/dts/da850.dtsi +4
-0+ ti,davinci-spi-intr-line = <1>; + interrupts = <20>; + status = "disabled"; + }; spi1: spi at 30e000 { #address-cells = <1>; #size-cells = <0>;arch/arm/mach-davinci/da8xx-dt.c +0
-0
arch/arm/mach-davinci/da8xx-dt.c static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { · line 34
Quoted 7 lines
arch/arm/mach-davinci/da8xx-dt.c +1
-0@@ -28,6 +28,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {OF_DEV_AUXDATA ("ti,da850-ecap" ,0x01f06000 ,"ecap" ,NULL ),OF_DEV_AUXDATA ("ti,da850-ecap" ,0x01f07000 ,"ecap" ,NULL ),OF_DEV_AUXDATA ("ti,da850-ecap" ,0x01f08000 ,"ecap" ,NULL ), +OF_DEV_AUXDATA ("ti,da830-spi" ,0x01c41000 ,"spi_davinci.0" ,NULL ),OF_DEV_AUXDATA ("ti,da830-spi" ,0x01f0e000 ,"spi_davinci.1" ,NULL ),OF_DEV_AUXDATA ("ns16550a" ,0x01c42000 ,"serial8250.0" ,NULL ), OF_DEV_AUXDATA("ns16550a", 0x01d0c000, "serial8250.1", NULL),
I prefer DT updates are patches of their own and not combined with code updates like this. Can you please split this up?
Regards,
Sekhar
Re: [PATCH 2/3] ARM: DTS: da850: disable mdio and eth0 by default
In reply to David LechnerQuoted 7 lines · David Lechner
All other devices are disabled by default and not all boards will use these devices, so these should be disabled too.
da850-evm.dtb already had status = "okay" for these devices.
da850-enbw-cmc.dtsdid not, so they were added.Signed-off-by David Lechner <[email protected]>
Looks good to me.
Thanks,
Sekhar
Re: [PATCH 3/3] ARM: DTS: da850: There are 101 interrupts.
In reply to David LechnerQuoted 3 lines · David Lechner
Fix off by one error in da850 device tree.
Signed-off-by David Lechner <[email protected]>
Looks good to me.
Regards,
Sekhar
Re: [PATCH 1/3] ARM: DTS: da850: add node for spi0
In reply to Sekhar NoriQuoted 3 lines · Sekhar Nori
This made me notice that num-cs is populated wrongly for spi1. It actually has 8 chip selects. This is fine though.
I might as well fix it since I have to make changes anyway. Don't remember how I came up with 6.
Quoted 3 lines
Also, it will be nice to add pinctrl entries for spi0 like it is done for spi1. You will need those anyway for using the interface.
I omitted this on purpose. For my use case, I am using the SPI as write-only, so not using the SOMI pin, which is actually muxed as a GPIO for something else. So having a pinctl like spi1 is of no use to me. I figured if someone needs it, they can add it, otherwise it just is wasted space to me.
Quoted 3 lines
I prefer DT updates are patches of their own and not combined with code updates like this. Can you please split this up?
Ack.
Re: [PATCH 1/3] ARM: DTS: da850: add node for spi0
Quoted 2 lines · David Lechner
I omitted this on purpose. For my use case, I am using the SPI as write-only,
So your SPI accesses are fire-and-forget, and nothing ever comes back? Seems a very dangerous way to design the use case, with no feedback if something suddenly goes pear-shaped...
Or do you have ways to verify the status via some method other than SPI?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160415/3af71d9c/attachment.sig>
Re: [PATCH 1/3] ARM: DTS: da850: add node for spi0
Quoted 6 lines · Valdis.Kletnieks at vt.edu
Quoted 2 lines · David Lechner
I omitted this on purpose. For my use case, I am using the SPI as write-only,
So your SPI accesses are fire-and-forget, and nothing ever comes back?
Yes.
Quoted 2 lines
Seems a very dangerous way to design the use case, with no feedback if something suddenly goes pear-shaped...
You should tell Sitronix. This is how their display controllers work.
Quoted 3 lines
Or do you have ways to verify the status via some method other than SPI?
Nope.
I'm working with LEGO MINDSTORMS EV3, a mass-produced robotics system. It is what it is. And I have a logic analyzer for when things go pear-shaped. ;-)
Re: [PATCH 1/3] ARM: DTS: da850: add node for spi0
In reply to David LechnerQuoted 8 lines · David Lechner
Quoted 3 lines · Sekhar Nori
This made me notice that num-cs is populated wrongly for spi1. It actually has 8 chip selects. This is fine though.
I might as well fix it since I have to make changes anyway. Don't remember how I came up with 6.
In section 3.7.7 of datasheet, there are 6 possible chip selects listed for SPI0 and 8 possible chipselects for SPI1.
If you are fixing SPI1, please make that a separate patch.
Quoted 8 lines
Quoted 2 lines
Also, it will be nice to add pinctrl entries for spi0 like it is done for spi1. You will need those anyway for using the interface.
I omitted this on purpose. For my use case, I am using the SPI as write-only, so not using the SOMI pin, which is actually muxed as a GPIO for something else. So having a pinctl like spi1 is of no use to me. I figured if someone needs it, they can add it, otherwise it just is wasted space to me.
Alright, makes sense.
Regards,
Sekhar