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
5.45k stars 1.74k forks source link

(S905x) LED display failed, ghost module #192

Closed chris4git closed 2 years ago

chris4git commented 2 years ago

Hi, Armbian_22.05.0_Aml_s905x_focal_5.15.30_2022.03.20.1245.img on a T95 S905x TV box. I try to activate the led display with armbian-led (and by hand) but it fails with all confs I've tried :

lsmod shows the openvfd module but there is no traces in kernel log/dmesg no /dev/openvfd and no /sys/class/leds/openvfd

Any advice to debug that ?

Chris

ophub commented 2 years ago

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

Add your T95 conf

lx7741 commented 2 years ago

这个是要找到正确的配置才会有/sys/class/leds/openvfd文件吗?我执行都是找不到这个文件,open device failed

ophub commented 2 years ago

在那两个网站里找一下自己的配置

chris4git commented 2 years ago

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

Add your T95 conf

I only know my box use a fd628 controller and found that in /d/gpio of Android : GPIOs 145-154, platform/c1109880.pinmux, ao-bank: gpio-147 (gpio_key ) in hi
gpio-148 (fd628_dev ) out hi
gpio-149 (fd628_dev ) in hi
gpio-150 (fd628_dev ) out hi

The box specs are at http://specdevice.com/showspec.php?id=76fa-8e07-0033-c5870033c587

I tried several confs with armbian-led, including t95m_905x.conf but none produced entries in kernel log or /dev/openvfd entry. But the module is listed in lsmod...

ophub commented 2 years ago

rename t95m_905.conf to diy.conf armbian-led 99

lx7741 commented 2 years ago

root@armbian:~# armbian-led 99 Using LED Profiles: /usr/share/openvfd/conf/diy.conf turn led usb on ... /usr/sbin/armbian-led: line 48: /sys/class/leds/openvfd/led_on: No such file or directory turn led apps on ... /usr/sbin/armbian-led: line 48: /sys/class/leds/openvfd/led_on: No such file or directory turn led setup on ... /usr/sbin/armbian-led: line 48: /sys/class/leds/openvfd/led_on: No such file or directory Open device failed. : No such file or directory turn led sd on ... /usr/sbin/armbian-led: line 48: /sys/class/leds/openvfd/led_on: No such file or directory turn led hdmi on ... /usr/sbin/armbian-led: line 48: /sys/class/leds/openvfd/led_on: No such file or directory turn led cvbs on ... /usr/sbin/armbian-led: line 48: /sys/class/leds/openvfd/led_on: No such file or directory Enable LED display! 执行完出现这些错误,是DTB问题?我使用的是meson-g12a-x96-air.dtb ,是不是这个dtb无法启动openvfd功能呢? 还是说我配置有问题? 我从别人的96 air系统中抓到的 进程参数是这样的 root 2505 1 0 12:31 ? 00:00:00 /bin/sh -c [ cat /proc/device-tree/openvfd/compatible = "open,vfd" ] && /sbin/modprobe openvfd vfd_gpio_clk=0,65,0 vfd_gpio_dat=0,64,0 vfd_gpio_stb=${vfd_gpio_stb:-0,0,0xFF} vfd_gpio0=${vfd_gpio0:-0,0,0xFF} vfd_gpio1=${vfd_gpio1:-0,0,0xFF} vfd_gpio2=${vfd_gpio2:-0,0,0xFF} vfd_gpio3=${vfd_gpio3:-0,0,0xFF} vfd_gpio_protocol=${vfd_gpio_protocol:-0,0} vfd_chars=4,0,1,2,3 vfd_dot_bits=0,1,2,3,4,5,6 vfd_display_type=0x02,0x00,0x01,0x00; /usr/sbin/OpenVFDService ${clock_12h_format:+-12h}

ophub commented 2 years ago

48行是点亮某些功能,可能你的没有这个功能,可以忽视。led正常点亮了没有?

lx7741 commented 2 years ago

正常点亮了没有

别人的X96 air系统是正常点亮的。(别人系统跟armbian有点像)

我的执行armbian-led 就显示上面那些错误。 我的diy配置跟x96 max一样的配置,是用64 63 的配置。

ophub commented 2 years ago

你是第一个air,你改一下diy.conf里面functions的值,可以为空。你知道原来安卓系统能显示什么,可以填,不知道就为空。

lx7741 commented 2 years ago

conf

我现在设置空,但是还是提示 open device failed no such file or directory 。 led灯没有亮,没有任何反应

ophub commented 2 years ago

diy.conf的内容发一下

lx7741 commented 2 years ago
# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.
#
# X96 Max (S905X2) configuration
#--------------------
#gpio_xxx:
# [0] 0 = &gpio, 1 = &gpio_ao.
# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h
# [0] Reserved - must be 0.

