u-boot/drivers
Ashok Reddy Soma ca994327ce net: gem: Workaround gmii2rgmii bridge DT node issue
For configurations with gmii2rgmii and external phy the DT nodes link
should be gem->gmii2rgmii->phy. But due to limitation in Linux driver
the DT is mentioned as gem->phy and gmii2rgmii->phy as shown in below DT.

ethernet@ff0c0000 {
	compatible = "cdns,zynqmp-gem\0cdns,gem";
	status = "okay";
	interrupt-parent = <0x04>;
	interrupts = <0x00 0x3b 0x04 0x00 0x3b 0x04>;
	reg = <0x00 0xff0c0000 0x00 0x1000>;
	clock-names = "pclk\0hclk\0tx_clk\0rx_clk\0tsu_clk";
	#address-cells = <0x01>;
	#size-cells = <0x00>;
	#stream-id-cells = <0x01>;
	iommus = <0x0d 0x875>;
	power-domains = <0x0c 0x1e>;
	clocks = <0x03 0x1f 0x03 0x69 0x03 0x2e 0x03 0x32 0x03 0x2c>;
	phy-handle = <0x0e>;
	phy-mode = "gmii";
	xlnx,ptp-enet-clock = <0x00>;
	local-mac-address = [ff ff ff ff ff ff];
	phandle = <0x4d>;

	mdio {
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		phandle = <0x4e>;

		ethernet-phy@1 {
			reg = <0x01>;
			rxc-skew-ps = <0x708>;
			txc-skew-ps = <0x708>;
			phandle = <0x0e>;
		};

		gmii_to_rgmii_0@8 {
			compatible = "xlnx,gmii-to-rgmii-1.0";
			phy-handle = <0x0e>;
			reg = <0x08>;
			phandle = <0x4f>;
		};
	};
};

Since same DT is used in Linux and U-Boot we need to workaround this
issue by using the gmii2rgmii node which points to phy and we should
ignore the gem pointing to phy directly.

