Skip to content

arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support

Alexander Letuchiy linux-arm-kernel linux-devicetree linux-mediatek linux-serial lkml phone-devel 4 versions – New

Get series with b4
b4 am [email protected] change-id 20261110-initial-mt6895-16ef1b1aef55

Versions newest first

  1. v4 Latest6 patches 0 repliesNew
  2. v37 patches 9 repliesApplied
  3. v29 patches 13 repliesApplied inferred link
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches7 repliesSuperseded

Changes in v4 from the cover letter

- SoC DT: add the EL2 virtual timer interrupt (PPI 12) to the
architected timer.
- SoC DT: wrap lines longer than 80 columns.
- Board DT: move the keypad pinctrl properties before the
vendor-specific ones, as required by the DTS coding style.
- Drop the keypad binding patch, it was applied to the input tree and
is in linux-next.
- Drop the dependency on the MT6895 pinctrl series, as it is now in linux-next.
- Rebase onto next-20261201.
- Link to v3: https://patch.msgid.link/[email protected]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6dt-bindings: arm: mediatek: Add MT6895 and Xiaomi Poco X4 GTDocumentation/devicetree/bindings/arm/mediatek.yaml+4 -00 replies
2/6dt-bindings: serial: mediatek,uart: Add compatible for MT6895Documentation/devicetree/bindings/serial/mediatek,uart.yaml+1 -00 replies
3/6dt-bindings: timer: mediatek,timer: Add compatible for MT6895Documentation/devicetree/bindings/timer/mediatek,timer.yaml+1 -00 replies
4/6arm64: dts: mediatek: Add MT6895 pinmux macro header filearch/arm64/boot/dts/mediatek/mt6895-pinfunc.h+1524 -00 replies
5/6arm64: dts: mediatek: Add MT6895 SoCarch/arm64/boot/dts/mediatek/mt6895.dtsi+465 -00 replies
6/6arm64: dts: mediatek: Add Xiaomi Poco X4 GTarch/arm64/boot/dts/mediatek/Makefile arch/arm64/boot/dts/mediatek/mt6895-xiaomi-xaga.dts+88 -00 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiConor DooleyAngeloGioacchino Del Regno
1/6A-b
2/6A-b R-b
3/6A-b R-b
4/6R-b
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/6] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support

This series adds initial support for the MediaTek MT6895 (Dimensity 8000/8100) SoC and the Xiaomi xaga board, sold as Xiaomi Poco X4 GT, Redmi Note 11T Pro/Pro+ and Redmi K50i. It is enough to boot to an initramfs with a serial console, CPU idle, the CPU and DSU PMUs and the volume down key.

Bootloader dependency
---------------------
This was tested with a modified LK bootloader that is not public. The stock LK cannot boot this DT, as its Android fixups expect nodes that are not present here.

The DT relies on the bootloader to:

- update the /memory node
- add all firmware carveouts to /reserved-memory
- pass the command line from the boot image

The carveout addresses are therefore not listed in the DT, as the bootloader allocates some of them dynamically. I can describe the fixed ones in the DT if that is preferred.

Firmware behaviour
------------------
Two things in the stock TF-A affect what the DT describes, but not the DT itself:

- TF-A rejects CPU_SUSPEND for about the first 40 seconds after boot. The vendor kernel lifts this earlier with a SiP call, so with this series the idle states only start to be used after that time.
- The DSU PMU registers are lost when the cluster powers down. TF-A can preserve them (PRESERVE_DSU_PMU_REGS), but the MediaTek firmware does not, so DSU PMU counts are only reliable while the cluster stays powered up.

Testing
-------
Tested on a Poco X4 GT with 8 GiB of RAM, using a minimal config and a script in the initramfs. The results were:

