Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Boundary Devices, Inc. |
| 3 | * Copyright 2011 Freescale Semiconductor, Inc. |
| 4 | * Copyright 2011 Linaro Ltd. |
| 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License |
| 8 | * Version 2 or later at the following locations: |
| 9 | * |
| 10 | * http://www.opensource.org/licenses/gpl-license.html |
| 11 | * http://www.gnu.org/copyleft/gpl.html |
| 12 | */ |
Troy Kisky | da474d4 | 2013-12-18 14:51:44 -0700 | [diff] [blame] | 13 | #include <dt-bindings/gpio/gpio.h> |
| 14 | #include <dt-bindings/input/input.h> |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 15 | |
| 16 | / { |
Sascha Hauer | 48f5196 | 2014-05-07 15:19:00 +0200 | [diff] [blame] | 17 | chosen { |
| 18 | stdout-path = &uart2; |
| 19 | }; |
| 20 | |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 21 | memory { |
| 22 | reg = <0x10000000 0x40000000>; |
| 23 | }; |
| 24 | |
| 25 | regulators { |
| 26 | compatible = "simple-bus"; |
| 27 | #address-cells = <1>; |
| 28 | #size-cells = <0>; |
| 29 | |
| 30 | reg_2p5v: regulator@0 { |
| 31 | compatible = "regulator-fixed"; |
| 32 | reg = <0>; |
| 33 | regulator-name = "2P5V"; |
| 34 | regulator-min-microvolt = <2500000>; |
| 35 | regulator-max-microvolt = <2500000>; |
| 36 | regulator-always-on; |
| 37 | }; |
| 38 | |
| 39 | reg_3p3v: regulator@1 { |
| 40 | compatible = "regulator-fixed"; |
| 41 | reg = <1>; |
| 42 | regulator-name = "3P3V"; |
| 43 | regulator-min-microvolt = <3300000>; |
| 44 | regulator-max-microvolt = <3300000>; |
| 45 | regulator-always-on; |
| 46 | }; |
| 47 | |
| 48 | reg_usb_otg_vbus: regulator@2 { |
| 49 | compatible = "regulator-fixed"; |
| 50 | reg = <2>; |
| 51 | regulator-name = "usb_otg_vbus"; |
| 52 | regulator-min-microvolt = <5000000>; |
| 53 | regulator-max-microvolt = <5000000>; |
| 54 | gpio = <&gpio3 22 0>; |
| 55 | enable-active-high; |
| 56 | }; |
| 57 | }; |
| 58 | |
Troy Kisky | da474d4 | 2013-12-18 14:51:44 -0700 | [diff] [blame] | 59 | gpio-keys { |
| 60 | compatible = "gpio-keys"; |
| 61 | pinctrl-names = "default"; |
| 62 | pinctrl-0 = <&pinctrl_gpio_keys>; |
| 63 | |
| 64 | power { |
| 65 | label = "Power Button"; |
| 66 | gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; |
| 67 | linux,code = <KEY_POWER>; |
| 68 | gpio-key,wakeup; |
| 69 | }; |
| 70 | |
| 71 | menu { |
| 72 | label = "Menu"; |
| 73 | gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; |
| 74 | linux,code = <KEY_MENU>; |
| 75 | }; |
| 76 | |
| 77 | home { |
| 78 | label = "Home"; |
| 79 | gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; |
| 80 | linux,code = <KEY_HOME>; |
| 81 | }; |
| 82 | |
| 83 | back { |
| 84 | label = "Back"; |
| 85 | gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; |
| 86 | linux,code = <KEY_BACK>; |
| 87 | }; |
| 88 | |
| 89 | volume-up { |
| 90 | label = "Volume Up"; |
| 91 | gpios = <&gpio7 13 GPIO_ACTIVE_LOW>; |
| 92 | linux,code = <KEY_VOLUMEUP>; |
| 93 | }; |
| 94 | |
| 95 | volume-down { |
| 96 | label = "Volume Down"; |
| 97 | gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; |
| 98 | linux,code = <KEY_VOLUMEDOWN>; |
| 99 | }; |
| 100 | }; |
| 101 | |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 102 | sound { |
| 103 | compatible = "fsl,imx6q-nitrogen6x-sgtl5000", |
| 104 | "fsl,imx-audio-sgtl5000"; |
| 105 | model = "imx6q-nitrogen6x-sgtl5000"; |
| 106 | ssi-controller = <&ssi1>; |
| 107 | audio-codec = <&codec>; |
| 108 | audio-routing = |
| 109 | "MIC_IN", "Mic Jack", |
| 110 | "Mic Jack", "Mic Bias", |
| 111 | "Headphone Jack", "HP_OUT"; |
| 112 | mux-int-port = <1>; |
| 113 | mux-ext-port = <3>; |
| 114 | }; |
| 115 | |
| 116 | backlight_lcd { |
| 117 | compatible = "pwm-backlight"; |
| 118 | pwms = <&pwm1 0 5000000>; |
| 119 | brightness-levels = <0 4 8 16 32 64 128 255>; |
| 120 | default-brightness-level = <7>; |
| 121 | power-supply = <®_3p3v>; |
| 122 | status = "okay"; |
| 123 | }; |
| 124 | |
| 125 | backlight_lvds { |
| 126 | compatible = "pwm-backlight"; |
| 127 | pwms = <&pwm4 0 5000000>; |
| 128 | brightness-levels = <0 4 8 16 32 64 128 255>; |
| 129 | default-brightness-level = <7>; |
| 130 | power-supply = <®_3p3v>; |
| 131 | status = "okay"; |
| 132 | }; |
| 133 | }; |
| 134 | |
| 135 | &audmux { |
| 136 | pinctrl-names = "default"; |
| 137 | pinctrl-0 = <&pinctrl_audmux>; |
| 138 | status = "okay"; |
| 139 | }; |
| 140 | |
| 141 | &ecspi1 { |
| 142 | fsl,spi-num-chipselects = <1>; |
| 143 | cs-gpios = <&gpio3 19 0>; |
| 144 | pinctrl-names = "default"; |
| 145 | pinctrl-0 = <&pinctrl_ecspi1>; |
| 146 | status = "okay"; |
| 147 | |
| 148 | flash: m25p80@0 { |
| 149 | compatible = "sst,sst25vf016b"; |
| 150 | spi-max-frequency = <20000000>; |
| 151 | reg = <0>; |
| 152 | }; |
| 153 | }; |
| 154 | |
| 155 | &fec { |
| 156 | pinctrl-names = "default"; |
| 157 | pinctrl-0 = <&pinctrl_enet>; |
| 158 | phy-mode = "rgmii"; |
| 159 | phy-reset-gpios = <&gpio1 27 0>; |
| 160 | txen-skew-ps = <0>; |
| 161 | txc-skew-ps = <3000>; |
| 162 | rxdv-skew-ps = <0>; |
| 163 | rxc-skew-ps = <3000>; |
| 164 | rxd0-skew-ps = <0>; |
| 165 | rxd1-skew-ps = <0>; |
| 166 | rxd2-skew-ps = <0>; |
| 167 | rxd3-skew-ps = <0>; |
| 168 | txd0-skew-ps = <0>; |
| 169 | txd1-skew-ps = <0>; |
| 170 | txd2-skew-ps = <0>; |
| 171 | txd3-skew-ps = <0>; |
Troy Kisky | 6261c4c | 2013-12-20 11:47:11 -0700 | [diff] [blame] | 172 | interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, |
| 173 | <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>; |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 174 | status = "okay"; |
| 175 | }; |
| 176 | |
| 177 | &i2c1 { |
| 178 | clock-frequency = <100000>; |
| 179 | pinctrl-names = "default"; |
| 180 | pinctrl-0 = <&pinctrl_i2c1>; |
| 181 | status = "okay"; |
| 182 | |
| 183 | codec: sgtl5000@0a { |
| 184 | compatible = "fsl,sgtl5000"; |
| 185 | reg = <0x0a>; |
| 186 | clocks = <&clks 201>; |
| 187 | VDDA-supply = <®_2p5v>; |
| 188 | VDDIO-supply = <®_3p3v>; |
| 189 | }; |
| 190 | }; |
| 191 | |
Michael Olbrich | 43c3c00 | 2014-07-25 12:49:51 +0200 | [diff] [blame^] | 192 | &i2c2 { |
| 193 | clock-frequency = <100000>; |
| 194 | pinctrl-names = "default"; |
| 195 | pinctrl-0 = <&pinctrl_i2c2>; |
| 196 | status = "okay"; |
| 197 | }; |
| 198 | |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 199 | &iomuxc { |
| 200 | pinctrl-names = "default"; |
| 201 | pinctrl-0 = <&pinctrl_hog>; |
| 202 | |
| 203 | imx6q-nitrogen6x { |
| 204 | pinctrl_hog: hoggrp { |
| 205 | fsl,pins = < |
| 206 | /* SGTL5000 sys_mclk */ |
| 207 | MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x030b0 |
| 208 | >; |
| 209 | }; |
| 210 | |
| 211 | pinctrl_audmux: audmuxgrp { |
| 212 | fsl,pins = < |
| 213 | MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0 |
| 214 | MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0 |
| 215 | MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0 |
| 216 | MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0 |
| 217 | >; |
| 218 | }; |
| 219 | |
| 220 | pinctrl_ecspi1: ecspi1grp { |
| 221 | fsl,pins = < |
| 222 | MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 |
| 223 | MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 |
| 224 | MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 |
| 225 | MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x000b1 /* CS */ |
| 226 | >; |
| 227 | }; |
| 228 | |
| 229 | pinctrl_enet: enetgrp { |
| 230 | fsl,pins = < |
| 231 | MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x100b0 |
| 232 | MX6QDL_PAD_ENET_MDC__ENET_MDC 0x100b0 |
| 233 | MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x100b0 |
| 234 | MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x100b0 |
| 235 | MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x100b0 |
| 236 | MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x100b0 |
| 237 | MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x100b0 |
| 238 | MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x100b0 |
| 239 | MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x100b0 |
| 240 | MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 |
| 241 | MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 |
| 242 | MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 |
| 243 | MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 |
| 244 | MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 |
| 245 | MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 |
| 246 | /* Phy reset */ |
| 247 | MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x000b0 |
Troy Kisky | 6261c4c | 2013-12-20 11:47:11 -0700 | [diff] [blame] | 248 | MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1 |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 249 | >; |
| 250 | }; |
| 251 | |
Troy Kisky | da474d4 | 2013-12-18 14:51:44 -0700 | [diff] [blame] | 252 | pinctrl_gpio_keys: gpio_keysgrp { |
| 253 | fsl,pins = < |
| 254 | /* Power Button */ |
| 255 | MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 |
| 256 | /* Menu Button */ |
| 257 | MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 |
| 258 | /* Home Button */ |
| 259 | MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x1b0b0 |
| 260 | /* Back Button */ |
| 261 | MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 |
| 262 | /* Volume Up Button */ |
| 263 | MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x1b0b0 |
| 264 | /* Volume Down Button */ |
| 265 | MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x1b0b0 |
| 266 | >; |
| 267 | }; |
| 268 | |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 269 | pinctrl_i2c1: i2c1grp { |
| 270 | fsl,pins = < |
| 271 | MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 |
| 272 | MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 |
| 273 | >; |
| 274 | }; |
| 275 | |
Michael Olbrich | 43c3c00 | 2014-07-25 12:49:51 +0200 | [diff] [blame^] | 276 | pinctrl_i2c2: i2c2grp { |
| 277 | fsl,pins = < |
| 278 | MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 |
| 279 | MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 |
| 280 | >; |
| 281 | }; |
| 282 | |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 283 | pinctrl_pwm1: pwm1grp { |
| 284 | fsl,pins = < |
| 285 | MX6QDL_PAD_SD1_DAT3__PWM1_OUT 0x1b0b1 |
| 286 | >; |
| 287 | }; |
| 288 | |
| 289 | pinctrl_pwm3: pwm3grp { |
| 290 | fsl,pins = < |
| 291 | MX6QDL_PAD_SD1_DAT1__PWM3_OUT 0x1b0b1 |
| 292 | >; |
| 293 | }; |
| 294 | |
| 295 | pinctrl_pwm4: pwm4grp { |
| 296 | fsl,pins = < |
| 297 | MX6QDL_PAD_SD1_CMD__PWM4_OUT 0x1b0b1 |
| 298 | >; |
| 299 | }; |
| 300 | |
| 301 | pinctrl_uart1: uart1grp { |
| 302 | fsl,pins = < |
| 303 | MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 |
| 304 | MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 |
| 305 | >; |
| 306 | }; |
| 307 | |
| 308 | pinctrl_uart2: uart2grp { |
| 309 | fsl,pins = < |
| 310 | MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1 |
| 311 | MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1 |
| 312 | >; |
| 313 | }; |
| 314 | |
| 315 | pinctrl_usbotg: usbotggrp { |
| 316 | fsl,pins = < |
| 317 | MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059 |
| 318 | MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0 |
| 319 | /* power enable, high active */ |
| 320 | MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x000b0 |
| 321 | >; |
| 322 | }; |
| 323 | |
| 324 | pinctrl_usdhc3: usdhc3grp { |
| 325 | fsl,pins = < |
| 326 | MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 |
| 327 | MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 |
| 328 | MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 |
| 329 | MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 |
| 330 | MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 |
| 331 | MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 |
| 332 | MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1b0b0 /* CD */ |
| 333 | >; |
| 334 | }; |
| 335 | |
| 336 | pinctrl_usdhc4: usdhc4grp { |
| 337 | fsl,pins = < |
| 338 | MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059 |
| 339 | MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059 |
| 340 | MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059 |
| 341 | MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059 |
| 342 | MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059 |
| 343 | MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059 |
| 344 | MX6QDL_PAD_NANDF_D6__GPIO2_IO06 0x1b0b0 /* CD */ |
| 345 | >; |
| 346 | }; |
| 347 | }; |
| 348 | }; |
| 349 | |
| 350 | &ldb { |
| 351 | status = "okay"; |
| 352 | |
| 353 | lvds-channel@0 { |
| 354 | fsl,data-mapping = "spwg"; |
| 355 | fsl,data-width = <18>; |
| 356 | status = "okay"; |
| 357 | |
| 358 | display-timings { |
| 359 | native-mode = <&timing0>; |
| 360 | timing0: hsd100pxn1 { |
| 361 | clock-frequency = <65000000>; |
| 362 | hactive = <1024>; |
| 363 | vactive = <768>; |
| 364 | hback-porch = <220>; |
| 365 | hfront-porch = <40>; |
| 366 | vback-porch = <21>; |
| 367 | vfront-porch = <7>; |
| 368 | hsync-len = <60>; |
| 369 | vsync-len = <10>; |
| 370 | }; |
| 371 | }; |
| 372 | }; |
| 373 | }; |
| 374 | |
| 375 | &pcie { |
| 376 | status = "okay"; |
| 377 | }; |
| 378 | |
| 379 | &pwm1 { |
| 380 | pinctrl-names = "default"; |
| 381 | pinctrl-0 = <&pinctrl_pwm1>; |
| 382 | status = "okay"; |
| 383 | }; |
| 384 | |
| 385 | &pwm3 { |
| 386 | pinctrl-names = "default"; |
| 387 | pinctrl-0 = <&pinctrl_pwm3>; |
| 388 | status = "okay"; |
| 389 | }; |
| 390 | |
| 391 | &pwm4 { |
| 392 | pinctrl-names = "default"; |
| 393 | pinctrl-0 = <&pinctrl_pwm4>; |
| 394 | status = "okay"; |
| 395 | }; |
| 396 | |
| 397 | &ssi1 { |
Troy Kisky | a177f18 | 2013-12-16 18:13:03 -0700 | [diff] [blame] | 398 | status = "okay"; |
| 399 | }; |
| 400 | |
| 401 | &uart1 { |
| 402 | pinctrl-names = "default"; |
| 403 | pinctrl-0 = <&pinctrl_uart1>; |
| 404 | status = "okay"; |
| 405 | }; |
| 406 | |
| 407 | &uart2 { |
| 408 | pinctrl-names = "default"; |
| 409 | pinctrl-0 = <&pinctrl_uart2>; |
| 410 | status = "okay"; |
| 411 | }; |
| 412 | |
| 413 | &usbh1 { |
| 414 | status = "okay"; |
| 415 | }; |
| 416 | |
| 417 | &usbotg { |
| 418 | vbus-supply = <®_usb_otg_vbus>; |
| 419 | pinctrl-names = "default"; |
| 420 | pinctrl-0 = <&pinctrl_usbotg>; |
| 421 | disable-over-current; |
| 422 | status = "okay"; |
| 423 | }; |
| 424 | |
| 425 | &usdhc3 { |
| 426 | pinctrl-names = "default"; |
| 427 | pinctrl-0 = <&pinctrl_usdhc3>; |
| 428 | cd-gpios = <&gpio7 0 0>; |
| 429 | vmmc-supply = <®_3p3v>; |
| 430 | status = "okay"; |
| 431 | }; |
| 432 | |
| 433 | &usdhc4 { |
| 434 | pinctrl-names = "default"; |
| 435 | pinctrl-0 = <&pinctrl_usdhc4>; |
| 436 | cd-gpios = <&gpio2 6 0>; |
| 437 | vmmc-supply = <®_3p3v>; |
| 438 | status = "okay"; |
| 439 | }; |