Re: [PATCH v2] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

From: Paul Walmsley
Date: Fri Jun 21 2019 - 18:06:56 EST


On Fri, 21 Jun 2019, Yash Shah wrote:

> DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added
>
> Signed-off-by: Yash Shah <yash.shah@xxxxxxxxxx>

Thanks, dropped the "reg-names" property from the patch, and queued the
following updated version for v5.2-rc.


- Paul

From: Yash Shah <yash.shah@xxxxxxxxxx>
Date: Fri, 21 Jun 2019 16:23:49 +0530
Subject: [PATCH] riscv: dts: Add DT node for SiFive FU540 Ethernet controller
driver

DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added

Signed-off-by: Yash Shah <yash.shah@xxxxxxxxxx>
Reviewed-by: Anup Patel <anup@xxxxxxxxxxxxxx>
Tested-by: Atish Patra <atish.patra@xxxxxxx>
[paul.walmsley@xxxxxxxxxx: dropped the "reg-names" property, as it
is not documented in the binding nor used in the driver]
Signed-off-by: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
---
arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 16 ++++++++++++++++
.../boot/dts/sifive/hifive-unleashed-a00.dts | 9 +++++++++
2 files changed, 25 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
index 3c06ee4b2b29..83f40b00ab63 100644
--- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
+++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
@@ -211,5 +211,21 @@
#address-cells = <1>;
#size-cells = <0>;
};
+ eth0: ethernet@10090000 {
+ compatible = "sifive,fu540-macb";
+ interrupt-parent = <&plic0>;
+ interrupts = <53>;
+ reg = <0x0 0x10090000 0x0 0x2000
+ 0x0 0x100a0000 0x0 0x1000>;
+ reg-names = "control";
+ status = "disabled";
+ local-mac-address = [00 00 00 00 00 00];
+ clock-names = "pclk", "hclk";
+ clocks = <&prci PRCI_CLK_GEMGXLPLL>,
+ <&prci PRCI_CLK_GEMGXLPLL>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
};
};
diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
index 4da88707e28f..d783bf2c3507 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
@@ -63,3 +63,12 @@
disable-wp;
};
};
+
+&eth0 {
+ status = "okay";
+ phy-mode = "gmii";
+ phy-handle = <&phy1>;
+ phy1: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
--
2.20.1