Input: add support for OnePlus/OPPO Pad pogo-pin keyboards
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest2 patches 0 repliesNew
- v72 patches 4 repliesSuperseded
- v62 patches 3 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 2 patches | 0 replies | Superseded | |
| v4 | 2 patches | 4 replies | Superseded | |
| v3 | 2 patches | 1 reply | Superseded | |
| v2 | 2 patches | 4 replies | Superseded | |
| v1 | 2 patches | 1 reply | Superseded |
Changes in v3 from the cover letter
- the compatible names the tablet project the pogo port belongs to (oneplus,caihong- / erhai- / iceland-pogo-keyboard, the codenames used by the vendor trees), and the driver carries a per-project description in the OF match data: feature flags gate each 0x3A general sub-command (caihong, sm8650 era, has no wake notification and no backlight; erhai, sm8750 era, adds the wake notification; iceland, sm8850 era, adds the keyboard backlight), while the touchpad geometry and the per-brand product names are per-project constants - the wake notification is skipped and the backlight LED only registered where supported;
- the touchpad geometry and product names are no longer DT properties:
they are fixed per project and live in the driver; the common touchscreen properties (touchscreen-size-x/y, touchscreen-x-mm/y-mm) remain as an optional override, parsed with touchscreen_parse_properties(), for the unlikely case of a variant.
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | dt-bindings: input: add OnePlus pogo-pin keyboardDocumentation/ MAINTAINERS | +84 | 0 replies | |
| 2/2 | Input: add OnePlus/OPPO Pad pogo-pin keyboard serdev driverMAINTAINERS drivers/ drivers/ +1 more | +1287 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Yibo Wang |
|---|---|
| 1/2 | |
| 2/2 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 0/2] Input: add support for OnePlus/OPPO Pad pogo-pin keyboards
From: Yibo Wang <[email protected]>
This series adds support for the magnetic pogo-pin smart keyboards of the OnePlus Pad 3 Pro / Pad 4 and the OPPO Pad 5 Pro. The keyboard is built around a Tinno MCU attached to a tablet UART. Both sides share a single data wire, so the host gates its transmission onto the bus with a PMIC GPIO for the duration of a frame, and every host frame is echoed back on RX.
The MCU speaks a framed "one wire bus" protocol over the half-duplex 921600 8N1 UART: 8x 0x55 preamble, 0xF1, src/dst addresses, command, length, payload, CRC16-IBM (poly 0x8005, init 0xC596), 0xFE and 4x 0xAA. The protocol was reverse engineered from the vendor kernel driver; this is a clean-room serdev reimplementation that replaces the downstream platform driver, which depends on a private msm_geni_serial callback and a user-space held tty fd.
The core protocol (framing, keys, touchpad, sync/heartbeat) has been carried unchanged across four SoC generations of these keyboards, from the sm8550 era to the sm8850 ones covered here; only the 0x3A general sub-commands grew over time. Patch 1 adds the DT binding, patch 2 the driver.
Changes in v8, addressing Dmitry Torokhov's and Krzysztof Kozlowski's comments:
- the power handling now covers both vendor models: an optional vdd-supply regulator and an optional enable-gpios pin, powered up in that order and down in reverse, with either or both allowed to be absent;
- renamed power-gpios to enable-gpios to say what the pin does;
- reworded the compatible description so it needs no block scalar (Rob's comment on v7).
Changes in v7, addressing Krzysztof Kozlowski's comments:
- dropped the touchscreen size/mm properties from the binding as
agreed: the touchpad geometry is per-project driver data and neither the binding documents it nor the driver parses it from DT;
- moved the MAINTAINERS entry to its alphabetical place, after ONENAND;
Changes in v5, addressing Rob Herring's comments on the binding:
- dropped the block scalar from the top-level description;
- rewrapped the descriptions to stay within 75 columns;
- restored the serial parent node in the example.
Changes in v4, after Krzysztof Kozlowski's comment that the binding describes the keyboard rather than the MCU (wording only, no functional change):
- the binding description and the commit messages now describe the keyboard (built around the Tinno MCU) instead of the MCU itself, and spell out that a keyboard is a fixed physical device, so the touchpad geometry and the product names are per-compatible constants in the driver.
Changes in v3:
- the compatible names the tablet project the pogo port belongs to (oneplus,caihong- / erhai- / iceland-pogo-keyboard, the codenames used by the vendor trees), and the driver carries a per-project description in the OF match data: feature flags gate each 0x3A general sub-command (caihong, sm8650 era, has no wake notification and no backlight; erhai, sm8750 era, adds the wake notification; iceland, sm8850 era, adds the keyboard backlight), while the touchpad geometry and the per-brand product names are per-project constants - the wake notification is skipped and the backlight LED only registered where supported;
- the touchpad geometry and product names are no longer DT properties:
they are fixed per project and live in the driver; the common touchscreen properties (touchscreen-size-x/y, touchscreen-x-mm/y-mm) remain as an optional override, parsed with touchscreen_parse_properties(), for the unlikely case of a variant.
Changes in v2:
- dropped the redundant "binding" from the dt-bindings subject;
- replaced the custom oneplus,touchpad-xy-max/-resolution properties with the common touchscreen properties;
- dropped the serial wrapper node from the binding example;
- the MAINTAINERS entry added with the binding references only the binding file; the driver F: line is added together with the driver patch.
Tested on the OnePlus Pad 4 (iceland) running Linux 7.2.0-sm8850 (v7.2-based iceland tree).
Yibo Wang (2):
dt-bindings: input: add OnePlus pogo-pin keyboard
Input: add OnePlus/OPPO Pad pogo-pin keyboard serdev driver
.../bindings/input/oneplus,pogo-keyboard.yaml | 78 ++ MAINTAINERS | 7 + drivers/input/keyboard/Kconfig | 13 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/oneplus-pogo-kbd.c | 1272 ++++++++++++++++++++ 5 files changed, 1371 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/oneplus,pogo-keyboard.yaml create mode 100644 drivers/input/keyboard/oneplus-pogo-kbd.c
Signature · 1 line
2.53.0