linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
@ 2025-02-20  4:10 Jimmy Hon
  2025-02-20  4:10 ` [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong " Jimmy Hon
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Jimmy Hon @ 2025-02-20  4:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-arm-kernel, linux-rockchip, Jimmy Hon

Add device-tree for Orange Pi 5 Ultra

This patchset is looking for testers. I do not have the hardware to test.

The schematic has been published for the Orange 5 Ultra. [1]

It's a sibling of the Orange Pi 5 Max [2] with the HDMI0 switched out 
for the HDMI RX. As a side affect the pin for USB_OTG_PWREN [3][4] has 
changed.

Patch 1 and 2 can be used on 6.14-rc1
Patch 3 can be used with 6.15-rc1
Patch 4 is waiting for HDMI audio patchset [5]

My testing branch with dependent patchsets is on github [6].

[1] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-Ultra.html
[2] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-Max.html
[3] https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts#L306
[4] https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts#L321
[5] https://lore.kernel.org/linux-rockchip/20250217215641.372723-1-detlev.casanova@collabora.com/
[6] https://github.com/jimmyhon/linux/tree/integrate-6.15

Changes in v5:
- add USB 3.0
- add HDMI1
- add HDMI audio
Link to v4: https://lore.kernel.org/linux-rockchip/20241229184256.1870-10-honyuenkwun@gmail.com/

Jimmy Hon (4):
  dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Ultra
  arm64: dts: rockchip: Add Orange Pi 5 Ultra board
  arm64: dts: rockchip: Enable HDMI1 on Orange Pi 5 Ultra
  arm64: dts: rockchip: Enable HDMI1 audio output for Orange Pi 5 Ultra

 .../devicetree/bindings/arm/rockchip.yaml     |  3 +-
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../dts/rockchip/rk3588-orangepi-5-ultra.dts  | 75 +++++++++++++++++++
 3 files changed, 78 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts

base-commit: fa15cc73121279f93757ec76312b0d0b73f7462a
prerequisite-patch-id: e7cb3b62d173506d38a10a8e71eedd62ba6a1bc0
-- 
2.48.1



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

* [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Ultra
  2025-02-20  4:10 [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra Jimmy Hon
@ 2025-02-20  4:10 ` Jimmy Hon
  2025-02-21 22:28   ` Rob Herring (Arm)
  2025-02-20  4:10 ` [PATCH UNTESTED v5 2/4] arm64: dts: rockchip: Add Orange Pi 5 Ultra board Jimmy Hon
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Jimmy Hon @ 2025-02-20  4:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-arm-kernel, linux-rockchip, Jimmy Hon

Add devicetree binding for the Xunlong Orange Pi 5 Ultra board.

The Orange Pi 5 Ultra is a single board computer powered by the Rockchip
RK3588 with similar board layout as the 5 Max but with the HDMI0 swapped
for HDMI IN.

Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 522a6f0450ea..48b27f28a3d7 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -1136,11 +1136,12 @@ properties:
           - const: xunlong,orangepi-3b
           - const: rockchip,rk3566
 
-      - description: Xunlong Orange Pi 5 Max/Plus
+      - description: Xunlong Orange Pi 5 Max/Plus/Ultra
         items:
           - enum:
               - xunlong,orangepi-5-max
               - xunlong,orangepi-5-plus
+              - xunlong,orangepi-5-ultra
           - const: rockchip,rk3588
 
       - description: Xunlong Orange Pi R1 Plus / LTS
-- 
2.48.1



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

