linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill
@ 2025-06-30 15:36 Nicolas Frattaroli
  2025-06-30 15:36 ` [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D Nicolas Frattaroli
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Nicolas Frattaroli @ 2025-06-30 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel

Turns out the ROCK 4D DT in mainline right now is neither accurate nor
complete.

These changes should quell the fires a little, since at least we now get
two additional working USB ports, plus the Wi-Fi chip shows up (even if
it doesn't have a driver right now).

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Nicolas Frattaroli (3):
      arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
      arm64: dts: rockchip: complete USB nodes on ROCK 4D
      arm64: dts: rockchip: theoretically enable Wi-Fi on ROCK 4D

 arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 83 ++++++++++++++++++++++---
 1 file changed, 75 insertions(+), 8 deletions(-)
---
base-commit: c6a68d8f7b81a6ce8962885408cc2d0c1f8b9470
change-id: 20250630-rock4d-reg-usb-wifi-11839829084b

Best regards,
-- 
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
  2025-06-30 15:36 [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Nicolas Frattaroli
@ 2025-06-30 15:36 ` Nicolas Frattaroli
  2025-06-30 18:12   ` Diederik de Haas
  2025-06-30 15:36 ` [PATCH 2/3] arm64: dts: rockchip: complete USB nodes " Nicolas Frattaroli
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Nicolas Frattaroli @ 2025-06-30 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel

The ROCK 4D's actual DC input is 5V, and the schematic names it as being
5V as well.

Rename the regulator, and change the voltage it claims to be at.
Furthermore, fix vcc_1v1_nldo_s3's vin-supply as coming from
vcc_5v0_sys, and not the DCIN, as per the schematic. This makes no
functional change; both regulators are always on, and one feeds into the
other.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
index 6756403111e704cad42f6674d5ab55eb0306f1e3..352e3df165688219bfedc19734d9eb32c547ec44 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
@@ -57,13 +57,13 @@ user-led {
 		};
 	};
 
