.. | .. |
---|
1 | | -// SPDX-License-Identifier: (GPL-2.0+ or MIT) |
---|
2 | | -/* |
---|
3 | | - * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io> |
---|
4 | | - */ |
---|
| 1 | +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
---|
| 2 | +// Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io> |
---|
5 | 3 | |
---|
6 | 4 | /dts-v1/; |
---|
7 | 5 | |
---|
8 | 6 | #include "sun50i-h6.dtsi" |
---|
| 7 | +#include "sun50i-h6-cpu-opp.dtsi" |
---|
9 | 8 | |
---|
10 | 9 | #include <dt-bindings/gpio/gpio.h> |
---|
11 | 10 | |
---|
12 | 11 | / { |
---|
13 | | - model = "Pine H64"; |
---|
| 12 | + model = "Pine H64 model A"; |
---|
14 | 13 | compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; |
---|
15 | 14 | |
---|
16 | 15 | aliases { |
---|
| 16 | + ethernet0 = &emac; |
---|
17 | 17 | serial0 = &uart0; |
---|
| 18 | + spi0 = &spi0; |
---|
18 | 19 | }; |
---|
19 | 20 | |
---|
20 | 21 | chosen { |
---|
21 | 22 | stdout-path = "serial0:115200n8"; |
---|
| 23 | + }; |
---|
| 24 | + |
---|
| 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 { |
---|
| 33 | + compatible = "hdmi-connector"; |
---|
| 34 | + type = "a"; |
---|
| 35 | + ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
---|
| 36 | + |
---|
| 37 | + port { |
---|
| 38 | + hdmi_con_in: endpoint { |
---|
| 39 | + remote-endpoint = <&hdmi_out_con>; |
---|
| 40 | + }; |
---|
| 41 | + }; |
---|
22 | 42 | }; |
---|
23 | 43 | |
---|
24 | 44 | leds { |
---|
.. | .. |
---|
39 | 59 | gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ |
---|
40 | 60 | }; |
---|
41 | 61 | }; |
---|
| 62 | + |
---|
| 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 | + |
---|
| 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 | + }; |
---|
| 82 | +}; |
---|
| 83 | + |
---|
| 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 | + |
---|
| 100 | +&emac { |
---|
| 101 | + pinctrl-names = "default"; |
---|
| 102 | + pinctrl-0 = <&ext_rgmii_pins>; |
---|
| 103 | + phy-mode = "rgmii-id"; |
---|
| 104 | + phy-handle = <&ext_rgmii_phy>; |
---|
| 105 | + phy-supply = <®_gmac_3v3>; |
---|
| 106 | + allwinner,rx-delay-ps = <200>; |
---|
| 107 | + allwinner,tx-delay-ps = <200>; |
---|
| 108 | + status = "okay"; |
---|
| 109 | +}; |
---|
| 110 | + |
---|
| 111 | +&gpu { |
---|
| 112 | + mali-supply = <®_dcdcc>; |
---|
| 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 | + |
---|
| 126 | +&mdio { |
---|
| 127 | + ext_rgmii_phy: ethernet-phy@1 { |
---|
| 128 | + compatible = "ethernet-phy-ieee802.3-c22"; |
---|
| 129 | + reg = <1>; |
---|
| 130 | + }; |
---|
42 | 131 | }; |
---|
43 | 132 | |
---|
44 | 133 | &mmc0 { |
---|
45 | | - pinctrl-names = "default"; |
---|
46 | | - pinctrl-0 = <&mmc0_pins>; |
---|
47 | 134 | vmmc-supply = <®_cldo1>; |
---|
48 | 135 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; |
---|
49 | 136 | bus-width = <4>; |
---|
.. | .. |
---|
51 | 138 | }; |
---|
52 | 139 | |
---|
53 | 140 | &mmc2 { |
---|
54 | | - pinctrl-names = "default"; |
---|
55 | | - pinctrl-0 = <&mmc2_pins>; |
---|
56 | 141 | vmmc-supply = <®_cldo1>; |
---|
57 | 142 | vqmmc-supply = <®_bldo2>; |
---|
58 | 143 | non-removable; |
---|
59 | 144 | cap-mmc-hw-reset; |
---|
60 | 145 | bus-width = <8>; |
---|
61 | 146 | status = "okay"; |
---|
| 147 | +}; |
---|
| 148 | + |
---|
| 149 | +&ohci0 { |
---|
| 150 | + status = "okay"; |
---|
| 151 | +}; |
---|
| 152 | + |
---|
| 153 | +&ohci3 { |
---|
| 154 | + status = "okay"; |
---|
| 155 | +}; |
---|
| 156 | + |
---|
| 157 | +&pio { |
---|
| 158 | + vcc-pc-supply = <®_bldo2>; |
---|
| 159 | + vcc-pd-supply = <®_cldo1>; |
---|
| 160 | + vcc-pg-supply = <®_aldo1>; |
---|
62 | 161 | }; |
---|
63 | 162 | |
---|
64 | 163 | &r_i2c { |
---|
.. | .. |
---|
85 | 184 | regulator-min-microvolt = <3300000>; |
---|
86 | 185 | regulator-max-microvolt = <3300000>; |
---|
87 | 186 | regulator-name = "vcc-ac200"; |
---|
| 187 | + regulator-enable-ramp-delay = <100000>; |
---|
88 | 188 | }; |
---|
89 | 189 | |
---|
90 | 190 | reg_aldo3: aldo3 { |
---|
.. | .. |
---|
143 | 243 | reg_dcdca: dcdca { |
---|
144 | 244 | regulator-always-on; |
---|
145 | 245 | regulator-min-microvolt = <810000>; |
---|
146 | | - regulator-max-microvolt = <1080000>; |
---|
| 246 | + regulator-max-microvolt = <1160000>; |
---|
| 247 | + regulator-ramp-delay = <2500>; |
---|
147 | 248 | regulator-name = "vdd-cpu"; |
---|
148 | 249 | }; |
---|
149 | 250 | |
---|
150 | 251 | reg_dcdcc: dcdcc { |
---|
| 252 | + regulator-enable-ramp-delay = <32000>; |
---|
151 | 253 | regulator-min-microvolt = <810000>; |
---|
152 | 254 | regulator-max-microvolt = <1080000>; |
---|
| 255 | + regulator-ramp-delay = <2500>; |
---|
153 | 256 | regulator-name = "vdd-gpu"; |
---|
154 | 257 | }; |
---|
155 | 258 | |
---|
.. | .. |
---|
182 | 285 | }; |
---|
183 | 286 | }; |
---|
184 | 287 | |
---|
| 288 | +&r_ir { |
---|
| 289 | + status = "okay"; |
---|
| 290 | +}; |
---|
| 291 | + |
---|
| 292 | +&r_pio { |
---|
| 293 | + vcc-pm-supply = <®_aldo1>; |
---|
| 294 | +}; |
---|
| 295 | + |
---|
| 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 | + |
---|
185 | 318 | &uart0 { |
---|
186 | 319 | pinctrl-names = "default"; |
---|
187 | 320 | pinctrl-0 = <&uart0_ph_pins>; |
---|
188 | 321 | status = "okay"; |
---|
189 | 322 | }; |
---|
| 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 | +}; |
---|