forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
....@@ -1,42 +1,6 @@
1
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
12 /*
23 * Copyright (C) 2016-2017 Zodiac Inflight Innovations
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 file is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License
11
- * version 2 as published by the Free Software Foundation.
12
- *
13
- * This file is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * Or, alternatively,
19
- *
20
- * b) Permission is hereby granted, free of charge, to any person
21
- * obtaining a copy of this software and associated documentation
22
- * files (the "Software"), to deal in the Software without
23
- * restriction, including without limitation the rights to use,
24
- * copy, modify, merge, publish, distribute, sublicense, and/or
25
- * sell copies of the Software, and to permit persons to whom the
26
- * Software is furnished to do so, subject to the following
27
- * conditions:
28
- *
29
- * The above copyright notice and this permission notice shall be
30
- * included in all copies or substantial portions of the Software.
31
- *
32
- * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND,
33
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39
- * OTHER DEALINGS IN THE SOFTWARE.
404 */
415
426 #include <dt-bindings/gpio/gpio.h>
....@@ -94,18 +58,6 @@
9458 regulator-min-microvolt = <5000000>;
9559 regulator-max-microvolt = <5000000>;
9660 regulator-always-on;
97
- };
98
-
99
- reg_5p0v_user_usb: regulator-5p0v-user-usb {
100
- compatible = "regulator-fixed";
101
- pinctrl-names = "default";
102
- pinctrl-0 = <&pinctrl_reg_user_usb>;
103
- vin-supply = <&reg_5p0v_main>;
104
- regulator-name = "5V_USER_USB";
105
- regulator-min-microvolt = <5000000>;
106
- regulator-max-microvolt = <5000000>;
107
- gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
108
- startup-delay-us = <1000>;
10961 };
11062
11163 reg_3p3v_pmic: regulator-3p3v-pmic {
....@@ -210,6 +162,7 @@
210162
211163 panel {
212164 power-supply = <&reg_3p3v_display>;
165
+ backlight = <&sp_backlight>;
213166 status = "disabled";
214167
215168 port {
....@@ -261,6 +214,13 @@
261214 #clock-cells = <0>;
262215 clock-frequency = <19200000>;
263216 };
217
+};
218
+
219
+&clks {
220
+ assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
221
+ <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
222
+ assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
223
+ <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
264224 };
265225
266226 &cpu0 {
....@@ -327,7 +287,7 @@
327287 compatible = "zii,rave-sp-watchdog";
328288 };
329289
330
- backlight {
290
+ sp_backlight: backlight {
331291 compatible = "zii,rave-sp-backlight";
332292 };
333293
....@@ -356,13 +316,46 @@
356316 &ecspi1 {
357317 pinctrl-names = "default";
358318 pinctrl-0 = <&pinctrl_ecspi1>;
359
- cs-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
319
+ cs-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
360320 status = "okay";
361321
362322 flash@0 {
363323 compatible = "st,m25p128", "jedec,spi-nor";
364324 spi-max-frequency = <20000000>;
365325 reg = <0>;
326
+ };
327
+};
328
+
329
+&gpio3 {
330
+ pinctrl-names = "default";
331
+ pinctrl-0 = <&pinctrl_gpio3_hog>;
332
+
333
+ usb-emulation {
334
+ gpio-hog;
335
+ gpios = <19 GPIO_ACTIVE_HIGH>;
336
+ output-low;
337
+ line-name = "usb-emulation";
338
+ };
339
+
340
+ usb-mode1 {
341
+ gpio-hog;
342
+ gpios = <20 GPIO_ACTIVE_HIGH>;
343
+ output-high;
344
+ line-name = "usb-mode1";
345
+ };
346
+
347
+ usb-pwr {
348
+ gpio-hog;
349
+ gpios = <22 GPIO_ACTIVE_LOW>;
350
+ output-high;
351
+ line-name = "usb-pwr-ctrl-en-n";
352
+ };
353
+
354
+ usb-mode2 {
355
+ gpio-hog;
356
+ gpios = <23 GPIO_ACTIVE_HIGH>;
357
+ output-high;
358
+ line-name = "usb-mode2";
366359 };
367360 };
368361
....@@ -384,7 +377,7 @@
384377 AVDD-supply = <&reg_3p3v>;
385378 IOVDD-supply = <&reg_3p3v>;
386379 DVDD-supply = <&vgen4_reg>;
387
- gpio-reset = <&gpio1 2 GPIO_ACTIVE_HIGH>;
380
+ reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
388381 };
389382
390383 accel@1c {
....@@ -393,8 +386,10 @@
393386 compatible = "fsl,mma8451";
394387 reg = <0x1c>;
395388 interrupt-parent = <&gpio1>;
396
- interrupt-names = "int1", "int2";
397
- interrupts = <18 IRQ_TYPE_LEVEL_LOW>, <20 IRQ_TYPE_LEVEL_LOW>;
389
+ interrupt-names = "INT2";
390
+ interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
391
+ vdd-supply = <&reg_3p3v>;
392
+ vddio-supply = <&reg_3p3v>;
398393 };
399394
400395 hpa2: amp@60 {
....@@ -528,6 +523,11 @@
528523 };
529524 };
530525
526
+ watchdog@38 {
527
+ compatible = "zii,rave-wdt";
528
+ reg = <0x38>;
529
+ };
530
+
531531 temp-sense@48 {
532532 compatible = "national,lm75";
533533 reg = <0x48>;
....@@ -572,7 +572,7 @@
572572 AVDD-supply = <&reg_3p3v>;
573573 IOVDD-supply = <&reg_3p3v>;
574574 DVDD-supply = <&vgen4_reg>;
575
- gpio-reset = <&gpio1 0 GPIO_ACTIVE_HIGH>;
575
+ reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
576576 };
577577
578578 touchscreen@20 {
....@@ -618,6 +618,16 @@
618618 touchscreen-inverted-x;
619619 touchscreen-swapped-x-y;
620620 status = "disabled";
621
+ };
622
+
623
+ reg_5p0v_user_usb: charger@32 {
624
+ compatible = "microchip,ucs1002";
625
+ pinctrl-names = "default";
626
+ pinctrl-0 = <&pinctrl_ucs1002_pins>;
627
+ reg = <0x32>;
628
+ interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
629
+ <&gpio3 21 IRQ_TYPE_EDGE_BOTH>;
630
+ interrupt-names = "a_det", "alert";
621631 };
622632
623633 hpa1: amp@60 {
....@@ -709,6 +719,8 @@
709719 mdio {
710720 #address-cells = <1>;
711721 #size-cells = <0>;
722
+ clock-frequency = <12500000>;
723
+ suppress-preamble;
712724 status = "okay";
713725
714726 switch: switch@0 {
....@@ -815,6 +827,10 @@
815827 status = "okay";
816828 };
817829
830
+&snvs_rtc {
831
+ status = "disabled";
832
+};
833
+
818834 &ssi1 {
819835 status = "okay";
820836 };
....@@ -876,7 +892,6 @@
876892 &iomuxc {
877893 pinctrl_accel: accelgrp {
878894 fsl,pins = <
879
- MX6QDL_PAD_SD1_CMD__GPIO1_IO18 0x4001b000
880895 MX6QDL_PAD_SD1_CLK__GPIO1_IO20 0x4001b000
881896 >;
882897 };
....@@ -962,6 +977,15 @@
962977 >;
963978 };
964979
980
+ pinctrl_gpio3_hog: gpio3hoggrp {
981
+ fsl,pins = <
982
+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x1b0b0
983
+ MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x1b0b0
984
+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b0
985
+ MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x1b0b0
986
+ >;
987
+ };
988
+
965989 pinctrl_i2c1: i2c1grp {
966990 fsl,pins = <
967991 MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
....@@ -1006,12 +1030,6 @@
10061030 pinctrl_reg_3p3v_sd: mmcsupply1grp {
10071031 fsl,pins = <
10081032 MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x858
1009
- >;
1010
- };
1011
-
1012
- pinctrl_reg_user_usb: usbotggrp {
1013
- fsl,pins = <
1014
- MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x40000038
10151033 >;
10161034 };
10171035
....@@ -1074,6 +1092,13 @@
10741092 >;
10751093 };
10761094
1095
+ pinctrl_ucs1002_pins: ucs1002grp {
1096
+ fsl,pins = <
1097
+ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x1b0b0
1098
+ MX6QDL_PAD_EIM_D21__GPIO3_IO21 0x1b0b0
1099
+ >;
1100
+ };
1101
+
10771102 pinctrl_usdhc2: usdhc2grp {
10781103 fsl,pins = <
10791104 MX6QDL_PAD_SD2_CMD__SD2_CMD 0x10059