* [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers
@ 2014-10-31 3:05 Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 1/6] ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi Chen-Yu Tsai
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
This series enables the uart and i2c controller found on the A80 Optimus
board's gpio expansion header, as well as 2 out of 3 onboard LEDs. The
last LED needs R_PIO support.
This series contains only changes to the dtsi and dts files, and is based
on Maxime's pinctrl driver series. The patches should be self-explanatory.
Changes since v1:
- Dropped a80_ prefix on the led labels
- Fixed mapping for leds to pins, previously led2 and led4 were reversed.
- Use dash instead of underscore in led-pins DT node name
Cheers,
ChenYu
Chen-Yu Tsai (6):
ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi
ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC
ARM: dts: sun9i: Enable i2c3 on A80 Optimus board
ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC
ARM: dts: sun9i: Enable uart4 for A80 Optimus board
arch/arm/boot/dts/sun9i-a80-optimus.dts | 51 ++++++++++++++++++++++++
arch/arm/boot/dts/sun9i-a80.dtsi | 69 +++++++++++++++++++++++++++++++++
2 files changed, 120 insertions(+)
--
2.1.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/6] ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
@ 2014-10-31 3:05 ` Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 2/6] ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC Chen-Yu Tsai
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
The A80 has 5 i2c controllers in the main processor block.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80.dtsi | 55 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index da680cf..3ec727d 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -426,6 +426,61 @@
status = "disabled";
};
+ i2c0: i2c at 07002800 {
+ compatible = "allwinner,sun6i-a31-i2c";
+ reg = <0x07002800 0x400>;
+ interrupts = <0 6 4>;
+ clocks = <&apb1_gates 0>;
+ resets = <&apb1_resets 0>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c1: i2c at 07002c00 {
+ compatible = "allwinner,sun6i-a31-i2c";
+ reg = <0x07002c00 0x400>;
+ interrupts = <0 7 4>;
+ clocks = <&apb1_gates 1>;
+ resets = <&apb1_resets 1>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c2: i2c at 07003000 {
+ compatible = "allwinner,sun6i-a31-i2c";
+ reg = <0x07003000 0x400>;
+ interrupts = <0 8 4>;
+ clocks = <&apb1_gates 2>;
+ resets = <&apb1_resets 2>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c3: i2c at 07003400 {
+ compatible = "allwinner,sun6i-a31-i2c";
+ reg = <0x07003400 0x400>;
+ interrupts = <0 9 4>;
+ clocks = <&apb1_gates 3>;
+ resets = <&apb1_resets 3>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c4: i2c at 07003800 {
+ compatible = "allwinner,sun6i-a31-i2c";
+ reg = <0x07003800 0x400>;
+ interrupts = <0 10 4>;
+ clocks = <&apb1_gates 4>;
+ resets = <&apb1_resets 4>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
r_wdt: watchdog at 08001000 {
compatible = "allwinner,sun6i-a31-wdt";
reg = <0x08001000 0x20>;
--
2.1.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/6] ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 1/6] ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi Chen-Yu Tsai
@ 2014-10-31 3:05 ` Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 3/6] ARM: dts: sun9i: Enable i2c3 on A80 Optimus board Chen-Yu Tsai
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
i2c3 has only one possible pinmux setting on the A80 SoC.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 3ec727d..0a1f1a8 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -352,6 +352,13 @@
#size-cells = <0>;
#gpio-cells = <3>;
+ i2c3_pins_a: i2c3 at 0 {
+ allwinner,pins = "PG10", "PG11";
+ allwinner,function = "i2c3";
+ allwinner,drive = <0>;
+ allwinner,pull = <0>;
+ };
+
uart0_pins_a: uart0 at 0 {
allwinner,pins = "PH12", "PH13";
allwinner,function = "uart0";
--
2.1.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/6] ARM: dts: sun9i: Enable i2c3 on A80 Optimus board
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 1/6] ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 2/6] ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC Chen-Yu Tsai
@ 2014-10-31 3:05 ` Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 4/6] ARM: dts: sun9i: Add GPIO LEDs for " Chen-Yu Tsai
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
i2c3 is exposed on the GPIO extension header. Enable it so we can use it.
Also enable internal pull-ups on the pins, as they don't seem to have
external pull-up resistors.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80-optimus.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index 5d9bc80..955436a 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -59,10 +59,23 @@
};
soc {
+ pio: pinctrl at 06000800 {
+ i2c3_pins_a: i2c3 at 0 {
+ /* Enable internal pull-up */
+ allwinner,pull = <1>;
+ };
+ };
+
uart0: serial at 07000000 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
+
+ i2c3: i2c at 07003400 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins_a>;
+ status = "okay";
+ };
};
};
--
2.1.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/6] ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
` (2 preceding siblings ...)
2014-10-31 3:05 ` [PATCH v2 3/6] ARM: dts: sun9i: Enable i2c3 on A80 Optimus board Chen-Yu Tsai
@ 2014-10-31 3:05 ` Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 5/6] ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC Chen-Yu Tsai
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
The A80 Optimus board has 3 usable LEDs that are controlled via GPIO.
This patch adds support for 2 of them which are driver by GPIOs in the
main pin controller. The remaining one uses GPIO from the R_PIO
controller, which we don't support yet.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80-optimus.dts | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index 955436a..87b1355 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -64,6 +64,13 @@
/* Enable internal pull-up */
allwinner,pull = <1>;
};
+
+ led_pins_optimus: led-pins at 0 {
+ allwinner,pins = "PH0", "PH1";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <0>;
+ allwinner,pull = <0>;
+ };
};
uart0: serial at 07000000 {
@@ -78,4 +85,24 @@
status = "okay";
};
};
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins_optimus>;
+
+ /* The LED names match those found on the board */
+
+ led2 {
+ label = "optimus:led2:usr";
+ gpios = <&pio 7 1 0>;
+ };
+
+ /* led3 is on PM15, in R_PIO */
+
+ led4 {
+ label = "optimus:led4:usr";
+ gpios = <&pio 7 0 0>;
+ };
+ };
};
--
2.1.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 5/6] ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
` (3 preceding siblings ...)
2014-10-31 3:05 ` [PATCH v2 4/6] ARM: dts: sun9i: Add GPIO LEDs for " Chen-Yu Tsai
@ 2014-10-31 3:05 ` Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 6/6] ARM: dts: sun9i: Enable uart4 for A80 Optimus board Chen-Yu Tsai
2014-10-31 8:27 ` [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Maxime Ripard
6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
uart4 only has one possible pinmux setting on the A80 SoC.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 0a1f1a8..494714f 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -365,6 +365,13 @@
allwinner,drive = <0>;
allwinner,pull = <0>;
};
+
+ uart4_pins_a: uart4 at 0 {
+ allwinner,pins = "PG12", "PG13", "PG14", "PG15";
+ allwinner,function = "uart4";
+ allwinner,drive = <0>;
+ allwinner,pull = <0>;
+ };
};
uart0: serial at 07000000 {
--
2.1.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 6/6] ARM: dts: sun9i: Enable uart4 for A80 Optimus board
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
` (4 preceding siblings ...)
2014-10-31 3:05 ` [PATCH v2 5/6] ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC Chen-Yu Tsai
@ 2014-10-31 3:05 ` Chen-Yu Tsai
2014-10-31 8:27 ` [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Maxime Ripard
6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2014-10-31 3:05 UTC (permalink / raw)
To: linux-arm-kernel
The A80 Optimus board exposes uart4 on the GPIO expansion header.
Enable it so we can use it.
Also enable the internal pull-ups, as there doesn't seem to be
external pull-up resistors for pins on the expansion header.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun9i-a80-optimus.dts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index 87b1355..506948f 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -71,6 +71,11 @@
allwinner,drive = <0>;
allwinner,pull = <0>;
};
+
+ uart4_pins_a: uart4 at 0 {
+ /* Enable internal pull-up */
+ allwinner,pull = <1>;
+ };
};
uart0: serial at 07000000 {
@@ -79,6 +84,12 @@
status = "okay";
};
+ uart4: serial at 07001000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins_a>;
+ status = "okay";
+ };
+
i2c3: i2c at 07003400 {
pinctrl-names = "default";
pinctrl-0 = <&i2c3_pins_a>;
--
2.1.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
` (5 preceding siblings ...)
2014-10-31 3:05 ` [PATCH v2 6/6] ARM: dts: sun9i: Enable uart4 for A80 Optimus board Chen-Yu Tsai
@ 2014-10-31 8:27 ` Maxime Ripard
6 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-10-31 8:27 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 31, 2014 at 11:05:45AM +0800, Chen-Yu Tsai wrote:
> Hi,
>
> This series enables the uart and i2c controller found on the A80 Optimus
> board's gpio expansion header, as well as 2 out of 3 onboard LEDs. The
> last LED needs R_PIO support.
>
> This series contains only changes to the dtsi and dts files, and is based
> on Maxime's pinctrl driver series. The patches should be self-explanatory.
>
> Changes since v1:
>
> - Dropped a80_ prefix on the led labels
> - Fixed mapping for leds to pins, previously led2 and led4 were reversed.
> - Use dash instead of underscore in led-pins DT node name
Merged, thanks!
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: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141031/f3709f90/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-10-31 8:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 1/6] ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 2/6] ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 3/6] ARM: dts: sun9i: Enable i2c3 on A80 Optimus board Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 4/6] ARM: dts: sun9i: Add GPIO LEDs for " Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 5/6] ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC Chen-Yu Tsai
2014-10-31 3:05 ` [PATCH v2 6/6] ARM: dts: sun9i: Enable uart4 for A80 Optimus board Chen-Yu Tsai
2014-10-31 8:27 ` [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Maxime Ripard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.