Re: [PATCH UNTESTED v5 0/4] Orange Pi 5 Ultra

Johannes Erdfelt
2025-02-22T04:38:23Z

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