ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.09k stars 1.95k forks source link

How to support LED clock for new S905x3 device? #401

Closed dinhchinh82 closed 2 years ago

dinhchinh82 commented 2 years ago

I have a new K10 pro box (S905x3 4+32G) and it works well with S9xxx-armbian firmware. Both ethernet & wifi are recognized with meson-sm1-sei610.dtb, kernel 5.4.

By the way, I tried to enable the led but not successfully.

Here is the GPIO which is extracted from Android firmware (using ADB shell connection) image (7)

13761656049303_ pic

Here is the board photo: PXL_20220627_091511573

The clock panel is TM1628a.

Here is the configuration I've tried but not successfully yet.

https://pastebin.com/AS6pfeLu Screen Shot 2022-06-30 at 11 03 43

If I restore the original Android OS, the clock is displayed as normal.

Thank you.

ophub commented 2 years ago

You download the firmware of s905x3, test whether it can be used in the usb, and modify the dtb according to the same method.

ophub commented 2 years ago

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-docs/led_screen_display_control.md

vfd_gpio_clk='1,5,0'
vfd_gpio_dat='1,7,0'
dinhchinh82 commented 2 years ago

You download the firmware of s905x3, test whether it can be used in the usb, and modify the dtb according to the same method.

I already downloaded and installed the latest S905x3 firmware and installed to eMMC without any issue. Is it really needed to use USB to test?

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-docs/led_screen_display_control.md

vfd_gpio_clk='1,5,0'
vfd_gpio_dat='1,7,0'

I've just followed this guide and test again but still not displayed the led clock.

This is my firmware:

cat /etc/ophub-release VERSION_CODEID='debian' VERSION_CODENAME='bullseye' PACKAGED_DATE='2022-03-06' KERNEL_VERSION='5.4.196' K510='0' FDTFILE='meson-sm1-sei610.dtb' UBOOT_OVERLOAD='u-boot-x96maxplus.bin' MAINLINE_UBOOT='' ANDROID_UBOOT='' MYBOX_UBOOT='/usr/lib/u-boot/mybox-bootloader.img' SOC='s905x3'

ophub commented 2 years ago

5.4 and 5.15 use the same requirements.

But 5.10 and 5.18 have different requirements, more u-boot support, so test 5.10 to see if you can use it.

Testing in usb is the same as in emmc, but in order not to affect the system you have installed in emmc, it is generally recommended to test in usb. If it fails in emmc, you have to reinstall.

You can also directly update the kernel for testing: armbian-update 5.10.127

dinhchinh82 commented 2 years ago

@ophub I understant your suggestion. But I guess if it works on 5.10.x, it also should work on 5.4.x. I will try to update to 5.10.x and report you result.

by the way, how to calculate the value as below?

vfd_gpio_clk='1,5,0' vfd_gpio_dat='1,7,0'

ophub commented 2 years ago

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-docs/led_screen_display_control.md

Explain that in this document, the Android value is -1. You can use this to modify the LED to light it?

dinhchinh82 commented 2 years ago

armbian-update 5.10.127

I tried to run this update but my box is unable to boot any more. I also tried to boot with 5.15.x but the Ethernet did not work then I must come back to 5.4.x

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-docs/led_screen_display_control.md

Explain that in this document, the Android value is -1. You can use this to modify the LED to light it?

I've tried to enable the led on 5.4.196 again but the LED is still not to be turned on.

Screen Shot 2022-06-30 at 16 15 33

I modified the config /usr/share/openvfd/conf/x96maxplus.conf to test:

image image
ophub commented 2 years ago

https://github.com/unifreq/linux-5.4.y/commit/f7c7015ddd20b01a0b3caf088b7eb96779428311

I checked the kernel, and openvfd support has been added in meson-sm1-sei610.dtb. According to the instructions, go to the templates of the two websites to find it, and search the Internet for the configuration shared by others.

dinhchinh82 commented 2 years ago

unifreq/linux-5.4.y@f7c7015

I checked the kernel, and openvfd support has been added in meson-sm1-sei610.dtb. According to the instructions, go to the templates of the two websites to find it, and search the Internet for the configuration shared by others.

I will take time to research more config from 2 reference websites and try again.

Thank you.