|
|
@@ -9,7 +9,8 @@ PC with a USB I²C bridge or a simulated panel in a window.
|
|
|
|
|
|
The panel core (C), its simulator and the DRM driver are a separate
|
|
|
repository, [s1d13700-tca](../s1d13700-tca), included here as the git
|
|
|
-submodule `panel/`.
|
|
|
+submodule `panel/`. The keys' wiring and device tree are in
|
|
|
+[radio-keyboard-tca](../radio-keyboard-tca), the submodule `keyboard/`.
|
|
|
|
|
|
| Path | What |
|
|
|
|---|---|
|
|
|
@@ -18,6 +19,7 @@ submodule `panel/`.
|
|
|
| `radio-ui` | Starts the application |
|
|
|
| `tests/` | Application tests, a fake MPD server and `hw_test.sh` |
|
|
|
| `panel/` | Submodule: s1d13700-tca (panel core, simulator, DRM driver, device tree overlay) |
|
|
|
+| `keyboard/` | Submodule: radio-keyboard-tca (key expander wiring, device tree overlay) |
|
|
|
| `docs/REPORT.md` | The port from the LPC1114 firmware: decisions, verification, history |
|
|
|
|
|
|
## Building
|
|
|
@@ -33,7 +35,8 @@ submodule `panel/`.
|
|
|
`PANEL_DIR=/path/to/s1d13700-tca` uses another checkout of the panel
|
|
|
repository instead of the submodule (`make`, `tests/hw_test.sh` and the tests
|
|
|
all read it). The key tests check `radio/keypad.py` and `radio/platform.py`
|
|
|
-against its `dts/radio-panel.dts`.
|
|
|
+against `dts/radio-keys.dts` in radio-keyboard-tca; `KEYBOARD_DIR` points
|
|
|
+them at another checkout of it.
|
|
|
|
|
|
The application runs on Python 3.7.3 (Debian buster) to 3.14 and needs
|
|
|
PyGObject with GLib, Pango and PangoCairo, pycairo and its PyGObject bridge;
|
|
|
@@ -116,7 +119,8 @@ U2 on the bus the DRM panel is on; `--keys-bus N` names another bus and
|
|
|
autorepeat like gpio-keys (250 ms, then every 33 ms; the app's 300 ms lockout
|
|
|
applies). Keys held at start are ignored until released, and a reading with
|
|
|
more than 3 keys down is taken as a bus fault, so a fault cannot send player
|
|
|
-commands. Do not load the overlay's U2 node while doing this.
|
|
|
+commands. Do not load the U2 node (`keyboard/dts/radio-keys.dts`) while doing
|
|
|
+this.
|
|
|
|
|
|
### Test mode: real panel, PC keyboard
|
|
|
|
|
|
@@ -180,24 +184,11 @@ whatever `--input` names. On the PC without the U2 keypad:
|
|
|
| P1.5 | CS# (held low after reset; was hardwired low on the old board) | CS0 |
|
|
|
| P1.6-7 | spare | |
|
|
|
|
|
|
-**U2, TCA9539 at 0x76** (A1=H, A0=L): polled by `radio-ui i2c`, or stock
|
|
|
-`gpio-pca953x` with the device tree (`panel/dts/`)
|
|
|
-
|
|
|
-Keys are active high: each pin has a pull-down (the TCA9539 has no internal
|
|
|
-ones) and its key connects it to the supply. `INT` is not connected on the USB
|
|
|
+**U2, TCA9539 at 0x76** (A1=H, A0=L), the keys: polled by `radio-ui i2c`, or
|
|
|
+stock `gpio-pca953x` and `gpio-keys` with the device tree. Pin map, key codes
|
|
|
+and overlay are in `keyboard/README.md`. `INT` is not connected on the USB
|
|
|
test board, so the keys are polled there; on the Orange Pi Zero it is on PA6.
|
|
|
|
|
|
-| Pin | Key | Pin | Key |
|
|
|
-|---|---|---|---|
|
|
|
-| P0.0-2 | unused (pull-down) | P1.0 | Esc |
|
|
|
-| P0.3 | Next | P1.1 | OK |
|
|
|
-| P0.4 | Left | P1.2 | Menu |
|
|
|
-| P0.5 | Down | P1.3 | List |
|
|
|
-| P0.6 | Up | P1.4 | Stop |
|
|
|
-| P0.7 | Right | P1.5 | Pause |
|
|
|
-| | | P1.6 | Play |
|
|
|
-| | | P1.7 | Prev |
|
|
|
-
|
|
|
## On the Orange Pi Zero
|
|
|
|
|
|
The radio's kernel, U-Boot and board device tree are built by the OPi0
|
|
|
@@ -205,8 +196,8 @@ project (`build-kernel.sh`), which copies the driver from the s1d13700-tca
|
|
|
repository and builds it in, together with `gpio-pca953x` and `gpio-keys`
|
|
|
for U2. There `radio-ui drm` finds the panel and the `radio-keys` input
|
|
|
device by itself. The backlight and input device permissions (udev rule,
|
|
|
-`video` and `input` groups) are described in `panel/README.md` and the OPi0
|
|
|
-README.
|
|
|
+`video` and `input` groups) are described in `panel/README.md`,
|
|
|
+`keyboard/README.md` and the OPi0 README.
|
|
|
|
|
|
On a kernel without the driver (Armbian 4.19), use `radio-ui i2c --bus 1`;
|
|
|
set the bus to 400 kHz (`clock-frequency` on i2c1), the mv64xxx default of
|