Skip to content

Commit

Permalink
arm64: dts: freescale: add initial support for verdin imx8m mini
Browse files Browse the repository at this point in the history
This patch adds the device tree to support Toradex Verdin iMX8M Mini a
computer on module which can be used on different carrier boards.

The module consists of an NXP i.MX 8M Mini family SoC (either i.MX 8M
Mini Quad or 8M Mini DualLite), a PCA9450A PMIC, a Gigabit Ethernet PHY,
1 or 2 GB of LPDDR4 RAM, an eMMC, a TLA2024 ADC, an I2C EEPROM, an
RX8130 RTC, an optional SPI CAN controller plus an optional Bluetooth/
Wi-Fi module.

Anything that is not self-contained on the module is disabled by
default.

The device tree for the Dahlia includes the module's device tree and
enables the supported peripherals of the carrier board.

The device tree for the Verdin Development Board includes the module's
device tree as well as the Dahlia one as it is a superset and supports
almost all peripherals available.

So far there is no display functionality supported at all but basic
console UART, PCIe, USB host, eMMC and Ethernet and PCIe functionality
work fine.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
  • Loading branch information
ziswiler authored and Shawn Guo committed Feb 11, 2022
1 parent 9fb35e0 commit 6a57f22
Show file tree
Hide file tree
Showing 10 changed files with 1,726 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm64/boot/dts/freescale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw7901.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw7902.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-verdin-nonwifi-dahlia.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-verdin-nonwifi-dev.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-verdin-wifi-dahlia.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-verdin-wifi-dev.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-beacon-kit.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-bsh-smm-s2.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-bsh-smm-s2pro.dtb
Expand Down
150 changes: 150 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

/ {
sound_card: sound-card {
compatible = "simple-audio-card";
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card,name = "imx8mm-wm8904";
simple-audio-card,routing =
"Headphone Jack", "HPOUTL",
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"Headphone Jack", "MICBIAS",
"IN1L", "Headphone Jack";
simple-audio-card,widgets =
"Microphone", "Headphone Jack",
"Headphone", "Headphone Jack",
"Line", "Line In Jack";

dailink_master: simple-audio-card,codec {
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
sound-dai = <&wm8904_1a>;
};

simple-audio-card,cpu {
sound-dai = <&sai2>;
};
};
};

/* Verdin SPI_1 */
&ecspi2 {
status = "okay";
};

/* EEPROM on display adapter boards */
&eeprom_display_adapter {
status = "okay";
};

/* EEPROM on Verdin Development board */
&eeprom_carrier_board {
status = "okay";
};

&fec1 {
status = "okay";
};

/* Verdin QSPI_1 */
&flexspi {
status = "okay";
};

/* Current measurement into module VCC */
&hwmon {
status = "okay";
};

&hwmon_temp {
vs-supply = <&reg_1p8v>;
status = "okay";
};

&i2c3 {
status = "okay";
};

/* Verdin I2C_1 */
&i2c4 {
status = "okay";

/* Audio Codec */
wm8904_1a: audio-codec@1a {
compatible = "wlf,wm8904";
AVDD-supply = <&reg_3p3v>;
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
clock-names = "mclk";
CPVDD-supply = <&reg_3p3v>;
DBVDD-supply = <&reg_3p3v>;
DCVDD-supply = <&reg_3p3v>;
MICVDD-supply = <&reg_3p3v>;
reg = <0x1a>;
#sound-dai-cells = <0>;
};
};

/* Verdin PCIE_1 */
&pcie0 {
status = "okay";
};

&pcie_phy {
status = "okay";
};

/* Verdin PWM_3_DSI */
&pwm1 {
status = "okay";
};

/* Verdin PWM_1 */
&pwm2 {
status = "okay";
};

/* Verdin PWM_2 */
&pwm3 {
status = "okay";
};

/* VERDIN I2S_1 */
&sai2 {
status = "okay";
};

/* Verdin UART_3 */
&uart1 {
status = "okay";
};

/* Verdin UART_1 */
&uart2 {
status = "okay";
};

/* Verdin UART_2 */
&uart3 {
status = "okay";
};

/* Verdin USB_1 */
&usbotg1 {
status = "okay";
};

/* Verdin USB_2 */
&usbotg2 {
status = "okay";
};

/* Verdin SD_1 */
&usdhc2 {
status = "okay";
};
67 changes: 67 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

#include "imx8mm-verdin-dahlia.dtsi"