vfd_gpio_clk='0,64,0'
vfd_gpio_dat='0,63,0'
vfd_gpio_stb='1,10,0'

#chars:
# < DHHMM > Order of display chars (D=dots, represented by a single char)

vfd_chars='4,0,1,2,3'

#dot_bits:
# Order of dot bits. Typical configurations:
# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots
# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6
# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots
# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6
# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi
# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6

vfd_dot_bits='0,1,2,3,4,5,6'

#display_type:
# [0] - Display type.
# [1] - Reserved - must be 0..
# [2] - Flags. (bit 0 = '1' - Common Anode display)
# [3] - Controller.

vfd_display_type='0x02,0x00,0x01,0x00'  # ok

functions=''
ophub commented 2 years ago

那两个网站里有没air适合你的

lx7741 commented 2 years ago

那两个网站里有没air适合你的

是的,但是我这边有个别人刷的盒子,参数是65 和64,所以应该是一样的,他那个就正常亮。 是否是dtb要修改? 我看f大的dts文件内核上加了这个代码。 openvfd { compatible = "open,vfd"; dev_name = "openvfd"; status = "okay"; };

ophub commented 2 years ago

你的不是最新的内核? 将系统的内核升级到 5.4.185、5.10.106、5.15.29、5.16.15 或更高版本。Armbian 系统使用 armbian-update 命令升级。

lx7741 commented 2 years ago

你的不是最新的内核? armbian-update 升级到最新内核

我用的是最新的打包,5.4.186内核。

ophub commented 2 years ago

那就己经是包含了。那就调整diy.conf吧

lx7741 commented 2 years ago

那就己经是包含了。那就调整diy.conf吧

我x96 dts 加了这个代码以后就正常了。 openvfd { compatible = "open,vfd"; dev_name = "openvfd"; status = "okay"; };

使用11的配置就可以启动

ophub commented 2 years ago

我是转存的f大的内核,现在的两个都是己经添加了这个功能的。你不放心的话可以去他网盘下载他保存的换一下,你看看有区别没。

lx7741 commented 2 years ago

我是转存的f大的内核,现在的两个都是己经添加了这个功能的

内核是有这个功能,但是需要配置dtb去启动? 我看你提供的配置表,f大都有修改dts文件,所以我怀疑是dts问题。 手动改了dts,重新编译dtb,替换,就正常了

ophub commented 2 years ago

https://github.com/ophub/kernel/tree/main/pub/stable/5.4.186

dts是dtb的源码。dtb是内核的文件之一。他在内核源码里添加了,那以后编译的就有了。 我是从他分享的地方下载转存的,同一个文件,你如果有怀疑不同,可以去下他网盘的替换。

lx7741 commented 2 years ago

dts是dtb的源码。dtb是内核的文件之一。他在内核源码里添加了,那以后编译的就有了。 我是从他分享的地方下载转存的,同一个文件,你如果有怀疑不同,可以去下他网盘的替换。

不是你转存出错,是f大的X96 Air 的dts文件没有添加

openvfd { compatible = "open,vfd"; dev_name = "openvfd"; status = "okay"; }; 这个配置。 我手动修改meson-g12a-x96-air.dts,重新编译出一个dtb替换的 @ophub

ophub commented 2 years ago

我问一下他,如果漏了加一下,你测试可以使用的conf文件分享一下。设备的soc和dtb,内核版本等信息介绍一下,我加到列表里 你上面发的conf那个代码就是air测试完的正确配置?

lx7741 commented 2 years ago

X96 Air 2G 16G 100M Wifi dts和dtb文件: meson-sm1-x96-air.zip 使用conf文件跟x96 max配置一样(编号为11) 内核版本5.4.186

ophub commented 2 years ago

好的,谢谢反馈,我和他说一下

chris4git commented 2 years ago

rename t95m_905.conf to diy.conf armbian-led 99

Yes, I've done that, of course, with several confs, but :

root@armbian:# armbian-led 99 Using LED Profiles: /usr/share/openvfd/conf/diy.conf Enable LED display! root@armbian:# Open device failed. : No such file or directory root@armbian:# lsmod|egrep openvfd openvfd 196608 0 root@armbian:# dmesg |egrep openvfd root@armbian:~# Is the module supposed to be totally quiet ?

ophub commented 2 years ago

T95 which dtb are you using?

ophub commented 2 years ago

@lx7741 今天内核更新了,x96air的dtb已经添加了openvfd支持,升级到最新内核即可使用。 根据你的测试结果,x96air.conf也添加了,和x96max.conf一样。你的分享已经添加至贡献者名单,谢谢分享。

