From patchwork Tue Aug 8 19:01:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 711708 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DF5AC001DB for ; Tue, 8 Aug 2023 19:37:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231180AbjHHThM (ORCPT ); Tue, 8 Aug 2023 15:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236592AbjHHTg4 (ORCPT ); Tue, 8 Aug 2023 15:36:56 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6757B2127E for ; Tue, 8 Aug 2023 12:01:55 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-317e14b0935so98950f8f.0 for ; Tue, 08 Aug 2023 12:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1691521313; x=1692126113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lVWCwLOI0RDSefmknyaUf7dplb4DpGR8Zf3HZcRuHo4=; b=1wHx9o3c4Yz2BeeZHkHGOHcZ7QmYbWaBwzImwoUkKtTdUE7gcUEqg65Ywp8TyX7ZOz i5YW7K5tIajPgn2Y2nLPv26Zt5GkrsAhc1YgQOe4h0Hm7GwYqDuuFsxCtAGKT4oLxv9G qRtwgCh0j0yOIIhnKMENx16+kM6RfrRWfH7mkiPmdKdsN006Kvl3rv4qY8OhTrZ0dXq0 2BxlIghJlo4SaL+SKXv3kDjcVjru4ZKO+AKAsN9dZMBLcDYTGLL1RcFeUyINhPNXVQj8 ElJVfErnmvaj+OfkjXiLtN3rb+sztKz8UvOT04xDNprnyQ9ToBZZ/klOO3UunsHY+bp7 Sb+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691521313; x=1692126113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lVWCwLOI0RDSefmknyaUf7dplb4DpGR8Zf3HZcRuHo4=; b=AFmeihUpOzPdkw88lmvMPHAgb9nQJwgJ4J4K8Uhw75WhA7oA2exjJ49N1xcKvYN8aV AajxxVAGdxfIwUDTxTsz+nJvHAiBM7WWbIT2gbSVA1AkvFwqVBSMptaqsXnGGJELTdRW a9IC5vqqDGp4hnVF7e0US07WOWZ8gwXeDvTozT+rCmvX+cyu1PB8p10gu8JQk8cbkTjH oECZ+Hs/0wuHEuw80jD+hhqeD7zswxcpWly6T13w5KeOwEvZt2bJdo6DoS66DPonBxvM a1Ktc1nxUDrprpN93UgZ4uNH2to2ylLgdqtn2IoCQUgFuHhpji1DMO92hwBmlrmtzoHD speA== X-Gm-Message-State: AOJu0YxggUbwnRknR/8Z6MLIbePYUu31JAlaOUlBb5r4SRaTD111TNOV ci8hUe02Wui/+PQZX15zXPOIxg== X-Google-Smtp-Source: AGHT+IHtndLWibUQVcwtqnOkWRdaTuE84A1QwcAl7MRWdOnbv6AROq7OdLzJRoheCl6qZfsNQHrHtg== X-Received: by 2002:a5d:49c8:0:b0:315:acbc:cab6 with SMTP id t8-20020a5d49c8000000b00315acbccab6mr515129wrs.16.1691521313474; Tue, 08 Aug 2023 12:01:53 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:6a08:bcc0:ae83:e1dc]) by smtp.gmail.com with ESMTPSA id z14-20020adfe54e000000b00317e9f8f194sm7301055wrm.34.2023.08.08.12.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 12:01:53 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alex Elder , Srini Kandagatla , Andrew Halaney Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 1/8] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY Date: Tue, 8 Aug 2023 21:01:37 +0200 Message-Id: <20230808190144.19999-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808190144.19999-1-brgl@bgdev.pl> References: <20230808190144.19999-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Bartosz Golaszewski Add a node for the SerDes PHY used by EMAC1 on sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi index 7b55cb701472..38d10af37ab0 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi @@ -1846,6 +1846,15 @@ serdes0: phy@8901000 { status = "disabled"; }; + serdes1: phy@8902000 { + compatible = "qcom,sa8775p-dwmac-sgmii-phy"; + reg = <0x0 0x08902000 0x0 0xe10>; + clocks = <&gcc GCC_SGMI_CLKREF_EN>; + clock-names = "sgmi_ref"; + #phy-cells = <0>; + status = "disabled"; + }; + pdc: interrupt-controller@b220000 { compatible = "qcom,sa8775p-pdc", "qcom,pdc"; reg = <0x0 0x0b220000 0x0 0x30000>, From patchwork Tue Aug 8 19:01:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 711706 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D75CC001DB for ; Tue, 8 Aug 2023 19:37:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236473AbjHHThS (ORCPT ); Tue, 8 Aug 2023 15:37:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236683AbjHHThD (ORCPT ); Tue, 8 Aug 2023 15:37:03 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6762B217A7 for ; Tue, 8 Aug 2023 12:02:00 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3175d5ca8dbso4583757f8f.2 for ; Tue, 08 Aug 2023 12:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1691521319; x=1692126119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FxzAtUCpBizbORkFzBZ79E1+X6lJ8mcanV8XLYQP/TE=; b=Emhufybegprbd+EUb6K1FoZYvHv3Rrryb6fEBy/m6jy7xDufPlXQWAg3gs09RLZl7q 8ASadrgljQdGFGnINktw0sbe/g/EtgGOhu1OzBr2DyzRs7aAwJ2UP2qMPgkimMCSo6s3 O1Yp4EanaYHa0ZjuUQkhlHBkIAFLj3D+I0n0JvDUeK7z+cXIGpf26fklR/KgGJv1ImLY 2cX0XmOokFjuJYhF86nG0NSKvw3seQaSRm6IhLtw+HxOBZVDBYG+IHVBJKTTKCbapyYw 8WpsfcpUhQrH1Rssze8gl9QofDhwldekRsH+AKCE2QoMelr4pdOZcLq3LE6pKrlwCDfu SRRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691521319; x=1692126119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FxzAtUCpBizbORkFzBZ79E1+X6lJ8mcanV8XLYQP/TE=; b=I/RjCv5jQg2gxYMT0cUifomYwr+M1bw236lkjt6km8mSN5NFE9kXNmK5zVzLuG9V83 wmBT7QtMkKKYmTA49DgVUgLJUfXTu3nC2RuOC4p5SE0+QTLJyvBGOOhfALYsxp7DKO+K plJxwm3GrMSlJEXlZdOZEX0SAMylu7QOY4g8NmlSzqrpf3RVz8xZELzBTfL6jIz5oJ6I Rd81RjD3YZ1hCsFNAmNoSjYnfi6G7fpE4ae5fKAVwPnBpYYQlBc1zLgiiNlBrOMEtRdz hUWNlsf2FXMue00zLTtd0hsYGjzBOb/tCQooIxWU7Sbie2AcgypU3ZkORHt2jF2iL0RY ebMg== X-Gm-Message-State: AOJu0Yx2obOJKGEbr+0hN89ZukrabQI6Oq7T1PPtPiFFG4KKJo4SDsw2 1Ku0wBmXUpo3sHODydXlG6Cffg== X-Google-Smtp-Source: AGHT+IH9XDF97UaSXCg858XJnAuQSpKenxxYT8LZAXK39rYLA6UlwNrGvBnvBjidTZwmDRuQJ42s0g== X-Received: by 2002:adf:eec3:0:b0:313:f463:9d40 with SMTP id a3-20020adfeec3000000b00313f4639d40mr215320wrp.65.1691521318993; Tue, 08 Aug 2023 12:01:58 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:6a08:bcc0:ae83:e1dc]) by smtp.gmail.com with ESMTPSA id z14-20020adfe54e000000b00317e9f8f194sm7301055wrm.34.2023.08.08.12.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 12:01:58 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alex Elder , Srini Kandagatla , Andrew Halaney Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 6/8] arm64: dts: qcom: sa8775p-ride: add the second SGMII PHY Date: Tue, 8 Aug 2023 21:01:42 +0200 Message-Id: <20230808190144.19999-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808190144.19999-1-brgl@bgdev.pl> References: <20230808190144.19999-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Bartosz Golaszewski Add a second SGMII PHY that will be used by EMAC1 on sa8775p-ride. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts index f9e1a017798e..486cb48ecb9d 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts @@ -287,6 +287,15 @@ sgmii_phy0: phy@8 { reset-assert-us = <11000>; reset-deassert-us = <70000>; }; + + sgmii_phy1: phy@a { + compatible = "ethernet-phy-id0141.0dd4"; + reg = <0xa>; + device_type = "ethernet-phy"; + reset-gpios = <&pmm8654au_2_gpios 9 GPIO_ACTIVE_LOW>; + reset-assert-us = <11000>; + reset-deassert-us = <70000>; + }; }; mtl_rx_setup: rx-queues-config { From patchwork Tue Aug 8 19:01:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 711709 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87E9FC04A6A for ; Tue, 8 Aug 2023 19:36:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230410AbjHHTf7 (ORCPT ); Tue, 8 Aug 2023 15:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236504AbjHHTfk (ORCPT ); Tue, 8 Aug 2023 15:35:40 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4542769C for ; Tue, 8 Aug 2023 12:02:02 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fe5c0e57d2so20402495e9.0 for ; Tue, 08 Aug 2023 12:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1691521321; x=1692126121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eaczrn+uDVu4zRaXwsIp1V486qR5q1q+geaugqipQfM=; b=ycRLRc+t47LToHS303dsAghXPi+WMCksYE/Zyy156NmKKpzzWsecjq8UVFucS6Eloy xdmkLpwSpKLhjL9+JHhcpyPfTyydM5W5xrUOxyzQkmdip15cLZdmLNCXpKZKUxjZID6L Xz8ePC0InZ9epnXAi1qrQeuewpybWOu5l9mnpTGNUxIhNQtuIQcGO3iv7iDQZhweUfAh f7RTcX08vJFsBdfxOTtYhVQAp3THIyuIuacsp5WCKXo++B4E0QxhVLdgAyi0Wa0jchT/ mc8K0Nf2nYfS/J+rJHMY3u2Zb0rMGdth9F//QNPxVdFek454ht7m0LsiJKPeON5lPJc3 fk4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691521321; x=1692126121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eaczrn+uDVu4zRaXwsIp1V486qR5q1q+geaugqipQfM=; b=XAuGOycP853aOnjyn5X/w62zCh3oNlOk6A5R6N5SlaV05JWvIMXtEO2zw/wmQ2hJAk 1hQXTE0nFFKMwQ50CYvOSvGsR3CljqXaEPTOUl+9APK2r924CVIQ7ULQ/rWSU55MuuyA ZmR927X1/IOldnT/XyL9cHZizEdvfDSYkHXYbGxMFJ4KNyPltsjMqFP6kfKrwR29q3iI QJzdS90gNLmHb1OFagEhyZmE0uCYXp3pJ0twLIqFJFmmaqMMAsXcIHvYlrruMv4AXLYf 7jgLtzyanWZ6ZSZ4O5uM1d1+9JW7YNJqZz2nfDsqCI9E8p9EGkdQ4JxPVpQaH2qiSmy+ XaNA== X-Gm-Message-State: AOJu0YwTtCtZXWiB3+qC6rborihKpd4A5hDhwvEXMycAeygcwlw1ID0A OOMyC3lptNSiGqhLfgCT6gwDgw== X-Google-Smtp-Source: AGHT+IH46m86rYJjj9clreQLNhX5NGHUBLPhQI2xG8Bb0/JqcykrOGd7/24ix3Tw5KpU5SFHXtoITw== X-Received: by 2002:a1c:cc0d:0:b0:3f8:f1db:d206 with SMTP id h13-20020a1ccc0d000000b003f8f1dbd206mr508160wmb.25.1691521321456; Tue, 08 Aug 2023 12:02:01 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:6a08:bcc0:ae83:e1dc]) by smtp.gmail.com with ESMTPSA id z14-20020adfe54e000000b00317e9f8f194sm7301055wrm.34.2023.08.08.12.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 12:02:00 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alex Elder , Srini Kandagatla , Andrew Halaney Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 8/8] arm64: dts: qcom: sa8775p-ride: enable EMAC1 Date: Tue, 8 Aug 2023 21:01:44 +0200 Message-Id: <20230808190144.19999-9-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808190144.19999-1-brgl@bgdev.pl> References: <20230808190144.19999-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Bartosz Golaszewski Enable the second MAC on sa8775p-ride. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts index 330553742204..c843bb974689 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts @@ -24,6 +24,7 @@ aliases { spi16 = &spi16; ufshc1 = &ufs_mem_hc; ethernet0 = ðernet0; + ethernet1 = ðernet1; }; chosen { @@ -359,6 +360,76 @@ queue3 { }; }; +ðernet1 { + phy-mode = "sgmii"; + phy-handle = <&sgmii_phy1>; + + snps,mtl-rx-config = <&mtl_rx_setup1>; + snps,mtl-tx-config = <&mtl_tx_setup1>; + snps,ps-speed = <1000>; + + status = "okay"; + + mtl_rx_setup1: rx-queues-config { + snps,rx-queues-to-use = <4>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x0>; + snps,route-up; + snps,priority = <0x1>; + }; + + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x1>; + snps,route-ptp; + }; + + queue2 { + snps,avb-algorithm; + snps,map-to-dma-channel = <0x2>; + snps,route-avcp; + }; + + queue3 { + snps,avb-algorithm; + snps,map-to-dma-channel = <0x3>; + snps,priority = <0xc>; + }; + }; + + mtl_tx_setup1: tx-queues-config { + snps,tx-queues-to-use = <4>; + snps,tx-sched-sp; + + queue0 { + snps,dcb-algorithm; + }; + + queue1 { + snps,dcb-algorithm; + }; + + queue2 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3e800>; + snps,low_credit = <0xffc18000>; + }; + + queue3 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3e800>; + snps,low_credit = <0xffc18000>; + }; + }; +}; + &i2c11 { clock-frequency = <400000>; pinctrl-0 = <&qup_i2c11_default>;