Skip to content

Commit 1dcffdc

Browse files
authored
Merge pull request hardkernel#48 from yan-wyb/khadas-vims-4.9.y
Khadas vims 4.9.y
2 parents 5bd49c2 + dc1c937 commit 1dcffdc

File tree

18 files changed

+4090
-7
lines changed

18 files changed

+4090
-7
lines changed

arch/arm64/boot/dts/amlogic/kvim3_linux.dts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,44 @@
882882
reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_HIGH>;
883883
status = "okay";
884884
};
885+
886+
bq25703:bq25703@6b {
887+
compatible = "bq25703";
888+
reg = <0x6b>;
889+
irq-gpio = <&gpio GPIOZ_15 IRQ_TYPE_LEVEL_LOW>;
890+
ti,charge-current = <1500000>;
891+
ti,max-charge-voltage = <8500000>;
892+
ti,max-input-voltage = <20000000>;
893+
ti,max-input-current = <6000000>;
894+
ti,input-current-sdp = <500000>;
895+
ti,input-current-dcp = <2000000>;
896+
ti,input-current-cdp = <2000000>;
897+
ti,input-current-dc = <2000000>;
898+
ti,minimum-sys-voltage = <7400000>;
899+
ti,otg-voltage = <5000000>;
900+
ti,otg-current = <500000>;
901+
ti,input-current = <500000>;
902+
pd-charge-only = <0>;
903+
status = "disabled";
904+
};
905+
906+
cw201x:cw201x@62 {
907+
compatible = "cw201x";
908+
reg = <0x62>;
909+
bat_config_info = <0x15 0x7F 0x6E 0x66 0x65 0x5C 0x5B 0x59
910+
0x58 0x57 0x57 0x54 0x53 0x51 0x4B 0x48
911+
0x40 0x33 0x2A 0x26 0x23 0x25 0x2A 0x34
912+
0x45 0x4F 0x0C 0xCD 0x44 0x68 0x67 0x68
913+
0x6E 0x6F 0x6C 0x68 0x3A 0x10 0x8A 0x01
914+
0x01 0x54 0x52 0x87 0x8F 0x91 0x94 0x52
915+
0x82 0x8C 0x92 0x96 0x82 0xFF 0xFF 0xCB
916+
0x2F 0x7D 0x64 0xA5 0xB5 0x13 0x58 0x09>;
917+
monitor_sec = <5>;
918+
virtual_power = <0>;
919+
divider_res1 = <200>;
920+
divider_res2 = <200>;
921+
status = "disabled";
922+
};
885923
};
886924

887925
&i2c_AO {
@@ -924,6 +962,16 @@
924962
irq-gpio = <&gpio_ao GPIOAO_9 IRQ_TYPE_EDGE_RISING>;
925963
status = "okay";
926964
};
965+
966+
es8316: es8316@10 {
967+
compatible = "everest,es8316";
968+
#sound-dai-cells = <0>;
969+
reg = <0x10>;
970+
status = "disabled";
971+
// spk-con-gpio = <&gpio GPIOH_5 0>;
972+
// spk-mute-gpio = <&gpio GPIOA_12 0>;
973+
};
974+
927975
};
928976