https://github.com/ophub/amlogic-s9xxx-armbian/commit/9a553f971d0d3ea0a616eaf348e0e643dd45b362

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTOR.md

lx7741 commented 2 years ago

@lx7741 今天内核更新了,x96air的dtb已经添加了openvfd支持,升级到进行的最新内核即可使用。 根据你的测试结果,x96air.conf也添加了,和x96max.conf一样。你的分享已经添加至贡献者名单,谢谢分享。

9a553f9

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTOR.md

收到,谢谢!

chris4git commented 2 years ago

T95 which dtb are you using?

meson-gxl-s905x-p212.dtb

with image Armbian_22.05.0_Aml_s905x_focal_5.15.30_2022.03.20.1245.img box specs at http://specdevice.com/showspec.php?id=76fa-8e07-0033-c5870033c58]

ophub commented 2 years ago

@chris4git Replace: meson-gxl-s905x-p212.dtb.zip

The dtb in the firmware does not add openvfd, downloaded the test I sent you, this is the 5.15 kernel, unzip it, and then upload and replace the file with the same name: /boot/dtb/amlogic/meson-gxl-s905x-p212. dtb

Can your T95 use meson-gxl-s905x-p212.dtb normally? Are you using uEnv.txt or extlinux.conf Send your device information and firmware information.

ls /boot
cat /boot/uEnv.txt
cat /etc/ophub-release
lsblk
chris4git commented 2 years ago

Can your T95 use meson-gxl-s905x-p212.dtb normally? Are you using uEnv.txt or extlinux.conf Send your device information and firmware information.

ls /boot
cat /boot/uEnv.txt
cat /etc/ophub-release
lsblk

Yes, the T95 boots normally with meson-gxl-s905x-p212.dtb (except WiFi), with extlinux.conf

root@armbian:/boot# ls /boot
aml_autoscript                  boot-emmc.cmd              dtb                            s905_autoscript                u-boot-gtkingpro-rev-a.bin  u-boot-s905x2-s922.bin  u-boot-tx3-qz.bin      u-boot-zyxq.bin
aml_autoscript.cmd              boot-emmc.ini              emmc_autoscript                s905_autoscript.cmd            u-boot-n1.bin               u-boot-s905x-s912.bin   u-boot-u200.bin        uEnv.txt-orig
Android                         boot-emmc.scr              emmc_autoscript.cmd            System.map-5.15.30-flippy-71+  u-boot-odroid-n2.bin        u-boot.sd               u-boot-ugoos-x3.bin    uInitrd
armbian_first_run.txt.template  boot.ini                   extlinux                       u-boot.ext                     u-boot-p201.bin             u-boot-sei510.bin       u-boot.usb             vmlinuz-5.15.30-flippy-71+
boot.bmp                        boot.scr                   initrd.img-5.15.30-flippy-71+  u-boot-gtking.bin              u-boot-p212.bin             u-boot-sei610.bin       u-boot-x96max.bin      zImage
boot.cmd                        config-5.15.30-flippy-71+  LOST.DIR                       u-boot-gtkingpro.bin           u-boot-s905.bin             u-boot-tx3-bz.bin       u-boot-x96maxplus.bin

root@armbian:/boot# cat /boot/uEnv.txt
cat: /boot/uEnv.txt: No such file or directory

root@armbian:/boot# cat /etc/ophub-release
VERSION_CODEID='ubuntu'
VERSION_CODENAME='focal'
FDTFILE='meson-gxl-s905x-p212.dtb'
UBOOT_OVERLOAD='u-boot-p212.bin'
MAINLINE_UBOOT='/usr/lib/u-boot/'
ANDROID_UBOOT='/usr/lib/u-boot/'
KERNEL_VERSION='5.15.30'
SOC='s905x'
K510='1'
PACKAGED_DATE='2022-03-20'

root@armbian:/boot# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    1  14.5G  0 disk 
├─sda1         8:1    1   243M  0 part /boot
└─sda2         8:2    1  14.1G  0 part /
mmcblk2      179:0    0   7.3G  0 disk 
mmcblk2boot0 179:32   0     4M  1 disk 
mmcblk2boot1 179:64   0     4M  1 disk 
zram0        254:0    0 464.7M  0 disk [SWAP]
zram1        254:1    0    50M  0 disk /var/log
zram2        254:2    0 464.7M  0 disk /var/tmp
root@armbian:/boot# 
ophub commented 2 years ago
# See which dtb is in the configuration of this file
cat /boot/extlinux/extlinux.conf

Download the dtb I sent you above and try to replace the original file with the same path

ophub commented 2 years ago

There is no T95 support in the current installation and update scripts, and there is no modification to the /boot/extlinux/extlinux.conf file. Have you tried using /boot/uEnv.txt to start it?

