# wnotms/galaxy_tab_s9_linux architecture

> Architecture diagram of the GitHub repository wnotms/galaxy_tab_s9_linux, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wnotms/galaxy_tab_s9_linux
- Repository: https://github.com/wnotms/galaxy_tab_s9_linux

## Overview

This is a Galaxy Tab S9 Wi-Fi mainline-Linux bring-up workspace, combining board support and a minimal boot/userspace path with ongoing CPU-stall and trace-retention investigation. The documented user workflow is to boot the tablet, reach Debian over USB networking and SSH, and inspect or collect evidence; the repository also contains device-specific drivers and investigation tools. The README documents build and boot-bundle stages, but those delivery scripts are excluded here. Sampled source is partial, so uncertain internal wiring is omitted.

Main entry points: [`boot/gts9-minimal-pid1.c`](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-minimal-pid1.c) (Minimal PID 1), [`kernel/drivers/input/samsung-pogo/stm32_pogo_core_v3.c`](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_core_v3.c) (Pogo core), [`kernel/drivers/keyboard-samsung-pogo.c`](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/keyboard-samsung-pogo.c) (Pogo keyboard), [`scripts/wedge-evidence.py`](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/wedge-evidence.py) (Stall evidence tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and userspace"]
  node_pid1["Minimal PID 1"]
  node_default_exec["Default init"]
  node_reboot_mode["Reboot mode<br/>[gts9-reboot-mode.c]"]
  node_rtc_offset["RTC correction<br/>[gts9-rtc-offset.c]"]
  node_power_key["Power-key helper<br/>[gts9-power-key.c]"]
end

subgraph group_hardware["Tablet hardware"]
  node_pogo_keyboard["Pogo keyboard"]
  node_pogo_core["Pogo core"]
  node_pogo_i2c["Pogo I2C"]
  node_pogo_firmware["Pogo firmware<br/>[stm32_pogo_fw.c]"]
  node_panel["Display panel"]
end

subgraph group_investigation["Stall investigation"]
  node_stall_tools["Stall evidence tools<br/>[wedge-evidence.py]"]
  node_trace_replay["Trace replay"]
  node_csd_trace["CSD trace prep"]
  node_lastactivity["Activity evidence"]
end

node_owner(("Device owner"))
node_tablet["SM-X710 tablet"]

node_tablet -->|"boots into"| node_pid1
node_pid1 -->|"selects default"| node_default_exec
node_pid1 -->|"checks mode"| node_reboot_mode
node_pid1 -->|"applies time"| node_rtc_offset
node_tablet -->|"provides input"| node_pogo_keyboard
node_pogo_keyboard -->|"uses protocol"| node_pogo_core
node_pogo_core -->|"communicates over"| node_pogo_i2c
node_pogo_core -->|"uses firmware operations"| node_pogo_firmware
node_tablet -->|"displays through"| node_panel
node_tablet -->|"provides key events"| node_power_key
node_owner -->|"boots and operates"| node_tablet
node_owner -->|"runs investigation"| node_stall_tools
node_stall_tools -->|"collects evidence from"| node_tablet
node_owner -->|"replays traces"| node_trace_replay
node_owner -->|"prepares trace"| node_csd_trace
node_owner -->|"checks activity"| node_lastactivity

click node_pid1 "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-minimal-pid1.c"
click node_default_exec "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-exec-default.c"
click node_reboot_mode "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-reboot-mode.c"
click node_rtc_offset "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-rtc-offset.c"
click node_power_key "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/rootfs-overlay/usr/libexec/gts9-power-key.c"
click node_pogo_keyboard "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/keyboard-samsung-pogo.c"
click node_pogo_core "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_core_v3.c"
click node_pogo_i2c "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_i2c_v3.c"
click node_pogo_firmware "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_fw.c"
click node_panel "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/panel-samsung-ana38407.c"
click node_stall_tools "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/wedge-evidence.py"
click node_trace_replay "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/bounded-trace-replay.py"
click node_csd_trace "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/prepare-csd-trace.py"
click node_lastactivity "https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/lastactivity-evidence.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pid1,node_default_exec,node_reboot_mode,node_rtc_offset,node_power_key toneBlue
class node_pogo_keyboard,node_pogo_core,node_pogo_i2c,node_pogo_firmware,node_panel toneAmber
class node_stall_tools,node_trace_replay,node_csd_trace,node_lastactivity toneMint
class node_owner,node_tablet toneIndigo
```

## Components

### Boot and userspace

- [Minimal PID 1](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-minimal-pid1.c): `boot/gts9-minimal-pid1.c`
- [Default init](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-exec-default.c): `boot/gts9-exec-default.c`
- [Reboot mode](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-reboot-mode.c): `boot/gts9-reboot-mode.c`
- [RTC correction](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/boot/gts9-rtc-offset.c): `boot/gts9-rtc-offset.c`
- [Power-key helper](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/rootfs-overlay/usr/libexec/gts9-power-key.c): `rootfs-overlay/usr/libexec/gts9-power-key.c`

### Tablet hardware

- [Pogo keyboard](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/keyboard-samsung-pogo.c): `kernel/drivers/keyboard-samsung-pogo.c`
- [Pogo core](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_core_v3.c): `kernel/drivers/input/samsung-pogo/stm32_pogo_core_v3.c`
- [Pogo I2C](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_i2c_v3.c): `kernel/drivers/input/samsung-pogo/stm32_pogo_i2c_v3.c`
- [Pogo firmware](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/input/samsung-pogo/stm32_pogo_fw.c): `kernel/drivers/input/samsung-pogo/stm32_pogo_fw.c`
- [Display panel](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/kernel/drivers/panel-samsung-ana38407.c): `kernel/drivers/panel-samsung-ana38407.c`

### Stall investigation

- [Stall evidence tools](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/wedge-evidence.py): `scripts/wedge-evidence.py`
- [Trace replay](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/bounded-trace-replay.py): `scripts/bounded-trace-replay.py`
- [CSD trace prep](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/prepare-csd-trace.py): `scripts/prepare-csd-trace.py`
- [Activity evidence](https://github.com/wnotms/galaxy_tab_s9_linux/blob/main/scripts/lastactivity-evidence.py): `scripts/lastactivity-evidence.py`

### Other components

- **Device owner**
- **SM-X710 tablet**

## Connections

- SM-X710 tablet → Minimal PID 1: boots into
- Minimal PID 1 → Default init: selects default
- Minimal PID 1 → Reboot mode: checks mode
- Minimal PID 1 → RTC correction: applies time
- SM-X710 tablet → Pogo keyboard: provides input
- Pogo keyboard → Pogo core: uses protocol
- Pogo core → Pogo I2C: communicates over
- Pogo core → Pogo firmware: uses firmware operations
- SM-X710 tablet → Display panel: displays through
- SM-X710 tablet → Power-key helper: provides key events
- Device owner → SM-X710 tablet: boots and operates
- Device owner → Stall evidence tools: runs investigation
- Stall evidence tools → SM-X710 tablet: collects evidence from
- Device owner → Trace replay: replays traces
- Device owner → CSD trace prep: prepares trace
- Device owner → Activity evidence: checks activity
