Message ID | 20220517081645.3764-3-phil.edworthy@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | Add Ethernet to RZ/V2M | expand |
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
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 --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>; + }; +};