Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: imx6q-apalis: Add support for Toradex Ixora V1.2 carrier boards

The Ixora V1.2 carrier board adds SW relevant new features compared to
the V1.1 version.

- An I2C EEPROM is added.
- The SD card slot got a switchable 3.3V supply.
- Pull ups on the SD card signals are not assembled to faciliate 1.8V
speed modes.
- The CAN transceivers got a switchable 3.3V supply.

Add a new device tree and, as the differences are so small rework the
device tree for V1.1 to include the V1.2 device tree and adjust as
needed.
Drop adding the toradex,apalis_imx6q-ixora to the dtb compatible to
adhere to the binding yaml document.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Max Krummenacher and committed by
Shawn Guo
1868abc1 6a115544

+289 -166
+1
arch/arm/boot/dts/Makefile
··· 550 550 imx6q-apalis-eval.dtb \ 551 551 imx6q-apalis-ixora.dtb \ 552 552 imx6q-apalis-ixora-v1.1.dtb \ 553 + imx6q-apalis-ixora-v1.2.dtb \ 553 554 imx6q-apf6dev.dtb \ 554 555 imx6q-arm2.dtb \ 555 556 imx6q-b450v3.dtb \
+12 -166
arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts
··· 5 5 * Copyright 2011 Linaro Ltd. 6 6 */ 7 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" 8 + #include "imx6q-apalis-ixora-v1.2.dts" 15 9 16 10 / { 17 11 model = "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board V1.1"; 18 - compatible = "toradex,apalis_imx6q-ixora-v1.1", 19 - "toradex,apalis_imx6q-ixora", "toradex,apalis_imx6q", 12 + compatible = "toradex,apalis_imx6q-ixora-v1.1", "toradex,apalis_imx6q", 20 13 "fsl,imx6q"; 21 14 22 - aliases { 23 - i2c0 = &i2c1; 24 - i2c1 = &i2c3; 25 - i2c2 = &i2c2; 26 - rtc0 = &rtc_i2c; 27 - rtc1 = &snvs_rtc; 28 - }; 29 15 30 - chosen { 31 - stdout-path = "serial0:115200n8"; 32 - }; 33 - 34 - gpio-keys { 35 - compatible = "gpio-keys"; 36 - pinctrl-names = "default"; 37 - pinctrl-0 = <&pinctrl_gpio_keys>; 38 - 39 - wakeup { 40 - label = "Wake-Up"; 41 - gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; 42 - linux,code = <KEY_WAKEUP>; 43 - debounce-interval = <10>; 44 - wakeup-source; 45 - }; 46 - }; 47 - 48 - leds { 49 - compatible = "gpio-leds"; 50 - 51 - pinctrl-names = "default"; 52 - pinctrl-0 = <&pinctrl_leds_ixora>; 53 - 54 - led4-green { 55 - label = "LED_4_GREEN"; 56 - gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; 57 - }; 58 - 59 - led4-red { 60 - label = "LED_4_RED"; 61 - gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; 62 - }; 63 - 64 - led5-green { 65 - label = "LED_5_GREEN"; 66 - gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; 67 - }; 68 - 69 - led5-red { 70 - label = "LED_5_RED"; 71 - gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; 72 - }; 73 - }; 74 16 }; 75 17 18 + /delete-node/ &eeprom; 19 + /delete-node/ &reg_3v3_vmmc; 20 + /delete-node/ &reg_can1_supply; 21 + /delete-node/ &reg_can2_supply; 22 + 76 23 &can1 { 77 - status = "okay"; 24 + /delete-property/ xceiver-supply; 78 25 }; 79 26 80 27 &can2 { 81 - status = "okay"; 82 - }; 83 - 84 - /* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */ 85 - &i2c1 { 86 - status = "okay"; 87 - 88 - /* M41T0M6 real time clock on carrier board */ 89 - rtc_i2c: rtc@68 { 90 - compatible = "st,m41t0"; 91 - reg = <0x68>; 92 - }; 93 - }; 94 - 95 - /* 96 - * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier 97 - * board) 98 - */ 99 - &i2c3 { 100 - status = "okay"; 101 - }; 102 - 103 - &pcie { 104 - pinctrl-names = "default"; 105 - pinctrl-0 = <&pinctrl_reset_moci>; 106 - /* active-high meaning opposite of regular PERST# active-low polarity */ 107 - reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; 108 - reset-gpio-active-high; 109 - status = "okay"; 110 - }; 111 - 112 - &pwm1 { 113 - status = "okay"; 114 - }; 115 - 116 - &pwm2 { 117 - status = "okay"; 118 - }; 119 - 120 - &pwm3 { 121 - status = "okay"; 122 - }; 123 - 124 - &pwm4 { 125 - status = "okay"; 126 - }; 127 - 128 - &reg_usb_otg_vbus { 129 - status = "okay"; 130 - }; 131 - 132 - &reg_usb_host_vbus { 133 - status = "okay"; 134 - }; 135 - 136 - &sata { 137 - status = "okay"; 138 - }; 139 - 140 - &sound_spdif { 141 - status = "okay"; 142 - }; 143 - 144 - &spdif { 145 - status = "okay"; 146 - }; 147 - 148 - &uart1 { 149 - status = "okay"; 150 - }; 151 - 152 - &uart2 { 153 - status = "okay"; 154 - }; 155 - 156 - &uart4 { 157 - status = "okay"; 158 - }; 159 - 160 - &uart5 { 161 - status = "okay"; 162 - }; 163 - 164 - &usbh1 { 165 - vbus-supply = <&reg_usb_host_vbus>; 166 - status = "okay"; 167 - }; 168 - 169 - &usbotg { 170 - vbus-supply = <&reg_usb_otg_vbus>; 171 - status = "okay"; 28 + /delete-property/ xceiver-supply; 172 29 }; 173 30 174 31 /* MMC1 */ 175 32 &usdhc1 { 33 + /delete-property/ cap-power-off-card; 34 + /delete-property/ pinctrl-1; 35 + /delete-property/ vmmc-supply; 176 36 pinctrl-names = "default"; 177 - pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>; 178 - bus-width = <4>; 179 - status = "okay"; 180 - }; 181 - 182 - &iomuxc { 183 - pinctrl_leds_ixora: ledsixoragrp { 184 - fsl,pins = < 185 - MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0 186 - MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x1b0b0 187 - MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 188 - MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 189 - >; 190 - }; 191 37 };
+276
arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2 + /* 3 + * Copyright 2014-2022 Toradex 4 + * Copyright 2012 Freescale Semiconductor, Inc. 5 + * Copyright 2011 Linaro Ltd. 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 Ixora Carrier Board V1.2"; 18 + compatible = "toradex,apalis_imx6q-ixora-v1.2", "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 + 29 + chosen { 30 + stdout-path = "serial0:115200n8"; 31 + }; 32 + 33 + leds { 34 + compatible = "gpio-leds"; 35 + 36 + pinctrl-names = "default"; 37 + pinctrl-0 = <&pinctrl_leds_ixora>; 38 + 39 + led4-green { 40 + gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; 41 + label = "LED_4_GREEN"; 42 + }; 43 + 44 + led4-red { 45 + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; 46 + label = "LED_4_RED"; 47 + }; 48 + 49 + led5-green { 50 + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; 51 + label = "LED_5_GREEN"; 52 + }; 53 + 54 + led5-red { 55 + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; 56 + label = "LED_5_RED"; 57 + }; 58 + }; 59 + 60 + reg_3v3_vmmc: regulator-3v3-vmmc { 61 + compatible = "regulator-fixed"; 62 + enable-active-high; 63 + gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>; 64 + pinctrl-names = "default"; 65 + pinctrl-0 = <&pinctrl_enable_3v3_vmmc>; 66 + regulator-max-microvolt = <3300000>; 67 + regulator-min-microvolt = <3300000>; 68 + regulator-name = "3v3_vmmc"; 69 + startup-delay-us = <100>; 70 + }; 71 + 72 + reg_can1_supply: regulator-can1-supply { 73 + compatible = "regulator-fixed"; 74 + enable-active-high; 75 + gpio = <&gpio2 3 GPIO_ACTIVE_HIGH>; 76 + pinctrl-names = "default"; 77 + pinctrl-0 = <&pinctrl_enable_can1_power>; 78 + regulator-name = "can1_supply"; 79 + }; 80 + 81 + reg_can2_supply: regulator-can2-supply { 82 + compatible = "regulator-fixed"; 83 + enable-active-high; 84 + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; 85 + pinctrl-names = "default"; 86 + pinctrl-0 = <&pinctrl_enable_can2_power>; 87 + regulator-name = "can2_supply"; 88 + }; 89 + }; 90 + 91 + &can1 { 92 + xceiver-supply = <&reg_can1_supply>; 93 + status = "okay"; 94 + }; 95 + 96 + &can2 { 97 + xceiver-supply = <&reg_can2_supply>; 98 + status = "okay"; 99 + }; 100 + 101 + &gpio1 { 102 + pinctrl-names = "default"; 103 + pinctrl-0 = <&pinctrl_uart24_forceoff>; 104 + 105 + /* 106 + * uart-2-4-on-x21-enable-hog enables the UART transceiver for Apalis 107 + * UART2 and UART3. If one wants to disable the transceiver force 108 + * the GPIO to output-low, if one wants to control the transceiver 109 + * from user space delete the hog node. 110 + */ 111 + uart-2-4-on-x21-enable-hog { 112 + gpio-hog; 113 + gpios = <11 GPIO_ACTIVE_HIGH>; /* MXM3 180 */ 114 + output-high; 115 + }; 116 + }; 117 + 118 + /* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */ 119 + &i2c1 { 120 + status = "okay"; 121 + 122 + /* M41T0M6 real time clock on carrier board */ 123 + rtc_i2c: rtc@68 { 124 + compatible = "st,m41t0"; 125 + reg = <0x68>; 126 + }; 127 + 128 + eeprom: eeprom@50 { 129 + compatible = "atmel,24c02"; 130 + reg = <0x50>; 131 + pagesize = <16>; 132 + }; 133 + }; 134 + 135 + /* 136 + * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier 137 + * board) 138 + */ 139 + &i2c3 { 140 + status = "okay"; 141 + }; 142 + 143 + &pcie { 144 + pinctrl-names = "default"; 145 + pinctrl-0 = <&pinctrl_reset_moci>; 146 + /* active-high meaning opposite of regular PERST# active-low polarity */ 147 + reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; 148 + reset-gpio-active-high; 149 + status = "okay"; 150 + }; 151 + 152 + &pwm1 { 153 + status = "okay"; 154 + }; 155 + 156 + &pwm2 { 157 + status = "okay"; 158 + }; 159 + 160 + &pwm3 { 161 + status = "okay"; 162 + }; 163 + 164 + &pwm4 { 165 + status = "okay"; 166 + }; 167 + 168 + &reg_usb_host_vbus { 169 + status = "okay"; 170 + }; 171 + 172 + &reg_usb_otg_vbus { 173 + status = "okay"; 174 + }; 175 + 176 + &sata { 177 + status = "okay"; 178 + }; 179 + 180 + &sound_spdif { 181 + status = "okay"; 182 + }; 183 + 184 + &spdif { 185 + status = "okay"; 186 + }; 187 + 188 + &uart1 { 189 + status = "okay"; 190 + }; 191 + 192 + &uart2 { 193 + status = "okay"; 194 + }; 195 + 196 + &uart4 { 197 + status = "okay"; 198 + }; 199 + 200 + &uart5 { 201 + status = "okay"; 202 + }; 203 + 204 + &usbh1 { 205 + vbus-supply = <&reg_usb_host_vbus>; 206 + status = "okay"; 207 + }; 208 + 209 + &usbotg { 210 + vbus-supply = <&reg_usb_otg_vbus>; 211 + status = "okay"; 212 + }; 213 + 214 + /* MMC1 */ 215 + &usdhc1 { 216 + pinctrl-names = "default", "sleep"; 217 + pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>; 218 + pinctrl-1 = <&pinctrl_usdhc1_4bit_sleep &pinctrl_mmc_cd_sleep>; 219 + bus-width = <4>; 220 + cap-power-off-card; 221 + vmmc-supply = <&reg_3v3_vmmc>; 222 + status = "okay"; 223 + }; 224 + 225 + &iomuxc { 226 + pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp { 227 + fsl,pins = < 228 + MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b0 229 + >; 230 + }; 231 + 232 + pinctrl_enable_can1_power: enablecan1powergrp { 233 + fsl,pins = < 234 + MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 235 + >; 236 + }; 237 + 238 + pinctrl_enable_can2_power: enablecan2powergrp { 239 + fsl,pins = < 240 + MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x1b0b0 241 + >; 242 + }; 243 + 244 + pinctrl_uart24_forceoff: uart24forceoffgrp { 245 + fsl,pins = < 246 + MX6QDL_PAD_SD2_CMD__GPIO1_IO11 0x1b0b0 247 + >; 248 + }; 249 + 250 + pinctrl_leds_ixora: ledsixoragrp { 251 + fsl,pins = < 252 + MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0 253 + MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x1b0b0 254 + MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 255 + MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 256 + >; 257 + }; 258 + 259 + pinctrl_mmc_cd_sleep: mmccdslpgrp { 260 + fsl,pins = < 261 + /* MMC1 CD */ 262 + MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x0 263 + >; 264 + }; 265 + 266 + pinctrl_usdhc1_4bit_sleep: usdhc1-4bitslpgrp { 267 + fsl,pins = < 268 + MX6QDL_PAD_SD1_CMD__SD1_CMD 0x3000 269 + MX6QDL_PAD_SD1_CLK__SD1_CLK 0x3000 270 + MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x3000 271 + MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x3000 272 + MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x3000 273 + MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x3000 274 + >; 275 + }; 276 + };