1// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2/*
3 * Copyright (C) 2023 DH electronics GmbH
4 *
5 * DHCOM iMX6ULL variant:
6 * DHCM-iMX6ULL-C080-R051-F0409-SPI-E2-CAN2-SD-RTC-ADC-I-01D2
7 * DHCOR PCB number: 578-200 or newer
8 * DHCOM PCB number: 579-200 or newer
9 * PicoITX PCB number: 487-600 or newer
10 */
11/dts-v1/;
12
13#include "imx6ull-dhcom-som.dtsi"
14#include "imx6ull-dhcom-som-cfg-sdcard.dtsi"
15
16/ {
17	model = "DH electronics i.MX6ULL DHCOM on PicoITX";
18	compatible = "dh,imx6ull-dhcom-picoitx", "dh,imx6ull-dhcom-som",
19		     "dh,imx6ull-dhcor-som", "fsl,imx6ull";
20
21	led {
22		compatible = "gpio-leds";
23
24		led-0 {
25			color = <LED_COLOR_ID_YELLOW>;
26			default-state = "off";
27			function = LED_FUNCTION_INDICATOR;
28			gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO I */
29		};
30	};
31};
32
33&fec1 {
34	phy-handle = <&mdio1_phy0>;
35
36	mdio {
37		#address-cells = <1>;
38		#size-cells = <0>;
39
40		mdio1_phy0: ethernet-phy@0 {
41			compatible = "ethernet-phy-id0007.c0f0", /* SMSC LAN8710Ai */
42				     "ethernet-phy-ieee802.3-c22";
43			reg = <0>;
44			clock-names = "rmii-ref";
45			clocks = <&clks IMX6UL_CLK_ENET_REF>;
46			interrupt-parent = <&gpio5>;
47			interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
48			pinctrl-0 = <&pinctrl_fec1_phy &pinctrl_snvs_fec1_phy>;
49			pinctrl-names = "default";
50			reset-assert-us = <500>;
51			reset-deassert-us = <500>;
52			reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
53			smsc,disable-energy-detect; /* Make plugin detection reliable */
54		};
55	};
56};
57
58&fec2 {
59	status = "disabled";
60};
61
62&gpio4 {
63	gpio-line-names =
64		"", "", "", "",
65		"", "", "", "",
66		"", "", "", "",
67		"", "", "", "",
68		"", "PicoITX-HW2", "PicoITX-HW1", "DHCOM-M",
69		"PicoITX-HW0", "DHCOM-U", "DHCOM-T", "DHCOM-S",
70		"DHCOM-R", "DHCOM-Q", "DHCOM-P", "DHCOM-O",
71		"DHCOM-N", "", "", "";
72};
73
74&gpio5 {
75	gpio-line-names =
76		"DHCOM-A", "DHCOM-B", "PicoITX-In2", "PicoITX-Out2",
77		"PicoITX-In1", "", "", "PicoITX-Out1",
78		"DHCOM-G", "DHCOM-H", "", "",
79		"", "", "", "",
80		"", "", "", "",
81		"", "", "", "",
82		"", "", "", "",
83		"", "", "", "";
84};
85
86&iomuxc {
87	pinctrl_fec1: fec1-grp {
88		fsl,pins = <
89			MX6UL_PAD_GPIO1_IO07__ENET1_MDC		0x1b0b0
90			MX6UL_PAD_GPIO1_IO06__ENET1_MDIO	0x1b0b0
91			MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN	0x1b0b0
92			MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER	0x1b0b0
93			MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00	0x1b0b0
94			MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01	0x1b0b0
95			MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN	0x1b010
96			MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00	0x1b010
97			MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01	0x1b010
98			MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1	0x4001b010
99		>;
100	};
101};
102