-	vcc_12v0_dcin: regulator-vcc-12v0-dcin {
+	vcc_5v0_dcin: regulator-vcc-5v0-dcin {
 		compatible = "regulator-fixed";
 		regulator-always-on;
 		regulator-boot-on;
-		regulator-min-microvolt = <12000000>;
-		regulator-max-microvolt = <12000000>;
-		regulator-name = "vcc_12v0_dcin";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-name = "vcc_5v0_dcin";
 	};
 
 	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
@@ -166,7 +166,7 @@ vcc_5v0_device: regulator-vcc-5v0-device {
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vcc_5v0_device";
-		vin-supply = <&vcc_12v0_dcin>;
+		vin-supply = <&vcc_5v0_sys>;
 	};
 
 	vcc_5v0_host: regulator-vcc-5v0-host {
@@ -190,7 +190,7 @@ vcc_5v0_sys: regulator-vcc-5v0-sys {
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vcc_5v0_sys";
-		vin-supply = <&vcc_12v0_dcin>;
+		vin-supply = <&vcc_5v0_dcin>;
 	};
 };
 

-- 
2.50.0


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 2/3] arm64: dts: rockchip: complete USB nodes on ROCK 4D
  2025-06-30 15:36 [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Nicolas Frattaroli
  2025-06-30 15:36 ` [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D Nicolas Frattaroli
@ 2025-06-30 15:36 ` Nicolas Frattaroli
  2025-06-30 15:36 ` [PATCH 3/3] arm64: dts: rockchip: theoretically enable Wi-Fi " Nicolas Frattaroli
  2025-07-10  9:27 ` [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Heiko Stuebner
  3 siblings, 0 replies; 10+ messages in thread
From: Nicolas Frattaroli @ 2025-06-30 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel

The ROCK 4D uses both USB controllers, and both of which in host mode.
However, it still names one of the supplies for them "OTG" in the
schematic.

Fix the "host" supply's input, and add the "otg" supply. Enable the
remaining USB PHY nodes, and the first controller node as well.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 41 +++++++++++++++++++++++--
 1 file changed, 39 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
index 352e3df165688219bfedc19734d9eb32c547ec44..ed8b018539acb77328627c24b88a5a220fe085d2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
@@ -180,7 +180,21 @@ vcc_5v0_host: regulator-vcc-5v0-host {
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vcc5v0_host";
-		vin-supply = <&vcc_5v0_device>;
+		vin-supply = <&vcc_5v0_sys>;
+	};
+
+	vcc_5v0_otg: regulator-vcc-5v0-otg {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb_otg_pwren>;
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-name = "vcc5v0_otg";
+		vin-supply = <&vcc_5v0_sys>;
 	};
 
 	vcc_5v0_sys: regulator-vcc-5v0-sys {
@@ -682,7 +696,11 @@ pcie_pwren: pcie-pwren {
 
 	usb {
 		usb_host_pwren: usb-host-pwren {
-			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+		usb_otg_pwren: usb-otg-pwren {
+			rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_down>;
+
 		};
 	};
 };
@@ -721,15 +739,34 @@ &u2phy0 {
 	status = "okay";
 };
 
+&u2phy0_otg {
+	phy-supply = <&vcc_5v0_otg>;
+	status = "okay";
+};
+
 &u2phy1 {
 	status = "okay";
 };
 
+&u2phy1_otg {
+	phy-supply = <&vcc_5v0_host>;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-0 = <&uart0m0_xfer>;
 	status = "okay";
 };
 
+&usbdp_phy {
+	status = "okay";
+};
+
+&usb_drd0_dwc3 {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usb_drd1_dwc3 {
 	dr_mode = "host";
 	status = "okay";

-- 
2.50.0


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 3/3] arm64: dts: rockchip: theoretically enable Wi-Fi on ROCK 4D
  2025-06-30 15:36 [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Nicolas Frattaroli
  2025-06-30 15:36 ` [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D Nicolas Frattaroli
  2025-06-30 15:36 ` [PATCH 2/3] arm64: dts: rockchip: complete USB nodes " Nicolas Frattaroli
@ 2025-06-30 15:36 ` Nicolas Frattaroli
  2025-07-10  9:27 ` [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Heiko Stuebner
  3 siblings, 0 replies; 10+ messages in thread
From: Nicolas Frattaroli @ 2025-06-30 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel

The production version of the ROCK 4D appears to sport a AICSEMI
AIC8800D80 USB Wi-Fi + BT chipset. This chip does not yet have a
mainline driver.

Add the necessary rfkill node and wifi regulator node to at least make
it show up in lsusb output. The regulator is set as always-on, as like 2
hours deep into debugging why onboard_usb_dev.c wouldn't try enabling
the regulator the device needs to actually show up and thus bind to
onboard_usb_dev.c, I decided that it's not worth the effort.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 30 +++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
index ed8b018539acb77328627c24b88a5a220fe085d2..291b6e4ffdac86280280de49c30de7ddde80462b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
@@ -37,6 +37,14 @@ hdmi_con_in: endpoint {
 		};
 	};
 
+	rfkill {
+		compatible = "rfkill-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_en_h>;
+		radio-type = "wlan";
+		shutdown-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
+	};
+
 	leds: leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -159,6 +167,19 @@ vcc_3v3_ufs_s0: regulator-vcc-ufs-s0 {
 		vin-supply = <&vcc_5v0_sys>;
 	};
 
+	vcc_3v3_wifi: regulator-vcc-3v3-wifi {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpios = <&gpio2 RK_PC7 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb_wifi_pwr>;
+		regulator-always-on;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-name = "vcc_3v3_wifi";
+		vin-supply = <&vcc_3v3_s3>;
+	};
+
 	vcc_5v0_device: regulator-vcc-5v0-device {
 		compatible = "regulator-fixed";
 		regulator-always-on;
@@ -703,6 +724,15 @@ usb_otg_pwren: usb-otg-pwren {
 
 		};
 	};
+
+	wifi {
+		usb_wifi_pwr: usb-wifi-pwr {
+			rockchip,pins = <2 RK_PC7 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+		wifi_en_h: wifi-en-h {
+			rockchip,pins = <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+	};
 };
 
 &sdmmc {

-- 
2.50.0


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
  2025-06-30 15:36 ` [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D Nicolas Frattaroli
@ 2025-06-30 18:12   ` Diederik de Haas
  2025-06-30 23:10     ` Sebastian Reichel
  0 siblings, 1 reply; 10+ messages in thread
From: Diederik de Haas @ 2025-06-30 18:12 UTC (permalink / raw)
  To: Nicolas Frattaroli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2331 bytes --]

Hi Nicolas,

On Mon Jun 30, 2025 at 5:36 PM CEST, Nicolas Frattaroli wrote:
> The ROCK 4D's actual DC input is 5V, and the schematic names it as being
> 5V as well.
>
> Rename the regulator, and change the voltage it claims to be at.

Shouldn't it have a fixes tag then? Providing 12V where 5V is expected
sounds problematic ;-)

> Furthermore, fix vcc_1v1_nldo_s3's vin-supply as coming from
> vcc_5v0_sys, and not the DCIN, as per the schematic. This makes no
> functional change; both regulators are always on, and one feeds into the
> other.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> index 6756403111e704cad42f6674d5ab55eb0306f1e3..352e3df165688219bfedc19734d9eb32c547ec44 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> @@ -57,13 +57,13 @@ user-led {
>  		};
>  	};
>  
> -	vcc_12v0_dcin: regulator-vcc-12v0-dcin {
> +	vcc_5v0_dcin: regulator-vcc-5v0-dcin {
>  		compatible = "regulator-fixed";
>  		regulator-always-on;
>  		regulator-boot-on;
> -		regulator-min-microvolt = <12000000>;
> -		regulator-max-microvolt = <12000000>;
> -		regulator-name = "vcc_12v0_dcin";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		regulator-name = "vcc_5v0_dcin";
>  	};

With the name change, this block needs to be moved down.

Cheers,
  Diederik
>  
>  	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
> @@ -166,7 +166,7 @@ vcc_5v0_device: regulator-vcc-5v0-device {
>  		regulator-min-microvolt = <5000000>;
>  		regulator-max-microvolt = <5000000>;
>  		regulator-name = "vcc_5v0_device";
> -		vin-supply = <&vcc_12v0_dcin>;
> +		vin-supply = <&vcc_5v0_sys>;
>  	};
>  
>  	vcc_5v0_host: regulator-vcc-5v0-host {
> @@ -190,7 +190,7 @@ vcc_5v0_sys: regulator-vcc-5v0-sys {
>  		regulator-min-microvolt = <5000000>;
>  		regulator-max-microvolt = <5000000>;
>  		regulator-name = "vcc_5v0_sys";
> -		vin-supply = <&vcc_12v0_dcin>;
> +		vin-supply = <&vcc_5v0_dcin>;
>  	};
>  };
>  


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

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
  2025-06-30 18:12   ` Diederik de Haas
@ 2025-06-30 23:10     ` Sebastian Reichel
  2025-07-01  8:19       ` Diederik de Haas
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2025-06-30 23:10 UTC (permalink / raw)
  To: Diederik de Haas
  Cc: Rob Herring, Conor Dooley, Heiko Stuebner, devicetree,
	linux-kernel, linux-rockchip, Krzysztof Kozlowski, kernel,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 3147 bytes --]

Hi,

On Mon, Jun 30, 2025 at 08:12:27PM +0200, Diederik de Haas wrote:
> Hi Nicolas,
> 
> On Mon Jun 30, 2025 at 5:36 PM CEST, Nicolas Frattaroli wrote:
> > The ROCK 4D's actual DC input is 5V, and the schematic names it as being
> > 5V as well.
> >
> > Rename the regulator, and change the voltage it claims to be at.
> 
> Shouldn't it have a fixes tag then? Providing 12V where 5V is expected
> sounds problematic ;-)

This is basically "just" documentation, as the DT just describes
a fixed regulator (i.e. nothing software controllable). This just
changes a number in sysfs :)

Note, that the 5V DCIN is a USB-C port, which does not do any PD
negotiation, but has the 5K1 resistors on the CC lines to "request"
5V. If for whatever reason a higher voltage is applied (which does
not happen as long as the power is provided by anything remotely
following the USB specifications) there also is an over-voltage
protection chip. So it's not problematic :)

OTOH adding a Fixes tag does not hurt ;)

-- Sebastian

> > Furthermore, fix vcc_1v1_nldo_s3's vin-supply as coming from
> > vcc_5v0_sys, and not the DCIN, as per the schematic. This makes no
> > functional change; both regulators are always on, and one feeds into the
> > other.
> >
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> > ---
> >  arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> > index 6756403111e704cad42f6674d5ab55eb0306f1e3..352e3df165688219bfedc19734d9eb32c547ec44 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
> > @@ -57,13 +57,13 @@ user-led {
> >  		};
> >  	};
> >  
> > -	vcc_12v0_dcin: regulator-vcc-12v0-dcin {
> > +	vcc_5v0_dcin: regulator-vcc-5v0-dcin {
> >  		compatible = "regulator-fixed";
> >  		regulator-always-on;
> >  		regulator-boot-on;
> > -		regulator-min-microvolt = <12000000>;
> > -		regulator-max-microvolt = <12000000>;
> > -		regulator-name = "vcc_12v0_dcin";
> > +		regulator-min-microvolt = <5000000>;
> > +		regulator-max-microvolt = <5000000>;
> > +		regulator-name = "vcc_5v0_dcin";
> >  	};
> 
> With the name change, this block needs to be moved down.
> 
> Cheers,
>   Diederik
> >  
> >  	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
> > @@ -166,7 +166,7 @@ vcc_5v0_device: regulator-vcc-5v0-device {
> >  		regulator-min-microvolt = <5000000>;
> >  		regulator-max-microvolt = <5000000>;
> >  		regulator-name = "vcc_5v0_device";
> > -		vin-supply = <&vcc_12v0_dcin>;
> > +		vin-supply = <&vcc_5v0_sys>;
> >  	};
> >  
> >  	vcc_5v0_host: regulator-vcc-5v0-host {
> > @@ -190,7 +190,7 @@ vcc_5v0_sys: regulator-vcc-5v0-sys {
> >  		regulator-min-microvolt = <5000000>;
> >  		regulator-max-microvolt = <5000000>;
> >  		regulator-name = "vcc_5v0_sys";
> > -		vin-supply = <&vcc_12v0_dcin>;
> > +		vin-supply = <&vcc_5v0_dcin>;
> >  	};
> >  };
> >  
> 



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

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
  2025-06-30 23:10     ` Sebastian Reichel
@ 2025-07-01  8:19       ` Diederik de Haas
  2025-07-01  8:55         ` Nicolas Frattaroli
  0 siblings, 1 reply; 10+ messages in thread
From: Diederik de Haas @ 2025-07-01  8:19 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Rob Herring, Conor Dooley, Heiko Stuebner, devicetree,
	linux-kernel, linux-rockchip, Krzysztof Kozlowski, kernel,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]

Hi,

On Tue Jul 1, 2025 at 1:10 AM CEST, Sebastian Reichel wrote:
> On Mon, Jun 30, 2025 at 08:12:27PM +0200, Diederik de Haas wrote:
>> On Mon Jun 30, 2025 at 5:36 PM CEST, Nicolas Frattaroli wrote:
>> > The ROCK 4D's actual DC input is 5V, and the schematic names it as being
>> > 5V as well.
>> >
>> > Rename the regulator, and change the voltage it claims to be at.
>> 
>> Shouldn't it have a fixes tag then? Providing 12V where 5V is expected
>> sounds problematic ;-)
>
> This is basically "just" documentation, as the DT just describes
> a fixed regulator (i.e. nothing software controllable). This just
> changes a number in sysfs :)
>
> Note, that the 5V DCIN is a USB-C port, which does not do any PD
> negotiation, but has the 5K1 resistors on the CC lines to "request"
> 5V. If for whatever reason a higher voltage is applied (which does
> not happen as long as the power is provided by anything remotely
> following the USB specifications) there also is an over-voltage
> protection chip. So it's not problematic :)

I was worried about and wondered why I/we did NOT receive reports about
boards being fried. Good to know, thanks!

> OTOH adding a Fixes tag does not hurt ;)

Cheers,
  Diederik

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

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
  2025-07-01  8:19       ` Diederik de Haas
@ 2025-07-01  8:55         ` Nicolas Frattaroli
  2025-07-01  9:07           ` Diederik de Haas
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Frattaroli @ 2025-07-01  8:55 UTC (permalink / raw)
  To: Sebastian Reichel, Diederik de Haas
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel

Hello,

On Tuesday, 1 July 2025 10:19:33 Central European Summer Time Diederik de Haas wrote:
> Hi,
> 
> On Tue Jul 1, 2025 at 1:10 AM CEST, Sebastian Reichel wrote:
> > On Mon, Jun 30, 2025 at 08:12:27PM +0200, Diederik de Haas wrote:
> >> On Mon Jun 30, 2025 at 5:36 PM CEST, Nicolas Frattaroli wrote:
> >> > The ROCK 4D's actual DC input is 5V, and the schematic names it as being
> >> > 5V as well.
> >> >
> >> > Rename the regulator, and change the voltage it claims to be at.
> >> 
> >> Shouldn't it have a fixes tag then? Providing 12V where 5V is expected
> >> sounds problematic ;-)
> >
> > This is basically "just" documentation, as the DT just describes
> > a fixed regulator (i.e. nothing software controllable). This just
> > changes a number in sysfs :)
> >
> > Note, that the 5V DCIN is a USB-C port, which does not do any PD
> > negotiation, but has the 5K1 resistors on the CC lines to "request"
> > 5V. If for whatever reason a higher voltage is applied (which does
> > not happen as long as the power is provided by anything remotely
> > following the USB specifications) there also is an over-voltage
> > protection chip. So it's not problematic :)
> 
> I was worried about and wondered why I/we did NOT receive reports about
> boards being fried. Good to know, thanks!
> 
> > OTOH adding a Fixes tag does not hurt ;)
> 
> Cheers,
>   Diederik
> 

to add to what Sebastian already said: I purposefully didn't include the
Fixes: tag because there is no functional change here. I don't think
cosmetic fixes are worth pulling into stable kernels unless they're a
dependency of a follow-up functional fix patch, which isn't the case
right now. If such a functional fix patch does emerge, it can explicitly
declare its dependence on this patch, or even have our robot overlords
figure it out itself.

In that sense, I do think a Fixes tag hurts, because it needlessly
adds to the patch queue of the stable kernel people, and it's worth
pointing out that while I claim this patch has no functional change,
that's always predicated on the understanding that it does not
unintentionally break anything. In this case the chance is essentially
zero though, but I won't bother re-rolling this for that tag alone.

Regards,
Nicolas Frattaroli



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
  2025-07-01  8:55         ` Nicolas Frattaroli
@ 2025-07-01  9:07           ` Diederik de Haas
  0 siblings, 0 replies; 10+ messages in thread
From: Diederik de Haas @ 2025-07-01  9:07 UTC (permalink / raw)
  To: Nicolas Frattaroli, Sebastian Reichel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	devicetree, linux-kernel, linux-rockchip, kernel,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2547 bytes --]

