Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No display with HK1 Box On Armbian #12

Closed
lChiehZ opened this issue Aug 4, 2021 · 9 comments
Closed

No display with HK1 Box On Armbian #12

lChiehZ opened this issue Aug 4, 2021 · 9 comments

Comments

@lChiehZ
Copy link

lChiehZ commented Aug 4, 2021

Hi, Arthur

Thanks for your openvfd first, But I'm having trouble with it not working!

I used HK1 Box (a TV Box similar X96 Max Plus, And with the Amlogic S905X3 Soc) running Armbian 20.10 bullseye 5.9.0,
And I compile openvfd driver With Amlogic_s905-kernel, make option ARCH is arm64 CROSS_COMPILE is aarch64-linux-gnu-
Then I source hk1-x3-vfd.conf and run this command:

insmod openvfd.ko vfd_gpio_clk=${vfd_gpio_clk} \
                         vfd_gpio_dat=${vfd_gpio_dat} \
                         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=${vfd_chars} vfd_dot_bits=${vfd_dot_bits} \
                         vfd_display_type=${vfd_display_type}

And I from dmesg get this:

[ 1476.669968] OpenVFD: Version: V1.3.0
[ 1476.669989] OpenVFD: vfd_gpio_clk:		#0 = 0x00; #1 = 0x41; #2 = 0x00; 
[ 1476.670001] OpenVFD: vfd_gpio_dat:		#0 = 0x00; #1 = 0x40; #2 = 0x00; 
[ 1476.670012] OpenVFD: vfd_gpio_stb:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1476.670023] OpenVFD: vfd_gpio0:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1476.670034] OpenVFD: vfd_gpio1:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1476.670044] OpenVFD: vfd_gpio2:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1476.670055] OpenVFD: vfd_gpio3:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1476.670064] OpenVFD: vfd_gpio_protocol:	#0 = 0x00; #1 = 0x00; 
[ 1476.670078] OpenVFD: vfd_chars:		#0 = 0x00; #1 = 0x04; #2 = 0x03; #3 = 0x02; #4 = 0x01; 
[ 1476.670096] OpenVFD: vfd_dot_bits:		#0 = 0x00; #1 = 0x01; #2 = 0x03; #3 = 0x02; #4 = 0x04; #5 = 0x05; #6 = 0x06; 
[ 1476.670108] OpenVFD: vfd_display_type:	#0 = 0x00; #1 = 0x00; #2 = 0x00; #3 = 0x06; 
[ 1476.670119] OpenVFD: Detected gpio chips:	aobus-banks, periphs-banks.
[ 1476.670130] OpenVFD: "periphs-banks" chip found.	base = 427, pin count = 85, pin = 65, offset = 492
[ 1476.670139] OpenVFD: "periphs-banks" chip found.	base = 427, pin count = 85, pin = 64, offset = 491
[ 1476.670144] OpenVFD: Skipping vfd_gpio_stb evaluation (0xFF)
[ 1476.670148] OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[ 1476.670153] OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[ 1476.670158] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[ 1476.670162] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[ 1476.670658] OpenVFD: Select FD6551 controller
[ 1476.670829] OpenVFD: SW I2C interface intialized (address = 0x0000 (N/A), MSB mode, pull-ups off)
root@arm-64:~# 

Then I use ./OpenVFDService ,But nothing happen, The LCD screen still does not show.

Also I have tried source x96-max-1gbit-vfd.conf, I will get this from dmesg:

[ 1786.779440] OpenVFD: Version: V1.3.0
[ 1786.779459] OpenVFD: vfd_gpio_clk:		#0 = 0x00; #1 = 0x41; #2 = 0x00; 
[ 1786.779471] OpenVFD: vfd_gpio_dat:		#0 = 0x00; #1 = 0x40; #2 = 0x00; 
[ 1786.779482] OpenVFD: vfd_gpio_stb:		#0 = 0x01; #1 = 0x0A; #2 = 0x00; 
[ 1786.779493] OpenVFD: vfd_gpio0:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1786.779504] OpenVFD: vfd_gpio1:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1786.779514] OpenVFD: vfd_gpio2:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1786.779525] OpenVFD: vfd_gpio3:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1786.779534] OpenVFD: vfd_gpio_protocol:	#0 = 0x00; #1 = 0x00; 
[ 1786.779548] OpenVFD: vfd_chars:		#0 = 0x04; #1 = 0x00; #2 = 0x01; #3 = 0x02; #4 = 0x03; 
[ 1786.779565] OpenVFD: vfd_dot_bits:		#0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04; #5 = 0x05; #6 = 0x06; 
[ 1786.779578] OpenVFD: vfd_display_type:	#0 = 0x02; #1 = 0x00; #2 = 0x01; #3 = 0x00; 
[ 1786.779588] OpenVFD: Detected gpio chips:	aobus-banks, periphs-banks.
[ 1786.779599] OpenVFD: "periphs-banks" chip found.	base = 427, pin count = 85, pin = 65, offset = 492
[ 1786.779608] OpenVFD: "periphs-banks" chip found.	base = 427, pin count = 85, pin = 64, offset = 491
[ 1786.779616] OpenVFD: "aobus-banks" chip found.	base = 412, pin count = 15, pin = 10, offset = 422
[ 1786.779622] OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[ 1786.779627] OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[ 1786.779632] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[ 1786.779636] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[ 1786.780108] OpenVFD: Select FD628 controller
[ 1786.780144] OpenVFD: SW SPI 3-wire interface intialized (LSB mode)
root@arm-64:~# 

