linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra
@ 2019-04-18 15:11 Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Pablo Greco
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

BPi M2 Berry is a trimmed down version of the BPi M2 Ultra, completely
software compatible.

Changes include:
- 2GiB -> 1GiB
- no eMMC
- no onboard microphone
- no IR
- no blue LED
- no charging (and power jack to USB)
- dropped USB2 and connect USB1 to a 4-port HUB.

Changes in v4:
- Went back to v2
- Added GPIO pin-bank regulators (both m2-ultra and m2-berry)

Changes in v3:
- Removed "Sort device node dereferences" (already applied)
- Added basic pio node
- Tied GMAC regulators to the pio (both m2-ultra and m2-berry)

Changes in v2:
- Split into smaller patches

Pablo Greco (7):
  ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet
    controller
  ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output
  ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI
  ARM: dts: sun8i: v40: bananapi-m2-berry: Fix WiFi regulator
    definitions
  ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node
  ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator  
      supplies
  ARM: dts: sun8i: r40: bananapi-m2-ultra: Add GPIO pin-bank regulator  
      supplies

 arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts |   6 ++
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 124 ++++++++++++++++++++++
 2 files changed, 130 insertions(+)

-- 
1.8.3.1


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

* [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  2019-04-18 15:55   ` Maxime Ripard
  2019-04-18 15:11 ` [PATCH v4 2/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output Pablo Greco
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Just like the Bananapi M2 Ultra, the Bananapi M2 Berry has a Realtek
RTL8211E RGMII PHY tied to the GMAC.
The PMIC's DC1SW output provides power for the PHY, while the ALDO2
output provides I/O voltages on both sides.

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 30 +++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index f05cabd..0d79e91 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -50,6 +50,7 @@
 	compatible = "sinovoip,bpi-m2-berry", "allwinner,sun8i-r40";
 
 	aliases {
+		ethernet0 = &gmac;
 		serial0 = &uart0;
 	};
 
@@ -92,6 +93,22 @@
 	status = "okay";
 };
 
+&gmac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac_rgmii_pins>;
+	phy-handle = <&phy1>;
+	phy-mode = "rgmii";
+	phy-supply = <&reg_dc1sw>;
+	status = "okay";
+};
+
+&gmac_mdio {
+	phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -123,6 +140,13 @@
 	status = "okay";
 };
 
+&reg_aldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <2500000>;
+	regulator-max-microvolt = <2500000>;
+	regulator-name = "vcc-pa";
+};
+
 &reg_aldo3 {
 	regulator-always-on;
 	regulator-min-microvolt = <2700000>;
@@ -130,6 +154,12 @@
 	regulator-name = "avcc";
 };
 
+&reg_dc1sw {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-gmac-phy";
+};
+
 &reg_dcdc1 {
 	regulator-always-on;
 	regulator-min-microvolt = <3000000>;
-- 
1.8.3.1


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

* [PATCH v4 2/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 3/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI Pablo Greco
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

This patch adds the hdmi nodes to the Bananapi M2 Berry, the same way it
was done to the Bananapi M2 Ultra

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 29 +++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index 0d79e91..2a5b80b 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -58,6 +58,17 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -88,6 +99,10 @@
 	};
 };
 
+&de {
+	status = "okay";
+};
+
 &ehci1 {
 	/* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */
 	status = "okay";
@@ -109,6 +124,16 @@
 	};
 };
 
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -200,6 +225,10 @@
 	regulator-name = "vcc-wifi";
 };
 
+&tcon_tv0 {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;
-- 
1.8.3.1


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

* [PATCH v4 3/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 2/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 4/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Fix WiFi regulator definitions Pablo Greco
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Just like the Bananapi M2 Ultra, enable the ahci controller and
the two regulators needed to activate it.

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index 2a5b80b..c37c7ab 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -99,6 +99,12 @@
 	};
 };
 
+&ahci {
+	ahci-supply = <&reg_dldo4>;
+	phy-supply = <&reg_eldo3>;
+	status = "okay";
+};
+
 &de {
 	status = "okay";
 };
@@ -225,6 +231,18 @@
 	regulator-name = "vcc-wifi";
 };
 
+&reg_dldo4 {
+	regulator-min-microvolt = <2500000>;
+	regulator-max-microvolt = <2500000>;
+	regulator-name = "vdd2v5-sata";
+};
+
+&reg_eldo3 {
+	regulator-min-microvolt = <1200000>;
+	regulator-max-microvolt = <1200000>;
+	regulator-name = "vdd1v2-sata";
+};
+
 &tcon_tv0 {
 	status = "okay";
 };
