* [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address
@ 2024-02-14 9:03 Michal Vokáč
2024-02-14 9:03 ` [PATCH v2 2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node Michal Vokáč
2024-02-14 13:54 ` [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Andrew Lunn
0 siblings, 2 replies; 3+ messages in thread
From: Michal Vokáč @ 2024-02-14 9:03 UTC (permalink / raw)
To: Shawn Guo, Fabio Estevam, Andrew Lunn
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, NXP Linux Team, devicetree,
linux-arm-kernel, linux-kernel, Jonathan McDowell,
Michal Vokáč
This change does not have any functional effect. The switch works just
fine without this patch as it has full access to all the addresses
on the bus. This is simply a clean-up to set the node name address
and reg address to the same value.
Fixes: 15b43e497ffd ("ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch")
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
changes in v2:
- Reword the commit message so it is clear that this patch does not
fix a functional problem.
arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi
index cfb0fc924b42..5763f8253d51 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi
@@ -143,7 +143,7 @@
switch@10 {
compatible = "qca,qca8334";
- reg = <10>;
+ reg = <0x10>;
reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
switch_ports: ports {
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node
2024-02-14 9:03 [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Michal Vokáč
@ 2024-02-14 9:03 ` Michal Vokáč
2024-02-14 13:54 ` [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Andrew Lunn
1 sibling, 0 replies; 3+ messages in thread
From: Michal Vokáč @ 2024-02-14 9:03 UTC (permalink / raw)
To: Shawn Guo, Fabio Estevam, Andrew Lunn
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, NXP Linux Team, devicetree,
linux-arm-kernel, linux-kernel, Jonathan McDowell,
Michal Vokáč
We identified that the PHYs actually do not work since commit 7da7b84fee58
("ARM: dts: imx6dl-yapp4: Move phy reset into switch node") as
a coincidence of several circumstances.
The reset signal is kept asserted by a pull-down resistor on the board
unless it is deasserted by GPIO from the SoC. This is to keep the switch
dead until it is configured properly by the kernel and user space.
Prior to the referenced commit the switch was reset by the FEC driver
and the reset GPIO was actively deasserted. The mdio-bus was scanned
and the attached switch and its PHYs were found and configured.
With the referenced commit the switch is reset by the qca8k driver.
Because of another bug in the qca8k driver, functionality of the reset
pin depends on its pre-kernel configuration. See commit c44fc98f0a8f
("net: dsa: qca8k: fix illegal usage of GPIO")
The problem did not appear until we removed support for the switch
and configuration of its reset pin from the bootloader.
To fix that, properly describe the internal mdio-bus configuration of
the qca8334 switch. The PHYs are internal to the switch and sit on its
internal mdio-bus.
Fixes: 7da7b84fee58 ("ARM: dts: imx6dl-yapp4: Move phy reset into switch node")
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
changes in v2:
- none
arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi | 23 ++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi
index 5763f8253d51..eec1f9092572 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi
@@ -133,14 +133,6 @@
#address-cells = <1>;
#size-cells = <0>;
- phy_port2: phy@1 {
- reg = <1>;
- };
-
- phy_port3: phy@2 {
- reg = <2>;
- };
-
switch@10 {
compatible = "qca,qca8334";
reg = <0x10>;
@@ -165,15 +157,30 @@
eth2: port@2 {
reg = <2>;
label = "eth2";
+ phy-mode = "internal";
phy-handle = <&phy_port2>;
};
eth1: port@3 {
reg = <3>;
label = "eth1";
+ phy-mode = "internal";
phy-handle = <&phy_port3>;
};
};
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy_port2: ethernet-phy@1 {
+ reg = <1>;
+ };
+
+ phy_port3: ethernet-phy@2 {
+ reg = <2>;
+ };
+ };
};
};
};
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address
2024-02-14 9:03 [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Michal Vokáč
2024-02-14 9:03 ` [PATCH v2 2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node Michal Vokáč
@ 2024-02-14 13:54 ` Andrew Lunn
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2024-02-14 13:54 UTC (permalink / raw)
To: Michal Vokáč
Cc: Shawn Guo, Fabio Estevam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
NXP Linux Team, devicetree, linux-arm-kernel, linux-kernel,
Jonathan McDowell
On Wed, Feb 14, 2024 at 10:03:27AM +0100, Michal Vokáč wrote:
> This change does not have any functional effect. The switch works just
> fine without this patch as it has full access to all the addresses
> on the bus. This is simply a clean-up to set the node name address
> and reg address to the same value.
>
> Fixes: 15b43e497ffd ("ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch")
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-14 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 9:03 [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Michal Vokáč
2024-02-14 9:03 ` [PATCH v2 2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node Michal Vokáč
2024-02-14 13:54 ` [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).