* [PATCH v2 0/3] arm64: dts: rockchip: Orange Pi 5/5B ethernet, SPI NOR supply and USB-C DP
@ 2026-11-11 7:19 Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 1/3] arm64: dts: rockchip: use rgmii-id for the Orange Pi 5/5B ethernet PHY Arun Iyengar via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-11 7:19 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Arun Iyengar
Three device tree changes for the Orange Pi 5 and 5B:
1. The YT8531C PHY on gmac1 is described as "rgmii-rxid" with a MAC TX
delay copied from the vendor kernel; the PCB adds no delay, so the
correct description is "rgmii-id" (as the Orange Pi CM5 already
uses), with both delays in the PHY.
2. The SPI NOR flash gets its real 1.8 V supply instead of a dummy
regulator.
3. The USB-C port gets DP Alt Mode: the FUSB302 connector advertises
the DisplayPort alternate mode and the graph links the connector,
the USBDP PHY and the DP0 controller. It uses only bindings already
in mainline.
Tested on an Orange Pi 5 (RK3588S, PCB v1.2): with "rgmii-id" the link
comes up at 1000/Full and receives at 940 Mbit/s with no errors (with
"net: stmmac: dwmac-rk: only read the delays the MAC applies", sent
separately, the "Can not read property" warnings are gone too); the
regulator summary lists the flash supply under vcc_1v8_s3 and the dummy
regulator message is gone. With patch 3, a USB-C dock (DP-to-HDMI
converter, USB3 hub) enters DP Alt Mode in pin assignment D (2 lanes
HBR2) and its monitor runs at 3840x2160@30 next to HDMI at 4K60, pin
assignment D -> C -> D switches work, 100 of 100 attach cycles
configured DP Alt Mode, and the dock's USB3 devices keep working. The
driver stack used for that test carried the pending "USBDP PHY cleanup
part 3" and dw-dp HPD/Alt Mode patches; the description itself does
not depend on them. CHECK_DTBS is clean for both boards. The Orange
Pi 5B was not tested (no board at hand); it shares the changed .dtsi.
This series was developed with Claude (Anthropic) as a coding assistant:
it wrote the code and the commit messages, and I reviewed and tested
every change as described above.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
Changes in v2:
- Patch 2: put vcc-supply on the existing flash@0 node in
rk3588s-orangepi-5.dtsi instead of splitting the node across the .dtsi
and the Orange Pi 5 .dts (found by the Sashiko AI review). The Orange
Pi 5 DTB is unchanged from v1; on the 5B and 5 Pro the controller stays
disabled.
- Patches 1 and 3 are unchanged.
- Link to v1: https://patch.msgid.link/20261110-opi5-dts-v1-0-582b63d074be@gmail.com
---
Arun Iyengar (3):
arm64: dts: rockchip: use rgmii-id for the Orange Pi 5/5B ethernet PHY
arm64: dts: rockchip: add the SPI NOR flash supply on Orange Pi 5
arm64: dts: rockchip: Add USB-C DP AltMode for Orange Pi 5/5B
.../boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi | 92 +++++++++++++++++++---
.../boot/dts/rockchip/rk3588s-orangepi-5.dtsi | 1 +
2 files changed, 80 insertions(+), 13 deletions(-)
---
base-commit: c3baae5f1a15645cddadcb2b9abddef5df291f59
change-id: 20261110-opi5-dts-4b83491c6706
Best regards,
--
Arun Iyengar <aiyengar1990@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 1/3] arm64: dts: rockchip: use rgmii-id for the Orange Pi 5/5B ethernet PHY
2026-11-11 7:19 [PATCH v2 0/3] arm64: dts: rockchip: Orange Pi 5/5B ethernet, SPI NOR supply and USB-C DP Arun Iyengar via B4 Relay
@ 2026-11-11 7:19 ` Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 2/3] arm64: dts: rockchip: add the SPI NOR flash supply on Orange Pi 5 Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 3/3] arm64: dts: rockchip: Add USB-C DP AltMode for Orange Pi 5/5B Arun Iyengar via B4 Relay
2 siblings, 0 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-11 7:19 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
The Orange Pi 5 and 5B have a Motorcomm YT8531C RGMII PHY on gmac1
(the PHY driver binds as "YT8531 Gigabit Ethernet"). The board neither
uses extra long clock traces for TX nor for RX, yet the device tree
describes it as "rgmii-rxid", which according to ethernet-controller.yaml
means that the PCB provides the TX delay, and then makes the MAC insert
the TX delay with tx_delay = <0x42>. The setting was copied from the
vendor kernel, which uses the MAC delay lines everywhere.
Describe the PCB correctly as "rgmii-id" and drop tx_delay, so that the
MAC adds no delay and the PHY adds both: motorcomm.c programs its
default 1950 ps for RX (as now) and for TX. This is the setup the
binding recommends, and the one the same vendor's Orange Pi CM5
(rk3588s-orangepi-cm5-base.dts), with a YT8531C on gmac1 of the same
SoC, already uses in mainline.
Besides being the correct description, this removes the MAC from the
timing path for both directions, so no board-specific delay-line value
is needed any more.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
index c153e7248727..7c1fd5905553 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
@@ -97,14 +97,13 @@ vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 {
&gmac1 {
clock_in_out = "output";
phy-handle = <&rgmii_phy1>;
- phy-mode = "rgmii-rxid";
+ phy-mode = "rgmii-id";
pinctrl-0 = <&gmac1_miim
&gmac1_tx_bus2
&gmac1_rx_bus2
&gmac1_rgmii_clk
&gmac1_rgmii_bus>;
pinctrl-names = "default";
- tx_delay = <0x42>;
status = "okay";
};
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 2/3] arm64: dts: rockchip: add the SPI NOR flash supply on Orange Pi 5
2026-11-11 7:19 [PATCH v2 0/3] arm64: dts: rockchip: Orange Pi 5/5B ethernet, SPI NOR supply and USB-C DP Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 1/3] arm64: dts: rockchip: use rgmii-id for the Orange Pi 5/5B ethernet PHY Arun Iyengar via B4 Relay
@ 2026-11-11 7:19 ` Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 3/3] arm64: dts: rockchip: Add USB-C DP AltMode for Orange Pi 5/5B Arun Iyengar via B4 Relay
2 siblings, 0 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-11 7:19 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
The SPI NOR flash on the Orange Pi 5 has no vcc-supply, so spi-nor
falls back to a dummy regulator:
spi-nor spi5.0: supply vcc not found, using dummy regulator
The flash reports JEDEC ID 20 41 18, an XMC XM25QU128C, which is a
1.8 V part, and it is wired to FSPI M0, whose pins (GPIO2_A0,
GPIO2_D0-D6) are in the 1.8 V eMMC I/O domain. That domain and the
serial flash are fed from VCC_1V8_S3 (RK806 BUCK10), as in Rockchip's
RK3588 reference design; it is also the rail other RK3588 boards with a
1.8 V flash use (e.g. NanoPC-T6).
Describe the supply on the flash node in rk3588s-orangepi-5.dtsi, where
the node and the regulator are defined. The rail is always-on, so
nothing changes functionally; the flash just gets its real supply
instead of a dummy one. Only the Orange Pi 5 enables the flash: on the
5B and 5 Pro the FSPI M0 pins are used by the eMMC and the controller
stays disabled.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
index 2db6ee95e504..c7d892e4f961 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
@@ -302,6 +302,7 @@ flash@0 {
spi-max-frequency = <100000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <1>;
+ vcc-supply = <&vcc_1v8_s3>;
};
};
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 3/3] arm64: dts: rockchip: Add USB-C DP AltMode for Orange Pi 5/5B
2026-11-11 7:19 [PATCH v2 0/3] arm64: dts: rockchip: Orange Pi 5/5B ethernet, SPI NOR supply and USB-C DP Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 1/3] arm64: dts: rockchip: use rgmii-id for the Orange Pi 5/5B ethernet PHY Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 2/3] arm64: dts: rockchip: add the SPI NOR flash supply on Orange Pi 5 Arun Iyengar via B4 Relay
@ 2026-11-11 7:19 ` Arun Iyengar via B4 Relay
2 siblings, 0 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-11 7:19 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
The USB-C port of the Orange Pi 5 and 5B is connected to the RK3588S
USBDP PHY0, which can mux two (pin assignment D) or all four (pin
assignment C/E) of its SuperSpeed lanes to the DisplayPort controller
DP0. The SBU lines are wired to the PHY's DP AUX channel through the
sbu1/sbu2 DC control GPIOs that are already described.
Enable DP0, route it from VOP2 video port 2 and describe the full
USB-C graph using the USBDP PHY ports scheme:
port@0: SuperSpeed lanes to the USB-C connector
port@1: from the DWC3 controller (SuperSpeed)
port@2: from the DP controller
port@3: DP AUX to the connector's SBU port
and advertise DisplayPort AltMode (DFP_D, HBR3, receptacle, pin
assignments C/D/E) on the connector, so TCPM enters DP AltMode with
DP capable sinks/adapters.
VP2 is used as on the ROCK 5B family, leaving VP0 for HDMI0 and VP1
free.
Modelled on Sebastian Reichel's ROCK 5B family DP Alt Mode support in
the Collabora rockchip-3588 tree.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
.../boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi | 89 +++++++++++++++++++---
1 file changed, 78 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
index 7c1fd5905553..52f5005c738d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
@@ -94,6 +94,22 @@ vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 {
};
};
+&dp0 {
+ status = "okay";
+};
+
+&dp0_in {
+ dp0_in_vp2: endpoint {
+ remote-endpoint = <&vp2_out_dp0>;
+ };
+};
+
+&dp0_out {
+ dp0_out_con: endpoint {
+ remote-endpoint = <&usbdp_phy0_dp_in>;
+ };
+};
+
&gmac1 {
clock_in_out = "output";
phy-handle = <&rgmii_phy1>;
@@ -143,6 +159,13 @@ usb_con: connector {
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
try-power-role = "source";
+ altmodes {
+ displayport {
+ svid = /bits/ 16 <0xff01>;
+ vdo = <0x00001c46>;
+ };
+ };
+
ports {
#address-cells = <1>;
#size-cells = <0>;
@@ -150,21 +173,21 @@ ports {
port@0 {
reg = <0>;
usbc0_hs: endpoint {
- remote-endpoint = <&usb_host0_xhci_drd_sw>;
+ remote-endpoint = <&usb_host0_xhci_hs>;
};
};
port@1 {
reg = <1>;
usbc0_ss: endpoint {
- remote-endpoint = <&usbdp_phy0_typec_ss>;
+ remote-endpoint = <&usbdp_phy0_ss_out>;
};
};
port@2 {
reg = <2>;
usbc0_sbu: endpoint {
- remote-endpoint = <&usbdp_phy0_typec_sbu>;
+ remote-endpoint = <&usbdp_phy0_dp_out>;
};
};
};
@@ -250,9 +273,24 @@ &usb_host0_xhci {
dr_mode = "otg";
usb-role-switch;
- port {
- usb_host0_xhci_drd_sw: endpoint {
- remote-endpoint = <&usbc0_hs>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_host0_xhci_hs: endpoint {
+ remote-endpoint = <&usbc0_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_host0_xhci_ss: endpoint {
+ remote-endpoint = <&usbdp_phy0_ss_in>;
+ };
};
};
};
@@ -267,18 +305,47 @@ &usbdp_phy0 {
sbu1-dc-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
- port {
+ ports {
#address-cells = <1>;
#size-cells = <0>;
- usbdp_phy0_typec_ss: endpoint@0 {
+ port@0 {
reg = <0>;
- remote-endpoint = <&usbc0_ss>;
+
+ usbdp_phy0_ss_out: endpoint {
+ remote-endpoint = <&usbc0_ss>;
+ };
};
- usbdp_phy0_typec_sbu: endpoint@1 {
+ port@1 {
reg = <1>;
- remote-endpoint = <&usbc0_sbu>;
+
+ usbdp_phy0_ss_in: endpoint {
+ remote-endpoint = <&usb_host0_xhci_ss>;
+ };
};
+
+ port@2 {
+ reg = <2>;
+
+ usbdp_phy0_dp_in: endpoint {
+ remote-endpoint = <&dp0_out_con>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ usbdp_phy0_dp_out: endpoint {
+ remote-endpoint = <&usbc0_sbu>;
+ };
+ };
+ };
+};
+
+&vp2 {
+ vp2_out_dp0: endpoint@a {
+ reg = <ROCKCHIP_VOP2_EP_DP0>;
+ remote-endpoint = <&dp0_in_vp2>;
};
};
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-11 7:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 7:19 [PATCH v2 0/3] arm64: dts: rockchip: Orange Pi 5/5B ethernet, SPI NOR supply and USB-C DP Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 1/3] arm64: dts: rockchip: use rgmii-id for the Orange Pi 5/5B ethernet PHY Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 2/3] arm64: dts: rockchip: add the SPI NOR flash supply on Orange Pi 5 Arun Iyengar via B4 Relay
2026-11-11 7:19 ` [PATCH v2 3/3] arm64: dts: rockchip: Add USB-C DP AltMode for Orange Pi 5/5B Arun Iyengar via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®