* [PATCH 1/3] ARM: dts: sun7i: Add uart4_pins_b definition
@ 2015-05-21 12:32 Hans de Goede
[not found] ` <1432211555-25078-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-05-21 12:32 UTC (permalink / raw)
To: Maxime Ripard
Cc: Michael Ring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
From: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
Some boards (e.g. the BananaPro) use alternative pins for uart4, add a pinmux
entry for these.
Signed-off-by: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun7i-a20.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e04cdf9..99d48b4 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -844,6 +844,13 @@
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+ uart4_pins_b: uart4@1 {
+ allwinner,pins = "PH4", "PH5";
+ allwinner,function = "uart4";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
uart5_pins_a: uart5@0 {
allwinner,pins = "PI10", "PI11";
allwinner,function = "uart5";
--
2.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] ARM: dts: sun7i: Add uart2 support for BananaPi
[not found] ` <1432211555-25078-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-05-21 12:32 ` Hans de Goede
[not found] ` <1432211555-25078-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 12:32 ` [PATCH 3/3] ARM: dts: sun7i: Add uart4 support for BananaPro, disable uart2 Hans de Goede
2015-05-21 17:45 ` [PATCH 1/3] ARM: dts: sun7i: Add uart4_pins_b definition Maxime Ripard
2 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-05-21 12:32 UTC (permalink / raw)
To: Maxime Ripard
Cc: Michael Ring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
From: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
Uart2 is available at the bananapi io-pins, add a dts node for this
(so that people can easily enable it) but leave it disabled as the pins
are primarily intended for gpio as documented here:
http://wiki.lemaker.org/Pin_definition
Signed-off-by: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
[hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org: Disable uart2 by default]
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun7i-a20-bananapi.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 9f7b472..3e357ef 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -58,6 +58,7 @@
serial0 = &uart0;
serial1 = &uart3;
serial2 = &uart7;
+ serial3 = &uart2;
};
chosen {
@@ -204,6 +205,12 @@
status = "okay";
};
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins_a>;
+ status = "disabled";
+};
+
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins_b>;
--
2.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] ARM: dts: sun7i: Add uart4 support for BananaPro, disable uart2
[not found] ` <1432211555-25078-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 12:32 ` [PATCH 2/3] ARM: dts: sun7i: Add uart2 support for BananaPi Hans de Goede
@ 2015-05-21 12:32 ` Hans de Goede
2015-05-21 17:45 ` [PATCH 1/3] ARM: dts: sun7i: Add uart4_pins_b definition Maxime Ripard
2 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2015-05-21 12:32 UTC (permalink / raw)
To: Maxime Ripard
Cc: Michael Ring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
From: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
The BananaPro uses uart4 for the default rx/tx pins on the 40 pins connector,
so enable uart4.
Uart2 is also available at the bananapro io-pins, but like on the bananapi
the primary function of the pins is to act as gpios, see:
http://forum.lemaker.org/forum.php?mod=viewthread&tid=10852
Disable the uart2 node by default, but leave it in place so that people
can easily enable it.
Signed-off-by: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
[hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org: Disable uart2 by default]
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun7i-a20-bananapro.dts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
index 45e2a02..4edb8a4 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
@@ -52,8 +52,9 @@
aliases {
serial0 = &uart0;
- serial1 = &uart2;
+ serial1 = &uart4;
serial2 = &uart7;
+ serial3 = &uart2;
};
chosen {
@@ -253,6 +254,12 @@
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins_a>;
+ status = "disabled";
+};
+
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins_b>;
status = "okay";
};
--
2.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] ARM: dts: sun7i: Add uart4_pins_b definition
[not found] ` <1432211555-25078-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 12:32 ` [PATCH 2/3] ARM: dts: sun7i: Add uart2 support for BananaPi Hans de Goede
2015-05-21 12:32 ` [PATCH 3/3] ARM: dts: sun7i: Add uart4 support for BananaPro, disable uart2 Hans de Goede
@ 2015-05-21 17:45 ` Maxime Ripard
2 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2015-05-21 17:45 UTC (permalink / raw)
To: Hans de Goede
Cc: Michael Ring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
On Thu, May 21, 2015 at 02:32:33PM +0200, Hans de Goede wrote:
> From: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
>
> Some boards (e.g. the BananaPro) use alternative pins for uart4, add a pinmux
> entry for these.
>
> Signed-off-by: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] ARM: dts: sun7i: Add uart2 support for BananaPi
[not found] ` <1432211555-25078-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-05-21 18:45 ` Maxime Ripard
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2015-05-21 18:45 UTC (permalink / raw)
To: Hans de Goede
Cc: Michael Ring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On Thu, May 21, 2015 at 02:32:34PM +0200, Hans de Goede wrote:
> From: Michael Ring <mail-u1jPNj63thkWnkcawLe0jA@public.gmane.org>
>
> Uart2 is available at the bananapi io-pins, add a dts node for this
> (so that people can easily enable it) but leave it disabled as the pins
> are primarily intended for gpio as documented here:
> http://wiki.lemaker.org/Pin_definition
So far the policy we had on this is only to add to the DT the primary
purpose of these pins.
Even though that might seem arbitrary, it's the only way to prevent
anyone adding their own configuration for those pins, which would be a
mess to maintain and use. It's even more true since that sort of thing
is exactly where the overlays shine.
So, I'm ok with adding the uart4, but the uart2 should go.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-21 18:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 12:32 [PATCH 1/3] ARM: dts: sun7i: Add uart4_pins_b definition Hans de Goede
[not found] ` <1432211555-25078-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 12:32 ` [PATCH 2/3] ARM: dts: sun7i: Add uart2 support for BananaPi Hans de Goede
[not found] ` <1432211555-25078-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 18:45 ` Maxime Ripard
2015-05-21 12:32 ` [PATCH 3/3] ARM: dts: sun7i: Add uart4 support for BananaPro, disable uart2 Hans de Goede
2015-05-21 17:45 ` [PATCH 1/3] ARM: dts: sun7i: Add uart4_pins_b definition 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).