Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | // Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io> |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 3 | |
| 4 | /dts-v1/; |
| 5 | |
| 6 | #include "sun50i-h6.dtsi" |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 7 | #include "sun50i-h6-cpu-opp.dtsi" |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 8 | |
| 9 | #include <dt-bindings/gpio/gpio.h> |
| 10 | |
| 11 | / { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 12 | model = "Pine H64 model A"; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 13 | compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; |
| 14 | |
| 15 | aliases { |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 16 | ethernet0 = &emac; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 17 | serial0 = &uart0; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 18 | spi0 = &spi0; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 19 | }; |
| 20 | |
| 21 | chosen { |
| 22 | stdout-path = "serial0:115200n8"; |
| 23 | }; |
| 24 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 25 | ext_osc32k: ext_osc32k_clk { |
| 26 | #clock-cells = <0>; |
| 27 | compatible = "fixed-clock"; |
| 28 | clock-frequency = <32768>; |
| 29 | clock-output-names = "ext_osc32k"; |
| 30 | }; |
| 31 | |
| 32 | hdmi_connector: connector { |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 33 | compatible = "hdmi-connector"; |
| 34 | type = "a"; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 35 | ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 36 | |
| 37 | port { |
| 38 | hdmi_con_in: endpoint { |
| 39 | remote-endpoint = <&hdmi_out_con>; |
| 40 | }; |
| 41 | }; |
| 42 | }; |
| 43 | |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 44 | leds { |
| 45 | compatible = "gpio-leds"; |
| 46 | |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 47 | led-0 { |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 48 | label = "pine-h64:green:heartbeat"; |
| 49 | gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ |
| 50 | }; |
| 51 | |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 52 | led-1 { |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 53 | label = "pine-h64:white:link"; |
| 54 | gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */ |
| 55 | }; |
| 56 | |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 57 | led-2 { |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 58 | label = "pine-h64:blue:status"; |
| 59 | gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ |
| 60 | }; |
| 61 | }; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 62 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 63 | reg_gmac_3v3: gmac-3v3 { |
| 64 | compatible = "regulator-fixed"; |
| 65 | regulator-name = "vcc-gmac-3v3"; |
| 66 | regulator-min-microvolt = <3300000>; |
| 67 | regulator-max-microvolt = <3300000>; |
| 68 | startup-delay-us = <100000>; |
| 69 | gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; |
| 70 | enable-active-high; |
| 71 | }; |
| 72 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 73 | reg_usb_vbus: vbus { |
| 74 | compatible = "regulator-fixed"; |
| 75 | regulator-name = "usb-vbus"; |
| 76 | regulator-min-microvolt = <5000000>; |
| 77 | regulator-max-microvolt = <5000000>; |
| 78 | startup-delay-us = <100000>; |
| 79 | gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; |
| 80 | enable-active-high; |
| 81 | }; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 82 | }; |
| 83 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 84 | &cpu0 { |
| 85 | cpu-supply = <®_dcdca>; |
| 86 | }; |
| 87 | |
| 88 | &de { |
| 89 | status = "okay"; |
| 90 | }; |
| 91 | |
| 92 | &ehci0 { |
| 93 | status = "okay"; |
| 94 | }; |
| 95 | |
| 96 | &ehci3 { |
| 97 | status = "okay"; |
| 98 | }; |
| 99 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 100 | &emac { |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 101 | pinctrl-names = "default"; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 102 | pinctrl-0 = <&ext_rgmii_pins>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 103 | phy-mode = "rgmii-id"; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 104 | phy-handle = <&ext_rgmii_phy>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 105 | phy-supply = <®_gmac_3v3>; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 106 | allwinner,rx-delay-ps = <200>; |
| 107 | allwinner,tx-delay-ps = <200>; |
| 108 | status = "okay"; |
| 109 | }; |
| 110 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 111 | &gpu { |
| 112 | mali-supply = <®_dcdcc>; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 113 | status = "okay"; |
| 114 | }; |
| 115 | |
| 116 | &hdmi { |
| 117 | status = "okay"; |
| 118 | }; |
| 119 | |
| 120 | &hdmi_out { |
| 121 | hdmi_out_con: endpoint { |
| 122 | remote-endpoint = <&hdmi_con_in>; |
| 123 | }; |
| 124 | }; |
| 125 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 126 | &mdio { |
| 127 | ext_rgmii_phy: ethernet-phy@1 { |
| 128 | compatible = "ethernet-phy-ieee802.3-c22"; |
| 129 | reg = <1>; |
| 130 | }; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 131 | }; |
| 132 | |
| 133 | &mmc0 { |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 134 | vmmc-supply = <®_cldo1>; |
| 135 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 136 | bus-width = <4>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 137 | status = "okay"; |
| 138 | }; |
| 139 | |
| 140 | &mmc2 { |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 141 | vmmc-supply = <®_cldo1>; |
| 142 | vqmmc-supply = <®_bldo2>; |
| 143 | non-removable; |
| 144 | cap-mmc-hw-reset; |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 145 | mmc-hs200-1_8v; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 146 | bus-width = <8>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 147 | status = "okay"; |
| 148 | }; |
| 149 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 150 | &ohci0 { |
| 151 | status = "okay"; |
| 152 | }; |
| 153 | |
| 154 | &ohci3 { |
| 155 | status = "okay"; |
| 156 | }; |
| 157 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 158 | &pio { |
| 159 | vcc-pc-supply = <®_bldo2>; |
| 160 | vcc-pd-supply = <®_cldo1>; |
| 161 | vcc-pg-supply = <®_aldo1>; |
| 162 | }; |
| 163 | |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 164 | &r_i2c { |
| 165 | status = "okay"; |
| 166 | |
| 167 | axp805: pmic@36 { |
| 168 | compatible = "x-powers,axp805", "x-powers,axp806"; |
| 169 | reg = <0x36>; |
| 170 | interrupt-parent = <&r_intc>; |
| 171 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
| 172 | interrupt-controller; |
| 173 | #interrupt-cells = <1>; |
| 174 | x-powers,self-working-mode; |
| 175 | |
| 176 | regulators { |
| 177 | reg_aldo1: aldo1 { |
| 178 | regulator-always-on; |
| 179 | regulator-min-microvolt = <3300000>; |
| 180 | regulator-max-microvolt = <3300000>; |
| 181 | regulator-name = "vcc-pl"; |
| 182 | }; |
| 183 | |
| 184 | reg_aldo2: aldo2 { |
| 185 | regulator-min-microvolt = <3300000>; |
| 186 | regulator-max-microvolt = <3300000>; |
| 187 | regulator-name = "vcc-ac200"; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 188 | regulator-enable-ramp-delay = <100000>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 189 | }; |
| 190 | |
| 191 | reg_aldo3: aldo3 { |
| 192 | /* This regulator is connected with CLDO1 */ |
| 193 | regulator-always-on; |
| 194 | regulator-min-microvolt = <3300000>; |
| 195 | regulator-max-microvolt = <3300000>; |
| 196 | regulator-name = "vcc-3v3-1"; |
| 197 | }; |
| 198 | |
| 199 | reg_bldo1: bldo1 { |
| 200 | regulator-always-on; |
| 201 | regulator-min-microvolt = <1800000>; |
| 202 | regulator-max-microvolt = <1800000>; |
| 203 | regulator-name = "vcc-bias-pll"; |
| 204 | }; |
| 205 | |
| 206 | reg_bldo2: bldo2 { |
| 207 | regulator-always-on; |
| 208 | regulator-min-microvolt = <1800000>; |
| 209 | regulator-max-microvolt = <1800000>; |
| 210 | regulator-name = "vcc-efuse-pcie-hdmi-io"; |
| 211 | }; |
| 212 | |
| 213 | reg_bldo3: bldo3 { |
| 214 | regulator-always-on; |
| 215 | regulator-min-microvolt = <1800000>; |
| 216 | regulator-max-microvolt = <1800000>; |
| 217 | regulator-name = "vcc-dcxoio"; |
| 218 | }; |
| 219 | |
| 220 | bldo4 { |
| 221 | /* unused */ |
| 222 | }; |
| 223 | |
| 224 | reg_cldo1: cldo1 { |
| 225 | /* This regulator is connected with ALDO3 */ |
| 226 | regulator-always-on; |
| 227 | regulator-min-microvolt = <3300000>; |
| 228 | regulator-max-microvolt = <3300000>; |
| 229 | regulator-name = "vcc-3v3-2"; |
| 230 | }; |
| 231 | |
| 232 | reg_cldo2: cldo2 { |
| 233 | regulator-min-microvolt = <3300000>; |
| 234 | regulator-max-microvolt = <3300000>; |
| 235 | regulator-name = "vcc-wifi-1"; |
| 236 | }; |
| 237 | |
| 238 | reg_cldo3: cldo3 { |
| 239 | regulator-min-microvolt = <3300000>; |
| 240 | regulator-max-microvolt = <3300000>; |
| 241 | regulator-name = "vcc-wifi-2"; |
| 242 | }; |
| 243 | |
| 244 | reg_dcdca: dcdca { |
| 245 | regulator-always-on; |
| 246 | regulator-min-microvolt = <810000>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 247 | regulator-max-microvolt = <1160000>; |
| 248 | regulator-ramp-delay = <2500>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 249 | regulator-name = "vdd-cpu"; |
| 250 | }; |
| 251 | |
| 252 | reg_dcdcc: dcdcc { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 253 | regulator-enable-ramp-delay = <32000>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 254 | regulator-min-microvolt = <810000>; |
| 255 | regulator-max-microvolt = <1080000>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 256 | regulator-ramp-delay = <2500>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 257 | regulator-name = "vdd-gpu"; |
| 258 | }; |
| 259 | |
| 260 | reg_dcdcd: dcdcd { |
| 261 | regulator-always-on; |
| 262 | regulator-min-microvolt = <960000>; |
| 263 | regulator-max-microvolt = <960000>; |
| 264 | regulator-name = "vdd-sys"; |
| 265 | }; |
| 266 | |
| 267 | reg_dcdce: dcdce { |
| 268 | regulator-always-on; |
| 269 | regulator-min-microvolt = <1200000>; |
| 270 | regulator-max-microvolt = <1200000>; |
| 271 | regulator-name = "vcc-dram"; |
| 272 | }; |
| 273 | |
| 274 | sw { |
| 275 | /* unused */ |
| 276 | }; |
| 277 | }; |
| 278 | }; |
| 279 | |
| 280 | pcf8563: rtc@51 { |
| 281 | compatible = "nxp,pcf8563"; |
| 282 | reg = <0x51>; |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 283 | interrupt-parent = <&r_intc>; |
| 284 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 285 | #clock-cells = <0>; |
| 286 | }; |
| 287 | }; |
| 288 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 289 | &r_ir { |
| 290 | status = "okay"; |
| 291 | }; |
| 292 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 293 | &r_pio { |
| 294 | vcc-pm-supply = <®_aldo1>; |
| 295 | }; |
| 296 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 297 | &rtc { |
| 298 | clocks = <&ext_osc32k>; |
| 299 | }; |
| 300 | |
| 301 | /* |
| 302 | * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI |
| 303 | * flash and eMMC at the same time, as one of them would fail probing. |
| 304 | * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can |
| 305 | * fix this up in no eMMC is connected. |
| 306 | */ |
| 307 | &spi0 { |
| 308 | pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>; |
| 309 | pinctrl-names = "default"; |
| 310 | status = "disabled"; |
| 311 | |
| 312 | flash@0 { |
| 313 | compatible = "winbond,w25q128", "jedec,spi-nor"; |
| 314 | reg = <0>; |
| 315 | spi-max-frequency = <4000000>; |
| 316 | }; |
| 317 | }; |
| 318 | |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 319 | &uart0 { |
| 320 | pinctrl-names = "default"; |
| 321 | pinctrl-0 = <&uart0_ph_pins>; |
| 322 | status = "okay"; |
| 323 | }; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 324 | |
| 325 | &usb2otg { |
| 326 | dr_mode = "host"; |
| 327 | status = "okay"; |
| 328 | }; |
| 329 | |
| 330 | &usb2phy { |
| 331 | usb0_vbus-supply = <®_usb_vbus>; |
| 332 | usb3_vbus-supply = <®_usb_vbus>; |
| 333 | status = "okay"; |
| 334 | }; |