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 | |
| 47 | heartbeat { |
| 48 | label = "pine-h64:green:heartbeat"; |
| 49 | gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ |
| 50 | }; |
| 51 | |
| 52 | link { |
| 53 | label = "pine-h64:white:link"; |
| 54 | gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */ |
| 55 | }; |
| 56 | |
| 57 | status { |
| 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; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 145 | bus-width = <8>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 146 | status = "okay"; |
| 147 | }; |
| 148 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 149 | &ohci0 { |
| 150 | status = "okay"; |
| 151 | }; |
| 152 | |
| 153 | &ohci3 { |
| 154 | status = "okay"; |
| 155 | }; |
| 156 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 157 | &pio { |
| 158 | vcc-pc-supply = <®_bldo2>; |
| 159 | vcc-pd-supply = <®_cldo1>; |
| 160 | vcc-pg-supply = <®_aldo1>; |
| 161 | }; |
| 162 | |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 163 | &r_i2c { |
| 164 | status = "okay"; |
| 165 | |
| 166 | axp805: pmic@36 { |
| 167 | compatible = "x-powers,axp805", "x-powers,axp806"; |
| 168 | reg = <0x36>; |
| 169 | interrupt-parent = <&r_intc>; |
| 170 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
| 171 | interrupt-controller; |
| 172 | #interrupt-cells = <1>; |
| 173 | x-powers,self-working-mode; |
| 174 | |
| 175 | regulators { |
| 176 | reg_aldo1: aldo1 { |
| 177 | regulator-always-on; |
| 178 | regulator-min-microvolt = <3300000>; |
| 179 | regulator-max-microvolt = <3300000>; |
| 180 | regulator-name = "vcc-pl"; |
| 181 | }; |
| 182 | |
| 183 | reg_aldo2: aldo2 { |
| 184 | regulator-min-microvolt = <3300000>; |
| 185 | regulator-max-microvolt = <3300000>; |
| 186 | regulator-name = "vcc-ac200"; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 187 | regulator-enable-ramp-delay = <100000>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 188 | }; |
| 189 | |
| 190 | reg_aldo3: aldo3 { |
| 191 | /* This regulator is connected with CLDO1 */ |
| 192 | regulator-always-on; |
| 193 | regulator-min-microvolt = <3300000>; |
| 194 | regulator-max-microvolt = <3300000>; |
| 195 | regulator-name = "vcc-3v3-1"; |
| 196 | }; |
| 197 | |
| 198 | reg_bldo1: bldo1 { |
| 199 | regulator-always-on; |
| 200 | regulator-min-microvolt = <1800000>; |
| 201 | regulator-max-microvolt = <1800000>; |
| 202 | regulator-name = "vcc-bias-pll"; |
| 203 | }; |
| 204 | |
| 205 | reg_bldo2: bldo2 { |
| 206 | regulator-always-on; |
| 207 | regulator-min-microvolt = <1800000>; |
| 208 | regulator-max-microvolt = <1800000>; |
| 209 | regulator-name = "vcc-efuse-pcie-hdmi-io"; |
| 210 | }; |
| 211 | |
| 212 | reg_bldo3: bldo3 { |
| 213 | regulator-always-on; |
| 214 | regulator-min-microvolt = <1800000>; |
| 215 | regulator-max-microvolt = <1800000>; |
| 216 | regulator-name = "vcc-dcxoio"; |
| 217 | }; |
| 218 | |
| 219 | bldo4 { |
| 220 | /* unused */ |
| 221 | }; |
| 222 | |
| 223 | reg_cldo1: cldo1 { |
| 224 | /* This regulator is connected with ALDO3 */ |
| 225 | regulator-always-on; |
| 226 | regulator-min-microvolt = <3300000>; |
| 227 | regulator-max-microvolt = <3300000>; |
| 228 | regulator-name = "vcc-3v3-2"; |
| 229 | }; |
| 230 | |
| 231 | reg_cldo2: cldo2 { |
| 232 | regulator-min-microvolt = <3300000>; |
| 233 | regulator-max-microvolt = <3300000>; |
| 234 | regulator-name = "vcc-wifi-1"; |
| 235 | }; |
| 236 | |
| 237 | reg_cldo3: cldo3 { |
| 238 | regulator-min-microvolt = <3300000>; |
| 239 | regulator-max-microvolt = <3300000>; |
| 240 | regulator-name = "vcc-wifi-2"; |
| 241 | }; |
| 242 | |
| 243 | reg_dcdca: dcdca { |
| 244 | regulator-always-on; |
| 245 | regulator-min-microvolt = <810000>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 246 | regulator-max-microvolt = <1160000>; |
| 247 | regulator-ramp-delay = <2500>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 248 | regulator-name = "vdd-cpu"; |
| 249 | }; |
| 250 | |
| 251 | reg_dcdcc: dcdcc { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 252 | regulator-enable-ramp-delay = <32000>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 253 | regulator-min-microvolt = <810000>; |
| 254 | regulator-max-microvolt = <1080000>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 255 | regulator-ramp-delay = <2500>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 256 | regulator-name = "vdd-gpu"; |
| 257 | }; |
| 258 | |
| 259 | reg_dcdcd: dcdcd { |
| 260 | regulator-always-on; |
| 261 | regulator-min-microvolt = <960000>; |
| 262 | regulator-max-microvolt = <960000>; |
| 263 | regulator-name = "vdd-sys"; |
| 264 | }; |
| 265 | |
| 266 | reg_dcdce: dcdce { |
| 267 | regulator-always-on; |
| 268 | regulator-min-microvolt = <1200000>; |
| 269 | regulator-max-microvolt = <1200000>; |
| 270 | regulator-name = "vcc-dram"; |
| 271 | }; |
| 272 | |
| 273 | sw { |
| 274 | /* unused */ |
| 275 | }; |
| 276 | }; |
| 277 | }; |
| 278 | |
| 279 | pcf8563: rtc@51 { |
| 280 | compatible = "nxp,pcf8563"; |
| 281 | reg = <0x51>; |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 282 | interrupt-parent = <&r_intc>; |
| 283 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 284 | #clock-cells = <0>; |
| 285 | }; |
| 286 | }; |
| 287 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 288 | &r_ir { |
| 289 | status = "okay"; |
| 290 | }; |
| 291 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 292 | &r_pio { |
| 293 | vcc-pm-supply = <®_aldo1>; |
| 294 | }; |
| 295 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 296 | &rtc { |
| 297 | clocks = <&ext_osc32k>; |
| 298 | }; |
| 299 | |
| 300 | /* |
| 301 | * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI |
| 302 | * flash and eMMC at the same time, as one of them would fail probing. |
| 303 | * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can |
| 304 | * fix this up in no eMMC is connected. |
| 305 | */ |
| 306 | &spi0 { |
| 307 | pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>; |
| 308 | pinctrl-names = "default"; |
| 309 | status = "disabled"; |
| 310 | |
| 311 | flash@0 { |
| 312 | compatible = "winbond,w25q128", "jedec,spi-nor"; |
| 313 | reg = <0>; |
| 314 | spi-max-frequency = <4000000>; |
| 315 | }; |
| 316 | }; |
| 317 | |
Icenowy Zheng | 1259869 | 2018-07-21 16:20:32 +0800 | [diff] [blame] | 318 | &uart0 { |
| 319 | pinctrl-names = "default"; |
| 320 | pinctrl-0 = <&uart0_ph_pins>; |
| 321 | status = "okay"; |
| 322 | }; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 323 | |
| 324 | &usb2otg { |
| 325 | dr_mode = "host"; |
| 326 | status = "okay"; |
| 327 | }; |
| 328 | |
| 329 | &usb2phy { |
| 330 | usb0_vbus-supply = <®_usb_vbus>; |
| 331 | usb3_vbus-supply = <®_usb_vbus>; |
| 332 | status = "okay"; |
| 333 | }; |