| 1 |
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 |
/* |
| 3 |
* Copyright 2024 Toradex |
| 4 |
*/ |
| 5 |
|
| 6 |
#include "imx8-apalis-eval.dtsi" |
| 7 |
|
| 8 |
/ { |
| 9 |
reg_3v3_mmc: regulator-3v3-mmc { |
| 10 |
compatible = "regulator-fixed"; |
| 11 |
pinctrl-names = "default"; |
| 12 |
pinctrl-0 = <&pinctrl_enable_3v3_mmc>; |
| 13 |
enable-active-high; |
| 14 |
gpio = <&lsio_gpio5 19 GPIO_ACTIVE_HIGH>; |
| 15 |
off-on-delay-us = <100000>; |
| 16 |
regulator-max-microvolt = <3300000>; |
| 17 |
regulator-min-microvolt = <3300000>; |
| 18 |
regulator-name = "3.3V_MMC"; |
| 19 |
startup-delay-us = <10000>; |
| 20 |
}; |
| 21 |
|
| 22 |
reg_3v3_sd: regulator-3v3-sd { |
| 23 |
compatible = "regulator-fixed"; |
| 24 |
pinctrl-names = "default"; |
| 25 |
pinctrl-0 = <&pinctrl_enable_3v3_sd>; |
| 26 |
enable-active-high; |
| 27 |
gpio = <&lsio_gpio5 20 GPIO_ACTIVE_HIGH>; |
| 28 |
off-on-delay-us = <100000>; |
| 29 |
regulator-max-microvolt = <3300000>; |
| 30 |
regulator-min-microvolt = <3300000>; |
| 31 |
regulator-name = "3.3V_SD"; |
| 32 |
startup-delay-us = <10000>; |
| 33 |
}; |
| 34 |
|
| 35 |
reg_can1: regulator-can1 { |
| 36 |
compatible = "regulator-fixed"; |
| 37 |
pinctrl-names = "default"; |
| 38 |
pinctrl-0 = <&pinctrl_enable_can1_power>; |
| 39 |
enable-active-high; |
| 40 |
gpio = <&lsio_gpio5 22 GPIO_ACTIVE_HIGH>; |
| 41 |
regulator-name = "5V_SW_CAN1"; |
| 42 |
startup-delay-us = <10000>; |
| 43 |
}; |
| 44 |
|
| 45 |
reg_can2: regulator-can2 { |
| 46 |
compatible = "regulator-fixed"; |
| 47 |
pinctrl-names = "default"; |
| 48 |
pinctrl-0 = <&pinctrl_enable_can2_power>; |
| 49 |
enable-active-high; |
| 50 |
gpio = <&lsio_gpio5 21 GPIO_ACTIVE_HIGH>; |
| 51 |
regulator-name = "5V_SW_CAN2"; |
| 52 |
startup-delay-us = <10000>; |
| 53 |
}; |
| 54 |
|
| 55 |
sound-carrier { |
| 56 |
compatible = "simple-audio-card"; |
| 57 |
simple-audio-card,bitclock-master = <&codec_dai>; |
| 58 |
simple-audio-card,format = "i2s"; |
| 59 |
simple-audio-card,frame-master = <&codec_dai>; |
| 60 |
simple-audio-card,name = "apalis-nau8822"; |
| 61 |
simple-audio-card,routing = |
| 62 |
"Headphones", "LHP", |
| 63 |
"Headphones", "RHP", |
| 64 |
"Speaker", "LSPK", |
| 65 |
"Speaker", "RSPK", |
| 66 |
"Line Out", "AUXOUT1", |
| 67 |
"Line Out", "AUXOUT2", |
| 68 |
"LAUX", "Line In", |
| 69 |
"RAUX", "Line In", |
| 70 |
"LMICP", "Mic In", |
| 71 |
"RMICP", "Mic In"; |
| 72 |
simple-audio-card,widgets = |
| 73 |
"Headphones", "Headphones", |
| 74 |
"Line Out", "Line Out", |
| 75 |
"Speaker", "Speaker", |
| 76 |
"Microphone", "Mic In", |
| 77 |
"Line", "Line In"; |
| 78 |
|
| 79 |
codec_dai: simple-audio-card,codec { |
| 80 |
sound-dai = <&nau8822_1a>; |
| 81 |
system-clock-frequency = <12288000>; |
| 82 |
}; |
| 83 |
|
| 84 |
simple-audio-card,cpu { |
| 85 |
sound-dai = <&sai0>; |
| 86 |
}; |
| 87 |
}; |
| 88 |
}; |
| 89 |
|
| 90 |
/* Apalis CAN1 */ |
| 91 |
&flexcan1 { |
| 92 |
xceiver-supply = <®_can1>; |
| 93 |
status = "okay"; |
| 94 |
}; |
| 95 |
|
| 96 |
/* Apalis CAN2 */ |
| 97 |
&flexcan2 { |
| 98 |
xceiver-supply = <®_can2>; |
| 99 |
status = "okay"; |
| 100 |
}; |
| 101 |
|
| 102 |
/* Apalis I2C1 */ |
| 103 |
&i2c2 { |
| 104 |
status = "okay"; |
| 105 |
|
| 106 |
/* Audio Codec */ |
| 107 |
nau8822_1a: audio-codec@1a { |
| 108 |
compatible = "nuvoton,nau8822"; |
| 109 |
reg = <0x1a>; |
| 110 |
#sound-dai-cells = <0>; |
| 111 |
}; |
| 112 |
|
| 113 |
/* Power/Current Measurement Sensor */ |
| 114 |
hwmon@40 { |
| 115 |
compatible = "ti,ina219"; |
| 116 |
reg = <0x40>; |
| 117 |
shunt-resistor = <5000>; |
| 118 |
}; |
| 119 |
|
| 120 |
temperature-sensor@4f { |
| 121 |
compatible = "ti,tmp75c"; |
| 122 |
reg = <0x4f>; |
| 123 |
}; |
| 124 |
|
| 125 |
eeprom@57 { |
| 126 |
compatible = "st,24c02", "atmel,24c02"; |
| 127 |
reg = <0x57>; |
| 128 |
}; |
| 129 |
}; |
| 130 |
|
| 131 |
&sai0 { |
| 132 |
assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, |
| 133 |
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, |
| 134 |
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>, |
| 135 |
<&sai0_lpcg IMX_LPCG_CLK_0>; |
| 136 |
assigned-clock-rates = <786432000>, <49152000>, <12288000>, <49152000>; |
| 137 |
pinctrl-names = "default"; |
| 138 |
pinctrl-0 = <&pinctrl_sai0>; |
| 139 |
#sound-dai-cells = <0>; |
| 140 |
status = "okay"; |
| 141 |
}; |
| 142 |
|
| 143 |
/* Apalis MMC1 */ |
| 144 |
&usdhc2 { |
| 145 |
pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>; |
| 146 |
pinctrl-1 = <&pinctrl_usdhc2_4bit_100mhz>, <&pinctrl_mmc1_cd>; |
| 147 |
pinctrl-2 = <&pinctrl_usdhc2_4bit_200mhz>, <&pinctrl_mmc1_cd>; |
| 148 |
pinctrl-3 = <&pinctrl_usdhc2_4bit_sleep>, <&pinctrl_mmc1_cd_sleep>; |
| 149 |
bus-width = <4>; |
| 150 |
vmmc-supply = <®_3v3_mmc>; |
| 151 |
status = "okay"; |
| 152 |
}; |
| 153 |
|
| 154 |
/* Apalis SD1 */ |
| 155 |
&usdhc3 { |
| 156 |
vmmc-supply = <®_3v3_sd>; |
| 157 |
status = "okay"; |
| 158 |
}; |
| 159 |
|
| 160 |
&iomuxc { |
| 161 |
pinctrl-0 = <&pinctrl_cam1_gpios>, |
| 162 |
<&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>, |
| 163 |
<&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_keys>, |
| 164 |
<&pinctrl_gpio_usbh_oc_n>, <&pinctrl_lpuart1ctrl>, |
| 165 |
<&pinctrl_lvds0_i2c0_gpio>, <&pinctrl_lvds1_i2c0_gpios>, |
| 166 |
<&pinctrl_mipi_dsi_0_1_en>, <&pinctrl_mipi_dsi1_gpios>, |
| 167 |
<&pinctrl_mlb_gpios>, <&pinctrl_qspi1a_gpios>, |
| 168 |
<&pinctrl_sata1_act>, <&pinctrl_sim0_gpios>, |
| 169 |
<&pinctrl_usdhc1_gpios>; |
| 170 |
|
| 171 |
pinctrl_enable_3v3_mmc: enable3v3mmcgrp { |
| 172 |
fsl,pins = <IMX8QM_USDHC1_DATA4_LSIO_GPIO5_IO19 0x00000021>; /* MXM3_148 */ |
| 173 |
}; |
| 174 |
|
| 175 |
pinctrl_enable_3v3_sd: enable3v3sdgrp { |
| 176 |
fsl,pins = <IMX8QM_USDHC1_DATA5_LSIO_GPIO5_IO20 0x00000021>; /* MXM3_152 */ |
| 177 |
}; |
| 178 |
|
| 179 |
pinctrl_enable_can1_power: enablecan1powergrp { |
| 180 |
fsl,pins = <IMX8QM_USDHC1_DATA7_LSIO_GPIO5_IO22 0x00000021>; /* MXM3_158 */ |
| 181 |
}; |
| 182 |
|
| 183 |
pinctrl_enable_can2_power: enablecan2powergrp { |
| 184 |
fsl,pins = <IMX8QM_USDHC1_DATA6_LSIO_GPIO5_IO21 0x00000021>; /* MXM3_156 */ |
| 185 |
}; |
| 186 |
|
| 187 |
pinctrl_sai0: sai0grp { |
| 188 |
fsl,pins = <IMX8QM_SAI1_RXC_AUD_SAI0_TXD 0xc600006c>, /* MXM3_196 */ |
| 189 |
<IMX8QM_SPI0_CS1_AUD_SAI0_TXC 0xc600004c>, /* MXM3_200 */ |
| 190 |
<IMX8QM_SAI1_RXFS_AUD_SAI0_RXD 0xc600004c>, /* MXM3_202 */ |
| 191 |
<IMX8QM_SPI2_CS1_AUD_SAI0_TXFS 0xc600004c>; /* MXM3_204 */ |
| 192 |
}; |
| 193 |
}; |