* [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements
@ 2016-03-20 16:00 Hans de Goede
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
Hi Maxime and Chen-Yu,
Here is a series with various improvements for the Orangepi Plus dts.
Some (most) of these patches have been submitted before, esp. the USB
ones have multiple revisions before. But I lost count of their version,
so I'm posting this as a "new" set.
About the USB patches, these rely on the patches to add support for
multiple-reset controllers to ohci-platform / ehci-platform. These
patches are all acked up and will go upstream as soon as v4.6-rc1 is
released (they depend on changes which will go into v4.6-rc1).
The old ohci-platform / ehci-platform will only look at the first reset
specified in the dt and as such will fail to load with the new dt nodes
(because they cannot talk to the controller).
I've also included a v6 of Krzysztof Adamski <k@japko.eu> leds / switches
patch, fixing the comments you had in your review of v5. I've done this
to avoid conflicts with my other patches.
Regards,
Hans
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/8] ARM: dts: sun8i: Add mmc2_8bit_pins to sun8i-h3.dtsi
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 2/8] ARM: dts: sun8i: Add support for H3 usb clocks Hans de Goede
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
Add a pinctrl node for mmc2 in 8 bits mode on H3 SoCs.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index dadb7f6..d1be2f5 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -417,6 +417,16 @@
allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+
+ mmc2_8bit_pins: mmc2_8bit {
+ allwinner,pins = "PC5", "PC6", "PC8",
+ "PC9", "PC10", "PC11",
+ "PC12", "PC13", "PC14",
+ "PC15", "PC16";
+ allwinner,function = "mmc2";
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
ahb_rst: reset@01c202c0 {
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/8] ARM: dts: sun8i: Add support for H3 usb clocks
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-20 16:00 ` [PATCH 1/8] ARM: dts: sun8i: Add mmc2_8bit_pins to sun8i-h3.dtsi Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 3/8] ARM: dts: sun8i: Add usbphy and usb host controller nodes Hans de Goede
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Reinder de Haan,
Hans de Goede
From: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>
Add a node describing the usb-clks found on the H3.
Signed-off-by: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index d1be2f5..3a2e6e2 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -269,6 +269,18 @@
"mmc2_sample";
};
+ usb_clk: clk@01c200cc {
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ compatible = "allwinner,sun8i-h3-usb-clk";
+ reg = <0x01c200cc 0x4>;
+ clocks = <&osc24M>;
+ clock-output-names = "usb_phy0", "usb_phy1",
+ "usb_phy2", "usb_phy3",
+ "usb_ohci0", "usb_ohci1",
+ "usb_ohci2", "usb_ohci3";
+ };
+
mbus_clk: clk@01c2015c {
#clock-cells = <0>;
compatible = "allwinner,sun8i-a23-mbus-clk";
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/8] ARM: dts: sun8i: Add usbphy and usb host controller nodes
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-20 16:00 ` [PATCH 1/8] ARM: dts: sun8i: Add mmc2_8bit_pins to sun8i-h3.dtsi Hans de Goede
2016-03-20 16:00 ` [PATCH 2/8] ARM: dts: sun8i: Add support for H3 usb clocks Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 4/8] ARM: dts: sun8i: Enable USB host controllers on Orangepi Plus boards Hans de Goede
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Reinder de Haan,
Hans de Goede
From: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>
Add nodes describing the H3's usbphy and usb host controller nodes.
Signed-off-by: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3.dtsi | 101 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 3a2e6e2..4a4926b 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -389,6 +389,107 @@
#size-cells = <0>;
};
+ usbphy: phy@01c19400 {
+ compatible = "allwinner,sun8i-h3-usb-phy";
+ reg = <0x01c19400 0x2c>,
+ <0x01c1a800 0x4>,
+ <0x01c1b800 0x4>,
+ <0x01c1c800 0x4>,
+ <0x01c1d800 0x4>;
+ reg-names = "phy_ctrl",
+ "pmu0",
+ "pmu1",
+ "pmu2",
+ "pmu3";
+ clocks = <&usb_clk 8>,
+ <&usb_clk 9>,
+ <&usb_clk 10>,
+ <&usb_clk 11>;
+ clock-names = "usb0_phy",
+ "usb1_phy",
+ "usb2_phy",
+ "usb3_phy";
+ resets = <&usb_clk 0>,
+ <&usb_clk 1>,
+ <&usb_clk 2>,
+ <&usb_clk 3>;
+ reset-names = "usb0_reset",
+ "usb1_reset",
+ "usb2_reset",
+ "usb3_reset";
+ status = "disabled";
+ #phy-cells = <1>;
+ };
+
+ ehci1: usb@01c1b000 {
+ compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
+ reg = <0x01c1b000 0x100>;
+ interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bus_gates 25>, <&bus_gates 29>;
+ resets = <&ahb_rst 25>, <&ahb_rst 29>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci1: usb@01c1b400 {
+ compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
+ reg = <0x01c1b400 0x100>;
+ interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bus_gates 29>, <&bus_gates 25>,
+ <&usb_clk 17>;
+ resets = <&ahb_rst 29>, <&ahb_rst 25>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci2: usb@01c1c000 {
+ compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
+ reg = <0x01c1c000 0x100>;
+ interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bus_gates 26>, <&bus_gates 30>;
+ resets = <&ahb_rst 26>, <&ahb_rst 30>;
+ phys = <&usbphy 2>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci2: usb@01c1c400 {
+ compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
+ reg = <0x01c1c400 0x100>;
+ interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bus_gates 30>, <&bus_gates 26>,
+ <&usb_clk 18>;
+ resets = <&ahb_rst 30>, <&ahb_rst 26>;
+ phys = <&usbphy 2>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci3: usb@01c1d000 {
+ compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
+ reg = <0x01c1d000 0x100>;
+ interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bus_gates 27>, <&bus_gates 31>;
+ resets = <&ahb_rst 27>, <&ahb_rst 31>;
+ phys = <&usbphy 3>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci3: usb@01c1d400 {
+ compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
+ reg = <0x01c1d400 0x100>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bus_gates 31>, <&bus_gates 27>,
+ <&usb_clk 19>;
+ resets = <&ahb_rst 31>, <&ahb_rst 27>;
+ phys = <&usbphy 3>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
pio: pinctrl@01c20800 {
compatible = "allwinner,sun8i-h3-pinctrl";
reg = <0x01c20800 0x400>;
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/8] ARM: dts: sun8i: Enable USB host controllers on Orangepi Plus boards
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2016-03-20 16:00 ` [PATCH 3/8] ARM: dts: sun8i: Add usbphy and usb host controller nodes Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 5/8] ARM: dts: sun8i: Enable IR receiver " Hans de Goede
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jens Kuske, Reinder de Haan,
Hans de Goede
From: Jens Kuske <jenskuske-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Enable the 2 USB host controllers used on the Orange Pi Plus
and add the necessary regulators.
Signed-off-by: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jens Kuske <jenskuske-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 44 ++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index e67df59..1cb6c66 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -58,6 +58,35 @@
chosen {
stdout-path = "serial0:115200n8";
};
+
+ reg_usb3_vbus: usb3-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb3_vbus_pin_a>;
+ regulator-name = "usb3-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-boot-on;
+ enable-active-high;
+ gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ehci3 {
+ status = "okay";
+};
+
+&pio {
+ usb3_vbus_pin_a: usb3_vbus_pin@0 {
+ allwinner,pins = "PG11";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
&mmc0 {
@@ -70,8 +99,23 @@
status = "okay";
};
+®_usb1_vbus {
+ gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
+
+&usb1_vbus_pin_a {
+ allwinner,pins = "PG13";
+};
+
+&usbphy {
+ usb1_vbus-supply = <®_usb1_vbus>;
+ usb3_vbus-supply = <®_usb3_vbus>;
+ status = "okay";
+};
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/8] ARM: dts: sun8i: Enable IR receiver on Orangepi Plus boards
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (3 preceding siblings ...)
2016-03-20 16:00 ` [PATCH 4/8] ARM: dts: sun8i: Enable USB host controllers on Orangepi Plus boards Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 6/8] ARM: dts: sun8i: Add leds and switches " Hans de Goede
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
Enable the ir receiver found on the orangepi plus board.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index 1cb6c66..a680b1f 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -80,6 +80,12 @@
status = "okay";
};
+&ir {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_pins_a>;
+ status = "okay";
+};
+
&pio {
usb3_vbus_pin_a: usb3_vbus_pin@0 {
allwinner,pins = "PG11";
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/8] ARM: dts: sun8i: Add leds and switches on Orangepi Plus boards
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (4 preceding siblings ...)
2016-03-20 16:00 ` [PATCH 5/8] ARM: dts: sun8i: Enable IR receiver " Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 7/8] ARM: dts: sun8i: Add wifi dt node " Hans de Goede
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
From: Krzysztof Adamski <k@japko.eu>
OrangePi Plus board has two leds - green ("pwr") and red ("status")
and two switches ("sw4" and "sw2"). This patch describes them in
devicetree.
Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
Changes in v6 (hdegoede):
-Merge leds and r_leds nodes into one
-Fix led labels to be in <board>:<colour>:<role> form
-Alphabetically sort the added nodes
-Add support for sw2 (this is the small reset-like button)
---
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index a680b1f..a7cdfd0 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -45,6 +45,7 @@
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
@@ -59,6 +60,43 @@
stdout-path = "serial0:115200n8";
};
+ gpio_keys {
+ compatible = "gpio-keys";
+ input-name = "sw4";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sw_r_opc>;
+
+ sw2@0 {
+ label = "sw2";
+ linux,code = <BTN_1>;
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>;
+ };
+
+ sw4@0 {
+ label = "sw4";
+ linux,code = <BTN_0>;
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
+
+ status_led {
+ label = "orangepi-plus:red:status";
+ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ pwr_led {
+ label = "orangepi-plus:green:pwr";
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
reg_usb3_vbus: usb3-vbus {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -72,6 +110,31 @@
};
};
+&pio {
+ leds_opc: led_pins@0 {
+ allwinner,pins = "PA15";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
+&r_pio {
+ leds_r_opc: led_pins@0 {
+ allwinner,pins = "PL10";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
+ sw_r_opc: key_pins@0 {
+ allwinner,pins = "PL03", "PL04";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
&ehci1 {
status = "okay";
};
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/8] ARM: dts: sun8i: Add wifi dt node on Orangepi Plus boards
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (5 preceding siblings ...)
2016-03-20 16:00 ` [PATCH 6/8] ARM: dts: sun8i: Add leds and switches " Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:00 ` [PATCH 8/8] ARM: dts: sun8i: Add eMMC " Hans de Goede
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
The Orangepi Plus and Orangepi Plus 2 have a realtek rtl8189etv sdio
wifi chip. This commit adds a device-tree node to power it up, so
that the mmc subsys can scan it, and enables the mmc controller which
is connected to it.
Note that this just makes the wifi controller show up as a sdio device.
In order for it to work a compatible sdio driver is necessary, an out
of tree driver is available here:
https://github.com/jwrdegoede/rtl8189ES_linux/
Binding the driver is not done through device tree, but through sdio
vendor- and device-id, so it can safely be enabled in devicetree
without having a driver upstream yet.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index a7cdfd0..f5aa694 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -108,6 +108,13 @@
enable-active-high;
gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
};
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_pwrseq_pin_orangepi>;
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 WIFI_EN */
+ };
};
&pio {
@@ -156,6 +163,13 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+
+ wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 {
+ allwinner,pins = "PL7";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
&mmc0 {
@@ -168,6 +182,16 @@
status = "okay";
};
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins_a>;
+ vmmc-supply = <®_vcc3v3>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+};
+
®_usb1_vbus {
gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 8/8] ARM: dts: sun8i: Add eMMC dt node on Orangepi Plus boards
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (6 preceding siblings ...)
2016-03-20 16:00 ` [PATCH 7/8] ARM: dts: sun8i: Add wifi dt node " Hans de Goede
@ 2016-03-20 16:00 ` Hans de Goede
2016-03-20 16:05 ` [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements Chen-Yu Tsai
2016-03-21 8:03 ` Maxime Ripard
9 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
The Orangepi Plus has a 16GB eMMC, the vcc, the lack of pull-ups and
the use of the hw-reset pin have all been verified with the board
schematic.
With this dts node for mmc2, the eMMC runs at the following ios settings:
clock: 52000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 3 (8 bits)
timing spec: 8 (mmc DDR52)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)
Note the mmcblk1boot0/boot1 partitions are unused as the BROM will load
the SPL from 8k from the start of the main blockdev, just as with a
regular sdcard in mmc0.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index f5aa694..7129aff 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -192,6 +192,23 @@
status = "okay";
};
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_8bit_pins>;
+ vmmc-supply = <®_vcc3v3>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ status = "okay";
+};
+
+&mmc2_8bit_pins {
+ /* Increase drive strength for DDR modes */
+ allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+ /* eMMC is missing pull-ups */
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
®_usb1_vbus {
gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.7.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (7 preceding siblings ...)
2016-03-20 16:00 ` [PATCH 8/8] ARM: dts: sun8i: Add eMMC " Hans de Goede
@ 2016-03-20 16:05 ` Chen-Yu Tsai
[not found] ` <CAGb2v65THg3fcdTJvFBCxxbSU_vOWmB9tP4f2QUbPyUU9D=zig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-21 8:03 ` Maxime Ripard
9 siblings, 1 reply; 12+ messages in thread
From: Chen-Yu Tsai @ 2016-03-20 16:05 UTC (permalink / raw)
To: Hans de Goede
Cc: Maxime Ripard, Chen-Yu Tsai, Krzysztof Adamski, linux-arm-kernel,
devicetree, linux-sunxi
Hi,
On Mon, Mar 21, 2016 at 12:00 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Hi Maxime and Chen-Yu,
>
> Here is a series with various improvements for the Orangepi Plus dts.
> Some (most) of these patches have been submitted before, esp. the USB
> ones have multiple revisions before. But I lost count of their version,
> so I'm posting this as a "new" set.
>
> About the USB patches, these rely on the patches to add support for
> multiple-reset controllers to ohci-platform / ehci-platform. These
> patches are all acked up and will go upstream as soon as v4.6-rc1 is
> released (they depend on changes which will go into v4.6-rc1).
Does this mean you or I can send the Orange Pi PC DTS patch?
Thanks
ChenYu
> The old ohci-platform / ehci-platform will only look at the first reset
> specified in the dt and as such will fail to load with the new dt nodes
> (because they cannot talk to the controller).
>
> I've also included a v6 of Krzysztof Adamski <k@japko.eu> leds / switches
> patch, fixing the comments you had in your review of v5. I've done this
> to avoid conflicts with my other patches.
>
> Regards,
>
> Hans
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Re: [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements
[not found] ` <CAGb2v65THg3fcdTJvFBCxxbSU_vOWmB9tP4f2QUbPyUU9D=zig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-03-20 18:41 ` Hans de Goede
0 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2016-03-20 18:41 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Maxime Ripard, Krzysztof Adamski, linux-arm-kernel, devicetree,
linux-sunxi
Hi,
On 20-03-16 17:05, Chen-Yu Tsai wrote:
> Hi,
>
> On Mon, Mar 21, 2016 at 12:00 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> Hi Maxime and Chen-Yu,
>>
>> Here is a series with various improvements for the Orangepi Plus dts.
>> Some (most) of these patches have been submitted before, esp. the USB
>> ones have multiple revisions before. But I lost count of their version,
>> so I'm posting this as a "new" set.
>>
>> About the USB patches, these rely on the patches to add support for
>> multiple-reset controllers to ohci-platform / ehci-platform. These
>> patches are all acked up and will go upstream as soon as v4.6-rc1 is
>> released (they depend on changes which will go into v4.6-rc1).
>
> Does this mean you or I can send the Orange Pi PC DTS patch?
Yes, I was planning on submitting a v2 of it shortly, with support
for IR and the LEDs / buttons added.
Regards,
Hans
p.s.
I just noticed a problem with the pinctrl node in
"Add leds and switches on Orangepi Plus boards"
patch, causing the following to show up in dmesg:
[ 1.569702] sun8i-h3-r-pinctrl 1f02c00.pinctrl: unknown pin PL03
[ 1.575741] sun8i-h3-r-pinctrl 1f02c00.pinctrl: unknown pin PL04
I'll submit a v7 soon, this replaces the one from this set, and should
be applied in the same order as the v6
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (8 preceding siblings ...)
2016-03-20 16:05 ` [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements Chen-Yu Tsai
@ 2016-03-21 8:03 ` Maxime Ripard
9 siblings, 0 replies; 12+ messages in thread
From: Maxime Ripard @ 2016-03-21 8:03 UTC (permalink / raw)
To: Hans de Goede
Cc: Chen-Yu Tsai, Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
On Sun, Mar 20, 2016 at 05:00:28PM +0100, Hans de Goede wrote:
> Hi Maxime and Chen-Yu,
>
> Here is a series with various improvements for the Orangepi Plus dts.
> Some (most) of these patches have been submitted before, esp. the USB
> ones have multiple revisions before. But I lost count of their version,
> so I'm posting this as a "new" set.
>
> About the USB patches, these rely on the patches to add support for
> multiple-reset controllers to ohci-platform / ehci-platform. These
> patches are all acked up and will go upstream as soon as v4.6-rc1 is
> released (they depend on changes which will go into v4.6-rc1).
>
> The old ohci-platform / ehci-platform will only look at the first reset
> specified in the dt and as such will fail to load with the new dt nodes
> (because they cannot talk to the controller).
>
> I've also included a v6 of Krzysztof Adamski <k@japko.eu> leds / switches
> patch, fixing the comments you had in your review of v5. I've done this
> to avoid conflicts with my other patches.
Applied all but patch 6, which was in already.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-03-21 8:03 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-20 16:00 [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements Hans de Goede
[not found] ` <1458489636-2825-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-20 16:00 ` [PATCH 1/8] ARM: dts: sun8i: Add mmc2_8bit_pins to sun8i-h3.dtsi Hans de Goede
2016-03-20 16:00 ` [PATCH 2/8] ARM: dts: sun8i: Add support for H3 usb clocks Hans de Goede
2016-03-20 16:00 ` [PATCH 3/8] ARM: dts: sun8i: Add usbphy and usb host controller nodes Hans de Goede
2016-03-20 16:00 ` [PATCH 4/8] ARM: dts: sun8i: Enable USB host controllers on Orangepi Plus boards Hans de Goede
2016-03-20 16:00 ` [PATCH 5/8] ARM: dts: sun8i: Enable IR receiver " Hans de Goede
2016-03-20 16:00 ` [PATCH 6/8] ARM: dts: sun8i: Add leds and switches " Hans de Goede
2016-03-20 16:00 ` [PATCH 7/8] ARM: dts: sun8i: Add wifi dt node " Hans de Goede
2016-03-20 16:00 ` [PATCH 8/8] ARM: dts: sun8i: Add eMMC " Hans de Goede
2016-03-20 16:05 ` [PATCH 0/8] ARM: dts: sun8i: Orangepi Plus dts improvements Chen-Yu Tsai
[not found] ` <CAGb2v65THg3fcdTJvFBCxxbSU_vOWmB9tP4f2QUbPyUU9D=zig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-20 18:41 ` Hans de Goede
2016-03-21 8:03 ` 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).