diff options
author | Wei Liang Lim <weiliang.lim@starfivetech.com> | 2023-10-19 09:36:18 +0300 |
---|---|---|
committer | Wei Liang Lim <weiliang.lim@starfivetech.com> | 2023-10-19 09:46:14 +0300 |
commit | 569779ec17583d0237e72815299921aec677a84e (patch) | |
tree | fe02ed95b99d126587c614ab9de724ecbb97c7e0 /arch | |
parent | 82942334532223a0e7eefa5a659bcd5454c661ca (diff) | |
download | u-boot-569779ec17583d0237e72815299921aec677a84e.tar.xz |
drivers: net: dwc_eth_qos: Add GMAC support for Dubhe
Signed-off-by: Wei Liang Lim <weiliang.lim@starfivetech.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/dts/dubhe.dtsi | 57 | ||||
-rw-r--r-- | arch/riscv/dts/dubhe_fpga.dts | 42 |
2 files changed, 93 insertions, 6 deletions
diff --git a/arch/riscv/dts/dubhe.dtsi b/arch/riscv/dts/dubhe.dtsi index f689389c73..3ce659e1e7 100644 --- a/arch/riscv/dts/dubhe.dtsi +++ b/arch/riscv/dts/dubhe.dtsi @@ -33,6 +33,28 @@ interrupt-controller; }; }; + + cpu@1 { + compatible = "starfive,dubhe", "riscv"; + d-cache-block-size = <64>; + d-cache-sets = <128>; + d-cache-size = <65536>; + device_type = "cpu"; + i-cache-block-size = <64>; + i-cache-sets = <512>; + i-cache-size = <65536>; + i-tlb-sets = <1>; + i-tlb-size = <32>; + mmu-type = "riscv,sv48"; + reg = <0x1>; + riscv,isa = "rv64imafdcbhnv"; + tlb-split; + cpu1_intc: interrupt-controller { + #interrupt-cells = <1>; + compatible = "riscv,cpu-intc"; + interrupt-controller; + }; + }; }; soc { @@ -98,5 +120,40 @@ clocks = <&pbus_clk>; status = "disabled"; }; + + stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <0xf>; + snps,rd_osr_lmt = <0xf>; + snps,blen = <256 128 64 32 0 0 0>; + }; + + gmac0: gmac0@10100000 { + compatible = "starfive,dubhe-eqos-5.20"; + reg = <0x0 0x10100000 0x0 0x10000>; + clock-names = "gtx", + "tx", + "ptp_ref", + "stmmaceth", + "pclk", + "gtxc"; + interrupt-parent = <&plic0>; + interrupts = <8>, <11>, <12> ; + interrupt-names = "macirq", "eth_wake_irq", "eth_lpi"; + max-frame-size = <1500>; + phy-mode = "rgmii-id"; + snps,multicast-filter-bins = <64>; + snps,perfect-filter-entries = <128>; + rx-fifo-depth = <2048>; + tx-fifo-depth = <2048>; + snps,fixed-burst; + snps,no-pbl-x8; + snps,force_thresh_dma_mode; + snps,axi-config = <&stmmac_axi_setup>; + snps,tso; + snps,en-tx-lpi-clockgating; + snps,txpbl = <4>; + snps,rxpbl = <4>; + status = "disabled"; + }; }; }; diff --git a/arch/riscv/dts/dubhe_fpga.dts b/arch/riscv/dts/dubhe_fpga.dts index 56cd3d2a03..5a04f9b6d3 100644 --- a/arch/riscv/dts/dubhe_fpga.dts +++ b/arch/riscv/dts/dubhe_fpga.dts @@ -27,6 +27,41 @@ }; soc { + fpga_2p5mhz_clk: fpga_2p5mhz_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <2500000>; + }; + + fpga_50mhz_clk: fpga_50mhz_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + }; + }; +}; + +&gmac0 { + status = "okay"; + phy-mode = "rgmii-id"; + // clk_csr = <3>; + // max-speed = <10>; + phy-handle = <ðernet_phy0>; + clocks = <&fpga_2p5mhz_clk>, + <&fpga_2p5mhz_clk>, + <&fpga_2p5mhz_clk>, + <&fpga_50mhz_clk>, + <&fpga_50mhz_clk>, + <&fpga_2p5mhz_clk>; + + mdio0 { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + ethernet_phy0: ethernet-phy@0 { + reg = <0>; + max-speed = <10>; + }; }; }; @@ -149,12 +184,7 @@ qspi_ubootproper_opensbi_blob: blob-ext@2 { filename = "u-boot.itb"; - offset = <0x22000>; - }; - - qspi_kernel_blob: blob-ext@3 { - filename = "kernel.itb"; - offset = <0x400000>; + offset = <0x42000>; }; }; };
\ No newline at end of file |