From nobody Tue Nov 26 09:36:46 2024 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95D531FF7C2; Fri, 18 Oct 2024 15:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729264759; cv=none; b=Gwnjze8X8jLmoXgEqByVWiwljrvhoZcFTgSL8LdxjjGT/3IN1jIX32c+q4mgbU/QmDlkwEUlbxod6UnQDan6zaqVB/qnEyhw+E2/7S+FS/aARAGqmne0Quc91LayvZv1NoE56dbwc50hTJEXpniLyKK3fsbtJ8wV+/X+4VHI5Ww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729264759; c=relaxed/simple; bh=HQTSQIkZHY/yw7VXJNQxASS7XXYveuwmozW5Ea+i4wo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YqLfSD/W2e5747N3JjFgRt2XXb0gEABdgXSfvSJoIGIG26fL6VX49e96QhuPUSng6Y1Mz6cMkb+GShcPQdyRjgsVv7sf9Xl2JTD2rEncYI60/t6H/UvD6bfwaRikucYeFnN1UmbzCnnxVfpizDPMSlTiQLanVVDwPMYyct7xolc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=DMHIKa+x; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="DMHIKa+x" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1729264749; bh=HQTSQIkZHY/yw7VXJNQxASS7XXYveuwmozW5Ea+i4wo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DMHIKa+xQGALVx1MEA2UV324Y7IFUfsQw/P1lTXPp4bjxlfwp4u9OZ7xN0TRCuPyy Q2g1L+VQRgaY8JgDRtxrLhA0GvbjbWGOgZV/yDFft1fkPPZN4qYDzVU/WHoo0l91L6 ysHDoMnTJIphyWPtw7ygVVqLSYEO0l78xa6pr6ND/9Q+ocpFuKR2o5H/xGF16TzBmX ds6GhMN+Ba2rdqB1hcZmY+qN7Phdwc9tBN/fI+KTHbRDK/VlX2NIh6K1+0tpolM0Xa vrq3xwU4L0ABEf2kLgRQZfPHwv6tChgD9D93UccHweBCXKWWjuzHbqCGU+k3vmc+NN nzyF6TDMo9aww== Received: from [192.168.1.218] (pool-100-2-116-133.nycmny.fios.verizon.net [100.2.116.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by bali.collaboradmins.com (Postfix) with ESMTPSA id 3705817E362C; Fri, 18 Oct 2024 17:19:07 +0200 (CEST) From: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Date: Fri, 18 Oct 2024 11:19:02 -0400 Subject: [PATCH v2 1/2] arm64: dts: mediatek: mt8188: Add ethernet node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241018-genio700-eth-v2-1-f3c73b85507b@collabora.com> References: <20241018-genio700-eth-v2-0-f3c73b85507b@collabora.com> In-Reply-To: <20241018-genio700-eth-v2-0-f3c73b85507b@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Richard Cochran Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org, Andrew Lunn , =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= , Jianguo Zhang , Macpaul Lin , Hsuan-Yu Lin X-Mailer: b4 0.14.2 Describe the ethernet present on the MT8188. Signed-off-by: Jianguo Zhang Signed-off-by: Macpaul Lin Signed-off-by: Hsuan-Yu Lin [Cleaned up to pass dtbs_check, follow DTS style guidelines, removed hardcoded mac address and split between mt8188 and genio700 commits, and addressed further feedback from the mailing list] Signed-off-by: N=C3=ADcolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 97 ++++++++++++++++++++++++++++= ++++ 1 file changed, 97 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts= /mediatek/mt8188.dtsi index b493207a1b688dba51bf5e0e469349263f54ca94..d2795bba15ecd4e9359721b1c61= cd4ae4a2a0a71 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -1647,6 +1647,103 @@ spi5: spi@11019000 { status =3D "disabled"; }; =20 + eth: ethernet@11021000 { + compatible =3D "mediatek,mt8188-gmac", "mediatek,mt8195-gmac", + "snps,dwmac-5.10a"; + reg =3D <0 0x11021000 0 0x4000>; + interrupts =3D ; + interrupt-names =3D "macirq"; + clocks =3D <&pericfg_ao CLK_PERI_AO_ETHERNET>, + <&pericfg_ao CLK_PERI_AO_ETHERNET_BUS>, + <&topckgen CLK_TOP_SNPS_ETH_250M>, + <&topckgen CLK_TOP_SNPS_ETH_62P4M_PTP>, + <&topckgen CLK_TOP_SNPS_ETH_50M_RMII>, + <&pericfg_ao CLK_PERI_AO_ETHERNET_MAC>; + clock-names =3D "axi", "apb", "mac_main", "ptp_ref", + "rmii_internal", "mac_cg"; + assigned-clocks =3D <&topckgen CLK_TOP_SNPS_ETH_250M>, + <&topckgen CLK_TOP_SNPS_ETH_62P4M_PTP>, + <&topckgen CLK_TOP_SNPS_ETH_50M_RMII>; + assigned-clock-parents =3D <&topckgen CLK_TOP_ETHPLL_D2>, + <&topckgen CLK_TOP_ETHPLL_D8>, + <&topckgen CLK_TOP_ETHPLL_D10>; + power-domains =3D <&spm MT8188_POWER_DOMAIN_ETHER>; + mediatek,pericfg =3D <&infracfg_ao>; + snps,axi-config =3D <&stmmac_axi_setup>; + snps,mtl-rx-config =3D <&mtl_rx_setup>; + snps,mtl-tx-config =3D <&mtl_tx_setup>; + snps,txpbl =3D <16>; + snps,rxpbl =3D <16>; + snps,clk-csr =3D <0>; + status =3D "disabled"; + + eth_mdio: mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + stmmac_axi_setup: stmmac-axi-config { + snps,blen =3D <0 0 0 0 16 8 4>; + snps,rd_osr_lmt =3D <0x7>; + snps,wr_osr_lmt =3D <0x7>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use =3D <4>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel =3D <0x0>; + }; + + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel =3D <0x0>; + }; + + queue2 { + snps,dcb-algorithm; + snps,map-to-dma-channel =3D <0x0>; + }; + + queue3 { + snps,dcb-algorithm; + snps,map-to-dma-channel =3D <0x0>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use =3D <4>; + snps,tx-sched-wrr; + + queue0 { + snps,dcb-algorithm; + snps,priority =3D <0x0>; + snps,weight =3D <0x10>; + }; + + queue1 { + snps,dcb-algorithm; + snps,priority =3D <0x1>; + snps,weight =3D <0x11>; + }; + + queue2 { + snps,dcb-algorithm; + snps,priority =3D <0x2>; + snps,weight =3D <0x12>; + }; + + queue3 { + snps,dcb-algorithm; + snps,priority =3D <0x3>; + snps,weight =3D <0x13>; + }; + }; + }; + xhci1: usb@11200000 { compatible =3D "mediatek,mt8188-xhci", "mediatek,mtk-xhci"; reg =3D <0 0x11200000 0 0x1000>, --=20 2.47.0 From nobody Tue Nov 26 09:36:46 2024 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F4441FF60E; Fri, 18 Oct 2024 15:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729264761; cv=none; b=db6ogyMNxbIlwlyXuePFTZAAFOqpfjpJOseGflYHDKWnbsckBoq9wGY2er0maEy2qyEV/1IcqDW3N0bQ4NjOpjdB3nUTuAwni+cE+wU+uu8uGeh0MQV6p7McQgYdWZNNMk2Tqgdo9WWHOOfkXNgeT+uv6QOddePaTywSjHLkaAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729264761; c=relaxed/simple; bh=SxTw5Ce/pOnrjKwvBcbYJ7lzE+rssP9CUicVkJ98jZQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GEtmAMa/PceNxjVZ1e/5GLdb11lIDIhOL91Ht4SCBBTGEhs31iaffXORDKM2i57mSV6epdoHz01Jgo9LOFF5cIzjwXCptvSabeDmJxvspQ8464is65VypvJdt7V0Le5/iMoA3OOsi0L1YiXuvlv1L3NFtfLGussXsB0pxBTrtS0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=I/Q1zbdJ; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="I/Q1zbdJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1729264752; bh=SxTw5Ce/pOnrjKwvBcbYJ7lzE+rssP9CUicVkJ98jZQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=I/Q1zbdJ8AWzIFGD0LOOQFgW6ip2mU0szB6ZlEsOCRooFwWD5f2USaSlh6+s4RJYd p8oomaAEBujBAbPDsLqMoPPTLD3QCx2+rb9e7gZX6xoH49E/HyvCq76sA63FO28kwf KKFCyWfFYLtXi+BJw6fqpdemBEIYZ68E/IaqBFeJqwTpilMjypnG7csikHSeQldDzJ VVTEtTx4PMubtB+KRV6bHIml1JPIiQu7a1CtBZGhn7H8LVsFJS81vg+s0LaQb8YFf1 z23nrIyaJm5EesCtsZ58Ds86Sd7Z8xjCStq6g6ccneKjyGiDbmzJjPeVTlynMAzBss 1G3AT+i2JeOmw== Received: from [192.168.1.218] (pool-100-2-116-133.nycmny.fios.verizon.net [100.2.116.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by bali.collaboradmins.com (Postfix) with ESMTPSA id 2E0FE17E3630; Fri, 18 Oct 2024 17:19:09 +0200 (CEST) From: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Date: Fri, 18 Oct 2024 11:19:03 -0400 Subject: [PATCH v2 2/2] arm64: dts: mediatek: mt8390-genio-700-evk: Enable ethernet Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241018-genio700-eth-v2-2-f3c73b85507b@collabora.com> References: <20241018-genio700-eth-v2-0-f3c73b85507b@collabora.com> In-Reply-To: <20241018-genio700-eth-v2-0-f3c73b85507b@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Richard Cochran Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org, Andrew Lunn , =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= , Jianguo Zhang , Macpaul Lin , Hsuan-Yu Lin , Pablo Sun , fanyi zhang X-Mailer: b4 0.14.2 Enable ethernet on the Genio 700 EVK board. It has been tested to work with speeds up to 1000Mbps. Signed-off-by: Jianguo Zhang Signed-off-by: Macpaul Lin Signed-off-by: Hsuan-Yu Lin Signed-off-by: Pablo Sun Signed-off-by: fanyi zhang [Cleaned up to pass dtbs_check, follow DTS style guidelines, and split between mt8188 and genio700 commits, and addressed further feedback from the mailing list] Signed-off-by: N=C3=ADcolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- .../arm64/boot/dts/mediatek/mt8390-genio-700-evk.dts | 20 ++++++++++++++++= ++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-700-evk.dts b/arch/a= rm64/boot/dts/mediatek/mt8390-genio-700-evk.dts index 0a6c9871b41e5f913740e68853aea78bc33d02aa..a063c7504cce08707a308b72559= f2425eee515e1 100644 --- a/arch/arm64/boot/dts/mediatek/mt8390-genio-700-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-700-evk.dts @@ -24,6 +24,7 @@ / { =20 aliases { serial0 =3D &uart0; + ethernet0 =3D ð }; =20 chosen { @@ -845,6 +846,25 @@ pins-wifi-enable { }; }; =20 +ð { + phy-mode =3D"rgmii-id"; + phy-handle =3D <ðernet_phy0>; + pinctrl-names =3D "default", "sleep"; + pinctrl-0 =3D <ð_default_pins>; + pinctrl-1 =3D <ð_sleep_pins>; + mediatek,mac-wol; + snps,reset-gpio =3D <&pio 147 GPIO_ACTIVE_HIGH>; + snps,reset-delays-us =3D <0 10000 10000>; + status =3D "okay"; +}; + +ð_mdio { + ethernet_phy0: ethernet-phy@1 { + compatible =3D "ethernet-phy-id001c.c916"; + reg =3D <0x1>; + }; +}; + &pmic { interrupt-parent =3D <&pio>; interrupts =3D <222 IRQ_TYPE_LEVEL_HIGH>; --=20 2.47.0