hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
....@@ -1,47 +1,7 @@
1
-/*
2
- * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
3
- *
4
- * Based on sun50i-a64-pine64.dts, which is:
5
- * Copyright (c) 2016 ARM Ltd.
6
- *
7
- * This file is dual-licensed: you can use it either under the terms
8
- * of the GPL or the X11 license, at your option. Note that this dual
9
- * licensing only applies to this file, and not this project as a
10
- * whole.
11
- *
12
- * a) This library is free software; you can redistribute it and/or
13
- * modify it under the terms of the GNU General Public License as
14
- * published by the Free Software Foundation; either version 2 of the
15
- * License, or (at your option) any later version.
16
- *
17
- * This library is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU General Public License for more details.
21
- *
22
- * Or, alternatively,
23
- *
24
- * b) Permission is hereby granted, free of charge, to any person
25
- * obtaining a copy of this software and associated documentation
26
- * files (the "Software"), to deal in the Software without
27
- * restriction, including without limitation the rights to use,
28
- * copy, modify, merge, publish, distribute, sublicense, and/or
29
- * sell copies of the Software, and to permit persons to whom the
30
- * Software is furnished to do so, subject to the following
31
- * conditions:
32
- *
33
- * The above copyright notice and this permission notice shall be
34
- * included in all copies or substantial portions of the Software.
35
- *
36
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43
- * OTHER DEALINGS IN THE SOFTWARE.
44
- */
1
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
+// Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
3
+// Based on sun50i-a64-pine64.dts, which is:
4
+// Copyright (c) 2016 ARM Ltd.
455
466 /dts-v1/;
477
....@@ -55,10 +15,25 @@
5515 aliases {
5616 ethernet0 = &emac;
5717 serial0 = &uart0;
18
+ serial1 = &uart1;
19
+ serial2 = &uart2;
20
+ serial3 = &uart3;
21
+ serial4 = &uart4;
5822 };
5923
6024 chosen {
6125 stdout-path = "serial0:115200n8";
26
+ };
27
+
28
+ hdmi-connector {
29
+ compatible = "hdmi-connector";
30
+ type = "a";
31
+
32
+ port {
33
+ hdmi_con_in: endpoint {
34
+ remote-endpoint = <&hdmi_out_con>;
35
+ };
36
+ };
6237 };
6338
6439 reg_vcc1v8: vcc1v8 {
....@@ -67,6 +42,30 @@
6742 regulator-min-microvolt = <1800000>;
6843 regulator-max-microvolt = <1800000>;
6944 };
45
+};
46
+
47
+&ac_power_supply {
48
+ status = "okay";
49
+};
50
+
51
+&battery_power_supply {
52
+ status = "okay";
53
+};
54
+
55
+&codec {
56
+ status = "okay";
57
+};
58
+
59
+&codec_analog {
60
+ status = "okay";
61
+};
62
+
63
+&dai {
64
+ status = "okay";
65
+};
66
+
67
+&de {
68
+ status = "okay";
7069 };
7170
7271 &ehci0 {
....@@ -80,10 +79,21 @@
8079 &emac {
8180 pinctrl-names = "default";
8281 pinctrl-0 = <&rgmii_pins>;
83
- phy-mode = "rgmii";
82
+ phy-mode = "rgmii-txid";
8483 phy-handle = <&ext_rgmii_phy>;
8584 phy-supply = <&reg_dc1sw>;
8685 status = "okay";
86
+};
87
+
88
+&hdmi {
89
+ hvcc-supply = <&reg_dldo1>;
90
+ status = "okay";
91
+};
92
+
93
+&hdmi_out {
94
+ hdmi_out_con: endpoint {
95
+ remote-endpoint = <&hdmi_con_in>;
96
+ };
8797 };
8898
8999 &mdio {
....@@ -144,12 +154,47 @@
144154 vcc-hdmi-supply = <&reg_dldo1>;
145155 };
146156
157
+&sound {
158
+ simple-audio-card,aux-devs = <&codec_analog>;
159
+ simple-audio-card,widgets = "Microphone", "Microphone Jack",
160
+ "Headphone", "Headphone Jack";
161
+ simple-audio-card,routing =
162
+ "Left DAC", "DACL",
163
+ "Right DAC", "DACR",
164
+ "Headphone Jack", "HP",
165
+ "ADCL", "Left ADC",
166
+ "ADCR", "Right ADC",
167
+ "MIC2", "Microphone Jack";
168
+ status = "okay";
169
+};
170
+
147171 &uart0 {
148172 pinctrl-names = "default";
149
- pinctrl-0 = <&uart0_pins_a>;
173
+ pinctrl-0 = <&uart0_pb_pins>;
150174 status = "okay";
151175 };
152176
177
+/* On Pi-2 connector */
178
+&uart2 {
179
+ pinctrl-names = "default";
180
+ pinctrl-0 = <&uart2_pins>;
181
+ status = "disabled";
182
+};
183
+
184
+/* On Euler connector */
185
+&uart3 {
186
+ pinctrl-names = "default";
187
+ pinctrl-0 = <&uart3_pins>;
188
+ status = "disabled";
189
+};
190
+
191
+/* On Euler connector, RTS/CTS optional */
192
+&uart4 {
193
+ pinctrl-names = "default";
194
+ pinctrl-0 = <&uart4_pins>;
195
+ status = "disabled";
196
+};
197
+
153198 &usb_otg {
154199 dr_mode = "host";
155200 status = "okay";