Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5529655rwi; Mon, 17 Oct 2022 23:47:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yZu9aaeUgPS1kPUzOnj58sFPlVV7c4cD9LUX07lKnFemCEXY0Ee3ycl/n+XM/cmq9RTTP X-Received: by 2002:a05:6402:280a:b0:45d:19e8:c7ad with SMTP id h10-20020a056402280a00b0045d19e8c7admr1250067ede.44.1666075645676; Mon, 17 Oct 2022 23:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666075645; cv=none; d=google.com; s=arc-20160816; b=B3H+xSS5H6Q1RcL5jeTxdzfXCHvHDwO6/UBT/BNjnrxeHQd7YBAFrFy9cDPikLdt84 CEXZ/PCuYYWohFFVxkiaruKljfX1j4WnmFfUn9nWD81Cy1n2luwJRiIB0gMvoWCNMgi1 40wPgcOfBPDGIMJtx+FNTryQvih7vacKjk/eYxdImzdUZCjHN9vuPj/YU5NDqs7SD81/ FzqORqXZduwC2X1NC1lkUuDQ1chdo6+8Fn97HJ5azcdf151oK8VbIfXj2au9dD1uclt5 91wwdylLrIGUz6iLygu55LksQJGrVrcEg56Cd3FASdfJVNFcGO/2rCbvRwEVlIglE2Tr FUVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=eM+soasMJzB6uxzurzAYBD4NNpjZ9qTL1sEyE6FK3J8=; b=XjARCZzYaKTTfkq9pcW/nh0GtYuaUuzIDvwmSgu+0RyQGimhZadVdMUYRLCBWtkUpr /ZbEhDcO/AZm+riDtzuoSk7p+M2iSrN1dQlvNUd5hSOvqviZreUezj3NyF4zel883qC2 8NPDM64KsSgzuX/O8NxP+n5Qa+8tr3NPy+lLykYf1pb1ZKU5qbxbYX0zYUMB33ahIeUH +Cd8ci/d/gvJBGb2YY8AHZDKbBGTukE8xEztvusuxv8VaoZ8wQmXVN9Lwm87WOBNJlQG EIo3pvYhkd9VxPQ6Xqsmd7CI1afh5Z7JsPB/yIZhYyR6fPUIA5CZ+a5ORh+TPFhfK0mh p5+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=WfOuPQb2; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho36-20020a1709070ea400b007919f213511si269257ejc.951.2022.10.17.23.47.00; Mon, 17 Oct 2022 23:47:25 -0700 (PDT) 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=@mediatek.com header.s=dk header.b=WfOuPQb2; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229753AbiJRGiK (ORCPT + 99 others); Tue, 18 Oct 2022 02:38:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229687AbiJRGiJ (ORCPT ); Tue, 18 Oct 2022 02:38:09 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B81E08A7DC; Mon, 17 Oct 2022 23:38:01 -0700 (PDT) X-UUID: 368b31d11a3a4dba8c4129cb21b9e595-20221018 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=eM+soasMJzB6uxzurzAYBD4NNpjZ9qTL1sEyE6FK3J8=; b=WfOuPQb2y10opBmhNbzJD5LV31CgOox0UNaRcXkVQsg8p7K9Cu4C3lPUri1c47FM5KXXk6GwHxmKZwipysdb0E2zcf3vrbR/5qzw6JqqB1pXQ/oKV4NrgilEXcimxTAtwKVio+q+uC0vA9U7Tp4iam4Aqr8Y8RbuQG2NQGm2oBk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:6cf3a249-a9b5-42b6-b1b9-1618c24b7655,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:8f0921a4-ebb2-41a8-a87c-97702aaf2e20,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 368b31d11a3a4dba8c4129cb21b9e595-20221018 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1704619019; Tue, 18 Oct 2022 14:37:56 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Tue, 18 Oct 2022 14:37:54 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 18 Oct 2022 14:37:54 +0800 Message-ID: Subject: Re: [PATCH] arm64: dts: mt8195: Add Ethernet controller From: Biao Huang To: Krzysztof Kozlowski , Rob Herring , Krzysztof Kozlowski , Matthias Brugger CC: , , , , Date: Tue, 18 Oct 2022 14:37:54 +0800 In-Reply-To: References: <20221017095834.7675-1-biao.huang@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY 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 Dear Krzysztof, Thanks for your comments! On Mon, 2022-10-17 at 22:01 -0400, Krzysztof Kozlowski wrote: > On 17/10/2022 05:58, Biao Huang wrote: > > Add Ethernet controller node for mt8195. > > > > Signed-off-by: Biao Huang > > --- > > arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 88 > > ++++++++++++++++++++ > > arch/arm64/boot/dts/mediatek/mt8195.dtsi | 87 > > +++++++++++++++++++ > > 2 files changed, 175 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > > b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > > index 4fbd99eb496a..02e04f82a4ae 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > > +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts > > @@ -258,6 +258,72 @@ &mt6359_vsram_others_ldo_reg { > > }; > > > > &pio { > > + eth_default: eth_default { > > No underscores in node names. Please also be sure your patch does not > bring new warnings with `dtbs_check` (lack of suffix above could mean > it > brings...) OK, I'll fix the underscores issue in next send. As to "lack of suffix" issue, do you mean I should write it like: eth-default: eth-default@0 { ... } If yes, other nodes in current file don't have such suffix. e.g. gpio_keys_pins: gpio-keys-pins Should I keep unified style with other nodes? > > > + txd_pins { > > No underscores OK, will fix in next send. > > > + pinmux = , > > + , > > + , > > + ; > > + drive-strength = ; > > + }; > > + cc_pins { > > Ditto... and so on. OK, will fix in next send. > > > + pinmux = , > > + , > > + , > > + ; > > + drive-strength = ; > > + }; > > + rxd_pins { > > + pinmux = , > > + , > > + , > > + ; > > + }; > > + mdio_pins { > > + pinmux = , > > + ; > > + input-enable; > > + }; > > + power_pins { > > + pinmux = , > > + ; > > + output-high; > > + }; > > + }; > > + > > + eth_sleep: eth_sleep { > > + txd_pins { > > + pinmux = , > > + , > > + , > > + ; > > + }; > > + cc_pins { > > + pinmux = , > > + , > > + , > > + ; > > + }; > > + rxd_pins { > > + pinmux = , > > + , > > + , > > + ; > > + }; > > + mdio_pins { > > + pinmux = , > > + ; > > + input-disable; > > + bias-disable; > > + }; > > + power_pins { > > + pinmux = , > > + ; > > + input-disable; > > + bias-disable; > > + }; > > + }; > > + > > gpio_keys_pins: gpio-keys-pins { > > pins { > > pinmux = ; > > @@ -434,6 +500,28 @@ &xhci0 { > > status = "okay"; > > }; > > > > +ð { > > + phy-mode ="rgmii-rxid"; > > + phy-handle = <ð_phy0>; > > + snps,reset-gpio = <&pio 93 GPIO_ACTIVE_HIGH>; > > + snps,reset-delays-us = <0 10000 10000>; > > + mediatek,tx-delay-ps = <2030>; > > + pinctrl-names = "default", "sleep"; > > + pinctrl-0 = <ð_default>; > > + pinctrl-1 = <ð_sleep>; > > + status = "okay"; > > + > > + mdio { > > + compatible = "snps,dwmac-mdio"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + eth_phy0: eth_phy0@1 { > > ethernet-phy@1 OK, will modify in next send. > > > + compatible = "ethernet-phy-id001c.c916"; > > + reg = <0x1>; > > + }; > > + }; > > +}; > > + > > &xhci1 { > > vusb33-supply = <&mt6359_vusb_ldo_reg>; > > status = "okay"; > > diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi > > b/arch/arm64/boot/dts/mediatek/mt8195.dtsi > > index 905d1a90b406..aa1fcc3b9cb6 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi > > +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi > > @@ -1042,6 +1042,93 @@ spis1: spi@1101e000 { > > status = "disabled"; > > }; > > > > + 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>; > > + }; > > + }; > > + > > + eth: ethernet@11021000 { > > + compatible = "mediatek,mt8195-gmac", > > "snps,dwmac-5.10a"; > > + reg = <0 0x11021000 0 0x4000>; > > + interrupts = > 0>; > > + interrupt-names = "macirq"; > > + mac-address = [00 55 7b b5 7d f7]; > > How is this property of a SoC? Are you saying now that all MT8195 > SoCs > have the same MAC address? The mac-address here is taken as a default mac address in eth driver rather than a randome one. Actually, there will be a tool to customize eth mac address (e.g through "ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx"), so every MT8195 SoCs will get their specified mac address in real product. > > Best regards, > Krzysztof > Best Regards! Biao