Тайлбар байхгүй

k4be b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
docs b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
driver b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
dts b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
sim b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
tests b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
.gitignore b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
Makefile b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө
README.md b0a757a133 Add Linux port of the radio front panel 2 долоо хоног өмнө

README.md

Linux port

Replaces the LPC1114 firmware: the panel and keys hang off I²C expanders on the Linux board. Nothing here has run on real hardware yet.

Path What
driver/s1d13700_core.* Panel core, used by everything: init, 2 bpp conversion, write planner, TCA9539 stream
driver/s1d13700_drm.c DRM driver (6.x kernels)
sim/ Model of the TCA9539 and S1D13700: decodes the I²C bytes and flags bus faults
app/ UI and MPD client, plus the frontends: main_gtk.c, main_i2c.c, main_drm.c
dts/radio-panel.dts Overlay for the keys, backlight and panel
tests/ Panel core tests and a fake MPD server

Building

make test          # panel core tests, no hardware or libraries
make gtk           # needs gtk+-3.0, cairo, pangocairo, libmpdclient
make target        # i2c-dev and DRM frontends; DRM also needs libdrm
make dtbo
make module KDIR=/path/to/kernel

Running

Window with the simulated panel, using a real MPD:

build/radio-gtk --host radio.lo

The window shows the simulator's display memory, and the traffic each update costs. Keys: Z X C V B for prev/play/pause/stop/next, arrows, Enter, Esc, M, L, Space for pause.

Real panel through i2c-dev, for bring-up or on a kernel too old for the driver:

build/radio-i2c --bus N --pattern geometry
build/radio-i2c --bus N --pattern gray
build/radio-i2c --bus N --host radio.lo

--bus must name a known adapter; motherboard and display buses are always refused. Only use the bus number of the adapter the panel is wired to.

Wiring

U1, TCA9539 at 0x74 (A1=L, A0=L), raw I²C client of the panel code

Pin Signal Module pin
P0.0-7 D0-D7 D0-D7
P1.0 Backlight enable (active high, assumed)
P1.1 RES# RST
P1.2 A0 A15
P1.3 WR# WE
P1.4 RD# RE
P1.5 CS# (held low after reset; was hardwired low on the old board) CS0
P1.6-7 spare

U2, TCA9539 at 0x75 (A1=L, A0=H), stock gpio-pca953x

Each key has its own pin to ground and a 10k pull-up (the TCA9539 has no internal ones). INT goes to a host GPIO with a pull-up.

Pin Key Pin Key
P0.0 Esc P1.0 Down
P0.1 Next P1.1 Pause
P0.2 Stop P1.2 OK
P0.3 Menu P1.3 Left
P0.4 List P1.4 Play
P0.5 Up P1.5 Backlight enable (active high, pull-down)
P0.6 Prev P1.6-7 spare
P0.7 Right

To confirm on hardware

  • The TCA9539 stays in the register pair across a long write (the whole stream depends on it)
  • Panel size: 240×160 is assumed; --pattern geometry shows the real one
  • TC/R (--tcr) for frame rate; 162 comes from the AVR project's 2 bpp setup
  • Pixel polarity (white = level 0 here)