[PATCH v2] arm64: dts: mt8195: Add Ethernet controller

Biao Huang biao.huang at mediatek.com
Wed Oct 19 19:05:20 PDT 2022


Dear Angelo,
	Thanks for your comments!

On Wed, 2022-10-19 at 15:57 +0200, AngeloGioacchino Del Regno wrote:
> Il 19/10/22 11:15, Biao Huang ha scritto:
> > Add Ethernet controller node for mt8195.
> > 
> > Signed-off-by: Biao Huang <biao.huang at mediatek.com>
> > ---
> >   arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 88
> > ++++++++++++++++++++
> >   arch/arm64/boot/dts/mediatek/mt8195.dtsi     | 86
> > +++++++++++++++++++
> >   2 files changed, 174 insertions(+)
> > 
> 
> ..snip..
> 
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> > b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> > index 905d1a90b406..7f7d9f8e72ee 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> > @@ -1042,6 +1042,92 @@ spis1: spi at 1101e000 {
> >   			status = "disabled";
> >   		};
> >   
> > +		stmmac_axi_setup: stmmac-axi-config {
> 
> Didn't you get a warning during dtb build for these ones?
> And if you did, why have you ignored it? :-)
I checked some dts, they keep stmmac-axi-config outside ethernet node,
so I keep the similar way with them, maybe that's old style.
> 
> > +			snps,wr_osr_lmt = <0x7>;
> > +			snps,rd_osr_lmt = <0x7>;
> > +			snps,blen = <0 0 0 0 16 8 4>;
> > +		};
> > +
> 
> ..snip..
> 
> > +
> > +		eth: ethernet at 11021000 {
> > +			compatible = "mediatek,mt8195-gmac",
> > "snps,dwmac-5.10a";
> > +			reg = <0 0x11021000 0 0x4000>;
> > +			interrupts = <GIC_SPI 716 IRQ_TYPE_LEVEL_HIGH
> > 0>;
> > +			interrupt-names = "macirq";
> > +			clock-names = "axi",
> > +				      "apb",
> > +				      "mac_cg",
> > +				      "mac_main",
> > +				      "ptp_ref",
> > +				      "rmii_internal";
> > +			clocks = <&pericfg_ao CLK_PERI_AO_ETHERNET>,
> > +				 <&pericfg_ao
> > CLK_PERI_AO_ETHERNET_BUS>,
> > +				 <&pericfg_ao
> > CLK_PERI_AO_ETHERNET_MAC>,
> > +				 <&topckgen CLK_TOP_SNPS_ETH_250M>,
> > +				 <&topckgen
> > CLK_TOP_SNPS_ETH_62P4M_PTP>,
> > +				 <&topckgen CLK_TOP_SNPS_ETH_50M_RMII>;
> > +			assigned-clocks = <&topckgen
> > CLK_TOP_SNPS_ETH_250M>,
> > +					  <&topckgen
> > CLK_TOP_SNPS_ETH_62P4M_PTP>,
> > +					  <&topckgen
> > CLK_TOP_SNPS_ETH_50M_RMII>;
> > +			assigned-clock-parents = <&topckgen
> > CLK_TOP_ETHPLL_D2>,
> > +						 <&topckgen
> > CLK_TOP_ETHPLL_D8>,
> > +						 <&topckgen
> > CLK_TOP_ETHPLL_D10>;
> > +			power-domains = <&spm
> > MT8195_POWER_DOMAIN_ETHER>;
> > +			mediatek,pericfg = <&infracfg_ao>;
> > +			snps,axi-config = <&stmmac_axi_setup>;
> > +			snps,mtl-rx-config = <&mtl_rx_setup>;
> > +			snps,mtl-tx-config = <&mtl_tx_setup>;
> > +			snps,txpbl = <16>;
> > +			snps,rxpbl = <16>;
> > +			snps,clk-csr = <0>;
> > +			status = "disabled";
> 
> Please move stmmac-axi-config, rx-queues-config, tx-queues-config
> here as a subnode
> or in the root node, respecting address/size cells being zero.
> Of course adding that here means also specifying {address,size}-cells 
> = <0> in this
> ethernet node.
OK, I'll move them to ethernet node, and add address/size-cells in
thernet node.
> 
> Regards,
> Angelo
Best Regards!
Biao




More information about the Linux-mediatek mailing list