2020-03-13 05:33:42

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 0/2] properly define some of PHYs

changes v2:
- remove spaces

Oleksij Rempel (2):
ARM: dts: imx6dl-riotboard: properly define rgmii PHY
ARM: dts: imx6q-marsboard: properly define rgmii PHY

arch/arm/boot/dts/imx6dl-riotboard.dts | 16 +++++++++++++++-
arch/arm/boot/dts/imx6q-marsboard.dts | 15 ++++++++++++++-
2 files changed, 29 insertions(+), 2 deletions(-)

--
2.25.1


2020-03-13 05:33:54

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: dts: imx6q-marsboard: properly define rgmii PHY

The Atheros AR8035 PHY can be autodetected but can't use interrupt
support provided on this board. Define MDIO bus and the PHY node to make
it work properly.

Signed-off-by: Oleksij Rempel <[email protected]>
---
arch/arm/boot/dts/imx6q-marsboard.dts | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6q-marsboard.dts b/arch/arm/boot/dts/imx6q-marsboard.dts
index 84b30bd6908f..1f31d86a217b 100644
--- a/arch/arm/boot/dts/imx6q-marsboard.dts
+++ b/arch/arm/boot/dts/imx6q-marsboard.dts
@@ -111,8 +111,21 @@ &fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii-id";
- phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Atheros AR8035 PHY */
+ rgmii_phy: ethernet-phy@4 {
+ reg = <4>;
+ interrupts-extended = <&gpio1 28 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10000>;
+ reset-deassert-us = <1000>;
+ };
+ };
};

&hdmi {
--
2.25.1

2020-03-13 09:56:37

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: dts: imx6q-marsboard: properly define rgmii PHY

On Fri, Mar 13, 2020 at 06:32:24AM +0100, Oleksij Rempel wrote:
> The Atheros AR8035 PHY can be autodetected but can't use interrupt
> support provided on this board. Define MDIO bus and the PHY node to make
> it work properly.
>
> Signed-off-by: Oleksij Rempel <[email protected]>
> ---
> arch/arm/boot/dts/imx6q-marsboard.dts | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/imx6q-marsboard.dts b/arch/arm/boot/dts/imx6q-marsboard.dts
> index 84b30bd6908f..1f31d86a217b 100644
> --- a/arch/arm/boot/dts/imx6q-marsboard.dts
> +++ b/arch/arm/boot/dts/imx6q-marsboard.dts
> @@ -111,8 +111,21 @@ &fec {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_enet>;
> phy-mode = "rgmii-id";
> - phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
> status = "okay";

Hi Oleksij

I don't see a phy-handle here. So is it still using phy_find_first()?

Andrew

2020-03-13 10:14:20

by Oleksij Rempel

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: dts: imx6q-marsboard: properly define rgmii PHY

On Fri, Mar 13, 2020 at 10:55:45AM +0100, Andrew Lunn wrote:
> On Fri, Mar 13, 2020 at 06:32:24AM +0100, Oleksij Rempel wrote:
> > The Atheros AR8035 PHY can be autodetected but can't use interrupt
> > support provided on this board. Define MDIO bus and the PHY node to make
> > it work properly.
> >
> > Signed-off-by: Oleksij Rempel <[email protected]>
> > ---
> > arch/arm/boot/dts/imx6q-marsboard.dts | 15 ++++++++++++++-
> > 1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/boot/dts/imx6q-marsboard.dts b/arch/arm/boot/dts/imx6q-marsboard.dts
> > index 84b30bd6908f..1f31d86a217b 100644
> > --- a/arch/arm/boot/dts/imx6q-marsboard.dts
> > +++ b/arch/arm/boot/dts/imx6q-marsboard.dts
> > @@ -111,8 +111,21 @@ &fec {
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_enet>;
> > phy-mode = "rgmii-id";
> > - phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
> > status = "okay";
>
> Hi Oleksij
>
> I don't see a phy-handle here. So is it still using phy_find_first()?

Uff... right. Thx for pointing it.

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (1.38 kB)
signature.asc (849.00 B)
Download all attachments