GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / imx6q-gk802.dts
1 /*
2  * Copyright (C) 2013 Philipp Zabel
3  *
4  * This file is licensed under the terms of the GNU General Public License
5  * version 2.  This program is licensed "as is" without any warranty of any
6  * kind, whether express or implied.
7  */
8
9 /dts-v1/;
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include "imx6q.dtsi"
13
14 / {
15         model = "Zealz GK802";
16         compatible = "zealz,imx6q-gk802", "fsl,imx6q";
17
18         chosen {
19                 stdout-path = &uart4;
20         };
21
22         memory@10000000 {
23                 reg = <0x10000000 0x40000000>;
24         };
25
26         regulators {
27                 compatible = "simple-bus";
28                 #address-cells = <1>;
29                 #size-cells = <0>;
30
31                 reg_3p3v: regulator@0 {
32                         compatible = "regulator-fixed";
33                         reg = <0>;
34                         regulator-name = "3P3V";
35                         regulator-min-microvolt = <3300000>;
36                         regulator-max-microvolt = <3300000>;
37                         regulator-always-on;
38                 };
39         };
40
41         gpio-keys {
42                 compatible = "gpio-keys";
43
44                 recovery-button {
45                         label = "recovery";
46                         gpios = <&gpio3 16 1>;
47                         linux,code = <KEY_RESTART>;
48                         wakeup-source;
49                 };
50         };
51 };
52
53 &hdmi {
54         ddc-i2c-bus = <&i2c3>;
55         status = "okay";
56 };
57
58 /* Internal I2C */
59 &i2c2 {
60         pinctrl-names = "default";
61         pinctrl-0 = <&pinctrl_i2c2>;
62         clock-frequency = <100000>;
63         status = "okay";
64
65         /* SDMC DM2016 1024 bit EEPROM + 128 bit OTP */
66         eeprom: dm2016@51 {
67                 compatible = "sdmc,dm2016";
68                 reg = <0x51>;
69         };
70 };
71
72 /* External I2C via HDMI */
73 &i2c3 {
74         pinctrl-names = "default";
75         pinctrl-0 = <&pinctrl_i2c3>;
76         clock-frequency = <100000>;
77         status = "okay";
78 };
79
80 &iomuxc {
81         pinctrl-names = "default";
82         pinctrl-0 = <&pinctrl_hog>;
83
84         imx6q-gk802 {
85                 pinctrl_hog: hoggrp {
86                         fsl,pins = <
87                                 /* Recovery button, active-low */
88                                 MX6QDL_PAD_EIM_D16__GPIO3_IO16  0x100b1
89                                 /* RTL8192CU enable GPIO, active-low */
90                                 MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b0
91                         >;
92                 };
93
94                 pinctrl_i2c2: i2c2grp {
95                         fsl,pins = <
96                                 MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
97                                 MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
98                         >;
99                 };
100
101                 pinctrl_i2c3: i2c3grp {
102                         fsl,pins = <
103                                 MX6QDL_PAD_GPIO_5__I2C3_SCL             0x4001b8b1
104                                 MX6QDL_PAD_GPIO_16__I2C3_SDA            0x4001b8b1
105                         >;
106                 };
107
108                 pinctrl_uart4: uart4grp {
109                         fsl,pins = <
110                                 MX6QDL_PAD_KEY_COL0__UART4_TX_DATA      0x1b0b1
111                                 MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA      0x1b0b1
112                         >;
113                 };
114
115                 pinctrl_usdhc3: usdhc3grp {
116                         fsl,pins = <
117                                 MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
118                                 MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10059
119                                 MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17059
120                                 MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
121                                 MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
122                                 MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
123                         >;
124                 };
125
126                 pinctrl_usdhc4: usdhc4grp {
127                         fsl,pins = <
128                                 MX6QDL_PAD_SD4_CMD__SD4_CMD             0x17059
129                                 MX6QDL_PAD_SD4_CLK__SD4_CLK             0x10059
130                                 MX6QDL_PAD_SD4_DAT0__SD4_DATA0          0x17059
131                                 MX6QDL_PAD_SD4_DAT1__SD4_DATA1          0x17059
132                                 MX6QDL_PAD_SD4_DAT2__SD4_DATA2          0x17059
133                                 MX6QDL_PAD_SD4_DAT3__SD4_DATA3          0x17059
134                         >;
135                 };
136         };
137 };
138
139 &uart2 {
140         status = "okay";
141 };
142
143 &uart4 {
144         pinctrl-names = "default";
145         pinctrl-0 = <&pinctrl_uart4>;
146         status = "okay";
147 };
148
149 /* External USB-A port (USBOTG) */
150 &usbotg {
151         disable-over-current;
152         status = "okay";
153 };
154
155 /* Internal USB port (USBH1), connected to RTL8192CU */
156 &usbh1 {
157         disable-over-current;
158         status = "okay";
159 };
160
161 /* External microSD */
162 &usdhc3 {
163         pinctrl-names = "default";
164         pinctrl-0 = <&pinctrl_usdhc3>;
165         bus-width = <4>;
166         cd-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
167         vmmc-supply = <&reg_3p3v>;
168         status = "okay";
169 };
170
171 /* Internal microSD */
172 &usdhc4 {
173         pinctrl-names = "default";
174         pinctrl-0 = <&pinctrl_usdhc4>;
175         bus-width = <4>;
176         vmmc-supply = <&reg_3p3v>;
177         status = "okay";
178 };