- All 8 CPUs come up and match the DT (A55 on 0-3, A78 on 4-7), and CPUs 1-7 can be taken offline and brought back through PSCI.
- The cache sizes and geometry in sysfs match the CCSIDR registers on every CPU.
- The redistributor is found for each CPU, and timer interrupts reach every CPU.
- Once TF-A accepts CPU_SUSPEND, every CPU enters the CPU and cluster power down states, and the system timer wakes them up as the broadcast timer.
- Each core PMU counts only on its own CPUs, and its overflow interrupt arrives on the right CPU through its PPI partition.
- The DSU PMU counts, and its overflow interrupt arrives on SPI 18.
- The pin configuration of the UART0 and keypad pins matches the DT.
- The volume down key reports presses and releases, with no bounce through the 32 ms debounce.
- UART0 output works at 921600 baud, and its TX interrupt fires on the expected line.
- About 7 GiB of RAM was written and verified with no errors, with the carveouts added by the bootloader.
- The watchdog resets the board once it is no longer pinged, and the ramoops console log survives that reset.

UART1 is disabled and was not tested. Only a minimal config was tested on the device, not defconfig.

Tool use
--------
The commit messages, this cover letter and the test script were drafted with Claude Code (Claude Opus 5.5). I reviewed them and tested the result on the device.

Based on next-20261201.

---
Changes in v4:
- SoC DT: add the EL2 virtual timer interrupt (PPI 12) to the
architected timer.
- SoC DT: wrap lines longer than 80 columns.
- Board DT: move the keypad pinctrl properties before the
vendor-specific ones, as required by the DTS coding style.
- Drop the keypad binding patch, it was applied to the input tree and
is in linux-next.
- Drop the dependency on the MT6895 pinctrl series, as it is now in linux-next.
- Rebase onto next-20261201.
- Link to v3: https://patch.msgid.link/[email protected]

Changes in v3:
- Drop the watchdog binding and driver patches, they are now in
linux-next (next-20261119).
- Board DT: use a zero-size placeholder for the memory node,
instead of hardcoding the size.
- Board DT: order properties alphabetically.
- Board DT: drop Angelo's Reviewed-by, as the memory node was changed beyond the requested property reordering.
- Rebase onto next-20261120.
- Link to v2: https://patch.msgid.link/[email protected]

Changes in v2:
- Describe MT6895 as Dimensity 8000/8100 in the commit messages.
- watchdog binding: drop the mediatek,mt6589-wdt fallback, as the MT6895 reset layout is not known, and drop Conor's Acked-by.
- New patch: add the MT6895 compatible to the mtk_wdt driver.
- New patches: system timer and keypad bindings, pinmux header.
- SoC DT: add the cache nodes, CPU capacities and idle states, the CPU PMUs with PPI partitions, the DSU PMU, the system timer with a 13 MHz clock, the pin controller and the keypad.
- SoC DT: use IRQ_TYPE_LEVEL_HIGH for the architected timer PPIs.
- SoC DT: order the nodes as required by dt-check-style.
- Board DT: add the UART0 pins and the volume down key.
- The series now depends on the MT6895 pinctrl series.
- Link to v1: https://patch.msgid.link/[email protected]

---
Alexander Letuchiy (6):
dt-bindings: arm: mediatek: Add MT6895 and Xiaomi Poco X4 GT
dt-bindings: serial: mediatek,uart: Add compatible for MT6895
dt-bindings: timer: mediatek,timer: Add compatible for MT6895
arm64: dts: mediatek: Add MT6895 pinmux macro header file
arm64: dts: mediatek: Add MT6895 SoC
arm64: dts: mediatek: Add Xiaomi Poco X4 GT

 .../devicetree/bindings/arm/mediatek.yaml          |    4 +
 .../devicetree/bindings/serial/mediatek,uart.yaml  |    1 +
 .../devicetree/bindings/timer/mediatek,timer.yaml  |    1 +
 arch/arm64/boot/dts/mediatek/Makefile              |    1 +
 arch/arm64/boot/dts/mediatek/mt6895-pinfunc.h      | 1524 ++++++++++++++++++++
 .../arm64/boot/dts/mediatek/mt6895-xiaomi-xaga.dts |   87 ++
 arch/arm64/boot/dts/mediatek/mt6895.dtsi           |  465 ++++++
 7 files changed, 2083 insertions(+)

---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261110-initial-mt6895-16ef1b1aef55

Best regards,

Signature · 1 line
Alexander Letuchiy <[email protected]>