* [PATCH 1/4] ARM: dts: keystone: Add i2c device nodes
2013-09-27 23:42 [PATCH 0/4] ARM: keystone: Enable SPI and I2C support Santosh Shilimkar
@ 2013-09-27 23:42 ` Santosh Shilimkar
2013-09-27 23:42 ` [PATCH 2/4] ARM: dts: keystone: Add the SPI nodes Santosh Shilimkar
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2013-09-27 23:42 UTC (permalink / raw)
To: linux-arm-kernel
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 <santosh.shilimkar@ti•com>
---
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
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/4] ARM: dts: keystone: Add the SPI nodes
2013-09-27 23:42 [PATCH 0/4] ARM: keystone: Enable SPI and I2C support Santosh Shilimkar
2013-09-27 23:42 ` [PATCH 1/4] ARM: dts: keystone: Add i2c device nodes Santosh Shilimkar
@ 2013-09-27 23:42 ` Santosh Shilimkar
2013-09-27 23:42 ` [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support Santosh Shilimkar
2013-09-27 23:42 ` [PATCH 4/4] ARM: keystone: Enable I2C and SPI bus support Santosh Shilimkar
3 siblings, 0 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2013-09-27 23:42 UTC (permalink / raw)
To: linux-arm-kernel
Keystone2 based SOCs supports 3 instances of SPI controllers. Add
the device nodes for them.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti•com>
---
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
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support
2013-09-27 23:42 [PATCH 0/4] ARM: keystone: Enable SPI and I2C support Santosh Shilimkar
2013-09-27 23:42 ` [PATCH 1/4] ARM: dts: keystone: Add i2c device nodes Santosh Shilimkar
2013-09-27 23:42 ` [PATCH 2/4] ARM: dts: keystone: Add the SPI nodes Santosh Shilimkar
@ 2013-09-27 23:42 ` Santosh Shilimkar
2013-09-29 12:31 ` Mark Brown
2013-09-27 23:42 ` [PATCH 4/4] ARM: keystone: Enable I2C and SPI bus support Santosh Shilimkar
3 siblings, 1 reply; 9+ messages in thread
From: Santosh Shilimkar @ 2013-09-27 23:42 UTC (permalink / raw)
To: linux-arm-kernel
DaVinci SPI IP works without EDMA support and thats how it has
been used on Keystone SOCs currently. Hence keep the EDMA select
limited to ARCH_DAVINCI so that Keystone SOCs can use the driver.
Keystone SOC do support EDMA IP as well but the support has
not been added and tested so far.
Cc: Mark Brown <broonie@kernel•org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti•com>
---
Mark,
If you are ok with this trivial change, I will need your ack to carry the patch
via arm-soc tree. Without this patch, enabling SPI throws unmet dependency
warnings and last patch in the series enables the SPI support.
drivers/spi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index b9c53cc..514d883 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -159,7 +159,7 @@ config SPI_DAVINCI
tristate "Texas Instruments DaVinci/DA8x/OMAP-L/AM1x SoC SPI controller"
depends on ARCH_DAVINCI || ARCH_KEYSTONE
select SPI_BITBANG
- select TI_EDMA
+ select TI_EDMA if ARCH_DAVINCI
help
SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support
2013-09-27 23:42 ` [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support Santosh Shilimkar
@ 2013-09-29 12:31 ` Mark Brown
2013-09-30 13:36 ` Santosh Shilimkar
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2013-09-29 12:31 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 27, 2013 at 07:42:35PM -0400, Santosh Shilimkar wrote:
> DaVinci SPI IP works without EDMA support and thats how it has
> been used on Keystone SOCs currently. Hence keep the EDMA select
> limited to ARCH_DAVINCI so that Keystone SOCs can use the driver.
> Keystone SOC do support EDMA IP as well but the support has
> not been added and tested so far.
If there's no hard dependency on EDMA then the driver probably ought to
be marked as COMPILE_TEST so that it can be build tested on other
systems. Is that possible?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130929/ab65c9b9/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support
2013-09-29 12:31 ` Mark Brown
@ 2013-09-30 13:36 ` Santosh Shilimkar
2013-09-30 14:38 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Santosh Shilimkar @ 2013-09-30 13:36 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday 29 September 2013 08:31 AM, Mark Brown wrote:
> On Fri, Sep 27, 2013 at 07:42:35PM -0400, Santosh Shilimkar wrote:
>
>> DaVinci SPI IP works without EDMA support and thats how it has
>> been used on Keystone SOCs currently. Hence keep the EDMA select
>> limited to ARCH_DAVINCI so that Keystone SOCs can use the driver.
>
>> Keystone SOC do support EDMA IP as well but the support has
>> not been added and tested so far.
>
> If there's no hard dependency on EDMA then the driver probably ought to
> be marked as COMPILE_TEST so that it can be build tested on other
> systems. Is that possible?
>
EDMA is already getting tested for DAVINCI builds and there are patches
coming AMXXXX SOC support. So probably marking it COMPILE_TEST isn't
needed since it has been in use already for other SOCs.
Regards,
Santosh
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support
2013-09-30 13:36 ` Santosh Shilimkar
@ 2013-09-30 14:38 ` Mark Brown
2013-09-30 15:23 ` Santosh Shilimkar
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2013-09-30 14:38 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 30, 2013 at 09:36:23AM -0400, Santosh Shilimkar wrote:
> On Sunday 29 September 2013 08:31 AM, Mark Brown wrote:
> > If there's no hard dependency on EDMA then the driver probably ought to
> > be marked as COMPILE_TEST so that it can be build tested on other
> > systems. Is that possible?
> EDMA is already getting tested for DAVINCI builds and there are patches
> coming AMXXXX SOC support. So probably marking it COMPILE_TEST isn't
> needed since it has been in use already for other SOCs.
It'd make life easier for general subsystem development if we were able
to get build coverage without having to build a specific config, even if
it's never actually going to be run.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130930/bcaa17e5/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support
2013-09-30 14:38 ` Mark Brown
@ 2013-09-30 15:23 ` Santosh Shilimkar
0 siblings, 0 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2013-09-30 15:23 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 30 September 2013 10:38 AM, Mark Brown wrote:
> On Mon, Sep 30, 2013 at 09:36:23AM -0400, Santosh Shilimkar wrote:
>> On Sunday 29 September 2013 08:31 AM, Mark Brown wrote:
>
>>> If there's no hard dependency on EDMA then the driver probably ought to
>>> be marked as COMPILE_TEST so that it can be build tested on other
>>> systems. Is that possible?
>
>> EDMA is already getting tested for DAVINCI builds and there are patches
>> coming AMXXXX SOC support. So probably marking it COMPILE_TEST isn't
>> needed since it has been in use already for other SOCs.
>
> It'd make life easier for general subsystem development if we were able
> to get build coverage without having to build a specific config, even if
> it's never actually going to be run.
>
So after your comments, I actually checked whether the driver works with
EDMA enabled but no EDMA node/data information from DT for SPI driver.
It seems to work.
So I am going to drop this patch and rather allow the EDMA to be built
for Keystone SOCs as well. Not sure why I didn't looked at this as an
option first place.
Thanks for your comments Mark.
Regards,
Santosh
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] ARM: keystone: Enable I2C and SPI bus support
2013-09-27 23:42 [PATCH 0/4] ARM: keystone: Enable SPI and I2C support Santosh Shilimkar
` (2 preceding siblings ...)
2013-09-27 23:42 ` [PATCH 3/4] spi: davinci: Allow SPI to be build without EDMA support Santosh Shilimkar
@ 2013-09-27 23:42 ` Santosh Shilimkar
3 siblings, 0 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2013-09-27 23:42 UTC (permalink / raw)
To: linux-arm-kernel
Keystone I2C dnd SPI driver updates are already merged so lets
enable them in config.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti•com>
---
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
^ permalink raw reply related [flat|nested] 9+ messages in thread