treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm64 / boot / dts / allwinner / sun50i-h6-beelink-gs1.dts
blobf335f7482a7313349edd0346036a4b3058c35ba5
1 // SPDX-License-Identifier: (GPL-2.0+ or MIT)
2 /*
3  * Copyright (C) 2019 Clément Péron <peron.clem@gmail.com>
4  */
6 /dts-v1/;
8 #include "sun50i-h6.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
12 / {
13         model = "Beelink GS1";
14         compatible = "azw,beelink-gs1", "allwinner,sun50i-h6";
16         aliases {
17                 ethernet0 = &emac;
18                 serial0 = &uart0;
19         };
21         chosen {
22                 stdout-path = "serial0:115200n8";
23         };
25         connector {
26                 compatible = "hdmi-connector";
27                 type = "a";
28                 ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
30                 port {
31                         hdmi_con_in: endpoint {
32                                 remote-endpoint = <&hdmi_out_con>;
33                         };
34                 };
35         };
37         leds {
38                 compatible = "gpio-leds";
40                 power {
41                         label = "beelink:white:power";
42                         gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
43                         default-state = "on";
44                 };
45         };
47         reg_vcc5v: vcc5v {
48                 /* board wide 5V supply directly from the DC jack */
49                 compatible = "regulator-fixed";
50                 regulator-name = "vcc-5v";
51                 regulator-min-microvolt = <5000000>;
52                 regulator-max-microvolt = <5000000>;
53                 regulator-always-on;
54         };
56         sound-spdif {
57                 compatible = "simple-audio-card";
58                 simple-audio-card,name = "sun50i-h6-spdif";
60                 simple-audio-card,cpu {
61                         sound-dai = <&spdif>;
62                 };
64                 simple-audio-card,codec {
65                         sound-dai = <&spdif_out>;
66                 };
67         };
69         spdif_out: spdif-out {
70                 #sound-dai-cells = <0>;
71                 compatible = "linux,spdif-dit";
72         };
75 &de {
76         status = "okay";
79 &ehci0 {
80         status = "okay";
83 &emac {
84         pinctrl-names = "default";
85         pinctrl-0 = <&ext_rgmii_pins>;
86         phy-mode = "rgmii";
87         phy-handle = <&ext_rgmii_phy>;
88         phy-supply = <&reg_aldo2>;
89         status = "okay";
92 &gpu {
93         mali-supply = <&reg_dcdcc>;
94         status = "okay";
97 &hdmi {
98         status = "okay";
101 &hdmi_out {
102         hdmi_out_con: endpoint {
103                 remote-endpoint = <&hdmi_con_in>;
104         };
107 &mdio {
108         ext_rgmii_phy: ethernet-phy@1 {
109                 compatible = "ethernet-phy-ieee802.3-c22";
110                 reg = <1>;
111         };
114 &mmc0 {
115         vmmc-supply = <&reg_cldo1>;
116         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
117         bus-width = <4>;
118         status = "okay";
121 &mmc2 {
122         vmmc-supply = <&reg_cldo1>;
123         vqmmc-supply = <&reg_bldo2>;
124         non-removable;
125         cap-mmc-hw-reset;
126         bus-width = <8>;
127         status = "okay";
130 &ohci0 {
131         status = "okay";
134 &pio {
135         vcc-pd-supply = <&reg_cldo1>;
136         vcc-pg-supply = <&reg_aldo1>;
139 &r_i2c {
140         status = "okay";
142         axp805: pmic@36 {
143                 compatible = "x-powers,axp805", "x-powers,axp806";
144                 reg = <0x36>;
145                 interrupt-parent = <&r_intc>;
146                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
147                 interrupt-controller;
148                 #interrupt-cells = <1>;
149                 x-powers,self-working-mode;
150                 vina-supply = <&reg_vcc5v>;
151                 vinb-supply = <&reg_vcc5v>;
152                 vinc-supply = <&reg_vcc5v>;
153                 vind-supply = <&reg_vcc5v>;
154                 vine-supply = <&reg_vcc5v>;
155                 aldoin-supply = <&reg_vcc5v>;
156                 bldoin-supply = <&reg_vcc5v>;
157                 cldoin-supply = <&reg_vcc5v>;
159                 regulators {
160                         reg_aldo1: aldo1 {
161                                 regulator-always-on;
162                                 regulator-min-microvolt = <3300000>;
163                                 regulator-max-microvolt = <3300000>;
164                                 regulator-name = "vcc-pl";
165                         };
167                         reg_aldo2: aldo2 {
168                                 regulator-min-microvolt = <3300000>;
169                                 regulator-max-microvolt = <3300000>;
170                                 regulator-name = "vcc-ac200";
171                                 regulator-enable-ramp-delay = <100000>;
172                         };
174                         reg_aldo3: aldo3 {
175                                 regulator-always-on;
176                                 regulator-min-microvolt = <3300000>;
177                                 regulator-max-microvolt = <3300000>;
178                                 regulator-name = "vcc25-dram";
179                         };
181                         reg_bldo1: bldo1 {
182                                 regulator-always-on;
183                                 regulator-min-microvolt = <1800000>;
184                                 regulator-max-microvolt = <1800000>;
185                                 regulator-name = "vcc-bias-pll";
186                         };
188                         reg_bldo2: bldo2 {
189                                 regulator-always-on;
190                                 regulator-min-microvolt = <1800000>;
191                                 regulator-max-microvolt = <1800000>;
192                                 regulator-name = "vcc-efuse-pcie-hdmi-io";
193                         };
195                         reg_bldo3: bldo3 {
196                                 regulator-always-on;
197                                 regulator-min-microvolt = <1800000>;
198                                 regulator-max-microvolt = <1800000>;
199                                 regulator-name = "vcc-dcxoio";
200                         };
202                         bldo4 {
203                                 /* unused */
204                         };
206                         reg_cldo1: cldo1 {
207                                 regulator-always-on;
208                                 regulator-min-microvolt = <3300000>;
209                                 regulator-max-microvolt = <3300000>;
210                                 regulator-name = "vcc-3v3";
211                         };
213                         reg_cldo2: cldo2 {
214                                 regulator-min-microvolt = <3300000>;
215                                 regulator-max-microvolt = <3300000>;
216                                 regulator-name = "vcc-wifi-1";
217                         };
219                         reg_cldo3: cldo3 {
220                                 regulator-min-microvolt = <3300000>;
221                                 regulator-max-microvolt = <3300000>;
222                                 regulator-name = "vcc-wifi-2";
223                         };
225                         reg_dcdca: dcdca {
226                                 regulator-always-on;
227                                 regulator-min-microvolt = <810000>;
228                                 regulator-max-microvolt = <1080000>;
229                                 regulator-name = "vdd-cpu";
230                         };
232                         reg_dcdcc: dcdcc {
233                                 regulator-enable-ramp-delay = <32000>;
234                                 regulator-min-microvolt = <810000>;
235                                 regulator-max-microvolt = <1080000>;
236                                 regulator-name = "vdd-gpu";
237                         };
239                         reg_dcdcd: dcdcd {
240                                 regulator-always-on;
241                                 regulator-min-microvolt = <960000>;
242                                 regulator-max-microvolt = <960000>;
243                                 regulator-name = "vdd-sys";
244                         };
246                         reg_dcdce: dcdce {
247                                 regulator-always-on;
248                                 regulator-min-microvolt = <1200000>;
249                                 regulator-max-microvolt = <1200000>;
250                                 regulator-name = "vcc-dram";
251                         };
253                         sw {
254                                 /* unused */
255                         };
256                 };
257         };
260 &r_ir {
261         linux,rc-map-name = "rc-beelink-gs1";
262         status = "okay";
265 &r_pio {
266         /*
267          * PL0 and PL1 are used for PMIC I2C
268          * don't enable the pl-supply else
269          * it will fail at boot
270          *
271          * vcc-pl-supply = <&reg_aldo1>;
272          */
273         vcc-pm-supply = <&reg_aldo1>;
276 &spdif {
277         status = "okay";
280 &uart0 {
281         pinctrl-names = "default";
282         pinctrl-0 = <&uart0_ph_pins>;
283         status = "okay";
286 &usb2otg {
287         dr_mode = "host";
288         status = "okay";
291 &usb2phy {
292         usb0_vbus-supply = <&reg_vcc5v>;
293         status = "okay";