On Tue Jul 1, 2025 at 10:55 AM CEST, Nicolas Frattaroli wrote:
> On Tuesday, 1 July 2025 10:19:33 Central European Summer Time Diederik de Haas wrote:
>> On Tue Jul 1, 2025 at 1:10 AM CEST, Sebastian Reichel wrote:
>> > On Mon, Jun 30, 2025 at 08:12:27PM +0200, Diederik de Haas wrote:
>> >> On Mon Jun 30, 2025 at 5:36 PM CEST, Nicolas Frattaroli wrote:
>> >> > The ROCK 4D's actual DC input is 5V, and the schematic names it as being
>> >> > 5V as well.
>> >> >
>> >> > Rename the regulator, and change the voltage it claims to be at.
>> >> 
>> >> Shouldn't it have a fixes tag then? Providing 12V where 5V is expected
>> >> sounds problematic ;-)
>> >
>> > This is basically "just" documentation, as the DT just describes
>> > a fixed regulator (i.e. nothing software controllable). This just
>> > changes a number in sysfs :)
>> >
>> > Note, that the 5V DCIN is a USB-C port, which does not do any PD
>> > negotiation, but has the 5K1 resistors on the CC lines to "request"
>> > 5V. If for whatever reason a higher voltage is applied (which does
>> > not happen as long as the power is provided by anything remotely
>> > following the USB specifications) there also is an over-voltage
>> > protection chip. So it's not problematic :)
>> 
>> I was worried about and wondered why I/we did NOT receive reports about
>> boards being fried. Good to know, thanks!
>> 
>> > OTOH adding a Fixes tag does not hurt ;)
>
> to add to what Sebastian already said: I purposefully didn't include the
> Fixes: tag because there is no functional change here. I don't think
> cosmetic fixes are worth pulling into stable kernels unless they're a