/ {
sound_card: sound-card {
compatible = "simple-audio-card";
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card,name = "imx8mm-nau8822";
simple-audio-card,routing =
"Headphones", "LHP",
"Headphones", "RHP",
"Speaker", "LSPK",
"Speaker", "RSPK",
"Line Out", "AUXOUT1",
"Line Out", "AUXOUT2",
"LAUX", "Line In",
"RAUX", "Line In",
"LMICP", "Mic In",
"RMICP", "Mic In";
simple-audio-card,widgets =
"Headphones", "Headphones",
"Line Out", "Line Out",
"Speaker", "Speaker",
"Microphone", "Mic In",
"Line", "Line In";

dailink_master: simple-audio-card,codec {
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
sound-dai = <&nau8822_1a>;
};

simple-audio-card,cpu {
sound-dai = <&sai2>;
};
};
};

&gpio_expander_21 {
status = "okay";
};

/* Verdin I2C_1 */
&i2c4 {
/* Audio Codec */
nau8822_1a: audio-codec@1a {
compatible = "nuvoton,nau8822";
reg = <0x1a>;
};
};

/* Verdin UART_1, connector X50 through RS485 transceiver */
&uart2 {
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
rs485-rx-during-tx;
};

/* Limit frequency on dev board due to long traces and bad signal integrity */
&usdhc2 {
max-frequency = <100000000>;
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dahlia.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

/dts-v1/;

#include "imx8mm-verdin.dtsi"
#include "imx8mm-verdin-nonwifi.dtsi"
#include "imx8mm-verdin-dahlia.dtsi"

/ {
model = "Toradex Verdin iMX8M Mini on Dahlia Board";
compatible = "toradex,verdin-imx8mm-nonwifi-dahlia",
"toradex,verdin-imx8mm-nonwifi",
"toradex,verdin-imx8mm",
"fsl,imx8mm";
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dev.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

/dts-v1/;

#include "imx8mm-verdin.dtsi"
#include "imx8mm-verdin-nonwifi.dtsi"
#include "imx8mm-verdin-dev.dtsi"

/ {
model = "Toradex Verdin iMX8M Mini on Verdin Development Board";
compatible = "toradex,verdin-imx8mm-nonwifi-dev",
"toradex,verdin-imx8mm-nonwifi",
"toradex,verdin-imx8mm",
"fsl,imx8mm";
};
75 changes: 75 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

&gpio3 {
gpio-line-names = "SODIMM_52",
"SODIMM_54",
"SODIMM_64",
"SODIMM_21",
"SODIMM_206",
"SODIMM_76",
"SODIMM_56",
"SODIMM_58",
"SODIMM_60",
"SODIMM_62",
"SODIMM_162",
"SODIMM_164",
"SODIMM_166",
"SODIMM_168",
"SODIMM_66",
"SODIMM_17",
"",
"SODIMM_156",
"SODIMM_160",
"SODIMM_244",
"",
"SODIMM_48",
"SODIMM_44",
"SODIMM_42",
"SODIMM_46";
};

&gpio4 {
gpio-line-names = "SODIMM_102",
"SODIMM_90",
"SODIMM_92",
"SODIMM_94",
"SODIMM_96",
"SODIMM_100",
"SODIMM_148",
"SODIMM_152",
"SODIMM_154",
"SODIMM_174",
"SODIMM_120",
"SODIMM_104",
"SODIMM_106",
"SODIMM_108",
"SODIMM_112",
"SODIMM_114",
"SODIMM_116",
"SODIMM_150",
"SODIMM_118",
"",
"SODIMM_88",
"SODIMM_149",
"SODIMM_147",
"SODIMM_36",
"SODIMM_32",
"SODIMM_30",
"SODIMM_34",
"SODIMM_38",
"SODIMM_252",
"SODIMM_133",
"SODIMM_135",
"SODIMM_129";
};

&usdhc3 {
bus-width = <4>;
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc3>;
pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

/dts-v1/;

#include "imx8mm-verdin.dtsi"
#include "imx8mm-verdin-wifi.dtsi"
#include "imx8mm-verdin-dahlia.dtsi"

/ {
model = "Toradex Verdin iMX8M Mini WB on Dahlia Board";
compatible = "toradex,verdin-imx8mm-wifi-dahlia",
"toradex,verdin-imx8mm-wifi",
"toradex,verdin-imx8mm",
"fsl,imx8mm";
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

/dts-v1/;

#include "imx8mm-verdin.dtsi"
#include "imx8mm-verdin-wifi.dtsi"
#include "imx8mm-verdin-dev.dtsi"

/ {
model = "Toradex Verdin iMX8M Mini WB on Verdin Development Board";
compatible = "toradex,verdin-imx8mm-wifi-dev",
"toradex,verdin-imx8mm-wifi",
"toradex,verdin-imx8mm",
"fsl,imx8mm";
};

0 comments on commit 6a57f22

Please sign in to comment.