u-boot/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
Marek Vasut 32a41b7c37 ARM: imx: Auto-detect PHY on Data Modul i.MX8M Mini/Plus eDM SBC
Implement fdtdec_board_setup() auto-detection of ethernet PHY.
This uses properties of the hardware and pull resistor placement.

If GPIO1_16 RGMII_MDC is HIGH, then R530 (MX8MM eDM SBC) or
R390 (MX8MP eDM SBC) is populated. R530 or R390 is populated
only on boards with AR8031 PHY.

If GPIO1_16 RGMII_MDC is LOW, then the in-SoM pull down is the
dominant pull resistor. This is the case on boards with BCM54213PE
PHY.

In case AR8031 PHY is populated, the PHY MDIO address is 0, in
case BCM54213PE PHY is populated, the PHY MDIO address is 1, the
fdtdec_board_setup() is used to patch the correct address into
the U-Boot control DT.

Enable broadcom PHY support to support both PHYs.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2024-01-08 14:34:16 -03:00

202 lines
2.6 KiB
Text

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2022 Marek Vasut <marex@denx.de>
*/
#include "imx8mp-u-boot.dtsi"
#include "imx8mp-pinfunc.h"
/ {
aliases {
eeprom0 = &eeprom;
mmc0 = &usdhc3; /* eMMC */
mmc1 = &usdhc2; /* MicroSD */
spi0 = &ecspi1;
};
config {
dmo,ram-coding-gpios = <&gpio3 20 0>, <&gpio4 3 0>, <&gpio4 1 0>;
};
reg_usb1_vbus: regulator-usb1-vbus {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb1_vbus>;
regulator-max-microvolt = <5000000>;
regulator-min-microvolt = <5000000>;
regulator-name = "USB1_PWR";
};
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
bootph-pre-ram;
};
};
&buck4 {
bootph-pre-ram;
};
&buck5 {
bootph-pre-ram;
};
&ecspi1 {
bootph-pre-ram;
flash@0 {
bootph-pre-ram;
};
};
&gpio1 {
bootph-pre-ram;
};
&gpio2 {
bootph-pre-ram;
};
&gpio3 {
bootph-pre-ram;
bl-enable-hog {
bootph-pre-ram;
gpio-hog;
output-low;
gpios = <0 GPIO_ACTIVE_HIGH>;
line-name = "BL_ENABLE_1V8";
};
tft-enable-hog {
bootph-pre-ram;
gpio-hog;
output-low;
gpios = <6 GPIO_ACTIVE_HIGH>;
line-name = "TFT_ENABLE_1V8";
};
graphics-gpio0-hog {
bootph-pre-ram;
gpio-hog;
input;
gpios = <7 GPIO_ACTIVE_HIGH>;
line-name = "GRAPHICS_GPIO0_1V8";
};
};
&gpio4 {
bootph-pre-ram;
dsi-reset-hog {
bootph-pre-ram;
gpio-hog;
output-high;
gpios = <0 GPIO_ACTIVE_LOW>;
line-name = "DSI_RESET_1V8#";
};
graphics-prsnt-hog {
bootph-pre-ram;
gpio-hog;
input;
gpios = <18 GPIO_ACTIVE_LOW>;
line-name = "GRAPHICS_PRSNT_1V8#";
};
dsi-irq-hog {
bootph-pre-ram;
gpio-hog;
input;
gpios = <19 GPIO_ACTIVE_LOW>;
line-name = "DSI_IRQ_1V8#";
};
};
&gpio5 {
bootph-pre-ram;
};
&i2c3 {
bootph-pre-ram;
};
&pinctrl_ecspi1 {
bootph-pre-ram;
};
&pinctrl_hog_sbc {
bootph-pre-ram;
};
&pinctrl_i2c3 {
bootph-pre-ram;
};
&pinctrl_i2c3_gpio {
bootph-pre-ram;
};
&pinctrl_pmic {
bootph-pre-ram;
};
&pinctrl_uart3 {
bootph-pre-ram;
};
&pinctrl_usdhc2 {
bootph-pre-ram;
};
&pinctrl_usdhc3 {
bootph-pre-ram;
};
&pmic {
bootph-pre-ram;
regulators {
bootph-pre-ram;
};
};
&uart3 {
bootph-pre-ram;
};
&usb3_phy0 {
vbus-supply = <&reg_usb1_vbus>;
};
&usdhc2 {
bootph-pre-ram;
sd-uhs-sdr104;
sd-uhs-ddr50;
};
&usdhc3 {
bootph-pre-ram;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
};
&wdog1 {
bootph-pre-ram;
};
&iomuxc {
usb1-grp {
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x80
>;
};
pinctrl_usb1_vbus: usb1-vbus-grp {
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x6
>;
};
};