diff mbox series

[4/8] ARM: dts: bcm6846: Add MDIO control block

Message ID 20241011-genexis-xg6846b-base-v1-4-f04d6f6f93ce@linaro.org (mailing list archive)
State New, archived
Headers show
Series ARM: dts: Add some BCM6846 device tree | expand

Commit Message

Linus Walleij Oct. 10, 2024, 10:07 p.m. UTC
This adds the MDIO block found in the BCM6846. The vendor tree
calls it "mdio5" so we assume the right compatible for this
particular version is "brcm,genet-mdio-v5".

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/bcm6846.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Florian Fainelli Oct. 10, 2024, 10:11 p.m. UTC | #1
On 10/10/24 15:07, Linus Walleij wrote:
> This adds the MDIO block found in the BCM6846. The vendor tree
> calls it "mdio5" so we assume the right compatible for this
> particular version is "brcm,genet-mdio-v5".

That the same IP block be present on systems using GENET and BCMBCA 
routers, absolutely, but it is not really the same. The one present on 
BCM6846 has an extra pair of registers adjacent to it:

LVL_IRQ_CLEAR
LVL_IRQ_MASK

There are other differences like bit 13 defining a "free running" MDIO 
clock, that has never been present in any of the GENET or ASP variants 
of mdio-bcm-unimac.

Therefore an updated compatible string would be in order IMHO, thanks!
Linus Walleij Oct. 11, 2024, 6:55 a.m. UTC | #2
On Fri, Oct 11, 2024 at 12:11 AM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
> On 10/10/24 15:07, Linus Walleij wrote:

> > This adds the MDIO block found in the BCM6846. The vendor tree
> > calls it "mdio5" so we assume the right compatible for this
> > particular version is "brcm,genet-mdio-v5".
>
> That the same IP block be present on systems using GENET and BCMBCA
> routers, absolutely, but it is not really the same. The one present on
> BCM6846 has an extra pair of registers adjacent to it:
>
> LVL_IRQ_CLEAR
> LVL_IRQ_MASK
>
> There are other differences like bit 13 defining a "free running" MDIO
> clock, that has never been present in any of the GENET or ASP variants
> of mdio-bcm-unimac.
>
> Therefore an updated compatible string would be in order IMHO, thanks!

OK I fix!

Is it the same block on all the BCMBCA variants so I should call it
"brcm,bcmbca-mdio" or is it bcm6846-specific so I should call it
"brcm,bcm6846-mdio"?

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
index dc0c87c79569..2d1c74ce79ac 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
@@ -223,5 +223,14 @@  nandcs: nand@0 {
 				reg = <0>;
 			};
 		};
+
+		mdio: mdio@2060 {
+			compatible = "brcm,genet-mdio-v5";
+			reg = <0x02060 0x10>, <0x5a068 0x4>;
+			reg-names = "mdio", "mdio_indir_rw";
+			#size-cells = <1>;
+			#address-cells = <0>;
+			status = "disabled";
+		};
 	};
 };