Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Russell King |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 3 | * |
| 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 Estevam | f4b5939 | 2015-05-20 15:57:02 -0300 | [diff] [blame] | 10 | * modify it under the terms of the GNU General Public License |
| 11 | * version 2 as published by the Free Software Foundation. |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 12 | * |
Alexandre Belloni | 1328362 | 2017-01-03 11:27:13 +0100 | [diff] [blame] | 13 | * This file is distributed in the hope that it will be useful, |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 14 | * 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 Belloni | 1328362 | 2017-01-03 11:27:13 +0100 | [diff] [blame] | 18 | * Or, alternatively, |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 19 | * |
| 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 Belloni | 1328362 | 2017-01-03 11:27:13 +0100 | [diff] [blame] | 23 | * restriction, including without limitation the rights to use, |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 24 | * 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 Belloni | 1328362 | 2017-01-03 11:27:13 +0100 | [diff] [blame] | 32 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 33 | * 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 Belloni | 1328362 | 2017-01-03 11:27:13 +0100 | [diff] [blame] | 36 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
Russell King | 42919c5 | 2015-03-02 20:00:50 +0000 | [diff] [blame] | 37 | * 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 King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 40 | */ |
| 41 | #include "imx6qdl-microsom.dtsi" |
| 42 | #include "imx6qdl-microsom-ar8035.dtsi" |
George Joseph | 3274af0 | 2015-03-24 10:31:35 -0600 | [diff] [blame] | 43 | #include <dt-bindings/input/input.h> |
| 44 | #include <dt-bindings/gpio/gpio.h> |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 45 | |
| 46 | / { |
| 47 | ir_recv: ir-receiver { |
| 48 | compatible = "gpio-ir-receiver"; |
| 49 | gpios = <&gpio3 9 1>; |
| 50 | pinctrl-names = "default"; |
| 51 | pinctrl-0 = <&pinctrl_cubox_i_ir>; |
| 52 | }; |
| 53 | |
Russell King | eea53bb | 2014-06-17 14:40:56 +0100 | [diff] [blame] | 54 | pwmleds { |
| 55 | compatible = "pwm-leds"; |
| 56 | pinctrl-names = "default"; |
| 57 | pinctrl-0 = <&pinctrl_cubox_i_pwm1>; |
| 58 | |
| 59 | front { |
| 60 | active-low; |
| 61 | label = "imx6:red:front"; |
| 62 | max-brightness = <248>; |
| 63 | pwms = <&pwm1 0 50000>; |
| 64 | }; |
| 65 | }; |
| 66 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 67 | regulators { |
| 68 | compatible = "simple-bus"; |
| 69 | |
| 70 | reg_3p3v: 3p3v { |
| 71 | compatible = "regulator-fixed"; |
| 72 | regulator-name = "3P3V"; |
| 73 | regulator-min-microvolt = <3300000>; |
| 74 | regulator-max-microvolt = <3300000>; |
| 75 | regulator-always-on; |
| 76 | }; |
| 77 | |
| 78 | reg_usbh1_vbus: usb-h1-vbus { |
| 79 | compatible = "regulator-fixed"; |
| 80 | enable-active-high; |
| 81 | gpio = <&gpio1 0 0>; |
| 82 | pinctrl-names = "default"; |
| 83 | pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>; |
| 84 | regulator-name = "usb_h1_vbus"; |
| 85 | regulator-min-microvolt = <5000000>; |
| 86 | regulator-max-microvolt = <5000000>; |
| 87 | }; |
| 88 | |
| 89 | reg_usbotg_vbus: usb-otg-vbus { |
| 90 | compatible = "regulator-fixed"; |
| 91 | enable-active-high; |
| 92 | gpio = <&gpio3 22 0>; |
| 93 | pinctrl-names = "default"; |
| 94 | pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>; |
| 95 | regulator-name = "usb_otg_vbus"; |
| 96 | regulator-min-microvolt = <5000000>; |
| 97 | regulator-max-microvolt = <5000000>; |
| 98 | }; |
| 99 | }; |
| 100 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 101 | sound-spdif { |
| 102 | compatible = "fsl,imx-audio-spdif"; |
Russell King | 962af86 | 2014-08-23 10:11:31 +0100 | [diff] [blame] | 103 | model = "Integrated SPDIF"; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 104 | /* IMX6 doesn't implement this yet */ |
| 105 | spdif-controller = <&spdif>; |
| 106 | spdif-out; |
| 107 | }; |
George Joseph | 3274af0 | 2015-03-24 10:31:35 -0600 | [diff] [blame] | 108 | |
| 109 | gpio-keys { |
| 110 | compatible = "gpio-keys"; |
| 111 | pinctrl-0 = <&pinctrl_gpio_key>; |
| 112 | pinctrl-names = "default"; |
| 113 | |
| 114 | button_0 { |
| 115 | label = "Button 0"; |
| 116 | gpios = <&gpio3 8 GPIO_ACTIVE_LOW>; |
| 117 | linux,code = <BTN_0>; |
| 118 | }; |
| 119 | }; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 120 | }; |
| 121 | |
Russell King | f34d0d5 | 2014-04-18 11:01:27 +0100 | [diff] [blame] | 122 | &hdmi { |
| 123 | pinctrl-names = "default"; |
| 124 | pinctrl-0 = <&pinctrl_cubox_i_hdmi>; |
| 125 | ddc-i2c-bus = <&i2c2>; |
| 126 | status = "okay"; |
| 127 | }; |
| 128 | |
| 129 | &i2c2 { |
| 130 | clock-frequency = <100000>; |
| 131 | pinctrl-names = "default"; |
| 132 | pinctrl-0 = <&pinctrl_cubox_i_i2c2>; |
| 133 | status = "okay"; |
| 134 | }; |
| 135 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 136 | &i2c3 { |
| 137 | pinctrl-names = "default"; |
| 138 | pinctrl-0 = <&pinctrl_cubox_i_i2c3>; |
| 139 | |
| 140 | status = "okay"; |
| 141 | |
| 142 | rtc: pcf8523@68 { |
| 143 | compatible = "nxp,pcf8523"; |
| 144 | reg = <0x68>; |
| 145 | }; |
| 146 | }; |
| 147 | |
| 148 | &iomuxc { |
| 149 | cubox_i { |
Russell King | f34d0d5 | 2014-04-18 11:01:27 +0100 | [diff] [blame] | 150 | pinctrl_cubox_i_hdmi: cubox-i-hdmi { |
| 151 | fsl,pins = < |
| 152 | MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0 |
| 153 | >; |
| 154 | }; |
| 155 | |
| 156 | pinctrl_cubox_i_i2c2: cubox-i-i2c2 { |
| 157 | fsl,pins = < |
| 158 | MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 |
| 159 | MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 |
| 160 | >; |
| 161 | }; |
| 162 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 163 | pinctrl_cubox_i_i2c3: cubox-i-i2c3 { |
| 164 | fsl,pins = < |
| 165 | MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1 |
| 166 | MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1 |
| 167 | >; |
| 168 | }; |
| 169 | |
| 170 | pinctrl_cubox_i_ir: cubox-i-ir { |
| 171 | fsl,pins = < |
| 172 | MX6QDL_PAD_EIM_DA9__GPIO3_IO09 0x80000000 |
| 173 | >; |
| 174 | }; |
| 175 | |
Russell King | eea53bb | 2014-06-17 14:40:56 +0100 | [diff] [blame] | 176 | pinctrl_cubox_i_pwm1: cubox-i-pwm1-front-led { |
| 177 | fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b0>; |
| 178 | }; |
| 179 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 180 | pinctrl_cubox_i_spdif: cubox-i-spdif { |
Russell King | 87f9260 | 2014-02-08 21:18:24 +0000 | [diff] [blame] | 181 | fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 182 | }; |
| 183 | |
Russell King | f9908c1 | 2014-08-23 10:11:26 +0100 | [diff] [blame] | 184 | pinctrl_cubox_i_usbh1: cubox-i-usbh1 { |
| 185 | fsl,pins = <MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0>; |
| 186 | }; |
| 187 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 188 | pinctrl_cubox_i_usbh1_vbus: cubox-i-usbh1-vbus { |
| 189 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>; |
| 190 | }; |
| 191 | |
Russell King | f9908c1 | 2014-08-23 10:11:26 +0100 | [diff] [blame] | 192 | pinctrl_cubox_i_usbotg: cubox-i-usbotg { |
Russell King | 589681b | 2014-06-17 14:41:01 +0100 | [diff] [blame] | 193 | /* |
Russell King | f9908c1 | 2014-08-23 10:11:26 +0100 | [diff] [blame] | 194 | * The Cubox-i pulls ID low, but as it's pointless |
Russell King | 589681b | 2014-06-17 14:41:01 +0100 | [diff] [blame] | 195 | * leaving it as a pull-up, even if it is just 10uA. |
| 196 | */ |
Russell King | f9908c1 | 2014-08-23 10:11:26 +0100 | [diff] [blame] | 197 | fsl,pins = < |
| 198 | MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059 |
| 199 | MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0 |
| 200 | >; |
Russell King | 589681b | 2014-06-17 14:41:01 +0100 | [diff] [blame] | 201 | }; |
| 202 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 203 | pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus { |
| 204 | fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x4001b0b0>; |
| 205 | }; |
| 206 | |
| 207 | pinctrl_cubox_i_usdhc2_aux: cubox-i-usdhc2-aux { |
| 208 | fsl,pins = < |
| 209 | MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071 |
| 210 | MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071 |
| 211 | >; |
| 212 | }; |
| 213 | |
| 214 | pinctrl_cubox_i_usdhc2: cubox-i-usdhc2 { |
| 215 | fsl,pins = < |
| 216 | MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059 |
| 217 | MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059 |
| 218 | MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059 |
| 219 | MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059 |
| 220 | MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059 |
| 221 | MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059 |
| 222 | >; |
| 223 | }; |
George Joseph | 3274af0 | 2015-03-24 10:31:35 -0600 | [diff] [blame] | 224 | |
| 225 | pinctrl_gpio_key: gpio-key { |
| 226 | fsl,pins = < |
| 227 | MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x17059 |
| 228 | >; |
| 229 | }; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 230 | }; |
| 231 | }; |
| 232 | |
Philipp Zabel | 7cdbec1 | 2015-03-09 17:40:35 +0100 | [diff] [blame] | 233 | &pwm1 { |
| 234 | status = "okay"; |
| 235 | }; |
| 236 | |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 237 | &spdif { |
Russell King | 87f9260 | 2014-02-08 21:18:24 +0000 | [diff] [blame] | 238 | pinctrl-names = "default"; |
| 239 | pinctrl-0 = <&pinctrl_cubox_i_spdif>; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 240 | status = "okay"; |
| 241 | }; |
| 242 | |
| 243 | &usbh1 { |
Russell King | f9908c1 | 2014-08-23 10:11:26 +0100 | [diff] [blame] | 244 | pinctrl-names = "default"; |
| 245 | pinctrl-0 = <&pinctrl_cubox_i_usbh1>; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 246 | vbus-supply = <®_usbh1_vbus>; |
| 247 | status = "okay"; |
| 248 | }; |
| 249 | |
| 250 | &usbotg { |
Russell King | 589681b | 2014-06-17 14:41:01 +0100 | [diff] [blame] | 251 | pinctrl-names = "default"; |
Russell King | f9908c1 | 2014-08-23 10:11:26 +0100 | [diff] [blame] | 252 | pinctrl-0 = <&pinctrl_cubox_i_usbotg>; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 253 | vbus-supply = <®_usbotg_vbus>; |
| 254 | status = "okay"; |
| 255 | }; |
| 256 | |
| 257 | &usdhc2 { |
| 258 | pinctrl-names = "default"; |
| 259 | pinctrl-0 = <&pinctrl_cubox_i_usdhc2_aux &pinctrl_cubox_i_usdhc2>; |
| 260 | vmmc-supply = <®_3p3v>; |
Dong Aisheng | 89c1a8cf | 2015-07-22 20:53:02 +0800 | [diff] [blame] | 261 | cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
Russell King | 971488f | 2014-01-16 16:12:38 +0000 | [diff] [blame] | 262 | status = "okay"; |
| 263 | }; |