linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra
@ 2019-04-11 11:54 pgreco
  2019-04-11 11:54 ` [PATCH 1/2] ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences pgreco
  2019-04-11 11:54 ` [PATCH 2/2] ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra pgreco
  0 siblings, 2 replies; 5+ messages in thread
From: pgreco @ 2019-04-11 11:54 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Pablo Greco <pgreco@centosproject.org>

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.


Pablo Greco (2):
  ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node
    dereferences.
  ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra

 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 144 ++++++++++++++++++++--
 1 file changed, 131 insertions(+), 13 deletions(-)

-- 
1.8.3.1


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

* [PATCH 1/2] ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences.
  2019-04-11 11:54 [PATCH 0/2] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra pgreco
@ 2019-04-11 11:54 ` pgreco
  2019-04-11 12:29   ` Maxime Ripard
  2019-04-11 11:54 ` [PATCH 2/2] ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra pgreco
  1 sibling, 1 reply; 5+ messages in thread
From: pgreco @ 2019-04-11 11:54 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Pablo Greco <pgreco@centosproject.org>

This is the equivalent of Commit 02b301f5d18c5015a33b25d0283306ebe96fa794
("ARM: dts: sun8i: r40: bananapi-m2-ultra: Sort device node dereferences")

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

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 bf97f62..f05cabd 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -105,6 +105,24 @@
 
 #include "axp22x.dtsi"
 
+&mmc0 {
+	vmmc-supply = <&reg_dcdc1>;
+	bus-width = <4>;
+	cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
+	status = "okay";
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pg_pins>;
+	vmmc-supply = <&reg_dldo2>;
+	vqmmc-supply = <&reg_dldo1>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+};
+
 &reg_aldo3 {
 	regulator-always-on;
 	regulator-min-microvolt = <2700000>;
@@ -152,24 +170,6 @@
 	regulator-name = "vcc-wifi";
 };
 
-&mmc0 {
-	vmmc-supply = <&reg_dcdc1>;
-	bus-width = <4>;
-	cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
-	status = "okay";
-};
-
-&mmc1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc1_pg_pins>;
-	vmmc-supply = <&reg_dldo2>;
-	vqmmc-supply = <&reg_dldo1>;
-	mmc-pwrseq = <&wifi_pwrseq>;
-	bus-width = <4>;
-	non-removable;
-	status = "okay";
-};
-
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;
-- 
1.8.3.1


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

* [PATCH 2/2] ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra
  2019-04-11 11:54 [PATCH 0/2] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra pgreco
  2019-04-11 11:54 ` [PATCH 1/2] ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences pgreco
@ 2019-04-11 11:54 ` pgreco
  2019-04-11 12:28   ` Maxime Ripard
  1 sibling, 1 reply; 5+ messages in thread
From: pgreco @ 2019-04-11 11:54 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Pablo Greco, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Pablo Greco <pgreco@centosproject.org>

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.

This patch brings the BPi M2 Berry to the same level as the BPi M2 Ultra
Includes the changes from:
commit c36fd5a48bd2 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable GMAC
ethernet controller")
commit db49c6825901 ("ARM: dts: sun8i: r40: Enable HDMI output on BananaPi
M2 Ultra")
commit ccefd95f648a ("ARM: dts: sun8i: r40: Add missing TCON-TOP - TCON
connections")
commit 6a7556f604f9 ("ARM: dts: sun8i: r40: Disable TCONs by default.")
commit 666907a3f9bd ("ARM: dts: sun8i: sun8i-r40-bananapi-m2-ultra: enable
AHCI")
commit e5c6e693be83 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix WiFi
regulator definitions")
commit 1e5f1db4ccd8 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Add
Bluetooth device node")

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
---
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 118 ++++++++++++++++++++++
 1 file changed, 118 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..3d0bb7e 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;
 	};
 
@@ -57,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";
 
@@ -84,14 +96,52 @@
 	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";
 	};
 };
 
+&ahci {
+	ahci-supply = <&reg_dldo4>;
+	phy-supply = <&reg_eldo3>;
+	status = "okay";
+};
+
+&de {
+	status = "okay";
+};
+
 &ehci1 {
 	/* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */
 	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>;
+	};
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -123,6 +173,18 @@
 	status = "okay";
 };
 
+&pio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&clk_out_a_pin>;
+};
+
+&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 +192,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>;
@@ -164,18 +232,68 @@
 	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>;
+	regulator-name = "vdd2v5-sata";
+};
+
+&reg_eldo3 {
+	regulator-min-microvolt = <1200000>;
+	regulator-max-microvolt = <1200000>;
+	regulator-name = "vdd1v2-sata";
+};
+
+&tcon_tv0 {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;
 	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] 5+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra
  2019-04-11 11:54 ` [PATCH 2/2] ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra pgreco
@ 2019-04-11 12:28   ` Maxime Ripard
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2019-04-11 12:28 UTC (permalink / raw)
  To: pgreco
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

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

Hi,

On Thu, Apr 11, 2019 at 08:54:49AM -0300, pgreco@centosproject.org wrote:
> From: Pablo Greco <pgreco@centosproject.org>
>
> 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.
>
> This patch brings the BPi M2 Berry to the same level as the BPi M2 Ultra
> Includes the changes from:
> commit c36fd5a48bd2 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable GMAC
> ethernet controller")
> commit db49c6825901 ("ARM: dts: sun8i: r40: Enable HDMI output on BananaPi
> M2 Ultra")
> commit ccefd95f648a ("ARM: dts: sun8i: r40: Add missing TCON-TOP - TCON
> connections")
> commit 6a7556f604f9 ("ARM: dts: sun8i: r40: Disable TCONs by default.")
> commit 666907a3f9bd ("ARM: dts: sun8i: sun8i-r40-bananapi-m2-ultra: enable
> AHCI")
> commit e5c6e693be83 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix WiFi
> regulator definitions")
> commit 1e5f1db4ccd8 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Add
> Bluetooth device node")
>
> Signed-off-by: Pablo Greco <pgreco@centosproject.org>

Please make separate commits for each logical changes you're doing.

And there's no need to reference commits as you were doing, it's for a
separate board.

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] 5+ messages in thread

* Re: [PATCH 1/2] ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences.
  2019-04-11 11:54 ` [PATCH 1/2] ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences pgreco
@ 2019-04-11 12:29   ` Maxime Ripard
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2019-04-11 12:29 UTC (permalink / raw)
  To: pgreco
  Cc: linux-sunxi, Rob Herring, Mark Rutland, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

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

On Thu, Apr 11, 2019 at 08:54:48AM -0300, pgreco@centosproject.org wrote:
> From: Pablo Greco <pgreco@centosproject.org>
>
> This is the equivalent of Commit 02b301f5d18c5015a33b25d0283306ebe96fa794
> ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Sort device node dereferences")

Please describe what you are doing and why instead of pointing to
another commit.

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] 5+ messages in thread

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 11:54 [PATCH 0/2] ARM: dts: sun8i: v40 Rewrite BPi M2 Berry DTS based on BPi M2 Ultra pgreco
2019-04-11 11:54 ` [PATCH 1/2] ARM: dts: sun8i: v40: bananapi-m2-berry: Sort device node dereferences pgreco
2019-04-11 12:29   ` Maxime Ripard
2019-04-11 11:54 ` [PATCH 2/2] ARM: dts: sun8i: v40: Update BPi M2 Berry DTS to the level of M2 Ultra pgreco
2019-04-11 12:28   ` 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).