* [PATCH UNTESTED v5 2/4] arm64: dts: rockchip: Add Orange Pi 5 Ultra board
  2025-02-20  4:10 [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra Jimmy Hon
  2025-02-20  4:10 ` [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong " Jimmy Hon
@ 2025-02-20  4:10 ` Jimmy Hon
  2025-02-20  4:10 ` [PATCH UNTESTED v5 3/4] arm64: dts: rockchip: Enable HDMI1 on Orange Pi 5 Ultra Jimmy Hon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Jimmy Hon @ 2025-02-20  4:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-arm-kernel, linux-rockchip, Jimmy Hon

The RK3588 Single Board Computer includes
- eMMC
- microSD
- UART
- 2 PWM LEDs
- RTC
- RTL8125 network controller on PCIe 2.0x1.
- M.2 M-key connector routed to PCIe 3.0x4
- PWM controlled heat sink fan.
- 2 USB2 ports
- lower USB3 port
- upper USB3 port with OTG capability
- Mali GPU
- SPI NOR flash
- Mask Rom button
- Analog audio using es8388 codec via the headset jack and onboard mic
- HDMI1
- HDMI IN

the vcc5v0_usb30 regulator shares the same enable gpio pin as the
vcc5v0_usb20 regulator.

The Orange Pi 5 Ultra is a single board computer powered by the Rockchip
RK3588 with similar board layout as the 5 Max but with the HDMI0 swapped
for HDMI IN.

Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../dts/rockchip/rk3588-orangepi-5-ultra.dts  | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index def1222c1907..d0deffb8a1f9 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -150,6 +150,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6-lts.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ok3588-c.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-max.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-plus.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-ultra.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-quartzpro64.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5-itx.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
new file mode 100644
index 000000000000..93561b7a0938
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3588-orangepi-5-compact.dtsi"
+
+/ {
+	model = "Xunlong Orange Pi 5 Ultra";
+	compatible = "xunlong,orangepi-5-ultra", "rockchip,rk3588";
+};
+
+&pinctrl {
+
+	usb {
+		usb_otg_pwren: usb-otg-pwren {
+			rockchip,pins = <4 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&vcc5v0_usb30_otg {
+	gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
+};
-- 
2.48.1



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

* [PATCH UNTESTED v5 3/4] arm64: dts: rockchip: Enable HDMI1 on Orange Pi 5 Ultra
  2025-02-20  4:10 [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra Jimmy Hon
  2025-02-20  4:10 ` [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong " Jimmy Hon
  2025-02-20  4:10 ` [PATCH UNTESTED v5 2/4] arm64: dts: rockchip: Add Orange Pi 5 Ultra board Jimmy Hon
@ 2025-02-20  4:10 ` Jimmy Hon
  2025-02-20  4:10 ` [PATCH UNTESTED v5 4/4] arm64: dts: rockchip: Enable HDMI1 audio output for " Jimmy Hon
  2025-02-21 23:13 ` [PATCH UNTESTED v5 0/4] " Johannes Erdfelt
  4 siblings, 0 replies; 13+ messages in thread
From: Jimmy Hon @ 2025-02-20  4:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-arm-kernel, linux-rockchip, Jimmy Hon

Enable the only HDMI output port on the Orange Pi 5 Ultra

Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
 .../dts/rockchip/rk3588-orangepi-5-ultra.dts  | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
index 93561b7a0938..5f673ad51686 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
@@ -4,11 +4,46 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
 #include "rk3588-orangepi-5-compact.dtsi"
 
 / {
 	model = "Xunlong Orange Pi 5 Ultra";
 	compatible = "xunlong,orangepi-5-ultra", "rockchip,rk3588";
+
+	hdmi1-con {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi1_con_in: endpoint {
+				remote-endpoint = <&hdmi1_out_con>;
+			};
+		};
+	};
+};
+
+&hdmi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd
+			     &hdmim1_tx1_scl &hdmim1_tx1_sda>;
+	status = "okay";
+};
+
+&hdmi1_in {
+	hdmi1_in_vp0: endpoint {
+		remote-endpoint = <&vp0_out_hdmi1>;
+	};
+};
+
+&hdmi1_out {
+	hdmi1_out_con: endpoint {
+		remote-endpoint = <&hdmi1_con_in>;
+	};
+};
+
+&hdptxphy1 {
+	status = "okay";
 };
 
 &pinctrl {
@@ -23,3 +58,10 @@ usb_otg_pwren: usb-otg-pwren {
 &vcc5v0_usb30_otg {
 	gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
 };
+
+&vp0 {
+	vp0_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
+		reg = <ROCKCHIP_VOP2_EP_HDMI1>;
+		remote-endpoint = <&hdmi1_in_vp0>;
+	};
+};
-- 
2.48.1



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

* [PATCH UNTESTED v5 4/4] arm64: dts: rockchip: Enable HDMI1 audio output for Orange Pi 5 Ultra
  2025-02-20  4:10 [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra Jimmy Hon
                   ` (2 preceding siblings ...)
  2025-02-20  4:10 ` [PATCH UNTESTED v5 3/4] arm64: dts: rockchip: Enable HDMI1 on Orange Pi 5 Ultra Jimmy Hon
@ 2025-02-20  4:10 ` Jimmy Hon
  2025-02-21 23:13 ` [PATCH UNTESTED v5 0/4] " Johannes Erdfelt
  4 siblings, 0 replies; 13+ messages in thread
From: Jimmy Hon @ 2025-02-20  4:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-arm-kernel, linux-rockchip, Jimmy Hon

HDMI audio is available on the Orange Pi 5 Ultra HDMI1 TX port.

Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
 arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
index 5f673ad51686..5c560a14719b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts
@@ -42,10 +42,18 @@ hdmi1_out_con: endpoint {
 	};
 };
 
+&hdmi1_sound {
+	status = "okay";
+};
+
 &hdptxphy1 {
 	status = "okay";
 };
 
+&i2s6_8ch {
+	status = "okay";
+};
+
 &pinctrl {
 
 	usb {
-- 
2.48.1



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

* Re: [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Ultra
  2025-02-20  4:10 ` [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong " Jimmy Hon
@ 2025-02-21 22:28   ` Rob Herring (Arm)
  0 siblings, 0 replies; 13+ messages in thread
From: Rob Herring (Arm) @ 2025-02-21 22:28 UTC (permalink / raw)
  To: Jimmy Hon
  Cc: Heiko Stuebner, Conor Dooley, Krzysztof Kozlowski,
	linux-arm-kernel, linux-rockchip, devicetree


On Wed, 19 Feb 2025 22:10:07 -0600, Jimmy Hon wrote:
> Add devicetree binding for the Xunlong Orange Pi 5 Ultra board.
> 
> The Orange Pi 5 Ultra is a single board computer powered by the Rockchip
> RK3588 with similar board layout as the 5 Max but with the HDMI0 swapped
> for HDMI IN.
> 
> Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
> ---
>  Documentation/devicetree/bindings/arm/rockchip.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>



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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-20  4:10 [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra Jimmy Hon
                   ` (3 preceding siblings ...)
  2025-02-20  4:10 ` [PATCH UNTESTED v5 4/4] arm64: dts: rockchip: Enable HDMI1 audio output for " Jimmy Hon
@ 2025-02-21 23:13 ` Johannes Erdfelt
  2025-02-22  1:23   ` Jimmy Hon
  4 siblings, 1 reply; 13+ messages in thread
From: Johannes Erdfelt @ 2025-02-21 23:13 UTC (permalink / raw)
  To: Jimmy Hon
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

On Wed, Feb 19, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> This patchset is looking for testers. I do not have the hardware to test.

I do have hardware and I gave your branch[1] a test.

The following things tested successfully for me:
- Kernel boots
- Ethernet
- SPI NOR
- Micro SD card
- eMMC
- Bottom M.2 M-key slot (using an NVME drive)
- USB 2.0 ports
- Blue LED (using heartbeat trigger at least)

I did not test:
- RTC
- UART
- HDMI1
- HDMI IN
- Analog audio
- Mali GPU
- Heat sink fan

However, neither of the USB 3.0 ports work. There are no XHCI messages
during boot. I confirmed my kernel config does build XHCI. I haven't
ruled out a mistake on my end yet.

Also, the green LED is constantly lit even when the trigger is set to
none and the brightness is set to 0. This made is a bit harder to
confirm that the blue LED was working. I haven't ruled out a mistake on
my end for this one yet either.

I'll also see if I can give HDMI a test.

JE

[1] https://github.com/jimmyhon/linux/tree/integrate-6.15



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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-21 23:13 ` [PATCH UNTESTED v5 0/4] " Johannes Erdfelt
@ 2025-02-22  1:23   ` Jimmy Hon
  2025-02-22  4:31     ` Johannes Erdfelt
  2025-02-22  4:36     ` Johannes Erdfelt
  0 siblings, 2 replies; 13+ messages in thread
From: Jimmy Hon @ 2025-02-22  1:23 UTC (permalink / raw)
  To: Johannes Erdfelt
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

On Fri, Feb 21, 2025 at 5:13 PM Johannes Erdfelt <johannes@erdfelt.com> wrote:
>
> On Wed, Feb 19, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> > This patchset is looking for testers. I do not have the hardware to test.
>
> I do have hardware and I gave your branch[1] a test.
Thanks for the test results

>
> The following things tested successfully for me:
> - Kernel boots
> - Ethernet
> - SPI NOR
> - Micro SD card
> - eMMC
> - Bottom M.2 M-key slot (using an NVME drive)
> - USB 2.0 ports
> - Blue LED (using heartbeat trigger at least)
>
> I did not test:
> - RTC
> - UART
> - HDMI1
> - HDMI IN
> - Analog audio
> - Mali GPU
> - Heat sink fan
>
> However, neither of the USB 3.0 ports work. There are no XHCI messages
> during boot. I confirmed my kernel config does build XHCI. I haven't
> ruled out a mistake on my end yet.
Does your kernel config have CONFIG_PHY_ROCKCHIP_USBDP?
Both USB 3 ports on the Max/Ultra ports are wired to the usbdp
controller and not combphy2_psu controller.
It'll be set if you're using the arm64 defconfig.

On my Orange Pi 5 Max, dmesg | grep xhci will show (e.g. io mem)
[    0.769699] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[    0.769919] xhci-hcd xhci-hcd.4.auto: new USB bus registered,
assigned bus number 1
[    0.770062] xhci-hcd xhci-hcd.4.auto: hcc params 0x0220fe64 hci
version 0x110 quirks 0x0000808002000010
[    0.770119] xhci-hcd xhci-hcd.4.auto: irq 89, io mem 0xfc000000
[    0.770351] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[    0.770585] xhci-hcd xhci-hcd.4.auto: new USB bus registered,
assigned bus number 2
[    0.770602] xhci-hcd xhci-hcd.4.auto: Host supports USB 3.0 SuperSpeed
[    0.770837] usb usb1: Manufacturer: Linux 6.14.0-rc1-2-rockchip-ARCH xhci-hcd
[    0.770844] usb usb1: SerialNumber: xhci-hcd.4.auto
[    0.772069] usb usb2: Manufacturer: Linux 6.14.0-rc1-2-rockchip-ARCH xhci-hcd
[    0.772076] usb usb2: SerialNumber: xhci-hcd.4.auto
[    0.792369] xhci-hcd xhci-hcd.5.auto: xHCI Host Controller
[    0.792640] xhci-hcd xhci-hcd.5.auto: new USB bus registered,
assigned bus number 3
[    0.792781] xhci-hcd xhci-hcd.5.auto: hcc params 0x0220fe64 hci
version 0x110 quirks 0x0000808002000010
[    0.792826] xhci-hcd xhci-hcd.5.auto: irq 90, io mem 0xfc400000
[    0.793058] xhci-hcd xhci-hcd.5.auto: xHCI Host Controller
[    0.793311] xhci-hcd xhci-hcd.5.auto: new USB bus registered,
assigned bus number 4
[    0.793327] xhci-hcd xhci-hcd.5.auto: Host supports USB 3.0 SuperSpeed
[    0.793530] usb usb3: Manufacturer: Linux 6.14.0-rc1-2-rockchip-ARCH xhci-hcd
[    0.793537] usb usb3: SerialNumber: xhci-hcd.5.auto
[    0.794703] usb usb4: Manufacturer: Linux 6.14.0-rc1-2-rockchip-ARCH xhci-hcd
[    0.794710] usb usb4: SerialNumber: xhci-hcd.5.auto

>
> Also, the green LED is constantly lit even when the trigger is set to
> none and the brightness is set to 0. This made is a bit harder to
> confirm that the blue LED was working. I haven't ruled out a mistake on
> my end for this one yet either.
Checking the schematic for the Max and the Ultra, they both use
PWM4_M0 and PWM5_M1 to control the blue and green LEDs.

Have you tried booting the vendor BSP 5.10 or 6.1 kernels? What's the
behavior on those kernels? It's using GPIO pins there, whereas we're
using PWM to be able to control brightness.

>
> I'll also see if I can give HDMI a test.
Please report your results when you do. This is one of the differences
from the Orange Pi 5 Max. The HDMI1 pinctrls does not use the default
pinctrls like other RK3588 boards (including the Orange Pi 5 Plus).

>
> JE
>
> [1] https://github.com/jimmyhon/linux/tree/integrate-6.15
>

Jimmy


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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-22  1:23   ` Jimmy Hon
@ 2025-02-22  4:31     ` Johannes Erdfelt
  2025-02-22  5:30       ` Jimmy Hon
  2025-02-22  4:36     ` Johannes Erdfelt
  1 sibling, 1 reply; 13+ messages in thread
From: Johannes Erdfelt @ 2025-02-22  4:31 UTC (permalink / raw)
  To: Jimmy Hon
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

On Fri, Feb 21, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> On Fri, Feb 21, 2025 at 5:13 PM Johannes Erdfelt <johannes@erdfelt.com> wrote:
> > However, neither of the USB 3.0 ports work. There are no XHCI messages
> > during boot. I confirmed my kernel config does build XHCI. I haven't
> > ruled out a mistake on my end yet.
> 
> Does your kernel config have CONFIG_PHY_ROCKCHIP_USBDP?
> Both USB 3 ports on the Max/Ultra ports are wired to the usbdp
> controller and not combphy2_psu controller.
> It'll be set if you're using the arm64 defconfig.

Yeah, we came to the same conclusion. I noticed this was disabled in my
config when I was looking for potential mistakes I may have made.

Enabling it fixes the USB 3.0 port problem.

> > Also, the green LED is constantly lit even when the trigger is set to
> > none and the brightness is set to 0. This made is a bit harder to
> > confirm that the blue LED was working. I haven't ruled out a mistake on
> > my end for this one yet either.
> 
> Checking the schematic for the Max and the Ultra, they both use
> PWM4_M0 and PWM5_M1 to control the blue and green LEDs.

Some brief testing makes it seem like the LEDs are inverted.

If I set the trigger for each LED to "default-on", then they turn off.
If both are set to "default-on", then only the red LED is lit.

Also, "heartbeat" appears to be inverted.

I tried a new DT with this patch and it appears to work correctly on the
Ultra I have. However, it raises the question why the Max behaves
differently from the Ultra.

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi
index 87090cb98020..ed51a4763318 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/pwm/pwm.h>
 #include "rk3588-orangepi-5.dtsi"
 
 / {
@@ -62,13 +63,13 @@ &hym8563 {
 
 &led_blue_pwm {
 	/* PWM_LED1 */
-	pwms = <&pwm4 0 25000 0>;
+	pwms = <&pwm4 0 25000 PWM_POLARITY_INVERTED>;
 	status = "okay";
 };
 
 &led_green_pwm {
 	/* PWM_LED2 */
-	pwms = <&pwm5 0 25000 0>;
+	pwms = <&pwm5 0 25000 PWM_POLARITY_INVERTED>;
 };
 
 /* phy2 */

JE



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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-22  1:23   ` Jimmy Hon
  2025-02-22  4:31     ` Johannes Erdfelt
@ 2025-02-22  4:36     ` Johannes Erdfelt
  2025-02-22  5:12       ` Jimmy Hon
  1 sibling, 1 reply; 13+ messages in thread
From: Johannes Erdfelt @ 2025-02-22  4:36 UTC (permalink / raw)
  To: Jimmy Hon
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

On Fri, Feb 21, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> On Fri, Feb 21, 2025 at 5:13 PM Johannes Erdfelt <johannes@erdfelt.com> wrote:
> > I'll also see if I can give HDMI a test.
>
> Please report your results when you do. This is one of the differences
> from the Orange Pi 5 Max. The HDMI1 pinctrls does not use the default
> pinctrls like other RK3588 boards (including the Orange Pi 5 Plus).

No luck yet. I do see this message in the kernel logs 8 times at boot:

[   41.552751] rockchip-drm display-subsystem: [drm] *ERROR* failed to
get pll_hdmiphy0

I'll confirm with the vendor image that my HDMI setup is correct.

JE



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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-22  4:36     ` Johannes Erdfelt
@ 2025-02-22  5:12       ` Jimmy Hon
  2025-02-22  6:05         ` Johannes Erdfelt
  0 siblings, 1 reply; 13+ messages in thread
From: Jimmy Hon @ 2025-02-22  5:12 UTC (permalink / raw)
  To: Johannes Erdfelt
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

On Fri, Feb 21, 2025 at 10:36 PM Johannes Erdfelt <johannes@erdfelt.com> wrote:
>
> On Fri, Feb 21, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> > On Fri, Feb 21, 2025 at 5:13 PM Johannes Erdfelt <johannes@erdfelt.com> wrote:
> > > I'll also see if I can give HDMI a test.
> >
> > Please report your results when you do. This is one of the differences
> > from the Orange Pi 5 Max. The HDMI1 pinctrls does not use the default
> > pinctrls like other RK3588 boards (including the Orange Pi 5 Plus).
>
> No luck yet. I do see this message in the kernel logs 8 times at boot:
>
> [   41.552751] rockchip-drm display-subsystem: [drm] *ERROR* failed to
> get pll_hdmiphy0
Oh, I believe you're hitting this.
https://lore.kernel.org/linux-rockchip/0dd48599-448f-4472-9a8a-54b7f0379c13@collabora.com/T/#ma4eb427de77b5a4806a2c2b5bef2fc8d4003f801

I included that patchset in the integrate-6.15 branch. I don't have
the problem on the Max because it has both the HDMI0 and HDMI1
enabled. However, with only HDMI1 on the Ultra, it's not handling the
disabled hdptxphy0. A quick hack is to also enable hdptxphy0 also in
the Ultra dts.

>
> I'll confirm with the vendor image that my HDMI setup is correct.
>
> JE
>
Jimmy


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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-22  4:31     ` Johannes Erdfelt
@ 2025-02-22  5:30       ` Jimmy Hon
  0 siblings, 0 replies; 13+ messages in thread
From: Jimmy Hon @ 2025-02-22  5:30 UTC (permalink / raw)
  To: Johannes Erdfelt
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

> > > Also, the green LED is constantly lit even when the trigger is set to
> > > none and the brightness is set to 0. This made is a bit harder to
> > > confirm that the blue LED was working. I haven't ruled out a mistake on
> > > my end for this one yet either.
> >
> > Checking the schematic for the Max and the Ultra, they both use
> > PWM4_M0 and PWM5_M1 to control the blue and green LEDs.
>
> Some brief testing makes it seem like the LEDs are inverted.
>
> If I set the trigger for each LED to "default-on", then they turn off.
> If both are set to "default-on", then only the red LED is lit.
>
> Also, "heartbeat" appears to be inverted.
>
> I tried a new DT with this patch and it appears to work correctly on the
> Ultra I have. However, it raises the question why the Max behaves
> differently from the Ultra.
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi
> index 87090cb98020..ed51a4763318 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-compact.dtsi
> @@ -4,6 +4,7 @@
>
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/pinctrl/rockchip.h>
> +#include <dt-bindings/pwm/pwm.h>
>  #include "rk3588-orangepi-5.dtsi"
>
>  / {
> @@ -62,13 +63,13 @@ &hym8563 {
>
>  &led_blue_pwm {
>         /* PWM_LED1 */
> -       pwms = <&pwm4 0 25000 0>;
> +       pwms = <&pwm4 0 25000 PWM_POLARITY_INVERTED>;
Oh, there is a difference in the vendor BSP. The Max has
GPIO_ACTIVE_HIGH while the Ultra uses GPIO_ACTIVE_LOW.
https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts#L401
https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-ultra.dts#L416

On the schematic, the 5 Plus and the 5 Max have 2SK3018s on the LED,
but the 5 Ultra does not have it.

I will separate them out in v2.

Thanks for debugging it.

>         status = "okay";
>  };
>
>  &led_green_pwm {
>         /* PWM_LED2 */
> -       pwms = <&pwm5 0 25000 0>;
> +       pwms = <&pwm5 0 25000 PWM_POLARITY_INVERTED>;
>  };
>
>  /* phy2 */
>
> JE
>

Jimmy


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

* Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra
  2025-02-22  5:12       ` Jimmy Hon
@ 2025-02-22  6:05         ` Johannes Erdfelt
  0 siblings, 0 replies; 13+ messages in thread
From: Johannes Erdfelt @ 2025-02-22  6:05 UTC (permalink / raw)
  To: Jimmy Hon
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-kernel, linux-rockchip

On Fri, Feb 21, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> > On Fri, Feb 21, 2025, Jimmy Hon <honyuenkwun@gmail.com> wrote:
> > > On Fri, Feb 21, 2025 at 5:13 PM Johannes Erdfelt <johannes@erdfelt.com> wrote:
> > > > I'll also see if I can give HDMI a test.
> > >
> > > Please report your results when you do. This is one of the differences
> > > from the Orange Pi 5 Max. The HDMI1 pinctrls does not use the default
> > > pinctrls like other RK3588 boards (including the Orange Pi 5 Plus).
> >
> > No luck yet. I do see this message in the kernel logs 8 times at boot:
> >
> > [   41.552751] rockchip-drm display-subsystem: [drm] *ERROR* failed to
> > get pll_hdmiphy0
> Oh, I believe you're hitting this.
> https://lore.kernel.org/linux-rockchip/0dd48599-448f-4472-9a8a-54b7f0379c13@collabora.com/T/#ma4eb427de77b5a4806a2c2b5bef2fc8d4003f801
> 
> I included that patchset in the integrate-6.15 branch. I don't have
> the problem on the Max because it has both the HDMI0 and HDMI1
> enabled. However, with only HDMI1 on the Ultra, it's not handling the
> disabled hdptxphy0. A quick hack is to also enable hdptxphy0 also in
> the Ultra dts.

That was it. With the last patch in that thread applied, I get HDMI
output.

I'll see if I can figure out a setup to test the HDMI RX port as well.

JE



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

end of thread, other threads:[~2025-02-22  6:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-20  4:10 [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra Jimmy Hon
2025-02-20  4:10 ` [PATCH UNTESTED v5 1/4] dt-bindings: arm: rockchip: Add Xunlong " Jimmy Hon
2025-02-21 22:28   ` Rob Herring (Arm)
2025-02-20  4:10 ` [PATCH UNTESTED v5 2/4] arm64: dts: rockchip: Add Orange Pi 5 Ultra board Jimmy Hon
2025-02-20  4:10 ` [PATCH UNTESTED v5 3/4] arm64: dts: rockchip: Enable HDMI1 on Orange Pi 5 Ultra Jimmy Hon
2025-02-20  4:10 ` [PATCH UNTESTED v5 4/4] arm64: dts: rockchip: Enable HDMI1 audio output for " Jimmy Hon
2025-02-21 23:13 ` [PATCH UNTESTED v5 0/4] " Johannes Erdfelt
2025-02-22  1:23   ` Jimmy Hon
2025-02-22  4:31     ` Johannes Erdfelt
2025-02-22  5:30       ` Jimmy Hon
2025-02-22  4:36     ` Johannes Erdfelt
2025-02-22  5:12       ` Jimmy Hon
2025-02-22  6:05         ` Johannes Erdfelt

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