I connected ssd1306 on k1pro. That works with vitmod enigma2 and openatv. I want to work with coreelec. I try meson-gxm-khadas-vim2-ssd1306-128x64-i2c.conf to vfd.conf.
The OpenVFD driver doesn’t use I2C hardware, it implements the I2C protocol in software.
It’s possible that the driver can’t access the pins because they’re reserved by hardware I2C.
If that header exposes other GPIO pins, it might work, but if there’s another driver (or something in the DTB) which is reserving those pins, it won’t work.
You can look at
systemctl status openvfd and
dmesg output to figure out why the driver isn’t starting up.
[ 18.128310@3] OpenVFD: Version: V1.3.0
[ 18.128322@3] OpenVFD: vfd_gpio_clk: #0 = 0x00; #1 = 0x4A; #2 = 0x00;
[ 18.128325@3] OpenVFD: vfd_gpio_dat: #0 = 0x00; #1 = 0x49; #2 = 0x00;
[ 18.128328@3] OpenVFD: vfd_gpio_stb: #0 = 0x00; #1 = 0x48; #2 = 0x00;
[ 18.128332@3] OpenVFD: vfd_gpio0: #0 = 0x00; #1 = 0x46; #2 = 0x00;
[ 18.128335@3] OpenVFD: vfd_gpio1: #0 = 0x00; #1 = 0x47; #2 = 0x00;
[ 18.128338@3] OpenVFD: vfd_gpio2: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 18.128341@3] OpenVFD: vfd_gpio3: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 18.128345@3] OpenVFD: vfd_chars: #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04;
[ 18.128351@3] OpenVFD: vfd_dot_bits: #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04; #5 = 0x05; #6 = 0x06;
[ 18.128354@3] OpenVFD: vfd_display_type: #0 = 0x3F; #1 = 0x81; #2 = 0x28; #3 = 0xFD;
[ 18.128359@3] OpenVFD: Detected gpio chips: ao-bank, banks.
[ 18.128366@3] OpenVFD: “banks” chip found. base = 155, pin count = 101, pin = 74, offset = 229
[ 18.128368@3] OpenVFD: “banks” chip found. base = 155, pin count = 101, pin = 73, offset = 228
[ 18.128371@3] OpenVFD: “banks” chip found. base = 155, pin count = 101, pin = 72, offset = 227
[ 18.128373@3] OpenVFD: “banks” chip found. base = 155, pin count = 101, pin = 70, offset = 225
[ 18.128375@3] OpenVFD: “banks” chip found. base = 155, pin count = 101, pin = 71, offset = 226
[ 18.128377@3] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[ 18.128379@3] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[ 18.128393@3] c1108500.i2c is using the pin GPIODV_25 as pinmux
[ 18.128401@3] pinmux-gxl c1109880.pinmux: request() failed for pin 84[ 18.128404@3] pinmux-gxl c1109880.pinmux: pin-84 (banks:229) status -22
[ 18.128422@3] OpenVFD: can’t request gpio of gpio_clk
[ 18.128422@3] openvfd: probe of openvfd.12 failed with error -22
● openvfd.service - OpenVFD Service
Loaded: loaded (/usr/lib/systemd/system/openvfd.service; disabled; ve Active: failed (Result: exit-code) since Thu 2015-01-01 02:00:21 EET; Process: 2716 ExecStopPost=/usr/sbin/rmmod openvfd (code=exited, statu Process: 2653 ExecStart=/bin/sh -c [ `cat /proc/device-tree/openvfd/co Main PID: 2653 (code=exited, status=1/FAILURE)
Jun 22 14:11:53 CoreELEC systemd: Started OpenVFD Service.
Jan 01 02:00:21 CoreELEC systemd: openvfd.service: Main process exiteJan 01 02:00:21 CoreELEC systemd: openvfd.service: Failed with result
I2C is already used, so you can’t use the same pins.
I’m going to look into adding support for hardware I2C into OpenVFD, if\when that is added, you’ll be able to configure things to work in the way you connected it.
did you add hardware I2C
No, sorry. It looks way too complicated for what is already implemented in software and works fine for 99.99% of cases.
I’ll say that the openvfd driver is open for pull requests if someone wants to add it. I think it shouldn’t be too difficult from a technical viewpoint, as the driver is modular enough to accept more protocol options.
I think it works only for 50% as you violet kernel i2c support for other devices. And I think you can use sw i2c only for common gpio ports, ports used for i2c have to be controlled by kernel. They are kernel resources.
What I meant by 99.99%, is that in most cases you can either disable I2C (in case of most android boxes and use SW) or just use different GPIO pins, if you’re using a SBC.
@afl1 has sent me some sample code to work with, I’ll test it and add it in if everything works.
Glad to say that with some additional help from afl1, I have hardware I2C working with a SSD1306 OLED.
There’s still some work left to do, but this will be available soon, so please have some patience
thanks and good news
It should be in the next nightly. You’ll need a different vfd.conf file.
@afl1 Do you know which I2C controller (its device id) the wires are soldered to in his pic? I’ll make vfd.conf files for this device.
KI Pro uses i2c_b for dvb tuner, id is 2.
That’s what I found, just wanted to make sure, thanks.
You should be able to use one of these, depending on your display.
I will try this niğht
You can try it with this build.
ok. do it need to update addon
What addon? Update to this build, use a vfd.conf I posted earlier. Reboot and see if the oled starts working.