diff mbox series

[2/3] riscv: dts: sophgo: Add ethernet node

Message ID 20240310055816.11575-3-seashell11234455@gmail.com
State Superseded
Delegated to: Andes
Headers show
Series board: sophgo: milkv_duo: Add ethernet support for Milk-V Duo board | expand

Commit Message

Kongyang Liu March 10, 2024, 5:56 a.m. UTC
Add ethernet node for cv1800b SoC

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
---

 arch/riscv/dts/cv18xx.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Leo Liang March 12, 2024, 9:59 a.m. UTC | #1
On Sun, Mar 10, 2024 at 01:56:45PM +0800, Kongyang Liu wrote:
> Add ethernet node for cv1800b SoC
> 
> Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> ---
> 
>  arch/riscv/dts/cv18xx.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)

Hi KongYang,

Will there be a patch adding this ethernet node for kernel as well ?

Best regards,
Leo
Conor Dooley March 12, 2024, 1:20 p.m. UTC | #2
On Tue, Mar 12, 2024 at 05:59:44PM +0800, Leo Liang wrote:
> On Sun, Mar 10, 2024 at 01:56:45PM +0800, Kongyang Liu wrote:
> > Add ethernet node for cv1800b SoC
> > 
> > Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> > ---
> > 
> >  arch/riscv/dts/cv18xx.dtsi | 6 ++++++
> >  1 file changed, 6 insertions(+)
> 
> Hi KongYang,
> 
> Will there be a patch adding this ethernet node for kernel as well ?

It's highly like that the compatible of "cv1800b-ethernet" will be
requested to be changed to "cv1800b-dwmac" to match the designware IP
used in other SoCs.

The added node also looks suspiciously missing any clocks or interrupts.
Kongyang Liu March 15, 2024, 2:06 a.m. UTC | #3
Leo Liang <ycliang@andestech.com> 于2024年3月12日周二 17:59写道:

>
> On Sun, Mar 10, 2024 at 01:56:45PM +0800, Kongyang Liu wrote:
> > Add ethernet node for cv1800b SoC
> >
> > Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> > ---
> >
> >  arch/riscv/dts/cv18xx.dtsi | 6 ++++++
> >  1 file changed, 6 insertions(+)
>
> Hi KongYang,
>
> Will there be a patch adding this ethernet node for kernel as well ?
>

Currently, I'm only focusing on the u-boot for the Milk-V Duo board, while
the kernel part is being handled by others. Therefore, this patch will not
be added to the kernel.

Best regards
Kongyang Liu

> Best regards,
> Leo
Kongyang Liu March 15, 2024, 2:18 a.m. UTC | #4
Conor Dooley <conor@kernel.org> 于2024年3月12日周二 21:20写道:
>
> On Tue, Mar 12, 2024 at 05:59:44PM +0800, Leo Liang wrote:
> > On Sun, Mar 10, 2024 at 01:56:45PM +0800, Kongyang Liu wrote:
> > > Add ethernet node for cv1800b SoC
> > >
> > > Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> > > ---
> > >
> > >  arch/riscv/dts/cv18xx.dtsi | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> >
> > Hi KongYang,
> >
> > Will there be a patch adding this ethernet node for kernel as well ?
>
> It's highly like that the compatible of "cv1800b-ethernet" will be
> requested to be changed to "cv1800b-dwmac" to match the designware IP
> used in other SoCs.
>

I will change it in next version

> The added node also looks suspiciously missing any clocks or interrupts.

If we only consider u-boot, since u-boot does not utilize interrupts and
clocks, this code can function properly. However, if compatibility with
the kernel is a concern, I will discuss this issue with who is working on
Milk-V Duo Ethernet support for the kernel.

Best regards
Kongyang Liu
diff mbox series

Patch

diff --git a/arch/riscv/dts/cv18xx.dtsi b/arch/riscv/dts/cv18xx.dtsi
index ec99c4deeb..013372a40c 100644
--- a/arch/riscv/dts/cv18xx.dtsi
+++ b/arch/riscv/dts/cv18xx.dtsi
@@ -197,6 +197,12 @@ 
 			status = "disabled";
 		};
 
+		ethernet0: ethernet@4070000 {
+			compatible = "sophgo,cv1800b-ethernet";
+			reg = <0x04070000 0x10000>;
+			phy-mode = "rmii";
+		};
+
 		plic: interrupt-controller@70000000 {
 			reg = <0x70000000 0x4000000>;
 			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;