devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/18] continue mt7988 devicetree work
@ 2024-12-02 12:25 Frank Wunderlich
  2024-12-02 12:25 ` [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4 Frank Wunderlich
                   ` (17 more replies)
  0 siblings, 18 replies; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

This series adds some missing labels and new nodes to mt7988 DTS.

based on pinctrl-series
https://patchwork.kernel.org/project/linux-mediatek/list/?series=913700

changes:
v2:
- reorder and squash label-commits to where they are used
- add some more nodes
- add changes to bananapi-r4 board
- moving some nodes from SoC dtsi to board dts

Frank Wunderlich (18):
  arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4
  arm64: dts: mediatek: mt7988: add mmc support
  arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3
  arm64: dts: mediatek: mt7988: add lvts node
  arm64: dts: mediatek: mt7988: add thermal-zone
  arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4
  arm64: dts: mediatek: mt7988: add reserved memory
  arm64: dts: mediatek: mt7988: add mcu-sys node for cpu
  arm64: dts: mediatek: mt7988: add operating-points
  arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4
  arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  arm64: dts: mediatek: mt7988: add missing clock-div property for i2c
  arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board
  arm64: dts: mediatek: mt7988: add pmic on bpi-r4
  arm64: dts: mediatek: mt7988: add proc-supply for cpus on bpi-r4
  arm64: dts: mediatek: mt7988: add i2c-mux on bpi-r4
  arm64: dts: mediatek: mt7988: enable ssusb1 on bpi-r4
  arm64: dts: mediatek: mt7988: enable pwm on bpi-r4

 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 186 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi     | 137 +++++++++++--
 2 files changed, 311 insertions(+), 12 deletions(-)

-- 
2.43.0


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

* [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 02/18] arm64: dts: mediatek: mt7988: add mmc support Frank Wunderlich
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Enable the watchdog on Bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index aa2dabc041fd..d914eae2b524 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -198,3 +198,7 @@ mux {
 		};
 	};
 };
+
+&watchdog {
+	status = "okay";
+};
-- 
2.43.0


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

