linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20
@ 2013-09-11  9:30 Maxime Ripard
  2013-09-11  9:30 ` [PATCH 1/4] ARM: sun7i: Enable the I2C controllers Maxime Ripard
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Maxime Ripard @ 2013-09-11  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi everyone,

This patchset enables the support for the I2C IP found in the Allwinner A20.
Since it's basically the same IP than the one found in the other Allwinner
SoCs, it's just a matter of enabling it in the device tree.

Thanks,
Maxime

Maxime Ripard (4):
  ARM: sun7i: Enable the I2C controllers
  ARM: sun7i: Add the pin muxing options for the I2C controllers
  ARM: sun7i: cubieboard2: Enable the I2C controllers
  ARM: sun7i: olinuxino-micro: Enable the I2C controllers

 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts     | 12 +++++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 18 +++++++
 arch/arm/boot/dts/sun7i-a20.dtsi                | 66 +++++++++++++++++++++++++
 3 files changed, 96 insertions(+)

-- 
1.8.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] ARM: sun7i: Enable the I2C controllers
  2013-09-11  9:30 [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
@ 2013-09-11  9:30 ` Maxime Ripard
  2013-09-11  9:30 ` [PATCH 2/4] ARM: sun7i: Add the pin muxing options for " Maxime Ripard
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2013-09-11  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

The Allwinner A20 shares the same I2C controller than the one that could
be found on earlier SoCs from Allwinner. There is only a few more of
these controllers. Add all of them in the DTSI.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 80559cb..82b1af3 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -324,6 +324,51 @@
 			status = "disabled";
 		};
 
+		i2c0: i2c at 01c2ac00 {
+			compatible = "allwinner,sun4i-i2c";
+			reg = <0x01c2ac00 0x400>;
+			interrupts = <0 7 1>;
+			clocks = <&apb1_gates 0>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
+		i2c1: i2c at 01c2b000 {
+			compatible = "allwinner,sun4i-i2c";
+			reg = <0x01c2b000 0x400>;
+			interrupts = <0 8 1>;
+			clocks = <&apb1_gates 1>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
+		i2c2: i2c at 01c2b400 {
+			compatible = "allwinner,sun4i-i2c";
+			reg = <0x01c2b400 0x400>;
+			interrupts = <0 9 1>;
+			clocks = <&apb1_gates 2>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
+		i2c3: i2c at 01c2b800 {
+			compatible = "allwinner,sun4i-i2c";
+			reg = <0x01c2b800 0x400>;
+			interrupts = <0 88 1>;
+			clocks = <&apb1_gates 3>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
+		i2c4: i2c at 01c2bc00 {
+			compatible = "allwinner,sun4i-i2c";
+			reg = <0x01c2bc00 0x400>;
+			interrupts = <0 89 1>;
+			clocks = <&apb1_gates 15>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
 		gic: interrupt-controller at 01c81000 {
 			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
 			reg = <0x01c81000 0x1000>,
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ARM: sun7i: Add the pin muxing options for the I2C controllers
  2013-09-11  9:30 [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
  2013-09-11  9:30 ` [PATCH 1/4] ARM: sun7i: Enable the I2C controllers Maxime Ripard
@ 2013-09-11  9:30 ` Maxime Ripard
  2013-09-11  9:30 ` [PATCH 3/4] ARM: sun7i: cubieboard2: Enable " Maxime Ripard
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2013-09-11  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

The A20 boards we currently have share the same pins for the i2c
controllers they share. Add them to the DTSI.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 82b1af3..b939d30 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -215,6 +215,27 @@
 				allwinner,pull = <0>;
 			};
 
