Closed kruzer closed 2 years ago
@kruzer hey, can you elaborate on how you got this setup? I have the same controller but am having no luck…
I don't remember exactly, but I've done it in a standard linux way. Built openvfd driver on the box, I've created modprobe config in file /etc/modprobe.d/openvfd.conf like in the example above. my /boot/armbianEnv.txt:
verbosity=1
bootlogo=false
overlay_prefix=rockchip
fdtfile=rockchip/rk3318-box.dtb
rootdev=UUID=de2057ff-2fc6-418c-b583-7a1e2dbe8219
rootfstype=ext4
console=both
overlays=rk3318-box-cpu-hs rk3318-box-emmc-ddr rk3318-box-emmc-hs200 rk3318-box-led-conf1 rk3318-box-wlan-ap6334
user_overlays=openvfd mymali
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
I've created openvfd.dts :
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target-path = "/";
__overlay__ {
openvfd {
compatible = "open,vfd";
dev_name = "openvfd";
status = "okay";
};
};
};
};
and managed to convert it to /boot/overlay-user/openvfd.dtbo now the demo is working (apart form "cycle characters" which does nothing)
kruzer@rk3318-box ~/D/linux_openvfd (master)> ./OpenVFDService -t -dt 1
Display type 0x00000001
Initializing...
Process ID = 5080
Brightness loop from 0 to 7
Clear display
Original test codes:
Test chart, seq of nr from:0 to 76
Bit sequence
Bit sequence 2
Bit sequence 3
How did you manage to read the values from /etc/modprobe.d/vfd.conf
? I keep getting Failed to verify VFD configuration file, attempt using device tree as fallback.
, i've ever tried giving it permissions but nothing works.
Check your file formatting. It needs to be a simple ascii (non-UTF8) text file.
You can run cat /etc/modprobe.d/vfd.conf
to print it into the cli.
I tried writing it as ASCII and then modprobe from new. Same error. Here is my service file. Note: I placed my file in /root/.config/vfd.conf instead of /etc/modprobe.d/
[Unit]
Description=openvfd
Wants=network-online.target
[Service]
Type=simple
Environment="OPTS=-12h"
ExecStartPre=/bin/sh -c ". /root/.config/vfd.conf; /sbin/modprobe openvfd vfd_gpio_clk=$vfd_gpio_clk vfd_gpio_dat=$vfd_gpio_dat vfd_gpio_stb=$vfd_gpio_stb vfd_chars=$vfd_chars vfd_dot_bits=$vfd_dot_bits vfd_display_type=>ExecStart=/root/linux_openvfd/OpenVFDService $OPTS &
ExecStop=/usr/bin/killall OpenVFDService
ExecStopPost=-/sbin/rmmod openvfd
[Install]
WantedBy=multi-user.target
@kruzer did you manage to solve your original problem? I got the driver set up and running successfully but it seems I ran into the same problem as you.
Yes, after this patch https://github.com/kruzer/linux_openvfd/commit/1d83779bb9d525e6593b97f7e893cccc73080d4d it is working ok for me.
That patch is wrong, as it prevents changing other parameters relevant to the display type. Your [N] in -dt needs to be a 32bit hex value that includes all of the relevant fields.
Hi, I have a strange problem with the driver, it seems to switch to wrong controller after changing display type. my box: rk3318 (H96 Max) system: Armbian - Linux rk3318-box 5.10.37-rockchip64 controller: FD6551 my openvfd.dts:
driver parameters are set with /etc/modprobe.d/openvfd.conf
after module is loaded, last lines from dmesg shows:
and OpenVFDService correctly prestents time on display, but after trying to check another display type:
driver switches to another controller
And display stops working, until driver module is reloaded, am I doing something wrong?