* [PATCH v3 3/7] dt-bindings: timer: mediatek,timer: Add compatible for MT6895
2026-11-23 11:18 [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Alexander Letuchiy
@ 2026-11-23 11:18 ` Alexander Letuchiy
2026-11-23 11:18 ` [PATCH v3 4/7] dt-bindings: input: mediatek,mt6779-keypad: " Alexander Letuchiy
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Letuchiy @ 2026-11-23 11:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Sean Wang, Greg Kroah-Hartman,
Jiri Slaby, Daniel Lezcano, Thomas Gleixner, Mattijs Korpershoek,
Dmitry Torokhov, Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-serial, linux-input, phone-devel, Krzysztof Kozlowski,
Alexander Letuchiy
Add a compatible string for the system timer (SYST) of the MediaTek
MT6895 (Dimensity 8000/8100) SoC. It works with the existing driver
through the mediatek,mt6765-timer fallback.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Alexander Letuchiy <asalde.le1@gmail.com>
---
Documentation/devicetree/bindings/timer/mediatek,timer.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/timer/mediatek,timer.yaml b/Documentation/devicetree/bindings/timer/mediatek,timer.yaml
index 337580dc77d8..ee4af54c29b5 100644
--- a/Documentation/devicetree/bindings/timer/mediatek,timer.yaml
+++ b/Documentation/devicetree/bindings/timer/mediatek,timer.yaml
@@ -40,6 +40,7 @@ properties:
# SYST Timers
- items:
- enum:
+ - mediatek,mt6895-timer
- mediatek,mt7629-timer
- mediatek,mt8183-timer
- mediatek,mt8186-timer
--
2.56.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 4/7] dt-bindings: input: mediatek,mt6779-keypad: Add compatible for MT6895
2026-11-23 11:18 [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Alexander Letuchiy
2026-11-23 11:18 ` [PATCH v3 3/7] dt-bindings: timer: mediatek,timer: Add compatible for MT6895 Alexander Letuchiy
@ 2026-11-23 11:18 ` Alexander Letuchiy
2026-11-23 11:18 ` [PATCH v3 6/7] arm64: dts: mediatek: Add MT6895 SoC Alexander Letuchiy
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Letuchiy @ 2026-11-23 11:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Sean Wang, Greg Kroah-Hartman,
Jiri Slaby, Daniel Lezcano, Thomas Gleixner, Mattijs Korpershoek,
Dmitry Torokhov, Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-serial, linux-input, phone-devel, Krzysztof Kozlowski,
Alexander Letuchiy
Add a compatible string for the keypad of the MediaTek MT6895 (Dimensity
8000/8100) SoC. Its registers are the same as on MT6779, so it works
with the existing driver through the mediatek,mt6779-keypad fallback.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Alexander Letuchiy <asalde.le1@gmail.com>
---
Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml
index 9f0da1240187..9a1369c9ff4c 100644
--- a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml
+++ b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml
@@ -29,6 +29,7 @@ properties:
- mediatek,mt6572-keypad
- mediatek,mt6595-keypad
- mediatek,mt6873-keypad
+ - mediatek,mt6895-keypad
- mediatek,mt8173-keypad
- mediatek,mt8183-keypad
- mediatek,mt8365-keypad
--
2.56.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 6/7] arm64: dts: mediatek: Add MT6895 SoC
2026-11-23 11:18 [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Alexander Letuchiy
2026-11-23 11:18 ` [PATCH v3 3/7] dt-bindings: timer: mediatek,timer: Add compatible for MT6895 Alexander Letuchiy
2026-11-23 11:18 ` [PATCH v3 4/7] dt-bindings: input: mediatek,mt6779-keypad: " Alexander Letuchiy
@ 2026-11-23 11:18 ` Alexander Letuchiy
2026-11-23 11:18 ` [PATCH v3 7/7] arm64: dts: mediatek: Add Xiaomi Poco X4 GT Alexander Letuchiy
2026-11-23 11:41 ` [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Roman Vivchar
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Letuchiy @ 2026-11-23 11:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Sean Wang, Greg Kroah-Hartman,
Jiri Slaby, Daniel Lezcano, Thomas Gleixner, Mattijs Korpershoek,
Dmitry Torokhov, Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-serial, linux-input, phone-devel, Alexander Letuchiy
Add initial support for the MediaTek MT6895 (Dimensity 8000/8100) SoC,
which has four Cortex-A55 and four Cortex-A78 cores sharing a DynamIQ
cluster with 4 MiB of L3 cache.
Describe the CPUs with their caches, PSCI, the GICv3 interrupt
controller, the CPU and DSU PMUs, the architected timer, the system
timer, the pin controller, two UARTs, the watchdog and the keypad.
There is no clock controller driver for this SoC yet, so the UARTs and
the keypad use a fixed 26 MHz clock, and the system timer a fixed
13 MHz clock derived from it.
Only the CPU and cluster power down idle states are described. The
deeper states that also power down the MCUSYS or the whole system need
the SPM and the vendor low power driver, which aren't supported yet.
The system timer serves as the broadcast timer while the CPUs are in
these states.
The cache geometry was checked against the CCSIDR registers of each
core.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Alexander Letuchiy <asalde.le1@gmail.com>
---
arch/arm64/boot/dts/mediatek/mt6895.dtsi | 461 +++++++++++++++++++++++++++++++
1 file changed, 461 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6895.dtsi b/arch/arm64/boot/dts/mediatek/mt6895.dtsi
new file mode 100644
index 000000000000..62584cec0f4f
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6895.dtsi
@@ -0,0 +1,461 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2026 Alexander Letuchiy <asalde.le1@gmail.com>
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mt6895-pinfunc.h"
+
+/ {
+ compatible = "mediatek,mt6895";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ clk13m: clock-13m {
+ compatible = "fixed-factor-clock";
+ #clock-cells = <0>;
+ clocks = <&clk26m>;
+ clock-div = <2>;
+ clock-mult = <1>;
+ clock-output-names = "clk13m";
+ };
+
+ clk26m: clock-26m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ clock-output-names = "clk26m";
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+
+ core1 {
+ cpu = <&cpu1>;
+ };
+
+ core2 {
+ cpu = <&cpu2>;
+ };
+
+ core3 {
+ cpu = <&cpu3>;
+ };
+
+ core4 {
+ cpu = <&cpu4>;
+ };
+
+ core5 {
+ cpu = <&cpu5>;
+ };
+
+ core6 {
+ cpu = <&cpu6>;
+ };
+
+ core7 {
+ cpu = <&cpu7>;
+ };
+ };
+ };
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <380>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ };
+
+ cpu1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x100>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <380>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_1>;
+ };
+
+ cpu2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x200>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <380>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_2>;
+ };
+
+ cpu3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x300>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <380>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_3>;
+ };
+
+ cpu4: cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x400>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <1024>;
+ cpu-idle-states = <&cpu_off_b &cluster_off_b>;
+ i-cache-size = <65536>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <65536>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
+ next-level-cache = <&l2_4>;
+ };
+
+ cpu5: cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x500>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <1024>;
+ cpu-idle-states = <&cpu_off_b &cluster_off_b>;
+ i-cache-size = <65536>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <65536>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
+ next-level-cache = <&l2_5>;
+ };
+
+ cpu6: cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x600>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <1024>;
+ cpu-idle-states = <&cpu_off_b &cluster_off_b>;
+ i-cache-size = <65536>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <65536>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
+ next-level-cache = <&l2_6>;
+ };
+
+ cpu7: cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x700>;
+ enable-method = "psci";
+ capacity-dmips-mhz = <1024>;
+ cpu-idle-states = <&cpu_off_b &cluster_off_b>;
+ i-cache-size = <65536>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <65536>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
+ next-level-cache = <&l2_7>;
+ };
+
+ idle-states {
+ entry-method = "psci";
+
+ cluster_off_b: cluster-off-b {
+ compatible = "arm,idle-state";
+ local-timer-stop;
+ entry-latency-us = <100>;
+ exit-latency-us = <250>;
+ min-residency-us = <1900>;
+ arm,psci-suspend-param = <0x01010102>;
+ };
+
+ cluster_off_l: cluster-off-l {
+ compatible = "arm,idle-state";
+ local-timer-stop;
+ entry-latency-us = <100>;
+ exit-latency-us = <250>;
+ min-residency-us = <2100>;
+ arm,psci-suspend-param = <0x01010101>;
+ };
+
+ cpu_off_b: cpu-off-b {
+ compatible = "arm,idle-state";
+ local-timer-stop;
+ entry-latency-us = <50>;
+ exit-latency-us = <100>;
+ min-residency-us = <1400>;
+ arm,psci-suspend-param = <0x00010002>;
+ };
+
+ cpu_off_l: cpu-off-l {
+ compatible = "arm,idle-state";
+ local-timer-stop;
+ entry-latency-us = <50>;
+ exit-latency-us = <100>;
+ min-residency-us = <1600>;
+ arm,psci-suspend-param = <0x00010001>;
+ };
+ };
+
+ l2_0: l2-cache0 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <131072>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_1: l2-cache1 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <131072>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_2: l2-cache2 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <131072>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_3: l2-cache3 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <131072>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_4: l2-cache4 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <524288>;
+ cache-line-size = <64>;
+ cache-sets = <1024>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_5: l2-cache5 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <524288>;
+ cache-line-size = <64>;
+ cache-sets = <1024>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_6: l2-cache6 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <524288>;
+ cache-line-size = <64>;
+ cache-sets = <1024>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_7: l2-cache7 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <524288>;
+ cache-line-size = <64>;
+ cache-sets = <1024>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l3_0: l3-cache {
+ compatible = "cache";
+ cache-level = <3>;
+ cache-size = <4194304>;
+ cache-line-size = <64>;
+ cache-sets = <4096>;
+ cache-unified;
+ };
+ };
+
+ dsu-pmu {
+ compatible = "arm,dsu-pmu";
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+ cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
+ <&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
+ };
+
+ pmu-a55 {
+ compatible = "arm,cortex-a55-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster0>;
+ };
+
+ pmu-a78 {
+ compatible = "arm,cortex-a78-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster1>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ soc {
+ compatible = "simple-bus";
+ ranges;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ gic: interrupt-controller@c000000 {
+ compatible = "arm,gic-v3";
+ reg = <0 0x0c000000 0 0x40000>,
+ <0 0x0c040000 0 0x200000>;
+ #interrupt-cells = <4>;
+ interrupt-controller;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+
+ ppi-partitions {
+ ppi_cluster0: interrupt-partition-0 {
+ affinity = <&cpu0 &cpu1 &cpu2 &cpu3>;
+ };
+
+ ppi_cluster1: interrupt-partition-1 {
+ affinity = <&cpu4 &cpu5 &cpu6 &cpu7>;
+ };
+ };
+ };
+
+ pio: pinctrl@10005000 {
+ compatible = "mediatek,mt6895-pinctrl";
+ reg = <0 0x10005000 0 0x1000>,
+ <0 0x11c20000 0 0x1000>,
+ <0 0x11c30000 0 0x1000>,
+ <0 0x11c40000 0 0x1000>,
+ <0 0x11d10000 0 0x1000>,
+ <0 0x11d30000 0 0x1000>,
+ <0 0x11d40000 0 0x1000>,
+ <0 0x11d50000 0 0x1000>,
+ <0 0x11d60000 0 0x1000>,
+ <0 0x11e10000 0 0x1000>,
+ <0 0x11ea0000 0 0x1000>,
+ <0 0x11eb0000 0 0x1000>,
+ <0 0x11f20000 0 0x1000>,
+ <0 0x11f30000 0 0x1000>,
+ <0 0x11e50000 0 0x1000>,
+ <0 0x11ce0000 0 0x1000>,
+ <0 0x11de0000 0 0x1000>,
+ <0 0x11fe0000 0 0x1000>,
+ <0 0x1c01e000 0 0x1000>;
+ reg-names = "base", "rm", "rt", "rmm", "bl", "bm", "br",
+ "brr", "lb", "lm", "rtt", "tr", "tl", "lt",
+ "eint-w", "eint-e", "eint-s", "eint-n", "eint-c";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pio 0 0 227>;
+ interrupt-controller;
+ interrupts = <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH 0>;
+ #interrupt-cells = <2>;
+ };
+
+ uart0: serial@11001000 {
+ compatible = "mediatek,mt6895-uart", "mediatek,mt6577-uart";
+ reg = <0 0x11001000 0 0x1000>;
+ interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>, <&clk26m>;
+ clock-names = "baud", "bus";
+
+ status = "disabled";
+ };
+
+ uart1: serial@11002000 {
+ compatible = "mediatek,mt6895-uart", "mediatek,mt6577-uart";
+ reg = <0 0x11002000 0 0x1000>;
+ interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>, <&clk26m>;
+ clock-names = "baud", "bus";
+
+ status = "disabled";
+ };
+
+ watchdog: watchdog@1c007000 {
+ compatible = "mediatek,mt6895-wdt";
+ reg = <0 0x1c007000 0 0x100>;
+ };
+
+ keypad: keypad@1c00e000 {
+ compatible = "mediatek,mt6895-keypad",
+ "mediatek,mt6779-keypad";
+ reg = <0 0x1c00e000 0 0x1000>;
+ wakeup-source;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_EDGE_RISING 0>;
+ clocks = <&clk26m>;
+ clock-names = "kpd";
+
+ status = "disabled";
+ };
+
+ systimer: timer@1c011000 {
+ compatible = "mediatek,mt6895-timer",
+ "mediatek,mt6765-timer";
+ reg = <0 0x1c011000 0 0x1000>;
+ interrupts = <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk13m>;
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+};
--
2.56.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 7/7] arm64: dts: mediatek: Add Xiaomi Poco X4 GT
2026-11-23 11:18 [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Alexander Letuchiy
` (2 preceding siblings ...)
2026-11-23 11:18 ` [PATCH v3 6/7] arm64: dts: mediatek: Add MT6895 SoC Alexander Letuchiy
@ 2026-11-23 11:18 ` Alexander Letuchiy
2026-11-23 11:41 ` [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Roman Vivchar
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Letuchiy @ 2026-11-23 11:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Sean Wang, Greg Kroah-Hartman,
Jiri Slaby, Daniel Lezcano, Thomas Gleixner, Mattijs Korpershoek,
Dmitry Torokhov, Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-serial, linux-input, phone-devel, Alexander Letuchiy
Add a device tree for the Xiaomi xaga board, which is sold as Xiaomi
Poco X4 GT, Redmi Note 11T Pro/Pro+ and Redmi K50i. It enables a serial
console on UART0 and the volume down key on the SoC keypad. The power
and volume up keys are connected to the MT6363 PMIC, which isn't
supported yet.
The DT only describes the memory that Linux itself uses, which is the
ramoops region. The bootloader updates the /memory node and adds the
firmware carveouts to /reserved-memory, so their addresses are not
hardcoded here. This DT must not be booted with a bootloader that does
not do this, as Linux would then use memory owned by the firmware.
The ramoops zone sizes place the console zone at the offset where the
bootloader expects to find it.
Signed-off-by: Alexander Letuchiy <asalde.le1@gmail.com>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../arm64/boot/dts/mediatek/mt6895-xiaomi-xaga.dts | 87 ++++++++++++++++++++++
2 files changed, 88 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index a86fb313b1a9..d73489149ab5 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt6895-xiaomi-xaga.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-cudy-wr3000-v1.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt6895-xiaomi-xaga.dts b/arch/arm64/boot/dts/mediatek/mt6895-xiaomi-xaga.dts
new file mode 100644
index 000000000000..7bfe0d438803
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6895-xiaomi-xaga.dts
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2026 Alexander Letuchiy <asalde.le1@gmail.com>
+ */
+
+/dts-v1/;
+#include <dt-bindings/input/input.h>
+
+#include "mt6895.dtsi"
+
+/ {
+ model = "Xiaomi Poco X4 GT";
+ compatible = "xiaomi,xaga", "mediatek,mt6895";
+ chassis-type = "handset";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ /* The size will be filled in by the bootloader */
+ reg = <0x0 0x40000000 0 0>;
+ };
+
+ reserved-memory {
+ ranges;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ /* The firmware carveouts are added by the bootloader. */
+
+ ramoops@48090000 {
+ compatible = "ramoops";
+ reg = <0 0x48090000 0 0xe0000>;
+ no-map;
+ console-size = <0x40000>;
+ ftrace-size = <0x10000>;
+ pmsg-size = <0x10000>;
+ record-size = <0x10000>;
+ };
+ };
+};
+
+&keypad {
+ debounce-delay-ms = <32>;
+ keypad,num-columns = <1>;
+ keypad,num-rows = <1>;
+ linux,keymap = <MATRIX_KEY(0, 0, KEY_VOLUMEDOWN)>;
+ pinctrl-0 = <&keypad_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&pio {
+ keypad_pins: keypad-pins {
+ pins-col {
+ pinmux = <PINMUX_GPIO107__FUNC_KPCOL0>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ input-enable;
+ };
+ };
+
+ uart0_pins: uart0-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO88__FUNC_URXD0>;
+ bias-pull-up;
+ input-enable;
+ };
+
+ pins-tx {
+ pinmux = <PINMUX_GPIO89__FUNC_UTXD0>;
+ };
+ };
+};
+
+&uart0 {
+ pinctrl-0 = <&uart0_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
--
2.56.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support
2026-11-23 11:18 [PATCH v3 0/7] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Alexander Letuchiy
` (3 preceding siblings ...)
2026-11-23 11:18 ` [PATCH v3 7/7] arm64: dts: mediatek: Add Xiaomi Poco X4 GT Alexander Letuchiy
@ 2026-11-23 11:41 ` Roman Vivchar
4 siblings, 0 replies; 6+ messages in thread
From: Roman Vivchar @ 2026-11-23 11:41 UTC (permalink / raw)
To: Alexander Letuchiy
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Sean Wang, Greg Kroah-Hartman,
Jiri Slaby, Daniel Lezcano, Thomas Gleixner, Mattijs Korpershoek,
Dmitry Torokhov, Kees Cook, Tony Luck, Guilherme G. Piccoli,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-serial, linux-input, phone-devel, Krzysztof Kozlowski,
Conor Dooley
Hi,
On Monday, November 23rd, 2026 at 1:19 PM, Alexander Letuchiy <asalde.le1@gmail.com> wrote:
> 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.
>
> Dependencies
> ------------
> The SoC DT describes the pin controller and the board DT uses its pinmux
> macros, so this series depends on the MT6895 pinctrl series:
> https://patch.msgid.link/20261118-pinctrl-mt6895-v2-0-0728c4eddcac@gmail.com
>
> Bootloader dependency
> ---------------------
> This was tested with a modified LK bootloader that is not public.
How are other xaga users supposed to boot the kernel? You might want to
port uniLoader instead, or if you're on an old enough security patch you
can even replace stock LK with U-Boot. U-Boot chainloading is also
possible.
> 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.
It might be worth porting upstream TF-A too.
Best regards,
Roman
^ permalink raw reply [flat|nested] 6+ messages in thread