But being able to use meson-gxl-s905x-p212.dtb is also good news. I can add T95 dedicated DTB according to this source code

Is it convenient for you to find a product link corresponding to your device?

Is it convenient to test the kernels of 5.4 and 5.10, can you start it with /boot/extlinux/extlinux.conf

Do you know how to modify this startup file? The UUID refers to the value in uEnv.txt, and the other content can be the content of /boot/extlinux/extlinux.conf in your current firmware.

If testing is available, I will add the device again later.

chris4git commented 2 years ago
# See which dtb is in the configuration of this file
cat /boot/extlinux/extlinux.conf

Download the dtb I sent you above and try to replace the original file with the same path

Good ! now the openvfd module loads normally :

[  139.968351] OpenVFD: Version: V1.4.1
[  139.968378] OpenVFD: vfd_gpio_clk:       #0 = 0x01; #1 = 0x04; #2 = 0x00; 
[  139.968386] OpenVFD: vfd_gpio_dat:       #0 = 0x01; #1 = 0x03; #2 = 0x00; 
[  139.968391] OpenVFD: vfd_gpio_stb:       #0 = 0x01; #1 = 0x02; #2 = 0x00; 
[  139.968399] OpenVFD: vfd_gpio0:      #0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[  139.968405] OpenVFD: vfd_gpio1:      #0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[  139.968411] OpenVFD: vfd_gpio2:      #0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[  139.968417] OpenVFD: vfd_gpio3:      #0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[  139.968423] OpenVFD: vfd_gpio_protocol:  #0 = 0x00; #1 = 0x00; 
[  139.968430] OpenVFD: vfd_chars:      #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04; 
[  139.968439] OpenVFD: vfd_dot_bits:       #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04; #5 = 0x05; #6 = 0x06; 
[  139.968446] OpenVFD: vfd_display_type:   #0 = 0x01; #1 = 0x00; #2 = 0x00; #3 = 0x00; 
[  139.968454] OpenVFD: Detected gpio chips:    periphs-banks, aobus-banks.
[  139.968461] OpenVFD: "aobus-banks" chip found.   base = 501, pin count = 11, pin = 4, offset = 505
[  139.968468] OpenVFD: "aobus-banks" chip found.   base = 501, pin count = 11, pin = 3, offset = 504
[  139.968475] OpenVFD: "aobus-banks" chip found.   base = 501, pin count = 11, pin = 2, offset = 503
[  139.968480] OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[  139.968484] OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[  139.968487] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[  139.968490] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[  139.970101] OpenVFD: Select FD628 controller
[  139.970153] OpenVFD: SW SPI 3-wire interface intialized (LSB mode)
[  170.470814] brightness = 0

now I have to search the good configuration...

Thanks for your help

ophub commented 2 years ago

Can you share the configuration of your device? t95.conf

chris4git commented 2 years ago

There is no T95 support in the current installation and update scripts, and there is no modification to the /boot/extlinux/extlinux.conf file. Have you tried using /boot/uEnv.txt to start it?

yes, without success

But being able to use meson-gxl-s905x-p212.dtb is also good news. I can add T95 dedicated DTB according to this source code

Is it convenient for you to find a product link corresponding to your device?

https://www.gearbest.com/tv-box-mini-pc/pp_268277.html http://specdevice.com/showspec.php?id=76fa-8e07-0033-c5870033c587

Is it convenient to test the kernels of 5.4 and 5.10, can you start it with /boot/extlinux/extlinux.conf

yes, if you want. With what images ?

Do you know how to modify this startup file? The UUID refers to the value in uEnv.txt, and the other content can be the content of /boot/extlinux/extlinux.conf in your current firmware.

I have already modified extlinux/extlinux.conf

If testing is available, I will add the device again later.

ophub commented 2 years ago

Try Armbian_s905x_5.4.x_xxxx.img

Can you share the openvfd’s configuration of your device? t95.conf

chris4git commented 2 years ago

Try Armbian_s905x_5.4.x_xxxx.img

with Armbian_22.05.0_Aml_s905x_focal_5.4.187_2022.03.26.0128.img :

20220326_084745-2

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb
APPEND root=UUID=3ff63dcf-9928-42fd-bd99-e1b6cb551e14 rootflags=data=writeback rw rootfstype=ext4 console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

-> boot OK

Can you share the openvfd’s configuration of your device? t95.conf

can't find a working configuration for now

chris4git commented 2 years ago

Can you share the openvfd’s configuration of your device? t95.conf

can't find a working configuration for now

Hi, working configuration for the Sunvell T95 : t95m-s905x-vfd.conf (or meson-gxl-s905x-t95m.conf)

Chris