Do this workaround by updating priv->phydev->node value with
priv->phy_of_node only if it is not valid node.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Link: https://lore.kernel.org/r/641eb13425ffe80e0743f60cf90d0f940577b9e9.1642162085.git.michal.simek@xilinx.com
2022-01-17 10:02:35 +01:00
..
adc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ata scsi: ceva: rename the resource name to match the linux kernel one 2021-11-09 17:18:23 +05:30
axi WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
bios_emulator pci: Drop DM_PCI check from bios_emul 2021-08-05 19:46:35 -04:00
block Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
bootcount bootcount: add a new driver with syscon as backend 2021-08-22 11:04:52 +02:00
bus bus: ti-sysc: change in a normal driver 2021-03-22 19:23:27 +13:00
button dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
cache cache: sifive: Fix -Wint-to-pointer-cast warning 2021-10-20 10:59:09 +08:00
clk clk: zynqmp: Fix gem tx/rx/ref clock handling 2022-01-05 10:22:02 +01:00
core iommu: Add IOMMU uclass 2021-10-31 08:46:44 -04:00
cpu sandbox: correct cpu nodes 2021-09-25 09:46:15 -06:00
crypto board: fsl_validate: Fix Double free Issue 2021-11-09 14:43:24 +05:30
ddr drivers: ddr: lc_common_dimm_params.c : Fix Divison by zero issue 2021-11-09 17:18:23 +05:30
demo demo: migrate uclass to livetree 2021-10-05 08:50:15 -04:00
dfu dfu: newline after updating 2021-11-07 18:36:56 +01:00
dma ti: keystone: dma: Migrate to Kconfig 2021-09-27 21:38:34 -04:00
fastboot fastboot: fix partition name truncation in environment lookup 2021-10-12 16:48:38 -04:00
firmware xilinx: firmware: Move dcache handling directly to pmufw load config 2022-01-05 10:22:02 +01:00
fpga WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
gpio zynqmp: gpio: Add support for zynqmp gpio modepin driver 2022-01-05 10:22:02 +01:00
hwspinlock dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
i2c Merge https://source.denx.de/u-boot/custodians/u-boot-marvell 2021-10-21 07:52:15 -04:00
input i8042: Do not abuse CONFIG namespace 2021-08-30 14:13:28 -04:00
iommu iommu: Add Apple DART driver 2021-10-31 08:46:44 -04:00
led dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mailbox dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
memory keystone2: Move CONFIG_AEMIF_CNTRL_BASE out of CONFIG namespace 2021-09-27 21:38:34 -04:00
misc u-boot-imx-20211020 2021-10-20 14:24:09 -04:00
mmc Xilinx changes for v2022.01-rc3 2021-11-16 09:51:04 -05:00
mtd Convert CONFIG_SPL_DRIVERS_MISC et al to Kconfig 2021-11-05 11:26:29 -04:00
mux dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
net net: gem: Workaround gmii2rgmii bridge DT node issue 2022-01-17 10:02:35 +01:00
nvme nvme: invalidate correct memory range after read 2021-10-12 16:49:21 -04:00
pch treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
pci Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq 2021-11-11 09:04:20 -05:00
pci_endpoint dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
phy phy: zynqmp: Add serdes/psgtr driver 2022-01-12 10:41:46 +01:00
pinctrl pinctrl: meson: Correct the driver GPIO declaration 2021-11-19 18:15:26 +01:00
power power: pmic: axp: Implement poweroff via sysreset 2021-10-25 14:51:03 +01:00
pwm exynos: pwm: Deal with a PWM at 100% 2021-11-09 11:57:22 +09:00
qe configs: fsl: migrate FMAN/QE specific defines to Kconfig 2021-11-09 17:18:23 +05:30
ram stm32mp15: replace CONFIG_TFABOOT when it is possible 2021-11-10 17:07:31 +01:00
reboot-mode reboot-mode: migrate uclass to livetree 2021-10-05 08:50:15 -04:00
remoteproc remoteproc: migrate uclass to livetree 2021-10-05 08:50:15 -04:00
reset clk: sunxi: Move header out of arch directory 2021-10-11 10:46:44 +01:00
rng Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
rtc rtc: ds1337: fix compatible string typo 2021-11-11 19:02:44 -05:00
scsi sata: Rename SATA_SUPPORT to SATA 2021-09-04 12:26:02 -04:00
serial serial: zynq: Add missing xlnx,zynqmp-uart compatible 2022-01-12 10:40:32 +01:00
smem dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
soc soc: xilinx: versal: Add soc_xilinx_versal driver 2021-08-26 08:08:11 +02:00
sound dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
spi Xilinx changes for v2022.01-rc3 2021-11-16 09:51:04 -05:00
spmi spmi: msm: add arbiter version 5 support 2021-10-31 08:46:44 -04:00
sysinfo sysinfo: rcar3: Add Renesas R-Car Gen3 sysinfo driver 2021-07-20 23:33:54 +02:00
sysreset microblaze: branch to base vector address on reset 2022-01-05 10:22:03 +01:00
tee tee: optee: sync cache on pre-reloc OP-TEE invocation 2021-07-23 07:13:25 -04:00
thermal WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
timer - Disable ATAGS for STM32 MCU and MPU boards 2021-10-12 12:01:00 -04:00
tpm drivers: tpm: atmel_twi: fix printf specifier compile warning 2021-11-17 13:47:36 +02:00
ufs dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
usb usb: Make USB_MUSB_PIO_ONLY selected by USB_MUSB_SUNXI 2021-11-15 11:17:39 -05:00
video - DHSOM update: 2021-11-10 14:11:30 -05:00
virtio pci: Drop DM_PCI 2021-09-13 18:23:13 -04:00
w1 arm: Remove zmx25 board and ARCH_MX25 2021-10-01 21:08:18 -04:00
w1-eeprom dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
watchdog sandbox: fix sandbox_wdt_expire_now() 2021-11-13 08:16:52 -07:00
xen WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
Kconfig iommu: Add IOMMU uclass 2021-10-31 08:46:44 -04:00
Makefile iommu: Add IOMMU uclass 2021-10-31 08:46:44 -04:00