blob: 1e530d892b768dda9146c30df8a48e4cca9e065f [file] [log] [blame]
Russell King971488f2014-01-16 16:12:38 +00001/*
2 * Copyright (C) 2014 Russell King
Russell King42919c52015-03-02 20:00:50 +00003 *
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
Fabio Estevamf4b59392015-05-20 15:57:02 -030010 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
Russell King42919c52015-03-02 20:00:50 +000012 *
Alexandre Belloni13283622017-01-03 11:27:13 +010013 * This file is distributed in the hope that it will be useful,
Russell King42919c52015-03-02 20:00:50 +000014 * 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 *
Alexandre Belloni13283622017-01-03 11:27:13 +010018 * Or, alternatively,
Russell King42919c52015-03-02 20:00:50 +000019 *
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
Alexandre Belloni13283622017-01-03 11:27:13 +010023 * restriction, including without limitation the rights to use,
Russell King42919c52015-03-02 20:00:50 +000024 * 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 *
Alexandre Belloni13283622017-01-03 11:27:13 +010032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Russell King42919c52015-03-02 20:00:50 +000033 * 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
Alexandre Belloni13283622017-01-03 11:27:13 +010036 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
Russell King42919c52015-03-02 20:00:50 +000037 * 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.
Russell King971488f2014-01-16 16:12:38 +000040 */
George Joseph3274af02015-03-24 10:31:35 -060041#include <dt-bindings/input/input.h>
42#include <dt-bindings/gpio/gpio.h>
Russell King971488f2014-01-16 16:12:38 +000043
44/ {
Marco Franchi6de57232018-01-24 11:22:12 -020045 /* Will be filled by the bootloader */
Fabio Estevamedc05812018-02-22 14:16:35 -030046 memory@10000000 {
Marco Franchi404c0c92018-12-05 16:10:03 -020047 device_type = "memory";
Fabio Estevamedc05812018-02-22 14:16:35 -030048 reg = <0x10000000 0>;
Marco Franchi6de57232018-01-24 11:22:12 -020049 };
50
Russell King971488f2014-01-16 16:12:38 +000051 ir_recv: ir-receiver {
52 compatible = "gpio-ir-receiver";
53 gpios = <&gpio3 9 1>;
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_cubox_i_ir>;
56 };
57
Alexander Dahl97f1dd52020-10-05 22:34:47 +020058 led-controller {
Russell Kingeea53bb2014-06-17 14:40:56 +010059 compatible = "pwm-leds";
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_cubox_i_pwm1>;
62
Alexander Dahl97f1dd52020-10-05 22:34:47 +020063 led-1 {
Russell Kingeea53bb2014-06-17 14:40:56 +010064 active-low;
65 label = "imx6:red:front";
66 max-brightness = <248>;
67 pwms = <&pwm1 0 50000>;
68 };
69 };
70
Russell King64e593a2017-11-28 15:02:56 +000071 v_5v0: regulator-v-5v0 {
Russell King97321ee2017-11-28 15:01:59 +000072 compatible = "regulator-fixed";
Russell King97321ee2017-11-28 15:01:59 +000073 regulator-always-on;
Russell King64e593a2017-11-28 15:02:56 +000074 regulator-max-microvolt = <5000000>;
75 regulator-min-microvolt = <5000000>;
76 regulator-name = "v_5v0";
Russell King97321ee2017-11-28 15:01:59 +000077 };
Russell King971488f2014-01-16 16:12:38 +000078
Russell King64e593a2017-11-28 15:02:56 +000079 v_usb2: regulator-v-usb2 {
Russell King97321ee2017-11-28 15:01:59 +000080 compatible = "regulator-fixed";
81 enable-active-high;
Russell King46071352017-11-28 15:03:16 +000082 gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
Russell King97321ee2017-11-28 15:01:59 +000083 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>;
Russell King97321ee2017-11-28 15:01:59 +000085 regulator-max-microvolt = <5000000>;
Russell King64e593a2017-11-28 15:02:56 +000086 regulator-min-microvolt = <5000000>;
87 regulator-name = "v_usb2";
88 vin-supply = <&v_5v0>;
Russell King97321ee2017-11-28 15:01:59 +000089 };
Russell King971488f2014-01-16 16:12:38 +000090
Russell King64e593a2017-11-28 15:02:56 +000091 v_usb1: regulator-v-usb1 {
Russell King97321ee2017-11-28 15:01:59 +000092 compatible = "regulator-fixed";
93 enable-active-high;
Russell King46071352017-11-28 15:03:16 +000094 gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
Russell King97321ee2017-11-28 15:01:59 +000095 pinctrl-names = "default";
96 pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>;
Russell King97321ee2017-11-28 15:01:59 +000097 regulator-max-microvolt = <5000000>;
Russell King64e593a2017-11-28 15:02:56 +000098 regulator-min-microvolt = <5000000>;
99 regulator-name = "v_usb1";
100 vin-supply = <&v_5v0>;
Russell King971488f2014-01-16 16:12:38 +0000101 };
102
Russell King971488f2014-01-16 16:12:38 +0000103 sound-spdif {
104 compatible = "fsl,imx-audio-spdif";
Russell King962af862014-08-23 10:11:31 +0100105 model = "Integrated SPDIF";
Russell King971488f2014-01-16 16:12:38 +0000106 /* IMX6 doesn't implement this yet */
107 spdif-controller = <&spdif>;
108 spdif-out;
109 };
George Joseph3274af02015-03-24 10:31:35 -0600110
111 gpio-keys {
112 compatible = "gpio-keys";
113 pinctrl-0 = <&pinctrl_gpio_key>;
114 pinctrl-names = "default";
115
116 button_0 {
117 label = "Button 0";
118 gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
119 linux,code = <BTN_0>;
120 };
121 };
Russell King971488f2014-01-16 16:12:38 +0000122};
123
Russell Kingf34d0d52014-04-18 11:01:27 +0100124&hdmi {
125 pinctrl-names = "default";
126 pinctrl-0 = <&pinctrl_cubox_i_hdmi>;
127 ddc-i2c-bus = <&i2c2>;
128 status = "okay";
129};
130
131&i2c2 {
132 clock-frequency = <100000>;
133 pinctrl-names = "default";
134 pinctrl-0 = <&pinctrl_cubox_i_i2c2>;
135 status = "okay";
136};
137
Russell King971488f2014-01-16 16:12:38 +0000138&i2c3 {
139 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_cubox_i_i2c3>;
141
142 status = "okay";
143
Russell King6f95d852017-11-28 15:03:01 +0000144 rtc@68 {
Russell King971488f2014-01-16 16:12:38 +0000145 compatible = "nxp,pcf8523";
146 reg = <0x68>;
147 };
148};
149
150&iomuxc {
151 cubox_i {
Russell Kingf34d0d52014-04-18 11:01:27 +0100152 pinctrl_cubox_i_hdmi: cubox-i-hdmi {
153 fsl,pins = <
154 MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
155 >;
156 };
157
158 pinctrl_cubox_i_i2c2: cubox-i-i2c2 {
159 fsl,pins = <
160 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
161 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
162 >;
163 };
164
Russell King971488f2014-01-16 16:12:38 +0000165 pinctrl_cubox_i_i2c3: cubox-i-i2c3 {
166 fsl,pins = <
167 MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
168 MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
169 >;
170 };
171
172 pinctrl_cubox_i_ir: cubox-i-ir {
173 fsl,pins = <
174 MX6QDL_PAD_EIM_DA9__GPIO3_IO09 0x80000000
175 >;
176 };
177
Russell Kingeea53bb2014-06-17 14:40:56 +0100178 pinctrl_cubox_i_pwm1: cubox-i-pwm1-front-led {
179 fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b0>;
180 };
181
Russell King971488f2014-01-16 16:12:38 +0000182 pinctrl_cubox_i_spdif: cubox-i-spdif {
Russell King87f92602014-02-08 21:18:24 +0000183 fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>;
Russell King971488f2014-01-16 16:12:38 +0000184 };
185
Russell Kingf9908c12014-08-23 10:11:26 +0100186 pinctrl_cubox_i_usbh1: cubox-i-usbh1 {
187 fsl,pins = <MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0>;
188 };
189
Russell King971488f2014-01-16 16:12:38 +0000190 pinctrl_cubox_i_usbh1_vbus: cubox-i-usbh1-vbus {
191 fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>;
192 };
193
Russell Kingf9908c12014-08-23 10:11:26 +0100194 pinctrl_cubox_i_usbotg: cubox-i-usbotg {
Russell King589681b2014-06-17 14:41:01 +0100195 /*
Russell Kingf9908c12014-08-23 10:11:26 +0100196 * The Cubox-i pulls ID low, but as it's pointless
Russell King589681b2014-06-17 14:41:01 +0100197 * leaving it as a pull-up, even if it is just 10uA.
198 */
Russell Kingf9908c12014-08-23 10:11:26 +0100199 fsl,pins = <
200 MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059
201 MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0
202 >;
Russell King589681b2014-06-17 14:41:01 +0100203 };
204
Russell King971488f2014-01-16 16:12:38 +0000205 pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus {
206 fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x4001b0b0>;
207 };
208
209 pinctrl_cubox_i_usdhc2_aux: cubox-i-usdhc2-aux {
210 fsl,pins = <
211 MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
212 MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
213 >;
214 };
215
216 pinctrl_cubox_i_usdhc2: cubox-i-usdhc2 {
217 fsl,pins = <
218 MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
219 MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
220 MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
221 MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
222 MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
223 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
224 >;
225 };
George Joseph3274af02015-03-24 10:31:35 -0600226
227 pinctrl_gpio_key: gpio-key {
228 fsl,pins = <
229 MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x17059
230 >;
231 };
Russell King971488f2014-01-16 16:12:38 +0000232 };
233};
234
Philipp Zabel7cdbec12015-03-09 17:40:35 +0100235&pwm1 {
Uwe Kleine-Königfa28d822020-07-10 07:19:37 +0200236 #pwm-cells = <2>;
Philipp Zabel7cdbec12015-03-09 17:40:35 +0100237 status = "okay";
238};
239
Russell King971488f2014-01-16 16:12:38 +0000240&spdif {
Russell King87f92602014-02-08 21:18:24 +0000241 pinctrl-names = "default";
242 pinctrl-0 = <&pinctrl_cubox_i_spdif>;
Russell King971488f2014-01-16 16:12:38 +0000243 status = "okay";
244};
245
246&usbh1 {
Russell Kingf9908c12014-08-23 10:11:26 +0100247 pinctrl-names = "default";
248 pinctrl-0 = <&pinctrl_cubox_i_usbh1>;
Russell King64e593a2017-11-28 15:02:56 +0000249 vbus-supply = <&v_usb2>;
Russell King971488f2014-01-16 16:12:38 +0000250 status = "okay";
251};
252
253&usbotg {
Russell King589681b2014-06-17 14:41:01 +0100254 pinctrl-names = "default";
Russell Kingf9908c12014-08-23 10:11:26 +0100255 pinctrl-0 = <&pinctrl_cubox_i_usbotg>;
Russell King64e593a2017-11-28 15:02:56 +0000256 vbus-supply = <&v_usb1>;
Russell King971488f2014-01-16 16:12:38 +0000257 status = "okay";
258};
259
260&usdhc2 {
261 pinctrl-names = "default";
262 pinctrl-0 = <&pinctrl_cubox_i_usdhc2_aux &pinctrl_cubox_i_usdhc2>;
Russell King64e593a2017-11-28 15:02:56 +0000263 vmmc-supply = <&vcc_3v3>;
Dong Aisheng89c1a8cf2015-07-22 20:53:02 +0800264 cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
Russell King971488f2014-01-16 16:12:38 +0000265 status = "okay";
266};
Russell King64e593a2017-11-28 15:02:56 +0000267
268&vcc_3v3 {
269 vin-supply = <&v_5v0>;
270};