POGO keyboard cover (EF-DT860): STM32 keyboard + touchpad over I2C #8

Open
opened 2026-08-21 06:04:34 +00:00 by kit · 0 comments
Owner

Support for the Book Cover Keyboard that attaches to the POGO pins. Blocked on hardware — nobody has the accessory yet, so none of this is testable. Filed so the recon isn't redone.

Accessory is named in the downstream DT: stm32,model_name = "EF-DT860".

Transport — plain I2C, AP-side (no SSC/hypervisor wall)

From sm8150-sec-gts6l-input-common.dtsi:

  • STM32L0 MCU at 0x2A on qupv3_se8_i2c — upstream mainline already has this controller as i2c8: i2c@a80000 in sm8150.dtsi; our board DTS doesn't enable it yet, so it's an enable + pinctrl job, not a new bus.
  • IRQ: tlmm 124 (stm32,irq_gpio), pinctrl keypad_int_active
  • Power: stm32_vddo-supply = <&pogo_kbd_ldo_en> (+ pogo_kbd_ldo_en_active)
  • stm32,sda_gpio = <&tlmm 88>, stm32,scl_gpio = <&tlmm 89> — Samsung bitbangs these for MCU firmware update/recovery; not needed for normal operation.

Downstream driver stack (~4.3k lines, drivers/input/keyboard/stm/stm32l0/)

file lines role
stm32_pogo_i2c.c 2115 transport, hotplug/attach notifier, MCU FW update, factory sysfs
stm32_pogo_keyboard.c 567 plain EV_KEY input device (MSC_SCAN + keycode table)
stm32_pogo_touchpad.c 586 plain input_mt device (input_mt_slot, MT_TOOL_FINGER, BTN_LEFT/BTN_TOUCH)

Both child drivers use stock Linux input APIs and should port near-verbatim — same shape as the fts1ba90a touchscreen port, without the display complexity. Much of the 2115-line core (MCU firmware update, factory self-test sysfs) can be dropped for a first cut.

The real unknown: the POGO FPGA

sm8150-sec-gts6l-input-common.dtsi also has pogo_fpga@1 on qupv3_se18_spi:

  • fpga,gpio_cdone = <&tlmm 108>, fpga,gpio_crst_b = <&tlmm 58>, gpio_reset = <&tlmm 57>, bitbang miso/mosi/spi_clk/cs = tlmm 23/24/25/26
  • fpga,fw_name = "fpga/pogo_gts5l.fw"

It is not optional: stm32_pogo_i2c.c calls fpga_rstn_control(), fpga_rstn_high() and fpga_fw_download() on its attach/reset paths under CONFIG_POGO_FPGA (defconfig has CONFIG_POGO_FPGA=y, CONFIG_USE_POGO=y).

Two things in our favour:

  1. CDONE / CRESET_B naming is textbook Lattice iCE40, and mainline already ships drivers/fpga/ice40-spi.c (lattice,ice40-fpga-mgr) — bitstream loading may be native rather than a port.
  2. The blob should be extractable from the stock vendor partition, which we already mount at /firmware/vendor (TODO: confirm fpga/pogo_gts5l.fw is present — quick check, not yet done).

Other pieces

  • CONFIG_MUIC_SUPPORT_KEYBOARDDOCK=y — dock detection runs partly through the SM5705 MUIC, and we already have sm5705 extcon in the tree.
  • Hall-IC event path (POGO_NOTIFIER_EVENTID_HALL) releases all keys when the cover is closed.
  • Defconfig: CONFIG_KEYBOARD_STM32_POGO=y, CONFIG_POGO_FPGA=y, CONFIG_USE_POGO=y.

