From patchwork Mon Mar 20 22:16:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13181933 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 01AE5C6FD1C for ; Mon, 20 Mar 2023 22:17: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: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:In-Reply-To:References: List-Owner; bh=TXHwXfcvTXjzudqY4B27o/aeG3qpGVaXe9PRmvqnfzg=; b=svCqQMPCbsM75B JtDySlI/OM7VINHgbat8AA8Bo0H5b9VzqYPKH2DbgVRk+EI8UbOvEPULoh/k9DTH5IsLAph8Y6b3Q LR2KMNjOABIbovHfNTYBdTNzXdgXhfypSStkN6EwbQeCaYQUPhoW32DV7MFCOa5xXMMhUU9S6qWYR PI6a7NOSV/OaQL3ujBr7rbNfr3LSfw/5kYorTrI8rjG8EizdtdNh4YccN7KaRuHcNiN28IJ3uXTDA nxa1GnA/Bcvx5pcipqbAbO265sl85hGOJdxpmmBq4MG9f+J3izSkulurvPRYJv1Wi/14a6gvCYok7 mvwvSnGEOuT4a/YXol7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peNo0-00Abwj-35; Mon, 20 Mar 2023 22:16:40 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peNnx-00Abvc-2C for linux-arm-kernel@lists.infradead.org; Mon, 20 Mar 2023 22:16:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679350595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pYp/+TvIZEdbO864hX1ZaEe6NV95MuM6NldpNo+j88=; b=K7DQ7AC7+b/juo3xmxmW7NpCfdOvaIQW1hxtYebGRJ3eXSLxcDXRARmFhA1ER4DbT8l3e1 tI9piwESwlhK1YMga1GsLKscrYQZvnM2WJXBTILB1FWb4UUc9lxKMT6lQ2zrcGcpeaxzSN Gx4rRLHHZjbLihPcIWJ9DnRVCl21cLE= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-616-zBPfQFgTNW-M8itROR0WVA-1; Mon, 20 Mar 2023 18:16:34 -0400 X-MC-Unique: zBPfQFgTNW-M8itROR0WVA-1 Received: by mail-ot1-f72.google.com with SMTP id z6-20020a9d65c6000000b0069f099e0d6aso3436368oth.13 for ; Mon, 20 Mar 2023 15:16:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679350594; 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=/pYp/+TvIZEdbO864hX1ZaEe6NV95MuM6NldpNo+j88=; b=1ySBQCtdVIoHJ1qzkWc8htUVrJQ48eD1hfN4xzJmNsIDeZvf/PC+m7SO9zDUnf1/w5 2mr1/7O3hwA3AXwFZxvQl5InuwyxRx7EiGNRyInXlTiBMiuVoXRlkvEO3v9uMgPhf37I W8YtUsn2dLFqMzGKe25U582wL2WCnU3O0tg8ZRdqzRQCWfcdb4VNlxm7QC66cCWLnT2C 4sWL6ilWTZyN0oMOql1OMORcca1V0klX+e62NF/qsFbYLBOPBb8hAHkl4s/r3FhMdyNG MIYu1+KC5HJSl5G7xMNhPVXyf3EZdTxfwgPcsJY1yDglnZ7rkG7oJM0nriUJJcyBg8Yv 44hg== X-Gm-Message-State: AO0yUKUh6XWcdwpH+b/FKS4FoD+CyEF4mSnKGTshuQzJvAKnafG2IJxI 78Iumpe9++PZF4rtkejsKiTatxhdZqtyfAfzAxdRuuw6sqMQilwSzV0E9jmTMUYObe3Iv+ldpfw 8TSd6e3bG7oyIlYxpL1gxL6UM05cq0pDP6Uo= X-Received: by 2002:a05:6808:10c:b0:387:117f:f7fb with SMTP id b12-20020a056808010c00b00387117ff7fbmr25068oie.20.1679350593836; Mon, 20 Mar 2023 15:16:33 -0700 (PDT) X-Google-Smtp-Source: AK7set+FD0dDk0+dvXSvybPdytDkBKj3L/oyZtE72xtPkWildC/DlDoAUTQxy/hAD04b7A6y0cPDLA== X-Received: by 2002:a05:6808:10c:b0:387:117f:f7fb with SMTP id b12-20020a056808010c00b00387117ff7fbmr24984oie.20.1679350590464; Mon, 20 Mar 2023 15:16:30 -0700 (PDT) Received: from halaney-x13s.redhat.com (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id q204-20020a4a33d5000000b0053853156b5csm4092465ooq.8.2023.03.20.15.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 15:16:29 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, bhupesh.sharma@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com, linux@armlinux.org.uk, veekhee@apple.com, tee.min.tan@linux.intel.com, mohammad.athari.ismail@intel.com, jonathanh@nvidia.com, ruppala@nvidia.com, bmasney@redhat.com, andrey.konovalov@linaro.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ncai@quicinc.com, jsuraj@qti.qualcomm.com, hisunil@quicinc.com, echanude@redhat.com, Andrew Halaney Subject: [PATCH net-next v2 00/12] Add EMAC3 support for sa8540p-ride Date: Mon, 20 Mar 2023 17:16:05 -0500 Message-Id: <20230320221617.236323-1-ahalaney@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_151637_797797_E5525839 X-CRM114-Status: GOOD ( 13.59 ) 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 is a forward port / upstream refactor of code delivered downstream by Qualcomm over at [0] to enable the DWMAC5 based implementation called EMAC3 on the sa8540p-ride dev board. From what I can tell with the board schematic in hand, as well as the code delivered, the main changes needed are: 1. A new address space layout for /dwmac5/EMAC3 MTL/DMA regs 2. A new programming sequence required for the EMAC3 base platforms This series makes those adaptations as well as other housekeeping items such as converting dt-bindings to yaml, adding clock descriptions, etc. [0] https://git.codelinaro.org/clo/la/kernel/ark-5.14/-/commit/510235ad02d7f0df478146fb00d7a4ba74821b17 v1: https://lore.kernel.org/netdev/20230313165620.128463-1-ahalaney@redhat.com/ Thanks, Andrew Andrew Halaney (8): dt-bindings: net: qcom,ethqos: Add Qualcomm sc8280xp compatibles clk: qcom: gcc-sc8280xp: Add EMAC GDSCs arm64: dts: qcom: sc8280xp: Add ethernet nodes arm64: dts: qcom: sa8540p-ride: Add ethernet nodes net: stmmac: Remove unnecessary if statement brackets net: stmmac: dwmac-qcom-ethqos: Respect phy-mode and TX delay net: stmmac: dwmac-qcom-ethqos: Use loopback_en for all speeds net: stmmac: dwmac-qcom-ethqos: Add EMAC3 support Bhupesh Sharma (3): dt-bindings: net: snps,dwmac: Update interrupt-names dt-bindings: net: snps,dwmac: Add Qualcomm Ethernet ETHQOS compatibles dt-bindings: net: qcom,ethqos: Convert bindings to yaml Brian Masney (1): net: stmmac: Add EMAC3 variant of dwmac4 .../devicetree/bindings/net/qcom,ethqos.txt | 66 ---- .../devicetree/bindings/net/qcom,ethqos.yaml | 111 ++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 9 +- MAINTAINERS | 2 +- arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 181 ++++++++++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 53 +++ drivers/clk/qcom/gcc-sc8280xp.c | 18 + .../stmicro/stmmac/dwmac-qcom-ethqos.c | 161 ++++++--- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 32 +- .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 235 ++++++++++-- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 334 ++++++++++++++---- .../net/ethernet/stmicro/stmmac/dwmac4_dma.h | 38 ++ .../net/ethernet/stmicro/stmmac/dwmac4_lib.c | 144 ++++++-- drivers/net/ethernet/stmicro/stmmac/hwif.c | 29 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 + .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 17 +- .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 9 +- .../net/ethernet/stmicro/stmmac/stmmac_ptp.c | 4 +- include/dt-bindings/clock/qcom,gcc-sc8280xp.h | 2 + include/linux/stmmac.h | 1 + 21 files changed, 1196 insertions(+), 258 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.txt create mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.yaml