Commit bae9847e authored by Christoph Niedermaier's avatar Christoph Niedermaier Committed by Shawn Guo
Browse files

ARM: dts: imx6ull-dhcom: Add DHCOM based PicoITX board



Add DT for DH PicoITX unit, which is a bare-bones carrier board for
the DHCOM. The board has ethernet port, USB, CAN, LED and a custom
board-to-board expansion connector. For this board a DHCOM i.MX6ULL
SoM configuration without WiFi/BT is used. The interface is used
for the SD card instead. Make this adjustment by using a separate DT
include file.

Signed-off-by: default avatarChristoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 611b6c89
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -742,6 +742,7 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
	imx6ull-colibri-wifi-iris.dtb \
	imx6ull-colibri-wifi-iris-v2.dtb \
	imx6ull-dhcom-pdk2.dtb \
	imx6ull-dhcom-picoitx.dtb \
	imx6ull-jozacp.dtb \
	imx6ull-kontron-bl.dtb \
	imx6ull-myir-mys-6ulx-eval.dtb \
+101 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
/*
 * Copyright (C) 2023 DH electronics GmbH
 *
 * DHCOM iMX6ULL variant:
 * DHCM-iMX6ULL-C080-R051-F0409-SPI-E2-CAN2-SD-RTC-ADC-I-01D2
 * DHCOR PCB number: 578-200 or newer
 * DHCOM PCB number: 579-200 or newer
 * PicoITX PCB number: 487-600 or newer
 */
/dts-v1/;

#include "imx6ull-dhcom-som.dtsi"
#include "imx6ull-dhcom-som-cfg-sdcard.dtsi"

/ {
	model = "DH electronics i.MX6ULL DHCOM on PicoITX";
	compatible = "dh,imx6ull-dhcom-picoitx", "dh,imx6ull-dhcom-som",
		     "dh,imx6ull-dhcor-som", "fsl,imx6ull";

	led {
		compatible = "gpio-leds";

		led-0 {
			color = <LED_COLOR_ID_YELLOW>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO I */
		};
	};
};

&fec1 {
	phy-handle = <&mdio1_phy0>;

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		mdio1_phy0: ethernet-phy@0 {
			compatible = "ethernet-phy-id0007.c0f0", /* SMSC LAN8710Ai */
				     "ethernet-phy-ieee802.3-c22";
			reg = <0>;
			clock-names = "rmii-ref";
			clocks = <&clks IMX6UL_CLK_ENET_REF>;
			interrupt-parent = <&gpio5>;
			interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
			pinctrl-0 = <&pinctrl_fec1_phy &pinctrl_snvs_fec1_phy>;
			pinctrl-names = "default";
			reset-assert-us = <500>;
			reset-deassert-us = <500>;
			reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
			smsc,disable-energy-detect; /* Make plugin detection reliable */
		};
	};
};

&fec2 {
	status = "disabled";
};

&gpio4 {
	gpio-line-names =
		"", "", "", "",
		"", "", "", "",
		"", "", "", "",
		"", "", "", "",
		"", "PicoITX-HW2", "PicoITX-HW1", "DHCOM-M",
		"PicoITX-HW0", "DHCOM-U", "DHCOM-T", "DHCOM-S",
		"DHCOM-R", "DHCOM-Q", "DHCOM-P", "DHCOM-O",
		"DHCOM-N", "", "", "";
};

&gpio5 {
	gpio-line-names =
		"DHCOM-A", "DHCOM-B", "PicoITX-In2", "PicoITX-Out2",
		"PicoITX-In1", "", "", "PicoITX-Out1",
		"DHCOM-G", "DHCOM-H", "", "",
		"", "", "", "",
		"", "", "", "",
		"", "", "", "",
		"", "", "", "",
		"", "", "", "";
};

&iomuxc {
	pinctrl_fec1: fec1-grp {
		fsl,pins = <
			MX6UL_PAD_GPIO1_IO07__ENET1_MDC		0x1b0b0
			MX6UL_PAD_GPIO1_IO06__ENET1_MDIO	0x1b0b0
			MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN	0x1b0b0
			MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER	0x1b0b0
			MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00	0x1b0b0
			MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01	0x1b0b0
			MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN	0x1b010
			MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00	0x1b010
			MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01	0x1b010
			MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1	0x4001b010
		>;
	};
};
+97 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
/*
 * Copyright (C) 2023 DH electronics GmbH
 */

/*
 * Special SoM configuration: SD card
 *
 * Enabled:  Micro SD card on module or
 *           external SD card via DHCOM depends on hardware variant
 *           GPIO H and GPIO I will be available
 *           DHCOM UART2 will be available
 * Disabled: WiFi and BT
 */

/*
 * To use usdhc1 as SD card, the WiFi node must be deleted.
 * BT is also not available, so remove BT from the UART node.
 */
/delete-node/ &brcmf;
/delete-node/ &bluetooth;

/ {
	aliases {
		mmc1 = &usdhc1;
		serial0 = &uart1;
		serial1 = &uart2;
		serial2 = &uart3;
		serial3 = &uart4;
		serial4 = &uart5;
		serial5 = &uart6;
	};

	reg_sd1_vmmc: regulator-sd1-vmmc {
		compatible = "regulator-fixed";
		regulator-max-microvolt = <3300000>;
		regulator-min-microvolt = <3300000>;
		regulator-name = "VSD_3V3";
	};
};

/* Micro SD card on module or external SD card via DHCOM */
&usdhc1 {
	/delete-property/ #address-cells;
	/delete-property/ #size-cells;
	/delete-property/ keep-power-in-suspend;
	/delete-property/ mmc-pwrseq;
	/delete-property/ non-removable;
	/delete-property/ wakeup-source;
	cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
	no-1-8-v;
	pinctrl-0 = <&pinctrl_usdhc1>;
	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	vmmc-supply = <&reg_sd1_vmmc>;
	status = "okay";
};

&iomuxc {
	pinctrl_usdhc1: usdhc1-grp {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x17059
			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x10059
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x17059
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x17059
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x17059
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x17059
			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
		>;
	};

	pinctrl_usdhc1_100mhz: usdhc1-100mhz-grp {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170b9
			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x100b9
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170b9
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170b9
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170b9
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170b9
			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */

		>;
	};

	pinctrl_usdhc1_200mhz: usdhc1-200mhz-grp {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170f9
			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x100f9
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170f9
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170f9
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170f9
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170f9
			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
		>;
	};
};