-- 
1.8.3.1


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

* [PATCH v4 4/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Fix WiFi regulator definitions
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
                   ` (2 preceding siblings ...)
  2019-04-18 15:11 ` [PATCH v4 3/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node Pablo Greco
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Just like was done for the bananapi-m2-ultra, add the second wifi/bt
regulator and mark both as always-on.

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index c37c7ab..78f4a1a 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -225,12 +225,27 @@
 	regulator-name = "vcc-wifi-io";
 };
 
+/*
+ * Our WiFi chip needs both DLDO2 and DLDO3 to be powered at the same
+ * time, with the two being in sync, to be able to meet maximum power
+ * consumption during transmits. Since this is not really supported
+ * right now, just use the two as always on, and we will fix it later.
+ */
+
 &reg_dldo2 {
+	regulator-always-on;
 	regulator-min-microvolt = <3300000>;
 	regulator-max-microvolt = <3300000>;
 	regulator-name = "vcc-wifi";
 };
 
+&reg_dldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi-2";
+};
+
 &reg_dldo4 {
 	regulator-min-microvolt = <2500000>;
 	regulator-max-microvolt = <2500000>;
-- 
1.8.3.1


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

* [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
                   ` (3 preceding siblings ...)
  2019-04-18 15:11 ` [PATCH v4 4/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Fix WiFi regulator definitions Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  2019-04-18 15:56   ` Maxime Ripard
  2019-04-18 15:11 ` [PATCH v4 6/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies Pablo Greco
  2019-04-18 15:11 ` [PATCH v4 7/7] ARM: dts: sun8i: r40: bananapi-m2-ultra: " Pablo Greco
  6 siblings, 1 reply; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Since the bananapi-m2-ultra and the bananapi-m2-berry have the same
WiFi/Bluetooth, add the required nodes to the bananapi-m2-berry.

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index 78f4a1a..3d0bb7e 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -96,6 +96,8 @@
 	wifi_pwrseq: wifi_pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
+		clocks = <&ccu CLK_OUTA>;
+		clock-names = "ext_clock";
 	};
 };
 
@@ -171,6 +173,11 @@
 	status = "okay";
 };
 
+&pio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&clk_out_a_pin>;
+};
+
 &reg_aldo2 {
 	regulator-always-on;
 	regulator-min-microvolt = <2500000>;
@@ -268,6 +275,25 @@
 	status = "okay";
 };
 
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&ccu CLK_OUTA>;
+		clock-names = "lpo";
+		vbat-supply = <&reg_dldo2>;
+		vddio-supply = <&reg_dldo1>;
+		device-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+		/* TODO host wake line connected to PMIC GPIO pins */
+		shutdown-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+		max-speed = <1500000>;
+	};
+};
+
 &usbphy {
 	usb1_vbus-supply = <&reg_vcc5v0>;
 	status = "okay";
-- 
1.8.3.1


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

* [PATCH v4 6/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
                   ` (4 preceding siblings ...)
  2019-04-18 15:11 ` [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  2019-04-18 15:54   ` Maxime Ripard
  2019-04-18 15:11 ` [PATCH v4 7/7] ARM: dts: sun8i: r40: bananapi-m2-ultra: " Pablo Greco
  6 siblings, 1 reply; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

The bananapi-m2-berry has the PMIC providing voltage to all the pin-bank
supply rails from its various regulator outputs, tie them to the pio
node.

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index 3d0bb7e..f33705a 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -176,6 +176,12 @@
 &pio {
 	pinctrl-names = "default";
 	pinctrl-0 = <&clk_out_a_pin>;
+	vcc-pa-supply = <&reg_aldo2>;
+	vcc-pc-supply = <&reg_dcdc1>;
+	vcc-pd-supply = <&reg_dcdc1>;
+	vcc-pe-supply = <&reg_eldo1>;
+	vcc-pf-supply = <&reg_dcdc1>;
+	vcc-pg-supply = <&reg_dldo1>;
 };
 
 &reg_aldo2 {
-- 
1.8.3.1


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

* [PATCH v4 7/7] ARM: dts: sun8i: r40: bananapi-m2-ultra: Add GPIO pin-bank regulator supplies
  2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
                   ` (5 preceding siblings ...)
  2019-04-18 15:11 ` [PATCH v4 6/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies Pablo Greco
@ 2019-04-18 15:11 ` Pablo Greco
  6 siblings, 0 replies; 13+ messages in thread
From: Pablo Greco @ 2019-04-18 15:11 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

The bananapi-m2-ultra has the PMIC providing voltage to all the pin-bank
supply rails from its various regulator outputs, tie them to the pio
node.

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
index c488aaa..699579d 100644
--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
@@ -201,6 +201,12 @@
 &pio {
 	pinctrl-names = "default";
 	pinctrl-0 = <&clk_out_a_pin>;
+	vcc-pa-supply = <&reg_aldo2>;
+	vcc-pc-supply = <&reg_dcdc1>;
+	vcc-pd-supply = <&reg_dcdc1>;
+	vcc-pe-supply = <&reg_eldo1>;
+	vcc-pf-supply = <&reg_dcdc1>;
+	vcc-pg-supply = <&reg_dldo1>;
 };
 
 &reg_aldo2 {
-- 
1.8.3.1


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

* Re: [PATCH v4 6/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies
  2019-04-18 15:11 ` [PATCH v4 6/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies Pablo Greco
@ 2019-04-18 15:54   ` Maxime Ripard
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2019-04-18 15:54 UTC (permalink / raw)
  To: Pablo Greco
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi,

On Thu, Apr 18, 2019 at 12:11:21PM -0300, Pablo Greco wrote:
> The bananapi-m2-berry has the PMIC providing voltage to all the pin-bank
> supply rails from its various regulator outputs, tie them to the pio
> node.
>
> Signed-off-by: Pablo Greco <pgreco@centosproject.org>

This one and the patch 7 should be the first patch in your series

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller
  2019-04-18 15:11 ` [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Pablo Greco
@ 2019-04-18 15:55   ` Maxime Ripard
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2019-04-18 15:55 UTC (permalink / raw)
  To: Pablo Greco
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

On Thu, Apr 18, 2019 at 12:11:16PM -0300, Pablo Greco wrote:
> Just like the Bananapi M2 Ultra, the Bananapi M2 Berry has a Realtek
> RTL8211E RGMII PHY tied to the GMAC.
> The PMIC's DC1SW output provides power for the PHY, while the ALDO2
> output provides I/O voltages on both sides.
>
> Signed-off-by: Pablo Greco <pgreco@centosproject.org>
> ---
>  arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 30 +++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> index f05cabd..0d79e91 100644
> --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> @@ -50,6 +50,7 @@
>  	compatible = "sinovoip,bpi-m2-berry", "allwinner,sun8i-r40";
>
>  	aliases {
> +		ethernet0 = &gmac;
>  		serial0 = &uart0;
>  	};
>
> @@ -92,6 +93,22 @@
>  	status = "okay";
>  };
>
> +&gmac {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&gmac_rgmii_pins>;
> +	phy-handle = <&phy1>;
> +	phy-mode = "rgmii";
> +	phy-supply = <&reg_dc1sw>;
> +	status = "okay";
> +};
> +
> +&gmac_mdio {
> +	phy1: ethernet-phy@1 {
> +		compatible = "ethernet-phy-ieee802.3-c22";
> +		reg = <1>;
> +	};
> +};
> +
>  &i2c0 {
>  	status = "okay";
>
> @@ -123,6 +140,13 @@
>  	status = "okay";
>  };
>
> +&reg_aldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <2500000>;
> +	regulator-max-microvolt = <2500000>;
> +	regulator-name = "vcc-pa";

And if patches 6 and 7 become the first one, you can drop the
always-on here.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node
  2019-04-18 15:11 ` [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node Pablo Greco
@ 2019-04-18 15:56   ` Maxime Ripard
  2019-04-18 16:14     ` Pablo Sebastián Greco
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2019-04-18 15:56 UTC (permalink / raw)
  To: Pablo Greco
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

On Thu, Apr 18, 2019 at 12:11:20PM -0300, Pablo Greco wrote:
> Since the bananapi-m2-ultra and the bananapi-m2-berry have the same
> WiFi/Bluetooth, add the required nodes to the bananapi-m2-berry.
>
> Signed-off-by: Pablo Greco <pgreco@centosproject.org>
> ---
>  arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 26 +++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> index 78f4a1a..3d0bb7e 100644
> --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> @@ -96,6 +96,8 @@
>  	wifi_pwrseq: wifi_pwrseq {
>  		compatible = "mmc-pwrseq-simple";
>  		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
> +		clocks = <&ccu CLK_OUTA>;
> +		clock-names = "ext_clock";
>  	};
>  };
>
> @@ -171,6 +173,11 @@
>  	status = "okay";
>  };
>
> +&pio {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&clk_out_a_pin>;
> +};
> +

I'm not sure you answered my question about why that is needed?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node
  2019-04-18 15:56   ` Maxime Ripard
@ 2019-04-18 16:14     ` Pablo Sebastián Greco
  2019-04-23 16:12       ` Maxime Ripard
  0 siblings, 1 reply; 13+ messages in thread
From: Pablo Sebastián Greco @ 2019-04-18 16:14 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel


El 18/4/19 a las 12:56, Maxime Ripard escribió:
> On Thu, Apr 18, 2019 at 12:11:20PM -0300, Pablo Greco wrote:
>> Since the bananapi-m2-ultra and the bananapi-m2-berry have the same
>> WiFi/Bluetooth, add the required nodes to the bananapi-m2-berry.
>>
>> Signed-off-by: Pablo Greco <pgreco@centosproject.org>
>> ---
>>   arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 26 +++++++++++++++++++++++
>>   1 file changed, 26 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
>> index 78f4a1a..3d0bb7e 100644
>> --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
>> +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
>> @@ -96,6 +96,8 @@
>>   	wifi_pwrseq: wifi_pwrseq {
>>   		compatible = "mmc-pwrseq-simple";
>>   		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
>> +		clocks = <&ccu CLK_OUTA>;
>> +		clock-names = "ext_clock";
>>   	};
>>   };
>>
>> @@ -171,6 +173,11 @@
>>   	status = "okay";
>>   };
>>
>> +&pio {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&clk_out_a_pin>;
>> +};
>> +
> I'm not sure you answered my question about why that is needed?
Because it is the same case as 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts?id=1e5f1db4ccd8348a21da55bff82f4263000879ef
I can repeat that info in this commit log
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
Pablo.

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

* Re: [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node
  2019-04-18 16:14     ` Pablo Sebastián Greco
@ 2019-04-23 16:12       ` Maxime Ripard
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2019-04-23 16:12 UTC (permalink / raw)
  To: Pablo Sebastián Greco
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

On Thu, Apr 18, 2019 at 01:14:35PM -0300, Pablo Sebastián Greco wrote:
>
> El 18/4/19 a las 12:56, Maxime Ripard escribió:
> > On Thu, Apr 18, 2019 at 12:11:20PM -0300, Pablo Greco wrote:
> > > Since the bananapi-m2-ultra and the bananapi-m2-berry have the same
> > > WiFi/Bluetooth, add the required nodes to the bananapi-m2-berry.
> > >
> > > Signed-off-by: Pablo Greco <pgreco@centosproject.org>
> > > ---
> > >   arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 26 +++++++++++++++++++++++
> > >   1 file changed, 26 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> > > index 78f4a1a..3d0bb7e 100644
> > > --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> > > +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
> > > @@ -96,6 +96,8 @@
> > >   	wifi_pwrseq: wifi_pwrseq {
> > >   		compatible = "mmc-pwrseq-simple";
> > >   		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
> > > +		clocks = <&ccu CLK_OUTA>;
> > > +		clock-names = "ext_clock";
> > >   	};
> > >   };
> > >
> > > @@ -171,6 +173,11 @@
> > >   	status = "okay";
> > >   };
> > >
> > > +&pio {
> > > +	pinctrl-names = "default";
> > > +	pinctrl-0 = <&clk_out_a_pin>;
> > > +};
> > > +
> > I'm not sure you answered my question about why that is needed?
> Because it is the same case as https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts?id=1e5f1db4ccd8348a21da55bff82f4263000879ef
> I can repeat that info in this commit log

Yes, please.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2019-04-23 16:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 15:11 [PATCH v4 0/7] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra Pablo Greco
2019-04-18 15:11 ` [PATCH v4 1/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Pablo Greco
2019-04-18 15:55   ` Maxime Ripard
2019-04-18 15:11 ` [PATCH v4 2/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output Pablo Greco
2019-04-18 15:11 ` [PATCH v4 3/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI Pablo Greco
2019-04-18 15:11 ` [PATCH v4 4/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Fix WiFi regulator definitions Pablo Greco
2019-04-18 15:11 ` [PATCH v4 5/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node Pablo Greco
2019-04-18 15:56   ` Maxime Ripard
2019-04-18 16:14     ` Pablo Sebastián Greco
2019-04-23 16:12       ` Maxime Ripard
2019-04-18 15:11 ` [PATCH v4 6/7] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies Pablo Greco
2019-04-18 15:54   ` Maxime Ripard
2019-04-18 15:11 ` [PATCH v4 7/7] ARM: dts: sun8i: r40: bananapi-m2-ultra: " Pablo Greco

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