929977
&audiobus {

arch/arm64/boot/dts/amlogic/kvim3l_linux.dts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,44 @@
10581058
reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_HIGH>;
10591059
status = "okay";
10601060
};
1061+
1062+
bq25703:bq25703@6b {
1063+
compatible = "bq25703";
1064+
reg = <0x6b>;
1065+
irq-gpio = <&gpio GPIOZ_15 IRQ_TYPE_LEVEL_LOW>;
1066+
ti,charge-current = <1500000>;
1067+
ti,max-charge-voltage = <8500000>;
1068+
ti,max-input-voltage = <20000000>;
1069+
ti,max-input-current = <6000000>;
1070+
ti,input-current-sdp = <500000>;
1071+
ti,input-current-dcp = <2000000>;
1072+
ti,input-current-cdp = <2000000>;
1073+
ti,input-current-dc = <2000000>;
1074+
ti,minimum-sys-voltage = <7400000>;
1075+
ti,otg-voltage = <5000000>;
1076+
ti,otg-current = <500000>;
1077+
ti,input-current = <500000>;
1078+
pd-charge-only = <0>;
1079+
status = "disabled";
1080+
};
1081+
1082+
cw201x:cw201x@62 {
1083+
compatible = "cw201x";
1084+
reg = <0x62>;
1085+
bat_config_info = <0x15 0x7F 0x6E 0x66 0x65 0x5C 0x5B 0x59
1086+
0x58 0x57 0x57 0x54 0x53 0x51 0x4B 0x48
1087+
0x40 0x33 0x2A 0x26 0x23 0x25 0x2A 0x34
1088+
0x45 0x4F 0x0C 0xCD 0x44 0x68 0x67 0x68
1089+
0x6E 0x6F 0x6C 0x68 0x3A 0x10 0x8A 0x01
1090+
0x01 0x54 0x52 0x87 0x8F 0x91 0x94 0x52
1091+
0x82 0x8C 0x92 0x96 0x82 0xFF 0xFF 0xCB
1092+
0x2F 0x7D 0x64 0xA5 0xB5 0x13 0x58 0x09>;
1093+
monitor_sec = <5>;
1094+
virtual_power = <0>;
1095+
divider_res1 = <200>;
1096+
divider_res2 = <200>;
1097+
status = "disabled";
1098+
};
10611099
};
10621100

10631101
&i2c_AO {
@@ -1100,6 +1138,15 @@
11001138
irq-gpio = <&gpio_ao GPIOAO_9 IRQ_TYPE_EDGE_RISING>;
11011139
status = "okay";
11021140
};
1141+
1142+
es8316: es8316@10 {
1143+
compatible = "everest,es8316";
1144+
#sound-dai-cells = <0>;
1145+
reg = <0x10>;
1146+
status = "disabled";
1147+
// spk-con-gpio = <&gpio GPIOH_5 0>;
1148+
// spk-mute-gpio = <&gpio GPIOA_12 0>;
1149+
};
11031150
};
11041151

