forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
....@@ -1,48 +1,10 @@
1
-/*
2
- * Copyright (c) 2016 ARM Ltd.
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) 2016 ARM Ltd.
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
....@@ -58,6 +20,17 @@
5820
5921 chosen {
6022 stdout-path = "serial0:115200n8";
23
+ };
24
+
25
+ hdmi-connector {
26
+ compatible = "hdmi-connector";
27
+ type = "a";
28
+
29
+ port {
30
+ hdmi_con_in: endpoint {
31
+ remote-endpoint = <&hdmi_out_con>;
32
+ };
33
+ };
6134 };
6235
6336 leds {
....@@ -83,7 +56,42 @@
8356 wifi_pwrseq: wifi_pwrseq {
8457 compatible = "mmc-pwrseq-simple";
8558 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
59
+ clocks = <&rtc 1>;
60
+ clock-names = "ext_clock";
8661 };
62
+};
63
+
64
+&codec {
65
+ status = "okay";
66
+};
67
+
68
+&codec_analog {
69
+ cpvdd-supply = <&reg_eldo1>;
70
+ status = "okay";
71
+};
72
+
73
+&cpu0 {
74
+ cpu-supply = <&reg_dcdc2>;
75
+};
76
+
77
+&cpu1 {
78
+ cpu-supply = <&reg_dcdc2>;
79
+};
80
+
81
+&cpu2 {
82
+ cpu-supply = <&reg_dcdc2>;
83
+};
84
+
85
+&cpu3 {
86
+ cpu-supply = <&reg_dcdc2>;
87
+};
88
+
89
+&dai {
90
+ status = "okay";
91
+};
92
+
93
+&de {
94
+ status = "okay";
8795 };
8896
8997 &ehci0 {
....@@ -103,9 +111,18 @@
103111 status = "okay";
104112 };
105113
114
+&hdmi {
115
+ hvcc-supply = <&reg_dldo1>;
116
+ status = "okay";
117
+};
118
+
119
+&hdmi_out {
120
+ hdmi_out_con: endpoint {
121
+ remote-endpoint = <&hdmi_con_in>;
122
+ };
123
+};
124
+
106125 &i2c1 {
107
- pinctrl-names = "default";
108
- pinctrl-0 = <&i2c1_pins>;
109126 status = "okay";
110127 };
111128
....@@ -151,7 +168,7 @@
151168
152169 &mmc2 {
153170 pinctrl-names = "default";
154
- pinctrl-0 = <&mmc2_pins>;
171
+ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
155172 vmmc-supply = <&reg_dcdc1>;
156173 bus-width = <8>;
157174 non-removable;
....@@ -180,6 +197,14 @@
180197 };
181198
182199 #include "axp803.dtsi"
200
+
201
+&ac_power_supply {
202
+ status = "okay";
203
+};
204
+
205
+&battery_power_supply {
206
+ status = "okay";
207
+};
183208
184209 &reg_aldo1 {
185210 /*
....@@ -300,16 +325,44 @@
300325 vcc-hdmi-supply = <&reg_dldo1>;
301326 };
302327
328
+&sound {
329
+ status = "okay";
330
+ simple-audio-card,widgets = "Headphone", "Headphone Jack",
331
+ "Microphone", "Microphone Jack",
332
+ "Microphone", "Onboard Microphone";
333
+ simple-audio-card,routing =
334
+ "Left DAC", "DACL",
335
+ "Right DAC", "DACR",
336
+ "ADCL", "Left ADC",
337
+ "ADCR", "Right ADC",
338
+ "Headphone Jack", "HP",
339
+ "MIC2", "Microphone Jack",
340
+ "Onboard Microphone", "MBIAS",
341
+ "MIC1", "Onboard Microphone";
342
+};
343
+
303344 &uart0 {
304345 pinctrl-names = "default";
305
- pinctrl-0 = <&uart0_pins_a>;
346
+ pinctrl-0 = <&uart0_pb_pins>;
306347 status = "okay";
307348 };
308349
309350 &uart1 {
310351 pinctrl-names = "default";
311352 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
353
+ uart-has-rtscts;
312354 status = "okay";
355
+
356
+ bluetooth {
357
+ compatible = "brcm,bcm43438-bt";
358
+ clocks = <&rtc 1>;
359
+ clock-names = "lpo";
360
+ vbat-supply = <&reg_dldo2>;
361
+ vddio-supply = <&reg_dldo4>;
362
+ device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
363
+ host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
364
+ shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
365
+ };
313366 };
314367
315368 &usb_otg {
....@@ -317,8 +370,13 @@
317370 status = "okay";
318371 };
319372
373
+&usb_power_supply {
374
+ status = "okay";
375
+};
376
+
320377 &usbphy {
321378 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
379
+ usb0_vbus_power-supply = <&usb_power_supply>;
322380 usb0_vbus-supply = <&reg_drivevbus>;
323381 status = "okay";
324382 };