From patchwork Tue Apr 26 13:40:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827208 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E50E2C433EF for ; Tue, 26 Apr 2022 13:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OISVtpQdJwXw9SRc0/7pEcw0tsOW4ljXKAMzHzxjrTE=; b=mR9TO7vuM+nxdh lTVKtiiACVFZlXf9Rmt7+mNexWkfF0n+c5l8dJfjnR5inJG8ShPXidfZN4+Wu7KUKGHy80jmsi+jE ZQDZ9YdZu2LqljctdsQU/qGfMnmIllGGo0QsXn7ZnqLQ0R8YBMGiRv5ukfWAkZm2MF5+MbhEkpOiF tgEElFF3+oazkW6459QkGH/HiRplEOgzCBr+KK3+/tNBwSsXQE5iHBSarizi21R7PC0J1Nl4p6rk5 JUc9dIxvpB8orsqZB7HRA/9/LkNFv0XYwtv2nGZPzJK+lo9+iD2fVTXSF/GuarOPyIhOY+1G/wjAE zgcDGyxa94jajsTx9iCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLSh-00Egy2-7y; Tue, 26 Apr 2022 13:42:39 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRu-00EgVi-FK for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:41:54 +0000 Received: by mail-wm1-x336.google.com with SMTP id m62so594844wme.5 for ; Tue, 26 Apr 2022 06:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xXQbkkr1OF+Ro+dWXJqCAX6WABW7vUg3V8zjyeYbcCY=; b=x6zFqf+/EmVz0TvduZBvJRSfkSVefrxagUAWXYZ0+kEwhEkh+cUuE6WBr5+Xi11Weo XharkEOrZUMOBUft5Pv+xdS/UaSk/wc614P6T+6Cb/KTf7l0/qDb6pR4M+CoiEBiVD6d 4JBsW0uyko9MjgeHfrkjb0WX6urHDMz5KD7Z1P5fL5srgFIwtNGepM8/NXuSRm6nijje ebuZqO1/tuUI/CfGb1zqRXbYJUkKNndqsC+WdAzORXjojkONvwblAOxJeIUHTj6L9QHc /Sd9AI+osICH/ENT85KECJkgchRVTqu7Jbz39RY8FINgdGBSVGEGH27CWRLxSd4msMcE IUpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xXQbkkr1OF+Ro+dWXJqCAX6WABW7vUg3V8zjyeYbcCY=; b=Gf5aJc5yW9WF/k68YHpIxfhhe5L5hc1+IxCekOnYlkvNg44pCFuBH5nA1AcJTfgrHq uERNLSIiKfSmi4P2Rquua5UwyXse/gWc5PY685iZgXUiYPCa1Du7dXuNUHGuA2Ou5b/z Xs2v08ZW/IaqMsnMyQCPXuXwKpqlUQ11I+MEqhxr/YsCjed7eykLoBUXZq6GyjTlcrM8 UE5B4u0V87ICcuBrYFs3x7EImGt/58qI+YwJ2YZACbUeOCt3oDUUp3ngLkiTU8D0+MVy IMjNIU7eDvL9Oj7q8WE4mfA/dh86SnsE+5aE4zNvTdvm+cqe4wYo6e/dr7yEBVpjPbYD yf0g== X-Gm-Message-State: AOAM530KJW+KKW4T4kpPEeDKENc4sKjvUyosgLGMtVHTFL+YlgEfc6rP rEw5IzYNJD80/Ue+FAiJWaBOJA== X-Google-Smtp-Source: ABdhPJwjCz5bSKe6Ekot1VUMdiUvbf6MQuP6zLDwMQtDT48tOMws/2TXKGP3aFcjlclS3xlYidSiZQ== X-Received: by 2002:a7b:c341:0:b0:37b:c619:c9f4 with SMTP id l1-20020a7bc341000000b0037bc619c9f4mr30559500wmj.38.1650980507577; Tue, 26 Apr 2022 06:41:47 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:47 -0700 (PDT) From: Fabien Parent To: Chunfeng Yun , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dt-bindings: usb: mediatek, mtu3: add binding for MT8195 SoC Date: Tue, 26 Apr 2022 15:40:59 +0200 Message-Id: <20220426134106.242353-2-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064150_543795_F0B7AB51 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add binding to support the mtu3 driver on the MT8195 SoC. Signed-off-by: Fabien Parent Reviewed-by: Macpaul Lin Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml index df766f8de872..37b02a841dc4 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml @@ -25,6 +25,7 @@ properties: - mediatek,mt8173-mtu3 - mediatek,mt8183-mtu3 - mediatek,mt8192-mtu3 + - mediatek,mt8195-mtu3 - const: mediatek,mtu3 reg: From patchwork Tue Apr 26 13:41:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED3B3C433F5 for ; Tue, 26 Apr 2022 13:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t7Ob5nlpW3GMAE4sHDUFebVU+GGj9kXAPeGF/J27bFY=; b=s6U8B1D/cAVvde BXTkbMDLE/oqpbI51lDWRAroFfaO8Q1AE1SrcyF1SfgULdfefjZESEs3GJkHVUzrp3vK9rNapzAZL ig4tbx22g9rmzhpwq76DtPjPBkJGRacLppgjD+6sEY5caCvEBK6jjM1SJXQ8kXFOZI0n/AjGleFME ODwt47zd2SHMJ0UiqFzKeRLaGk2CHG+rvCtQ/rmHEYKdgKNX62K1AiEUtI3QT9GJIYzU/p4ZYVDnO u8pZd+KilM//Lx2rHTCRLiUn+kGJ6LTNxl2WFKTZhUDt5PpLoJzfNPplYCKq6iqFzB7AhP7MF1QHz 0TCv6c5FM7EUklPRVACg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLTY-00EhKn-6e; Tue, 26 Apr 2022 13:43:32 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRw-00EgWC-95 for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:41:56 +0000 Received: by mail-wr1-x42f.google.com with SMTP id t6so22104499wra.4 for ; Tue, 26 Apr 2022 06:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4mq0VAwh5UJJ1ySY2hnGptoqpajh6aCIUVFARZ+YbYg=; b=qv35mZRTWy4Yq+LLwggMnPTsMMY+u2VZ9Z3bl/eMJNp9lafpx7aMAbRUxDUw/a/MvY KNoi+y7rF8RSxvM3fW+d8lblArckFeqPQBo/9kQ+RcmU0WsWdkqEwzsUN3yTZWuxzAPv NjVvlLJ3lB2yAKHHGtSMzpZV1qb+45EwL9jG6QGdCwHhjJ5rHEGiyzKX56NESjJX/FAy q/+VRaz+LZke0pVFwmTtYvkn/iekuRsx/T3bT+Sg6G/Ju/kUKGQ6pfW49dPrgwqHLuCb ZTw2mVihfsGqWc+0LtnIvffEcSkkyoKQup8K+04aTHviR9V+iMZASWEBPxIdYYIftb5A XVYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4mq0VAwh5UJJ1ySY2hnGptoqpajh6aCIUVFARZ+YbYg=; b=uXvWWzUI9XiWOr8p6VKGNqEs8r0PPsgqzXOj85uRGed0107yT2h1h8aD4+1X9iz5qF DWEqECmzkM2jV+g0wmX4T/MDjsYmUR9Uuft11h7VVHLuOOQf8oER3ZWNcZY3yPc4jrFK 4b8r1mCLEzvQIvIccv7hRKJwy07L9lCvbOnRr3bUZAQUUZE7NjZfzJHgXu7yjoWTukjH T4axfTUagiTZF4XPj2r5paWhX5fOumiCtc8Q9faVp1Zj7DHkc53FErRJOuo7VggcnbiJ RTMGuAZxEjyMRoC53PLkuTtrw2+owTZm8FBwyogVMY1y5DMOxi7IsMZB+L2ZIPAOhghg zZJw== X-Gm-Message-State: AOAM5321UJkiK2UBlKbEAvhsv4HtzG5FcVJVi8ia0hO/Rs0rdriD9T2L PJ6flC8ecM22tCSgSPkFSBU0PQ== X-Google-Smtp-Source: ABdhPJy18Pi1+TBqaTQhsPwZii6Y2cMmIKGZUbFd1DjvY0HMKv+nke8BfTjEmK9o7Hhd1yxbiQfJxw== X-Received: by 2002:a5d:4747:0:b0:20a:c40b:1189 with SMTP id o7-20020a5d4747000000b0020ac40b1189mr17870752wrs.509.1650980509001; Tue, 26 Apr 2022 06:41:49 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:48 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] arm64: dts: mediatek: mt8195: add ssusb support Date: Tue, 26 Apr 2022 15:41:00 +0200 Message-Id: <20220426134106.242353-3-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064152_356531_9D05193E X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add SSUSB support for MT8195. In order to not break any boards, this commit also enable SSUSB for every board that has xhci0 enabled. The boards are configured as host-only, in order to not change the current behavior of the interface. Signed-off-by: Fabien Parent --- arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 5 +++ arch/arm64/boot/dts/mediatek/mt8195-evb.dts | 5 +++ arch/arm64/boot/dts/mediatek/mt8195.dtsi | 37 ++++++++++++++------ 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts index 66037462263e..08cab3b3943b 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts @@ -402,6 +402,11 @@ &pmic { interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; }; +&ssusb { + dr_mode = "host"; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins>; diff --git a/arch/arm64/boot/dts/mediatek/mt8195-evb.dts b/arch/arm64/boot/dts/mediatek/mt8195-evb.dts index db25a515e420..d49ae8605e67 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-evb.dts @@ -138,6 +138,11 @@ pins { }; }; +&ssusb { + dr_mode = "host"; + status = "okay"; +}; + &u3phy0 { status="okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 2a525c1c74ef..aa05071a80b8 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -912,25 +912,40 @@ spis1: spi@1101e000 { status = "disabled"; }; - xhci0: usb@11200000 { - compatible = "mediatek,mt8195-xhci", - "mediatek,mtk-xhci"; - reg = <0 0x11200000 0 0x1000>, + ssusb: usb@11201000 { + compatible ="mediatek,mt8195-mtu3", "mediatek,mtu3"; + reg = <0 0x11201000 0 0x2dff>, <0 0x11203e00 0 0x0100>; reg-names = "mac", "ippc"; - interrupts = ; + interrupts = ; phys = <&u2port0 PHY_TYPE_USB2>, <&u3port0 PHY_TYPE_USB3>; - assigned-clocks = <&topckgen CLK_TOP_USB_TOP>, - <&topckgen CLK_TOP_SSUSB_XHCI>; - assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>, - <&topckgen CLK_TOP_UNIVPLL_D5_D4>; clocks = <&infracfg_ao CLK_INFRA_AO_SSUSB>, <&topckgen CLK_TOP_SSUSB_REF>, - <&apmixedsys CLK_APMIXED_USB1PLL>, <&infracfg_ao CLK_INFRA_AO_SSUSB_XHCI>; - clock-names = "sys_ck", "ref_ck", "mcu_ck", "xhci_ck"; + clock-names = "sys_ck", "ref_ck", "mcu_ck"; + #address-cells = <2>; + #size-cells = <2>; + ranges; status = "disabled"; + + xhci0: usb@11200000 { + compatible = "mediatek,mt8195-xhci", + "mediatek,mtk-xhci"; + reg = <0 0x11200000 0 0x1000>; + reg-names = "mac"; + interrupts = ; + assigned-clocks = <&topckgen CLK_TOP_USB_TOP>, + <&topckgen CLK_TOP_SSUSB_XHCI>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>, + <&topckgen CLK_TOP_UNIVPLL_D5_D4>; + clocks = <&infracfg_ao CLK_INFRA_AO_SSUSB>, + <&topckgen CLK_TOP_SSUSB_REF>, + <&apmixedsys CLK_APMIXED_USB1PLL>, + <&infracfg_ao CLK_INFRA_AO_SSUSB_XHCI>; + clock-names = "sys_ck", "ref_ck", "mcu_ck", "xhci_ck"; + status = "disabled"; + }; }; mmc0: mmc@11230000 { From patchwork Tue Apr 26 13:41:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AD97C433EF for ; Tue, 26 Apr 2022 13:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IKhABv22J/9gfiYoML2xnjHSCQuA63FT5GiZHLVSUhg=; b=aNv7o/7VYd9TOk bBAqZRHPoZJzD2zn4O8/pGMIHX5/8CrHId/clbJvkgkygf3S/YdJg8U+VW+jhFyHz7h8zD21oMLix YmKuy7lEl2oqMXF4fnvfBuR8MM8kH5lruuNBkaLFXzzdAF7Emb+WKxvP3b1uK5nEPLOZ3s/N9fs4y unSFBj93ra2u1DdqgegBWARCSLaBa+PCl7OztwVy/+LdAuhntvy5GMj0p5Eb9QUmhIwoj01BO2afe iJwAmvilPzDmzwg8PwPp7Ji5v+IDRIHLCEyQRs0PDVACuvsMFubTbeAynPZMr01fZtQlGxCNAanfi mIC099lwvhd0n74zdijg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLTb-00EhM4-4W; Tue, 26 Apr 2022 13:43:35 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRx-00EgY8-HH for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:41:56 +0000 Received: by mail-wr1-x42b.google.com with SMTP id j15so12288983wrb.2 for ; Tue, 26 Apr 2022 06:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2WiMjqWr2rsQkaBLMdtHZGm9iFmjCwz/X0cFtlbeMbU=; b=mMT97IDgEHYlbhiTTxwI72dtKJRNNtraEazEdhQ/1+YombRbDcfLnDCwnj54oiuFZM FovrX6lSuitpqUzu9jUJ7nsCKE/ZVtOBg/LFWmB33MskN2xoLOcCbAYUUHhBLf2bEVjt 8TsMe1h3/CgL0gRVqs8VWprUHUtA4OE/YQdHxfoIKwhQYdP6vg328RtAtADmSoYcFM8I i0PYbWuSXY8crl2h6fYDPA+CDIfDFhVFA5V6OXhMOhQWl2dX+npfWyC8xS+MjX0ONbRu w1Elkgp5YYWIaK1wiJypr/20J6ugzWkTVB43oXyomvH+CZbmIgEhpY7dTM5v0c+xDDud OQZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2WiMjqWr2rsQkaBLMdtHZGm9iFmjCwz/X0cFtlbeMbU=; b=rRuoVZF0GNGeAhtodg0bz/IIDQq3uEYpuCADDBB7pr557iuhBGez0yNmUyLhbB2lhL ezAVU87evYa3UHvGi5rDJSXDLjX72J2Pqv71m1EG2FWrK/cL8Crr217xDVUS/w+dHNe1 vK34BmPJCx0GBz5kcGzF3WA4/EuqhVXI7DlJfyf78m7gDvTw+J+c8+cqzOs2fDCywDRy ebJZgfs0kIOX6Idphqf4xr6354qdQZMDyYNBJ/tZuc5wHTUWt3aI1dnDSus5dCAKdgI9 ojER6RI9wDLY/N74GGy3Ra2I8SN6lufv2oFhR0BoSoqqU/8IQc7sH1iO14rVrTYFO0O/ qPgQ== X-Gm-Message-State: AOAM532Z8ujgTkaO9uxBbkZBpwEK5VSLGuxwEf8blTRnlJ6u6rJkFJ4b yWJfFR74BWwftF9Tl5akOkzZ/A== X-Google-Smtp-Source: ABdhPJw1ZH7IdVVddcYsXC8gaDPJgCy1xQQ7ICVPpYhMiOh4ni1tkFYXXnPGKsa/Iahi3/JTftqvng== X-Received: by 2002:a5d:620f:0:b0:20a:d560:9996 with SMTP id y15-20020a5d620f000000b0020ad5609996mr12288405wru.471.1650980510326; Tue, 26 Apr 2022 06:41:50 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:49 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Biao Huang , Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] arm64: dts: mediatek: mt8195: add ethernet device node Date: Tue, 26 Apr 2022 15:41:01 +0200 Message-Id: <20220426134106.242353-4-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064153_625494_3B877640 X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Biao Huang This commit adds device node for mt8195 ethernet. Signed-off-by: Biao Huang Signed-off-by: Fabien Parent Reviewed-by: Macpaul Lin --- This patch comes from https://lore.kernel.org/all/20211207015505.16746-7-biao.huang@mediatek.com/ The differences between that patch and this patch is that: * The EVB dts modification has been split into its own commit * The patch was rebased to fix merge conflict with the upstream mt8195.dtsi file * Re-ordered the node to be correctly sorted based on node address arch/arm64/boot/dts/mediatek/mt8195.dtsi | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index aa05071a80b8..a58641d1cab0 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -912,6 +912,76 @@ 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"; + mac-address = [00 55 7b b5 7d f7]; + 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>; + clk_csr = <0>; + 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 = <1>; + snps,rx-sched-sp; + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x0>; + snps,priority = <0x0>; + }; + }; + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <3>; + 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>; + }; + }; + }; + ssusb: usb@11201000 { compatible ="mediatek,mt8195-mtu3", "mediatek,mtu3"; reg = <0 0x11201000 0 0x2dff>, From patchwork Tue Apr 26 13:41:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827222 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 422D4C433F5 for ; Tue, 26 Apr 2022 13:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kPAc/qWy7WDF+OU62ZhHsIe0LSpUeImNXTQVaueOw3M=; b=oi/Gl7sT6ZQ9NG eM9qVAAlyFKImbTmal6L0frN9Th39Bs8U3SXKe62pEx4tCp+LLeFDoHCR1Wun9v3N/ogQrp+yInjH 8YRgbTsAhMJqElaJzdDIZ+SxIBmoLZnTCoYtLqRga1cEebQeuwiMyVmn0NZlndhfR9j7OXPUNdDnk xmebsoqI+7sG6wLtY4wYQlmevPOdrCQiWpYezTEGtXNFN49AXAqBkJRgFuWCdhvqFeioOUyWE56SX Pl6Os5wZ9Bq2qJ+t+wJsLo3gIFNMukxcOCngLl7v9pWWs5NAR4oYal/mVgPch1LhHWkUFVCidVrDy jL04LSkT3nyVtgOlt8wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLTz-00Ehaf-9t; Tue, 26 Apr 2022 13:43:59 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRz-00EgZ0-Fi for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:41:59 +0000 Received: by mail-wr1-x436.google.com with SMTP id v12so18723556wrv.10 for ; Tue, 26 Apr 2022 06:41:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ukJ87PJJQr6WdcFY9U3LOip92CMRk0OSZz5wfX1gBdA=; b=kDrmXa+2sq1U9qBMrPJIHx1jotVEcR5D8DKEmsoYwJTXjPNPSRpDulPjvcWztnPFu2 /dLv84homwh9Uhhqm7+xW2eZY0+Cy+GyNKnGRrACDhnMJLE79ZjBv25ni9Qbgb1P+6/A n3WEDDRKRcsStS6hWTAcGEwRUxmvVV9CqJXZa3Nth/Vjmlo5vPmJ9ZtDlaOPBYvBtsSV GVM17O6tMCHLlc89ZREHueAsj9aHBW0YiSoS8sVj5gzPfZdueg/vSIOY4IHKY5ouT4FH IZVzPCpH6zC4F52l+51ldnrcYRBjCkTm6jL1HvnWuj4HI8Tz+GjdLQog46RZ+kQ8Owvi pspw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ukJ87PJJQr6WdcFY9U3LOip92CMRk0OSZz5wfX1gBdA=; b=kkEOPGANVgeePi9dqxY3C+WDfJeWYXBux26XAkKvBg+Nhaz+LCisPp9WwAFo0rBEC5 OOJwW7YgJ4JwX5fm4W2QpiIEbY/fIxH4reu6DG+1TUuuitXpxSSdbzwiCe8UtewCA8oq rqM0uhD0CUrY2+3xOuj794FLATGLOmUVkiDgCtFGGfVvHTyNp3mIl3nv03u77ajnN2BH yySuL0vtUM2wfjn18hVa1ZXNYCdtRVKJ1VjkPzK1h3CSU7jzxZ9WK2gdyiYtIbsnwtUG 2KfTx8jbnfqjrWqF4prtUtIWwHqWjTpeijJUgIZfUWSxp7M5Fl6BhcczPiuTNeGd5kRv lebw== X-Gm-Message-State: AOAM5330E498T20J+fKmyAbwANq+lbd/a1pO2RcVgxQ9yH0ddOl267Eg 6bKMwIl+N/LPj49jHusQIIjtxQ== X-Google-Smtp-Source: ABdhPJyPVIr76v3m+QAnFXrUZyRfsJs85pAn0hlzBhRMa5PgGJw8PZlDVyZ0amQ+ifKJB0syMBrC5g== X-Received: by 2002:a05:6000:114d:b0:20a:d608:5e54 with SMTP id d13-20020a056000114d00b0020ad6085e54mr12139126wrx.539.1650980511758; Tue, 26 Apr 2022 06:41:51 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:51 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Biao Huang , Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] arm64: dts: mediatek: mt8195-evb: enable ethernet Date: Tue, 26 Apr 2022 15:41:02 +0200 Message-Id: <20220426134106.242353-5-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064155_577330_34AB8AA6 X-CRM114-Status: GOOD ( 14.40 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Biao Huang Add ethernet support for MT8195 EVB. Signed-off-by: Biao Huang Signed-off-by: Fabien Parent --- This patch comes from https://lore.kernel.org/all/20211207015505.16746-7-biao.huang@mediatek.com/ The differences between that patch and this patch is that: * The EVB dts modification has been split into its own commit * The patch was rebased to fix merge conflict with the upstream mt8195-evb.dts file * Re-ordered the node to be correctly sorted based on phandle name * Re-ordered the pins for the pinctrl to be sorted by node name * Fixed dtbs_check: use - instead of _ in node names + prefix pins node with pins- arch/arm64/boot/dts/mediatek/mt8195-evb.dts | 90 +++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-evb.dts b/arch/arm64/boot/dts/mediatek/mt8195-evb.dts index d49ae8605e67..0b04421942ac 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-evb.dts @@ -5,6 +5,7 @@ */ /dts-v1/; #include "mt8195.dtsi" +#include / { model = "MediaTek MT8195 evaluation board"; @@ -28,6 +29,29 @@ &auxadc { 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_pins>; + pinctrl-1 = <ð_sleep_pins>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + eth_phy0: eth_phy0@1 { + compatible = "ethernet-phy-id001c.c916"; + #phy-cells = <0>; + reg = <0x1>; + }; + }; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pin>; @@ -69,6 +93,72 @@ flash@0 { }; &pio { + eth_default_pins: eth-default-pins { + pins-cc { + pinmux = , + , + , + ; + drive-strength = ; + }; + pins-mdio { + pinmux = , + ; + input-enable; + }; + pins-power { + pinmux = , + ; + output-high; + }; + pins-rxd { + pinmux = , + , + , + ; + }; + pins-txd { + pinmux = , + , + , + ; + drive-strength = ; + }; + }; + + eth_sleep_pins: eth-sleep-pins { + pins-cc { + pinmux = , + , + , + ; + }; + pins-mdio { + pinmux = , + ; + input-disable; + bias-disable; + }; + pins-power { + pinmux = , + ; + input-disable; + bias-disable; + }; + pins-rxd { + pinmux = , + , + , + ; + }; + pins-txd { + pinmux = , + , + , + ; + }; + }; + i2c0_pin: i2c0-pins { pins { pinmux = , From patchwork Tue Apr 26 13:41:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C378FC433EF for ; Tue, 26 Apr 2022 13:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DSHKeTsfQYEIk4ez/phdKACrKIghP4OTYzUyD0eVILE=; b=FLO8pBXCXinsCw wMmh8Fb6ZlL2z2RRA+7gH2xCXKOdAp2BWTdislfSkEKG4L5bulPtZ7K2b8tubBDxEuGSGzH5dlcMV BFzRFMs/g3RE+8AVY4gdGl9OLX0sVoOjneT+Csb8+YRF9LSBj5LXuBWiIt9zhKZoBB1h+0G0zLwQb 3XbUjDu8CjuOjZ9N1TPETickvTgqooLWOSwuUJFC5P+Lvnw38h5W13i6akn07Ocz2uJrJyvWxIRGO qEMF7PIi0YFirc/HVl9tFgo/Xrn2DKOWipRV3X6UeI3uWM14W4g2YRI3kauQIUSaKfvRtX4zzQx6G CADFq9g63Y3fWOzBE/4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLU1-00Ehbv-Og; Tue, 26 Apr 2022 13:44:01 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLS0-00EgZc-44 for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:41:59 +0000 Received: by mail-wr1-x431.google.com with SMTP id j15so12289167wrb.2 for ; Tue, 26 Apr 2022 06:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K24pI48bckEH3Y3oSHXKjeqIQ2pS3pf+1QNVp3L1AGk=; b=i08Wa0+I8vFqudmLcKEpFUrwdRPyrrmNGYg9ArqPlVQA/tJVlnOobY+g4E4P6S+h3a R1H604yOHa5tAQ3PBTVTS74d67hDZNWH9/AIcx/LeoAfVE1+xz9gbna3tKAl4ojTqdvq 5fCqS2TFR6WdzG6e8JXN9436Js/xK4YQo7zWW80kJ8mIGzxu4Cb/qoBOHtrUib3MC59c 3hQLeOBI8OdAsq1BY9dLfVUcN2r1t/hSwEcGDfZKGuR+c38WYBj86mt3jqhVHs3DVfQk L3Mh3OG2rE0gkT0QyrpsxkNvQWBHAkNCFjUOHP/4M5fy+CvoarAXjTvWpO8ZE4i5CKcS bvMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K24pI48bckEH3Y3oSHXKjeqIQ2pS3pf+1QNVp3L1AGk=; b=rp/Sz5iagOk3ykVaUh08imcP8HjO9OCqjQNNYWtTmEKiyHgGU0nDmOLT9VVi1vMsxy rTpFLa9N1TVpPyxFI0hqMda2kA0c5Js4bzbJKz2V752iA0a8mCVQfjrGUK3XpcuJ3NVZ ccpdYcBEO/n9mZM+T9/RZ80zXyplIwmJIzS6aFRlvdJ5D5VLiN0lplg7FPAI7nWXVVap W7vLaN01zj2+wVWGBKesZSyqT47oSggk3HfIaQEeRoA9j1tq8aFU2q8HMuxCx8b8GuGW pCT24E9fD/dC2+F5k63Gmkd26H8BB+r+/9jAqArpzECPqO3C8hu0SRtddJFgaHgAY3i5 w0ow== X-Gm-Message-State: AOAM533KNA9HeTGxPTbOj4F47+TmFaQ0rQSMUqJ8oxXZSrWl0LvRFQXK nxBIRwbl/aFjyNyunjOuqLg00Q== X-Google-Smtp-Source: ABdhPJwTqjD7xukDeJkwtYT17PIwAxavld4VVDUXrUeGccOnlqTLBHELXQALY+5oCYTdLFIgdPaRCg== X-Received: by 2002:a5d:6301:0:b0:205:cb42:74a5 with SMTP id i1-20020a5d6301000000b00205cb4274a5mr18242860wru.385.1650980513022; Tue, 26 Apr 2022 06:41:53 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:52 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] arm64: dts: mediatek: mt8195-demo: enable ethernet Date: Tue, 26 Apr 2022 15:41:03 +0200 Message-Id: <20220426134106.242353-6-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064156_279049_2D1598CF X-CRM114-Status: GOOD ( 10.04 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Enable ethernet on the MT8195 demo board. Signed-off-by: Fabien Parent Tested-by: Macpaul Lin --- arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 108 +++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts index 08cab3b3943b..0b7985486e2a 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts @@ -80,6 +80,30 @@ optee_reserved: optee@43200000 { }; }; +ð { + phy-mode = "rgmii-rxid"; + phy-handle = <ð_phy>; + 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_pins>; + pinctrl-1 = <ð_sleep_pins>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + eth_phy: phy@1 { + compatible = "ethernet-phy-id001c.c916"; + #phy-cells = <0>; + reg = <0x1>; + }; + }; +}; + &i2c6 { clock-frequency = <400000>; pinctrl-0 = <&i2c6_pins>; @@ -260,6 +284,90 @@ &mt6359_vsram_others_ldo_reg { }; &pio { + eth_default_pins: eth-default-pins { + pins-cc { + pinmux = , + , + , + ; + drive-strength = ; + }; + + pins-mdio { + pinmux = , + ; + input-enable; + }; + + pins-phy-reset { + pinmux = ; + }; + + pins-power { + pinmux = , + ; + output-high; + }; + + pins-rxd { + pinmux = , + , + , + ; + }; + + pins-txd { + pinmux = , + , + , + ; + drive-strength = ; + }; + }; + + eth_sleep_pins: eth-sleep-pins { + pins-cc { + pinmux = , + , + , + ; + }; + + pins-mdio { + pinmux = , + ; + input-disable; + bias-disable; + }; + + pins-phy-reset { + pinmux = ; + input-disable; + bias-disable; + }; + + pins-power { + pinmux = , + ; + input-disable; + bias-disable; + }; + + pins-rxd { + pinmux = , + , + , + ; + }; + + pins-txd { + pinmux = , + , + , + ; + }; + }; + gpio_keys_pins: gpio-keys-pins { pins { pinmux = ; From patchwork Tue Apr 26 13:41:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24E23C433F5 for ; Tue, 26 Apr 2022 13:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K4+zvQiLG37axcf/cGiYtrRcLQs0/5bc3T7YeE4KuDs=; b=L/oN3np262A4DE v0y1IovxOpLyvEWmmTx+9yfnpdbiuP/03vsyMAiGsQ8Wv4KCDnsS42EQHn+AujUXLvEhPD/BMaCa1 Fnse050UirKOul/35V9cbNPxxF7iTWwGqKRkc6S3o+cnlwPdFZuXfx0oaHiEvlprVHGE4Awy4IytJ AT+ZaKBXJIcpI3zHIB9mG/h3WceT1u2pD/yUw/QdmJrDp/Im4KnyUF/0W2OqGFs+eUA5Unuogn5+Z 4Ff8rOcw85A3aaI/6fm4Qty+CmRxOkhlERRl0wnVOK11fd/otufxLuxkF2mOczqSc2vd6OU5wOHx7 uXcjK/ltaDQF9brJMGpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLTw-00EhYt-H0; Tue, 26 Apr 2022 13:43:56 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRz-00Egao-HN for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:41:59 +0000 Received: by mail-wr1-x433.google.com with SMTP id v12so18723720wrv.10 for ; Tue, 26 Apr 2022 06:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lRfVC5aaQ4N6y57lWHZ8XzBxGf9B+nlX2tNH+pQF5EY=; b=Ohi3dOa+z+/2uqEnU+QGx15AYZjcV5LG3H81paqeYyTAEYMJCy/MmTBgSVtbIL4nRw yU3+HzaVaQEeG/ya92peeYASG7VtFTWsCVTT21PM+J/8bDS3/wD6G2O5SLVoEIWm61Py Oi5jIDHqqp4P86mP/fIG9bN6grsDjmLLiP5KCcvivwCkzYfhsGFxETfcEOLoa59Y5jhA RNe1MkZ17JrECnn/rQuVNH+7Esp7WumapPaNcDoqVtKYc2TuFkUXY6lQT3t8jddP+dCf 7uhZ+z2ZpQ2mOtueekHx1CFNRrZGvs/4Nui1vf9up65ItkK8rh10R/L266I74UkknfeT jV0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lRfVC5aaQ4N6y57lWHZ8XzBxGf9B+nlX2tNH+pQF5EY=; b=SHNdQAXWNS7DWmGjzIwtbIhmElVD3RUceaMgptUhxh6aogClr8uLF/M+x6zdSHudai tIc53m09zBl4ZYgLuHBgfF3Cntbglry0uI76to+A5uODg9QCJHN9KYwDSjDfKNM4aneg uFtewI+/F21TuCq7HW6VtPzVH/Qvfl8jTlD97ZfooEuHAJnRi9WQ41BNPTwZ+j2Wicu9 haMn57d7OkEU/fc9e595RGlimNInSAvbSs/U2jjxx4v1Rv4AvURA1pX8qeGlzw/Cv+sE GWnsfc+oSwRQD6eAgDhALN2b1GBD1qNEXagMTqsji/Gm9HPEETYs4Axf86KN5towBSrl GoTw== X-Gm-Message-State: AOAM533wO6t5riTYOnZfiP0vAyuPl7jZCN3Uah0T+vwTDZ63tblR1ukw nuarMe9rKT5bgNbv9UMOMgx2Nw== X-Google-Smtp-Source: ABdhPJzBLZfCcm8hoYkEZchekZF0zzr274AwXjGp/5LtIjvGZKDbBEb1QoUBNKaQ+Aixc1sCq9/WyQ== X-Received: by 2002:adf:ed8f:0:b0:20a:e2a7:7201 with SMTP id c15-20020adfed8f000000b0020ae2a77201mr3991412wro.26.1650980514411; Tue, 26 Apr 2022 06:41:54 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:54 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] arm64: dts: mediatek: mt8195-demo: Remove input-name property Date: Tue, 26 Apr 2022 15:41:04 +0200 Message-Id: <20220426134106.242353-7-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064155_629055_E7251E1D X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org This property doesn't seem to exist in the documentation nor in source code, let's remove it from the device-tree. Signed-off-by: Fabien Parent --- This patch is related to [0]. [0] https://lore.kernel.org/all/20211123065158.1383182-1-danct12@riseup.net/ arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts index 0b7985486e2a..d1f650d99d7e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts @@ -35,7 +35,6 @@ optee { gpio-keys { compatible = "gpio-keys"; - input-name = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&gpio_keys_pins>; From patchwork Tue Apr 26 13:41:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12827224 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75078C433EF for ; Tue, 26 Apr 2022 13:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x5y+fdEItm91yXlNSpZrwh5M2BvD0ci41lKh8d9+K5Q=; b=rZPl5JOzIhDs+U 984moUDz7M0dH60FbE9hjf24ZnlBCa5+///UshgZfkmycqKkkQxwMDsLIz/ggmtZ5BZLcEXURDurI utXSM29wpwA9wYQqFOiQ/etWe/l1eYRWGRcX7FKxc85Qe7FwQ6etQrUGDvw3ATC+jpxiSyuMZokC+ eNM4oic8ac7/+0PFCTMQuGVN9ypGaYmlEsLkhwuq3lz/8ghR6QncHufwI7Cly/W2Wq8/726azw2T4 s6gV+Gh6itVryA49Nyt0Z0jUrCjN3FAAllYvPNYBC+hq3WpSeNgFG9+g0IXcSxM5GpOxQp8nf+pIp sPg27n/t98JGi57uNBtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLVW-00EiTt-T0; Tue, 26 Apr 2022 13:45:34 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLS4-00Egbe-E4 for linux-mediatek@lists.infradead.org; Tue, 26 Apr 2022 13:42:02 +0000 Received: by mail-wm1-x329.google.com with SMTP id o12-20020a1c4d0c000000b00393fbe2973dso588112wmh.2 for ; Tue, 26 Apr 2022 06:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lqk8ZG0qxpIIDvSpDmpiW10RXEh5f90c5tYGoIQTeBk=; b=Ld2I5By2ve8Ct4dPJ90lZhxgNO5il6+Sl6Mx4qVGQHec2ojQKQO7x9srGnXiJ8cR8F MQMj5i5gnGyXWfpe2m4fJSzW3QxxYFrSc1ghc0Em1Vw6bPvCRPSOFAqVK5PYs/wsWZCL +ITEiXeZKbHEvx6ra2hivQCnxe/gC58Lb9RigpjKQDCDXR/mqG5xJJ5nfwDoiAI+XS/M E1xYhNq7r98BwE+wj6EZnEws6OUIPejXyM+VbyeYnp1bjkAr0zu1mBBC2KS8alhLfEdl MNh1VPTVWNymyZ1W7GssJYgh/urf6MF0P8DtU1AObKt2pk9W72l32QvgsLk066mqXX8P igDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lqk8ZG0qxpIIDvSpDmpiW10RXEh5f90c5tYGoIQTeBk=; b=7c5nH8XpdwVIzGh0XiJUEY4b1l7lTlOC2KNJAq39BAOj14nvFW1sClsne/lRO5tvPy iqjnNM4mw2/QgP/roqc+a6m/JP5LHbui+8J0CiJ0SnktI5eQEjXGjzFyuDyqiVRmkFMY jNzcnLFbGGPUJk9Vve+u411Qio278gm9L1NJxXTKNHvUa9OoSNG54nQwbnbWffb/HmTh u1qpeJU8VOF65vHCl+N4OYN7A6ksy0TdRBlBmnnpKg4pAvpe5+B9FoY0UZT5xSuboW1Y g89eJ/Uirm7RZYfJfovYa2qRPffDuk8hD4DN1WgtYtRNCPowz2gsRB75xlFQnQS6tmfF bcQQ== X-Gm-Message-State: AOAM530EVIubBSBnxmStGS8UW8O0vaVqPLYonk3KwWlLLv/EcjSCObWC h2thsRxxyKxut2QBnUtC+oF6tw== X-Google-Smtp-Source: ABdhPJzIUFpskUEdsGQHDHpN9fuLdWE/J6FsWPSN4vkc1wjnQyDdu6kOKJ2iOFA8Zbk+ODv7dlvlyw== X-Received: by 2002:a05:600c:4e12:b0:391:18da:1883 with SMTP id b18-20020a05600c4e1200b0039118da1883mr21617051wmq.101.1650980515586; Tue, 26 Apr 2022 06:41:55 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id b6-20020adfd1c6000000b0020aac8a9946sm13628475wrd.47.2022.04.26.06.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:41:55 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] arm64: dts: mediatek: mt8195-demo: enable uart1 Date: Tue, 26 Apr 2022 15:41:05 +0200 Message-Id: <20220426134106.242353-8-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426134106.242353-1-fparent@baylibre.com> References: <20220426134106.242353-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_064200_518540_7A288AF6 X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The UART1 is exposed on a header. Enable the uart1 node to be able to use it. Signed-off-by: Fabien Parent --- arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts index d1f650d99d7e..aa41df865c9c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts @@ -520,6 +520,12 @@ &uart0 { status = "okay"; }; +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + &u3phy0 { status = "okay"; };