Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1458928rwb; Thu, 19 Jan 2023 10:54:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXvbCsAAFi3Pb5DuWtigy7A6Y3wLbKN67LQ+c1suLYA1OSFMvumKXCLoz2xRqoPqRZ1eK2RS X-Received: by 2002:a17:90b:1184:b0:213:8550:2dd5 with SMTP id gk4-20020a17090b118400b0021385502dd5mr34849526pjb.43.1674154456180; Thu, 19 Jan 2023 10:54:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674154456; cv=none; d=google.com; s=arc-20160816; b=bdyqx3tan4pj0RC40HplvqSBLfciKvwRFdluuy5RTbHXdPLCJ21aq1+KbN8GatUmoG sHWp34aBZE3dhho7FdsMiACYe0cmEiXZ22pR/NXELhCrgDjrrS0IaBskaeUv1qsEl63r CBxl8xmbMJX94AFZO2EVaBB36ZNJVhkouMYba/Hzuh2NlUCxkdgICsFgjpH/krMxTA+F NOLZKYQxwkTWLXqI0QU9KGQFKcdMksRsc9acXi5kPS5FqUwhqAR1SfHIvQ2eCM8vKIYY Wut5u/LF0VKF9cMFI5/qZ166YfARfrxSFmjfs6db/8vIXfffuR41lD3Dph70GOUbksny w79w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=oHH+KmVkm4uaS5su6DhQGdf280FMF9BCxat013P5oGQ=; b=JspRIuQ0JK6t7PY9I6bbD190AKIUpgZfclVp+O6/MplZO1qSCiV/02Es77dbOy0Idw PVyxvnE3OFquQsGghC2J6I6UU/6SDwUMX5jzeaNa6EhfJqnTTcVhh0W8uOhMi7KpVMCw zRpwugzL/PG0UjGzGDc0Z5NEOl1lB/0qTNsptNBpOX3HTPSZPIKaX9nY0jBoP5NujQ/6 vX10WSkIiyMJhEL5FY7byJjnuQFBmyHOXxIVpuTj8ugedjpcxhcCOzu77S+XdC39Dn7o qaJ5ghVdtb0fhBqraJkGUU0Yk0cH2sdwNgyfV5mCV3BxoJ6ZDWNWUMpIyuB2EvIGJGzG n5+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GqKp2vOV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a17090a970600b00225cb856740si5805615pjo.59.2023.01.19.10.54.10; Thu, 19 Jan 2023 10:54:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GqKp2vOV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbjASSUP (ORCPT + 45 others); Thu, 19 Jan 2023 13:20:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjASSUA (ORCPT ); Thu, 19 Jan 2023 13:20:00 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F171449F; Thu, 19 Jan 2023 10:19:58 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id f12-20020a7bc8cc000000b003daf6b2f9b9so4159590wml.3; Thu, 19 Jan 2023 10:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oHH+KmVkm4uaS5su6DhQGdf280FMF9BCxat013P5oGQ=; b=GqKp2vOVQlufREuR+mxKuUX/qXUZVhR/2fU4TQRP7zRuP3onF9SvxcIZUU12qbKKO3 GA74CUGvcgfj6xg9d0591RN7dfxwN3w4OPiF9QfYA/Fw4pL64+hAXaHEGkCtBr/nsHZ/ Ta7SSWWR89aEi1FET0Hx9aJPYmJmFGAedLZKagiMBQ5+tZcMP6WFARpaGl3pAQAoAnO3 FDJVcuUvZxnnBxSsfze+rlI0Wpe4dIqXmHjPYSUh6EooRGvn/QDZ1pEXoGwi0l2z5zPo cAmbd+2ubz9AZW7mbV4O3DqfDoIXPKkCGf9foK+oJZ/Oe/3hM2+FeStvV+iIhkqCcEfZ UNww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oHH+KmVkm4uaS5su6DhQGdf280FMF9BCxat013P5oGQ=; b=0yfpIhrIXWCeNMGsyzan+BFOMBcTDF0hAWAlzSlqykx9QRLLhADlgJ7poMRAYmSLsp AbEWU0SAS4S6vrz0h1+8IUwFdDErsWX4vJbtierN/kqzkLBCYRxCw62LSHbvLrev5FPw 6DElSNSa5tU/ELk9UXBCLXOkSWYpA7P88rcC3IaKZ3lkDu8HclHNju5WcComZFfz4rni +JqEOfqcBXqd5mqBAqJ0F0oG/yj2ju+A1dUGz84plrNWiItA7Ob50cS95dIov1JQSYKU N6DAQ/WdYYlIN7gUEhdfcFv/ivvHa5wAewF7UaWroBziMfcloKGX9cH1uPy0Ocb7d+Kx +6Lg== X-Gm-Message-State: AFqh2kp6wi0/5bGYSKAxM73tPtje8e0b+7KYKrKMrffVt8lNmwAEJ791 ikxIbBaBMzK1Yr7xLfQmQ5k= X-Received: by 2002:a05:600c:510d:b0:3da:f719:50cd with SMTP id o13-20020a05600c510d00b003daf71950cdmr10826371wms.18.1674152397010; Thu, 19 Jan 2023 10:19:57 -0800 (PST) Received: from [192.168.2.177] ([207.188.167.132]) by smtp.gmail.com with ESMTPSA id s7-20020a1cf207000000b003db11dfc687sm5464787wmc.36.2023.01.19.10.19.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Jan 2023 10:19:56 -0800 (PST) Message-ID: Date: Thu, 19 Jan 2023 19:19:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v8 2/2] arm64: dts: mt8195: Add Ethernet controller Content-Language: en-US To: Biao Huang , Andrew Lunn , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, macpaul.lin@mediatek.com, netdev@vger.kernel.org References: <20230105010712.10116-1-biao.huang@mediatek.com> <20230105010712.10116-3-biao.huang@mediatek.com> From: Matthias Brugger In-Reply-To: <20230105010712.10116-3-biao.huang@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/01/2023 02:07, Biao Huang wrote: > Add Ethernet controller node for mt8195. > > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: Andrew Lunn > Signed-off-by: Biao Huang Applied, thanks! > --- > arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 77 ++++++++++++++++ > arch/arm64/boot/dts/mediatek/mt8195.dtsi | 92 ++++++++++++++++++++ > 2 files changed, 169 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > index 4fbd99eb496a..6a48c135f0da 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > @@ -78,6 +78,23 @@ optee_reserved: optee@43200000 { > }; > }; > > +ð { > + phy-mode ="rgmii-id"; > + phy-handle = <ðernet_phy0>; > + snps,reset-gpio = <&pio 93 GPIO_ACTIVE_HIGH>; > + snps,reset-delays-us = <0 10000 80000>; > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <ð_default_pins>; > + pinctrl-1 = <ð_sleep_pins>; > + status = "okay"; > + > + mdio { > + ethernet_phy0: ethernet-phy@1 { > + reg = <0x1>; > + }; > + }; > +}; > + > &i2c6 { > clock-frequency = <400000>; > pinctrl-0 = <&i2c6_pins>; > @@ -258,6 +275,66 @@ &mt6359_vsram_others_ldo_reg { > }; > > &pio { > + eth_default_pins: eth-default-pins { > + pins-txd { > + pinmux = , > + , > + , > + ; > + drive-strength = ; > + }; > + pins-cc { > + pinmux = , > + , > + , > + ; > + drive-strength = ; > + }; > + pins-rxd { > + pinmux = , > + , > + , > + ; > + }; > + pins-mdio { > + pinmux = , > + ; > + input-enable; > + }; > + pins-power { > + pinmux = , > + ; > + output-high; > + }; > + }; > + > + eth_sleep_pins: eth-sleep-pins { > + pins-txd { > + pinmux = , > + , > + , > + ; > + }; > + pins-cc { > + pinmux = , > + , > + , > + ; > + }; > + pins-rxd { > + pinmux = , > + , > + , > + ; > + }; > + pins-mdio { > + pinmux = , > + ; > + input-disable; > + bias-disable; > + }; > + }; > + > gpio_keys_pins: gpio-keys-pins { > pins { > pinmux = ; > diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi > index 5d31536f4c48..28b3ebd145bf 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi > @@ -1046,6 +1046,98 @@ spis1: spi@1101e000 { > status = "disabled"; > }; > > + eth: ethernet@11021000 { > + compatible = "mediatek,mt8195-gmac", "snps,dwmac-5.10a"; > + reg = <0 0x11021000 0 0x4000>; > + interrupts = ; > + interrupt-names = "macirq"; > + clock-names = "axi", > + "apb", > + "mac_main", > + "ptp_ref", > + "rmii_internal", > + "mac_cg"; > + clocks = <&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>; > + 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"; > + > + mdio { > + compatible = "snps,dwmac-mdio"; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > + > + stmmac_axi_setup: stmmac-axi-config { > + snps,wr_osr_lmt = <0x7>; > + snps,rd_osr_lmt = <0x7>; > + snps,blen = <0 0 0 0 16 8 4>; > + }; > + > + mtl_rx_setup: rx-queues-config { > + snps,rx-queues-to-use = <4>; > + snps,rx-sched-sp; > + queue0 { > + snps,dcb-algorithm; > + snps,map-to-dma-channel = <0x0>; > + }; > + queue1 { > + snps,dcb-algorithm; > + snps,map-to-dma-channel = <0x0>; > + }; > + queue2 { > + snps,dcb-algorithm; > + snps,map-to-dma-channel = <0x0>; > + }; > + queue3 { > + snps,dcb-algorithm; > + snps,map-to-dma-channel = <0x0>; > + }; > + }; > + > + mtl_tx_setup: tx-queues-config { > + snps,tx-queues-to-use = <4>; > + snps,tx-sched-wrr; > + queue0 { > + snps,weight = <0x10>; > + snps,dcb-algorithm; > + snps,priority = <0x0>; > + }; > + queue1 { > + snps,weight = <0x11>; > + snps,dcb-algorithm; > + snps,priority = <0x1>; > + }; > + queue2 { > + snps,weight = <0x12>; > + snps,dcb-algorithm; > + snps,priority = <0x2>; > + }; > + queue3 { > + snps,weight = <0x13>; > + snps,dcb-algorithm; > + snps,priority = <0x3>; > + }; > + }; > + }; > + > xhci0: usb@11200000 { > compatible = "mediatek,mt8195-xhci", > "mediatek,mtk-xhci";