Interesting, I just tested it here, and works perfectly fine:
root@OdroidXU4:~# grep 'setenv cs2enable' /boot/boot.ini
setenv cs2enable "true"
root@OdroidXU4:~# uname -a
Linux OdroidXU4 6.1.79-current-odroidxu4 #3 SMP PREEMPT Thu Feb 8 13:10:24 UTC 2024 armv7l GNU/Linux
root@OdroidXU4:~# lsmod | grep fb
fb_hktft32 16384 1
fbtft 36864 1 fb_hktft32
root@OdroidXU4:~# l /sys/class/backlight/fb_hktft32/
total 0
-r--r--r-- 1 root root 4.0K May 9 23:40 actual_brightness
-rw-r--r-- 1 root root 4.0K May 9 23:40 bl_power
-rw-r--r-- 1 root root 4.0K May 9 23:40 brightness
lrwxrwxrwx 1 root root 0 May 9 23:40 device -> ../../../spi0.0
-r--r--r-- 1 root root 4.0K May 9 23:29 max_brightness
drwxr-xr-x 2 root root 0 May 9 23:40 power
-r--r--r-- 1 root root 4.0K May 9 23:40 scale
lrwxrwxrwx 1 root root 0 May 9 23:40 subsystem -> ../../../../../../../../../class/backlight
-r--r--r-- 1 root root 4.0K May 9 23:40 type
-rw-r--r-- 1 root root 4.0K May 9 23:29 uevent
root@OdroidXU4:~# cat /sys/class/backlight/fb_hktft32/bl_power
0
root@OdroidXU4:~# echo 1 > /sys/class/backlight/fb_hktft32/bl_power
root@OdroidXU4:~# cat /sys/class/backlight/fb_hktft32/bl_power
1
2024-05-09 23:42:50 root@OdroidXU4:~# ls -l /proc/device-tree/soc/spi@12d30000/
total 0
-r--r--r-- 1 root root 4 May 9 23:40 '#address-cells'
-r--r--r-- 1 root root 4 May 9 23:40 '#size-cells'
-r--r--r-- 1 root root 16 May 9 23:40 clock-names
-r--r--r-- 1 root root 16 May 9 23:40 clocks
-r--r--r-- 1 root root 23 May 9 23:40 compatible
-r--r--r-- 1 root root 24 May 9 23:40 cs-gpios
-r--r--r-- 1 root root 6 May 9 23:40 dma-names
-r--r--r-- 1 root root 16 May 9 23:40 dmas
drwxr-xr-x 4 root root 0 May 9 23:40 hktft_cs_ogst@0
-r--r--r-- 1 root root 12 May 9 23:40 interrupts
-r--r--r-- 1 root root 4 May 9 23:40 name
-r--r--r-- 1 root root 4 May 9 23:40 num-cs
-r--r--r-- 1 root root 4 May 9 23:40 phandle
-r--r--r-- 1 root root 4 May 9 23:40 pinctrl-0
-r--r--r-- 1 root root 8 May 9 23:40 pinctrl-names
-r--r--r-- 1 root root 8 May 9 23:40 reg
-r--r--r-- 1 root root 4 May 9 23:40 samsung,spi-src-clk
-r--r--r-- 1 root root 5 May 9 23:40 status
As you can see, the bl_power
attribute was off, but I could turn it on. Not sure whether this is because I have no actual CS2 attached, or whether this is a change from Linux 5.4 to 6.1. If so, we can create a udev rule to have it enabled OOTB at boot.
But in your case, the backlight device is not present at all? The lsmod
command I have you was wrong, the grep
pipe was missing. Can you repeat the commands I ran above? The one to check /proc/device-tree/soc/spi@12d30000/
is important to see whether the device tree has been applied. If not, it would not contain the hktft_cs_ogst@0
sub node/directory.
EDIT: Okay, with the new Linux 6.6 build it does not work anymore, only with Linux 6.1. I’ll check why.
EDIT2: Lol, simple reason: Overlays are now located in /boot/dtb/
instead of /boot/dtb/overlays/
, no idea whether this is intended or not. In the source code, overlays are located in a sub dir, and the Makefile seems to even create a sub directory for the compiled overlays, but it is not present in the kernel package: ODROID-XU4: add overlay support · hardkernel/linux@bdc4c60 · GitHub
However, hence this does work for mw:
sed -i 's|dtb/overlays|dtb|g' /boot/boot.ini
Possible that this is fixed/changed, so maybe we should check in both dirs in our default boot.ini.
EDIT3: Out of interest, what is your MAC address?
ip l l eth0
Among many others, macaddr
seems to have no effect anymore, and the MAC address here is still fixed. I hope it is different for every particular XU4, based on the serial number (or simlar) of the particular Ethernet adapter.