Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1660292rwl; Fri, 31 Mar 2023 14:48:47 -0700 (PDT) X-Google-Smtp-Source: AKy350bzv+09kZlFTJfeahez0Xe1J+0xCTUxamqyUgvm/Q3+imkRo0r8AMcgohNwaJcKVvPGLS85 X-Received: by 2002:a05:6402:34c6:b0:502:1cf6:f52c with SMTP id w6-20020a05640234c600b005021cf6f52cmr8659915edc.4.1680299326775; Fri, 31 Mar 2023 14:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680299326; cv=none; d=google.com; s=arc-20160816; b=Gy14iSr8Xf7IVWP1tcNLB1Q6oWwo8Vn8qW5FDdz2YT28LLFmn0VYGC8wK7MajTzEg+ 75EA5RhSsTt9DD4eTXi2zYTg0iudphi6VAumZSY9AD5Ftj6oZVcZIjedDVBvCHB5t9BK DHmSmT5n/1/QH+bP83bu/F32xyor47wsoI4b1Udvm+n370F9XWyjmq/6Lab7hFt2G+op 0dfSrQUWj4r/cgOPD3QfyPHzHShakpk/yl9mdeVnbAh2MHW4mT3uRXqn1T6T4XY54yGU YMM5QF6nxhKS/0OJUIgSoSo4TbKSX0iMWY1vkPD17TNfCSnJGRXLTAo5CB9s6l191LzO KXkA== 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=qRXp4dQiGms/64nGsSVBVjLN6Pe4B52p8MOn8ojXq0c=; b=pWGZx0tmjrgtExbHrN0f9bkTr9kfhA+vlKrWcyERyEAax2IybdI+nSqaSDwjYQ2hGI ZK3HquRRURU7w486g0/e8HPHynXwzXvodVe8+jI9j6PQUc2NmN87VYrQuJjIBJtHRusU r8vkjDmFyMRGuObR7e365WL5AKBrS0E77EW77ii4EwvGLoQjtZEqgt15Z4W0OUqneQC2 QCKXSv1dTbvk16DlDEN7plQ5zraikKAOziooWoRPCnGVBWkouQD2cfstEXppXcmIenib vxYFh32FX53fnRDyB8eUsN6PVdZrH6C7Rt6hFQIMdUJPTquap0nrNUSYqUmonVagql3U wlwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SCgdhLkq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020aa7d3d1000000b004c30cb1f8cdsi2677090edr.224.2023.03.31.14.48.21; Fri, 31 Mar 2023 14:48:46 -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=@redhat.com header.s=mimecast20190719 header.b=SCgdhLkq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233079AbjCaVqz (ORCPT + 99 others); Fri, 31 Mar 2023 17:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbjCaVqx (ORCPT ); Fri, 31 Mar 2023 17:46:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A862918F9A for ; Fri, 31 Mar 2023 14:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680299171; 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=qRXp4dQiGms/64nGsSVBVjLN6Pe4B52p8MOn8ojXq0c=; b=SCgdhLkq81Vl2bH6YKcNoP2DgwX2hYLl37ljqp8bBGdVFyD47aqPfY5ZbeoWSw9LdOm+/e frOGVt7XSx0xslKKuNkVVzvFzTXm6PQjhozRBdmcM757bDDwjjGr0zKmidiupRoqX2t62u KKRqW7Wud6R6Paf5A20i0FriCxIUNJU= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-SkyKmBSoONKKWkiVuDxINA-1; Fri, 31 Mar 2023 17:46:10 -0400 X-MC-Unique: SkyKmBSoONKKWkiVuDxINA-1 Received: by mail-ot1-f71.google.com with SMTP id f14-20020a9d5f0e000000b0069d8d0ff799so8689050oti.6 for ; Fri, 31 Mar 2023 14:46:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680299169; 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=qRXp4dQiGms/64nGsSVBVjLN6Pe4B52p8MOn8ojXq0c=; b=YEmaDImC/YmGlIfhNgigdyscJiHyXTpyudCbCD9WbvuZGT7FZIJNcEFO2x3QXy0iYb N/RMRvDURk//vxHRlmSWzIYErDm86Ywyl2WwP/yxKJw448e+OJ4obACOnU2gvSEjou5z bq3gIQ89ZNQ28339DCBmqkb1IUdqTD2QOQL6/XtwvKcZZHMAXlRsHjxkxM/S2UstFx2I 0Obuoy95Lrf8s+EOJsEumRalotCgDinB5X9axCWBB6owmNa19Yy3sEjcm/ZFKU3iT7Bg 4EcnNfiQ0fCL0BBap9jyohTOK6nxfF7RItHk9d5UmHhq2EuwyqMNvvBk3oGAcraMaZkL H+nQ== X-Gm-Message-State: AAQBX9ee1Mz1YDtt4wVI5FPCddw3svbM8D/XEUNG9qQU4bLZMxDZLhR0 DDRe+qv61XtgMeEZJ7SsPFa3gevTyfqE0aNuxFZNM0S38DTqixs+TwOSREeRosKpy63CQrOlRSC VH3m+m0SET1Zo12WNfst58QixD2nYZnp6cJ8HcGHy1xCa3mc64MadJzXbge0nvmJ7Q405a/xIeH J08GM+peWYcJA= X-Received: by 2002:a9d:7310:0:b0:698:d198:fe9b with SMTP id e16-20020a9d7310000000b00698d198fe9bmr13806514otk.10.1680299169134; Fri, 31 Mar 2023 14:46:09 -0700 (PDT) X-Received: by 2002:a9d:7310:0:b0:698:d198:fe9b with SMTP id e16-20020a9d7310000000b00698d198fe9bmr13806471otk.10.1680299168800; Fri, 31 Mar 2023 14:46:08 -0700 (PDT) Received: from halaney-x13s.attlocal.net (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id x80-20020a4a4153000000b0053d9be4be68sm1328531ooa.19.2023.03.31.14.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:46:08 -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, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, mturquette@baylibre.com, 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-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 v3 00/12] Add EMAC3 support for sa8540p-ride Date: Fri, 31 Mar 2023 16:45:37 -0500 Message-Id: <20230331214549.756660-1-ahalaney@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 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 the change for 1 above as well as other housekeeping items such as converting dt-bindings to yaml, etc. As requested[1], it has been split up by compile time / maintainer tree. I will post a link to the associated devicetree changes that together with this series get the hardware functioning. [0] https://git.codelinaro.org/clo/la/kernel/ark-5.14/-/commit/510235ad02d7f0df478146fb00d7a4ba74821b17 [1] https://lore.kernel.org/netdev/20230320202802.4e7dc54c@kernel.org/ v2: https://lore.kernel.org/netdev/20230320221617.236323-1-ahalaney@redhat.com/ v1: https://lore.kernel.org/netdev/20230313165620.128463-1-ahalaney@redhat.com/ Thanks, Andrew Andrew Halaney (9): dt-bindings: net: qcom,ethqos: Add Qualcomm sc8280xp compatibles net: stmmac: Remove unnecessary if statement brackets net: stmmac: Fix DMA typo net: stmmac: Remove some unnecessary void pointers net: stmmac: Pass stmmac_priv in some callbacks net: stmmac: dwmac4: Allow platforms to specify some DMA/MTL offsets 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 .../devicetree/bindings/net/qcom,ethqos.txt | 66 ------ .../devicetree/bindings/net/qcom,ethqos.yaml | 111 ++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 9 +- MAINTAINERS | 2 +- .../net/ethernet/stmicro/stmmac/chain_mode.c | 10 +- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- .../stmicro/stmmac/dwmac-qcom-ethqos.c | 177 +++++++++++---- .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 36 ++-- .../ethernet/stmicro/stmmac/dwmac1000_core.c | 3 +- .../ethernet/stmicro/stmmac/dwmac1000_dma.c | 19 +- .../ethernet/stmicro/stmmac/dwmac100_dma.c | 14 +- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 91 ++++++-- .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 50 +++-- .../ethernet/stmicro/stmmac/dwmac4_descs.c | 8 +- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 201 +++++++++++------- .../net/ethernet/stmicro/stmmac/dwmac4_dma.h | 89 +++++--- .../net/ethernet/stmicro/stmmac/dwmac4_lib.c | 105 +++++---- .../net/ethernet/stmicro/stmmac/dwmac_dma.h | 22 +- .../net/ethernet/stmicro/stmmac/dwmac_lib.c | 18 +- .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 9 +- .../ethernet/stmicro/stmmac/dwxgmac2_descs.c | 6 +- .../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 71 ++++--- .../net/ethernet/stmicro/stmmac/enh_desc.c | 11 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 176 ++++++++------- .../net/ethernet/stmicro/stmmac/norm_desc.c | 8 +- .../net/ethernet/stmicro/stmmac/ring_mode.c | 10 +- .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 +- include/linux/stmmac.h | 19 ++ 28 files changed, 871 insertions(+), 475 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.txt create mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.yaml -- 2.39.2