Skip to content

SM8550: switch Pocket DS lower panel to mainline ST7703 driver#3051

Open
Azkali wants to merge 3 commits into
ROCKNIX:nextfrom
Azkali:azkali/pocketds-lower-panel-st7703
Open

SM8550: switch Pocket DS lower panel to mainline ST7703 driver#3051
Azkali wants to merge 3 commits into
ROCKNIX:nextfrom
Azkali:azkali/pocketds-lower-panel-st7703

Conversation

@Azkali

@Azkali Azkali commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

The AYANEO Pocket DS lower panel is currently carried as an auto-generated
standalone driver (patches/linux/0053-gpu-panel-add-Pocket-DS-lower-panel-driver.patch
panel-ar11-5inch.c, CONFIG_DRM_PANEL_AR11_5INCH) with a FIXME author
that never identified the DDIC. It is a Sitronix ST7703, and this PR replaces
the bespoke driver with an extension of the in-tree panel-sitronix-st7703
driver — the same pattern the anbernic / powkiddy / gameforce ST7703 panels
already use upstream.

DDIC identification (Sitronix ST7703)

The generated init sequence is an ST7703 manufacturer command set:

  • 0xB9 f1 12 87SETEXTC unlock. B9 F1 12 is the canonical ST7703 key;
    the trailing byte is a vendor variant (0x87 here vs the usual 0x83), kept
    verbatim.
  • 0xBA SETMIPI, 0xB3 SETRGBIF, 0xC0 SETSCR, 0xC1 SETPOWER,
    0xE0 SETGAMMA, 0xE9/0xEA SETGIP1/2 — every opcode maps 1:1 to an
    ST7703_CMD_* in panel-sitronix-st7703.c.
  • The SETMIPI and SETRGBIF payloads are near-identical to the already
    supported Powkiddy RGB10MAX3 ST7703 panel.

What changed

  • Panel driver: drop the generated standalone driver; add
    ayaneo,pocket-ds-lower-panel to panel-sitronix-st7703.c (init sequence,
    mode, st7703_panel_desc, of_match entry, plus one ST7703_CMD_UNKNOWN_E1
    define) and to the rocktech,jh057n00900.yaml binding enum.
  • Device tree (qcs8550-ayaneo-pocketds.dts): re-model the panel rails to the
    ST7703 driver contract — avdd-supplyvcc-supply (same SGM3804
    panel-avdd charge pump), and the former enable-gpio becomes a fixed
    regulator referenced as iovcc-supply (modelled like the existing vdd_ts
    regulator). reset-gpios, rotation = <270>, backlight and the port
    endpoint are unchanged.
  • Kernel config (linux.aarch64.conf): enable
    CONFIG_DRM_PANEL_SITRONIX_ST7703, drop CONFIG_DRM_PANEL_AR11_5INCH.

Validation

Validated on real Pocket DS hardware: both screens light up, the lower panel
comes up at 768x1024@60 driven by sitronix-st7703 (rails re-modelled to the
vcc/iovcc contract).

Notes for reviewers

  • Kernel patch verified against the exact source this device builds (Linux
    7.1.2, per projects/ROCKNIX/packages/linux/package.mk): git apply --check
    applies with zero offset/fuzz to the pristine panel-sitronix-st7703.c and
    rocktech,jh057n00900.yaml. No other SM8550 patch touches either file, so it
    applies at patch-time as well.
  • The iovcc regulator level is set to the ST7703 IOVCC nominal (1.8 V); it
    gates the same expander GPIO the old enable-gpio drove and wants a final
    confirmation against the board schematic.

Alexandre Hamamdjian added 3 commits July 23, 2026 18:21
The lower panel was carried as a generated standalone driver
(panel-ar11-5inch.c, DRM_PANEL_AR11_5INCH) with a FIXME author that did
not identify the DDIC. Its init sequence is in fact a Sitronix ST7703
command set: SETEXTC 0xB9 unlock (f1 12 87), SETMIPI 0xBA, SETRGBIF,
SETGIP1/2 0xE9/0xEA, every opcode mapping 1:1 to panel-sitronix-st7703,
with the SETMIPI/SETRGBIF payloads near-identical to the Powkiddy
RGB10MAX3.

Replace the bespoke driver with an extension of the in-tree
sitronix-st7703 driver: add the ayaneo,pocket-ds-lower-panel compatible,
init sequence, mode and desc, plus the binding enum entry. This is the
same pattern the anbernic/powkiddy/gameforce ST7703 panels already use.

Validated on real Pocket DS hardware: the lower panel comes up at
768x1024@60 driven by sitronix-st7703.

Signed-off-by: Alexandre Hamamdjian <azkali.limited@gmail.com>
The lower panel is now driven by sitronix-st7703 via the
"ayaneo,pocket-ds-lower-panel" compatible. That driver's DT contract is
vcc-supply + iovcc-supply + reset-gpios, not the generator's avdd + an
enable-gpio, so re-express the wiring:

  - vcc-supply   -> the SGM3804 charge pump (the "panel-avdd" rail),
  - iovcc-supply -> a fixed regulator wrapping the expander GPIO that
                    previously drove enable-gpio,
  - reset-gpios  -> unchanged.

The enable line only gates a board rail, so modelling it as a fixed
regulator (as vdd_ts already does for the touch controller) keeps the
prepare/enable ordering the vendor driver relied on. The iovcc level is
the ST7703 IOVCC nominal and should be confirmed on hardware.

Signed-off-by: Alexandre Hamamdjian <azkali.limited@gmail.com>
The lower panel now uses the mainline sitronix-st7703 driver instead of
the removed standalone panel-ar11-5inch.c, so enable
CONFIG_DRM_PANEL_SITRONIX_ST7703 and drop the now-nonexistent
CONFIG_DRM_PANEL_AR11_5INCH.

Signed-off-by: Alexandre Hamamdjian <azkali.limited@gmail.com>
@Azkali
Azkali marked this pull request as ready for review July 23, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant