First at all thank you for the great work of porting LibreELEC to RK3229-based boards!
The image LibreELEC-RK322x.arm-9.2-devel-20200114140204-0bca75f-rk3228b-v88marsII.img runs fine on my TV-BOX. But power leds display state wrong: blue and red leds both don't glow while the box works, and only blue led glows when the box is off.
Native firmware of the TV-BOX has DTS-sections:
gpio1@11120000 {
compatible = "rockchip,gpio-bank";
reg = <0x11120000 0x100>;
interrupts = <0x0 0x34 0x4>;
clocks = <0x64 0x9>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
linux,phandle = <0x8c>;
phandle = <0x8c>;
};
gpio3@11140000 {
compatible = "rockchip,gpio-bank";
reg = <0x11140000 0x100>;
interrupts = <0x0 0x36 0x4>;
clocks = <0x64 0xb>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
linux,phandle = <0xb4>;
phandle = <0xb4>;
};
power-led {
compatible = "gpio-leds";
red {
gpios = <0xb4 0x15 0x0>;
default-state = "off";
};
green {
gpios = <0x8c 0x7 0x0>;
default-state = "on";
};
};
Display More
while LibreELEC image has:
gpio0@11110000 {
compatible = "rockchip,gpio-bank";
reg = <0x11110000 0x100>;
interrupts = <0x0 0x33 0x4>;
clocks = <0x2 0x140>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
phandle = <0x72>;
};
gpio1@11120000 {
compatible = "rockchip,gpio-bank";
reg = <0x11120000 0x100>;
interrupts = <0x0 0x34 0x4>;
clocks = <0x2 0x141>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
phandle = <0x3f>;
};
gpio3@11140000 {
compatible = "rockchip,gpio-bank";
reg = <0x11140000 0x100>;
interrupts = <0x0 0x36 0x4>;
clocks = <0x2 0x143>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
phandle = <0x6c>;
};
leds {
compatible = "gpio-leds";
led_blue {
gpios = <0x6c 0x15 0x0>;
default-state = "on";
};
led_red {
gpios = <0x72 0x1 0x0>;
default-state = "off";
linux,default-trigger = "rc-feedback";
};
};
Display More
I changed "gpios" values in the LibreELEC "leds" section to:
led_blue gpios = <0x3f 0x7 0x0>
led_red gpios = <0x6c 0x15 0x0>
Now blue led glows while the box works and blue and red leds both glow when the box is off. And the blue led flashes on each remote control button pressing.
I would like more traditional behaviour: only blue led glows while the box works and only red led glows when the box power off.
How do I do correct power leds settings?