But still not working, Include ./OpenVFDService -t

Above, can you help me? Thanks.

@lChiehZ
Copy link
Author

lChiehZ commented Aug 4, 2021

BTW, It works fine when I use CoreELEC-Amlogic-ng.arm-19.2-Matrix_rc2 With this vfd.conf:

vfd_gpio_clk='0,65,0'
vfd_gpio_dat='0,64,0'
vfd_gpio_stb='0,0,0xFF'
vfd_chars='0,4,3,2,1'
vfd_dot_bits='0,1,3,2,4,5,6'
vfd_display_type='0x00,0x00,0x00,0x06'

@arthur-liberman
Copy link
Owner

As I mentioned in the other issue with a similar problem, I've not tested this on 5.x kernel in general, nor on Armbian specifically.
Maybe they have the pins mapped differently in the new/mainline kernel and that's why it doesn't work, I don't really know.

@lChiehZ
Copy link
Author

lChiehZ commented Aug 5, 2021

As I mentioned in the other issue with a similar problem, I've not tested this on 5.x kernel in general, nor on Armbian specifically.
Maybe they have the pins mapped differently in the new/mainline kernel and that's why it doesn't work, I don't really know.

Thank you Arthur! I carefully compared the GPIO mapping between the two systems, and there are indeed some differences, and now I have successfully lit up the LCD screen!
WechatIMG20

Thank you very much!

@danboid
Copy link

danboid commented Aug 6, 2021

Hi @lChiehZ

Could you please share your working config file or explain how you worked out the correct values? I have got a X96 Air running Manjaro that I failed to get working with openvfd, even tho it works fine with openelec.

Thanks

@Jeebus678
Copy link

@lChiehZ Bumping this thread to see if you can post your findings. Curious as well.

@danboid
Copy link

danboid commented Dec 24, 2021

@Jeebus678 see the post from 16th Oct from chbgdn in #8 . I've not tried it yet but please let us know if it works for you.

@lChiehZ
Copy link
Author

lChiehZ commented Dec 24, 2021

Hi @danboid @Jeebus678

Sorry I'm just seeing it now, I don't have the equipment in my hands right now, but I can tell you the points that need attention.
For example, in the dtb file

leds {
    compatible = "gpio-leds";
    status = "okay";
    sys_led {
        label = "sys_led";
        gpios = <0x75 0x0b 0x00>; //0x75 is the phandle for bank@14, note to modify your own
        default-state = "on";
        linux,default-trigger = "default-on";
    };
};

The above code is correct to display the power light normally.

Then check the GPIO mapping of your own device, e.g.
This conf works fine in CoreELEC, the

vfd_gpio_clk='0,65,0'
vfd_gpio_dat='0,64,0'

so check what gpio pins 65 and 64 are in CoreELEC.
Finally, find the corresponding pins in the system you need to use
For example, the last conf I used was.

vfd_gpio_clk='0,64,0'
vfd_gpio_dat='0,63,0'
vfd_gpio_stb='0,0,0xFF'
vfd_chars='0,4,3,2,1'
vfd_dot_bits='0,1,3,2,4,5,6'
vfd_display_type='0x00,0x00,0x00,0x06'

Good luck!

@Jeebus678
Copy link

Jeebus678 commented Dec 24, 2021

@lChiehZ

Thank you for the reply. I am trying to work the vfd on a tx mini 3, which is different although I imagine the idea is the same. I'm having trouble mapping the GPIOs. How do I figure out what pins are in charge of the 7-segment, and once I have that declared within my DTB and/or my vfd.conf, how do I actually write to the LCD? Thanks.

@arthur-liberman
Copy link
Owner

Closing due to lack of activity. Please let me know if you still have an issue with the latest commits pushed recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants