Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY

Device-tree bindings for MDIO define per-PHY reset-gpios as well as a
global reset-gpios property at the MDIO node level which controls all
devices on the bus. The latter is most likely a workaround for the
chicken-and-egg problem where we cannot read the ID of the PHY before
bringing it out of reset but we cannot bring it out of reset until we've
read its ID.

I have proposed a comprehensive solution for this problem in 2020 but it
never got upstream. We do however have workaround in place which allows
us to hard-code the PHY id in the compatible property, thus skipping the
ID scanning.

Let's make the device-tree for sa8775p-ride slightly more correct by
moving the reset-gpios property to the PHY node with its ID put into the
PHY node's compatible.

Link: https://lore.kernel.org/all/20200622093744.13685-1-brgl@bgdev.pl/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20230810080909.6259-5-brgl@bgdev.pl
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Bartosz Golaszewski and committed by
Bjorn Andersson
5255901f 6ca89cc6

+4 -4
+4 -4
arch/arm64/boot/dts/qcom/sa8775p-ride.dts
··· 279 279 #address-cells = <1>; 280 280 #size-cells = <0>; 281 281 282 - reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; 283 - reset-delay-us = <11000>; 284 - reset-post-delay-us = <70000>; 285 - 286 282 sgmii_phy: phy@8 { 283 + compatible = "ethernet-phy-id0141.0dd4"; 287 284 reg = <0x8>; 288 285 device_type = "ethernet-phy"; 286 + reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; 287 + reset-assert-us = <11000>; 288 + reset-deassert-us = <70000>; 289 289 }; 290 290 }; 291 291