From patchwork Mon Mar 13 16:56:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13172969 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 472BBC61DA4 for ; Mon, 13 Mar 2023 17:06:06 +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=w9Umy32o02vrODddTIfC6BRgCYRN5UxnyE4rGgzoy+M=; b=J62U3eKqfgU6PY SnLhngldy4o9sCm7efHZWeDt+xTO2sJBfqO8y6hoL+Ro+A4IBxEpS44XVfwOoJ73J9J4ya1ZcikbG 7PBkOV5mZuntu0HeDiJF2oVcycf2hPlGTV39fWNH2OMudS7rhFYT08sJfgakk36vjITdh7ElCb6QY UvKnctD2K7sB8TLfG/WrqeLcC6p3pcOoqNQQBiEvZi0is5HfnJnmVKSWOajifnY6UmPJL7uSDyipb N2vZxwWdkHAofUvDQY4yK+fSK3xMBLINNwUmCxb33rXU4hdOwSINAomlqC83Y/hCKpVseDL3CWV/7 NgG+E/mvXK+bY3LN2orA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pblbK-006xDW-RV; Mon, 13 Mar 2023 17:04:48 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pblUB-006uHQ-6j for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 16:57:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678726639; 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=t5POBg1qZ82GqoEDaDaIA79xn4Mgw94E10MmvGFG+QA=; b=JLOjZqJ0RWQzrZ1tdSlDJBvZFrtJus2alQQIor9zsGGha4WRZUFDeQtdg6u3YhCIz2XfHA FVvcb6W6my2NiSH5eA3ipsebRU+njvFDFrWmbfzOLNA9xwUuRYzcdl/Vj4I0Gqds11NXBV XGYTuqMu8HtIYACOAHESkLTh6j6zFQc= Received: from mail-oa1-f72.google.com (mail-oa1-f72.google.com [209.85.160.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-EXm-YnwYNd6PNjumipufFQ-1; Mon, 13 Mar 2023 12:57:18 -0400 X-MC-Unique: EXm-YnwYNd6PNjumipufFQ-1 Received: by mail-oa1-f72.google.com with SMTP id 586e51a60fabf-172cafd4245so7661079fac.21 for ; Mon, 13 Mar 2023 09:57:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678726638; 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=t5POBg1qZ82GqoEDaDaIA79xn4Mgw94E10MmvGFG+QA=; b=A3DBQ0TlC8OYL+ctHJGvhlgVdMOSG0ZwG65rIepOoy2+jemdq8ChPE8XCNZJE43hBQ LuK0y/+q0xp6VqiogKjwFbul71tYGfsXnxzVdHesst6G62gZJSaJFHOsLrYD+6iDunL0 pc57O0w/kQ6dvFvsMw1bCYXpApDpVTlm8BszOehn2y4mzXxUiS6XnAajAd4PIaz+wkOe CQClzZ9/ap7jhIzm2m5wjl1PQh3RaaL9jLyXuwLgHC2MeC5/v5NJxSKPlAH6k1FkWMBY Y5LNaqHRojjI3PNTBtj0TBsCKZjKGoTqpDfRHf53bG87WhdJYWI6s8l7eB0FRBSz/iUY nINg== X-Gm-Message-State: AO0yUKWQ3bnu+xoQXl6UhR542X98hosoSv9mTwbcSlnJjxanBK07ON2I PuVQ8oamfYUF6lsi88sQa2N5f1O7bPvsZypTwmONPbXprFK/ZvvMCMzs/kUv+/eRj5oQXeSV4gu /zA+K3QiKkgypfl6IQk4Dx68lnW7iu6uey0A= X-Received: by 2002:a05:6808:150:b0:37f:b1d6:9f3c with SMTP id h16-20020a056808015000b0037fb1d69f3cmr17439012oie.46.1678726637931; Mon, 13 Mar 2023 09:57:17 -0700 (PDT) X-Google-Smtp-Source: AK7set/DcZ9ZIOTk8pbqQbIpqBKMFacVCaRW/B1/QFZ8b2XK2GO2nvasDBBZ4a2w0GAU24OnbrYXGg== X-Received: by 2002:a05:6808:150:b0:37f:b1d6:9f3c with SMTP id h16-20020a056808015000b0037fb1d69f3cmr17438954oie.46.1678726636191; Mon, 13 Mar 2023 09:57:16 -0700 (PDT) Received: from halaney-x13s.attlocal.net ([2600:1700:1ff0:d0e0::21]) by smtp.gmail.com with ESMTPSA id o2-20020acad702000000b00384d3003fa3sm3365273oig.26.2023.03.13.09.57.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 09:57:15 -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, Andrew Halaney Subject: [PATCH net-next 00/11] Add EMAC3 support for sa8540p-ride Date: Mon, 13 Mar 2023 11:56:09 -0500 Message-Id: <20230313165620.128463-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-20230313_095723_541853_25E4E028 X-CRM114-Status: GOOD ( 13.05 ) 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 Thanks, Andrew 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 | 113 ++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 11 +- 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 | 190 ++++++++-- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 336 ++++++++++++++---- .../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, 1164 insertions(+), 251 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.txt create mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.yaml