Skip to content

Commit

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

The module consists of an NXP i.MX 8M Plus family SoC (either i.MX 8M
Plus Quad or 8M Plus QuadLite), a PCA9450C PMIC, a Gigabit Ethernet PHY,
1, 2, 4 or 8 GB of LPDDR4 RAM, an eMMC, a TLA2024 ADC, an I2C EEPROM, an
RX8130 RTC, an optional I2C temperature sensor 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, USB host, eMMC and Ethernet functionality work fine.

[1] https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-plus

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
  • Loading branch information
ziswiler authored and Shawn Guo committed Apr 11, 2022
1 parent a00f1fa commit a39ed23
Show file tree
Hide file tree
Showing 10 changed files with 1,767 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 @@ -79,6 +79,10 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mn-var-som-symphony.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-venice-gw7902.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dahlia.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dev.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dahlia.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dev.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-kontron-pitx-imx8m.dtb
Expand Down
129 changes: 129 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2022 Toradex
*/

/* TODO: Audio Codec */

&backlight {
power-supply = <&reg_3p3v>;
};

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

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

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

&eqos {
status = "okay";
};

&flexcan1 {
status = "okay";
};

&flexcan2 {
status = "okay";
};

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

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

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

/* Verdin I2C_2_DSI */
&i2c2 {
status = "okay";
};

&i2c3 {
status = "okay";
};

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

/* TODO: Audio Codec */
};

/* TODO: Verdin PCIE_1 */

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

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

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

&reg_usdhc2_vmmc {
vin-supply = <&reg_3p3v>;
};

/* TODO: Verdin I2S_1 */

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

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

/* Verdin UART_3, used as the Linux Console */
&uart3 {
status = "okay";
};

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

&usb3_phy0 {
status = "okay";
};

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

&usb3_phy1 {
status = "okay";
};

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

#include "imx8mp-verdin-dahlia.dtsi"

/ {
/* TODO: Audio Codec */

reg_eth2phy: regulator-eth2phy {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio_expander_21 4 GPIO_ACTIVE_HIGH>; /* ETH_PWR_EN */
off-on-delay = <500000>;
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <3300000>;
regulator-name = "+V3.3_ETH";
startup-delay-us = <200000>;
vin-supply = <&reg_3p3v>;
};
};

&fec {
phy-supply = <&reg_eth2phy>;
status = "okay";
};

&gpio_expander_21 {
status = "okay";
vcc-supply = <&reg_1p8v>;
};

/* TODO: Verdin I2C_1 with Audio Codec */

/* Verdin UART_1, connector X50 through RS485 transceiver */
&uart1 {
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/imx8mp-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 "imx8mp-verdin.dtsi"
#include "imx8mp-verdin-nonwifi.dtsi"
#include "imx8mp-verdin-dahlia.dtsi"

/ {
model = "Toradex Verdin iMX8M Plus on Dahlia Board";
compatible = "toradex,verdin-imx8mp-nonwifi-dahlia",
"toradex,verdin-imx8mp-nonwifi",
"toradex,verdin-imx8mp",
"fsl,imx8mp";
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mp-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 "imx8mp-verdin.dtsi"
#include "imx8mp-verdin-nonwifi.dtsi"
#include "imx8mp-verdin-dev.dtsi"

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

&gpio5 {
gpio-line-names = "SODIMM_42",
"SODIMM_46",
"SODIMM_187",
"SODIMM_20",
"SODIMM_22",
"SODIMM_15",
"SODIMM_196",
"SODIMM_200",
"SODIMM_198",
"SODIMM_202",
"SODIMM_164",
"SODIMM_152",
"SODIMM_116",
"SODIMM_128",
"",
"",
"SODIMM_55",
"SODIMM_53",
"SODIMM_95",
"SODIMM_93",
"SODIMM_14",
"SODIMM_12",
"SODIMM_129",
"SODIMM_131",
"SODIMM_137",
"SODIMM_139",
"SODIMM_147",
"SODIMM_149",
"SODIMM_151",
"SODIMM_153";
};

&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_gpio2>,
<&pinctrl_gpio3>, <&pinctrl_gpio4>,
<&pinctrl_gpio7>, <&pinctrl_gpio8>,
<&pinctrl_gpio_hog1>, <&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>,
<&pinctrl_hdmi_hog>;
};

/*
* Verdin UART_4
* Often used by the M7 and then should not be enabled here.
*/
&uart4 {
status = "disabled";
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mp-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 "imx8mp-verdin.dtsi"
#include "imx8mp-verdin-wifi.dtsi"
#include "imx8mp-verdin-dahlia.dtsi"

/ {
model = "Toradex Verdin iMX8M Plus WB on Dahlia Board";
compatible = "toradex,verdin-imx8mp-wifi-dahlia",
"toradex,verdin-imx8mp-wifi",
"toradex,verdin-imx8mp",
"fsl,imx8mp";
};
18 changes: 18 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mp-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 "imx8mp-verdin.dtsi"
#include "imx8mp-verdin-wifi.dtsi"
#include "imx8mp-verdin-dev.dtsi"

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

0 comments on commit a39ed23

Please sign in to comment.