From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796155818; b=4t8ILcSxl4OHYK+4R1b4I79zMGhnwgThpMpAcJ0rpfu8am4RcduLpPwocZZZ+6Hfzy1w PWEdR4Q+2Kw3xkeQV2qvEJJO/p1jMKeMDys5R1icUt50fg1TlIYcEQ600NMMXSg3/a7Cj eCTrtt+GK3uXChae+uA7DeohSDgvNwz2V/n0lb/IE2kW/8QVNSAfiG/EQRW7U02EXXBdR 4NTp6ikxMImwU35CcnlojG3SDuVavFIe9qqauCVVohvAwVBMyWeHz+xlnqKiz/+Ii+9qR DDT7Q7u/Q17Gv2hxCrXAtP84SWtbgHdpSDO+eWv9+jfSDf0dSO5dgAN+IiJTK6Ydf8g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796155818; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer; bh=E8rQ+f8C/ltv8IzA3mljUPZmgP+jOXNolU/e5zsyuz8=; b=VjRQGMQ+4B0NKVQ80YxYMV0OvLOhySEJiccEwBnJlEy26w0lSb3JTSxi6LCGfEZULU1l s26b1DQIffwG1ef/suD/VGs8l70ktcIyttORPF3cI3DHwVKQaTxFAtgdFA4HudsINWsg3 mQ3Gytyt4M28WNr/ggX3Y20N/fUXIibxd5BdXrLbrveqV47eORfYtnQtUDWP8QeHlqlNk 5ZEFWAZ/04Pf90Pj8X1pRtAeGyQjJ2BiUklSIxOaBlzFc+dN6bmuD2hLLHSBVNBTjFMaz rzK4MTIrR9QRjz4hBjVEsJc4eXY1Gq5C0gKPr2hdKZlftPCDc5SA6F7TRFSFKGZiAYw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aWprzGWB; arc=none smtp.remote-ip=209.85.218.53 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D94AC606A320 for ; Tue, 1 Dec 2026 20:10:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D94AC606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aWprzGWB Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-c516a574bffso986580866b.3 for ; Tue, 01 Dec 2026 12:10:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796155816; x=1796760616; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=E8rQ+f8C/ltv8IzA3mljUPZmgP+jOXNolU/e5zsyuz8=; b=aWprzGWB61dc7QBhcOa/GrjPifgEpGHEaeKOrNPfiIzDNWDU9yK21CLsWxToZJ8MpA u7qnB2DrX8P+gH547PBwLnaPuDIm0o/5tHOC4/Cgn7H1+psnoLnv7ip8dMBjv+SWvJDx o/20Ees2bGdoDXMrPaCoR2120wpEcDvdCrnUdOK2zAp0GHtXvALkDSllch3jHhTRveAn yCAt5JACkO65VtJkc3Z3ZTu+ruN92ggXag8/XxLY71RbGQM0Ilx4/R4F3DGHCK/jkVed G8HkPqCpCyMQ2dY/zurjmPPuhDgVA2wzNkzXZ5EZf4Hb/I5a0sqASpzKGlYWSBwjE4lK PS2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796155816; x=1796760616; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=E8rQ+f8C/ltv8IzA3mljUPZmgP+jOXNolU/e5zsyuz8=; b=gNVuwSUCSywWKnz/iLR3QGnBhhMkFOR/QMh3W+Dog8mfVkbNP/ctyhoBkjRrg+bU8h f7N/IwEqcDC9C3hESeYFqJ9g/dAbnCXFftWv8k136WyrEKg4q1SlkOHhsuE84gefpGkd QrYxGXLlgVh4AsCqCxM5NiRaZjS4adQJV7W34ynQSV2tmjSvm3TpzMNDfpRvzZeneFoT lH4IdxaIhHTYu9jNHt9uzu7B5wd/Xcc24O/svOOvZ8JgUPDCmMTRTu0qaPbpFusB85wX Nmct3U5XBpS8bWZUPazsmsNn5G1BFizY/YyWWD57gYJ77SIMYM6I3VSsiWLYHdBDegjK IFzw== X-Forwarded-Encrypted: i=1; AL+hErGEUq5CWlNt1PKnoGZ2boe6nGCxY1KFFbBpBhnDdeEox6A9EXue8wmnVJMqdkdV723q5WWVeBb2hrj1unc=@vger.kernel.org X-Gm-Message-State: APuU4Z8BEODinPvzUvFODQVyDS0YHw3UK6QGXfGbmrHZWyUdVVmy6kFS KD2YN8gANRB6+wXqCfTr4YdBwFRV63NY0dTkcGRyIsQO5n5xywxpFvMZ X-Gm-Gg: AZFdTZcWqKg8azFeaIwPwKk5tZt6r4aSOYlrsC2v1UuQoD/FGDYn5W90YhoqA0xSNMS baL/0QuplNtODLh1X5hiZcF+OWYzzJgYquj7MWSFeSZ81wGTe7EMDwR66E/DFbm1FSc4nmpAlhT JKOoWUbyKBinKvLFni2r3wU8iQI2ISHCBrYpexfVowZ1NSqGKpbYr/YUtAa0yNZqFpbSn9h1pA8 shPB1aAp3P92lTE/x5+TWs1JCn1HBAIlh8sH4fKm6Pvk47F1BwxjBZxlIGwv0wFMFcwT4qIVeJT ylcl5SMrvZKTesmlD7JZlqyTUckHaqDhrPQYns04pZImA+wLoFfuOsOfdYu4qDDd9IUvKoaPYNm ldoR4LLKG8mzHQpkY5DqawZYQv5hWTNIj3DhLkGAej4BzYg08YjlFNXyynia+hNkWmc6zeDe8CJ aqVpbqJvlv/u9vzGM/rrEoY95Ng0XIVPs5OrNen2eguvQIvlytG1c32s/kFjURbMHF3gnYbyVGJ 7ppd9KCNpoAXZAp4AUAg7jzMJdmlGURIdK00rVN6PtPB3lfhGEBluKIulAXfLx8FnkLx89bAfok Sdgl1sGNA6nYp4FHSzjlP0jf4aUCHs0AdhxBXB37uYdeQkvTElv/zF5u8hAgJylP X-Received: by 2002:a17:906:c1d3:b0:c2a:34fe:ea4d with SMTP id a640c23a62f3a-c513aafb433mr2300225866b.25.1796155815971; Tue, 01 Dec 2026 12:10:15 -0800 (PST) Received: from [192.168.1.100] ([163.245.50.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c51fd431524sm299863466b.32.2026.12.01.12.10.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 12:10:14 -0800 (PST) From: Alexander Letuchiy Subject: [PATCH v4 0/6] arm64: mediatek: Add initial MT6895 and Xiaomi Poco X4 GT support Date: Tue, 01 Dec 2026 23:10:03 +0300 Message-Id: <20261201-initial-mt6895-v4-0-a7079f1d94db@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/2WQSW7DMAxFr2JoXRkSNdjKqvcouqBlKlHhobUUo 0WQu1eOuzCa5Qf5HocbS7RESuxU3dhCa0xxnkrQLxXzF5zOxGNfMgMBVkopeJxijjjwMdvWGS4 tBdlJpGAMK9DnQiF+P4Rv73tO1+6DfN4sW8clpjwvP4+Jq9z6/uTCgBQWoDagGt1wyTHh0FM9k Hw9jxiH2s8j26wrHDip/i+1AhdcYycQXUDlnnB1wOEZVwV3xmtrXENW9Uf8vh+10Ne1PCvvl7I OE/FSH2M+Vb1UrXGWXGgBhFLaiQ7INA15ILQ6ACJo64vs/gtTZ323gQEAAA== X-Change-ID: 20261110-initial-mt6895-16ef1b1aef55 To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , Greg Kroah-Hartman , Jiri Slaby , Daniel Lezcano , Thomas Gleixner , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-serial@vger.kernel.org, phone-devel@vger.kernel.org, Krzysztof Kozlowski , Conor Dooley X-Mailer: b4 0.15.2 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/20261123-initial-mt6895-v3-0-95c46597e63d@gmail.com 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/20261113-initial-mt6895-v2-0-4ab0aa9fa391@gmail.com 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/20261105210622.523747-1-asalde.le1@gmail.com --- 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, -- Alexander Letuchiy