[PATCH v2 0/5] ARM: keystone: Enable SPI and I2C support

STALE4720d

Revision v2 of 2 in this series.

12 messages, 2 authors, 2013-10-03 · open the first message on its own page

[PATCH v2 0/5] ARM: keystone: Enable SPI and I2C support

From: Santosh Shilimkar <hidden>
Date: 2013-09-30 22:41:22

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
-- 
1.7.9.5

[PATCH v2 1/5] ARM: dts: keystone: Add i2c device nodes

From: Santosh Shilimkar <hidden>
Date: 2013-09-30 22:41:23

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.

Signed-off-by: Santosh Shilimkar <redacted>
---
 arch/arm/boot/dts/keystone.dts |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff --git a/arch/arm/boot/dts/keystone.dts b/arch/arm/boot/dts/keystone.dts
index 7d576b5..3f56556 100644
--- a/arch/arm/boot/dts/keystone.dts
+++ b/arch/arm/boot/dts/keystone.dts
@@ -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>;
+		};
 	};
 };
-- 
1.7.9.5

[PATCH v2 2/5] ARM: dts: keystone: Add the SPI nodes

From: Santosh Shilimkar <hidden>
Date: 2013-09-30 22:41:24

Keystone2 based SOCs supports 3 instances of SPI controllers. Add
the device nodes for them.

Signed-off-by: Santosh Shilimkar <redacted>
---
 arch/arm/boot/dts/keystone.dts |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
diff --git a/arch/arm/boot/dts/keystone.dts b/arch/arm/boot/dts/keystone.dts
index 3f56556..8203da5 100644
--- a/arch/arm/boot/dts/keystone.dts
+++ b/arch/arm/boot/dts/keystone.dts
@@ -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>;
+		};
 	};
 };
-- 
1.7.9.5

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Santosh Shilimkar <hidden>
Date: 2013-09-30 22:41:25

Allow the TI_EDMA to be built for ARCH_KEYSTONE which also supports
the EDMA IP.

Cc: Vinod Koul <redacted>

Signed-off-by: Santosh Shilimkar <redacted>
---
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(-)
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 526ec77..b1dde16 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -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
-- 
1.7.9.5

[PATCH v2 4/5] ARM: keystone: Select TI_EDMA to be able to enable SPI driver

From: Santosh Shilimkar <hidden>
Date: 2013-09-30 22:41:26

Select 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.

Signed-off-by: Santosh Shilimkar <redacted>
---
 arch/arm/mach-keystone/Kconfig |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
index d7c425d..525e4b9 100644
--- a/arch/arm/mach-keystone/Kconfig
+++ b/arch/arm/mach-keystone/Kconfig
@@ -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.
-- 
1.7.9.5

[PATCH v2 5/5] ARM: keystone: Enable I2C and SPI bus support

From: Santosh Shilimkar <hidden>
Date: 2013-09-30 22:41:27

Keystone I2C dnd SPI driver updates are already merged so lets
enable them in config.

Signed-off-by: Santosh Shilimkar <redacted>
---
 arch/arm/configs/keystone_defconfig |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig
index 1f36b82..9943e5d 100644
--- a/arch/arm/configs/keystone_defconfig
+++ b/arch/arm/configs/keystone_defconfig
@@ -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
-- 
1.7.9.5

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Vinod Koul <hidden>
Date: 2013-10-01 01:54:54

On Mon, Sep 30, 2013 at 06:41:25PM -0400, Santosh Shilimkar wrote:
Allow the TI_EDMA to be built for ARCH_KEYSTONE which also supports
the EDMA IP.

Cc: Vinod Koul <redacted>

Signed-off-by: Santosh Shilimkar <redacted>
---
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 hunk
 drivers/dma/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 526ec77..b1dde16 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -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
-- 
1.7.9.5
-- 

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Santosh Shilimkar <hidden>
Date: 2013-10-01 13:35:43

On Monday 30 September 2013 09:54 PM, Vinod Koul wrote:
On Mon, Sep 30, 2013 at 06:41:25PM -0400, Santosh Shilimkar wrote:
quoted
Allow the TI_EDMA to be built for ARCH_KEYSTONE which also supports
the EDMA IP.

Cc: Vinod Koul <redacted>

Signed-off-by: Santosh Shilimkar <redacted>
---
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.
 
I have a patch in my -next from Josh which selects TI_PRIV_EDMA for 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
 drivers/dma/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 526ec77..b1dde16 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -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
-- 
1.7.9.5

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Vinod Koul <hidden>
Date: 2013-10-03 15:03:59

On Tue, Oct 01, 2013 at 09:35:43AM -0400, Santosh Shilimkar wrote:
On Monday 30 September 2013 09:54 PM, Vinod Koul wrote:
quoted
On Mon, Sep 30, 2013 at 06:41:25PM -0400, Santosh Shilimkar wrote:
quoted
Allow the TI_EDMA to be built for ARCH_KEYSTONE which also supports
the EDMA IP.

Cc: Vinod Koul <redacted>

Signed-off-by: Santosh Shilimkar <redacted>
---
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.
Okay btw is EDMA enabled in any of defconfigs. Having that will help us get
better test covergae in -next
 
quoted
I have a patch in my -next from Josh which selects TI_PRIV_EDMA for 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.
Pls merge my fixes branch. I will send that to Linus in day or two...
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 <redacted>
quoted
quoted
 drivers/dma/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 526ec77..b1dde16 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -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
-- 
1.7.9.5
-- 

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Vinod Koul <hidden>
Date: 2013-10-03 15:11:17

On Thu, Oct 03, 2013 at 11:57:59AM -0400, Santosh Shilimkar wrote:
quoted
quoted
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.
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
quoted
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 <redacted>
Thanks a lot.

Regards,
Santosh
-- 

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Santosh Shilimkar <hidden>
Date: 2013-10-03 15:57:59

On Thursday 03 October 2013 11:03 AM, Vinod Koul wrote:
On Tue, Oct 01, 2013 at 09:35:43AM -0400, Santosh Shilimkar wrote:
quoted
On Monday 30 September 2013 09:54 PM, Vinod Koul wrote:
quoted
On Mon, Sep 30, 2013 at 06:41:25PM -0400, Santosh Shilimkar wrote:
quoted
Allow the TI_EDMA to be built for ARCH_KEYSTONE which also supports
the EDMA IP.

Cc: Vinod Koul <redacted>

Signed-off-by: Santosh Shilimkar <redacted>
---
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.
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
 
quoted
I have a patch in my -next from Josh which selects TI_PRIV_EDMA for 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.
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
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 <redacted>
Thanks a lot.

Regards,
Santosh

[PATCH v2 3/5] dma: Allow TI_EDMA selectable for ARCH_KEYSTONE

From: Santosh Shilimkar <hidden>
Date: 2013-10-03 16:06:02

On Thursday 03 October 2013 11:11 AM, Vinod Koul wrote:
On Thu, Oct 03, 2013 at 11:57:59AM -0400, Santosh Shilimkar wrote:
quoted
quoted
quoted
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.
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help