15f62a964SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT 25f62a964SEmmanuel Vadot/* 35f62a964SEmmanuel Vadot * Apple S8001 "A9X" SoC 45f62a964SEmmanuel Vadot * 55f62a964SEmmanuel Vadot * Other names: H8G, "Elba" 65f62a964SEmmanuel Vadot * 75f62a964SEmmanuel Vadot * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org> 85f62a964SEmmanuel Vadot */ 95f62a964SEmmanuel Vadot 105f62a964SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 115f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/apple-aic.h> 125f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 135f62a964SEmmanuel Vadot#include <dt-bindings/pinctrl/apple.h> 145f62a964SEmmanuel Vadot 155f62a964SEmmanuel Vadot/ { 165f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 175f62a964SEmmanuel Vadot #address-cells = <2>; 185f62a964SEmmanuel Vadot #size-cells = <2>; 195f62a964SEmmanuel Vadot 205f62a964SEmmanuel Vadot clkref: clock-ref { 215f62a964SEmmanuel Vadot compatible = "fixed-clock"; 225f62a964SEmmanuel Vadot #clock-cells = <0>; 235f62a964SEmmanuel Vadot clock-frequency = <24000000>; 245f62a964SEmmanuel Vadot clock-output-names = "clkref"; 255f62a964SEmmanuel Vadot }; 265f62a964SEmmanuel Vadot 275f62a964SEmmanuel Vadot cpus { 285f62a964SEmmanuel Vadot #address-cells = <2>; 295f62a964SEmmanuel Vadot #size-cells = <0>; 305f62a964SEmmanuel Vadot 315f62a964SEmmanuel Vadot cpu0: cpu@0 { 325f62a964SEmmanuel Vadot compatible = "apple,twister"; 335f62a964SEmmanuel Vadot reg = <0x0 0x0>; 345f62a964SEmmanuel Vadot cpu-release-addr = <0 0>; /* To be filled in by loader */ 35*8ccc0d23SEmmanuel Vadot operating-points-v2 = <&twister_opp>; 36*8ccc0d23SEmmanuel Vadot performance-domains = <&cpufreq>; 375f62a964SEmmanuel Vadot enable-method = "spin-table"; 385f62a964SEmmanuel Vadot device_type = "cpu"; 395f62a964SEmmanuel Vadot }; 405f62a964SEmmanuel Vadot 415f62a964SEmmanuel Vadot cpu1: cpu@1 { 425f62a964SEmmanuel Vadot compatible = "apple,twister"; 435f62a964SEmmanuel Vadot reg = <0x0 0x1>; 445f62a964SEmmanuel Vadot cpu-release-addr = <0 0>; /* To be filled in by loader */ 45*8ccc0d23SEmmanuel Vadot operating-points-v2 = <&twister_opp>; 46*8ccc0d23SEmmanuel Vadot performance-domains = <&cpufreq>; 475f62a964SEmmanuel Vadot enable-method = "spin-table"; 485f62a964SEmmanuel Vadot device_type = "cpu"; 495f62a964SEmmanuel Vadot }; 505f62a964SEmmanuel Vadot }; 515f62a964SEmmanuel Vadot 52*8ccc0d23SEmmanuel Vadot twister_opp: opp-table { 53*8ccc0d23SEmmanuel Vadot compatible = "operating-points-v2"; 54*8ccc0d23SEmmanuel Vadot 55*8ccc0d23SEmmanuel Vadot opp01 { 56*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <300000000>; 57*8ccc0d23SEmmanuel Vadot opp-level = <1>; 58*8ccc0d23SEmmanuel Vadot clock-latency-ns = <800>; 59*8ccc0d23SEmmanuel Vadot }; 60*8ccc0d23SEmmanuel Vadot opp02 { 61*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <396000000>; 62*8ccc0d23SEmmanuel Vadot opp-level = <2>; 63*8ccc0d23SEmmanuel Vadot clock-latency-ns = <53000>; 64*8ccc0d23SEmmanuel Vadot }; 65*8ccc0d23SEmmanuel Vadot opp03 { 66*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <792000000>; 67*8ccc0d23SEmmanuel Vadot opp-level = <3>; 68*8ccc0d23SEmmanuel Vadot clock-latency-ns = <18000>; 69*8ccc0d23SEmmanuel Vadot }; 70*8ccc0d23SEmmanuel Vadot opp04 { 71*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <1080000000>; 72*8ccc0d23SEmmanuel Vadot opp-level = <4>; 73*8ccc0d23SEmmanuel Vadot clock-latency-ns = <21000>; 74*8ccc0d23SEmmanuel Vadot }; 75*8ccc0d23SEmmanuel Vadot opp05 { 76*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <1440000000>; 77*8ccc0d23SEmmanuel Vadot opp-level = <5>; 78*8ccc0d23SEmmanuel Vadot clock-latency-ns = <25000>; 79*8ccc0d23SEmmanuel Vadot }; 80*8ccc0d23SEmmanuel Vadot opp06 { 81*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <1800000000>; 82*8ccc0d23SEmmanuel Vadot opp-level = <6>; 83*8ccc0d23SEmmanuel Vadot clock-latency-ns = <33000>; 84*8ccc0d23SEmmanuel Vadot }; 85*8ccc0d23SEmmanuel Vadot opp07 { 86*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <2160000000>; 87*8ccc0d23SEmmanuel Vadot opp-level = <7>; 88*8ccc0d23SEmmanuel Vadot clock-latency-ns = <45000>; 89*8ccc0d23SEmmanuel Vadot }; 90*8ccc0d23SEmmanuel Vadot#if 0 91*8ccc0d23SEmmanuel Vadot /* Not available until CPU deep sleep is implemented */ 92*8ccc0d23SEmmanuel Vadot opp08 { 93*8ccc0d23SEmmanuel Vadot opp-hz = /bits/ 64 <2160000000>; 94*8ccc0d23SEmmanuel Vadot opp-level = <8>; 95*8ccc0d23SEmmanuel Vadot clock-latency-ns = <45000>; 96*8ccc0d23SEmmanuel Vadot turbo-mode; 97*8ccc0d23SEmmanuel Vadot }; 98*8ccc0d23SEmmanuel Vadot#endif 99*8ccc0d23SEmmanuel Vadot }; 100*8ccc0d23SEmmanuel Vadot 1015f62a964SEmmanuel Vadot soc { 1025f62a964SEmmanuel Vadot compatible = "simple-bus"; 1035f62a964SEmmanuel Vadot #address-cells = <2>; 1045f62a964SEmmanuel Vadot #size-cells = <2>; 1055f62a964SEmmanuel Vadot nonposted-mmio; 1065f62a964SEmmanuel Vadot ranges; 1075f62a964SEmmanuel Vadot 108*8ccc0d23SEmmanuel Vadot cpufreq: performance-controller@202220000 { 109*8ccc0d23SEmmanuel Vadot compatible = "apple,s8000-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq"; 110*8ccc0d23SEmmanuel Vadot reg = <0x2 0x02220000 0 0x1000>; 111*8ccc0d23SEmmanuel Vadot #performance-domain-cells = <0>; 112*8ccc0d23SEmmanuel Vadot }; 113*8ccc0d23SEmmanuel Vadot 1145f62a964SEmmanuel Vadot serial0: serial@20a0c0000 { 1155f62a964SEmmanuel Vadot compatible = "apple,s5l-uart"; 1165f62a964SEmmanuel Vadot reg = <0x2 0x0a0c0000 0x0 0x4000>; 1175f62a964SEmmanuel Vadot reg-io-width = <4>; 1185f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1195f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 218 IRQ_TYPE_LEVEL_HIGH>; 1205f62a964SEmmanuel Vadot /* Use the bootloader-enabled clocks for now. */ 1215f62a964SEmmanuel Vadot clocks = <&clkref>, <&clkref>; 1225f62a964SEmmanuel Vadot clock-names = "uart", "clk_uart_baud0"; 123*8ccc0d23SEmmanuel Vadot power-domains = <&ps_uart0>; 1245f62a964SEmmanuel Vadot status = "disabled"; 1255f62a964SEmmanuel Vadot }; 1265f62a964SEmmanuel Vadot 127*8ccc0d23SEmmanuel Vadot pmgr: power-management@20e000000 { 128*8ccc0d23SEmmanuel Vadot compatible = "apple,s8000-pmgr", "apple,pmgr", "syscon", "simple-mfd"; 129*8ccc0d23SEmmanuel Vadot #address-cells = <1>; 130*8ccc0d23SEmmanuel Vadot #size-cells = <1>; 131*8ccc0d23SEmmanuel Vadot 132*8ccc0d23SEmmanuel Vadot reg = <0x2 0xe000000 0 0x8c000>; 133*8ccc0d23SEmmanuel Vadot }; 134*8ccc0d23SEmmanuel Vadot 1355f62a964SEmmanuel Vadot aic: interrupt-controller@20e100000 { 1365f62a964SEmmanuel Vadot compatible = "apple,s8000-aic", "apple,aic"; 1375f62a964SEmmanuel Vadot reg = <0x2 0x0e100000 0x0 0x100000>; 1385f62a964SEmmanuel Vadot #interrupt-cells = <3>; 1395f62a964SEmmanuel Vadot interrupt-controller; 140*8ccc0d23SEmmanuel Vadot power-domains = <&ps_aic>; 1415f62a964SEmmanuel Vadot }; 1425f62a964SEmmanuel Vadot 1435f62a964SEmmanuel Vadot pinctrl_ap: pinctrl@20f100000 { 1445f62a964SEmmanuel Vadot compatible = "apple,s8000-pinctrl", "apple,pinctrl"; 1455f62a964SEmmanuel Vadot reg = <0x2 0x0f100000 0x0 0x100000>; 146*8ccc0d23SEmmanuel Vadot power-domains = <&ps_gpio>; 1475f62a964SEmmanuel Vadot 1485f62a964SEmmanuel Vadot gpio-controller; 1495f62a964SEmmanuel Vadot #gpio-cells = <2>; 1505f62a964SEmmanuel Vadot gpio-ranges = <&pinctrl_ap 0 0 219>; 1515f62a964SEmmanuel Vadot apple,npins = <219>; 1525f62a964SEmmanuel Vadot 1535f62a964SEmmanuel Vadot interrupt-controller; 1545f62a964SEmmanuel Vadot #interrupt-cells = <2>; 1555f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1565f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>, 1575f62a964SEmmanuel Vadot <AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>, 1585f62a964SEmmanuel Vadot <AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>, 1595f62a964SEmmanuel Vadot <AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>, 1605f62a964SEmmanuel Vadot <AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>, 1615f62a964SEmmanuel Vadot <AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>, 1625f62a964SEmmanuel Vadot <AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>; 1635f62a964SEmmanuel Vadot }; 1645f62a964SEmmanuel Vadot 1655f62a964SEmmanuel Vadot pinctrl_aop: pinctrl@2100f0000 { 1665f62a964SEmmanuel Vadot compatible = "apple,s8000-pinctrl", "apple,pinctrl"; 1675f62a964SEmmanuel Vadot reg = <0x2 0x100f0000 0x0 0x100000>; 168*8ccc0d23SEmmanuel Vadot power-domains = <&ps_aop_gpio>; 1695f62a964SEmmanuel Vadot 1705f62a964SEmmanuel Vadot gpio-controller; 1715f62a964SEmmanuel Vadot #gpio-cells = <2>; 1725f62a964SEmmanuel Vadot gpio-ranges = <&pinctrl_aop 0 0 28>; 1735f62a964SEmmanuel Vadot apple,npins = <28>; 1745f62a964SEmmanuel Vadot 1755f62a964SEmmanuel Vadot interrupt-controller; 1765f62a964SEmmanuel Vadot #interrupt-cells = <2>; 1775f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 1785f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>, 1795f62a964SEmmanuel Vadot <AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>, 1805f62a964SEmmanuel Vadot <AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>, 1815f62a964SEmmanuel Vadot <AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>, 1825f62a964SEmmanuel Vadot <AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>, 1835f62a964SEmmanuel Vadot <AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>, 1845f62a964SEmmanuel Vadot <AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>; 1855f62a964SEmmanuel Vadot }; 1865f62a964SEmmanuel Vadot 187*8ccc0d23SEmmanuel Vadot pmgr_mini: power-management@210200000 { 188*8ccc0d23SEmmanuel Vadot compatible = "apple,s8000-pmgr", "apple,pmgr", "syscon", "simple-mfd"; 189*8ccc0d23SEmmanuel Vadot #address-cells = <1>; 190*8ccc0d23SEmmanuel Vadot #size-cells = <1>; 191*8ccc0d23SEmmanuel Vadot 192*8ccc0d23SEmmanuel Vadot reg = <0x2 0x10200000 0 0x84000>; 193*8ccc0d23SEmmanuel Vadot }; 194*8ccc0d23SEmmanuel Vadot 1955f62a964SEmmanuel Vadot wdt: watchdog@2102b0000 { 1965f62a964SEmmanuel Vadot compatible = "apple,s8000-wdt", "apple,wdt"; 1975f62a964SEmmanuel Vadot reg = <0x2 0x102b0000 0x0 0x4000>; 1985f62a964SEmmanuel Vadot clocks = <&clkref>; 1995f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 2005f62a964SEmmanuel Vadot interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>; 2015f62a964SEmmanuel Vadot }; 2025f62a964SEmmanuel Vadot }; 2035f62a964SEmmanuel Vadot 2045f62a964SEmmanuel Vadot timer { 2055f62a964SEmmanuel Vadot compatible = "arm,armv8-timer"; 2065f62a964SEmmanuel Vadot interrupt-parent = <&aic>; 2075f62a964SEmmanuel Vadot interrupt-names = "phys", "virt"; 2085f62a964SEmmanuel Vadot /* Note that A9X doesn't actually have a hypervisor (EL2 is not implemented). */ 2095f62a964SEmmanuel Vadot interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>, 2105f62a964SEmmanuel Vadot <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>; 2115f62a964SEmmanuel Vadot }; 2125f62a964SEmmanuel Vadot}; 213*8ccc0d23SEmmanuel Vadot 214*8ccc0d23SEmmanuel Vadot#include "s8001-pmgr.dtsi" 215