Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5285446rwd; Mon, 12 Jun 2023 02:50:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ZZFt8jmA2k0dBd18EnURipeWv1vEMdpsLDA31JcTqoy1WFZNhhU82RWljRj+9b4kP/Hjv X-Received: by 2002:a05:6a21:328d:b0:10a:ee1b:fdc4 with SMTP id yt13-20020a056a21328d00b0010aee1bfdc4mr10779456pzb.47.1686563403778; Mon, 12 Jun 2023 02:50:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686563403; cv=none; d=google.com; s=arc-20160816; b=kHf12M4QdDUY3BFq0QntORDGCuyBn50/W6LlPtLdjcWRHlPtNX5Hc2SInqG/oIekW3 J5pYfMccwZ6TkDH5NAHbHv00fQ7t/dFTpPgd+fxm8ZteOIA2IVoneUh3wwYJeT3dEDsD 4BcnjTR1bACPeOUVGzywOwb6KHOQKQKztY26EyUM137umIMEBkj3juDZR54dI2CLNyfF +bUhPeWi2SJ9CfG+knLWht67Zrl2sOm5KZ4PnCLXHh0yddkWOgrH1UTMJf3NZcSGr+mO HQh0/YV7g/xHg+dOlDdslLCOXyelM2fuZFUWH3c0RkpT+TbNJwIoTx3Qd+tjJN3VyrgP gHIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FtFss3/4BWnZx7BK6rTdWa1DuApsa4mA3kKtcIcOXC4=; b=Z38iEHTPQ5HJF7LZWBwvQ3gMX2qunfHm4/k+ByyDk4tlkVnCraFJhTBt81WPDEGwQk R8X4FH65WMVS8za/EN4tjMqIEWMRVfvX8yedq+9vPUfDH/YxVPHU1z2n0nCW7ZkLaYVy ePDOsAOG1Y5lgvSEyzRX1THx9bbMwwvRmp31A7erSPz0H2abSY+gLBmPeYAdsNKX6DgI nVkeCFJeAzsL3MGE6SSqDdLjESOaS+CDvXNtuZt8zY7e7UEYdy89MY5+kwcrNbhH0HQV thilpD6sLtqQS/DWD9NWwsxvjOWndT3kne5/yLRaYsI1+C76U0/DihwOMBTLCiGvbg6v 27BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=qLJytdt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v185-20020a6389c2000000b0053ef061096esi6809454pgd.438.2023.06.12.02.49.52; Mon, 12 Jun 2023 02:50:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=qLJytdt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232888AbjFLJaT (ORCPT + 99 others); Mon, 12 Jun 2023 05:30:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233108AbjFLJ3g (ORCPT ); Mon, 12 Jun 2023 05:29:36 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5FB1A1 for ; Mon, 12 Jun 2023 02:24:26 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f6dfc4e01fso41418625e9.0 for ; Mon, 12 Jun 2023 02:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1686561865; x=1689153865; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FtFss3/4BWnZx7BK6rTdWa1DuApsa4mA3kKtcIcOXC4=; b=qLJytdt6Jb/yVXsOZ6i6XGX8DjxK7ccMzfD1qS6kYgg8kta38u9WMlXXUab9tHe+YF K/ACwxglRzoF8jM6P1rF9+Ps5zpHWb4gIAiIB8L0DD7wQucMjDngSXyODnCyQ/XuJnxZ nDSIkg03r3lFVp/DfGV7PlLS6/gdgMWHdBwV9xrKYmPp4Ix5ADWRxT1D9s+DSFlU0BF+ XCGfRDHbr8rlCR3wCnBtDqpED95AsNwmBjVAcdYwcKLoCDQZ7UzlvYNVfZ2xFhNAoZf6 QigJ1LWe9B8J+1NmzCzmWHPrW9M+lR0OnYMO5XzU7BetZ902d+e18mzW32Tjru6XU2pp 4u2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686561865; x=1689153865; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FtFss3/4BWnZx7BK6rTdWa1DuApsa4mA3kKtcIcOXC4=; b=j4Ul18M4TibQgbjhCE1CjBExl/LNJ5AOH+TK+b/v8herHTiXaWHtbtlMfjw+YZxwhc XQxNOZDm1O5S8gg5sCDZjOh5x01TepHHdg1v5x5LxP2VM5r4ltU6802hZkdM36IV95Kg k9lGkyagmZhu6k5Q0M2VltyZDwcv0UG1wnFyI0PHXwO10iAdtC26/t+VLt2kbLW7ofAO VNvQU5so1ArJplL47/DdQhzz0wWaapn1uIWoupIC3WRXkMTmhWyxkz4FTzvpXqCHFtqt TXeGVe+pAtvfWWUHDyCZkSFJlsDxo0ap0IJhEkWxX7MYQdGupBOn245wz3Xe4tnFqisg i1/g== X-Gm-Message-State: AC+VfDxv4wSzyz1wbVHgYpeVTad9qszacgbe5LissDe9jWvMundqk24c LPFT4i2dqhXE5TXCyfDEkiIvIA== X-Received: by 2002:a7b:cd8a:0:b0:3f4:1cd8:3e99 with SMTP id y10-20020a7bcd8a000000b003f41cd83e99mr6686652wmj.28.1686561865141; Mon, 12 Jun 2023 02:24:25 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:a222:bbe9:c688:33ae]) by smtp.gmail.com with ESMTPSA id p14-20020a7bcc8e000000b003f727764b10sm10892044wma.4.2023.06.12.02.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 02:24:24 -0700 (PDT) From: Bartosz Golaszewski To: Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kishon Vijay Abraham I , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Bartosz Golaszewski Subject: [PATCH 00/26] arm64: qcom: sa8775p-ride: enable the first ethernet port Date: Mon, 12 Jun 2023 11:23:29 +0200 Message-Id: <20230612092355.87937-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski There are three ethernet ports on sa8775p-ride. This series contains changes required to enable one of the two 1Gb ports (the third one is 10Gb). We need to add a new driver for the internal SerDes PHY, introduce several extensions to the MAC driver (while at it: tweak coding style a bit etc.) and finally add the relevant DT nodes. Bartosz Golaszewski (26): phy: qualcomm: fix indentation in Makefile dt-bindings: phy: describe the Qualcomm SGMII PHY phy: qcom: add the SGMII SerDes PHY driver arm64: defconfig: enable the SerDes PHY for Qualcomm DWMAC net: stmmac: dwmac-qcom-ethqos: shrink clock code with devres net: stmmac: dwmac-qcom-ethqos: rename a label in probe() net: stmmac: dwmac-qcom-ethqos: tweak the order of local variables net: stmmac: dwmac-qcom-ethqos: use a helper variable for &pdev->dev net: stmmac: dwmac-qcom-ethqos: add missing include net: stmmac: dwmac-qcom-ethqos: add a newline between headers net: stmmac: dwmac-qcom-ethqos: remove stray space net: stmmac: dwmac-qcom-ethqos: add support for the optional serdes phy net: stmmac: dwmac-qcom-ethqos: make the rgmii clock optional net: stmmac: dwmac-qcom-ethqos: add optional phyaux clock net: stmmac: dwmac-qcom-ethqos: add support for the optional phy-supply net: stmmac: dwmac-qcom-ethqos: prepare the driver for more PHY modes net: stmmac: dwmac-qcom-ethqos: add support for SGMII net: stmmac: add new switch to struct plat_stmmacenet_data dt-bindings: net: snps,dwmac: add compatible for sa8775p ethqos dt-bindings: net: qcom,ethqos: add description for sa8775p net: stmmac: dwmac-qcom-ethqos: add support for emac4 on sa8775p platforms arm64: dts: qcom: sa8775p-ride: add the SGMII PHY node arm64: dts: qcom: sa8775p: add the first 1Gb ethernet interface arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY arm64: dts: qcom: sa8775p-ride: add pin functions for ethernet0 arm64: dts: qcom: sa8775p-ride: enable ethernet0 .../devicetree/bindings/net/qcom,ethqos.yaml | 14 +- .../devicetree/bindings/net/snps,dwmac.yaml | 3 + .../phy/qcom,sa8775p-dwmac-sgmii-phy.yaml | 52 ++ arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 109 +++++ arch/arm64/boot/dts/qcom/sa8775p.dtsi | 39 ++ arch/arm64/configs/defconfig | 1 + .../stmicro/stmmac/dwmac-qcom-ethqos.c | 273 ++++++++--- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/phy/qualcomm/Kconfig | 9 + drivers/phy/qualcomm/Makefile | 3 +- drivers/phy/qualcomm/phy-qcom-sgmii-eth.c | 446 ++++++++++++++++++ include/linux/stmmac.h | 1 + 12 files changed, 890 insertions(+), 62 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml create mode 100644 drivers/phy/qualcomm/phy-qcom-sgmii-eth.c -- 2.39.2