Then I agree with you. I didn't realize it was not a functional change.
I guess I didn't (fully) understand the "just documentation" remark.

Cheers,
  Diederik

> dependency of a follow-up functional fix patch, which isn't the case
> right now. If such a functional fix patch does emerge, it can explicitly
> declare its dependence on this patch, or even have our robot overlords
> figure it out itself.
>
> In that sense, I do think a Fixes tag hurts, because it needlessly
> adds to the patch queue of the stable kernel people, and it's worth
> pointing out that while I claim this patch has no functional change,
> that's always predicated on the understanding that it does not
> unintentionally break anything. In this case the chance is essentially
> zero though, but I won't bother re-rolling this for that tag alone.
>
> Regards,
> Nicolas Frattaroli


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

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill
  2025-06-30 15:36 [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Nicolas Frattaroli
                   ` (2 preceding siblings ...)
  2025-06-30 15:36 ` [PATCH 3/3] arm64: dts: rockchip: theoretically enable Wi-Fi " Nicolas Frattaroli
@ 2025-07-10  9:27 ` Heiko Stuebner
  3 siblings, 0 replies; 10+ messages in thread
From: Heiko Stuebner @ 2025-07-10  9:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Nicolas Frattaroli
  Cc: Heiko Stuebner, kernel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel


On Mon, 30 Jun 2025 17:36:32 +0200, Nicolas Frattaroli wrote:
> Turns out the ROCK 4D DT in mainline right now is neither accurate nor
> complete.
> 
> These changes should quell the fires a little, since at least we now get
> two additional working USB ports, plus the Wi-Fi chip shows up (even if
> it doesn't have a driver right now).
> 
> [...]

Applied, thanks!

[1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
      commit: fc276de7b63efc92f301d5b78d5000c1715c4313
[2/3] arm64: dts: rockchip: complete USB nodes on ROCK 4D
      commit: 37e557333b66f036a5638035765219531327025c
[3/3] arm64: dts: rockchip: theoretically enable Wi-Fi on ROCK 4D
      commit: 0e72c9aba2029f66dd92ad5f2cb68c44e1d910de

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

end of thread, other threads:[~2025-07-10 13:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 15:36 [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Nicolas Frattaroli
2025-06-30 15:36 ` [PATCH 1/3] arm64: dts: rockchip: adjust dcin regulator on ROCK 4D Nicolas Frattaroli
2025-06-30 18:12   ` Diederik de Haas
2025-06-30 23:10     ` Sebastian Reichel
2025-07-01  8:19       ` Diederik de Haas
2025-07-01  8:55         ` Nicolas Frattaroli
2025-07-01  9:07           ` Diederik de Haas
2025-06-30 15:36 ` [PATCH 2/3] arm64: dts: rockchip: complete USB nodes " Nicolas Frattaroli
2025-06-30 15:36 ` [PATCH 3/3] arm64: dts: rockchip: theoretically enable Wi-Fi " Nicolas Frattaroli
2025-07-10  9:27 ` [PATCH 0/3] ROCK 4D DT additions: regulators, usb, rfkill Heiko Stuebner

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