0001 /*
0002 * Copyright (C) 2014 Russell King
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License
0011 * version 2 as published by the Free Software Foundation.
0012 *
0013 * This file is distributed in the hope that it will be useful,
0014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0016 * GNU General Public License for more details.
0017 *
0018 * Or, alternatively,
0019 *
0020 * b) Permission is hereby granted, free of charge, to any person
0021 * obtaining a copy of this software and associated documentation
0022 * files (the "Software"), to deal in the Software without
0023 * restriction, including without limitation the rights to use,
0024 * copy, modify, merge, publish, distribute, sublicense, and/or
0025 * sell copies of the Software, and to permit persons to whom the
0026 * Software is furnished to do so, subject to the following
0027 * conditions:
0028 *
0029 * The above copyright notice and this permission notice shall be
0030 * included in all copies or substantial portions of the Software.
0031 *
0032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0033 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0034 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0035 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0036 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0037 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0038 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0039 * OTHER DEALINGS IN THE SOFTWARE.
0040 */
0041 #include <dt-bindings/input/input.h>
0042 #include <dt-bindings/gpio/gpio.h>
0043
0044 / {
0045 /* Will be filled by the bootloader */
0046 memory@10000000 {
0047 device_type = "memory";
0048 reg = <0x10000000 0>;
0049 };
0050
0051 ir_recv: ir-receiver {
0052 compatible = "gpio-ir-receiver";
0053 gpios = <&gpio3 9 1>;
0054 pinctrl-names = "default";
0055 pinctrl-0 = <&pinctrl_cubox_i_ir>;
0056 };
0057
0058 led-controller {
0059 compatible = "pwm-leds";
0060 pinctrl-names = "default";
0061 pinctrl-0 = <&pinctrl_cubox_i_pwm1>;
0062
0063 led-1 {
0064 active-low;
0065 label = "imx6:red:front";
0066 max-brightness = <248>;
0067 pwms = <&pwm1 0 50000>;
0068 };
0069 };
0070
0071 v_5v0: regulator-v-5v0 {
0072 compatible = "regulator-fixed";
0073 regulator-always-on;
0074 regulator-max-microvolt = <5000000>;
0075 regulator-min-microvolt = <5000000>;
0076 regulator-name = "v_5v0";
0077 };
0078
0079 v_usb2: regulator-v-usb2 {
0080 compatible = "regulator-fixed";
0081 enable-active-high;
0082 gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
0083 pinctrl-names = "default";
0084 pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>;
0085 regulator-max-microvolt = <5000000>;
0086 regulator-min-microvolt = <5000000>;
0087 regulator-name = "v_usb2";
0088 vin-supply = <&v_5v0>;
0089 };
0090
0091 v_usb1: regulator-v-usb1 {
0092 compatible = "regulator-fixed";
0093 enable-active-high;
0094 gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
0095 pinctrl-names = "default";
0096 pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>;
0097 regulator-max-microvolt = <5000000>;
0098 regulator-min-microvolt = <5000000>;
0099 regulator-name = "v_usb1";
0100 vin-supply = <&v_5v0>;
0101 };
0102
0103 sound-spdif {
0104 compatible = "fsl,imx-audio-spdif";
0105 model = "Integrated SPDIF";
0106 /* IMX6 doesn't implement this yet */
0107 spdif-controller = <&spdif>;
0108 spdif-out;
0109 };
0110
0111 gpio-keys {
0112 compatible = "gpio-keys";
0113 pinctrl-0 = <&pinctrl_gpio_key>;
0114 pinctrl-names = "default";
0115
0116 button_0 {
0117 label = "Button 0";
0118 gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
0119 linux,code = <BTN_0>;
0120 };
0121 };
0122 };
0123
0124 &hdmi {
0125 pinctrl-names = "default";
0126 pinctrl-0 = <&pinctrl_cubox_i_hdmi>;
0127 ddc-i2c-bus = <&i2c2>;
0128 status = "okay";
0129 };
0130
0131 &i2c2 {
0132 clock-frequency = <100000>;
0133 pinctrl-names = "default";
0134 pinctrl-0 = <&pinctrl_cubox_i_i2c2>;
0135 status = "okay";
0136 };
0137
0138 &i2c3 {
0139 pinctrl-names = "default";
0140 pinctrl-0 = <&pinctrl_cubox_i_i2c3>;
0141
0142 status = "okay";
0143
0144 rtc@68 {
0145 compatible = "nxp,pcf8523";
0146 reg = <0x68>;
0147 };
0148 };
0149
0150 &iomuxc {
0151 cubox_i {
0152 pinctrl_cubox_i_hdmi: cubox-i-hdmi {
0153 fsl,pins = <
0154 MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
0155 >;
0156 };
0157
0158 pinctrl_cubox_i_i2c2: cubox-i-i2c2 {
0159 fsl,pins = <
0160 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
0161 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
0162 >;
0163 };
0164
0165 pinctrl_cubox_i_i2c3: cubox-i-i2c3 {
0166 fsl,pins = <
0167 MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
0168 MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
0169 >;
0170 };
0171
0172 pinctrl_cubox_i_ir: cubox-i-ir {
0173 fsl,pins = <
0174 MX6QDL_PAD_EIM_DA9__GPIO3_IO09 0x80000000
0175 >;
0176 };
0177
0178 pinctrl_cubox_i_pwm1: cubox-i-pwm1-front-led {
0179 fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b0>;
0180 };
0181
0182 pinctrl_cubox_i_spdif: cubox-i-spdif {
0183 fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>;
0184 };
0185
0186 pinctrl_cubox_i_usbh1: cubox-i-usbh1 {
0187 fsl,pins = <MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0>;
0188 };
0189
0190 pinctrl_cubox_i_usbh1_vbus: cubox-i-usbh1-vbus {
0191 fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>;
0192 };
0193
0194 pinctrl_cubox_i_usbotg: cubox-i-usbotg {
0195 /*
0196 * The Cubox-i pulls ID low, but as it's pointless
0197 * leaving it as a pull-up, even if it is just 10uA.
0198 */
0199 fsl,pins = <
0200 MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059
0201 MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0
0202 >;
0203 };
0204
0205 pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus {
0206 fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x4001b0b0>;
0207 };
0208
0209 pinctrl_cubox_i_usdhc2_aux: cubox-i-usdhc2-aux {
0210 fsl,pins = <
0211 MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
0212 MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
0213 >;
0214 };
0215
0216 pinctrl_cubox_i_usdhc2: cubox-i-usdhc2 {
0217 fsl,pins = <
0218 MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
0219 MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
0220 MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
0221 MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
0222 MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
0223 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
0224 >;
0225 };
0226
0227 pinctrl_gpio_key: gpio-key {
0228 fsl,pins = <
0229 MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x17059
0230 >;
0231 };
0232 };
0233 };
0234
0235 &pwm1 {
0236 #pwm-cells = <2>;
0237 status = "okay";
0238 };
0239
0240 &spdif {
0241 pinctrl-names = "default";
0242 pinctrl-0 = <&pinctrl_cubox_i_spdif>;
0243 status = "okay";
0244 };
0245
0246 &usbh1 {
0247 pinctrl-names = "default";
0248 pinctrl-0 = <&pinctrl_cubox_i_usbh1>;
0249 vbus-supply = <&v_usb2>;
0250 status = "okay";
0251 };
0252
0253 &usbotg {
0254 pinctrl-names = "default";
0255 pinctrl-0 = <&pinctrl_cubox_i_usbotg>;
0256 vbus-supply = <&v_usb1>;
0257 status = "okay";
0258 };
0259
0260 &usdhc2 {
0261 pinctrl-names = "default";
0262 pinctrl-0 = <&pinctrl_cubox_i_usdhc2_aux &pinctrl_cubox_i_usdhc2>;
0263 vmmc-supply = <&vcc_3v3>;
0264 cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
0265 status = "okay";
0266 };
0267
0268 &vcc_3v3 {
0269 vin-supply = <&v_5v0>;
0270 };