* [PATCH v2 02/18] arm64: dts: mediatek: mt7988: add mmc support
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
  2024-12-02 12:25 ` [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4 Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3 Frank Wunderlich
                   ` (15 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add devicetree node for MMC controller.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
changes:
v2:
squash "add missing label for apmixedsys"
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 24 ++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 46969577c87a..5e40446cb7b3 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -100,7 +100,7 @@ watchdog: watchdog@1001c000 {
 			#reset-cells = <1>;
 		};
 
-		clock-controller@1001e000 {
+		apmixedsys: clock-controller@1001e000 {
 			compatible = "mediatek,mt7988-apmixedsys";
 			reg = <0 0x1001e000 0 0x1000>;
 			#clock-cells = <1>;
@@ -278,6 +278,28 @@ usb@11200000 {
 			clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
 		};
 
+		mmc0: mmc@11230000 {
+			compatible = "mediatek,mt7988-mmc";
+			reg = <0 0x11230000 0 0x1000>,
+			      <0 0x11D60000 0 0x1000>;
+			interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&infracfg CLK_INFRA_MSDC400>,
+				 <&infracfg CLK_INFRA_MSDC2_HCK>,
+				 <&infracfg CLK_INFRA_66M_MSDC_0_HCK>,
+				 <&infracfg CLK_INFRA_133M_MSDC_0_HCK>;
+			assigned-clocks = <&topckgen CLK_TOP_EMMC_250M_SEL>,
+					  <&topckgen CLK_TOP_EMMC_400M_SEL>;
+			assigned-clock-parents = <&topckgen CLK_TOP_NET1PLL_D5_D2>,
+						 <&apmixedsys CLK_APMIXED_MSDCPLL>;
+			clock-names = "source",
+				      "hclk",
+				      "axi_cg",
+				      "ahb_cg";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		clock-controller@11f40000 {
 			compatible = "mediatek,mt7988-xfi-pll";
 			reg = <0 0x11f40000 0 0x1000>;
-- 
2.43.0


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

* [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
  2024-12-02 12:25 ` [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4 Frank Wunderlich
  2024-12-02 12:25 ` [PATCH v2 02/18] arm64: dts: mediatek: mt7988: add mmc support Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 04/18] arm64: dts: mediatek: mt7988: add lvts node Frank Wunderlich
                   ` (14 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add regulator nodes used for mmc to Bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v2:
- move mmc regulators to board dts of bpi-r4
---
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index d914eae2b524..df53512c6890 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -8,6 +8,24 @@ / {
 	compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
 	model = "Banana Pi BPI-R4";
 	chassis-type = "embedded";
+
+	reg_1p8v: regulator-1p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
 };
 
 &pio {
-- 
2.43.0


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

* [PATCH v2 04/18] arm64: dts: mediatek: mt7988: add lvts node
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (2 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3 Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 05/18] arm64: dts: mediatek: mt7988: add thermal-zone Frank Wunderlich
                   ` (13 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add Low Voltage Thermal Sensor (LVTS) node for mt7988 SoC.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
changes:

v2:
squash
- "arm64: dts: mediatek: mt7988: add label for efuse"
- "arm64: dts: mediatek: mt7988: extend efuse node" (drop other efuse subnodes)
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 5e40446cb7b3..f7748a840297 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -4,6 +4,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/pinctrl/mt65xx.h>
+#include <dt-bindings/reset/mediatek,mt7988-resets.h>
 
 / {
 	compatible = "mediatek,mt7988a";
@@ -85,6 +86,7 @@ infracfg: clock-controller@10001000 {
 			compatible = "mediatek,mt7988-infracfg", "syscon";
 			reg = <0 0x10001000 0 0x1000>;
 			#clock-cells = <1>;
+			#reset-cells = <1>;
 		};
 
 		topckgen: clock-controller@1001b000 {
@@ -250,6 +252,17 @@ i2c@11005000 {
 			status = "disabled";
 		};
 
+		lvts: lvts@1100a000 {
+			compatible = "mediatek,mt7988-lvts-ap";
+			#thermal-sensor-cells = <1>;
+			reg = <0 0x1100a000 0 0x1000>;
+			clocks = <&infracfg CLK_INFRA_26M_THERM_SYSTEM>;
+			interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+			resets = <&infracfg MT7988_INFRA_RST1_THERM_CTRL_SWRST>;
+			nvmem-cells = <&lvts_calibration>;
+			nvmem-cell-names = "lvts-calib-data-1";
+		};
+
 		usb@11190000 {
 			compatible = "mediatek,mt7988-xhci", "mediatek,mtk-xhci";
 			reg = <0 0x11190000 0 0x2e00>,
@@ -307,11 +320,15 @@ clock-controller@11f40000 {
 			#clock-cells = <1>;
 		};
 
-		efuse@11f50000 {
+		efuse: efuse@11f50000 {
 			compatible = "mediatek,mt7988-efuse", "mediatek,efuse";
 			reg = <0 0x11f50000 0 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+
+			lvts_calibration: calib@918 {
+				reg = <0x918 0x28>;
+			};
 		};
 
 		clock-controller@15000000 {
-- 
2.43.0


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

* [PATCH v2 05/18] arm64: dts: mediatek: mt7988: add thermal-zone
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (3 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 04/18] arm64: dts: mediatek: mt7988: add lvts node Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 06/18] arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4 Frank Wunderlich
                   ` (12 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add basic thermal-zone node.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v2:
- only add critical trip to SoC dtsi, lower trips have to go to board dts
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index f7748a840297..09dcb39ad098 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -346,6 +346,21 @@ clock-controller@15031000 {
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <1000>;
+			polling-delay = <1000>;
+			thermal-sensors = <&lvts 0>;
+			trips {
+				cpu_trip_crit: crit {
+					temperature = <125000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupt-parent = <&gic>;
-- 
2.43.0


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

* [PATCH v2 06/18] arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (4 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 05/18] arm64: dts: mediatek: mt7988: add thermal-zone Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 07/18] arm64: dts: mediatek: mt7988: add reserved memory Frank Wunderlich
                   ` (11 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add additional thermal trips to Bananapi R4 board.
SoC only contains the critical trip.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index df53512c6890..8a320d9da443 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -28,6 +28,34 @@ reg_3p3v: regulator-3p3v {
 	};
 };
 
+&cpu_thermal {
+	trips {
+		cpu_trip_hot: hot {
+			temperature = <120000>;
+			hysteresis = <2000>;
+			type = "hot";
+		};
+
+		cpu_trip_active_high: active-high {
+			temperature = <115000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+
+		cpu_trip_active_med: active-med {
+			temperature = <85000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+
+		cpu_trip_active_low: active-low {
+			temperature = <40000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+	};
+};
+
 &pio {
 	mdio0_pins: mdio0-pins {
 		mux {
-- 
2.43.0


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

* [PATCH v2 07/18] arm64: dts: mediatek: mt7988: add reserved memory
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (5 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 06/18] arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4 Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 08/18] arm64: dts: mediatek: mt7988: add mcu-sys node for cpu Frank Wunderlich
                   ` (10 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add memory range handled by ATF to not be touched by linux kernel.
ATF is SoC specific and not board-specific so add it to mt7988.dtsi.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 09dcb39ad098..1cf801486e61 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -63,6 +63,18 @@ psci {
 		method = "smc";
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/* 320 KiB reserved for ARM Trusted Firmware (BL31 and BL32) */
+		secmon_reserved: secmon@43000000 {
+			reg = <0 0x43000000 0 0x50000>;
+			no-map;
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		ranges;
-- 
2.43.0


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

* [PATCH v2 08/18] arm64: dts: mediatek: mt7988: add mcu-sys node for cpu
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (6 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 07/18] arm64: dts: mediatek: mt7988: add reserved memory Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 09/18] arm64: dts: mediatek: mt7988: add operating-points Frank Wunderlich
                   ` (9 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add mcu-sys node which is used later as clock-controller for cpus.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 1cf801486e61..2af440510c86 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -192,6 +192,12 @@ pwm@10048000 {
 			status = "disabled";
 		};
 
+		mcusys: mcusys@100e0000 {
+			compatible = "mediatek,mt7988-mcusys", "syscon";
+			reg = <0 0x100e0000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+
 		serial@11000000 {
 			compatible = "mediatek,mt7988-uart", "mediatek,mt6577-uart";
 			reg = <0 0x11000000 0 0x100>;
-- 
2.43.0


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

* [PATCH v2 09/18] arm64: dts: mediatek: mt7988: add operating-points
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (7 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 08/18] arm64: dts: mediatek: mt7988: add mcu-sys node for cpu Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4 Frank Wunderlich
                   ` (8 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add operating points defining frequency/voltages of cpu cores.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
changes:
v2:
- drop cpu-labels for now
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 38 +++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 2af440510c86..5609e3619be9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -21,6 +21,10 @@ cpu@0 {
 			reg = <0x0>;
 			device_type = "cpu";
 			enable-method = "psci";
+			clocks = <&mcusys CLK_MCU_ARM_DIV_SEL>,
+				 <&topckgen CLK_TOP_XTAL>;
+			clock-names = "cpu", "intermediate";
+			operating-points-v2 = <&cluster0_opp>;
 		};
 
 		cpu@1 {
@@ -28,6 +32,10 @@ cpu@1 {
 			reg = <0x1>;
 			device_type = "cpu";
 			enable-method = "psci";
+			clocks = <&mcusys CLK_MCU_ARM_DIV_SEL>,
+				 <&topckgen CLK_TOP_XTAL>;
+			clock-names = "cpu", "intermediate";
+			operating-points-v2 = <&cluster0_opp>;
 		};
 
 		cpu@2 {
@@ -35,6 +43,10 @@ cpu@2 {
 			reg = <0x2>;
 			device_type = "cpu";
 			enable-method = "psci";
+			clocks = <&mcusys CLK_MCU_ARM_DIV_SEL>,
+				 <&topckgen CLK_TOP_XTAL>;
+			clock-names = "cpu", "intermediate";
+			operating-points-v2 = <&cluster0_opp>;
 		};
 
 		cpu@3 {
@@ -42,6 +54,32 @@ cpu@3 {
 			reg = <0x3>;
 			device_type = "cpu";
 			enable-method = "psci";
+			clocks = <&mcusys CLK_MCU_ARM_DIV_SEL>,
+				 <&topckgen CLK_TOP_XTAL>;
+			clock-names = "cpu", "intermediate";
+			operating-points-v2 = <&cluster0_opp>;
+		};
+
+		cluster0_opp: opp-table-0 {
+			compatible = "operating-points-v2";
+			opp-shared;
+
+			opp-800000000 {
+				opp-hz = /bits/ 64 <800000000>;
+				opp-microvolt = <850000>;
+			};
+			opp-1100000000 {
+				opp-hz = /bits/ 64 <1100000000>;
+				opp-microvolt = <850000>;
+			};
+			opp-1500000000 {
+				opp-hz = /bits/ 64 <1500000000>;
+				opp-microvolt = <850000>;
+			};
+			opp-1800000000 {
+				opp-hz = /bits/ 64 <1800000000>;
+				opp-microvolt = <900000>;
+			};
 		};
 	};
 
-- 
2.43.0


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

* [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (8 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 09/18] arm64: dts: mediatek: mt7988: add operating-points Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node " Frank Wunderlich
                   ` (7 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Enable the debug uart on Bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi                | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 8a320d9da443..9037f35857a9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -245,6 +245,10 @@ mux {
 	};
 };
 
+&serial0 {
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 5609e3619be9..abf81a7d02a5 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -236,7 +236,7 @@ mcusys: mcusys@100e0000 {
 			#clock-cells = <1>;
 		};
 
-		serial@11000000 {
+		serial0: serial@11000000 {
 			compatible = "mediatek,mt7988-uart", "mediatek,mt6577-uart";
 			reg = <0 0x11000000 0 0x100>;
 			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.43.0


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

* [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (9 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4 Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-02 13:46   ` Krzysztof Kozlowski
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 12/18] arm64: dts: mediatek: mt7988: add missing clock-div property for i2c Frank Wunderlich
                   ` (6 subsequent siblings)
  17 siblings, 2 replies; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add chosen node on Bananapi R4 board with stdout and default bootargs.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 9037f35857a9..1c2a806f6f6c 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -9,6 +9,11 @@ / {
 	model = "Banana Pi BPI-R4";
 	chassis-type = "embedded";
 
+	chosen {
+		stdout-path = &serial0;
+		bootargs = "console=ttyS0,115200n1";
+	};
+
 	reg_1p8v: regulator-1p8v {
 		compatible = "regulator-fixed";
 		regulator-name = "fixed-1.8V";
-- 
2.43.0


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

* [PATCH v2 12/18] arm64: dts: mediatek: mt7988: add missing clock-div property for i2c
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (10 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node " Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board Frank Wunderlich
                   ` (5 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

I2C binding requires clock-div property.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index abf81a7d02a5..956f2be600a2 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -274,6 +274,7 @@ i2c@11003000 {
 			reg = <0 0x11003000 0 0x1000>,
 			      <0 0x10217080 0 0x80>;
 			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+			clock-div = <1>;
 			clocks = <&infracfg CLK_INFRA_I2C_BCK>,
 				 <&infracfg CLK_INFRA_66M_AP_DMA_BCK>;
 			clock-names = "main", "dma";
@@ -287,6 +288,7 @@ i2c@11004000 {
 			reg = <0 0x11004000 0 0x1000>,
 			      <0 0x10217100 0 0x80>;
 			interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+			clock-div = <1>;
 			clocks = <&infracfg CLK_INFRA_I2C_BCK>,
 				 <&infracfg CLK_INFRA_66M_AP_DMA_BCK>;
 			clock-names = "main", "dma";
@@ -300,6 +302,7 @@ i2c@11005000 {
 			reg = <0 0x11005000 0 0x1000>,
 			      <0 0x10217180 0 0x80>;
 			interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+			clock-div = <1>;
 			clocks = <&infracfg CLK_INFRA_I2C_BCK>,
 				 <&infracfg CLK_INFRA_66M_AP_DMA_BCK>;
 			clock-names = "main", "dma";
-- 
2.43.0


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

* [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (11 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 12/18] arm64: dts: mediatek: mt7988: add missing clock-div property for i2c Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4 Frank Wunderlich
                   ` (4 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add basic i2c nodes to bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts    | 12 ++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi            |  6 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 1c2a806f6f6c..13ca016d6a67 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -61,6 +61,18 @@ cpu_trip_active_low: active-low {
 	};
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_1_pins>;
+	status = "okay";
+};
+
 &pio {
 	mdio0_pins: mdio0-pins {
 		mux {
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 956f2be600a2..eebbdfe55774 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -269,7 +269,7 @@ serial@11000200 {
 			status = "disabled";
 		};
 
-		i2c@11003000 {
+		i2c0: i2c@11003000 {
 			compatible = "mediatek,mt7981-i2c";
 			reg = <0 0x11003000 0 0x1000>,
 			      <0 0x10217080 0 0x80>;
@@ -283,7 +283,7 @@ i2c@11003000 {
 			status = "disabled";
 		};
 
-		i2c@11004000 {
+		i2c1: i2c@11004000 {
 			compatible = "mediatek,mt7981-i2c";
 			reg = <0 0x11004000 0 0x1000>,
 			      <0 0x10217100 0 0x80>;
@@ -297,7 +297,7 @@ i2c@11004000 {
 			status = "disabled";
 		};
 
-		i2c@11005000 {
+		i2c2: i2c@11005000 {
 			compatible = "mediatek,mt7981-i2c";
 			reg = <0 0x11005000 0 0x1000>,
 			      <0 0x10217180 0 0x80>;
-- 
2.43.0


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

* [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (12 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 15/18] arm64: dts: mediatek: mt7988: add proc-supply for cpus " Frank Wunderlich
                   ` (3 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Bananapi R4 Board contains a MT6682A pmic which is compatible to rt5190a.
Add its node to the i2 controller.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 13ca016d6a67..bc1ec73b8ddd 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
+
 #include "mt7988a.dtsi"
 
 / {
@@ -65,6 +67,55 @@ &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins>;
 	status = "okay";
+
+	rt5190a_64: rt5190a@64 {
+		compatible = "richtek,rt5190a";
+		reg = <0x64>;
+		vin2-supply = <&rt5190_buck1>;
+		vin3-supply = <&rt5190_buck1>;
+		vin4-supply = <&rt5190_buck1>;
+
+		regulators {
+			rt5190_buck1: buck1 {
+				regulator-name = "rt5190a-buck1";
+				regulator-min-microvolt = <5090000>;
+				regulator-max-microvolt = <5090000>;
+				regulator-allowed-modes =
+				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+			buck2 {
+				regulator-name = "vcore";
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+			rt5190_buck3: buck3 {
+				regulator-name = "vproc";
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-boot-on;
+			};
+			buck4 {
+				regulator-name = "rt5190a-buck4";
+				regulator-min-microvolt = <850000>;
+				regulator-max-microvolt = <850000>;
+				regulator-allowed-modes =
+				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+			ldo {
+				regulator-name = "rt5190a-ldo";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
 };
 
 &i2c2 {
-- 
2.43.0


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

* [PATCH v2 15/18] arm64: dts: mediatek: mt7988: add proc-supply for cpus on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (13 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4 Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 16/18] arm64: dts: mediatek: mt7988: add i2c-mux " Frank Wunderlich
                   ` (2 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Add proc-supply property to cpus on Bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts     | 16 ++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi        |  8 ++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index bc1ec73b8ddd..550c373b3d70 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -35,6 +35,22 @@ reg_3p3v: regulator-3p3v {
 	};
 };
 
+&cpu0 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu1 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu2 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu3 {
+	proc-supply = <&rt5190_buck3>;
+};
+
 &cpu_thermal {
 	trips {
 		cpu_trip_hot: hot {
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index eebbdfe55774..93c21a5248fa 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -16,7 +16,7 @@ cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu@0 {
+		cpu0: cpu@0 {
 			compatible = "arm,cortex-a73";
 			reg = <0x0>;
 			device_type = "cpu";
@@ -27,7 +27,7 @@ cpu@0 {
 			operating-points-v2 = <&cluster0_opp>;
 		};
 
-		cpu@1 {
+		cpu1: cpu@1 {
 			compatible = "arm,cortex-a73";
 			reg = <0x1>;
 			device_type = "cpu";
@@ -38,7 +38,7 @@ cpu@1 {
 			operating-points-v2 = <&cluster0_opp>;
 		};
 
-		cpu@2 {
+		cpu2: cpu@2 {
 			compatible = "arm,cortex-a73";
 			reg = <0x2>;
 			device_type = "cpu";
@@ -49,7 +49,7 @@ cpu@2 {
 			operating-points-v2 = <&cluster0_opp>;
 		};
 
-		cpu@3 {
+		cpu3: cpu@3 {
 			compatible = "arm,cortex-a73";
 			reg = <0x3>;
 			device_type = "cpu";
-- 
2.43.0


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

* [PATCH v2 16/18] arm64: dts: mediatek: mt7988: add i2c-mux on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (14 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 15/18] arm64: dts: mediatek: mt7988: add proc-supply for cpus " Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 " Frank Wunderlich
  2024-12-02 12:25 ` [PATCH v2 18/18] arm64: dts: mediatek: mt7988: enable pwm " Frank Wunderlich
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Bananapi R4 uses an i2c multiplexer for SFP slots, rtc and eeprom.
Add its node to the right i2c controller.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
---
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 550c373b3d70..9ceefc990000 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -2,6 +2,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
 
 #include "mt7988a.dtsi"
@@ -138,6 +139,45 @@ &i2c2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c2_1_pins>;
 	status = "okay";
+
+	pca9545: i2c-mux@70 {
+		reg = <0x70>;
+		compatible = "nxp,pca9545";
+		reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		i2c@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;
+
+			pcf8563: rtc@51 {
+				compatible = "nxp,pcf8563";
+				reg = <0x51>;
+				#clock-cells = <0>;
+			};
+
+			eeprom@57 {
+				compatible = "atmel,24c02";
+				reg = <0x57>;
+				size = <256>;
+			};
+
+		};
+
+		i2c_sfp1: i2c@1 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <1>;
+		};
+
+		i2c_sfp2: i2c@2 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <2>;
+		};
+	};
 };
 
 &pio {
-- 
2.43.0


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

* [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (15 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 16/18] arm64: dts: mediatek: mt7988: add i2c-mux " Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-02 12:25 ` [PATCH v2 18/18] arm64: dts: mediatek: mt7988: enable pwm " Frank Wunderlich
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Enable front-usb on Bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi                | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 9ceefc990000..12b45b18955b 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -373,6 +373,10 @@ &serial0 {
 	status = "okay";
 };
 
+&ssusb1 {
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 93c21a5248fa..2be84acac06a 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -336,7 +336,7 @@ usb@11190000 {
 			clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
 		};
 
-		usb@11200000 {
+		ssusb1: usb@11200000 {
 			compatible = "mediatek,mt7988-xhci", "mediatek,mtk-xhci";
 			reg = <0 0x11200000 0 0x2e00>,
 			      <0 0x11203e00 0 0x0100>;
-- 
2.43.0


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

* [PATCH v2 18/18] arm64: dts: mediatek: mt7988: enable pwm on bpi-r4
  2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
                   ` (16 preceding siblings ...)
  2024-12-02 12:25 ` [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 " Frank Wunderlich
@ 2024-12-02 12:25 ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  17 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 12:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Frank Wunderlich <frank-w@public-files.de>

Enable pwm on Bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi                | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 12b45b18955b..181bb997cd8d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -369,6 +369,10 @@ mux {
 	};
 };
 
+&pwm {
+	status = "okay";
+};
+
 &serial0 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 2be84acac06a..11651f5e167d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -211,7 +211,7 @@ mux {
 			};
 		};
 
-		pwm@10048000 {
+		pwm: pwm@10048000 {
 			compatible = "mediatek,mt7988-pwm";
 			reg = <0 0x10048000 0 0x1000>;
 			clocks = <&infracfg CLK_INFRA_66M_PWM_BCK>,
-- 
2.43.0


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

* Re: [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node " Frank Wunderlich
@ 2024-12-02 13:46   ` Krzysztof Kozlowski
  2024-12-02 14:29     ` Frank Wunderlich
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
  1 sibling, 1 reply; 51+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-02 13:46 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

On 02/12/2024 13:25, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add chosen node on Bananapi R4 board with stdout and default bootargs.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
>  arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> index 9037f35857a9..1c2a806f6f6c 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> @@ -9,6 +9,11 @@ / {
>  	model = "Banana Pi BPI-R4";
>  	chassis-type = "embedded";
>  
> +	chosen {
> +		stdout-path = &serial0;
> +		bootargs = "console=ttyS0,115200n1";

Drop or merge into stdout path.

Best regards,
Krzysztof

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

* Re: [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  2024-12-02 13:46   ` Krzysztof Kozlowski
@ 2024-12-02 14:29     ` Frank Wunderlich
  2024-12-02 15:58       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 14:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Am 2. Dezember 2024 14:46:24 MEZ schrieb Krzysztof Kozlowski <krzk@kernel.org>:
>On 02/12/2024 13:25, Frank Wunderlich wrote:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>> Add chosen node on Bananapi R4 board with stdout and default bootargs.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>> ---
>>  arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> index 9037f35857a9..1c2a806f6f6c 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> @@ -9,6 +9,11 @@ / {
>>  	model = "Banana Pi BPI-R4";
>>  	chassis-type = "embedded";
>>  
>> +	chosen {
>> +		stdout-path = &serial0;
>> +		bootargs = "console=ttyS0,115200n1";
>
>Drop or merge into stdout path.

Have you an example to pass speed setting to stdout-path? As it is only a phandle it is not clear to me how to merge these 2...

>Best regards,
>Krzysztof


regards Frank

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

* Re: [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  2024-12-02 14:29     ` Frank Wunderlich
@ 2024-12-02 15:58       ` Krzysztof Kozlowski
  2024-12-02 17:54         ` Aw: " Frank Wunderlich
  0 siblings, 1 reply; 51+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-02 15:58 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

On 02/12/2024 15:29, Frank Wunderlich wrote:
> Am 2. Dezember 2024 14:46:24 MEZ schrieb Krzysztof Kozlowski <krzk@kernel.org>:
>> On 02/12/2024 13:25, Frank Wunderlich wrote:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add chosen node on Bananapi R4 board with stdout and default bootargs.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> ---
>>>  arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>> index 9037f35857a9..1c2a806f6f6c 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>> @@ -9,6 +9,11 @@ / {
>>>  	model = "Banana Pi BPI-R4";
>>>  	chassis-type = "embedded";
>>>  
>>> +	chosen {
>>> +		stdout-path = &serial0;
>>> +		bootargs = "console=ttyS0,115200n1";
>>
>> Drop or merge into stdout path.
> 
> Have you an example to pass speed setting to stdout-path? As it is only a phandle it is not clear to me how to merge these 2...
It is really trivial to find, considering that 66% of files have it.

git grep stdout

Best regards,
Krzysztof

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

* Aw: Re: [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  2024-12-02 15:58       ` Krzysztof Kozlowski
@ 2024-12-02 17:54         ` Frank Wunderlich
  0 siblings, 0 replies; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-02 17:54 UTC (permalink / raw)
  To: krzk, linux, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

regards Frank


&gt; Gesendet: Montag, 2. Dezember 2024 um 16:58
&gt; Von: "Krzysztof Kozlowski" <krzk@kernel.org>
&gt; An: "Frank Wunderlich" <linux@fw-web.de>, "Rob Herring" <robh@kernel.org>, "Krzysztof Kozlowski" <krzk+dt@kernel.org>, "Conor Dooley" <conor+dt@kernel.org>, "Matthias Brugger" <matthias.bgg@gmail.com>, "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
&gt; CC: "Frank Wunderlich" <frank-w@public-files.de>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org
&gt; Betreff: Re: [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
&gt;
&gt; On 02/12/2024 15:29, Frank Wunderlich wrote:
&gt; &gt; Am 2. Dezember 2024 14:46:24 MEZ schrieb Krzysztof Kozlowski <krzk@kernel.org>:
&gt; &gt;&gt; On 02/12/2024 13:25, Frank Wunderlich wrote:
&gt; &gt;&gt;&gt; From: Frank Wunderlich <frank-w@public-files.de>
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; Add chosen node on Bananapi R4 board with stdout and default bootargs.
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
&gt; &gt;&gt;&gt; ---
&gt; &gt;&gt;&gt;  arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 5 +++++
&gt; &gt;&gt;&gt;  1 file changed, 5 insertions(+)
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
&gt; &gt;&gt;&gt; index 9037f35857a9..1c2a806f6f6c 100644
&gt; &gt;&gt;&gt; --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
&gt; &gt;&gt;&gt; +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
&gt; &gt;&gt;&gt; @@ -9,6 +9,11 @@ / {
&gt; &gt;&gt;&gt;  	model = "Banana Pi BPI-R4";
&gt; &gt;&gt;&gt;  	chassis-type = "embedded";
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; +	chosen {
&gt; &gt;&gt;&gt; +		stdout-path = &amp;serial0;
&gt; &gt;&gt;&gt; +		bootargs = "console=ttyS0,115200n1";
&gt; &gt;&gt;
&gt; &gt;&gt; Drop or merge into stdout path.
&gt; &gt;
&gt; &gt; Have you an example to pass speed setting to stdout-path? As it is only a phandle it is not clear to me how to merge these 2...
&gt; It is really trivial to find, considering that 66% of files have it.
&gt;
&gt; git grep stdout

thanks, wasn't aware that string is here also accepted...found it ("git grep stdout-path" is much better here :) )

will change both lines to this single one:

stdout-path = "serial0:115200n8";

&gt; Best regards,
&gt; Krzysztof
&gt; </frank-w@public-files.de></frank-w@public-files.de></krzk@kernel.org></frank-w@public-files.de></angelogioacchino.delregno@collabora.com></matthias.bgg@gmail.com></conor+dt@kernel.org></krzk+dt@kernel.org></robh@kernel.org></linux@fw-web.de></krzk@kernel.org>

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

* Re: [PATCH v2 18/18] arm64: dts: mediatek: mt7988: enable pwm on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 18/18] arm64: dts: mediatek: mt7988: enable pwm " Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Enable pwm on Bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 " Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-04 11:29     ` Frank Wunderlich (linux)
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Enable front-usb on Bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 16/18] arm64: dts: mediatek: mt7988: add i2c-mux on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 16/18] arm64: dts: mediatek: mt7988: add i2c-mux " Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 

arm64: dts: mediatek: mt7988-bpi-r4: Add PCA9545 I2C Mux

> Bananapi R4 uses an i2c multiplexer for SFP slots, rtc and eeprom.
> Add its node to the right i2c controller.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> ---
>   .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 40 +++++++++++++++++++
>   1 file changed, 40 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> index 550c373b3d70..9ceefc990000 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> @@ -2,6 +2,7 @@
>   
>   /dts-v1/;
>   
> +#include <dt-bindings/gpio/gpio.h>
>   #include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
>   
>   #include "mt7988a.dtsi"
> @@ -138,6 +139,45 @@ &i2c2 {
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&i2c2_1_pins>;
>   	status = "okay";
> +
> +	pca9545: i2c-mux@70 {
> +		reg = <0x70>;
> +		compatible = "nxp,pca9545";

reg goes after compatible... :-)

After which

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4 Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-03 14:04     ` Frank Wunderlich
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 

arm64: dts: mediatek: mt7988a-bpi-r4: Add MediaTek MT6682A/RT5190A PMIC

The BananaPi R4 board has a MediaTek MT8862A PMIC, a rebrand of the
Richtek RT5190A chip, connected to the I2C0 bus.

Add the relevant node and, while at it, also configure the regulators
from this PMIC that are used on this board.

> Bananapi R4 Board contains a MT6682A pmic which is compatible to rt5190a.
> Add its node to the i2 controller.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
>   .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 51 +++++++++++++++++++
>   1 file changed, 51 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> index 13ca016d6a67..bc1ec73b8ddd 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> @@ -2,6 +2,8 @@
>   
>   /dts-v1/;
>   
> +#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
> +
>   #include "mt7988a.dtsi"
>   
>   / {
> @@ -65,6 +67,55 @@ &i2c0 {
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&i2c0_pins>;
>   	status = "okay";
> +
> +	rt5190a_64: rt5190a@64 {
> +		compatible = "richtek,rt5190a";
> +		reg = <0x64>;
> +		vin2-supply = <&rt5190_buck1>;
> +		vin3-supply = <&rt5190_buck1>;
> +		vin4-supply = <&rt5190_buck1>;
> +
> +		regulators {
> +			rt5190_buck1: buck1 {
> +				regulator-name = "rt5190a-buck1";
> +				regulator-min-microvolt = <5090000>;
> +				regulator-max-microvolt = <5090000>;
> +				regulator-allowed-modes =
> +				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;

Does it work like that?

regulator-allowed-modes = <RT5190A_OPMODE_AUTO>,
			  <RT5190A_OPMODE_FPWM>;

If yes, please write it like that - if not, I'm sad - but regardless

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 15/18] arm64: dts: mediatek: mt7988: add proc-supply for cpus on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 15/18] arm64: dts: mediatek: mt7988: add proc-supply for cpus " Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add proc-supply property to cpus on Bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board
  2024-12-02 12:25 ` [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-03 10:58     ` Frank Wunderlich
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add basic i2c nodes to bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers

Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; these
controllers are accessible at ... I don't know, a header on the board?

After which,

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node " Frank Wunderlich
  2024-12-02 13:46   ` Krzysztof Kozlowski
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 

arm64: dts: mediatek: mt7988a-bpi-r4: Add default bootargs and UART stdout

> Add chosen node on Bananapi R4 board with stdout and default bootargs.

> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
>   arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> index 9037f35857a9..1c2a806f6f6c 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> @@ -9,6 +9,11 @@ / {
>   	model = "Banana Pi BPI-R4";
>   	chassis-type = "embedded";
>   
> +	chosen {
> +		stdout-path = &serial0;
> +		bootargs = "console=ttyS0,115200n1";
> +	};
> +
>   	reg_1p8v: regulator-1p8v {
>   		compatible = "regulator-fixed";
>   		regulator-name = "fixed-1.8V";



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

* Re: [PATCH v2 06/18] arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4
  2024-12-02 12:25 ` [PATCH v2 06/18] arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4 Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 

arm64: dts: mediatek: mt7988a-bpi-r4: Add thermal configuration

> Add additional thermal trips to Bananapi R4 board.
> SoC only contains the critical trip.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 09/18] arm64: dts: mediatek: mt7988: add operating-points
  2024-12-02 12:25 ` [PATCH v2 09/18] arm64: dts: mediatek: mt7988: add operating-points Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 

arm64: dts: mediatek: mt7988: Add CPU OPP table for clock scaling

> Add operating points defining frequency/voltages of cpu cores.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 07/18] arm64: dts: mediatek: mt7988: add reserved memory
  2024-12-02 12:25 ` [PATCH v2 07/18] arm64: dts: mediatek: mt7988: add reserved memory Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add memory range handled by ATF to not be touched by linux kernel.
> ATF is SoC specific and not board-specific so add it to mt7988.dtsi.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Since you have to send a v3, can you please move this to be the first commit
of the series?

Would make a lot of sense :-)

> ---
>   arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> index 09dcb39ad098..1cf801486e61 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> @@ -63,6 +63,18 @@ psci {
>   		method = "smc";
>   	};
>   
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		/* 320 KiB reserved for ARM Trusted Firmware (BL31 and BL32) */
> +		secmon_reserved: secmon@43000000 {

Are you ever modifying this outside of mt7988a.dtsi?

No!

So you don't need to add the `secmon_reserved` handle..... :-)

> +			reg = <0 0x43000000 0 0x50000>;
> +			no-map;
> +		};
> +	};
> +
>   	soc {
>   		compatible = "simple-bus";
>   		ranges;



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

* Re: [PATCH v2 12/18] arm64: dts: mediatek: mt7988: add missing clock-div property for i2c
  2024-12-02 12:25 ` [PATCH v2 12/18] arm64: dts: mediatek: mt7988: add missing clock-div property for i2c Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> I2C binding requires clock-div property.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Can you please group all of the DTSI commits at the beginning, and all of the
BPI-R4 commits after?
Of course, do that *only* where possible - like, this one can be moved as it
is only touching the dtsi and *nothing else*.

...Besides, this commit also needs a Fixes tag ;-)

After adding the relevant Fixes tag:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4 Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-03 11:27     ` Frank Wunderlich
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 

arm64: dts: mediatek: mt7988a-bpi-r4: Enable serial0 debug uart

> Enable the debug uart on Bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 05/18] arm64: dts: mediatek: mt7988: add thermal-zone
  2024-12-02 12:25 ` [PATCH v2 05/18] arm64: dts: mediatek: mt7988: add thermal-zone Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add basic thermal-zone node.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 08/18] arm64: dts: mediatek: mt7988: add mcu-sys node for cpu
  2024-12-02 12:25 ` [PATCH v2 08/18] arm64: dts: mediatek: mt7988: add mcu-sys node for cpu Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add mcu-sys node which is used later as clock-controller for cpus.

In preparation for adding support for CPU DVFS and clock tables for it,
add the MCUSYS clock controller node.

> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 04/18] arm64: dts: mediatek: mt7988: add lvts node
  2024-12-02 12:25 ` [PATCH v2 04/18] arm64: dts: mediatek: mt7988: add lvts node Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add Low Voltage Thermal Sensor (LVTS) node for mt7988 SoC.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> changes:
> 
> v2:
> squash
> - "arm64: dts: mediatek: mt7988: add label for efuse"
> - "arm64: dts: mediatek: mt7988: extend efuse node" (drop other efuse subnodes)
> ---
>   arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 19 ++++++++++++++++++-
>   1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> index 5e40446cb7b3..f7748a840297 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> @@ -4,6 +4,7 @@
>   #include <dt-bindings/interrupt-controller/arm-gic.h>
>   #include <dt-bindings/phy/phy.h>
>   #include <dt-bindings/pinctrl/mt65xx.h>
> +#include <dt-bindings/reset/mediatek,mt7988-resets.h>
>   
>   / {
>   	compatible = "mediatek,mt7988a";
> @@ -85,6 +86,7 @@ infracfg: clock-controller@10001000 {
>   			compatible = "mediatek,mt7988-infracfg", "syscon";
>   			reg = <0 0x10001000 0 0x1000>;
>   			#clock-cells = <1>;
> +			#reset-cells = <1>;
>   		};
>   
>   		topckgen: clock-controller@1001b000 {
> @@ -250,6 +252,17 @@ i2c@11005000 {
>   			status = "disabled";
>   		};
>   
> +		lvts: lvts@1100a000 {
> +			compatible = "mediatek,mt7988-lvts-ap";
> +			#thermal-sensor-cells = <1>;
> +			reg = <0 0x1100a000 0 0x1000>;
> +			clocks = <&infracfg CLK_INFRA_26M_THERM_SYSTEM>;
> +			interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
> +			resets = <&infracfg MT7988_INFRA_RST1_THERM_CTRL_SWRST>;
> +			nvmem-cells = <&lvts_calibration>;
> +			nvmem-cell-names = "lvts-calib-data-1";
> +		};
> +
>   		usb@11190000 {
>   			compatible = "mediatek,mt7988-xhci", "mediatek,mtk-xhci";
>   			reg = <0 0x11190000 0 0x2e00>,
> @@ -307,11 +320,15 @@ clock-controller@11f40000 {
>   			#clock-cells = <1>;
>   		};
>   
> -		efuse@11f50000 {
> +		efuse: efuse@11f50000 {

Okay but why are you adding the efuse handle name to this node?
You're not using it anywhere as far as I can see.

Please drop this change - after which:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

>   			compatible = "mediatek,mt7988-efuse", "mediatek,efuse";
>   			reg = <0 0x11f50000 0 0x1000>;
>   			#address-cells = <1>;
>   			#size-cells = <1>;
> +
> +			lvts_calibration: calib@918 {
> +				reg = <0x918 0x28>;
> +			};
>   		};
>   
>   		clock-controller@15000000 {


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

* Re: [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4
  2024-12-02 12:25 ` [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4 Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Enable the watchdog on Bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH v2 02/18] arm64: dts: mediatek: mt7988: add mmc support
  2024-12-02 12:25 ` [PATCH v2 02/18] arm64: dts: mediatek: mt7988: add mmc support Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add devicetree node for MMC controller.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> changes:
> v2:
> squash "add missing label for apmixedsys"
> ---
>   arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 24 ++++++++++++++++++++++-
>   1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> index 46969577c87a..5e40446cb7b3 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
> @@ -100,7 +100,7 @@ watchdog: watchdog@1001c000 {
>   			#reset-cells = <1>;
>   		};
>   
> -		clock-controller@1001e000 {
> +		apmixedsys: clock-controller@1001e000 {
>   			compatible = "mediatek,mt7988-apmixedsys";
>   			reg = <0 0x1001e000 0 0x1000>;
>   			#clock-cells = <1>;
> @@ -278,6 +278,28 @@ usb@11200000 {
>   			clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
>   		};
>   
> +		mmc0: mmc@11230000 {
> +			compatible = "mediatek,mt7988-mmc";
> +			reg = <0 0x11230000 0 0x1000>,
> +			      <0 0x11D60000 0 0x1000>;
> +			interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&infracfg CLK_INFRA_MSDC400>,
> +				 <&infracfg CLK_INFRA_MSDC2_HCK>,
> +				 <&infracfg CLK_INFRA_66M_MSDC_0_HCK>,
> +				 <&infracfg CLK_INFRA_133M_MSDC_0_HCK>;
> +			assigned-clocks = <&topckgen CLK_TOP_EMMC_250M_SEL>,
> +					  <&topckgen CLK_TOP_EMMC_400M_SEL>;
> +			assigned-clock-parents = <&topckgen CLK_TOP_NET1PLL_D5_D2>,
> +						 <&apmixedsys CLK_APMIXED_MSDCPLL>;
> +			clock-names = "source",
> +				      "hclk",
> +				      "axi_cg",
> +				      "ahb_cg";

One last nitpick: all of the clock-names *do* fit in one line.

			clock-names = "source", "hclk", "axi_cg", "ahb_cg";

After which

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3
  2024-12-02 12:25 ` [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3 Frank Wunderlich
@ 2024-12-03  9:40   ` AngeloGioacchino Del Regno
  2024-12-03 10:51     ` Frank Wunderlich
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03  9:40 UTC (permalink / raw)
  To: Frank Wunderlich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add regulator nodes used for mmc to Bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

If you're adding the eMMC regulators, I assume that there's an eMMC, or that even
if there's no device in some version of the board, these two regulators are always
assigned to the eMMC device - right?

You should, at this point, do exactly that: you can leave the mmc0 disabled and
only enable it in a DTBO.

&mmc0 {
	/* eMMC gets enabled by DTBO if present */
	vmmc-supply = <&reg_3p3v>;
	vqmmc-supply = <&reg_1p8v>;
};

Cheers,
Angelo

> ---
> v2:
> - move mmc regulators to board dts of bpi-r4
> ---
>   .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts   | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> index d914eae2b524..df53512c6890 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> @@ -8,6 +8,24 @@ / {
>   	compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
>   	model = "Banana Pi BPI-R4";
>   	chassis-type = "embedded";
> +
> +	reg_1p8v: regulator-1p8v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "fixed-1.8V";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
> +
> +	reg_3p3v: regulator-3p3v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "fixed-3.3V";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
>   };
>   
>   &pio {



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

* Re: [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
@ 2024-12-03 10:51     ` Frank Wunderlich
  2024-12-03 14:20       ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-03 10:51 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Frank Wunderlich, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Am 3. Dezember 2024 10:40:54 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>> Add regulator nodes used for mmc to Bananapi R4 board.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>
>If you're adding the eMMC regulators, I assume that there's an eMMC, or that even
>if there's no device in some version of the board, these two regulators are always
>assigned to the eMMC device - right?

Like BPi-R3 there is one mmc controller mapped to either sd or emmc. I can move the regulators to the dtbo,but then they are defined twice (at least 3v3).

>You should, at this point, do exactly that: you can leave the mmc0 disabled and
>only enable it in a DTBO.

I enable it only in dtbo...

>&mmc0 {
>	/* eMMC gets enabled by DTBO if present */
>	vmmc-supply = <&reg_3p3v>;
>	vqmmc-supply = <&reg_1p8v>;
>};

Problem is here that sdcard uses only the 3v3 twice

https://github.com/frank-w/BPI-Router-Linux/blob/6.12-main/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso

And emmc needs both

https://github.com/frank-w/BPI-Router-Linux/blob/6.12-main/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso

Only defining the vmmc-supply in dts and set only the other in dtso is possible but but imho not nice.

>Cheers,
>Angelo
>
>> ---
>> v2:
>> - move mmc regulators to board dts of bpi-r4
>> ---
>>   .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts   | 18 ++++++++++++++++++
>>   1 file changed, 18 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> index d914eae2b524..df53512c6890 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> @@ -8,6 +8,24 @@ / {
>>   	compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
>>   	model = "Banana Pi BPI-R4";
>>   	chassis-type = "embedded";
>> +
>> +	reg_1p8v: regulator-1p8v {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "fixed-1.8V";
>> +		regulator-min-microvolt = <1800000>;
>> +		regulator-max-microvolt = <1800000>;
>> +		regulator-boot-on;
>> +		regulator-always-on;
>> +	};
>> +
>> +	reg_3p3v: regulator-3p3v {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "fixed-3.3V";
>> +		regulator-min-microvolt = <3300000>;
>> +		regulator-max-microvolt = <3300000>;
>> +		regulator-boot-on;
>> +		regulator-always-on;
>> +	};
>>   };
>>     &pio {
>
>


regards Frank

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

* Re: [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
@ 2024-12-03 10:58     ` Frank Wunderlich
  2024-12-03 14:22       ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-03 10:58 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Frank Wunderlich, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Am 3. Dezember 2024 10:40:38 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>> Add basic i2c nodes to bananapi R4 board.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>
>arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers
>
>Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; these
>controllers are accessible at ... I don't know, a header on the board?

These 2 i2c have directly connected spare devices (pmic on i2c0 and i2c-mux on i2c2 added in later commits to have it a bit cleaner). I2c1 is on gpio header which i have not added to let user choose if he wants i2c option or gpio. I can also add i2c1 to r4 board with the right pinctrl but imho it should be disabled to have gpio function default.

>After which,
>
>Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>
>


regards Frank

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

* Re: [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
@ 2024-12-03 11:27     ` Frank Wunderlich
  2024-12-03 14:23       ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-03 11:27 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Frank Wunderlich, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Am 3. Dezember 2024 10:40:45 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>
>arm64: dts: mediatek: mt7988a-bpi-r4: Enable serial0 debug uart

You want new prefix here? That will change all r4 commits,right?

>> Enable the debug uart on Bananapi R4 board.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>
>Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>


regards Frank

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

* Re: [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
@ 2024-12-03 14:04     ` Frank Wunderlich
  0 siblings, 0 replies; 51+ messages in thread
From: Frank Wunderlich @ 2024-12-03 14:04 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger
  Cc: Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Am 3. Dezember 2024 10:40:35 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>
>arm64: dts: mediatek: mt7988a-bpi-r4: Add MediaTek MT6682A/RT5190A PMIC
>
>The BananaPi R4 board has a MediaTek MT8862A PMIC, a rebrand of the
>Richtek RT5190A chip, connected to the I2C0 bus.
>
>Add the relevant node and, while at it, also configure the regulators
>from this PMIC that are used on this board.
>
>> Bananapi R4 Board contains a MT6682A pmic which is compatible to rt5190a.
>> Add its node to the i2 controller.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>> ---
>>   .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 51 +++++++++++++++++++
>>   1 file changed, 51 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> index 13ca016d6a67..bc1ec73b8ddd 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>> @@ -2,6 +2,8 @@
>>     /dts-v1/;
>>   +#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
>> +
>>   #include "mt7988a.dtsi"
>>     / {
>> @@ -65,6 +67,55 @@ &i2c0 {
>>   	pinctrl-names = "default";
>>   	pinctrl-0 = <&i2c0_pins>;
>>   	status = "okay";
>> +
>> +	rt5190a_64: rt5190a@64 {
>> +		compatible = "richtek,rt5190a";
>> +		reg = <0x64>;
>> +		vin2-supply = <&rt5190_buck1>;
>> +		vin3-supply = <&rt5190_buck1>;
>> +		vin4-supply = <&rt5190_buck1>;
>> +
>> +		regulators {
>> +			rt5190_buck1: buck1 {
>> +				regulator-name = "rt5190a-buck1";
>> +				regulator-min-microvolt = <5090000>;
>> +				regulator-max-microvolt = <5090000>;
>> +				regulator-allowed-modes =
>> +				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
>
>Does it work like that?
>
>regulator-allowed-modes = <RT5190A_OPMODE_AUTO>,
>			  <RT5190A_OPMODE_FPWM>;

It seems working, dtbs_check accepts it and i can boot up with this change and see no errors caused by it.

>If yes, please write it like that - if not, I'm sad - but regardless
>
>Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>


regards Frank

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

* Re: [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3
  2024-12-03 10:51     ` Frank Wunderlich
@ 2024-12-03 14:20       ` AngeloGioacchino Del Regno
  2024-12-03 15:08         ` Frank Wunderlich (linux)
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03 14:20 UTC (permalink / raw)
  To: frank-w, Frank Wunderlich, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Il 03/12/24 11:51, Frank Wunderlich ha scritto:
> Am 3. Dezember 2024 10:40:54 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add regulator nodes used for mmc to Bananapi R4 board.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>
>> If you're adding the eMMC regulators, I assume that there's an eMMC, or that even
>> if there's no device in some version of the board, these two regulators are always
>> assigned to the eMMC device - right?
> 
> Like BPi-R3 there is one mmc controller mapped to either sd or emmc. I can move the regulators to the dtbo,but then they are defined twice (at least 3v3).
> 
>> You should, at this point, do exactly that: you can leave the mmc0 disabled and
>> only enable it in a DTBO.
> 
> I enable it only in dtbo...
> 
>> &mmc0 {
>> 	/* eMMC gets enabled by DTBO if present */
>> 	vmmc-supply = <&reg_3p3v>;
>> 	vqmmc-supply = <&reg_1p8v>;
>> };
> 
> Problem is here that sdcard uses only the 3v3 twice
> 
> https://github.com/frank-w/BPI-Router-Linux/blob/6.12-main/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso
> 
> And emmc needs both
> 
> https://github.com/frank-w/BPI-Router-Linux/blob/6.12-main/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso
> 
> Only defining the vmmc-supply in dts and set only the other in dtso is possible but but imho not nice.
> 

If you added that in the commit description in the first place, I wouldn't
have sent you that suggestion ;-)

So, please add the reason that you just explained to me in the description
of this commit and just leave the code as-is.

Cheers!

>> Cheers,
>> Angelo
>>
>>> ---
>>> v2:
>>> - move mmc regulators to board dts of bpi-r4
>>> ---
>>>    .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts   | 18 ++++++++++++++++++
>>>    1 file changed, 18 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>> index d914eae2b524..df53512c6890 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>> @@ -8,6 +8,24 @@ / {
>>>    	compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
>>>    	model = "Banana Pi BPI-R4";
>>>    	chassis-type = "embedded";
>>> +
>>> +	reg_1p8v: regulator-1p8v {
>>> +		compatible = "regulator-fixed";
>>> +		regulator-name = "fixed-1.8V";
>>> +		regulator-min-microvolt = <1800000>;
>>> +		regulator-max-microvolt = <1800000>;
>>> +		regulator-boot-on;
>>> +		regulator-always-on;
>>> +	};
>>> +
>>> +	reg_3p3v: regulator-3p3v {
>>> +		compatible = "regulator-fixed";
>>> +		regulator-name = "fixed-3.3V";
>>> +		regulator-min-microvolt = <3300000>;
>>> +		regulator-max-microvolt = <3300000>;
>>> +		regulator-boot-on;
>>> +		regulator-always-on;
>>> +	};
>>>    };
>>>      &pio {
>>
>>
> 
> 
> regards Frank



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

* Re: [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board
  2024-12-03 10:58     ` Frank Wunderlich
@ 2024-12-03 14:22       ` AngeloGioacchino Del Regno
  2024-12-03 15:28         ` Frank Wunderlich (linux)
  0 siblings, 1 reply; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03 14:22 UTC (permalink / raw)
  To: frank-w, Frank Wunderlich, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Il 03/12/24 11:58, Frank Wunderlich ha scritto:
> Am 3. Dezember 2024 10:40:38 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add basic i2c nodes to bananapi R4 board.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>
>> arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers
>>
>> Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; these
>> controllers are accessible at ... I don't know, a header on the board?
> 
> These 2 i2c have directly connected spare devices (pmic on i2c0 and i2c-mux on i2c2 added in later commits to have it a bit cleaner). I2c1 is on gpio header which i have not added to let user choose if he wants i2c option or gpio. I can also add i2c1 to r4 board with the right pinctrl but imho it should be disabled to have gpio function default.

And again, you should really add all that information to the commit description,
as that not only helps me to review your submission, but also helps other people
checking the commit history....!

Cheers

> 
>> After which,
>>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>
>>
> 
> 
> regards Frank




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

* Re: [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4
  2024-12-03 11:27     ` Frank Wunderlich
@ 2024-12-03 14:23       ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 51+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-03 14:23 UTC (permalink / raw)
  To: frank-w, Frank Wunderlich, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Il 03/12/24 12:27, Frank Wunderlich ha scritto:
> Am 3. Dezember 2024 10:40:45 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>
>> arm64: dts: mediatek: mt7988a-bpi-r4: Enable serial0 debug uart
> 
> You want new prefix here? That will change all r4 commits,right?
> 

Yeah - that prefix should be shortening the commit titles but mainly will
make it more straightforward when reading the commit history with --oneline.

Thanks,
Angelo

>>> Enable the debug uart on Bananapi R4 board.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>
> 
> 
> regards Frank




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

* Re: [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3
  2024-12-03 14:20       ` AngeloGioacchino Del Regno
@ 2024-12-03 15:08         ` Frank Wunderlich (linux)
  0 siblings, 0 replies; 51+ messages in thread
From: Frank Wunderlich (linux) @ 2024-12-03 15:08 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: frank-w, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Am 2024-12-03 15:20, schrieb AngeloGioacchino Del Regno:
> Il 03/12/24 11:51, Frank Wunderlich ha scritto:
>> Am 3. Dezember 2024 10:40:54 MEZ schrieb AngeloGioacchino Del Regno 
>> <angelogioacchino.delregno@collabora.com>:
>>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>> 
>>>> Add regulator nodes used for mmc to Bananapi R4 board.
>>>> 
>>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> 
>>> If you're adding the eMMC regulators, I assume that there's an eMMC, 
>>> or that even
>>> if there's no device in some version of the board, these two 
>>> regulators are always
>>> assigned to the eMMC device - right?
>> 
>> Like BPi-R3 there is one mmc controller mapped to either sd or emmc. I 
>> can move the regulators to the dtbo,but then they are defined twice 
>> (at least 3v3).
>> 
>>> You should, at this point, do exactly that: you can leave the mmc0 
>>> disabled and
>>> only enable it in a DTBO.
>> 
>> I enable it only in dtbo...
>> 
>>> &mmc0 {
>>> 	/* eMMC gets enabled by DTBO if present */
>>> 	vmmc-supply = <&reg_3p3v>;
>>> 	vqmmc-supply = <&reg_1p8v>;
>>> };
>> 
>> Problem is here that sdcard uses only the 3v3 twice
>> 
>> https://github.com/frank-w/BPI-Router-Linux/blob/6.12-main/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso
>> 
>> And emmc needs both
>> 
>> https://github.com/frank-w/BPI-Router-Linux/blob/6.12-main/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso
>> 
>> Only defining the vmmc-supply in dts and set only the other in dtso is 
>> possible but but imho not nice.
>> 
> 
> If you added that in the commit description in the first place, I 
> wouldn't
> have sent you that suggestion ;-)
> 
> So, please add the reason that you just explained to me in the 
> description
> of this commit and just leave the code as-is.

OK, would this be ok?

arm64: dts: mediatek: mt7988a-bpi-r4: add fixed regulators for 1v8 and 
3v3

Add regulator nodes used for mmc to Bananapi R4 board.
This board has 1 MMC controller used for SDMMC and eMMC where only one 
can
be used at one time, selected by hardware switches. SD use 3v3 for both
supplies and emmc uses both regulators.
So defining both regulators in board dts and referencing them in the dt
overlay.

> Cheers!
> 
>>> Cheers,
>>> Angelo
>>> 
>>>> ---
>>>> v2:
>>>> - move mmc regulators to board dts of bpi-r4
>>>> ---
>>>>    .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts   | 18 
>>>> ++++++++++++++++++
>>>>    1 file changed, 18 insertions(+)
>>>> 
>>>> diff --git 
>>>> a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts 
>>>> b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>>> index d914eae2b524..df53512c6890 100644
>>>> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
>>>> @@ -8,6 +8,24 @@ / {
>>>>    	compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
>>>>    	model = "Banana Pi BPI-R4";
>>>>    	chassis-type = "embedded";
>>>> +
>>>> +	reg_1p8v: regulator-1p8v {
>>>> +		compatible = "regulator-fixed";
>>>> +		regulator-name = "fixed-1.8V";
>>>> +		regulator-min-microvolt = <1800000>;
>>>> +		regulator-max-microvolt = <1800000>;
>>>> +		regulator-boot-on;
>>>> +		regulator-always-on;
>>>> +	};
>>>> +
>>>> +	reg_3p3v: regulator-3p3v {
>>>> +		compatible = "regulator-fixed";
>>>> +		regulator-name = "fixed-3.3V";
>>>> +		regulator-min-microvolt = <3300000>;
>>>> +		regulator-max-microvolt = <3300000>;
>>>> +		regulator-boot-on;
>>>> +		regulator-always-on;
>>>> +	};
>>>>    };
>>>>      &pio {
>>> 
>>> 
>> 
>> 
>> regards Frank

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

* Re: [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board
  2024-12-03 14:22       ` AngeloGioacchino Del Regno
@ 2024-12-03 15:28         ` Frank Wunderlich (linux)
  0 siblings, 0 replies; 51+ messages in thread
From: Frank Wunderlich (linux) @ 2024-12-03 15:28 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: frank-w, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Am 2024-12-03 15:22, schrieb AngeloGioacchino Del Regno:
> Il 03/12/24 11:58, Frank Wunderlich ha scritto:
>> Am 3. Dezember 2024 10:40:38 MEZ schrieb AngeloGioacchino Del Regno 
>> <angelogioacchino.delregno@collabora.com>:
>>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>> 
>>>> Add basic i2c nodes to bananapi R4 board.
>>>> 
>>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> 
>>> arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers
>>> 
>>> Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; 
>>> these
>>> controllers are accessible at ... I don't know, a header on the 
>>> board?
>> 
>> These 2 i2c have directly connected spare devices (pmic on i2c0 and 
>> i2c-mux on i2c2 added in later commits to have it a bit cleaner). I2c1 
>> is on gpio header which i have not added to let user choose if he 
>> wants i2c option or gpio. I can also add i2c1 to r4 board with the 
>> right pinctrl but imho it should be disabled to have gpio function 
>> default.
> 
> And again, you should really add all that information to the commit 
> description,
> as that not only helps me to review your submission, but also helps 
> other people
> checking the commit history....!

this ine i would rephrase like this

     arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers

     Enable the I2C0, I2C2 controllers found on the BananaPi R4 board.
     Both controllers are not accessible from user and having fixed spare
     devices. I2C0 have a pmic connected, I2C2 is used with 
I2C-multiplexer
     for e.g. SFP cages.
     The missing I2C1 is connected to GPIO header which can have either 
GPIO
     mode or I2C mode.


> Cheers
> 
>> 
>>> After which,
>>> 
>>> Reviewed-by: AngeloGioacchino Del Regno 
>>> <angelogioacchino.delregno@collabora.com>
>>> 
>>> 
>> 
>> 
>> regards Frank

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

* Re: [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 on bpi-r4
  2024-12-03  9:40   ` AngeloGioacchino Del Regno
@ 2024-12-04 11:29     ` Frank Wunderlich (linux)
  0 siblings, 0 replies; 51+ messages in thread
From: Frank Wunderlich (linux) @ 2024-12-04 11:29 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	Frank Wunderlich, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Am 2024-12-03 10:40, schrieb AngeloGioacchino Del Regno:
> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>> Enable front-usb on Bananapi R4 board.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> 
> Reviewed-by: AngeloGioacchino Del Regno 
> <angelogioacchino.delregno@collabora.com>

thanks, but i noticed, that the controllers in dtsi are not disabled 
like in my final dtsi. Imho controllers should be disabled by default 
and only enabled when used on board. Should i add disabling in this 
patch too?

and i noticed that usb phys have to be added to get working usb. Here 
for ssusb1 a tphy is used where i now have prepared patch so i can add 
it in next version (reusing mt7986 compatible). ssusb0 uses a different 
phy (xsphy) which needs a bit more work before (driver and binding 
change).

regards Frank

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

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

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 12:25 [PATCH v2 00/18] continue mt7988 devicetree work Frank Wunderlich
2024-12-02 12:25 ` [PATCH v2 01/18] arm64: dts: mediatek: mt7988: enable watchdog on bpi-r4 Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 02/18] arm64: dts: mediatek: mt7988: add mmc support Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 03/18] arm64: dts: mediatek: mt7988: add fixed regulators for 1v8 and 3v3 Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-03 10:51     ` Frank Wunderlich
2024-12-03 14:20       ` AngeloGioacchino Del Regno
2024-12-03 15:08         ` Frank Wunderlich (linux)
2024-12-02 12:25 ` [PATCH v2 04/18] arm64: dts: mediatek: mt7988: add lvts node Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 05/18] arm64: dts: mediatek: mt7988: add thermal-zone Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 06/18] arm64: dts: mediatek: mt7988: add thermal trips to bpi-r4 Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 07/18] arm64: dts: mediatek: mt7988: add reserved memory Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 08/18] arm64: dts: mediatek: mt7988: add mcu-sys node for cpu Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 09/18] arm64: dts: mediatek: mt7988: add operating-points Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 10/18] arm64: dts: mediatek: mt7988: enable serial0 on bpi-r4 Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-03 11:27     ` Frank Wunderlich
2024-12-03 14:23       ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 11/18] arm64: dts: mediatek: mt7988: add chosen node " Frank Wunderlich
2024-12-02 13:46   ` Krzysztof Kozlowski
2024-12-02 14:29     ` Frank Wunderlich
2024-12-02 15:58       ` Krzysztof Kozlowski
2024-12-02 17:54         ` Aw: " Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 12/18] arm64: dts: mediatek: mt7988: add missing clock-div property for i2c Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-03 10:58     ` Frank Wunderlich
2024-12-03 14:22       ` AngeloGioacchino Del Regno
2024-12-03 15:28         ` Frank Wunderlich (linux)
2024-12-02 12:25 ` [PATCH v2 14/18] arm64: dts: mediatek: mt7988: add pmic on bpi-r4 Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-03 14:04     ` Frank Wunderlich
2024-12-02 12:25 ` [PATCH v2 15/18] arm64: dts: mediatek: mt7988: add proc-supply for cpus " Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 16/18] arm64: dts: mediatek: mt7988: add i2c-mux " Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-02 12:25 ` [PATCH v2 17/18] arm64: dts: mediatek: mt7988: enable ssusb1 " Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno
2024-12-04 11:29     ` Frank Wunderlich (linux)
2024-12-02 12:25 ` [PATCH v2 18/18] arm64: dts: mediatek: mt7988: enable pwm " Frank Wunderlich
2024-12-03  9:40   ` AngeloGioacchino Del Regno

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