Successfully enabled the front-panel LCD on QNAP TVS-h874X running Ubuntu 24.04 LTS.
- Model: QNAP TVS-h874X
- Chip: IT8528 Embedded Controller (Chip ID: 0x5571)
- LCD: 16x2 character display via A78 protocol
- Serial Port: /dev/ttyS1 at 0x02F8, IRQ 3, 1200 baud
On non-QTS operating systems (Ubuntu, TrueNAS, etc.), the LCD exists at /dev/ttyS1 but doesn't respond to commands. The IT8528 Super I/O configuration registers need to be initialized.
Initialize IT8528 LDN 0x02 (UART B) registers to enable COM2/LCD communication.
LDN 0x02 (UART B / COM2 / LCD):
CR30: 0x01 (Activate)
CR60: 0x02 (Base address high)
CR61: 0xF8 (Base address low) → 0x02F8
CR70: 0x03 (IRQ 3)
CR71: 0x02 (IRQ mode)
CR74: 0x04 (Configuration)
CR75: 0x04 (Configuration)
- init_it8528_lcd.c - IT8528 initialization program
- lcd_write.sh - Simple script to write to LCD (includes init)
- dump_ldn02_full.c - Dump IT8528 LDN 0x02 registers (diagnostic)
gcc -O2 -o init_it8528_lcd init_it8528_lcd.c
gcc -O2 -o dump_ldn02_full dump_ldn02_full.csudo ./init_it8528_lcd
# Initialize LCD (send backlight commands multiple times)
for i in {1..3}; do
sudo bash -c 'printf "\x4d\x5e\x01" > /dev/ttyS1'
sleep 0.5
done
# Write to LCD
sudo bash -c 'printf "\x4d\x0c\x00\x10Hello Ubuntu " > /dev/ttyS1'
sudo bash -c 'printf "\x4d\x0c\x01\x10Line 2 Text " > /dev/ttyS1'sudo hexdump -C /dev/ttyS1Press Enter/Select buttons on front panel:
53 05 00 01= Enter pressed53 05 00 00= Enter released53 05 00 02= Select pressed53 05 00 00= Select released
Serial: /dev/ttyS1 at 1200 baud, 8N1
Commands:
- Backlight on:
0x4D 0x5E 0x01 - Backlight off:
0x4D 0x5E 0x00 - Write line 0:
0x4D 0x0C 0x00 0x10+ 16 chars (pad with spaces) - Write line 1:
0x4D 0x0C 0x01 0x10+ 16 chars (pad with spaces)
Button input (from LCD):
- Format:
0x53 0x05 [button_id] [state] - Enter: button_id=0x00, Select: button_id=0x02
- State: 0x01=pressed, 0x00=released
- No qnap8528 driver needed for LCD functionality
- BIOS initializes IT8528 on Ubuntu - registers already set correctly
- LCD needs multiple backlight commands on first use to "wake up"
- 16x2 display = very limited space for info
- QNAP TVS-h874X
- Ubuntu 24.04 LTS (live USB)
- Kernel: 6.8.0-51-generic
- @dynek - IT8528 initialization discovery
- @zopieux - A78 protocol documentation
- @tobetter - qnap8528 kernel driver
This should work on other QNAP models with IT8528 chip. Check with:
sudo ./dump_ldn02_fullIf you see Chip ID 0x5571 and similar register layout, it should work.