11051152
&audiobus {

arch/arm64/boot/dts/amlogic/overlays/kvim3/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ dtbo-y += uart3.dtbo \
1010
watchdog.dtbo \
1111
i2s.dtbo \
1212
can.dtbo \
13-
mpu6050-i2c.dtbo
13+
mpu6050-i2c.dtbo \
14+
ext_board.dtbo
1415

1516
targets += $(dtbo-y)
1617
always := $(dtbo-y)
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/interrupt-controller/arm-gic.h>
5+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
6+
#include <dt-bindings/gpio/gpio.h>
7+
8+
/ {
9+
fragment@0 {
10+
target = <&i2c3>;
11+
12+
__overlay__ {
13+
status = "okay";
14+
};
15+
};
16+
17+
fragment@1 {
18+
target = <&bq25703>;
19+
20+
__overlay__ {
21+
status = "okay";
22+
};
23+
};
24+
25+
fragment@2 {
26+
target = <&cw201x>;
27+
28+
__overlay__ {
29+
status = "okay";
30+
};
31+
};
32+
33+
fragment@3 {
34+
target = <&es8316>;
35+
36+
__overlay__ {
37+
status = "okay";
38+
};
39+
};
40+
41+
fragment@4 {
42+
target = <&aml_sound>;
43+
44+
__overlay__ {
45+
aml-audio-card,dai-link@0 {
46+
mclk-fs = <128>;
47+
/* suffix-name, sync with android audio hal
48+
* what's the dai link used for
49+
*/
50+
suffix-name = "alsaPORT-spdif-b";
51+
cpu {
52+
sound-dai = <&aml_spdif_b>;
53+
system-clock-frequency = <6144000>;
54+
};
55+
codec {
56+
sound-dai = <&spdif_codec>;
57+
};
58+
};
59+
60+
aml-audio-card,dai-link@1 {
61+
format = "dsp_a";
62+
mclk-fs = <512>;
63+
//continuous-clock;
64+
//bitclock-inversion;
65+
//frame-inversion;
66+
//bitclock-master = <&tdmacodec>;
67+
//frame-master = <&tdmacodec>;
68+
/* suffix-name, sync with android audio hal
69+
* what's the dai link used for
70+
*/
71+
suffix-name = "alsaPORT-pcm";
72+
tdmacpu: cpu {
73+
sound-dai = <&aml_tdma>;
74+
dai-tdm-slot-tx-mask =
75+
<1 1 1 1 1 1 1 1>;
76+
dai-tdm-slot-rx-mask =
77+
<1 1 1 1 1 1 1 1>;
78+
dai-tdm-slot-num = <8>;
79+
dai-tdm-slot-width = <32>;
80+
system-clock-frequency = <24576000>;
81+
};
82+
tdmacodec: codec {
83+
sound-dai = <&dummy_codec &dummy_codec>;
84+
};
85+
};
86+
87+
aml-audio-card,dai-link@2 {
88+
format = "i2s";
89+
mclk-fs = <256>;
90+
//continuous-clock;
91+
//bitclock-inversion;
92+
//frame-inversion;
93+
bitclock-master = <&aml_tdmb>;
94+
frame-master = <&aml_tdmb>;
95+
//bitclock-master = <&tdmbcodec>;
96+
//frame-master = <&tdmbcodec>;
97+
/* suffix-name, sync with android audio hal
98+
* what's the dai link used for
99+
*/
100+
suffix-name = "alsaPORT-i2s";
101+
cpu {
102+
sound-dai = <&aml_tdmb>;
103+
dai-tdm-slot-tx-mask = <1 1>;
104+
dai-tdm-slot-rx-mask = <1 1>;
105+
dai-tdm-slot-num = <2>;
106+
dai-tdm-slot-width = <32>;
107+
system-clock-frequency = <12288000>;
108+
};
109+
tdmbcodec: codec {
110+
sound-dai = <&dummy_codec &dummy_codec
111+
&amlogic_codec &es8316>;
112+
};
113+
};
114+
aml-audio-card,dai-link@3 {
115+
format = "i2s";
116+
mclk-fs = <256>;
117+
//continuous-clock;
118+
//bitclock-inversion;
119+
//frame-inversion;
120+
bitclock-master = <&aml_tdmc>;
121+
frame-master = <&aml_tdmc>;
122+
/* suffix-name, sync with android audio hal
123+
* what's the dai link used for
124+
*/
125+
//suffix-name = "alsaPORT-tdm";
126+
cpu {
127+
sound-dai = <&aml_tdmc>;
128+
dai-tdm-slot-tx-mask = <1 1>;
129+
dai-tdm-slot-rx-mask = <1 1>;
130+
dai-tdm-slot-num = <2>;
131+
dai-tdm-slot-width = <32>;
132+
system-clock-frequency = <12288000>;
133+
};
134+
codec {
135+
sound-dai = <&dummy_codec &dummy_codec>;
136+
};
137+
};
138+
139+
aml-audio-card,dai-link@4 {
140+
mclk-fs = <128>;
141+
/* suffix-name, sync with android audio hal
142+
* what's the dai link used for
143+
*/
144+
suffix-name = "alsaPORT-spdif";
145+
cpu {
146+
sound-dai = <&aml_spdif>;
147+
system-clock-frequency = <6144000>;
148+
};
149+
codec {
150+
sound-dai = <&spdif_codec>;
151+
};
152+
};
153+
};
154+
};
155+
156+
fragment@5 {
157+
target = <&aml_tdmb>;
158+
159+
__overlay__ {
160+
status = "okay";
161+
};
162+
};
163+
};
164+

arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ dtbo-y += uart3.dtbo \
99
watchdog.dtbo \
1010
i2s.dtbo \
1111
can.dtbo \
12-
mpu6050-i2c.dtbo
12+
mpu6050-i2c.dtbo \
13+
ext_board.dtbo
1314

1415
targets += $(dtbo-y)
1516
always := $(dtbo-y)

0 commit comments

Comments
 (0)