|
|
@@ -11,6 +11,24 @@ actual board (see `linux/README.md`), and the review in
|
|
|
driver. The DRM driver, keys and device tree overlay are still untested on
|
|
|
hardware.
|
|
|
|
|
|
+**Later on 2026-11-10:** the full UI ran on the real panel (`radio-i2c --host`),
|
|
|
+which led to three fixes:
|
|
|
+
|
|
|
+- **Cursor block.** A memory write turns the controller's cursor on even when
|
|
|
+ the DISP ON attributes say off (REG[0Ah] note in the hardware spec), leaving
|
|
|
+ a block at the last write position. The core now re-sends DISP ON after any
|
|
|
+ update that wrote VRAM while the display is on (12 I²C bytes). The simulator
|
|
|
+ models the behaviour and the tests check that the cursor stays off and that
|
|
|
+ an update while blanked does not switch the display back on.
|
|
|
+- **Text.** Gray glyph edges looked smeared at 2 bpp, so text is now drawn in
|
|
|
+ plain black and white with full hinting (`UI_TEXT_ANTIALIAS` overrides this
|
|
|
+ at build time). The small and log fonts became Verdana and Andale Mono
|
|
|
+ (Microsoft core fonts), with Liberation as the fallback. The log has 7 rows
|
|
|
+ of 10 px, leaving room for Polish accents.
|
|
|
+- **DRM backlight.** The driver now registers a `radio-backlight` backlight
|
|
|
+ device for the expander's P1.0 pin, driven from the flush worker, so the
|
|
|
+ frontend's default sysfs path works. Still compiled only.
|
|
|
+
|
|
|
## 1. Summary
|
|
|
|
|
|
The LPC1114 is replaced by software on the Linux board, with the S1D13700 LCD
|
|
|
@@ -124,7 +142,8 @@ Atomic KMS driver modelled on the in-tree `st7571-i2c`, built against 6.18. Plan
|
|
|
updates convert damage into a pending frame; a worker sends it, merging anything
|
|
|
that arrives meanwhile. Messages are capped at 1025 bytes (about 23 ms) so other
|
|
|
devices on the bus get a turn, and the adapter's `max_write_len` is honoured.
|
|
|
-Offers XRGB8888 and fbdev emulation, with counters in debugfs. Size, depth and
|
|
|
+Offers XRGB8888 and fbdev emulation, with counters in debugfs, and a
|
|
|
+`radio-backlight` backlight device for P1.0. Size, depth and
|
|
|
TC/R are module parameters.
|
|
|
|
|
|
### Device tree (`linux/dts/radio-panel.dts`)
|
|
|
@@ -137,13 +156,14 @@ Binds U1 to the driver, U2 to `gpio-pca953x`, and defines `radio-keys` and
|
|
|
|
|
|
| Update (240×160, 2 bpp, 400 kHz) | I²C bytes | Bus time | Source |
|
|
|
|---|---|---|---|
|
|
|
-| One 8×13 digit | 157 | 3.6 ms | test suite |
|
|
|
-| Full frame | 38 462 (38 messages) | 866 ms | test suite |
|
|
|
+| One 8×13 digit | 169 | 3.8 ms | test suite |
|
|
|
+| Full frame | 38 474 (38 messages) | 867 ms | test suite |
|
|
|
| Stopped screen from blank | 2 779 | 63 ms | window, real MPD |
|
|
|
| Typical small update | 113-177 | 2.6-4.0 ms | window, fake MPD |
|
|
|
|
|
|
These are calculated from the bytes sent, assuming an ideal 400 kHz bus. Real
|
|
|
-timing will be slower.
|
|
|
+timing will be slower. Every update that writes VRAM includes 12 bytes for
|
|
|
+re-sending DISP ON (the cursor fix); the last two rows predate it.
|
|
|
|
|
|
## 6. Verification performed
|
|
|
|
|
|
@@ -166,13 +186,12 @@ real MPD with key presses, to avoid changing playback.
|
|
|
|
|
|
These can only be settled with hardware.
|
|
|
|
|
|
-- **TCA9539 write behaviour.** The whole stream relies on writes toggling within
|
|
|
- the register pair. The datasheet text I confirmed describes this for reads.
|
|
|
- Everything else depends on it, so test it first.
|
|
|
-- **Panel geometry.** 240×160 is an assumption. The sources disagree: the LPC UI
|
|
|
- assumes 240×168 but sets 160 lines, and the AVR's C/R=79 implies 320 px.
|
|
|
+- ~~**TCA9539 write behaviour.**~~ Writes toggle within the register pair:
|
|
|
+ the panel works, so the stream is sound.
|
|
|
+- ~~**Panel geometry.**~~ Confirmed 240×160 on 2026-11-10.
|
|
|
- **TC/R and frame rate.** 162 is taken from the AVR's working 2 bpp setup.
|
|
|
-- **Pixel polarity and how the gray levels look.**
|
|
|
+- ~~**Pixel polarity.**~~ Confirmed. Gray levels show, but text looks better
|
|
|
+ without them (see the update at the top).
|
|
|
- **Flicker.** The datasheet recommends display memory access during blanking,
|
|
|
which can't be synchronised over I²C. The existing firmware doesn't either.
|
|
|
- **A0 timing margin.** The conservative extra cycle may be removable, saving
|
|
|
@@ -203,10 +222,11 @@ cost on the board.
|
|
|
## 9. Remaining work
|
|
|
|
|
|
**Phase 0: bring-up (needs an adapter or the SoC)**
|
|
|
-- [ ] Wire U1 and the LCD, confirm 3.3 V logic
|
|
|
+- [x] Wire U1 and the LCD (USB I²C bridge on the dev PC)
|
|
|
- [ ] Capture one write on a logic analyzer: pair toggling, WR#/A0 order
|
|
|
-- [ ] `--pattern geometry`: find the real size, fix defaults and the UI layout
|
|
|
-- [ ] `--pattern gray`: confirm polarity and levels; tune `--tcr`
|
|
|
+- [x] `--pattern geometry`: 240×160 confirmed
|
|
|
+- [x] `--pattern gray`: polarity confirmed
|
|
|
+- [ ] Tune `--tcr` (flicker, frame rate)
|
|
|
- [ ] Decide whether the A0 extra cycle can go
|
|
|
|
|
|
**Phase 1: keys and backlight**
|
|
|
@@ -220,7 +240,8 @@ cost on the board.
|
|
|
- [ ] Add a systemd unit with restart and `WatchdogSec` (the firmware had a watchdog; the app has no `sd_notify` yet)
|
|
|
- [ ] Measure CPU load and real update times
|
|
|
- [ ] Decide on volume control (section 11)
|
|
|
-- [ ] Tune font sizes and layout on the real panel
|
|
|
+- [ ] Tune font sizes and layout on the real panel (started: fonts, no antialiasing, log rows)
|
|
|
+- [ ] Install the Microsoft core fonts (Verdana, Andale Mono) or accept the Liberation fallback
|
|
|
|
|
|
**Phase 3: DRM (only if upgrading)**
|
|
|
- [ ] Upgrade the kernel; build the module for the target
|
|
|
@@ -244,6 +265,10 @@ cost on the board.
|
|
|
- Only XRGB8888 is exposed by the driver; gray conversion is a plain threshold with no dithering.
|
|
|
- The layout assumes 240×160; other sizes need its constants changed.
|
|
|
- `SLEEP` power save is not used; blanking is display-off only.
|
|
|
+- The overlay's `gpio-backlight` node (U2 P1.5) and the DRM driver (U1 P1.0)
|
|
|
+ both want the name `radio-backlight`. Only one may exist: drop the node from
|
|
|
+ the overlay if the backlight stays on U1, or the driver's registration if it
|
|
|
+ moves to U2.
|
|
|
- The window's log pane shows only application messages unless `--kmsg` is given, and then shows the desktop's log rather than the radio's.
|
|
|
|
|
|
## 11. Open questions
|