1279377Simp/*
2279377Simp * Copyright (C) 2013,2014 Russell King
3295436Sandrew *
4295436Sandrew * This file is dual-licensed: you can use it either under the terms
5295436Sandrew * of the GPL or the X11 license, at your option. Note that this dual
6295436Sandrew * licensing only applies to this file, and not this project as a
7295436Sandrew * whole.
8295436Sandrew *
9295436Sandrew *  a) This file is free software; you can redistribute it and/or
10295436Sandrew *     modify it under the terms of the GNU General Public License
11295436Sandrew *     version 2 as published by the Free Software Foundation.
12295436Sandrew *
13295436Sandrew *     This file is distributed in the hope that it will be useful
14295436Sandrew *     but WITHOUT ANY WARRANTY; without even the implied warranty of
15295436Sandrew *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16295436Sandrew *     GNU General Public License for more details.
17295436Sandrew *
18295436Sandrew * Or, alternatively
19295436Sandrew *
20295436Sandrew *  b) Permission is hereby granted, free of charge, to any person
21295436Sandrew *     obtaining a copy of this software and associated documentation
22295436Sandrew *     files (the "Software"), to deal in the Software without
23295436Sandrew *     restriction, including without limitation the rights to use
24295436Sandrew *     copy, modify, merge, publish, distribute, sublicense, and/or
25295436Sandrew *     sell copies of the Software, and to permit persons to whom the
26295436Sandrew *     Software is furnished to do so, subject to the following
27295436Sandrew *     conditions:
28295436Sandrew *
29295436Sandrew *     The above copyright notice and this permission notice shall be
30295436Sandrew *     included in all copies or substantial portions of the Software.
31295436Sandrew *
32295436Sandrew *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
33295436Sandrew *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34295436Sandrew *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35295436Sandrew *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36295436Sandrew *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
37295436Sandrew *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38295436Sandrew *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39295436Sandrew *     OTHER DEALINGS IN THE SOFTWARE.
40279377Simp */
41279377Simp#include "imx6qdl-microsom.dtsi"
42279377Simp#include "imx6qdl-microsom-ar8035.dtsi"
43279377Simp
44279377Simp/ {
45279377Simp	chosen {
46279377Simp		stdout-path = &uart1;
47279377Simp	};
48279377Simp
49279377Simp	ir_recv: ir-receiver {
50279377Simp		compatible = "gpio-ir-receiver";
51279377Simp		gpios = <&gpio3 5 1>;
52279377Simp		pinctrl-names = "default";
53279377Simp		pinctrl-0 = <&pinctrl_hummingboard_gpio3_5>;
54279377Simp	};
55279377Simp
56279377Simp	regulators {
57279377Simp		compatible = "simple-bus";
58279377Simp
59279377Simp		reg_3p3v: 3p3v {
60279377Simp			compatible = "regulator-fixed";
61279377Simp			regulator-name = "3P3V";
62279377Simp			regulator-min-microvolt = <3300000>;
63279377Simp			regulator-max-microvolt = <3300000>;
64279377Simp			regulator-always-on;
65279377Simp		};
66279377Simp
67279377Simp		reg_usbh1_vbus: usb-h1-vbus {
68279377Simp			compatible = "regulator-fixed";
69279377Simp			enable-active-high;
70279377Simp			gpio = <&gpio1 0 0>;
71279377Simp			pinctrl-names = "default";
72279377Simp			pinctrl-0 = <&pinctrl_hummingboard_usbh1_vbus>;
73279377Simp			regulator-name = "usb_h1_vbus";
74279377Simp			regulator-min-microvolt = <5000000>;
75279377Simp			regulator-max-microvolt = <5000000>;
76279377Simp		};
77279377Simp
78279377Simp		reg_usbotg_vbus: usb-otg-vbus {
79279377Simp			compatible = "regulator-fixed";
80279377Simp			enable-active-high;
81279377Simp			gpio = <&gpio3 22 0>;
82279377Simp			pinctrl-names = "default";
83279377Simp			pinctrl-0 = <&pinctrl_hummingboard_usbotg_vbus>;
84279377Simp			regulator-name = "usb_otg_vbus";
85279377Simp			regulator-min-microvolt = <5000000>;
86279377Simp			regulator-max-microvolt = <5000000>;
87279377Simp		};
88279377Simp	};
89279377Simp
90295436Sandrew	sound-sgtl5000 {
91295436Sandrew		audio-codec = <&sgtl5000>;
92295436Sandrew		audio-routing =
93295436Sandrew			"MIC_IN", "Mic Jack",
94295436Sandrew			"Mic Jack", "Mic Bias",
95295436Sandrew			"Headphone Jack", "HP_OUT";
96295436Sandrew		compatible = "fsl,imx-audio-sgtl5000";
97295436Sandrew		model = "On-board Codec";
98295436Sandrew		mux-ext-port = <5>;
99295436Sandrew		mux-int-port = <1>;
100295436Sandrew		ssi-controller = <&ssi1>;
101295436Sandrew	};
102295436Sandrew
103279377Simp	sound-spdif {
104279377Simp		compatible = "fsl,imx-audio-spdif";
105279377Simp		model = "On-board SPDIF";
106279377Simp		/* IMX6 doesn't implement this yet */
107279377Simp		spdif-controller = <&spdif>;
108279377Simp		spdif-out;
109279377Simp	};
110279377Simp};
111279377Simp
112295436Sandrew&audmux {
113295436Sandrew	status = "okay";
114295436Sandrew};
115295436Sandrew
116279377Simp&can1 {
117279377Simp	pinctrl-names = "default";
118279377Simp	pinctrl-0 = <&pinctrl_hummingboard_flexcan1>;
119279377Simp	status = "okay";
120279377Simp};
121279377Simp
122279377Simp&hdmi {
123279377Simp	pinctrl-names = "default";
124279377Simp	pinctrl-0 = <&pinctrl_hummingboard_hdmi>;
125279377Simp	ddc-i2c-bus = <&i2c2>;
126279377Simp	status = "okay";
127279377Simp};
128279377Simp
129279377Simp&i2c1 {
130279377Simp	pinctrl-names = "default";
131279377Simp	pinctrl-0 = <&pinctrl_hummingboard_i2c1>;
132279377Simp	status = "okay";
133279377Simp
134295436Sandrew	/* Pro baseboard model */
135279377Simp	rtc: pcf8523@68 {
136279377Simp		compatible = "nxp,pcf8523";
137279377Simp		reg = <0x68>;
138279377Simp	};
139295436Sandrew
140295436Sandrew	/* Pro baseboard model */
141295436Sandrew	sgtl5000: sgtl5000@0a {
142295436Sandrew		clocks = <&clks IMX6QDL_CLK_CKO>;
143295436Sandrew		compatible = "fsl,sgtl5000";
144295436Sandrew		pinctrl-names = "default";
145295436Sandrew		pinctrl-0 = <&pinctrl_hummingboard_sgtl5000>;
146295436Sandrew		reg = <0x0a>;
147295436Sandrew		VDDA-supply = <&reg_3p3v>;
148295436Sandrew		VDDIO-supply = <&reg_3p3v>;
149295436Sandrew	};
150279377Simp};
151279377Simp
152279377Simp&i2c2 {
153279377Simp	clock-frequency = <100000>;
154279377Simp	pinctrl-names = "default";
155279377Simp	pinctrl-0 = <&pinctrl_hummingboard_i2c2>;
156279377Simp	status = "okay";
157279377Simp};
158279377Simp
159279377Simp&iomuxc {
160279377Simp	hummingboard {
161279377Simp		pinctrl_hummingboard_flexcan1: hummingboard-flexcan1 {
162279377Simp			fsl,pins = <
163279377Simp				MX6QDL_PAD_SD3_CLK__FLEXCAN1_RX 0x80000000
164279377Simp				MX6QDL_PAD_SD3_CMD__FLEXCAN1_TX 0x80000000
165279377Simp			>;
166279377Simp		};
167279377Simp
168279377Simp		pinctrl_hummingboard_gpio3_5: hummingboard-gpio3_5 {
169279377Simp			fsl,pins = <
170279377Simp				MX6QDL_PAD_EIM_DA5__GPIO3_IO05 0x1b0b1
171279377Simp			>;
172279377Simp		};
173279377Simp
174279377Simp		pinctrl_hummingboard_hdmi: hummingboard-hdmi {
175279377Simp			fsl,pins = <
176279377Simp				MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
177279377Simp			>;
178279377Simp		};
179279377Simp
180279377Simp		pinctrl_hummingboard_i2c1: hummingboard-i2c1 {
181279377Simp			fsl,pins = <
182279377Simp				MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
183279377Simp				MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
184279377Simp			>;
185279377Simp		};
186279377Simp
187279377Simp		pinctrl_hummingboard_i2c2: hummingboard-i2c2 {
188279377Simp			fsl,pins = <
189279377Simp				MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
190279377Simp				MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
191279377Simp			>;
192279377Simp		};
193279377Simp
194295436Sandrew		pinctrl_hummingboard_pcie_reset: hummingboard-pcie-reset {
195295436Sandrew			fsl,pins = <
196295436Sandrew				MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x1b0b1
197295436Sandrew			>;
198295436Sandrew		};
199295436Sandrew
200295436Sandrew		pinctrl_hummingboard_pwm1: pwm1grp {
201295436Sandrew			fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b1>;
202295436Sandrew		};
203295436Sandrew
204295436Sandrew		pinctrl_hummingboard_sgtl5000: hummingboard-sgtl5000 {
205295436Sandrew			fsl,pins = <
206295436Sandrew				MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0
207295436Sandrew				MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0
208295436Sandrew				MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x110b0
209295436Sandrew				MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0
210295436Sandrew				MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
211295436Sandrew			>;
212295436Sandrew		};
213295436Sandrew
214279377Simp		pinctrl_hummingboard_spdif: hummingboard-spdif {
215279377Simp			fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>;
216279377Simp		};
217279377Simp
218279377Simp		pinctrl_hummingboard_usbh1_vbus: hummingboard-usbh1-vbus {
219279377Simp			fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0>;
220279377Simp		};
221279377Simp
222279377Simp		pinctrl_hummingboard_usbotg_id: hummingboard-usbotg-id {
223279377Simp			/*
224279377Simp			 * Similar to pinctrl_usbotg_2, but we want it
225279377Simp			 * pulled down for a fixed host connection.
226279377Simp			 */
227279377Simp			fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>;
228279377Simp		};
229279377Simp
230279377Simp		pinctrl_hummingboard_usbotg_vbus: hummingboard-usbotg-vbus {
231279377Simp			fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b0>;
232279377Simp		};
233279377Simp
234279377Simp		pinctrl_hummingboard_usdhc2_aux: hummingboard-usdhc2-aux {
235279377Simp			fsl,pins = <
236279377Simp				MX6QDL_PAD_GPIO_4__GPIO1_IO04    0x1f071
237279377Simp			>;
238279377Simp		};
239279377Simp
240279377Simp		pinctrl_hummingboard_usdhc2: hummingboard-usdhc2 {
241279377Simp			fsl,pins = <
242279377Simp				MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
243279377Simp				MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
244279377Simp				MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
245279377Simp				MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
246279377Simp				MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
247279377Simp				MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
248279377Simp			>;
249279377Simp		};
250279377Simp	};
251279377Simp};
252279377Simp
253295436Sandrew&pcie {
254295436Sandrew	pinctrl-names = "default";
255295436Sandrew	pinctrl-0 = <&pinctrl_hummingboard_pcie_reset>;
256295436Sandrew	reset-gpio = <&gpio3 4 0>;
257295436Sandrew	status = "okay";
258295436Sandrew};
259295436Sandrew
260295436Sandrew&pwm1 {
261295436Sandrew	 pinctrl-names = "default";
262295436Sandrew	 pinctrl-0 = <&pinctrl_hummingboard_pwm1>;
263295436Sandrew	 status = "okay";
264295436Sandrew};
265295436Sandrew
266295436Sandrew&pwm2 {
267295436Sandrew	 pinctrl-names = "default";
268295436Sandrew	 status = "okay";
269295436Sandrew};
270295436Sandrew
271279377Simp&spdif {
272279377Simp	pinctrl-names = "default";
273279377Simp	pinctrl-0 = <&pinctrl_hummingboard_spdif>;
274279377Simp	status = "okay";
275279377Simp};
276279377Simp
277295436Sandrew&ssi1 {
278295436Sandrew	status = "okay";
279295436Sandrew};
280295436Sandrew
281279377Simp&usbh1 {
282279377Simp	disable-over-current;
283279377Simp	vbus-supply = <&reg_usbh1_vbus>;
284279377Simp	status = "okay";
285279377Simp};
286279377Simp
287279377Simp&usbotg {
288279377Simp	disable-over-current;
289279377Simp	pinctrl-names = "default";
290279377Simp	pinctrl-0 = <&pinctrl_hummingboard_usbotg_id>;
291279377Simp	vbus-supply = <&reg_usbotg_vbus>;
292279377Simp	status = "okay";
293279377Simp};
294279377Simp
295279377Simp&usdhc2 {
296279377Simp	pinctrl-names = "default";
297279377Simp	pinctrl-0 = <
298279377Simp		&pinctrl_hummingboard_usdhc2_aux
299279377Simp		&pinctrl_hummingboard_usdhc2
300279377Simp	>;
301279377Simp	vmmc-supply = <&reg_3p3v>;
302295436Sandrew	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
303279377Simp	status = "okay";
304279377Simp};
305