1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2/* 3 * Copyright 2022 Toradex 4 */ 5 6#include <dt-bindings/leds/common.h> 7 8/ { 9 aliases { 10 rtc0 = &rtc_i2c; 11 rtc1 = &rtc; 12 }; 13 14 leds { 15 compatible = "gpio-leds"; 16 pinctrl-names = "default"; 17 pinctrl-0 = <&pinctrl_leds_ixora>; 18 19 /* LED_4_GREEN / MXM3_188 */ 20 led-1 { 21 color = <LED_COLOR_ID_GREEN>; 22 default-state = "off"; 23 function = LED_FUNCTION_STATUS; 24 gpios = <&lsio_gpio5 27 GPIO_ACTIVE_HIGH>; 25 }; 26 27 /* LED_4_RED / MXM3_178 */ 28 led-2 { 29 color = <LED_COLOR_ID_RED>; 30 default-state = "off"; 31 function = LED_FUNCTION_STATUS; 32 gpios = <&lsio_gpio5 29 GPIO_ACTIVE_HIGH>; 33 }; 34 35 /* LED_5_GREEN / MXM3_152 */ 36 led-3 { 37 color = <LED_COLOR_ID_GREEN>; 38 default-state = "off"; 39 function = LED_FUNCTION_STATUS; 40 gpios = <&lsio_gpio5 20 GPIO_ACTIVE_HIGH>; 41 }; 42 43 /* LED_5_RED / MXM3_156 */ 44 led-4 { 45 color = <LED_COLOR_ID_RED>; 46 default-state = "off"; 47 function = LED_FUNCTION_STATUS; 48 gpios = <&lsio_gpio5 21 GPIO_ACTIVE_HIGH>; 49 }; 50 }; 51 52 reg_3v3_vmmc: regulator-3v3-vmmc { 53 compatible = "regulator-fixed"; 54 pinctrl-names = "default"; 55 pinctrl-0 = <&pinctrl_enable_3v3_vmmc>; 56 /* MMC1_PWR_CTRL */ 57 gpio = <&lsio_gpio5 19 GPIO_ACTIVE_HIGH>; 58 enable-active-high; 59 regulator-max-microvolt = <3300000>; 60 regulator-min-microvolt = <3300000>; 61 regulator-name = "3v3_vmmc"; 62 }; 63 64 reg_can1_supply: regulator-can1-supply { 65 compatible = "regulator-fixed"; 66 pinctrl-names = "default"; 67 pinctrl-0 = <&pinctrl_enable_can1_power>; 68 gpio = <&lsio_gpio5 22 GPIO_ACTIVE_HIGH>; 69 enable-active-high; 70 regulator-name = "can1_supply"; 71 }; 72 73 reg_can2_supply: regulator-can2-supply { 74 compatible = "regulator-fixed"; 75 pinctrl-names = "default"; 76 pinctrl-0 = <&pinctrl_sata1_act>; 77 gpio = <&lsio_gpio2 8 GPIO_ACTIVE_HIGH>; 78 enable-active-high; 79 regulator-name = "can2_supply"; 80 }; 81 82 reg_usb_host_vbus: regulator-usb-host-vbus { 83 regulator-name = "VCC_USBH(2|4)"; 84 }; 85}; 86 87&adc0 { 88 status = "okay"; 89}; 90 91&adc1 { 92 status = "okay"; 93}; 94 95/* TODO: Audio Mixer */ 96 97/* TODO: Asynchronous Sample Rate Converter (ASRC) */ 98 99/* TODO: Display Controller */ 100 101/* TODO: DPU */ 102 103/* Apalis ETH1 */ 104&fec1 { 105 status = "okay"; 106}; 107 108/* Apalis CAN1 */ 109&flexcan1 { 110 xceiver-supply = <®_can1_supply>; 111 status = "okay"; 112}; 113 114/* Apalis CAN2 */ 115&flexcan2 { 116 xceiver-supply = <®_can2_supply>; 117 status = "okay"; 118}; 119 120/* TODO: GPU */ 121 122/* Apalis I2C1 */ 123&i2c2 { 124 status = "okay"; 125 126 eeprom: eeprom@50 { 127 compatible = "atmel,24c02"; 128 reg = <0x50>; 129 pagesize = <16>; 130 }; 131 132 /* M41T0M6 real time clock on carrier board */ 133 rtc_i2c: rtc@68 { 134 status = "okay"; 135 }; 136}; 137 138/* Apalis I2C3 (CAM) */ 139&i2c3 { 140 status = "okay"; 141}; 142 143&iomuxc { 144 pinctrl-0 = <&pinctrl_cam1_gpios>, <&pinctrl_dap1_gpios>, 145 <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>, 146 <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_usbh_oc_n>, 147 <&pinctrl_lpuart1ctrl>, <&pinctrl_lvds0_i2c0_gpio>, 148 <&pinctrl_lvds1_i2c0_gpios>, <&pinctrl_mipi_dsi_0_1_en>, 149 <&pinctrl_mipi_dsi1_gpios>, <&pinctrl_mlb_gpios>, 150 <&pinctrl_qspi1a_gpios>, <&pinctrl_sim0_gpios>, 151 <&pinctrl_uart24_forceoff>, <&pinctrl_usdhc1_gpios>; 152 153 /* PMIC MMC1 power-switch */ 154 pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp { 155 fsl,pins = <IMX8QM_USDHC1_DATA4_LSIO_GPIO5_IO19 0x00000021>; /* MXM3_148, PMIC */ 156 }; 157 158 /* FlexCAN PMIC */ 159 pinctrl_enable_can1_power: enablecan1powergrp { 160 fsl,pins = <IMX8QM_USDHC1_DATA7_LSIO_GPIO5_IO22 0x00000021>; /* MXM3_158, PMIC */ 161 }; 162 163 pinctrl_leds_ixora: ledsixoragrp { 164 fsl,pins = <IMX8QM_USDHC2_DATA1_LSIO_GPIO5_IO27 0x06000061>, /* LED_4_GREEN */ 165 <IMX8QM_USDHC2_DATA3_LSIO_GPIO5_IO29 0x06000061>, /* LED_4_RED */ 166 <IMX8QM_USDHC1_DATA5_LSIO_GPIO5_IO20 0x06000061>, /* LED_5_GREEN */ 167 <IMX8QM_USDHC1_DATA6_LSIO_GPIO5_IO21 0x06000061>; /* LED_5_RED */ 168 }; 169 170 pinctrl_uart24_forceoff: uart24forceoffgrp { 171 fsl,pins = <IMX8QM_USDHC2_CMD_LSIO_GPIO5_IO25 0x00000021>; 172 }; 173}; 174 175/* Apalis SPI1 */ 176&lpspi0 { 177 status = "okay"; 178}; 179 180/* Apalis SPI2 */ 181&lpspi2 { 182 status = "okay"; 183}; 184 185/* Apalis UART3 */ 186&lpuart0 { 187 status = "okay"; 188}; 189 190/* Apalis UART1 */ 191&lpuart1 { 192 status = "okay"; 193}; 194 195/* Apalis UART4 */ 196&lpuart2 { 197 status = "okay"; 198}; 199 200/* Apalis UART2 */ 201&lpuart3 { 202 status = "okay"; 203}; 204 205&lsio_gpio5 { 206 gpio-line-names = "gpio5-00", "gpio5-01", "gpio5-02", "gpio5-03", 207 "gpio5-04", "gpio5-05", "gpio5-06", "gpio5-07", 208 "gpio5-08", "gpio5-09", "gpio5-10", "gpio5-11", 209 "gpio5-12", "gpio5-13", "gpio5-14", "gpio5-15", 210 "gpio5-16", "gpio5-17", "gpio5-18", "gpio5-19", 211 "LED-5-GREEN", "LED-5-RED", "gpio5-22", "gpio5-23", 212 "gpio5-24", "UART24-FORCEOFF", "gpio5-26", 213 "LED-4-GREEN", "gpio5-28", "LED-4-RED", "gpio5-30", 214 "gpio5-31"; 215 ngpios = <32>; 216}; 217 218/* Apalis PWM3, MXM3 pin 6 */ 219&lsio_pwm0 { 220 status = "okay"; 221}; 222 223/* Apalis PWM4, MXM3 pin 8 */ 224&lsio_pwm1 { 225 status = "okay"; 226}; 227 228/* Apalis PWM1, MXM3 pin 2 */ 229&lsio_pwm2 { 230 status = "okay"; 231}; 232 233/* Apalis PWM2, MXM3 pin 4 */ 234&lsio_pwm3 { 235 status = "okay"; 236}; 237 238/* TODO: Apalis PCIE1 */ 239 240/* TODO: Apalis BKL1_PWM */ 241 242/* TODO: Apalis DAP1 */ 243 244/* TODO: Apalis Analogue Audio */ 245 246/* TODO: Apalis SATA1 */ 247 248/* TODO: Apalis SPDIF1 */ 249 250/* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ 251 252/* Apalis USBO1 */ 253&usbotg1 { 254 status = "okay"; 255}; 256 257/* TODO: Apalis USBH4 SuperSpeed */ 258 259/* Apalis MMC1 */ 260&usdhc2 { 261 pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>; 262 pinctrl-1 = <&pinctrl_usdhc2_4bit_100mhz>, <&pinctrl_mmc1_cd>; 263 pinctrl-2 = <&pinctrl_usdhc2_4bit_200mhz>, <&pinctrl_mmc1_cd>; 264 pinctrl-3 = <&pinctrl_usdhc2_4bit_sleep>, <&pinctrl_mmc1_cd_sleep>; 265 bus-width = <4>; 266 cap-power-off-card; 267 /delete-property/ no-1-8-v; 268 vmmc-supply = <®_3v3_vmmc>; 269 status = "okay"; 270}; 271