+			i2c0_pins_a: i2c0 at 0 {
+				allwinner,pins = "PB0", "PB1";
+				allwinner,function = "i2c0";
+				allwinner,drive = <0>;
+				allwinner,pull = <0>;
+			};
+
+			i2c1_pins_a: i2c1 at 0 {
+				allwinner,pins = "PB18", "PB19";
+				allwinner,function = "i2c1";
+				allwinner,drive = <0>;
+				allwinner,pull = <0>;
+			};
+
+			i2c2_pins_a: i2c2 at 0 {
+				allwinner,pins = "PB20", "PB21";
+				allwinner,function = "i2c2";
+				allwinner,drive = <0>;
+				allwinner,pull = <0>;
+			};
+
 			emac_pins_a: emac0 at 0 {
 				allwinner,pins = "PA0", "PA1", "PA2",
 						"PA3", "PA4", "PA5", "PA6",
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ARM: sun7i: cubieboard2: Enable the I2C controllers
  2013-09-11  9:30 [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
  2013-09-11  9:30 ` [PATCH 1/4] ARM: sun7i: Enable the I2C controllers Maxime Ripard
  2013-09-11  9:30 ` [PATCH 2/4] ARM: sun7i: Add the pin muxing options for " Maxime Ripard
@ 2013-09-11  9:30 ` Maxime Ripard
  2013-09-11  9:30 ` [PATCH 4/4] ARM: sun7i: olinuxino-micro: " Maxime Ripard
  2013-09-18 16:40 ` [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
  4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2013-09-11  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

The Cubieboard2 uses both the i2c0 and i2c1 controllers. Enable them in
the DT.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 15e625e..5c51cb8 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -48,6 +48,18 @@
 			pinctrl-0 = <&uart0_pins_a>;
 			status = "okay";
 		};
+
+		i2c0: i2c at 01c2ac00 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c0_pins_a>;
+			status = "okay";
+		};
+
+		i2c1: i2c at 01c2b000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c1_pins_a>;
+			status = "okay";
+		};
 	};
 
 	leds {
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] ARM: sun7i: olinuxino-micro: Enable the I2C controllers
  2013-09-11  9:30 [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
                   ` (2 preceding siblings ...)
  2013-09-11  9:30 ` [PATCH 3/4] ARM: sun7i: cubieboard2: Enable " Maxime Ripard
@ 2013-09-11  9:30 ` Maxime Ripard
  2013-09-18 16:40 ` [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
  4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2013-09-11  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

The A20-olinuxino-micro uses the first three I2C controllers found on
the A20. Enable them in the DT.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
index 9e77855..ead3013 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
@@ -60,6 +60,24 @@
 			pinctrl-0 = <&uart7_pins_a>;
 			status = "okay";
 		};
+
+		i2c0: i2c at 01c2ac00 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c0_pins_a>;
+			status = "okay";
+		};
+
+		i2c1: i2c at 01c2b000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c1_pins_a>;
+			status = "okay";
+		};
+
+		i2c2: i2c at 01c2b400 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c2_pins_a>;
+			status = "okay";
+		};
 	};
 
 	leds {
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20
  2013-09-11  9:30 [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
                   ` (3 preceding siblings ...)
  2013-09-11  9:30 ` [PATCH 4/4] ARM: sun7i: olinuxino-micro: " Maxime Ripard
@ 2013-09-18 16:40 ` Maxime Ripard
  4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2013-09-18 16:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 11, 2013 at 11:30:01AM +0200, Maxime Ripard wrote:
> Hi everyone,
> 
> This patchset enables the support for the I2C IP found in the Allwinner A20.
> Since it's basically the same IP than the one found in the other Allwinner
> SoCs, it's just a matter of enabling it in the device tree.

Merged into sunxi/dt-for-3.13

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- 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/20130918/81326b50/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-18 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11  9:30 [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard
2013-09-11  9:30 ` [PATCH 1/4] ARM: sun7i: Enable the I2C controllers Maxime Ripard
2013-09-11  9:30 ` [PATCH 2/4] ARM: sun7i: Add the pin muxing options for " Maxime Ripard
2013-09-11  9:30 ` [PATCH 3/4] ARM: sun7i: cubieboard2: Enable " Maxime Ripard
2013-09-11  9:30 ` [PATCH 4/4] ARM: sun7i: olinuxino-micro: " Maxime Ripard
2013-09-18 16:40 ` [PATCH 0/4] ARM: sun7i: Enable the I2C support for the A20 Maxime Ripard

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