diff mbox series

[v2,2/2] arm64: dts: renesas: rzv2m evk: Enable ethernet

Message ID 20220517081645.3764-3-phil.edworthy@renesas.com (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series Add Ethernet to RZ/V2M | expand

Commit Message

Phil Edworthy May 17, 2022, 8:16 a.m. UTC
Enable Ethernet interface on RZ/V2M EVK.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2:
 - No change
---
 arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Geert Uytterhoeven May 19, 2022, 10:19 a.m. UTC | #1
Hi Phil,

On Tue, May 17, 2022 at 10:17 AM Phil Edworthy
<phil.edworthy@renesas.com> wrote:
> Enable Ethernet interface on RZ/V2M EVK.
>
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v2:
>  - No change

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
> +++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
> @@ -42,3 +43,16 @@ &extal_clk {
>  &uart0 {
>         status = "okay";
>  };
> +
> +&avb {
> +       renesas,no-ether-link;
> +       phy-handle = <&phy0>;
> +       phy-mode = "gmii";
> +       status = "okay";
> +
> +       phy0: ethernet-phy@0 {
> +               compatible = "ethernet-phy-id0022.1622",

My schematics says RTL8211FG-CG, not Micrel KSZ9031?
I.e. "ethernet-phy-id001c.c916"?

As there is no PHY reset to deassert, you can remove the compatible
property, and check what's read back from the PHY ID registers.

I'd say you can just drop the compatible value completely, but you
would have to readd it anyway when the PHY reset is documented.

> +                            "ethernet-phy-ieee802.3-c22";
> +               reg = <0>;

Once you have GPIO/IRQ support, you can add the interrupts and
resets properties, pointing to P16_12 resp. P17_00.

> +       };
> +};

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Phil Edworthy May 20, 2022, 9:59 a.m. UTC | #2
Hi Geert,

Thanks for your review!

On 19 May 2022 11:20 Geert Uytterhoeven wrote:
> On Tue, May 17, 2022 at 10:17 AM Phil Edworthy <phil.edworthy@renesas.com>
> wrote:
> > Enable Ethernet interface on RZ/V2M EVK.
> >
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v2:
> >  - No change
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
> > @@ -42,3 +43,16 @@ &extal_clk {
> >  &uart0 {
> >         status = "okay";
> >  };
> > +
> > +&avb {
> > +       renesas,no-ether-link;
> > +       phy-handle = <&phy0>;
> > +       phy-mode = "gmii";
> > +       status = "okay";
> > +
> > +       phy0: ethernet-phy@0 {
> > +               compatible = "ethernet-phy-id0022.1622",
> 
> My schematics says RTL8211FG-CG, not Micrel KSZ9031?
> I.e. "ethernet-phy-id001c.c916"?
Yes, you are correct, I have since dumped the id in get_phy_c22_id().
Sorry, I should have checked that the BSP was correct.

> As there is no PHY reset to deassert, you can remove the compatible
> property, and check what's read back from the PHY ID registers.
> 
> I'd say you can just drop the compatible value completely, but you would
> have to readd it anyway when the PHY reset is documented.
> 
> > +                            "ethernet-phy-ieee802.3-c22";
> > +               reg = <0>;
> 
> Once you have GPIO/IRQ support, you can add the interrupts and resets
> properties, pointing to P16_12 resp. P17_00.
Will do!

Thanks
Phil
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
index 41cba82c2252..ec7099211cab 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
@@ -14,6 +14,7 @@  / {
 
 	aliases {
 		serial0 = &uart0;
+		ethernet0 = &avb;
 	};
 
 	chosen {
@@ -42,3 +43,16 @@  &extal_clk {
 &uart0 {
 	status = "okay";
 };
+
+&avb {
+	renesas,no-ether-link;
+	phy-handle = <&phy0>;
+	phy-mode = "gmii";
+	status = "okay";
+
+	phy0: ethernet-phy@0 {
+		compatible = "ethernet-phy-id0022.1622",
+			     "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+	};
+};