forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
....@@ -1,48 +1,10 @@
1
-/*
2
- * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
3
- *
4
- * This file is dual-licensed: you can use it either under the terms
5
- * of the GPL or the X11 license, at your option. Note that this dual
6
- * licensing only applies to this file, and not this project as a
7
- * whole.
8
- *
9
- * a) This library is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License as
11
- * published by the Free Software Foundation; either version 2 of the
12
- * License, or (at your option) any later version.
13
- *
14
- * This library is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * Or, alternatively,
20
- *
21
- * b) Permission is hereby granted, free of charge, to any person
22
- * obtaining a copy of this software and associated documentation
23
- * files (the "Software"), to deal in the Software without
24
- * restriction, including without limitation the rights to use,
25
- * copy, modify, merge, publish, distribute, sublicense, and/or
26
- * sell copies of the Software, and to permit persons to whom the
27
- * Software is furnished to do so, subject to the following
28
- * conditions:
29
- *
30
- * The above copyright notice and this permission notice shall be
31
- * included in all copies or substantial portions of the Software.
32
- *
33
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40
- * OTHER DEALINGS IN THE SOFTWARE.
41
- */
1
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
+// Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
423
434 /dts-v1/;
445
456 #include "sun50i-a64.dtsi"
7
+#include "sun50i-a64-cpu-opp.dtsi"
468
479 #include <dt-bindings/gpio/gpio.h>
4810
....@@ -51,12 +13,60 @@
5113 compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
5214
5315 aliases {
16
+ ethernet0 = &emac;
5417 serial0 = &uart0;
5518 };
5619
5720 chosen {
5821 stdout-path = "serial0:115200n8";
5922 };
23
+
24
+ hdmi-connector {
25
+ compatible = "hdmi-connector";
26
+ type = "a";
27
+
28
+ port {
29
+ hdmi_con_in: endpoint {
30
+ remote-endpoint = <&hdmi_out_con>;
31
+ };
32
+ };
33
+ };
34
+
35
+ leds {
36
+ compatible = "gpio-leds";
37
+
38
+ blue {
39
+ label = "nanopi-a64:blue:status";
40
+ gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
41
+ };
42
+ };
43
+
44
+ wifi_pwrseq: wifi_pwrseq {
45
+ compatible = "mmc-pwrseq-simple";
46
+ clocks = <&rtc 1>;
47
+ clock-names = "ext_clock";
48
+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
49
+ };
50
+};
51
+
52
+&cpu0 {
53
+ cpu-supply = <&reg_dcdc2>;
54
+};
55
+
56
+&cpu1 {
57
+ cpu-supply = <&reg_dcdc2>;
58
+};
59
+
60
+&cpu2 {
61
+ cpu-supply = <&reg_dcdc2>;
62
+};
63
+
64
+&cpu3 {
65
+ cpu-supply = <&reg_dcdc2>;
66
+};
67
+
68
+&de {
69
+ status = "okay";
6070 };
6171
6272 &ehci0 {
....@@ -67,15 +77,36 @@
6777 status = "okay";
6878 };
6979
70
-/* i2c1 connected with gpio headers like pine64, bananapi */
71
-&i2c1 {
80
+&emac {
7281 pinctrl-names = "default";
73
- pinctrl-0 = <&i2c1_pins>;
74
- status = "disabled";
82
+ pinctrl-0 = <&rgmii_pins>;
83
+ phy-mode = "rgmii";
84
+ phy-handle = <&ext_rgmii_phy>;
85
+ phy-supply = <&reg_dcdc1>;
86
+ status = "okay";
7587 };
7688
89
+&hdmi {
90
+ hvcc-supply = <&reg_dldo1>;
91
+ status = "okay";
92
+};
93
+
94
+&hdmi_out {
95
+ hdmi_out_con: endpoint {
96
+ remote-endpoint = <&hdmi_con_in>;
97
+ };
98
+};
99
+
100
+/* i2c1 connected with gpio headers like pine64, bananapi */
77101 &i2c1_pins {
78102 bias-pull-up;
103
+};
104
+
105
+&mdio {
106
+ ext_rgmii_phy: ethernet-phy@1 {
107
+ compatible = "ethernet-phy-ieee802.3-c22";
108
+ reg = <7>;
109
+ };
79110 };
80111
81112 &mmc0 {
....@@ -86,6 +117,24 @@
86117 disable-wp;
87118 bus-width = <4>;
88119 status = "okay";
120
+};
121
+
122
+&mmc1 {
123
+ pinctrl-names = "default";
124
+ pinctrl-0 = <&mmc1_pins>;
125
+ vmmc-supply = <&reg_dcdc1>;
126
+ vqmmc-supply = <&reg_dldo4>;
127
+ mmc-pwrseq = <&wifi_pwrseq>;
128
+ bus-width = <4>;
129
+ non-removable;
130
+ status = "okay";
131
+
132
+ rtl8189etv: wifi@1 {
133
+ reg = <1>;
134
+ interrupt-parent = <&r_pio>;
135
+ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
136
+ interrupt-names = "host-wake";
137
+ };
89138 };
90139
91140 &ohci0 {
....@@ -108,6 +157,10 @@
108157 };
109158
110159 #include "axp803.dtsi"
160
+
161
+&ac_power_supply {
162
+ status = "okay";
163
+};
111164
112165 &reg_aldo2 {
113166 regulator-always-on;
....@@ -201,7 +254,7 @@
201254
202255 &uart0 {
203256 pinctrl-names = "default";
204
- pinctrl-0 = <&uart0_pins_a>;
257
+ pinctrl-0 = <&uart0_pb_pins>;
205258 status = "okay";
206259 };
207260