diff mbox series

[net-next,2/3] arm64: dts: airoha: Add EN7581 ethernet node

Message ID 0f4194ef6243ae0767887f25a4e661092c10fbbd.1717150593.git.lorenzo@kernel.org (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series Introduce EN7581 ethernet support | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next, async
netdev/apply fail Patch does not apply to net-next-1

Commit Message

Lorenzo Bianconi May 31, 2024, 10:22 a.m. UTC
Introduce the Airoha EN7581 ethernet node in Airoha EN7581 dtsi

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 arch/arm64/boot/dts/airoha/en7581-evb.dts |  4 +++
 arch/arm64/boot/dts/airoha/en7581.dtsi    | 31 +++++++++++++++++++++++
 2 files changed, 35 insertions(+)

Comments

Andrew Lunn June 2, 2024, 5:05 p.m. UTC | #1
On Fri, May 31, 2024 at 12:22:19PM +0200, Lorenzo Bianconi wrote:
> Introduce the Airoha EN7581 ethernet node in Airoha EN7581 dtsi
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  arch/arm64/boot/dts/airoha/en7581-evb.dts |  4 +++
>  arch/arm64/boot/dts/airoha/en7581.dtsi    | 31 +++++++++++++++++++++++
>  2 files changed, 35 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/airoha/en7581-evb.dts b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> index cf58e43dd5b2..82da86ae00b0 100644
> --- a/arch/arm64/boot/dts/airoha/en7581-evb.dts
> +++ b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> @@ -24,3 +24,7 @@ memory@80000000 {
>  		reg = <0x0 0x80000000 0x2 0x00000000>;
>  	};
>  };
> +
> +&eth0 {
> +	status = "okay";
> +};

Is that enough to make it useful? Don't you need a phy-handle, or
phy-mode?

	Andrew
Lorenzo Bianconi June 2, 2024, 5:38 p.m. UTC | #2
> On Fri, May 31, 2024 at 12:22:19PM +0200, Lorenzo Bianconi wrote:
> > Introduce the Airoha EN7581 ethernet node in Airoha EN7581 dtsi
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  arch/arm64/boot/dts/airoha/en7581-evb.dts |  4 +++
> >  arch/arm64/boot/dts/airoha/en7581.dtsi    | 31 +++++++++++++++++++++++
> >  2 files changed, 35 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/airoha/en7581-evb.dts b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > index cf58e43dd5b2..82da86ae00b0 100644
> > --- a/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > +++ b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > @@ -24,3 +24,7 @@ memory@80000000 {
> >  		reg = <0x0 0x80000000 0x2 0x00000000>;
> >  	};
> >  };
> > +
> > +&eth0 {
> > +	status = "okay";
> > +};
> 
> Is that enough to make it useful? Don't you need a phy-handle, or
> phy-mode?

This changes is actually in a subsequent patch (not posted yet) where I will
add support for the mt7530 dsa switch. Do you prefer to add it here?

Regards,
Lorenzo

> 
> 	Andrew
Andrew Lunn June 2, 2024, 5:49 p.m. UTC | #3
On Sun, Jun 02, 2024 at 07:38:17PM +0200, Lorenzo Bianconi wrote:
> > On Fri, May 31, 2024 at 12:22:19PM +0200, Lorenzo Bianconi wrote:
> > > Introduce the Airoha EN7581 ethernet node in Airoha EN7581 dtsi
> > > 
> > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > ---
> > >  arch/arm64/boot/dts/airoha/en7581-evb.dts |  4 +++
> > >  arch/arm64/boot/dts/airoha/en7581.dtsi    | 31 +++++++++++++++++++++++
> > >  2 files changed, 35 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/airoha/en7581-evb.dts b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > > index cf58e43dd5b2..82da86ae00b0 100644
> > > --- a/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > > +++ b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > > @@ -24,3 +24,7 @@ memory@80000000 {
> > >  		reg = <0x0 0x80000000 0x2 0x00000000>;
> > >  	};
> > >  };
> > > +
> > > +&eth0 {
> > > +	status = "okay";
> > > +};
> > 
> > Is that enough to make it useful? Don't you need a phy-handle, or
> > phy-mode?
> 
> This changes is actually in a subsequent patch (not posted yet) where I will
> add support for the mt7530 dsa switch. Do you prefer to add it here?

