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