ARM: sun9i: Enable extra uarts, leds and i2c controllers
Subsystems (2)
cover ARM: sun9i: Enable extra uarts, leds and i2c controllers
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.
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 | 49 +++++++++++++++++++++++ arch/arm/boot/dts/sun9i-a80.dtsi | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+)
Signature · 1 line
2.1.1
PATCH 1/6 ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi
The A80 has 5 i2c controllers in the main processor block.
--- arch/arm/boot/dts/sun9i-a80.dtsi | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+)
arch/arm/boot/dts/sun9i-a80.dtsi +55 -0
@@ -435,6 +435,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>;
Signature · 1 line
2.1.1
PATCH 2/6 ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC
In reply to Chen-Yu Tsaii2c3 has only one possible pinmux setting on the A80 SoC.
--- arch/arm/boot/dts/sun9i-a80.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sun9i-a80.dtsi +7 -0
@@ -361,6 +361,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";
Signature · 1 line
2.1.1
PATCH 3/6 ARM: dts: sun9i: Enable i2c3 on A80 Optimus board
In reply to Chen-Yu Tsaii2c3 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.
--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/boot/dts/sun9i-a80-optimus.dts +13 -0
@@ -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"; + }; }; };
Signature · 1 line
2.1.1
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
In reply to Chen-Yu TsaiThe 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.
--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/boot/dts/sun9i-a80-optimus.dts +25 -0
@@ -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,22 @@ status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + led2 { + label = "a80_optimus:led2:usr"; + gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */ + + led4 { + label = "a80_optimus:led4:usr"; + gpios = <&pio 7 1 0>; + }; + }; };
Signature · 1 line
2.1.1
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
Quoted 8 lines
Op 28 okt. 2014, om 10:50 heeft Chen-Yu Tsai <[email protected]> het volgende geschreven:
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_PIOcontroller, which we don't support yet.
Out of curiousity, are those LEDs labeled and if so, would it make sense to assign default triggers matching the labels to them? As a personal preference I tend to have one of the LEDs use the 'heartbeat' trigger so I can see that it's alive.
regards,
Koen
Quoted 55 lines
Signed-off-by Chen-Yu Tsai <[email protected]>---
arch/arm/boot/dts/sun9i-a80-optimus.dts| 25 +++++++++++++++++++++++++1 file changed, 25 insertions(+)arch/arm/boot/dts/sun9i-a80-optimus.dts +25
-0@@ -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,22 @@ status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + led2 { + label = "a80_optimus:led2:usr"; + gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */ + + led4 { + label = "a80_optimus:led4:usr"; + gpios = <&pio 7 1 0>; + }; + }; };Signature · 6 lines
2.1.1 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com. For more options, visit https://groups.google.com/d/optout.
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
Quoted 5 lines · Koen Kooi
Quoted 5 lines
Op 28 okt. 2014, om 10:50 heeft Chen-Yu Tsai <[email protected]> het volgende geschreven:
The A80 Optimus board has 3 usable LEDs that are controlled via GPIO.
Quoted 8 lines
Quoted 3 lines
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_PIOcontroller, which we don't support yet.Out of curiousity, are those LEDs labeled and if so, would it make sense to assign default triggers matching the labels to them? As a personal preference I tend to have one of the LEDs use the 'heartbeat' trigger so I can see that it's alive.
I'm not a huge fan of forcing this kind of policy decision down to the users, especially for such "generic" boards that don't have any labeled LEDs.
I feel like it's a userspace decision, but I don't have a strong opinion on this :)
Maxime
Signature · 10 lines
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/20141028/b04bf649/attachment.sig>
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
Quoted 6 lines · Maxime Ripard
Quoted 5 lines · Koen Kooi
Quoted 5 lines
Op 28 okt. 2014, om 10:50 heeft Chen-Yu Tsai <[email protected]> het volgende geschreven:
The A80 Optimus board has 3 usable LEDs that are controlled via GPIO.
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
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_PIOcontroller, which we don't support yet.Out of curiousity, are those LEDs labeled and if so, would it make sense to assign default triggers matching the labels to them? As a personal preference I tend to have one of the LEDs use the 'heartbeat' trigger so I can see that it's alive.
They are not labeled in any meaningful way (LED2~4), are next to each other, and are all the same color. Not very helpful. :|
The stock firmware uses them for mmc0, mmc1, and sleep activity.
Quoted 6 lines
I'm not a huge fan of forcing this kind of policy decision down to the users, especially for such "generic" boards that don't have any labeled LEDs.
I feel like it's a userspace decision, but I don't have a strong opinion on this :)
If the LEDs were more distinguishable from each other, I would go for a default behavior. But that is not the case.
ChenYu
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
In reply to Chen-Yu TsaiHi Chen-Yu,
Quoted 31 lines · Chen-Yu Tsai
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_PIOcontroller, which we don't support yet.Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm/boot/dts/sun9i-a80-optimus.dts +7
-0@@ -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,22 @@ status = "okay";
arch/arm/boot/dts/sun9i-a80-optimus.dts line 95
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +8
-0}; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + led2 { + label = "a80_optimus:led2:usr";
We're usually using a dash instead of an underscore as a separator.
arch/arm/boot/dts/sun9i-a80-optimus.dts line 99
Quoted 4 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +4
-0+ gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */
You were saying that there is three LEDs, why start the numbering at 2?
arch/arm/boot/dts/sun9i-a80-optimus.dts line 106
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +6
-0+ + led4 { + label = "a80_optimus:led4:usr"; + gpios = <&pio 7 1 0>; + }; + }; };
The rest of your patchset is fine for me, we just need to get the pinctrl driver merged first :)
Thanks!
Maxime
Signature · 10 lines
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/20141028/a985b3b6/attachment.sig>
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
Hi,
Am 28.10.2014 um 21:16 schrieb Maxime Ripard:
Quoted 14 lines
Hi Chen-Yu,
Quoted 11 lines · Chen-Yu Tsai
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_PIOcontroller, which we don't support yet.Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 68
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +2
-0@@ -64,6 +64,13 @@ /* Enable internal pull-up */ allwinner,pull = <1>; }; + + led_pins_optimus: led_pins at 0 {
Here too, led-pins at 0 would be more in line with DT conventions.
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +5
-0+ allwinner,pins = "PH0", "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; };
Quoted 15 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 95
Quoted 13 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +8
-0uart0: serial at 07000000 {@@ -78,4 +85,22 @@ status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + led2 { + label = "a80_optimus:led2:usr";We're usually using a dash instead of an underscore as a separator.
I wonder, why a80_? The board is labeled "Allwinner Tech Optimus Board", and the Cubietruck LEDs are not prefixed with a20_ either.
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 99
Quoted 4 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +4
-0+ gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */You were saying that there is three LEDs, why start the numbering at 2?
They are labeled "LED2", "LED4", "LED3" right-to-left. Additionally there's a "PWR" LED, maybe that counts as number 1...
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 106
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +6
-0+ + led4 { + label = "a80_optimus:led4:usr"; + gpios = <&pio 7 1 0>; + }; + }; };The rest of your patchset is fine for me, we just need to get the pinctrl driver merged first :)
Cheers,
Andreas
Signature · 10 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer; HRB 16746 AG N?rnberg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141028/b4a122d3/attachment.sig>
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
Hi,
Quoted 17 lines · Andreas F?rber
Hi,
Am 28.10.2014 um 21:16 schrieb Maxime Ripard:
Quoted 14 lines
Hi Chen-Yu,
Quoted 11 lines · Chen-Yu Tsai
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_PIOcontroller, which we don't support yet.Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
Quoted 12 lines
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 68
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +2
-0@@ -64,6 +64,13 @@ /* Enable internal pull-up */ allwinner,pull = <1>; }; + + led_pins_optimus: led_pins at 0 {Here too, led-pins at 0 would be more in line with DT conventions.
Ok. To be fair we were mixing usage in the past, with most of them using underscores.
Quoted 23 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +5
-0+ allwinner,pins = "PH0", "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; };Quoted 15 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 95
Quoted 13 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +8
-0uart0: serial at 07000000 {@@ -78,4 +85,22 @@ status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + led2 { + label = "a80_optimus:led2:usr";We're usually using a dash instead of an underscore as a separator.
Quoted 2 lines
I wonder, why
a80_? The board is labeled "Allwinner Tech Optimus Board", and the Cubietruck LEDs are not prefixed witha20_either.
IIRC, The board was first marketed as "A80 Optimus Board". Merrii's website now lists it as "A80 OptimusBoard", while as you said, the board itself is labeled "Allwinner Tech Optimus Board"
Furthermore, the dts has model = "Merrii A80 Optimus Board". Anyway, I'll drop the a80_ prefix, unless someone thinks we should keep it.
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +4
-0+ gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */
Quoted 16 lines
Quoted 2 lines
You were saying that there is three LEDs, why start the numbering at 2?
They are labeled "LED2", "LED4", "LED3" right-to-left. Additionally there's a "PWR" LED, maybe that counts as number 1...
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 106
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +6
-0+ + led4 { + label = "a80_optimus:led4:usr"; + gpios = <&pio 7 1 0>; + }; + }; };The rest of your patchset is fine for me, we just need to get the pinctrl driver merged first :)
Cheers
ChenYu
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
In reply to Andreas FärberQuoted 10 lines · Andreas F?rber
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 99
Quoted 4 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +4
-0+ gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */You were saying that there is three LEDs, why start the numbering at 2?
They are labeled "LED2", "LED4", "LED3" right-to-left. Additionally there's a "PWR" LED, maybe that counts as number 1...
I knew I should have looked at my board. That makes perfect sense, thanks.
Maxime
Signature · 10 lines
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/20141030/56de73d0/attachment.sig>
PATCH 4/6 ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
In reply to Maxime RipardQuoted 31 lines · Maxime Ripard
Hi Chen-Yu,
Quoted 28 lines · Chen-Yu Tsai
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_PIOcontroller, which we don't support yet.Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm/boot/dts/sun9i-a80-optimus.dts +7
-0@@ -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>; + }; };
Quoted 15 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 95
Quoted 13 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +8
-0uart0: serial at 07000000 {@@ -78,4 +85,22 @@ status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + led2 { + label = "a80_optimus:led2:usr";We're usually using a dash instead of an underscore as a separator.
Ok.
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 99
Quoted 4 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +4
-0+ gpios = <&pio 7 0 0>; + }; + + /* led3 is on PM15, in R_PIO */You were saying that there is three LEDs, why start the numbering at 2?
That's what's printed on the board next to the LEDs. I looked around but couldn't find LED1.
Quoted 10 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts line 106
Quoted 7 lines
arch/arm/boot/dts/sun9i-a80-optimus.dts +6
-0+ + led4 { + label = "a80_optimus:led4:usr"; + gpios = <&pio 7 1 0>; + }; + }; };The rest of your patchset is fine for me, we just need to get the pinctrl driver merged first :)
Thanks!
ChenYu
PATCH 5/6 ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC
In reply to Chen-Yu Tsaiuart4 only has one possible pinmux setting on the A80 SoC.
--- arch/arm/boot/dts/sun9i-a80.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sun9i-a80.dtsi +7 -0
@@ -374,6 +374,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 {
Signature · 1 line
2.1.1
PATCH 6/6 ARM: dts: sun9i: Enable uart4 for A80 Optimus board
In reply to Chen-Yu TsaiThe 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.
--- arch/arm/boot/dts/sun9i-a80-optimus.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/sun9i-a80-optimus.dts +11 -0
@@ -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>;
Signature · 1 line
2.1.1