forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/arm/boot/dts/exynos4412-midas.dtsi
....@@ -13,6 +13,7 @@
1313 #include "exynos4412.dtsi"
1414 #include "exynos4412-ppmu-common.dtsi"
1515 #include <dt-bindings/gpio/gpio.h>
16
+#include <dt-bindings/input/input.h>
1617 #include <dt-bindings/interrupt-controller/irq.h>
1718 #include <dt-bindings/clock/maxim,max77686.h>
1819 #include <dt-bindings/pinctrl/samsung.h>
....@@ -36,12 +37,12 @@
3637
3738 fixed-rate-clocks {
3839 xxti {
39
- compatible = "samsung,clock-xxti", "fixed-clock";
40
+ compatible = "samsung,clock-xxti";
4041 clock-frequency = <0>;
4142 };
4243
4344 xusbxti {
44
- compatible = "samsung,clock-xusbxti", "fixed-clock";
45
+ compatible = "samsung,clock-xusbxti";
4546 clock-frequency = <24000000>;
4647 };
4748 };
....@@ -92,6 +93,39 @@
9293 enable-active-high;
9394 };
9495
96
+ touchkey_reg: voltage-regulator-6 {
97
+ compatible = "regulator-fixed";
98
+ regulator-name = "LED_VDD_3.3V";
99
+ regulator-min-microvolt = <3300000>;
100
+ regulator-max-microvolt = <3300000>;
101
+ enable-active-high;
102
+ status = "disabled";
103
+ };
104
+
105
+ vbatt_reg: voltage-regulator-7 {
106
+ compatible = "regulator-fixed";
107
+ regulator-name = "VBATT";
108
+ regulator-min-microvolt = <5000000>;
109
+ regulator-max-microvolt = <5000000>;
110
+ regulator-always-on;
111
+ };
112
+
113
+ mic_bias_reg: voltage-regulator-8 {
114
+ compatible = "regulator-fixed";
115
+ regulator-name = "MICBIAS_LDO_2.8V";
116
+ regulator-min-microvolt = <2800000>;
117
+ regulator-max-microvolt = <2800000>;
118
+ gpio = <&gpf1 7 GPIO_ACTIVE_HIGH>;
119
+ enable-active-high;
120
+ };
121
+
122
+ submic_bias_reg: voltage-regulator-9 {
123
+ compatible = "regulator-fixed";
124
+ regulator-name = "SUB_MICBIAS_LDO_2.8V";
125
+ regulator-min-microvolt = <2800000>;
126
+ regulator-max-microvolt = <2800000>;
127
+ };
128
+
95129 gpio-keys {
96130 compatible = "gpio-keys";
97131 pinctrl-names = "default";
....@@ -130,7 +164,8 @@
130164
131165 i2c_max77693: i2c-gpio-1 {
132166 compatible = "i2c-gpio";
133
- gpios = <&gpm2 0 GPIO_ACTIVE_HIGH>, <&gpm2 1 GPIO_ACTIVE_HIGH>;
167
+ sda-gpios = <&gpm2 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
168
+ scl-gpios = <&gpm2 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
134169 i2c-gpio,delay-us = <2>;
135170 #address-cells = <1>;
136171 #size-cells = <0>;
....@@ -178,7 +213,8 @@
178213
179214 i2c_max77693_fuel: i2c-gpio-3 {
180215 compatible = "i2c-gpio";
181
- gpios = <&gpf1 5 GPIO_ACTIVE_HIGH>, <&gpf1 4 GPIO_ACTIVE_HIGH>;
216
+ sda-gpios = <&gpf1 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
217
+ scl-gpios = <&gpf1 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
182218 i2c-gpio,delay-us = <2>;
183219 #address-cells = <1>;
184220 #size-cells = <0>;
....@@ -197,9 +233,29 @@
197233 };
198234 };
199235
236
+ i2c-gpio-4 {
237
+ compatible = "i2c-gpio";
238
+ sda-gpios = <&gpl0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
239
+ scl-gpios = <&gpl0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
240
+ i2c-gpio,delay-us = <2>;
241
+ #address-cells = <1>;
242
+ #size-cells = <0>;
243
+
244
+ touchkey@20 {
245
+ compatible = "cypress,midas-touchkey";
246
+ reg = <0x20>;
247
+ vdd-supply = <&touchkey_reg>;
248
+ vcc-supply = <&ldo5_reg>;
249
+ interrupt-parent = <&gpj0>;
250
+ interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
251
+ linux,keycodes = <KEY_BACK KEY_MENU>;
252
+ };
253
+ };
254
+
200255 i2c-mhl {
201256 compatible = "i2c-gpio";
202
- gpios = <&gpf0 4 GPIO_ACTIVE_HIGH>, <&gpf0 6 GPIO_ACTIVE_HIGH>;
257
+ sda-gpios = <&gpf0 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
258
+ scl-gpios = <&gpf0 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
203259 i2c-gpio,delay-us = <100>;
204260 #address-cells = <1>;
205261 #size-cells = <0>;
....@@ -234,16 +290,18 @@
234290 clock-names = "ext_clock";
235291 };
236292
237
- sound {
238
- compatible = "samsung,trats2-audio";
239
- samsung,i2s-controller = <&i2s0>;
240
- samsung,model = "Trats2";
241
- samsung,audio-codec = <&wm1811>;
242
- samsung,audio-routing =
243
- "SPK", "SPKOUTLN",
244
- "SPK", "SPKOUTLP",
245
- "SPK", "SPKOUTRN",
246
- "SPK", "SPKOUTRP";
293
+ sound: sound {
294
+ compatible = "samsung,midas-audio";
295
+ model = "Midas";
296
+ mic-bias-supply = <&mic_bias_reg>;
297
+ submic-bias-supply = <&submic_bias_reg>;
298
+
299
+ cpu {
300
+ sound-dai = <&i2s0 0>;
301
+ };
302
+ codec {
303
+ sound-dai = <&wm1811>;
304
+ };
247305 };
248306
249307 thermistor-ap {
....@@ -260,21 +318,6 @@
260318 pullup-ohm = <100000>; /* 100K */
261319 pulldown-ohm = <100000>; /* 100K */
262320 io-channels = <&adc 2>; /* Battery temperature */
263
- };
264
-
265
- thermal-zones {
266
- cpu_thermal: cpu-thermal {
267
- cooling-maps {
268
- map0 {
269
- /* Corresponds to 800MHz at freq_table */
270
- cooling-device = <&cpu0 7 7>;
271
- };
272
- map1 {
273
- /* Corresponds to 200MHz at freq_table */
274
- cooling-device = <&cpu0 13 13>;
275
- };
276
- };
277
- };
278321 };
279322 };
280323
....@@ -342,6 +385,21 @@
342385
343386 &cpu0 {
344387 cpu0-supply = <&buck2_reg>;
388
+};
389
+
390
+&cpu_thermal {
391
+ cooling-maps {
392
+ map0 {
393
+ /* Corresponds to 800MHz at freq_table */
394
+ cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
395
+ <&cpu2 7 7>, <&cpu3 7 7>;
396
+ };
397
+ map1 {
398
+ /* Corresponds to 200MHz at freq_table */
399
+ cooling-device = <&cpu0 13 13>, <&cpu1 13 13>,
400
+ <&cpu2 13 13>, <&cpu3 13 13>;
401
+ };
402
+ };
345403 };
346404
347405 &csis_0 {
....@@ -449,6 +507,11 @@
449507 status = "okay";
450508 };
451509
510
+&gpu {
511
+ mali-supply = <&buck4_reg>;
512
+ status = "okay";
513
+};
514
+
452515 &hdmi {
453516 hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
454517 pinctrl-names = "default";
....@@ -525,7 +588,7 @@
525588 clocks = <&camera 1>;
526589 clock-names = "extclk";
527590 samsung,camclk-out = <1>;
528
- gpios = <&gpm1 6 GPIO_ACTIVE_HIGH>;
591
+ gpios = <&gpm1 6 GPIO_ACTIVE_LOW>;
529592
530593 port {
531594 is_s5k6a3_ep: endpoint {
....@@ -556,11 +619,37 @@
556619 wm1811: wm1811@1a {
557620 compatible = "wlf,wm1811";
558621 reg = <0x1a>;
559
- clocks = <&pmu_system_controller 0>;
560
- clock-names = "MCLK1";
561
- DCVDD-supply = <&ldo3_reg>;
622
+ clocks = <&pmu_system_controller 0>,
623
+ <&max77686 MAX77686_CLK_PMIC>;
624
+ clock-names = "MCLK1", "MCLK2";
625
+ interrupt-controller;
626
+ #interrupt-cells = <2>;
627
+ interrupt-parent = <&gpx3>;
628
+ interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
629
+
630
+ gpio-controller;
631
+ #gpio-cells = <2>;
632
+ #sound-dai-cells = <0>;
633
+
634
+ wlf,gpio-cfg = <0x3 0x0 0x0 0x0 0x0 0x0
635
+ 0x0 0x8000 0x0 0x0 0x0>;
636
+ wlf,micbias-cfg = <0x2f 0x2b>;
637
+
638
+ wlf,lineout1-feedback;
639
+ wlf,lineout1-se;
640
+ wlf,lineout2-se;
641
+ wlf,ldoena-always-driven;
642
+
643
+ AVDD2-supply = <&vbatt_reg>;
562644 DBVDD1-supply = <&ldo3_reg>;
645
+ DBVDD2-supply = <&vbatt_reg>;
646
+ DBVDD3-supply = <&vbatt_reg>;
647
+ DCVDD-supply = <&ldo3_reg>;
648
+ CPVDD-supply = <&vbatt_reg>;
649
+ SPKVDD1-supply = <&vbatt_reg>;
650
+ SPKVDD2-supply = <&vbatt_reg>;
563651 wlf,ldo1ena = <&gpj0 4 0>;
652
+ wlf,ldo2ena = <&gpj0 4 0>;
564653 };
565654 };
566655
....@@ -782,7 +871,7 @@
782871 };
783872
784873 buck1_reg: BUCK1 {
785
- regulator-name = "vdd_mif";
874
+ regulator-name = "VDD_MIF";
786875 regulator-min-microvolt = <850000>;
787876 regulator-max-microvolt = <1100000>;
788877 regulator-always-on;
....@@ -793,7 +882,7 @@
793882 };
794883
795884 buck2_reg: BUCK2 {
796
- regulator-name = "vdd_arm";
885
+ regulator-name = "VDD_ARM";
797886 regulator-min-microvolt = <850000>;
798887 regulator-max-microvolt = <1500000>;
799888 regulator-always-on;
....@@ -804,7 +893,7 @@
804893 };
805894
806895 buck3_reg: BUCK3 {
807
- regulator-name = "vdd_int";
896
+ regulator-name = "VDD_INT";
808897 regulator-min-microvolt = <850000>;
809898 regulator-max-microvolt = <1150000>;
810899 regulator-always-on;
....@@ -815,7 +904,7 @@
815904 };
816905
817906 buck4_reg: BUCK4 {
818
- regulator-name = "vdd_g3d";
907
+ regulator-name = "VDD_G3D";
819908 regulator-min-microvolt = <850000>;
820909 regulator-max-microvolt = <1150000>;
821910 regulator-boot-on;
....@@ -1269,8 +1358,7 @@
12691358
12701359 &sdhci_2 {
12711360 bus-width = <4>;
1272
- cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
1273
- cd-inverted;
1361
+ cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
12741362 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>;
12751363 pinctrl-names = "default";
12761364 vmmc-supply = <&ldo21_reg>;