forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/boot/dts/imx6qdl-apalis.dtsi
....@@ -1,44 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
12 /*
2
- * Copyright 2014-2017 Toradex AG
3
+ * Copyright 2014-2020 Toradex
34 * Copyright 2012 Freescale Semiconductor, Inc.
45 * Copyright 2011 Linaro Ltd.
5
- *
6
- * This file is dual-licensed: you can use it either under the terms
7
- * of the GPL or the X11 license, at your option. Note that this dual
8
- * licensing only applies to this file, and not this project as a
9
- * whole.
10
- *
11
- * a) This file is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public License
13
- * version 2 as published by the Free Software Foundation.
14
- *
15
- * This file is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * Or, alternatively,
21
- *
22
- * b) Permission is hereby granted, free of charge, to any person
23
- * obtaining a copy of this software and associated documentation
24
- * files (the "Software"), to deal in the Software without
25
- * restriction, including without limitation the rights to use,
26
- * copy, modify, merge, publish, distribute, sublicense, and/or
27
- * sell copies of the Software, and to permit persons to whom the
28
- * Software is furnished to do so, subject to the following
29
- * conditions:
30
- *
31
- * The above copyright notice and this permission notice shall be
32
- * included in all copies or substantial portions of the Software.
33
- *
34
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41
- * OTHER DEALINGS IN THE SOFTWARE.
426 */
437
448 #include <dt-bindings/gpio/gpio.h>
....@@ -49,6 +13,7 @@
4913
5014 /* Will be filled by the bootloader */
5115 memory@10000000 {
16
+ device_type = "memory";
5217 reg = <0x10000000 0>;
5318 };
5419
....@@ -147,20 +112,22 @@
147112 };
148113
149114 &can1 {
150
- pinctrl-names = "default";
151
- pinctrl-0 = <&pinctrl_flexcan1>;
115
+ pinctrl-names = "default", "sleep";
116
+ pinctrl-0 = <&pinctrl_flexcan1_default>;
117
+ pinctrl-1 = <&pinctrl_flexcan1_sleep>;
152118 status = "disabled";
153119 };
154120
155121 &can2 {
156
- pinctrl-names = "default";
157
- pinctrl-0 = <&pinctrl_flexcan2>;
122
+ pinctrl-names = "default", "sleep";
123
+ pinctrl-0 = <&pinctrl_flexcan2_default>;
124
+ pinctrl-1 = <&pinctrl_flexcan2_sleep>;
158125 status = "disabled";
159126 };
160127
161128 /* Apalis SPI1 */
162129 &ecspi1 {
163
- cs-gpios = <&gpio5 25 GPIO_ACTIVE_HIGH>;
130
+ cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
164131 pinctrl-names = "default";
165132 pinctrl-0 = <&pinctrl_ecspi1>;
166133 status = "disabled";
....@@ -168,7 +135,7 @@
168135
169136 /* Apalis SPI2 */
170137 &ecspi2 {
171
- cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
138
+ cs-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
172139 pinctrl-names = "default";
173140 pinctrl-0 = <&pinctrl_ecspi2>;
174141 status = "disabled";
....@@ -177,7 +144,7 @@
177144 &fec {
178145 pinctrl-names = "default";
179146 pinctrl-0 = <&pinctrl_enet>;
180
- phy-mode = "rgmii";
147
+ phy-mode = "rgmii-id";
181148 phy-handle = <&ethphy>;
182149 phy-reset-duration = <10>;
183150 phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
....@@ -197,15 +164,18 @@
197164
198165 &hdmi {
199166 pinctrl-names = "default";
200
- pinctrl-0 = <&pinctrl_hdmi_ddc>;
167
+ pinctrl-0 = <&pinctrl_hdmi_ddc &pinctrl_hdmi_cec>;
201168 status = "disabled";
202169 };
203170
204171 /* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
205172 &i2c1 {
206173 clock-frequency = <100000>;
207
- pinctrl-names = "default";
174
+ pinctrl-names = "default", "gpio";
208175 pinctrl-0 = <&pinctrl_i2c1>;
176
+ pinctrl-1 = <&pinctrl_i2c1_gpio>;
177
+ scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
178
+ sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
209179 status = "disabled";
210180 };
211181
....@@ -215,8 +185,11 @@
215185 */
216186 &i2c2 {
217187 clock-frequency = <100000>;
218
- pinctrl-names = "default";
188
+ pinctrl-names = "default", "gpio";
219189 pinctrl-0 = <&pinctrl_i2c2>;
190
+ pinctrl-1 = <&pinctrl_i2c2_gpio>;
191
+ scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
192
+ sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
220193 status = "okay";
221194
222195 pmic: pfuze100@8 {
....@@ -313,6 +286,8 @@
313286 codec: sgtl5000@a {
314287 compatible = "fsl,sgtl5000";
315288 reg = <0x0a>;
289
+ pinctrl-names = "default";
290
+ pinctrl-0 = <&pinctrl_sgtl5000>;
316291 clocks = <&clks IMX6QDL_CLK_CKO>;
317292 VDDA-supply = <&reg_module_3v3_audio>;
318293 VDDIO-supply = <&reg_module_3v3>;
....@@ -331,11 +306,17 @@
331306 id = <0>;
332307 blocks = <0x5>;
333308 irq-trigger = <0x1>;
309
+ /* 3.25 MHz ADC clock speed */
310
+ st,adc-freq = <1>;
311
+ /* 12-bit ADC */
312
+ st,mod-12b = <1>;
313
+ /* internal ADC reference */
314
+ st,ref-sel = <0>;
315
+ /* ADC converstion time: 80 clocks */
316
+ st,sample-time = <4>;
334317
335318 stmpe_touchscreen {
336319 compatible = "st,stmpe-ts";
337
- /* 3.25 MHz ADC clock speed */
338
- st,adc-freq = <1>;
339320 /* 8 sample average control */
340321 st,ave-ctrl = <3>;
341322 /* 7 length fractional part in z */
....@@ -345,16 +326,16 @@
345326 * current limit value
346327 */
347328 st,i-drive = <1>;
348
- /* 12-bit ADC */
349
- st,mod-12b = <1>;
350
- /* internal ADC reference */
351
- st,ref-sel = <0>;
352
- /* ADC converstion time: 80 clocks */
353
- st,sample-time = <4>;
354329 /* 1 ms panel driver settling time */
355330 st,settling = <3>;
356331 /* 5 ms touch detect interrupt delay */
357332 st,touch-det-delay = <5>;
333
+ };
334
+
335
+ stmpe_adc {
336
+ compatible = "st,stmpe-adc";
337
+ /* forbid to use ADC channels 3-0 (touch) */
338
+ st,norequest-mask = <0x0F>;
358339 };
359340 };
360341 };
....@@ -365,11 +346,11 @@
365346 */
366347 &i2c3 {
367348 clock-frequency = <100000>;
368
- pinctrl-names = "default", "recovery";
349
+ pinctrl-names = "default", "gpio";
369350 pinctrl-0 = <&pinctrl_i2c3>;
370
- pinctrl-1 = <&pinctrl_i2c3_recovery>;
371
- scl-gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
372
- sda-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
351
+ pinctrl-1 = <&pinctrl_i2c3_gpio>;
352
+ scl-gpios = <&gpio3 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
353
+ sda-gpios = <&gpio3 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
373354 status = "disabled";
374355 };
375356
....@@ -392,6 +373,7 @@
392373 };
393374
394375 &pwm4 {
376
+ #pwm-cells = <2>;
395377 pinctrl-names = "default";
396378 pinctrl-0 = <&pinctrl_pwm4>;
397379 status = "disabled";
....@@ -482,10 +464,6 @@
482464 };
483465
484466 &iomuxc {
485
- /* pins used on module */
486
- pinctrl-names = "default";
487
- pinctrl-0 = <&pinctrl_reset_moci>;
488
-
489467 pinctrl_apalis_gpio1: gpio2io04grp {
490468 fsl,pins = <
491469 MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x130b0
....@@ -540,8 +518,6 @@
540518 MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
541519 MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
542520 MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
543
- /* SGTL5000 sys_mclk */
544
- MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
545521 >;
546522 };
547523
....@@ -596,17 +572,30 @@
596572 >;
597573 };
598574
599
- pinctrl_flexcan1: flexcan1grp {
575
+ pinctrl_flexcan1_default: flexcan1defgrp {
600576 fsl,pins = <
601577 MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x1b0b0
602578 MX6QDL_PAD_GPIO_8__FLEXCAN1_RX 0x1b0b0
603579 >;
604580 };
605581
606
- pinctrl_flexcan2: flexcan2grp {
582
+ pinctrl_flexcan1_sleep: flexcan1slpgrp {
583
+ fsl,pins = <
584
+ MX6QDL_PAD_GPIO_7__GPIO1_IO07 0x0
585
+ MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x0
586
+ >;
587
+ };
588
+
589
+ pinctrl_flexcan2_default: flexcan2defgrp {
607590 fsl,pins = <
608591 MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0x1b0b0
609592 MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b0b0
593
+ >;
594
+ };
595
+ pinctrl_flexcan2_sleep: flexcan2slpgrp {
596
+ fsl,pins = <
597
+ MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x0
598
+ MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x0
610599 >;
611600 };
612601
....@@ -643,10 +632,24 @@
643632 >;
644633 };
645634
635
+ pinctrl_i2c1_gpio: i2c1gpiogrp {
636
+ fsl,pins = <
637
+ MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x4001b8b1
638
+ MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x4001b8b1
639
+ >;
640
+ };
641
+
646642 pinctrl_i2c2: i2c2grp {
647643 fsl,pins = <
648644 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
649645 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
646
+ >;
647
+ };
648
+
649
+ pinctrl_i2c2_gpio: i2c2gpiogrp {
650
+ fsl,pins = <
651
+ MX6QDL_PAD_KEY_COL3__GPIO4_IO12 0x4001b8b1
652
+ MX6QDL_PAD_KEY_ROW3__GPIO4_IO13 0x4001b8b1
650653 >;
651654 };
652655
....@@ -657,7 +660,7 @@
657660 >;
658661 };
659662
660
- pinctrl_i2c3_recovery: i2c3recoverygrp {
663
+ pinctrl_i2c3_gpio: i2c3gpiogrp {
661664 fsl,pins = <
662665 MX6QDL_PAD_EIM_D17__GPIO3_IO17 0x4001b8b1
663666 MX6QDL_PAD_EIM_D18__GPIO3_IO18 0x4001b8b1
....@@ -807,6 +810,12 @@
807810 >;
808811 };
809812
813
+ pinctrl_sgtl5000: sgtl5000grp {
814
+ fsl,pins = <
815
+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
816
+ >;
817
+ };
818
+
810819 pinctrl_spdif: spdifgrp {
811820 fsl,pins = <
812821 MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0