| 1 |
// SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 |
/* |
| 3 |
* Apple T7000 "A8" SoC |
| 4 |
* |
| 5 |
* Other names: H7P, "Fiji" |
| 6 |
* |
| 7 |
* Copyright (c) 2022, Konrad Dybcio <[email protected]> |
| 8 |
* Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts. |
| 9 |
*/ |
| 10 |
|
| 11 |
#include <dt-bindings/gpio/gpio.h> |
| 12 |
#include <dt-bindings/interrupt-controller/apple-aic.h> |
| 13 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 14 |
#include <dt-bindings/pinctrl/apple.h> |
| 15 |
|
| 16 |
/ { |
| 17 |
interrupt-parent = <&aic>; |
| 18 |
#address-cells = <2>; |
| 19 |
#size-cells = <2>; |
| 20 |
|
| 21 |
clkref: clock-ref { |
| 22 |
compatible = "fixed-clock"; |
| 23 |
#clock-cells = <0>; |
| 24 |
clock-frequency = <24000000>; |
| 25 |
clock-output-names = "clkref"; |
| 26 |
}; |
| 27 |
|
| 28 |
cpus { |
| 29 |
#address-cells = <2>; |
| 30 |
#size-cells = <0>; |
| 31 |
|
| 32 |
cpu0: cpu@0 { |
| 33 |
compatible = "apple,typhoon"; |
| 34 |
reg = <0x0 0x0>; |
| 35 |
cpu-release-addr = <0 0>; /* To be filled in by loader */ |
| 36 |
performance-domains = <&cpufreq>; |
| 37 |
operating-points-v2 = <&typhoon_opp>; |
| 38 |
enable-method = "spin-table"; |
| 39 |
device_type = "cpu"; |
| 40 |
next-level-cache = <&l2_cache>; |
| 41 |
i-cache-size = <0x10000>; |
| 42 |
d-cache-size = <0x10000>; |
| 43 |
}; |
| 44 |
|
| 45 |
cpu1: cpu@1 { |
| 46 |
compatible = "apple,typhoon"; |
| 47 |
reg = <0x0 0x1>; |
| 48 |
cpu-release-addr = <0 0>; /* To be filled in by loader */ |
| 49 |
performance-domains = <&cpufreq>; |
| 50 |
operating-points-v2 = <&typhoon_opp>; |
| 51 |
enable-method = "spin-table"; |
| 52 |
device_type = "cpu"; |
| 53 |
next-level-cache = <&l2_cache>; |
| 54 |
i-cache-size = <0x10000>; |
| 55 |
d-cache-size = <0x10000>; |
| 56 |
}; |
| 57 |
|
| 58 |
l2_cache: l2-cache { |
| 59 |
compatible = "cache"; |
| 60 |
cache-level = <2>; |
| 61 |
cache-unified; |
| 62 |
cache-size = <0x100000>; |
| 63 |
}; |
| 64 |
}; |
| 65 |
|
| 66 |
typhoon_opp: opp-table { |
| 67 |
compatible = "operating-points-v2"; |
| 68 |
|
| 69 |
opp01 { |
| 70 |
opp-hz = /bits/ 64 <300000000>; |
| 71 |
opp-level = <1>; |
| 72 |
clock-latency-ns = <300>; |
| 73 |
}; |
| 74 |
opp02 { |
| 75 |
opp-hz = /bits/ 64 <396000000>; |
| 76 |
opp-level = <2>; |
| 77 |
clock-latency-ns = <50000>; |
| 78 |
}; |
| 79 |
opp03 { |
| 80 |
opp-hz = /bits/ 64 <600000000>; |
| 81 |
opp-level = <3>; |
| 82 |
clock-latency-ns = <29000>; |
| 83 |
}; |
| 84 |
opp04 { |
| 85 |
opp-hz = /bits/ 64 <840000000>; |
| 86 |
opp-level = <4>; |
| 87 |
clock-latency-ns = <29000>; |
| 88 |
}; |
| 89 |
opp05 { |
| 90 |
opp-hz = /bits/ 64 <1128000000>; |
| 91 |
opp-level = <5>; |
| 92 |
clock-latency-ns = <36000>; |
| 93 |
}; |
| 94 |
typhoon_opp06: opp06 { |
| 95 |
opp-hz = /bits/ 64 <1392000000>; |
| 96 |
opp-level = <6>; |
| 97 |
clock-latency-ns = <42000>; |
| 98 |
status = "disabled"; /* Not available on N102 */ |
| 99 |
}; |
| 100 |
typhoon_opp07: opp07 { |
| 101 |
opp-hz = /bits/ 64 <1512000000>; |
| 102 |
opp-level = <7>; |
| 103 |
clock-latency-ns = <49000>; |
| 104 |
status = "disabled"; /* J96 and J97 only */ |
| 105 |
}; |
| 106 |
}; |
| 107 |
|
| 108 |
soc { |
| 109 |
compatible = "simple-bus"; |
| 110 |
#address-cells = <2>; |
| 111 |
#size-cells = <2>; |
| 112 |
nonposted-mmio; |
| 113 |
ranges; |
| 114 |
|
| 115 |
cpufreq: performance-controller@202220000 { |
| 116 |
compatible = "apple,t7000-cluster-cpufreq", "apple,s5l8960x-cluster-cpufreq"; |
| 117 |
reg = <0x2 0x02220000 0 0x1000>; |
| 118 |
#performance-domain-cells = <0>; |
| 119 |
}; |
| 120 |
|
| 121 |
serial0: serial@20a0c0000 { |
| 122 |
compatible = "apple,s5l-uart"; |
| 123 |
reg = <0x2 0x0a0c0000 0x0 0x4000>; |
| 124 |
reg-io-width = <4>; |
| 125 |
interrupt-parent = <&aic>; |
| 126 |
interrupts = <AIC_IRQ 158 IRQ_TYPE_LEVEL_HIGH>; |
| 127 |
/* Use the bootloader-enabled clocks for now. */ |
| 128 |
clocks = <&clkref>, <&clkref>; |
| 129 |
clock-names = "uart", "clk_uart_baud0"; |
| 130 |
power-domains = <&ps_uart0>; |
| 131 |
status = "disabled"; |
| 132 |
}; |
| 133 |
|
| 134 |
serial6: serial@20a0d8000 { |
| 135 |
compatible = "apple,s5l-uart"; |
| 136 |
reg = <0x2 0x0a0d8000 0x0 0x4000>; |
| 137 |
reg-io-width = <4>; |
| 138 |
interrupt-parent = <&aic>; |
| 139 |
interrupts = <AIC_IRQ 164 IRQ_TYPE_LEVEL_HIGH>; |
| 140 |
/* Use the bootloader-enabled clocks for now. */ |
| 141 |
clocks = <&clkref>, <&clkref>; |
| 142 |
clock-names = "uart", "clk_uart_baud0"; |
| 143 |
power-domains = <&ps_uart6>; |
| 144 |
status = "disabled"; |
| 145 |
}; |
| 146 |
|
| 147 |
i2c0: i2c@20a110000 { |
| 148 |
compatible = "apple,t7000-i2c", "apple,i2c"; |
| 149 |
reg = <0x2 0x0a110000 0x0 0x1000>; |
| 150 |
clocks = <&clkref>; |
| 151 |
interrupt-parent = <&aic>; |
| 152 |
interrupts = <AIC_IRQ 174 IRQ_TYPE_LEVEL_HIGH>; |
| 153 |
pinctrl-0 = <&i2c0_pins>; |
| 154 |
pinctrl-names = "default"; |
| 155 |
power-domains = <&ps_i2c0>; |
| 156 |
#address-cells = <1>; |
| 157 |
#size-cells = <0>; |
| 158 |
status = "disabled"; |
| 159 |
}; |
| 160 |
|
| 161 |
i2c1: i2c@20a111000 { |
| 162 |
compatible = "apple,t7000-i2c", "apple,i2c"; |
| 163 |
reg = <0x2 0x0a111000 0x0 0x1000>; |
| 164 |
clocks = <&clkref>; |
| 165 |
interrupt-parent = <&aic>; |
| 166 |
interrupts = <AIC_IRQ 175 IRQ_TYPE_LEVEL_HIGH>; |
| 167 |
pinctrl-0 = <&i2c1_pins>; |
| 168 |
pinctrl-names = "default"; |
| 169 |
power-domains = <&ps_i2c1>; |
| 170 |
#address-cells = <1>; |
| 171 |
#size-cells = <0>; |
| 172 |
status = "disabled"; |
| 173 |
}; |
| 174 |
|
| 175 |
i2c2: i2c@20a112000 { |
| 176 |
compatible = "apple,t7000-i2c", "apple,i2c"; |
| 177 |
reg = <0x2 0x0a112000 0x0 0x1000>; |
| 178 |
clocks = <&clkref>; |
| 179 |
interrupt-parent = <&aic>; |
| 180 |
interrupts = <AIC_IRQ 176 IRQ_TYPE_LEVEL_HIGH>; |
| 181 |
pinctrl-0 = <&i2c2_pins>; |
| 182 |
pinctrl-names = "default"; |
| 183 |
power-domains = <&ps_i2c2>; |
| 184 |
#address-cells = <1>; |
| 185 |
#size-cells = <0>; |
| 186 |
status = "disabled"; |
| 187 |
}; |
| 188 |
|
| 189 |
i2c3: i2c@20a113000 { |
| 190 |
compatible = "apple,t7000-i2c", "apple,i2c"; |
| 191 |
reg = <0x2 0x0a113000 0x0 0x1000>; |
| 192 |
clocks = <&clkref>; |
| 193 |
interrupt-parent = <&aic>; |
| 194 |
interrupts = <AIC_IRQ 177 IRQ_TYPE_LEVEL_HIGH>; |
| 195 |
pinctrl-0 = <&i2c3_pins>; |
| 196 |
pinctrl-names = "default"; |
| 197 |
power-domains = <&ps_i2c3>; |
| 198 |
#address-cells = <1>; |
| 199 |
#size-cells = <0>; |
| 200 |
status = "disabled"; |
| 201 |
}; |
| 202 |
|
| 203 |
pmgr: power-management@20e000000 { |
| 204 |
compatible = "apple,t7000-pmgr", "apple,pmgr", "syscon", "simple-mfd"; |
| 205 |
#address-cells = <1>; |
| 206 |
#size-cells = <1>; |
| 207 |
|
| 208 |
reg = <0x2 0xe000000 0 0x24000>; |
| 209 |
}; |
| 210 |
|
| 211 |
wdt: watchdog@20e027000 { |
| 212 |
compatible = "apple,t7000-wdt", "apple,wdt"; |
| 213 |
reg = <0x2 0x0e027000 0x0 0x1000>; |
| 214 |
clocks = <&clkref>; |
| 215 |
interrupt-parent = <&aic>; |
| 216 |
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>; |
| 217 |
}; |
| 218 |
|
| 219 |
aic: interrupt-controller@20e100000 { |
| 220 |
compatible = "apple,t7000-aic", "apple,aic"; |
| 221 |
reg = <0x2 0x0e100000 0x0 0x100000>; |
| 222 |
#interrupt-cells = <3>; |
| 223 |
interrupt-controller; |
| 224 |
power-domains = <&ps_aic>; |
| 225 |
}; |
| 226 |
|
| 227 |
dwi_bl: backlight@20e200010 { |
| 228 |
compatible = "apple,t7000-dwi-bl", "apple,dwi-bl"; |
| 229 |
reg = <0x2 0x0e200010 0x0 0x8>; |
| 230 |
power-domains = <&ps_dwi>; |
| 231 |
status = "disabled"; |
| 232 |
}; |
| 233 |
|
| 234 |
pinctrl: pinctrl@20e300000 { |
| 235 |
compatible = "apple,t7000-pinctrl", "apple,pinctrl"; |
| 236 |
reg = <0x2 0x0e300000 0x0 0x100000>; |
| 237 |
power-domains = <&ps_gpio>; |
| 238 |
|
| 239 |
gpio-controller; |
| 240 |
#gpio-cells = <2>; |
| 241 |
gpio-ranges = <&pinctrl 0 0 208>; |
| 242 |
apple,npins = <208>; |
| 243 |
|
| 244 |
interrupt-controller; |
| 245 |
#interrupt-cells = <2>; |
| 246 |
interrupt-parent = <&aic>; |
| 247 |
interrupts = <AIC_IRQ 62 IRQ_TYPE_LEVEL_HIGH>, |
| 248 |
<AIC_IRQ 63 IRQ_TYPE_LEVEL_HIGH>, |
| 249 |
<AIC_IRQ 64 IRQ_TYPE_LEVEL_HIGH>, |
| 250 |
<AIC_IRQ 65 IRQ_TYPE_LEVEL_HIGH>, |
| 251 |
<AIC_IRQ 66 IRQ_TYPE_LEVEL_HIGH>, |
| 252 |
<AIC_IRQ 67 IRQ_TYPE_LEVEL_HIGH>, |
| 253 |
<AIC_IRQ 68 IRQ_TYPE_LEVEL_HIGH>; |
| 254 |
|
| 255 |
i2c0_pins: i2c0-pins { |
| 256 |
pinmux = <APPLE_PINMUX(97, 1)>, |
| 257 |
<APPLE_PINMUX(96, 1)>; |
| 258 |
}; |
| 259 |
|
| 260 |
i2c1_pins: i2c1-pins { |
| 261 |
pinmux = <APPLE_PINMUX(139, 1)>, |
| 262 |
<APPLE_PINMUX(138, 1)>; |
| 263 |
}; |
| 264 |
|
| 265 |
i2c2_pins: i2c2-pins { |
| 266 |
pinmux = <APPLE_PINMUX(65, 1)>, |
| 267 |
<APPLE_PINMUX(64, 1)>; |
| 268 |
}; |
| 269 |
|
| 270 |
i2c3_pins: i2c3-pins { |
| 271 |
pinmux = <APPLE_PINMUX(87, 1)>, |
| 272 |
<APPLE_PINMUX(86, 1)>; |
| 273 |
}; |
| 274 |
}; |
| 275 |
}; |
| 276 |
|
| 277 |
timer { |
| 278 |
compatible = "arm,armv8-timer"; |
| 279 |
interrupt-parent = <&aic>; |
| 280 |
interrupt-names = "phys", "virt"; |
| 281 |
/* Note that A8 doesn't actually have a hypervisor (EL2 is not implemented). */ |
| 282 |
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>, |
| 283 |
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>; |
| 284 |
}; |
| 285 |
}; |
| 286 |
|
| 287 |
#include "t7000-pmgr.dtsi" |