Plan when hardware exists

  1. Confirm fpga/pogo_gts5l.fw is in the vendor partition; add to the no-blob link-farm.
  2. Enable i2c8 + pinctrl in our DTS; add the stm32 node, LDO, IRQ; i2cdetect for 0x2A with the cover attached.
  3. Try mainline ice40-spi for the bitstream; fall back to porting Samsung's bitbang sequence.
  4. Port the keyboard and touchpad children; strip FW-update/factory code.
  5. Wire attach/detach (MUIC extcon or the driver's own polling) and the hall path.

Estimate: 1–2 sessions if the FPGA cooperates, 3 if it needs its own bring-up.

Support for the Book Cover Keyboard that attaches to the POGO pins. **Blocked on hardware — nobody has the accessory yet, so none of this is testable.** Filed so the recon isn't redone. Accessory is named in the downstream DT: `stm32,model_name = "EF-DT860"`. ## Transport — plain I2C, AP-side (no SSC/hypervisor wall) From `sm8150-sec-gts6l-input-common.dtsi`: - **STM32L0 MCU at 0x2A on `qupv3_se8_i2c`** — upstream mainline already has this controller as `i2c8: i2c@a80000` in `sm8150.dtsi`; our board DTS doesn't enable it yet, so it's an enable + pinctrl job, not a new bus. - IRQ: `tlmm 124` (`stm32,irq_gpio`), pinctrl `keypad_int_active` - Power: `stm32_vddo-supply = <&pogo_kbd_ldo_en>` (+ `pogo_kbd_ldo_en_active`) - `stm32,sda_gpio = <&tlmm 88>`, `stm32,scl_gpio = <&tlmm 89>` — Samsung bitbangs these for MCU firmware update/recovery; not needed for normal operation. ## Downstream driver stack (~4.3k lines, `drivers/input/keyboard/stm/stm32l0/`) | file | lines | role | |---|---|---| | `stm32_pogo_i2c.c` | 2115 | transport, hotplug/attach notifier, MCU FW update, factory sysfs | | `stm32_pogo_keyboard.c` | 567 | plain `EV_KEY` input device (`MSC_SCAN` + keycode table) | | `stm32_pogo_touchpad.c` | 586 | plain `input_mt` device (`input_mt_slot`, `MT_TOOL_FINGER`, `BTN_LEFT`/`BTN_TOUCH`) | Both child drivers use stock Linux input APIs and should port near-verbatim — same shape as the fts1ba90a touchscreen port, without the display complexity. Much of the 2115-line core (MCU firmware update, factory self-test sysfs) can be dropped for a first cut. ## The real unknown: the POGO FPGA `sm8150-sec-gts6l-input-common.dtsi` also has `pogo_fpga@1` on `qupv3_se18_spi`: - `fpga,gpio_cdone = <&tlmm 108>`, `fpga,gpio_crst_b = <&tlmm 58>`, `gpio_reset = <&tlmm 57>`, bitbang `miso/mosi/spi_clk/cs` = tlmm 23/24/25/26 - `fpga,fw_name = "fpga/pogo_gts5l.fw"` **It is not optional**: `stm32_pogo_i2c.c` calls `fpga_rstn_control()`, `fpga_rstn_high()` and `fpga_fw_download()` on its attach/reset paths under `CONFIG_POGO_FPGA` (defconfig has `CONFIG_POGO_FPGA=y`, `CONFIG_USE_POGO=y`). Two things in our favour: 1. `CDONE` / `CRESET_B` naming is textbook **Lattice iCE40**, and mainline already ships `drivers/fpga/ice40-spi.c` (`lattice,ice40-fpga-mgr`) — bitstream loading may be native rather than a port. 2. The blob should be extractable from the stock vendor partition, which we already mount at `/firmware/vendor` (**TODO: confirm `fpga/pogo_gts5l.fw` is present** — quick check, not yet done). ## Other pieces - `CONFIG_MUIC_SUPPORT_KEYBOARDDOCK=y` — dock detection runs partly through the SM5705 MUIC, and we already have sm5705 extcon in the tree. - Hall-IC event path (`POGO_NOTIFIER_EVENTID_HALL`) releases all keys when the cover is closed. - Defconfig: `CONFIG_KEYBOARD_STM32_POGO=y`, `CONFIG_POGO_FPGA=y`, `CONFIG_USE_POGO=y`. ## Plan when hardware exists 1. Confirm `fpga/pogo_gts5l.fw` is in the vendor partition; add to the no-blob link-farm. 2. Enable `i2c8` + pinctrl in our DTS; add the stm32 node, LDO, IRQ; `i2cdetect` for 0x2A with the cover attached. 3. Try mainline `ice40-spi` for the bitstream; fall back to porting Samsung's bitbang sequence. 4. Port the keyboard and touchpad children; strip FW-update/factory code. 5. Wire attach/detach (MUIC extcon or the driver's own polling) and the hall path. Estimate: 1–2 sessions if the FPGA cooperates, 3 if it needs its own bring-up.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kit/linux-gts6l#8
No description provided.