]>
Commit | Line | Data |
---|---|---|
b8f4f118 NA |
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | |
3 | * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> | |
4 | */ | |
5 | ||
6 | #include <dt-bindings/gpio/gpio.h> | |
7 | #include <dt-bindings/input/input.h> | |
8 | ||
9 | / { | |
10 | aliases { | |
11 | ethernet0 = &emac; | |
12 | serial0 = &uart0; | |
13 | }; | |
14 | ||
15 | chosen { | |
16 | stdout-path = "serial0:115200n8"; | |
17 | }; | |
18 | ||
19 | connector { | |
20 | compatible = "hdmi-connector"; | |
21 | type = "a"; | |
22 | ||
23 | port { | |
24 | hdmi_con_in: endpoint { | |
25 | remote-endpoint = <&hdmi_out_con>; | |
26 | }; | |
27 | }; | |
28 | }; | |
29 | ||
30 | leds { | |
31 | compatible = "gpio-leds"; | |
32 | ||
33 | pwr_led { | |
34 | label = "librecomputer:green:pwr"; | |
35 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ | |
36 | default-state = "on"; | |
37 | }; | |
38 | ||
39 | status_led { | |
40 | label = "librecomputer:blue:status"; | |
41 | gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ | |
42 | }; | |
43 | }; | |
44 | ||
45 | gpio_keys { | |
46 | compatible = "gpio-keys"; | |
47 | ||
48 | power { | |
49 | label = "power"; | |
50 | linux,code = <KEY_POWER>; | |
51 | gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ | |
52 | }; | |
53 | }; | |
54 | ||
55 | reg_vcc1v2: vcc1v2 { | |
56 | compatible = "regulator-fixed"; | |
57 | regulator-name = "vcc1v2"; | |
58 | regulator-min-microvolt = <1200000>; | |
59 | regulator-max-microvolt = <1200000>; | |
60 | regulator-always-on; | |
61 | regulator-boot-on; | |
62 | vin-supply = <®_vcc5v0>; | |
63 | gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ | |
64 | enable-active-high; | |
65 | }; | |
66 | ||
67 | reg_vcc3v3: vcc3v3 { | |
68 | compatible = "regulator-fixed"; | |
69 | regulator-name = "vcc3v3"; | |
70 | regulator-min-microvolt = <3300000>; | |
71 | regulator-max-microvolt = <3300000>; | |
72 | vin-supply = <®_vcc5v0>; | |
73 | }; | |
74 | ||
75 | /* This represents the board's 5V input */ | |
76 | reg_vcc5v0: vcc5v0 { | |
77 | compatible = "regulator-fixed"; | |
78 | regulator-name = "vcc5v0"; | |
79 | regulator-min-microvolt = <5000000>; | |
80 | regulator-max-microvolt = <5000000>; | |
81 | }; | |
82 | ||
83 | reg_vcc_dram: vcc-dram { | |
84 | compatible = "regulator-fixed"; | |
85 | regulator-name = "vcc-dram"; | |
86 | regulator-min-microvolt = <1500000>; | |
87 | regulator-max-microvolt = <1500000>; | |
88 | regulator-always-on; | |
89 | regulator-boot-on; | |
90 | vin-supply = <®_vcc5v0>; | |
91 | gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ | |
92 | enable-active-high; | |
93 | }; | |
94 | ||
95 | reg_vcc_io: vcc-io { | |
96 | compatible = "regulator-fixed"; | |
97 | regulator-name = "vcc-io"; | |
98 | regulator-min-microvolt = <3300000>; | |
99 | regulator-max-microvolt = <3300000>; | |
100 | regulator-always-on; | |
101 | regulator-boot-on; | |
102 | vin-supply = <®_vcc3v3>; | |
103 | gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ | |
104 | }; | |
105 | ||
106 | reg_vdd_cpux: vdd-cpux { | |
107 | compatible = "regulator-fixed"; | |
108 | regulator-name = "vdd-cpux"; | |
109 | regulator-min-microvolt = <1200000>; | |
110 | regulator-max-microvolt = <1200000>; | |
111 | regulator-always-on; | |
112 | regulator-boot-on; | |
113 | vin-supply = <®_vcc5v0>; | |
114 | gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ | |
115 | enable-active-high; | |
116 | }; | |
117 | }; | |
118 | ||
119 | &codec { | |
120 | allwinner,audio-routing = | |
121 | "Line Out", "LINEOUT", | |
122 | "MIC1", "Mic", | |
123 | "Mic", "MBIAS"; | |
124 | status = "okay"; | |
125 | }; | |
126 | ||
127 | &cpu0 { | |
128 | cpu-supply = <®_vdd_cpux>; | |
129 | }; | |
130 | ||
131 | &de { | |
132 | status = "okay"; | |
133 | }; | |
134 | ||
135 | &ehci0 { | |
136 | status = "okay"; | |
137 | }; | |
138 | ||
139 | &ehci1 { | |
140 | status = "okay"; | |
141 | }; | |
142 | ||
143 | &ehci2 { | |
144 | status = "okay"; | |
145 | }; | |
146 | ||
147 | &ehci3 { | |
148 | status = "okay"; | |
149 | }; | |
150 | ||
151 | &emac { | |
152 | phy-handle = <&int_mii_phy>; | |
153 | phy-mode = "mii"; | |
154 | allwinner,leds-active-low; | |
155 | status = "okay"; | |
156 | }; | |
157 | ||
158 | &hdmi { | |
159 | status = "okay"; | |
160 | }; | |
161 | ||
162 | &hdmi_out { | |
163 | hdmi_out_con: endpoint { | |
164 | remote-endpoint = <&hdmi_con_in>; | |
165 | }; | |
166 | }; | |
167 | ||
168 | &ir { | |
169 | pinctrl-names = "default"; | |
170 | pinctrl-0 = <&ir_pins_a>; | |
171 | status = "okay"; | |
172 | }; | |
173 | ||
174 | &mmc0 { | |
175 | vmmc-supply = <®_vcc_io>; | |
176 | bus-width = <4>; | |
177 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ | |
178 | status = "okay"; | |
179 | }; | |
180 | ||
8249ede4 CYT |
181 | &mmc2 { |
182 | pinctrl-names = "default"; | |
183 | pinctrl-0 = <&mmc2_8bit_pins>; | |
184 | vmmc-supply = <®_vcc_io>; | |
185 | bus-width = <8>; | |
186 | non-removable; | |
187 | status = "okay"; | |
188 | }; | |
189 | ||
b8f4f118 NA |
190 | &ohci0 { |
191 | status = "okay"; | |
192 | }; | |
193 | ||
194 | &ohci1 { | |
195 | status = "okay"; | |
196 | }; | |
197 | ||
198 | &ohci2 { | |
199 | status = "okay"; | |
200 | }; | |
201 | ||
202 | &ohci3 { | |
203 | status = "okay"; | |
204 | }; | |
205 | ||
206 | &uart0 { | |
207 | pinctrl-names = "default"; | |
208 | pinctrl-0 = <&uart0_pins_a>; | |
209 | status = "okay"; | |
210 | }; | |
211 | ||
212 | &usb_otg { | |
213 | dr_mode = "host"; | |
214 | status = "okay"; | |
215 | }; | |
216 | ||
217 | &usbphy { | |
218 | /* VBUS on USB ports are always on */ | |
219 | usb0_vbus-supply = <®_vcc5v0>; | |
220 | usb1_vbus-supply = <®_vcc5v0>; | |
221 | usb2_vbus-supply = <®_vcc5v0>; | |
222 | usb3_vbus-supply = <®_vcc5v0>; | |
223 | status = "okay"; | |
224 | }; |