1// SPDX-License-Identifier: GPL-2.0 OR MIT 2/* 3 * Apple T8010 "A10" SoC 4 * 5 * Other names: H9P, "Cayman" 6 * 7 * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org> 8 */ 9 10#include <dt-bindings/gpio/gpio.h> 11#include <dt-bindings/interrupt-controller/apple-aic.h> 12#include <dt-bindings/interrupt-controller/irq.h> 13#include <dt-bindings/pinctrl/apple.h> 14 15/ { 16 interrupt-parent = <&aic>; 17 #address-cells = <2>; 18 #size-cells = <2>; 19 20 clkref: clock-ref { 21 compatible = "fixed-clock"; 22 #clock-cells = <0>; 23 clock-frequency = <24000000>; 24 clock-output-names = "clkref"; 25 }; 26 27 cpus { 28 #address-cells = <2>; 29 #size-cells = <0>; 30 31 cpu0: cpu@0 { 32 compatible = "apple,hurricane-zephyr"; 33 reg = <0x0 0x0>; 34 cpu-release-addr = <0 0>; /* To be filled by loader */ 35 operating-points-v2 = <&fusion_opp>; 36 performance-domains = <&cpufreq>; 37 enable-method = "spin-table"; 38 device_type = "cpu"; 39 next-level-cache = <&l2_cache>; 40 i-cache-size = <0x10000>; /* P-core */ 41 d-cache-size = <0x10000>; /* P-core */ 42 }; 43 44 cpu1: cpu@1 { 45 compatible = "apple,hurricane-zephyr"; 46 reg = <0x0 0x1>; 47 cpu-release-addr = <0 0>; /* To be filled by loader */ 48 operating-points-v2 = <&fusion_opp>; 49 performance-domains = <&cpufreq>; 50 enable-method = "spin-table"; 51 device_type = "cpu"; 52 next-level-cache = <&l2_cache>; 53 i-cache-size = <0x10000>; /* P-core */ 54 d-cache-size = <0x10000>; /* P-core */ 55 }; 56 57 l2_cache: l2-cache { 58 compatible = "cache"; 59 cache-level = <2>; 60 cache-unified; 61 cache-size = <0x300000>; /* P-cluster */ 62 }; 63 }; 64 65 fusion_opp: opp-table { 66 compatible = "operating-points-v2"; 67 68 /* 69 * Apple Fusion Architecture: Hardware big.LITTLE switcher 70 * that use p-state transitions to switch between cores. 71 * Only one type of core can be active at a given time. 72 * 73 * The E-core frequencies are adjusted so performance scales 74 * linearly with reported clock speed. 75 */ 76 77 opp01 { 78 opp-hz = /bits/ 64 <172000000>; /* 300 MHz, E-core */ 79 opp-level = <1>; 80 clock-latency-ns = <11000>; 81 }; 82 opp02 { 83 opp-hz = /bits/ 64 <230000000>; /* 396 MHz, E-core */ 84 opp-level = <2>; 85 clock-latency-ns = <49000>; 86 }; 87 opp03 { 88 opp-hz = /bits/ 64 <425000000>; /* 732 MHz, E-core */ 89 opp-level = <3>; 90 clock-latency-ns = <13000>; 91 }; 92 opp04 { 93 opp-hz = /bits/ 64 <637000000>; /* 1092 MHz, E-core */ 94 opp-level = <4>; 95 clock-latency-ns = <18000>; 96 }; 97 opp05 { 98 opp-hz = /bits/ 64 <756000000>; 99 opp-level = <5>; 100 clock-latency-ns = <35000>; 101 }; 102 opp06 { 103 opp-hz = /bits/ 64 <1056000000>; 104 opp-level = <6>; 105 clock-latency-ns = <31000>; 106 }; 107 opp07 { 108 opp-hz = /bits/ 64 <1356000000>; 109 opp-level = <7>; 110 clock-latency-ns = <37000>; 111 }; 112 opp08 { 113 opp-hz = /bits/ 64 <1644000000>; 114 opp-level = <8>; 115 clock-latency-ns = <39500>; 116 }; 117 hurricane_opp09: opp09 { 118 opp-hz = /bits/ 64 <1944000000>; 119 opp-level = <9>; 120 clock-latency-ns = <46000>; 121 status = "disabled"; /* Not available on N112 */ 122 }; 123 hurricane_opp10: opp10 { 124 opp-hz = /bits/ 64 <2244000000>; 125 opp-level = <10>; 126 clock-latency-ns = <56000>; 127 status = "disabled"; /* Not available on N112 */ 128 }; 129#if 0 130 /* Not available until CPU deep sleep is implemented */ 131 hurricane_opp11: opp11 { 132 opp-hz = /bits/ 64 <2340000000>; 133 opp-level = <11>; 134 clock-latency-ns = <56000>; 135 turbo-mode; 136 status = "disabled"; /* Not available on N112 */ 137 }; 138#endif 139 }; 140 141 soc { 142 compatible = "simple-bus"; 143 #address-cells = <2>; 144 #size-cells = <2>; 145 nonposted-mmio; 146 ranges; 147 148 cpufreq: performance-controller@202f20000 { 149 compatible = "apple,t8010-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq"; 150 reg = <0x2 0x02f20000 0 0x1000>; 151 #performance-domain-cells = <0>; 152 }; 153 154 serial0: serial@20a0c0000 { 155 compatible = "apple,s5l-uart"; 156 reg = <0x2 0x0a0c0000 0x0 0x4000>; 157 reg-io-width = <4>; 158 interrupt-parent = <&aic>; 159 interrupts = <AIC_IRQ 218 IRQ_TYPE_LEVEL_HIGH>; 160 /* Use the bootloader-enabled clocks for now. */ 161 clocks = <&clkref>, <&clkref>; 162 clock-names = "uart", "clk_uart_baud0"; 163 power-domains = <&ps_uart0>; 164 status = "disabled"; 165 }; 166 167 i2c0: i2c@20a110000 { 168 compatible = "apple,t8010-i2c", "apple,i2c"; 169 reg = <0x2 0x0a110000 0x0 0x1000>; 170 clocks = <&clkref>; 171 interrupt-parent = <&aic>; 172 interrupts = <AIC_IRQ 232 IRQ_TYPE_LEVEL_HIGH>; 173 pinctrl-0 = <&i2c0_pins>; 174 pinctrl-names = "default"; 175 power-domains = <&ps_i2c0>; 176 #address-cells = <1>; 177 #size-cells = <0>; 178 status = "disabled"; 179 }; 180 181 i2c1: i2c@20a111000 { 182 compatible = "apple,t8010-i2c", "apple,i2c"; 183 reg = <0x2 0x0a111000 0x0 0x1000>; 184 clocks = <&clkref>; 185 interrupt-parent = <&aic>; 186 interrupts = <AIC_IRQ 233 IRQ_TYPE_LEVEL_HIGH>; 187 pinctrl-0 = <&i2c1_pins>; 188 pinctrl-names = "default"; 189 power-domains = <&ps_i2c1>; 190 #address-cells = <1>; 191 #size-cells = <0>; 192 status = "disabled"; 193 }; 194 195 i2c2: i2c@20a112000 { 196 compatible = "apple,t8010-i2c", "apple,i2c"; 197 reg = <0x2 0x0a112000 0x0 0x1000>; 198 clocks = <&clkref>; 199 interrupt-parent = <&aic>; 200 interrupts = <AIC_IRQ 234 IRQ_TYPE_LEVEL_HIGH>; 201 pinctrl-0 = <&i2c2_pins>; 202 pinctrl-names = "default"; 203 power-domains = <&ps_i2c2>; 204 #address-cells = <1>; 205 #size-cells = <0>; 206 status = "disabled"; 207 }; 208 209 i2c3: i2c@20a113000 { 210 compatible = "apple,t8010-i2c", "apple,i2c"; 211 reg = <0x2 0x0a113000 0x0 0x1000>; 212 clocks = <&clkref>; 213 interrupt-parent = <&aic>; 214 interrupts = <AIC_IRQ 235 IRQ_TYPE_LEVEL_HIGH>; 215 pinctrl-0 = <&i2c3_pins>; 216 pinctrl-names = "default"; 217 power-domains = <&ps_i2c3>; 218 #address-cells = <1>; 219 #size-cells = <0>; 220 status = "disabled"; 221 }; 222 223 pmgr: power-management@20e000000 { 224 compatible = "apple,t8010-pmgr", "apple,pmgr", "syscon", "simple-mfd"; 225 #address-cells = <1>; 226 #size-cells = <1>; 227 228 reg = <0x2 0xe000000 0 0x8c000>; 229 }; 230 231 aic: interrupt-controller@20e100000 { 232 compatible = "apple,t8010-aic", "apple,aic"; 233 reg = <0x2 0x0e100000 0x0 0x100000>; 234 #interrupt-cells = <3>; 235 interrupt-controller; 236 power-domains = <&ps_aic>; 237 }; 238 239 dwi_bl: backlight@20e200080 { 240 compatible = "apple,t8010-dwi-bl", "apple,dwi-bl"; 241 reg = <0x2 0x0e200080 0x0 0x8>; 242 power-domains = <&ps_dwi>; 243 status = "disabled"; 244 }; 245 246 pinctrl_ap: pinctrl@20f100000 { 247 compatible = "apple,t8010-pinctrl", "apple,pinctrl"; 248 reg = <0x2 0x0f100000 0x0 0x100000>; 249 power-domains = <&ps_gpio>; 250 251 gpio-controller; 252 #gpio-cells = <2>; 253 gpio-ranges = <&pinctrl_ap 0 0 208>; 254 apple,npins = <208>; 255 256 interrupt-controller; 257 #interrupt-cells = <2>; 258 interrupt-parent = <&aic>; 259 interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>, 260 <AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>, 261 <AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>, 262 <AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>, 263 <AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>, 264 <AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>, 265 <AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>; 266 267 i2c0_pins: i2c0-pins { 268 pinmux = <APPLE_PINMUX(197, 1)>, 269 <APPLE_PINMUX(196, 1)>; 270 }; 271 272 i2c1_pins: i2c1-pins { 273 pinmux = <APPLE_PINMUX(40, 1)>, 274 <APPLE_PINMUX(39, 1)>; 275 }; 276 277 i2c2_pins: i2c2-pins { 278 pinmux = <APPLE_PINMUX(132, 1)>, 279 <APPLE_PINMUX(133, 1)>; 280 }; 281 282 i2c3_pins: i2c3-pins { 283 pinmux = <APPLE_PINMUX(41, 1)>, 284 <APPLE_PINMUX(42, 1)>; 285 }; 286 }; 287 288 pinctrl_aop: pinctrl@2100f0000 { 289 compatible = "apple,t8010-pinctrl", "apple,pinctrl"; 290 reg = <0x2 0x100f0000 0x0 0x100000>; 291 power-domains = <&ps_aop_gpio>; 292 293 gpio-controller; 294 #gpio-cells = <2>; 295 gpio-ranges = <&pinctrl_aop 0 0 42>; 296 apple,npins = <42>; 297 298 interrupt-controller; 299 #interrupt-cells = <2>; 300 interrupt-parent = <&aic>; 301 interrupts = <AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>, 302 <AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>, 303 <AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>, 304 <AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>, 305 <AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>, 306 <AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>, 307 <AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>; 308 }; 309 310 pmgr_mini: power-management@210200000 { 311 compatible = "apple,t8010-pmgr", "apple,pmgr", "syscon", "simple-mfd"; 312 #address-cells = <1>; 313 #size-cells = <1>; 314 315 reg = <0x2 0x10200000 0 0x84000>; 316 }; 317 318 wdt: watchdog@2102b0000 { 319 compatible = "apple,t8010-wdt", "apple,wdt"; 320 reg = <0x2 0x102b0000 0x0 0x4000>; 321 clocks = <&clkref>; 322 interrupt-parent = <&aic>; 323 interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>; 324 }; 325 }; 326 327 timer { 328 compatible = "arm,armv8-timer"; 329 interrupt-parent = <&aic>; 330 interrupt-names = "phys", "virt"; 331 /* Note that A10 doesn't actually have a hypervisor (EL2 is not implemented). */ 332 interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>, 333 <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>; 334 }; 335}; 336 337#include "t8010-pmgr.dtsi" 338