ARM: keystone: Enable SPI and I2C support
Subsystems (5)
v2 cover ARM: keystone: Enable SPI and I2C support
Here is small set of patches which enables I2C and SPI bus support for Keystone SOCs. The relevant driver updates are already merged in the last merge cycle.
v1-->v2
Only one patch is changed in the v2 from v1. Based on discussion [1], dropped the SPI Kconfig patch which was disabling the EDMA. Since the driver is smart enough to handle that runtime based on dma-engine DT information, EDMA can be included in the build for Keystone SOCs.
Series is tested on Keystone 2 EVM.
Santosh Shilimkar (5):
ARM: dts: keystone: Add i2c device nodes
ARM: dts: keystone: Add the SPI nodes
dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
ARM: keystone: Select TI_EDMA to be able to enable SPI driver
ARM: keystone: Enable I2C and SPI bus support
arch/arm/boot/dts/keystone.dts | 57 +++++++++++++++++++++++++++++++++++ arch/arm/configs/keystone_defconfig | 2 ++ arch/arm/mach-keystone/Kconfig | 2 ++ drivers/dma/Kconfig | 2 +- 4 files changed, 62 insertions(+), 1 deletion(-)
Regards,
Santosh
[1] http://www.spinics.net/lists/arm-kernel/msg276324.html
Signature · 1 line
1.7.9.5
PATCH v2 1/5 ARM: dts: keystone: Add i2c device nodes
Keystone2 based SOCs supports 3 instances of i2c controllers. Add the device nodes for them. The i2c0 child device AT24C1024 EEPROM node is also added. When different board variants are added in future, it can be moved to the supported boards from common SOC file.
--- arch/arm/boot/dts/keystone.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/keystone.dts +30 -0
@@ -124,5 +124,35 @@ interrupts = <GIC_SPI 280 IRQ_TYPE_EDGE_RISING>; }; + i2c0: i2c at 2530000 { + compatible = "ti,davinci-i2c"; + reg = <0x02530000 0x400>; + clock-frequency = <100000>; + clocks = <&clki2c>; + interrupts = <GIC_SPI 283 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + + dtt at 50 { + compatible = "at,24c1024"; + reg = <0x50>; + }; + }; + + i2c1: i2c at 2530400 { + compatible = "ti,davinci-i2c"; + reg = <0x02530400 0x400>; + clock-frequency = <100000>; + clocks = <&clki2c>; + interrupts = <GIC_SPI 286 IRQ_TYPE_EDGE_RISING>; + }; + + i2c2: i2c at 2530800 { + compatible = "ti,davinci-i2c"; + reg = <0x02530800 0x400>; + clock-frequency = <100000>; + clocks = <&clki2c>; + interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 2/5 ARM: dts: keystone: Add the SPI nodes
In reply to Santosh ShilimkarKeystone2 based SOCs supports 3 instances of SPI controllers. Add the device nodes for them.
--- arch/arm/boot/dts/keystone.dts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
arch/arm/boot/dts/keystone.dts +27 -0
@@ -154,5 +154,32 @@ clocks = <&clki2c>; interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>; }; + + spi0: spi at 21000400 { + compatible = "ti,dm6441-spi"; + reg = <0x21000400 0x200>; + num-cs = <4>; + ti,davinci-spi-intr-line = <0>; + interrupts = <GIC_SPI 292 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkspi>; + }; + + spi1: spi at 21000600 { + compatible = "ti,dm6441-spi"; + reg = <0x21000600 0x200>; + num-cs = <4>; + ti,davinci-spi-intr-line = <0>; + interrupts = <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkspi>; + }; + + spi2: spi at 21000800 { + compatible = "ti,dm6441-spi"; + reg = <0x21000800 0x200>; + num-cs = <4>; + ti,davinci-spi-intr-line = <0>; + interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkspi>; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
In reply to Santosh ShilimkarAllow the TI_EDMA to be built for ARCH_KEYSTONE which also supports the EDMA IP.
---
Vinod,
I need your ack on this patch to carry $subject patch via arm-soc tree to avoid the unmet dependency warnings.
drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/Kconfig +1 -1
@@ -195,7 +195,7 @@ config SIRF_DMA config TI_EDMA bool "TI EDMA support" - depends on ARCH_DAVINCI || ARCH_OMAP + depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE select DMA_ENGINE select DMA_VIRTUAL_CHANNELS default n
Signature · 1 line
1.7.9.5
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
Quoted 10 lines · Santosh Shilimkar
Allow the
TI_EDMAto be built forARCH_KEYSTONEwhich also supports the EDMA IP.Cc Vinod Koul <[email protected]>Signed-off-by Santosh Shilimkar <[email protected]>---
Vinod,
I need your ack on this patch to carry $subject patch via arm-soc tree to avoid the unmet dependency warnings.
Sure, but too many dependency fixes have been popoing up for this part and this IIRC is third patch! Something doesn't seem right, hopefully am wrong..
I have a patch in my -next from Josh which selects TI_PRIV_EDMA for this...
~Vinod
Quoted 20 lines
drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/dma/Kconfig +1
-1@@ -195,7 +195,7 @@ config SIRF_DMA config TI_EDMA bool "TI EDMA support" - depends on ARCH_DAVINCI || ARCH_OMAP + depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE select DMA_ENGINE select DMA_VIRTUAL_CHANNELS default nSignature · 1 line
1.7.9.5
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
Quoted 6 lines · Vinod Koul
Quoted 5 lines · Santosh Shilimkar
Allow the
TI_EDMAto be built forARCH_KEYSTONEwhich also supports the EDMA IP.Cc Vinod Koul <[email protected]>
Quoted 8 lines
Quoted 5 lines
Signed-off-by Santosh Shilimkar <[email protected]>---
Vinod,
I need your ack on this patch to carry $subject patch via arm-soc tree to avoid the unmet dependency warnings.Sure, but too many dependency fixes have been popoing up for this part and this IIRC is third patch! Something doesn't seem right, hopefully am wrong..
I think it mainly because EDMA support is just merged last cycle and few SOCs which use the EDMA trying to enable them now.
Quoted 2 lines
I have a patch in my -next from Josh which selects
TI_PRIV_EDMAfor this...
I looked at your next patch which is fixing the TI_EDMA dependency. If you prefer to merge $subject patch via your tree, thats fine as well. Juts give me a stable branch targeted for 3.13 and I shall merge your branch and apply other patches on top of it.
Since it was very trivial patch, I thought its easy to carry via arm-soc with your ack.
Quoted 21 lines
Quoted 20 lines
drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/dma/Kconfig +1
-1@@ -195,7 +195,7 @@ config SIRF_DMA config TI_EDMA bool "TI EDMA support" - depends on ARCH_DAVINCI || ARCH_OMAP + depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE select DMA_ENGINE select DMA_VIRTUAL_CHANNELS default nSignature · 1 line
1.7.9.5
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
Quoted 12 lines · Santosh Shilimkar
Quoted 11 lines · Vinod Koul
Quoted 10 lines · Santosh Shilimkar
Allow the
TI_EDMAto be built forARCH_KEYSTONEwhich also supports the EDMA IP.Cc Vinod Koul <[email protected]>Signed-off-by Santosh Shilimkar <[email protected]>---
Vinod,
I need your ack on this patch to carry $subject patch via arm-soc tree to avoid the unmet dependency warnings.
Quoted 5 lines
Quoted 3 lines
Sure, but too many dependency fixes have been popoing up for this part and this IIRC is third patch! Something doesn't seem right, hopefully am wrong..
I think it mainly because EDMA support is just merged last cycle and few SOCs which use the EDMA trying to enable them now.
Okay btw is EDMA enabled in any of defconfigs. Having that will help us get better test covergae in -next
Quoted 7 lines
Quoted 3 lines
I have a patch in my -next from Josh which selects
TI_PRIV_EDMAfor this...I looked at your next patch which is fixing the
TI_EDMAdependency. If you prefer to merge $subject patch via your tree, thats fine as well. Juts give me a stable branch targeted for 3.13 and I shall merge your branch and apply other patches on top of it.
Pls merge my fixes branch. I will send that to Linus in day or two...
Quoted 2 lines
Since it was very trivial patch, I thought its easy to carry via arm-soc with your ack.
Sure, looks good to me
Quoted 23 lines
Quoted 22 lines
Quoted 21 lines
drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/dma/Kconfig +1
-1@@ -195,7 +195,7 @@ config SIRF_DMA config TI_EDMA bool "TI EDMA support" - depends on ARCH_DAVINCI || ARCH_OMAP + depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE select DMA_ENGINE select DMA_VIRTUAL_CHANNELS default nSignature · 1 line
1.7.9.5
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
Quoted 13 lines · Vinod Koul
Quoted 12 lines · Santosh Shilimkar
Quoted 11 lines · Vinod Koul
Quoted 10 lines · Santosh Shilimkar
Allow the
TI_EDMAto be built forARCH_KEYSTONEwhich also supports the EDMA IP.Cc Vinod Koul <[email protected]>Signed-off-by Santosh Shilimkar <[email protected]>---
Vinod,
I need your ack on this patch to carry $subject patch via arm-soc tree to avoid the unmet dependency warnings.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Sure, but too many dependency fixes have been popoing up for this part and this IIRC is third patch! Something doesn't seem right, hopefully am wrong..
I think it mainly because EDMA support is just merged last cycle and few SOCs which use the EDMA trying to enable them now.
Okay btw is EDMA enabled in any of defconfigs. Having that will help us get better test covergae in -next
yeah.. I do enable that as part of the series.
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
I have a patch in my -next from Josh which selects
TI_PRIV_EDMAfor this...I looked at your next patch which is fixing the
TI_EDMAdependency. If you prefer to merge $subject patch via your tree, thats fine as well. Juts give me a stable branch targeted for 3.13 and I shall merge your branch and apply other patches on top of it.Pls merge my fixes branch. I will send that to Linus in day or two...
Will merge your next to avoid the merge conflict issue.
Quoted 5 lines
Quoted 2 lines
Since it was very trivial patch, I thought its easy to carry via arm-soc with your ack.
Sure, looks good to me
Acked-by Vinod Koul <[email protected]>
Thanks a lot.
Regards,
Santosh
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
Quoted 7 lines · Santosh Shilimkar
Quoted 6 lines
Quoted 4 lines
I looked at your next patch which is fixing the
TI_EDMAdependency. If you prefer to merge $subject patch via your tree, thats fine as well. Juts give me a stable branch targeted for 3.13 and I shall merge your branch and apply other patches on top of it.Pls merge my fixes branch. I will send that to Linus in day or two...
Will merge your next to avoid the merge conflict issue.
No pls. I usually rebase my -next so I wont advise that. Fixes wont be so pls use that and this will be sent to Linus.
~Vinod
Quoted 12 lines
Quoted 6 lines
Quoted 3 lines
Since it was very trivial patch, I thought its easy to carry via arm-soc with your ack.
Sure, looks good to me
Acked-by Vinod Koul <[email protected]>Thanks a lot.
Regards,
Santosh
PATCH v2 3/5 dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
Quoted 11 lines · Vinod Koul
Quoted 7 lines · Santosh Shilimkar
Quoted 6 lines
Quoted 4 lines
I looked at your next patch which is fixing the
TI_EDMAdependency. If you prefer to merge $subject patch via your tree, thats fine as well. Juts give me a stable branch targeted for 3.13 and I shall merge your branch and apply other patches on top of it.Pls merge my fixes branch. I will send that to Linus in day or two...
Will merge your next to avoid the merge conflict issue.
No pls. I usually rebase my -next so I wont advise that. Fixes wont be so pls use that and this will be sent to Linus.
opps.. typo ... I mean fixes branch.
Regards,
Santosh
PATCH v2 4/5 ARM: keystone: Select TI_EDMA to be able to enable SPI driver
In reply to Santosh ShilimkarSelect the TI EDMA to be able to enable SPI driver on Keystone SOCs. Keystone SOCs share the EDMA IP with other TI SOCs.
Note that EDMA support hasn't been added and tested yet for Keystone SOC data(device tree), but building it, is harmless since driver like SPI already takes care of supporting non-dma mode in the absence of such data.
--- arch/arm/mach-keystone/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-keystone/Kconfig +2 -0
@@ -10,6 +10,8 @@ config ARCH_KEYSTONE select ARCH_WANT_OPTIONAL_GPIOLIB select ARM_ERRATA_798181 if SMP select COMMON_CLK_KEYSTONE + select TI_EDMA + select TI_PRIV_EDMA help Support for boards based on the Texas Instruments Keystone family of SoCs.
Signature · 1 line
1.7.9.5
PATCH v2 5/5 ARM: keystone: Enable I2C and SPI bus support
In reply to Santosh ShilimkarKeystone I2C dnd SPI driver updates are already merged so lets enable them in config.
--- arch/arm/configs/keystone_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/keystone_defconfig +2 -0
@@ -123,7 +123,9 @@ CONFIG_SERIAL_OF_PLATFORM=y CONFIG_I2C=y # CONFIG_I2C_COMPAT is not set CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DAVINCI=y CONFIG_SPI=y +CONFIG_SPI_DAVINCI=y CONFIG_SPI_SPIDEV=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y
Signature · 1 line
1.7.9.5