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: 12827206 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 0143AC433F5 for ; Tue, 26 Apr 2022 13:43:12 +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=TqPlW/LUaJtckXjYMONuAKV36C8ImysoBd4u6R9TKl0=; b=ziO5+BEHXQXHhc OK+e7lY+yyW6jk2tGhpQVLqKhB87/8te7LoW+uRx5Cf+V6BapFe9XQWx6Vy9YFjEe5QEOrCWWYfKz zSHhdzhZE+S/K1Ly1CDdX76d0+3nLTJB8bOOiBLdoQzPrmNAaz2rz63OCtrKhmI+GvsXKHNxWgRVR d7WsdTWa2Pv1aLrKQUjH95qNpS+bV2fwe/aGfcqNgFoMYpnm2F+fL8Fk4R0xHSpfeFT8REXoX6U8F h2cW6l4WUv88AWesGJ/vcZ7nQpNIQBChF3h4GbE9+uoh200CFcob7Az6pwXbBO4ZjxRh6m9zggxdE MBbUDuYH3Bc+ICA0Dw1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLS3-00Egbg-De; Tue, 26 Apr 2022 13:42:00 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRu-00EgVh-C6 for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:41:54 +0000 Received: by mail-wm1-x333.google.com with SMTP id l62-20020a1c2541000000b0038e4570af2fso1554527wml.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=fR6J/KUQod+cUGN+KuSPSZZw+/KG9RRUnyKOwZvyV/1P9pyMUjAoTQ05fTf0a4r07w bCiWluts8ev0zTScIc48j6IftS+hgb8IJSO8YTmVKxbJ7U1UvVd6/S103AtWCsJv4Oea Yl92PsAVJnR0t1DT8yGzdIbgcxliWMk1dSg8hWFv7RNaiccADkgKF0Unm272Gr5769O8 MFk4F5/tnwhJdyl4+8G5hAuAtOjj8JuiIJxincyCRecDjDEqiqzfSW978dm9PfQgTt6B 6JXYTsO1s88HsnN9AXtjzak7/AntdvW0ABKrDHQCPVFIMQIqxxwWD2F2o+xKhyas6Dv3 tEMg== X-Gm-Message-State: AOAM531Sb6w04fAzT56zRElBTech9wSP1VykHMx57v+i9rVOArNf9r/K +YEPfCkKlptlr77DPHt8xbpakw== 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_468051_58C157DC X-CRM114-Status: GOOD ( 11.12 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 12827215 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 EF656C433F5 for ; Tue, 26 Apr 2022 13:44:00 +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=POcg5duuFgVIT2an+b9RBcxoOiM6+qB88N7Hwu8baTE=; b=SwoEMdGikFHtw0 gezAz2LRHTfvyvDyNGx61eULbUyJ9176eSQAWli4wo/gz7ltbjCYvhKdIP2/BCdyoqtluKUdQ0Kli 3E8W0dgHhIP+gcHWFAoi4NsJZAxbqzs3Ouo/IVAMTUt9+9qoJgtV6TMoBkfrFVpuJdeiJqQ1ZuyxV Xx2G04kJ9hZj6p+4vTcHoNA6vaMuNZiiO9seNgskhfFBOLlvROPNUVEjkzKijZFEYs2kg4KkbfV8f zMJzV86Pz/GDnD2vVBSPIAALc1gOU63M0yON+wA3XwCp174p1dROCMXkHR/1GrlT3tnz7ujeJG3e9 GU6Fin/M2hv/mqxlsGOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLSl-00EgzM-23; Tue, 26 Apr 2022 13:42:43 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRu-00EgWB-6c for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:41:54 +0000 Received: by mail-wr1-x429.google.com with SMTP id w4so25488030wrg.12 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=zFTXL5k1PWLnAq1qV0ZVjxDf//T+2OePdd4LRdBOXRMXP65/r8GIKZ2WKSprZ14LDN CVfZzTnJ/4m2lUyuGaKrPYDl1WgVXIUqJUxgoIqxmLVjgluV3JwmtYxKmGOevvfl+u2p B1jgvh30qQ0jaO/KDxbcE3216jbbbHaoerYRIkdKeqrScuzDbUVAjflaQAfWcgst99KL QKGN1Wq8I1Ft/gulujJ5dJwFyUF4Z0oNaAXkGkkIXxLSbfA7JA8/RfqTtqz+hHZUbaUc wX2KgB2B2Q1/U9oCIJebIUj8HbCXW8ltYGgw0x+xn1fadn3++0srnEQn02KB7ioNGbzS nLQg== X-Gm-Message-State: AOAM531M3XvQ0FrJ3OUCocLOwoUX2dCVUf2d+/SyLuAV/WY8+aC6Vx1F t7D6O26TZi9xHZPQJVOh6MEfmw== 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_064150_380606_FAEAF537 X-CRM114-Status: GOOD ( 14.50 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 12827217 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 5F4D7C433F5 for ; Tue, 26 Apr 2022 13:45:09 +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=+GVLfnxoWsqfxjmYTeigpxqV+yTOMyo6pBZ+c1k9ENg=; b=aWOeaLk2FQOVzq ve8YdneBDocehKEfw2ufDY3UyEJzqHXuIcucpIvTg3aNGe/fuJBqkoxKI1HaAaGyLeLd7Tams8Doy XpKB9XGRdk7DYoT3Il5TFsrwtahOA8UE46Poa7y/vE16G70rG96FHjbc9agC+QlkqtruzhwXA1lI2 jLj4mP0qKXaIV9ohgJHJQ7df/2F8i+ZS+Xq+NcuX6nRe7G3pPw1rAroSCSm5oTfgz4M5BQ5EOliCa rOViTjoLp64GyB5lg6LIIQJbv6mmQbG9bSLFyFjojglHabXQSNSm6CJjEeu3QcpRkoL7IDEHfDawh PYPPFv2mlZiw4UqOGAug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLU4-00EhdY-Gn; Tue, 26 Apr 2022 13:44:04 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLRv-00EgY7-Uz for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:41:56 +0000 Received: by mail-wr1-x42e.google.com with SMTP id u3so25559644wrg.3 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=NYqWzv0HTZ1gs17XfECAKXRLqDDgIYRhRMk4Z8yBFiSGCIy3Y68LIDyakrzMgObAYg +hzD939B6JiI6WuDcPu6jVdSNEBLaDZH6h6wy+vba8Xz8FEHNgJfsryPW/DO3xq+glx0 DpIIAMW+MoGceNyCAVyRMYwOgG0RtJ7ymOdqXR8ds3O0ip4k4xgkTkA6/XqSzv6SSmaa RMzo5ZqEjPmEM8qFMBS53jd/sp2gOqPu8Yhp2WMcl38uWUsbSYHP2p4spRy4TziGKqQJ s59wmRB8EXibdmdWU+4e5vmROdux+Wu1P6v6Ze0NodYF64z2o4thitTYHBUfbIrhGrbW FIFA== X-Gm-Message-State: AOAM530mIZUTNEOeRIwvS0qycr5tbzJcVkfmX1AKbbkRSSNxhDnxwL6t cicLjlgK4XGyzDJnYxzj0YxZjA== 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_064152_091016_43A1F637 X-CRM114-Status: GOOD ( 14.62 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 12827216 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 6553FC433EF for ; Tue, 26 Apr 2022 13:44:53 +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=pvCQh5xYG/NWbXoKoVLnstID7k8VdvE6LApn7vEYv9k=; b=agFbLbNMF7D+28 L1ziW+gD97I7ATEblBCz5kgaCxl0lxd+bIZ3wpcg8lKaRWEfwtULaDUHADvfODPD3Uu4BO5tRx04Q Edb8YsNmcDw0uefvQ9LzyTkx5mcGz128W2HizPpexe8jPsPgUPohTXgEdNidGETdFvmtEz5QYRA3f tBZSm5WLkiqzZKlG0t/GG6BUPKKLxqUJ2DX80bkbFvRoqXGa260WrGFcc1Xqd34M/TlBFLW9I21SW xu+/PzTB7ShFR5itsd3nFUUOjD9L058TU0APUbPvqHr88IywQOQzX7LBj1jrZ4rBao8KCnIGG9t+H wGQUYbqtxAJjvf8mFu9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLTg-00EhOH-H2; Tue, 26 Apr 2022 13:43:40 +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 1njLRx-00EgZ1-Rm for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:41:57 +0000 Received: by mail-wr1-x433.google.com with SMTP id d5so10336464wrb.6 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=iqDjqk5uS+1FkZqV9iZMG3lAvtKsER9Mv7mTRUm+tj+vHCLdiwO/hc9r8WIOG3ohOn wKtozONwODe9CQTkdNbr6WriR3imcoMaIfvEMvnUOdaliLnOVBQpKO/HEFEzNO4ZHhij yblqmMEAVNcxdgOCK9ZcrwZ1B0zrAJLVKNsQxp86q1vS2dVSOoJQjNzq6CUEjSmXIiGo ny0J1GCxJoNKCFb+T85fQidD+LkzpynFfULcoZUe5s8AvsvabcrHkOuvlRbRAjXqTTYa 4RD1DL6SjYElG46PTCRL0z0l8wzAI181HN/I3hpi5ys0azDicVEWiB9Bo3h27kcAgiUQ NFEQ== X-Gm-Message-State: AOAM531KabHSe+Tlwun6K6oT4QGmK3eyFd82oYtGoyrqTEzJXRan7gfq FW7fK3qxUfSkfIusquKLUyb+xA== 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_064153_959394_E4D4D365 X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 12827218 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 4523EC433F5 for ; Tue, 26 Apr 2022 13:45:32 +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=FzFszpU6vJGfI+z09u6ltNLwbbZf3PoVMJuH9vklo8M=; b=SglbRtbaShFhJu LN8jY98wD0MwhJzkruJbYLBD7RXLWM5GNaej7Dcx9MX4gYjjoy0R86GtInZ8/G7V2Xj/YrxB9KC9y /+ROU3naE7IQteK7ciUxPZz6bYt77QJpan7ZTjyHtLH6PQO2lCxaxOaRkMaZR4GZyaGDjNwZtM3+p Ewxz1a++xVNQEGDEpPS5jwGbNAw/PMpfF/T0xiaRzCpX87hfxYgGbJfW6yFhvdMxzdeLGiYEPXKf+ rK4iy/gV0+w1ycG2jqdnNTPU4+Xob4b2tDiUWDU9HHuJhp1bwwjpZ+iU9pAsUTC1Ryl29auHhJeSr EbjbRca0Ka2W9zrbMZmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLUL-00EhpX-AQ; Tue, 26 Apr 2022 13:44:21 +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-00EgZd-47 for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:42:01 +0000 Received: by mail-wr1-x431.google.com with SMTP id t6so22104779wra.4 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=dcnASmNV8YjwNgCI+x6K09DgfLZAUeNdDAWoGf0eCimZDIiwW/CTBbSceAxLroDnbv rtEgBZYnLoG0j2QGSXkjQDn/2Bb9A9IVWZLCD6ycyXxYFTXZbeSxXRO8LjdBjQ7yO/RQ WTYfhNClWZ6iwUxJH95UNnF17ICsJdZajbsv3Ysu6pGkyrsPNFNQT+MXkz1/izfOkKvA O9nycLoEQoanLJZWlY1qfiLAmfSFohhvPWXGSjomcYKEEuLKDtCagJynlbcdZeiPTrkP dO0DqfeUgDHvXNrFPDGIDb7Y5KX75KMLrJ5IDUJLHVmuTmdfqJV2agRhqx8UgVPJOKxN TZuA== X-Gm-Message-State: AOAM532rP9Ctwih5+XGj0z6saxODJA6JZNjQJL5bDQ6Y+jVbbUUFi/sU 9+TveYIYCw/2bGF9aT5xVl7Nrw== 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_297796_8317C5F5 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 12827220 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 DE33DC433F5 for ; Tue, 26 Apr 2022 13:46:21 +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=y+QQdDtdh0PYnlhGNcrLtHiazLSL70KTqDeO2mNdies=; b=QJw/KX6RmXjnuQ MSOLLJiyba8FbGxQ2ARRV/2Ocz74JxJAzXRM0zM/u15HgTBKZCZ1Cqro7hRSBWX6x9WmydxPhAkIl ozdELLzDn3KuIAedr9pDq5jhV2xTmGi1/M9ODa97FSAb2VLTF2is4CEoAloE/klhIKBwoA8DEtj5j qZ9k2z6BqU+pLPFrPeNM8J4+LUu601zNYoZP3ttg/nzI3KTARbocvAg3F9A5Z5ji6IR0cyZ4Iry6R FmdWGSiMIzIl5P0uO0B/9+FaPcnC+KucAP0D6OYy4mIkDt2Ex00cku1XWfd8y56WeTyXPHjn9lPrv zXii5vl6czLlR4xV+oFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLVF-00EiLD-AK; Tue, 26 Apr 2022 13:45:17 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLS3-00Egan-RP for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:42:01 +0000 Received: by mail-wr1-x42c.google.com with SMTP id u3so25559891wrg.3 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=TtvgqpMVOqp6QRH1hKAvi627YYeXSd8jbFlE3MKFpSHXv17hOsQgtxvV9kxoNHT1+t /pPkGxfSSK8ovAmmYrts6IjOvuk66SGHvMEEE3mLmfIldBjRjUzsd/cV63zkbhx8ekef NEbWfLw4wMnrReQUCE0mrl2F8yum1WChffv+PynGA/tlziLxdIiSJshGF0l0wPV9m+Ei vpgwjRzKLZwyiMzHieKqL1VRiGvWJwXYdErz0ESP+YXQar1F9H/JVIAdeqssE2hS/vy/ j7mKgtQMht70YkElTER+gSmkCGbF199Ug0BE7IXLGBAm3Y6dhib0yBov/WZeXIJEn/s9 SRKg== X-Gm-Message-State: AOAM531VYT8/hYfIgHPdSz2eZgbuhqQQPiHpA6OQNAoBiOziYmM/fON9 fsX37lAzM7OIdnZbkg0T8V0R3w== 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_064159_949216_9594C848 X-CRM114-Status: GOOD ( 11.83 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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: 12827219 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 C9C24C433F5 for ; Tue, 26 Apr 2022 13:45:42 +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=uzp7aiQjhs0J2RK8sY6vgO/ZU87wQ9r8mHvNbyKOPS4=; b=DSZ4amm1IjG6Vq xHqwGWJBMbUf7DgSWLFvZAdskshLQS6UhoOzSsF4b+wFMJz2r38LqEqfSrskk0TDrEKUB5YChvsPx zMStigiCDWUED4BKqoc2g/PPzQkN4xztxGv4W1HfWcb1G9qThSHehyBSw1P/7wdY80h3MfvIiKfOz 4NXs/BVQDbC5N2a2EWJjQQpjYAesA+cnqiLPt9c55SxT51/k0tpPfz4L4qgy4fL4vsEU9kbdv7SQp PhRyXf5IiokUbl+0oXPUKu3V6N69UWNTbrO6tLi+ifcnhlsQmMfqcTwcwyp6PM+QhMj+X+Vwf2wXu u+b56BFWMZHwdKTNpZsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njLUg-00Ei2C-KN; Tue, 26 Apr 2022 13:44:43 +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 1njLS0-00Egbf-To for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 13:42:00 +0000 Received: by mail-wm1-x336.google.com with SMTP id 1-20020a05600c248100b00393fbf11a05so509713wms.3 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=NPY29afwkxS3bA6C6623yy3cCnb795V7AbivtvZnJnhJvY+kiFeWq01BP6ksFjNN4U IofocAbrV66LfLgTtT7x5ttpneCcIr5vJ408eCx7wt3HT/kiG2GIQUHBpWkMpgsXbNq0 4IlfgMcHAuYttDkkf/mahw3PJUvqOzQiKvVT5RH9uXPAEDJ8QOxKp3cd658EKdGv6oQO 1jdoMOrNVAfKv+C1EJ5zGHgNdEmvPjX1Rd2FFjmQuPl4X20D9D4GAtIT0oj4od91TBtr 3KK1pj7lhR2RN8ASQH+XHIhOhs09ItYgE8Z5JzhNzleNFJaxhOtLmt6bx/sDBOLEp9LF 1WUw== X-Gm-Message-State: AOAM533okf3ByPbeUFsyUOcArnJmC6e/iZSi1HiaW6LXk4/IjoJQlWwn 2IjTc5iZWJrwKCMybNrwI5A3QK+t7FOgRg== 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_064157_095460_126FABDF X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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"; };