Igor Opaniuk | bb42a8b | 2020-03-12 10:38:28 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR MIT |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 2 | /* |
Igor Opaniuk | bb42a8b | 2020-03-12 10:38:28 +0200 | [diff] [blame] | 3 | * Copyright 2014-2020 Toradex |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 4 | * Copyright 2012 Freescale Semiconductor, Inc. |
| 5 | * Copyright 2011 Linaro Ltd. |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /dts-v1/; |
| 9 | |
| 10 | #include <dt-bindings/gpio/gpio.h> |
| 11 | #include <dt-bindings/input/input.h> |
| 12 | #include <dt-bindings/interrupt-controller/irq.h> |
| 13 | #include "imx6q.dtsi" |
| 14 | #include "imx6qdl-apalis.dtsi" |
| 15 | |
| 16 | / { |
| 17 | model = "Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board"; |
| 18 | compatible = "toradex,apalis_imx6q-eval", "toradex,apalis_imx6q", |
| 19 | "fsl,imx6q"; |
| 20 | |
| 21 | aliases { |
| 22 | i2c0 = &i2c1; |
| 23 | i2c1 = &i2c3; |
| 24 | i2c2 = &i2c2; |
| 25 | rtc0 = &rtc_i2c; |
| 26 | rtc1 = &snvs_rtc; |
| 27 | }; |
| 28 | |
Stefan Agner | 6c74366 | 2018-07-09 17:48:41 +0200 | [diff] [blame] | 29 | chosen { |
| 30 | stdout-path = "serial0:115200n8"; |
| 31 | }; |
| 32 | |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 33 | gpio-keys { |
| 34 | compatible = "gpio-keys"; |
| 35 | pinctrl-names = "default"; |
| 36 | pinctrl-0 = <&pinctrl_gpio_keys>; |
| 37 | |
| 38 | wakeup { |
| 39 | label = "Wake-Up"; |
| 40 | gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
| 41 | linux,code = <KEY_WAKEUP>; |
| 42 | debounce-interval = <10>; |
| 43 | wakeup-source; |
| 44 | }; |
| 45 | }; |
| 46 | |
Marco Franchi | 792d4ed | 2017-10-05 11:31:40 -0300 | [diff] [blame] | 47 | lcd_display: disp0 { |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 48 | compatible = "fsl,imx-parallel-display"; |
| 49 | #address-cells = <1>; |
| 50 | #size-cells = <0>; |
| 51 | interface-pix-fmt = "rgb24"; |
| 52 | pinctrl-names = "default"; |
| 53 | pinctrl-0 = <&pinctrl_ipu1_lcdif>; |
| 54 | status = "okay"; |
| 55 | |
| 56 | port@0 { |
| 57 | reg = <0>; |
| 58 | |
| 59 | lcd_display_in: endpoint { |
| 60 | remote-endpoint = <&ipu1_di1_disp1>; |
| 61 | }; |
| 62 | }; |
| 63 | |
| 64 | port@1 { |
| 65 | reg = <1>; |
| 66 | |
| 67 | lcd_display_out: endpoint { |
| 68 | remote-endpoint = <&lcd_panel_in>; |
| 69 | }; |
| 70 | }; |
| 71 | }; |
| 72 | |
| 73 | panel: panel { |
| 74 | /* |
| 75 | * edt,et057090dhu: EDT 5.7" LCD TFT |
| 76 | * edt,et070080dh6: EDT 7.0" LCD TFT |
| 77 | */ |
| 78 | compatible = "edt,et057090dhu"; |
| 79 | backlight = <&backlight>; |
Stefan Agner | 5780acd | 2018-07-09 17:48:42 +0200 | [diff] [blame] | 80 | power-supply = <®_3v3_sw>; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 81 | |
| 82 | port { |
| 83 | lcd_panel_in: endpoint { |
| 84 | remote-endpoint = <&lcd_display_out>; |
| 85 | }; |
| 86 | }; |
| 87 | }; |
| 88 | |
| 89 | reg_pcie_switch: regulator-pcie-switch { |
| 90 | compatible = "regulator-fixed"; |
| 91 | regulator-name = "pcie_switch"; |
| 92 | regulator-min-microvolt = <1800000>; |
| 93 | regulator-max-microvolt = <1800000>; |
| 94 | gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>; |
| 95 | startup-delay-us = <100000>; |
| 96 | enable-active-high; |
| 97 | status = "okay"; |
| 98 | }; |
Stefan Agner | 5780acd | 2018-07-09 17:48:42 +0200 | [diff] [blame] | 99 | |
| 100 | reg_3v3_sw: regulator-3v3-sw { |
| 101 | compatible = "regulator-fixed"; |
| 102 | regulator-name = "3.3V_SW"; |
| 103 | regulator-min-microvolt = <3300000>; |
| 104 | regulator-max-microvolt = <3300000>; |
| 105 | regulator-always-on; |
| 106 | }; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | &backlight { |
| 110 | brightness-levels = <0 127 191 223 239 247 251 255>; |
| 111 | default-brightness-level = <1>; |
Stefan Agner | 5780acd | 2018-07-09 17:48:42 +0200 | [diff] [blame] | 112 | power-supply = <®_3v3_sw>; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 113 | status = "okay"; |
| 114 | }; |
| 115 | |
| 116 | &can1 { |
Stefan Agner | 5780acd | 2018-07-09 17:48:42 +0200 | [diff] [blame] | 117 | xceiver-supply = <®_3v3_sw>; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 118 | status = "okay"; |
| 119 | }; |
| 120 | |
| 121 | &can2 { |
Stefan Agner | 5780acd | 2018-07-09 17:48:42 +0200 | [diff] [blame] | 122 | xceiver-supply = <®_3v3_sw>; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 123 | status = "okay"; |
| 124 | }; |
| 125 | |
| 126 | &hdmi { |
| 127 | status = "okay"; |
| 128 | }; |
| 129 | |
| 130 | /* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */ |
| 131 | &i2c1 { |
| 132 | status = "okay"; |
| 133 | |
Philippe Schenker | 24ffaa2 | 2019-08-27 13:18:28 +0000 | [diff] [blame] | 134 | /* |
| 135 | * Touchscreen is using SODIMM 28/30, also used for PWM<B>, PWM<C>, |
| 136 | * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms |
| 137 | */ |
| 138 | touchscreen@4a { |
| 139 | compatible = "atmel,maxtouch"; |
| 140 | reg = <0x4a>; |
| 141 | interrupt-parent = <&gpio6>; |
| 142 | interrupts = <10 IRQ_TYPE_EDGE_FALLING>; |
Linus Walleij | feedaac | 2020-11-09 18:00:06 -0800 | [diff] [blame] | 143 | reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* SODIMM 13 */ |
Philippe Schenker | 24ffaa2 | 2019-08-27 13:18:28 +0000 | [diff] [blame] | 144 | status = "disabled"; |
| 145 | }; |
| 146 | |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 147 | pcie-switch@58 { |
| 148 | compatible = "plx,pex8605"; |
| 149 | reg = <0x58>; |
| 150 | }; |
| 151 | |
| 152 | /* M41T0M6 real time clock on carrier board */ |
| 153 | rtc_i2c: rtc@68 { |
Stefan Agner | c53bec1 | 2017-12-06 11:29:29 +0100 | [diff] [blame] | 154 | compatible = "st,m41t0"; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 155 | reg = <0x68>; |
| 156 | }; |
| 157 | }; |
| 158 | |
| 159 | /* |
| 160 | * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier |
| 161 | * board) |
| 162 | */ |
| 163 | &i2c3 { |
| 164 | status = "okay"; |
| 165 | }; |
| 166 | |
| 167 | &ipu1_di1_disp1 { |
| 168 | remote-endpoint = <&lcd_display_in>; |
| 169 | }; |
| 170 | |
| 171 | &ldb { |
| 172 | status = "okay"; |
| 173 | }; |
| 174 | |
| 175 | &pcie { |
Stefan Agner | 78f1073 | 2018-09-06 16:46:58 -0700 | [diff] [blame] | 176 | pinctrl-names = "default"; |
| 177 | pinctrl-0 = <&pinctrl_reset_moci>; |
Sanchayan Maity | c6a9f13 | 2017-08-07 12:52:42 +0530 | [diff] [blame] | 178 | /* active-high meaning opposite of regular PERST# active-low polarity */ |
| 179 | reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; |
| 180 | reset-gpio-active-high; |
| 181 | vpcie-supply = <®_pcie_switch>; |
| 182 | status = "okay"; |
| 183 | }; |
| 184 | |
| 185 | &pwm1 { |
| 186 | status = "okay"; |
| 187 | }; |
| 188 | |
| 189 | &pwm2 { |
| 190 | status = "okay"; |
| 191 | }; |
| 192 | |
| 193 | &pwm3 { |
| 194 | status = "okay"; |
| 195 | }; |
| 196 | |
| 197 | &pwm4 { |
| 198 | status = "okay"; |
| 199 | }; |
| 200 | |
| 201 | ®_usb_otg_vbus { |
| 202 | status = "okay"; |
| 203 | }; |
| 204 | |
| 205 | ®_usb_host_vbus { |
| 206 | status = "okay"; |
| 207 | }; |
| 208 | |
| 209 | &sata { |
| 210 | status = "okay"; |
| 211 | }; |
| 212 | |
| 213 | &sound_spdif { |
| 214 | status = "okay"; |
| 215 | }; |
| 216 | |
| 217 | &spdif { |
| 218 | status = "okay"; |
| 219 | }; |
| 220 | |
| 221 | &uart1 { |
| 222 | status = "okay"; |
| 223 | }; |
| 224 | |
| 225 | &uart2 { |
| 226 | status = "okay"; |
| 227 | }; |
| 228 | |
| 229 | &uart4 { |
| 230 | status = "okay"; |
| 231 | }; |
| 232 | |
| 233 | &uart5 { |
| 234 | status = "okay"; |
| 235 | }; |
| 236 | |
| 237 | &usbh1 { |
| 238 | vbus-supply = <®_usb_host_vbus>; |
| 239 | status = "okay"; |
| 240 | }; |
| 241 | |
| 242 | &usbotg { |
| 243 | vbus-supply = <®_usb_otg_vbus>; |
| 244 | status = "okay"; |
| 245 | }; |
| 246 | |
| 247 | /* MMC1 */ |
| 248 | &usdhc1 { |
| 249 | pinctrl-names = "default"; |
| 250 | pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_usdhc1_8bit &pinctrl_mmc_cd>; |
| 251 | cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>; |
| 252 | status = "okay"; |
| 253 | }; |
| 254 | |
| 255 | /* SD1 */ |
| 256 | &usdhc2 { |
| 257 | pinctrl-names = "default"; |
| 258 | pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>; |
| 259 | cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; |
| 260 | status = "okay"; |
| 261 | }; |
| 262 | |
| 263 | &iomuxc { |
| 264 | /* |
| 265 | * Mux the Apalis GPIOs |
| 266 | */ |
| 267 | pinctrl-names = "default"; |
| 268 | pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2 |
| 269 | &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4 |
| 270 | &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6 |
| 271 | &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8 |
| 272 | >; |
| 273 | }; |