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

Jimmy Hon honyuenkwun at gmail.com
Fri Feb 21 21:30:05 PST 2025


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



More information about the Linux-rockchip mailing list