I would prefer you move this later when you add the switch.

	Andrew
Lorenzo Bianconi June 2, 2024, 6 p.m. UTC | #4
> On Sun, Jun 02, 2024 at 07:38:17PM +0200, Lorenzo Bianconi wrote:
> > > On Fri, May 31, 2024 at 12:22:19PM +0200, Lorenzo Bianconi wrote:
> > > > Introduce the Airoha EN7581 ethernet node in Airoha EN7581 dtsi
> > > > 
> > > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > > ---
> > > >  arch/arm64/boot/dts/airoha/en7581-evb.dts |  4 +++
> > > >  arch/arm64/boot/dts/airoha/en7581.dtsi    | 31 +++++++++++++++++++++++
> > > >  2 files changed, 35 insertions(+)
> > > > 
> > > > diff --git a/arch/arm64/boot/dts/airoha/en7581-evb.dts b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > > > index cf58e43dd5b2..82da86ae00b0 100644
> > > > --- a/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > > > +++ b/arch/arm64/boot/dts/airoha/en7581-evb.dts
> > > > @@ -24,3 +24,7 @@ memory@80000000 {
> > > >  		reg = <0x0 0x80000000 0x2 0x00000000>;
> > > >  	};
> > > >  };
> > > > +
> > > > +&eth0 {
> > > > +	status = "okay";
> > > > +};
> > > 
> > > Is that enough to make it useful? Don't you need a phy-handle, or
> > > phy-mode?
> > 
> > This changes is actually in a subsequent patch (not posted yet) where I will
> > add support for the mt7530 dsa switch. Do you prefer to add it here?
> 
> I would prefer you move this later when you add the switch.

ack, I will do in v2.

Regards,
Lorenzo

> 
> 	Andrew
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/airoha/en7581-evb.dts b/arch/arm64/boot/dts/airoha/en7581-evb.dts
index cf58e43dd5b2..82da86ae00b0 100644
--- a/arch/arm64/boot/dts/airoha/en7581-evb.dts
+++ b/arch/arm64/boot/dts/airoha/en7581-evb.dts
@@ -24,3 +24,7 @@  memory@80000000 {
 		reg = <0x0 0x80000000 0x2 0x00000000>;
 	};
 };
+
+&eth0 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
index eec29cd6539a..c9363b5f19c3 100644
--- a/arch/arm64/boot/dts/airoha/en7581.dtsi
+++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
@@ -263,5 +263,36 @@  pcie_intc1: interrupt-controller {
 				#interrupt-cells = <1>;
 			};
 		};
+
+		eth0: ethernet@1fb50000 {
+			compatible = "airoha,en7581-eth";
+			reg = <0 0x1fb50000 0 0x2600>,
+			      <0 0x1fb54000 0 0x2000>,
+			      <0 0x1fb56000 0 0x2000>;
+			reg-names = "fe", "qdma0", "qdma1";
+
+			resets = <&scuclk EN7581_FE_RST>,
+				 <&scuclk EN7581_FE_PDMA_RST>,
+				 <&scuclk EN7581_FE_QDMA_RST>,
+				 <&scuclk EN7581_XSI_MAC_RST>,
+				 <&scuclk EN7581_DUAL_HSI0_MAC_RST>,
+				 <&scuclk EN7581_DUAL_HSI1_MAC_RST>,
+				 <&scuclk EN7581_HSI_MAC_RST>;
+			reset-names = "fe", "pdma", "qdma", "xsi-mac",
+				      "hsi0-mac", "hsi1-mac", "hsi-mac";
+
+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
+
+			status = "disabled";
+		};
 	};
 };