From 1c552eb44ddba4d8630eb3453b4f6dd8ef83b13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 24 May 2022 11:14:21 +0200 Subject: bmips: add basic BCM6358 ethernet support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MDIO bus is supported but there are errors when trying to probe and configure the external BCM5325E switch through B53 DSA. Therefore, let's add basic ethernet (but working) support for now. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts | 11 +++ target/linux/bmips/dts/bcm6358.dtsi | 79 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) (limited to 'target/linux/bmips/dts') diff --git a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts index 6c8b093edf..2ad9460a9c 100644 --- a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts +++ b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts @@ -140,6 +140,17 @@ status = "okay"; }; +ðernet1 { + status = "okay"; + + nvmem-cells = <&macaddr_cfe_6a0>; + nvmem-cell-names = "mac-address"; +}; + +&iudma { + status = "okay"; +}; + &ohci { status = "okay"; }; diff --git a/target/linux/bmips/dts/bcm6358.dtsi b/target/linux/bmips/dts/bcm6358.dtsi index e08ead0623..606e096d2e 100644 --- a/target/linux/bmips/dts/bcm6358.dtsi +++ b/target/linux/bmips/dts/bcm6358.dtsi @@ -346,5 +346,84 @@ status = "disabled"; }; + + ethernet0: ethernet@fffe4000 { + compatible = "brcm,bcm6358-emac"; + reg = <0xfffe4000 0x2dc>; + + clocks = <&periph_clk BCM6358_CLK_ENET0>; + + interrupt-parent = <&periph_intc>; + interrupts = , + , + ; + interrupt-names = "emac", + "rx", + "tx"; + + brcm,iudma = <&iudma>; + + dma-rx = <0>; + dma-tx = <1>; + + status = "disabled"; + + mdio0: mdio { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + ethernet1: ethernet@fffe4800 { + compatible = "brcm,bcm6358-emac"; + reg = <0xfffe4800 0x2dc>; + + clocks = <&periph_clk BCM6358_CLK_ENET1>; + + interrupt-parent = <&periph_intc>; + interrupts = , + , + ; + interrupt-names = "emac", + "rx", + "tx"; + + brcm,iudma = <&iudma>; + brcm,external-mii; + + dma-rx = <2>; + dma-tx = <3>; + + status = "disabled"; + + mdio1: mdio { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + iudma: dma@fffe5000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "brcm,bcm6358-iudma"; + reg = <0xfffe5000 0x24>, + <0xfffe5100 0x80>, + <0xfffe5200 0x80>; + reg-names = "dma", + "dma-channels", + "dma-sram"; + + dma-channels = <8>; + + clocks = <&periph_clk BCM6358_CLK_EMUSB>, + <&periph_clk BCM6358_CLK_USBSU>, + <&periph_clk BCM6358_CLK_EPHY>, + <&periph_clk BCM6358_CLK_ENET>; + + resets = <&periph_rst BCM6358_RST_ENET>, + <&periph_rst BCM6358_RST_EPHY>; + + status = "disabled"; + }; }; }; -- cgit v1.2.3