| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ OR MIT |
|---|
| 1 | 2 | /* |
|---|
| 2 | | - * Copyright 2014-2017 Toradex AG |
|---|
| 3 | + * Copyright 2014-2020 Toradex |
|---|
| 3 | 4 | * Copyright 2012 Freescale Semiconductor, Inc. |
|---|
| 4 | 5 | * Copyright 2011 Linaro Ltd. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This file is dual-licensed: you can use it either under the terms |
|---|
| 7 | | - * of the GPL or the X11 license, at your option. Note that this dual |
|---|
| 8 | | - * licensing only applies to this file, and not this project as a |
|---|
| 9 | | - * whole. |
|---|
| 10 | | - * |
|---|
| 11 | | - * a) This file is free software; you can redistribute it and/or |
|---|
| 12 | | - * modify it under the terms of the GNU General Public License |
|---|
| 13 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This file is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | | - * GNU General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * Or, alternatively, |
|---|
| 21 | | - * |
|---|
| 22 | | - * b) Permission is hereby granted, free of charge, to any person |
|---|
| 23 | | - * obtaining a copy of this software and associated documentation |
|---|
| 24 | | - * files (the "Software"), to deal in the Software without |
|---|
| 25 | | - * restriction, including without limitation the rights to use, |
|---|
| 26 | | - * copy, modify, merge, publish, distribute, sublicense, and/or |
|---|
| 27 | | - * sell copies of the Software, and to permit persons to whom the |
|---|
| 28 | | - * Software is furnished to do so, subject to the following |
|---|
| 29 | | - * conditions: |
|---|
| 30 | | - * |
|---|
| 31 | | - * The above copyright notice and this permission notice shall be |
|---|
| 32 | | - * included in all copies or substantial portions of the Software. |
|---|
| 33 | | - * |
|---|
| 34 | | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|---|
| 35 | | - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|---|
| 36 | | - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|---|
| 37 | | - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|---|
| 38 | | - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|---|
| 39 | | - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|---|
| 40 | | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|---|
| 41 | | - * OTHER DEALINGS IN THE SOFTWARE. |
|---|
| 42 | 6 | */ |
|---|
| 43 | 7 | |
|---|
| 44 | 8 | #include <dt-bindings/gpio/gpio.h> |
|---|
| .. | .. |
|---|
| 49 | 13 | |
|---|
| 50 | 14 | /* Will be filled by the bootloader */ |
|---|
| 51 | 15 | memory@10000000 { |
|---|
| 16 | + device_type = "memory"; |
|---|
| 52 | 17 | reg = <0x10000000 0>; |
|---|
| 53 | 18 | }; |
|---|
| 54 | 19 | |
|---|
| .. | .. |
|---|
| 147 | 112 | }; |
|---|
| 148 | 113 | |
|---|
| 149 | 114 | &can1 { |
|---|
| 150 | | - pinctrl-names = "default"; |
|---|
| 151 | | - pinctrl-0 = <&pinctrl_flexcan1>; |
|---|
| 115 | + pinctrl-names = "default", "sleep"; |
|---|
| 116 | + pinctrl-0 = <&pinctrl_flexcan1_default>; |
|---|
| 117 | + pinctrl-1 = <&pinctrl_flexcan1_sleep>; |
|---|
| 152 | 118 | status = "disabled"; |
|---|
| 153 | 119 | }; |
|---|
| 154 | 120 | |
|---|
| 155 | 121 | &can2 { |
|---|
| 156 | | - pinctrl-names = "default"; |
|---|
| 157 | | - pinctrl-0 = <&pinctrl_flexcan2>; |
|---|
| 122 | + pinctrl-names = "default", "sleep"; |
|---|
| 123 | + pinctrl-0 = <&pinctrl_flexcan2_default>; |
|---|
| 124 | + pinctrl-1 = <&pinctrl_flexcan2_sleep>; |
|---|
| 158 | 125 | status = "disabled"; |
|---|
| 159 | 126 | }; |
|---|
| 160 | 127 | |
|---|
| 161 | 128 | /* Apalis SPI1 */ |
|---|
| 162 | 129 | &ecspi1 { |
|---|
| 163 | | - cs-gpios = <&gpio5 25 GPIO_ACTIVE_HIGH>; |
|---|
| 130 | + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; |
|---|
| 164 | 131 | pinctrl-names = "default"; |
|---|
| 165 | 132 | pinctrl-0 = <&pinctrl_ecspi1>; |
|---|
| 166 | 133 | status = "disabled"; |
|---|
| .. | .. |
|---|
| 168 | 135 | |
|---|
| 169 | 136 | /* Apalis SPI2 */ |
|---|
| 170 | 137 | &ecspi2 { |
|---|
| 171 | | - cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; |
|---|
| 138 | + cs-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; |
|---|
| 172 | 139 | pinctrl-names = "default"; |
|---|
| 173 | 140 | pinctrl-0 = <&pinctrl_ecspi2>; |
|---|
| 174 | 141 | status = "disabled"; |
|---|
| .. | .. |
|---|
| 177 | 144 | &fec { |
|---|
| 178 | 145 | pinctrl-names = "default"; |
|---|
| 179 | 146 | pinctrl-0 = <&pinctrl_enet>; |
|---|
| 180 | | - phy-mode = "rgmii"; |
|---|
| 147 | + phy-mode = "rgmii-id"; |
|---|
| 181 | 148 | phy-handle = <ðphy>; |
|---|
| 182 | 149 | phy-reset-duration = <10>; |
|---|
| 183 | 150 | phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; |
|---|
| .. | .. |
|---|
| 197 | 164 | |
|---|
| 198 | 165 | &hdmi { |
|---|
| 199 | 166 | pinctrl-names = "default"; |
|---|
| 200 | | - pinctrl-0 = <&pinctrl_hdmi_ddc>; |
|---|
| 167 | + pinctrl-0 = <&pinctrl_hdmi_ddc &pinctrl_hdmi_cec>; |
|---|
| 201 | 168 | status = "disabled"; |
|---|
| 202 | 169 | }; |
|---|
| 203 | 170 | |
|---|
| 204 | 171 | /* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */ |
|---|
| 205 | 172 | &i2c1 { |
|---|
| 206 | 173 | clock-frequency = <100000>; |
|---|
| 207 | | - pinctrl-names = "default"; |
|---|
| 174 | + pinctrl-names = "default", "gpio"; |
|---|
| 208 | 175 | pinctrl-0 = <&pinctrl_i2c1>; |
|---|
| 176 | + pinctrl-1 = <&pinctrl_i2c1_gpio>; |
|---|
| 177 | + scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
|---|
| 178 | + sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
|---|
| 209 | 179 | status = "disabled"; |
|---|
| 210 | 180 | }; |
|---|
| 211 | 181 | |
|---|
| .. | .. |
|---|
| 215 | 185 | */ |
|---|
| 216 | 186 | &i2c2 { |
|---|
| 217 | 187 | clock-frequency = <100000>; |
|---|
| 218 | | - pinctrl-names = "default"; |
|---|
| 188 | + pinctrl-names = "default", "gpio"; |
|---|
| 219 | 189 | pinctrl-0 = <&pinctrl_i2c2>; |
|---|
| 190 | + pinctrl-1 = <&pinctrl_i2c2_gpio>; |
|---|
| 191 | + scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
|---|
| 192 | + sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
|---|
| 220 | 193 | status = "okay"; |
|---|
| 221 | 194 | |
|---|
| 222 | 195 | pmic: pfuze100@8 { |
|---|
| .. | .. |
|---|
| 313 | 286 | codec: sgtl5000@a { |
|---|
| 314 | 287 | compatible = "fsl,sgtl5000"; |
|---|
| 315 | 288 | reg = <0x0a>; |
|---|
| 289 | + pinctrl-names = "default"; |
|---|
| 290 | + pinctrl-0 = <&pinctrl_sgtl5000>; |
|---|
| 316 | 291 | clocks = <&clks IMX6QDL_CLK_CKO>; |
|---|
| 317 | 292 | VDDA-supply = <®_module_3v3_audio>; |
|---|
| 318 | 293 | VDDIO-supply = <®_module_3v3>; |
|---|
| .. | .. |
|---|
| 331 | 306 | id = <0>; |
|---|
| 332 | 307 | blocks = <0x5>; |
|---|
| 333 | 308 | irq-trigger = <0x1>; |
|---|
| 309 | + /* 3.25 MHz ADC clock speed */ |
|---|
| 310 | + st,adc-freq = <1>; |
|---|
| 311 | + /* 12-bit ADC */ |
|---|
| 312 | + st,mod-12b = <1>; |
|---|
| 313 | + /* internal ADC reference */ |
|---|
| 314 | + st,ref-sel = <0>; |
|---|
| 315 | + /* ADC converstion time: 80 clocks */ |
|---|
| 316 | + st,sample-time = <4>; |
|---|
| 334 | 317 | |
|---|
| 335 | 318 | stmpe_touchscreen { |
|---|
| 336 | 319 | compatible = "st,stmpe-ts"; |
|---|
| 337 | | - /* 3.25 MHz ADC clock speed */ |
|---|
| 338 | | - st,adc-freq = <1>; |
|---|
| 339 | 320 | /* 8 sample average control */ |
|---|
| 340 | 321 | st,ave-ctrl = <3>; |
|---|
| 341 | 322 | /* 7 length fractional part in z */ |
|---|
| .. | .. |
|---|
| 345 | 326 | * current limit value |
|---|
| 346 | 327 | */ |
|---|
| 347 | 328 | st,i-drive = <1>; |
|---|
| 348 | | - /* 12-bit ADC */ |
|---|
| 349 | | - st,mod-12b = <1>; |
|---|
| 350 | | - /* internal ADC reference */ |
|---|
| 351 | | - st,ref-sel = <0>; |
|---|
| 352 | | - /* ADC converstion time: 80 clocks */ |
|---|
| 353 | | - st,sample-time = <4>; |
|---|
| 354 | 329 | /* 1 ms panel driver settling time */ |
|---|
| 355 | 330 | st,settling = <3>; |
|---|
| 356 | 331 | /* 5 ms touch detect interrupt delay */ |
|---|
| 357 | 332 | st,touch-det-delay = <5>; |
|---|
| 333 | + }; |
|---|
| 334 | + |
|---|
| 335 | + stmpe_adc { |
|---|
| 336 | + compatible = "st,stmpe-adc"; |
|---|
| 337 | + /* forbid to use ADC channels 3-0 (touch) */ |
|---|
| 338 | + st,norequest-mask = <0x0F>; |
|---|
| 358 | 339 | }; |
|---|
| 359 | 340 | }; |
|---|
| 360 | 341 | }; |
|---|
| .. | .. |
|---|
| 365 | 346 | */ |
|---|
| 366 | 347 | &i2c3 { |
|---|
| 367 | 348 | clock-frequency = <100000>; |
|---|
| 368 | | - pinctrl-names = "default", "recovery"; |
|---|
| 349 | + pinctrl-names = "default", "gpio"; |
|---|
| 369 | 350 | pinctrl-0 = <&pinctrl_i2c3>; |
|---|
| 370 | | - pinctrl-1 = <&pinctrl_i2c3_recovery>; |
|---|
| 371 | | - scl-gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>; |
|---|
| 372 | | - sda-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>; |
|---|
| 351 | + pinctrl-1 = <&pinctrl_i2c3_gpio>; |
|---|
| 352 | + scl-gpios = <&gpio3 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
|---|
| 353 | + sda-gpios = <&gpio3 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
|---|
| 373 | 354 | status = "disabled"; |
|---|
| 374 | 355 | }; |
|---|
| 375 | 356 | |
|---|
| .. | .. |
|---|
| 392 | 373 | }; |
|---|
| 393 | 374 | |
|---|
| 394 | 375 | &pwm4 { |
|---|
| 376 | + #pwm-cells = <2>; |
|---|
| 395 | 377 | pinctrl-names = "default"; |
|---|
| 396 | 378 | pinctrl-0 = <&pinctrl_pwm4>; |
|---|
| 397 | 379 | status = "disabled"; |
|---|
| .. | .. |
|---|
| 482 | 464 | }; |
|---|
| 483 | 465 | |
|---|
| 484 | 466 | &iomuxc { |
|---|
| 485 | | - /* pins used on module */ |
|---|
| 486 | | - pinctrl-names = "default"; |
|---|
| 487 | | - pinctrl-0 = <&pinctrl_reset_moci>; |
|---|
| 488 | | - |
|---|
| 489 | 467 | pinctrl_apalis_gpio1: gpio2io04grp { |
|---|
| 490 | 468 | fsl,pins = < |
|---|
| 491 | 469 | MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x130b0 |
|---|
| .. | .. |
|---|
| 540 | 518 | MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0 |
|---|
| 541 | 519 | MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 |
|---|
| 542 | 520 | MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 |
|---|
| 543 | | - /* SGTL5000 sys_mclk */ |
|---|
| 544 | | - MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0 |
|---|
| 545 | 521 | >; |
|---|
| 546 | 522 | }; |
|---|
| 547 | 523 | |
|---|
| .. | .. |
|---|
| 596 | 572 | >; |
|---|
| 597 | 573 | }; |
|---|
| 598 | 574 | |
|---|
| 599 | | - pinctrl_flexcan1: flexcan1grp { |
|---|
| 575 | + pinctrl_flexcan1_default: flexcan1defgrp { |
|---|
| 600 | 576 | fsl,pins = < |
|---|
| 601 | 577 | MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x1b0b0 |
|---|
| 602 | 578 | MX6QDL_PAD_GPIO_8__FLEXCAN1_RX 0x1b0b0 |
|---|
| 603 | 579 | >; |
|---|
| 604 | 580 | }; |
|---|
| 605 | 581 | |
|---|
| 606 | | - pinctrl_flexcan2: flexcan2grp { |
|---|
| 582 | + pinctrl_flexcan1_sleep: flexcan1slpgrp { |
|---|
| 583 | + fsl,pins = < |
|---|
| 584 | + MX6QDL_PAD_GPIO_7__GPIO1_IO07 0x0 |
|---|
| 585 | + MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x0 |
|---|
| 586 | + >; |
|---|
| 587 | + }; |
|---|
| 588 | + |
|---|
| 589 | + pinctrl_flexcan2_default: flexcan2defgrp { |
|---|
| 607 | 590 | fsl,pins = < |
|---|
| 608 | 591 | MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0x1b0b0 |
|---|
| 609 | 592 | MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b0b0 |
|---|
| 593 | + >; |
|---|
| 594 | + }; |
|---|
| 595 | + pinctrl_flexcan2_sleep: flexcan2slpgrp { |
|---|
| 596 | + fsl,pins = < |
|---|
| 597 | + MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x0 |
|---|
| 598 | + MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x0 |
|---|
| 610 | 599 | >; |
|---|
| 611 | 600 | }; |
|---|
| 612 | 601 | |
|---|
| .. | .. |
|---|
| 643 | 632 | >; |
|---|
| 644 | 633 | }; |
|---|
| 645 | 634 | |
|---|
| 635 | + pinctrl_i2c1_gpio: i2c1gpiogrp { |
|---|
| 636 | + fsl,pins = < |
|---|
| 637 | + MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x4001b8b1 |
|---|
| 638 | + MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x4001b8b1 |
|---|
| 639 | + >; |
|---|
| 640 | + }; |
|---|
| 641 | + |
|---|
| 646 | 642 | pinctrl_i2c2: i2c2grp { |
|---|
| 647 | 643 | fsl,pins = < |
|---|
| 648 | 644 | MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 |
|---|
| 649 | 645 | MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 |
|---|
| 646 | + >; |
|---|
| 647 | + }; |
|---|
| 648 | + |
|---|
| 649 | + pinctrl_i2c2_gpio: i2c2gpiogrp { |
|---|
| 650 | + fsl,pins = < |
|---|
| 651 | + MX6QDL_PAD_KEY_COL3__GPIO4_IO12 0x4001b8b1 |
|---|
| 652 | + MX6QDL_PAD_KEY_ROW3__GPIO4_IO13 0x4001b8b1 |
|---|
| 650 | 653 | >; |
|---|
| 651 | 654 | }; |
|---|
| 652 | 655 | |
|---|
| .. | .. |
|---|
| 657 | 660 | >; |
|---|
| 658 | 661 | }; |
|---|
| 659 | 662 | |
|---|
| 660 | | - pinctrl_i2c3_recovery: i2c3recoverygrp { |
|---|
| 663 | + pinctrl_i2c3_gpio: i2c3gpiogrp { |
|---|
| 661 | 664 | fsl,pins = < |
|---|
| 662 | 665 | MX6QDL_PAD_EIM_D17__GPIO3_IO17 0x4001b8b1 |
|---|
| 663 | 666 | MX6QDL_PAD_EIM_D18__GPIO3_IO18 0x4001b8b1 |
|---|
| .. | .. |
|---|
| 807 | 810 | >; |
|---|
| 808 | 811 | }; |
|---|
| 809 | 812 | |
|---|
| 813 | + pinctrl_sgtl5000: sgtl5000grp { |
|---|
| 814 | + fsl,pins = < |
|---|
| 815 | + MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0 |
|---|
| 816 | + >; |
|---|
| 817 | + }; |
|---|
| 818 | + |
|---|
| 810 | 819 | pinctrl_spdif: spdifgrp { |
|---|
| 811 | 820 | fsl,pins = < |
|---|
| 812 | 821 | MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 |
|---|