forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
....@@ -1,13 +1,11 @@
1
-/*
2
- * Copyright (C) Harald Geyer <harald@ccbib.org>
3
- * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com>
4
- *
5
- * SPDX-License-Identifier: (GPL-2.0 OR MIT)
6
- */
1
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2
+// Copyright (C) Harald Geyer <harald@ccbib.org>
3
+// based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com>
74
85 /dts-v1/;
96
107 #include "sun50i-a64.dtsi"
8
+#include "sun50i-a64-cpu-opp.dtsi"
119
1210 #include <dt-bindings/gpio/gpio.h>
1311 #include <dt-bindings/input/input.h>
....@@ -19,6 +17,15 @@
1917
2018 aliases {
2119 serial0 = &uart0;
20
+ };
21
+
22
+ backlight: backlight {
23
+ compatible = "pwm-backlight";
24
+ pwms = <&pwm 0 50000 0>;
25
+ power-supply = <&reg_dcdc1>;
26
+ brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>;
27
+ default-brightness-level = <5>;
28
+ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
2229 };
2330
2431 chosen {
....@@ -70,6 +77,45 @@
7077 compatible = "mmc-pwrseq-simple";
7178 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
7279 };
80
+
81
+ speaker_amp: audio-amplifier {
82
+ compatible = "simple-audio-amplifier";
83
+ enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
84
+ sound-name-prefix = "Speaker Amp";
85
+ };
86
+};
87
+
88
+&codec {
89
+ status = "okay";
90
+};
91
+
92
+&codec_analog {
93
+ cpvdd-supply = <&reg_eldo1>;
94
+ status = "okay";
95
+};
96
+
97
+&dai {
98
+ status = "okay";
99
+};
100
+
101
+&de {
102
+ status = "okay";
103
+};
104
+
105
+&cpu0 {
106
+ cpu-supply = <&reg_dcdc2>;
107
+};
108
+
109
+&cpu1 {
110
+ cpu-supply = <&reg_dcdc2>;
111
+};
112
+
113
+&cpu2 {
114
+ cpu-supply = <&reg_dcdc2>;
115
+};
116
+
117
+&cpu3 {
118
+ cpu-supply = <&reg_dcdc2>;
73119 };
74120
75121 &ehci1 {
....@@ -77,14 +123,31 @@
77123 };
78124
79125
80
-/* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline)
81
- * driver for this chip at the moment, the bootloader initializes it.
82
- * However it can be accessed with the i2c-dev driver from user space.
83
- */
84126 &i2c0 {
85127 clock-frequency = <100000>;
86
- pinctrl-names = "default";
87
- pinctrl-0 = <&i2c0_pins>;
128
+ status = "okay";
129
+
130
+ anx6345: anx6345@38 {
131
+ compatible = "analogix,anx6345";
132
+ reg = <0x38>;
133
+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
134
+ dvdd25-supply = <&reg_dldo2>;
135
+ dvdd12-supply = <&reg_dldo3>;
136
+
137
+ ports {
138
+ #address-cells = <1>;
139
+ #size-cells = <0>;
140
+
141
+ port@0 {
142
+ anx6345_in: endpoint {
143
+ remote-endpoint = <&tcon0_out_anx6345>;
144
+ };
145
+ };
146
+ };
147
+ };
148
+};
149
+
150
+&mixer0 {
88151 status = "okay";
89152 };
90153
....@@ -131,6 +194,10 @@
131194 status = "okay";
132195 };
133196
197
+&pwm {
198
+ status = "okay";
199
+};
200
+
134201 &r_rsb {
135202 status = "okay";
136203
....@@ -144,6 +211,14 @@
144211 };
145212
146213 #include "axp803.dtsi"
214
+
215
+&ac_power_supply {
216
+ status = "okay";
217
+};
218
+
219
+&battery_power_supply {
220
+ status = "okay";
221
+};
147222
148223 &reg_aldo1 {
149224 regulator-always-on;
....@@ -239,7 +314,7 @@
239314 };
240315
241316 /*
242
- * The A64 chip cannot work without this regulator off, although
317
+ * The A64 chip cannot work with this regulator off, although
243318 * it seems to be only driving the AR100 core.
244319 * Maybe we don't still know well about CPUs domain.
245320 */
....@@ -258,9 +333,46 @@
258333 vcc-hdmi-supply = <&reg_dldo1>;
259334 };
260335
336
+&sound {
337
+ simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
338
+ simple-audio-card,widgets = "Headphone", "Headphone Jack",
339
+ "Microphone", "Headset Microphone",
340
+ "Microphone", "Internal Microphone",
341
+ "Speaker", "Internal Speaker";
342
+ simple-audio-card,routing =
343
+ "Left DAC", "DACL",
344
+ "Right DAC", "DACR",
345
+ "ADCL", "Left ADC",
346
+ "ADCR", "Right ADC",
347
+ "Headphone Jack", "HP",
348
+ "Speaker Amp INL", "LINEOUT",
349
+ "Speaker Amp INR", "LINEOUT",
350
+ "Internal Speaker", "Speaker Amp OUTL",
351
+ "Internal Speaker", "Speaker Amp OUTR",
352
+ "Internal Microphone", "MBIAS",
353
+ "MIC1", "Internal Microphone",
354
+ "Headset Microphone", "HBIAS",
355
+ "MIC2", "Headset Microphone";
356
+ status = "okay";
357
+};
358
+
359
+&tcon0 {
360
+ pinctrl-names = "default";
361
+ pinctrl-0 = <&lcd_rgb666_pins>;
362
+
363
+ status = "okay";
364
+};
365
+
366
+&tcon0_out {
367
+ tcon0_out_anx6345: endpoint@0 {
368
+ reg = <0>;
369
+ remote-endpoint = <&anx6345_in>;
370
+ };
371
+};
372
+
261373 &uart0 {
262374 pinctrl-names = "default";
263
- pinctrl-0 = <&uart0_pins_a>;
375
+ pinctrl-0 = <&uart0_pb_pins>;
264376 status = "okay";
265377 };
266378