15f62a964SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT 25f62a964SEmmanuel Vadot/* 35f62a964SEmmanuel Vadot * Apple T7000 "A8" SoC 45f62a964SEmmanuel Vadot * 55f62a964SEmmanuel Vadot * Other names: H7P, "Fiji" 65f62a964SEmmanuel Vadot * 75f62a964SEmmanuel Vadot * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org> 85f62a964SEmmanuel Vadot * Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts. 95f62a964SEmmanuel Vadot */ 105f62a964SEmmanuel Vadot 115f62a964SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 125f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/apple-aic.h> 135f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 145f62a964SEmmanuel Vadot#include <dt-bindings/pinctrl/apple.h> 155f62a964SEmmanuel Vadot 165f62a964SEmmanuel Vadot/ { 175f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 185f62a964SEmmanuel Vadot #address-cells = <2>; 195f62a964SEmmanuel Vadot #size-cells = <2>; 205f62a964SEmmanuel Vadot 215f62a964SEmmanuel Vadot clkref: clock-ref { 225f62a964SEmmanuel Vadot compatible = "fixed-clock"; 235f62a964SEmmanuel Vadot #clock-cells = <0>; 245f62a964SEmmanuel Vadot clock-frequency = <24000000>; 255f62a964SEmmanuel Vadot clock-output-names = "clkref"; 265f62a964SEmmanuel Vadot }; 275f62a964SEmmanuel Vadot 285f62a964SEmmanuel Vadot cpus { 295f62a964SEmmanuel Vadot #address-cells = <2>; 305f62a964SEmmanuel Vadot #size-cells = <0>; 315f62a964SEmmanuel Vadot 325f62a964SEmmanuel Vadot cpu0: cpu@0 { 335f62a964SEmmanuel Vadot compatible = "apple,typhoon"; 345f62a964SEmmanuel Vadot reg = <0x0 0x0>; 355f62a964SEmmanuel Vadot cpu-release-addr = <0 0>; /* To be filled in by loader */ 368ccc0d23SEmmanuel Vadot performance-domains = <&cpufreq>; 378ccc0d23SEmmanuel Vadot operating-points-v2 = <&typhoon_opp>; 385f62a964SEmmanuel Vadot enable-method = "spin-table"; 395f62a964SEmmanuel Vadot device_type = "cpu"; 40*ae5de77eSEmmanuel Vadot next-level-cache = <&l2_cache>; 41*ae5de77eSEmmanuel Vadot i-cache-size = <0x10000>; 42*ae5de77eSEmmanuel Vadot d-cache-size = <0x10000>; 435f62a964SEmmanuel Vadot }; 445f62a964SEmmanuel Vadot 455f62a964SEmmanuel Vadot cpu1: cpu@1 { 465f62a964SEmmanuel Vadot compatible = "apple,typhoon"; 475f62a964SEmmanuel Vadot reg = <0x0 0x1>; 485f62a964SEmmanuel Vadot cpu-release-addr = <0 0>; /* To be filled in by loader */ 498ccc0d23SEmmanuel Vadot performance-domains = <&cpufreq>; 508ccc0d23SEmmanuel Vadot operating-points-v2 = <&typhoon_opp>; 515f62a964SEmmanuel Vadot enable-method = "spin-table"; 525f62a964SEmmanuel Vadot device_type = "cpu"; 53*ae5de77eSEmmanuel Vadot next-level-cache = <&l2_cache>; 54*ae5de77eSEmmanuel Vadot i-cache-size = <0x10000>; 55*ae5de77eSEmmanuel Vadot d-cache-size = <0x10000>; 56*ae5de77eSEmmanuel Vadot }; 57*ae5de77eSEmmanuel Vadot 58*ae5de77eSEmmanuel Vadot l2_cache: l2-cache { 59*ae5de77eSEmmanuel Vadot compatible = "cache"; 60*ae5de77eSEmmanuel Vadot cache-level = <2>; 61*ae5de77eSEmmanuel Vadot cache-unified; 62*ae5de77eSEmmanuel Vadot cache-size = <0x100000>; 635f62a964SEmmanuel Vadot }; 645f62a964SEmmanuel Vadot }; 655f62a964SEmmanuel Vadot 668ccc0d23SEmmanuel Vadot typhoon_opp: opp-table { 678ccc0d23SEmmanuel Vadot compatible = "operating-points-v2"; 688ccc0d23SEmmanuel Vadot 698ccc0d23SEmmanuel Vadot opp01 { 708ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <300000000>; 718ccc0d23SEmmanuel Vadot opp-level = <1>; 728ccc0d23SEmmanuel Vadot clock-latency-ns = <300>; 738ccc0d23SEmmanuel Vadot }; 748ccc0d23SEmmanuel Vadot opp02 { 758ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <396000000>; 768ccc0d23SEmmanuel Vadot opp-level = <2>; 778ccc0d23SEmmanuel Vadot clock-latency-ns = <50000>; 788ccc0d23SEmmanuel Vadot }; 798ccc0d23SEmmanuel Vadot opp03 { 808ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <600000000>; 818ccc0d23SEmmanuel Vadot opp-level = <3>; 828ccc0d23SEmmanuel Vadot clock-latency-ns = <29000>; 838ccc0d23SEmmanuel Vadot }; 848ccc0d23SEmmanuel Vadot opp04 { 858ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <840000000>; 868ccc0d23SEmmanuel Vadot opp-level = <4>; 878ccc0d23SEmmanuel Vadot clock-latency-ns = <29000>; 888ccc0d23SEmmanuel Vadot }; 898ccc0d23SEmmanuel Vadot opp05 { 908ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <1128000000>; 918ccc0d23SEmmanuel Vadot opp-level = <5>; 928ccc0d23SEmmanuel Vadot clock-latency-ns = <36000>; 938ccc0d23SEmmanuel Vadot }; 948ccc0d23SEmmanuel Vadot typhoon_opp06: opp06 { 958ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <1392000000>; 968ccc0d23SEmmanuel Vadot opp-level = <6>; 978ccc0d23SEmmanuel Vadot clock-latency-ns = <42000>; 988ccc0d23SEmmanuel Vadot status = "disabled"; /* Not available on N102 */ 998ccc0d23SEmmanuel Vadot }; 1008ccc0d23SEmmanuel Vadot typhoon_opp07: opp07 { 1018ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <1512000000>; 1028ccc0d23SEmmanuel Vadot opp-level = <7>; 1038ccc0d23SEmmanuel Vadot clock-latency-ns = <49000>; 1048ccc0d23SEmmanuel Vadot status = "disabled"; /* J96 and J97 only */ 1058ccc0d23SEmmanuel Vadot }; 1068ccc0d23SEmmanuel Vadot }; 1078ccc0d23SEmmanuel Vadot 1085f62a964SEmmanuel Vadot soc { 1095f62a964SEmmanuel Vadot compatible = "simple-bus"; 1105f62a964SEmmanuel Vadot #address-cells = <2>; 1115f62a964SEmmanuel Vadot #size-cells = <2>; 1125f62a964SEmmanuel Vadot nonposted-mmio; 1135f62a964SEmmanuel Vadot ranges; 1145f62a964SEmmanuel Vadot 1158ccc0d23SEmmanuel Vadot cpufreq: performance-controller@202220000 { 1168ccc0d23SEmmanuel Vadot compatible = "apple,t7000-cluster-cpufreq", "apple,s5l8960x-cluster-cpufreq"; 1178ccc0d23SEmmanuel Vadot reg = <0x2 0x02220000 0 0x1000>; 1188ccc0d23SEmmanuel Vadot #performance-domain-cells = <0>; 1198ccc0d23SEmmanuel Vadot }; 1208ccc0d23SEmmanuel Vadot 1215f62a964SEmmanuel Vadot serial0: serial@20a0c0000 { 1225f62a964SEmmanuel Vadot compatible = "apple,s5l-uart"; 1235f62a964SEmmanuel Vadot reg = <0x2 0x0a0c0000 0x0 0x4000>; 1245f62a964SEmmanuel Vadot reg-io-width = <4>; 1255f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1265f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 158 IRQ_TYPE_LEVEL_HIGH>; 1275f62a964SEmmanuel Vadot /* Use the bootloader-enabled clocks for now. */ 1285f62a964SEmmanuel Vadot clocks = <&clkref>, <&clkref>; 1295f62a964SEmmanuel Vadot clock-names = "uart", "clk_uart_baud0"; 1308ccc0d23SEmmanuel Vadot power-domains = <&ps_uart0>; 1315f62a964SEmmanuel Vadot status = "disabled"; 1325f62a964SEmmanuel Vadot }; 1335f62a964SEmmanuel Vadot 1345f62a964SEmmanuel Vadot serial6: serial@20a0d8000 { 1355f62a964SEmmanuel Vadot compatible = "apple,s5l-uart"; 1365f62a964SEmmanuel Vadot reg = <0x2 0x0a0d8000 0x0 0x4000>; 1375f62a964SEmmanuel Vadot reg-io-width = <4>; 1385f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1395f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 164 IRQ_TYPE_LEVEL_HIGH>; 1405f62a964SEmmanuel Vadot /* Use the bootloader-enabled clocks for now. */ 1415f62a964SEmmanuel Vadot clocks = <&clkref>, <&clkref>; 1425f62a964SEmmanuel Vadot clock-names = "uart", "clk_uart_baud0"; 1438ccc0d23SEmmanuel Vadot power-domains = <&ps_uart6>; 1445f62a964SEmmanuel Vadot status = "disabled"; 1455f62a964SEmmanuel Vadot }; 1465f62a964SEmmanuel Vadot 1478ccc0d23SEmmanuel Vadot pmgr: power-management@20e000000 { 1488ccc0d23SEmmanuel Vadot compatible = "apple,t7000-pmgr", "apple,pmgr", "syscon", "simple-mfd"; 1498ccc0d23SEmmanuel Vadot #address-cells = <1>; 1508ccc0d23SEmmanuel Vadot #size-cells = <1>; 1518ccc0d23SEmmanuel Vadot 1528ccc0d23SEmmanuel Vadot reg = <0x2 0xe000000 0 0x24000>; 1538ccc0d23SEmmanuel Vadot }; 1548ccc0d23SEmmanuel Vadot 1555f62a964SEmmanuel Vadot wdt: watchdog@20e027000 { 1565f62a964SEmmanuel Vadot compatible = "apple,t7000-wdt", "apple,wdt"; 1575f62a964SEmmanuel Vadot reg = <0x2 0x0e027000 0x0 0x1000>; 1585f62a964SEmmanuel Vadot clocks = <&clkref>; 1595f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1605f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>; 1615f62a964SEmmanuel Vadot }; 1625f62a964SEmmanuel Vadot 1635f62a964SEmmanuel Vadot aic: interrupt-controller@20e100000 { 1645f62a964SEmmanuel Vadot compatible = "apple,t7000-aic", "apple,aic"; 1655f62a964SEmmanuel Vadot reg = <0x2 0x0e100000 0x0 0x100000>; 1665f62a964SEmmanuel Vadot #interrupt-cells = <3>; 1675f62a964SEmmanuel Vadot interrupt-controller; 1688ccc0d23SEmmanuel Vadot power-domains = <&ps_aic>; 1698ccc0d23SEmmanuel Vadot }; 1708ccc0d23SEmmanuel Vadot 1718ccc0d23SEmmanuel Vadot dwi_bl: backlight@20e200010 { 1728ccc0d23SEmmanuel Vadot compatible = "apple,t7000-dwi-bl", "apple,dwi-bl"; 1738ccc0d23SEmmanuel Vadot reg = <0x2 0x0e200010 0x0 0x8>; 1748ccc0d23SEmmanuel Vadot power-domains = <&ps_dwi>; 1758ccc0d23SEmmanuel Vadot status = "disabled"; 1765f62a964SEmmanuel Vadot }; 1775f62a964SEmmanuel Vadot 1785f62a964SEmmanuel Vadot pinctrl: pinctrl@20e300000 { 1795f62a964SEmmanuel Vadot compatible = "apple,t7000-pinctrl", "apple,pinctrl"; 1805f62a964SEmmanuel Vadot reg = <0x2 0x0e300000 0x0 0x100000>; 1818ccc0d23SEmmanuel Vadot power-domains = <&ps_gpio>; 1825f62a964SEmmanuel Vadot 1835f62a964SEmmanuel Vadot gpio-controller; 1845f62a964SEmmanuel Vadot #gpio-cells = <2>; 1855f62a964SEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 208>; 1865f62a964SEmmanuel Vadot apple,npins = <208>; 1875f62a964SEmmanuel Vadot 1885f62a964SEmmanuel Vadot interrupt-controller; 1895f62a964SEmmanuel Vadot #interrupt-cells = <2>; 1905f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1915f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 62 IRQ_TYPE_LEVEL_HIGH>, 1925f62a964SEmmanuel Vadot <AIC_IRQ 63 IRQ_TYPE_LEVEL_HIGH>, 1935f62a964SEmmanuel Vadot <AIC_IRQ 64 IRQ_TYPE_LEVEL_HIGH>, 1945f62a964SEmmanuel Vadot <AIC_IRQ 65 IRQ_TYPE_LEVEL_HIGH>, 1955f62a964SEmmanuel Vadot <AIC_IRQ 66 IRQ_TYPE_LEVEL_HIGH>, 1965f62a964SEmmanuel Vadot <AIC_IRQ 67 IRQ_TYPE_LEVEL_HIGH>, 1975f62a964SEmmanuel Vadot <AIC_IRQ 68 IRQ_TYPE_LEVEL_HIGH>; 1985f62a964SEmmanuel Vadot }; 1995f62a964SEmmanuel Vadot }; 2005f62a964SEmmanuel Vadot 2015f62a964SEmmanuel Vadot timer { 2025f62a964SEmmanuel Vadot compatible = "arm,armv8-timer"; 2035f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 2045f62a964SEmmanuel Vadot interrupt-names = "phys", "virt"; 2055f62a964SEmmanuel Vadot /* Note that A8 doesn't actually have a hypervisor (EL2 is not implemented). */ 2065f62a964SEmmanuel Vadot interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>, 2075f62a964SEmmanuel Vadot <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>; 2085f62a964SEmmanuel Vadot }; 2095f62a964SEmmanuel Vadot}; 2108ccc0d23SEmmanuel Vadot 2118ccc0d23SEmmanuel Vadot#include "t7000-pmgr.dtsi" 212