From patchwork Mon Oct 21 02:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13843506 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 7A448D3C927 for ; Mon, 21 Oct 2024 02:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: 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=SDwVvRsmB8PgMAF9NalbRCBobUSoLoKxM6gCOMAKho0=; b=DiC3/Txf/vmP9n vBoV6VPVh3YHHZSkmDISi4SDEvEknYm5LGsw8SgDVua3u/FZnJ7mvUlWRptsuwvlT8P+QPl1AM/oe aa0aaL3k5UV36jf5Bl/ep2Ro+M+JijfSQGhfViyObj7PHfHwD8Q0CVM+M2xRfzlvn0K6dAnut8PwV q1n0iSeso6k9fCB83jDUuQZoF8SwCnXPDa5l4o8pFNWa5hulwv2P8qyAXXlM8dmzF7qkUrg/ZZfRd twBl+43ps1WE0JZ9fQUC+UoIzbc9Y3wdda3TyKuFVfv56Ao5qZdgkAR43P8aNYb/oPsZMNHACcNYO Ghh5drnjIT9xensc6gjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2iJT-00000005sgo-3dxD; Mon, 21 Oct 2024 02:38:31 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2iHv-00000005sIK-0eBi for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 02:36:56 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2e2e050b1c3so3487218a91.0 for ; Sun, 20 Oct 2024 19:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1729478214; x=1730083014; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=SDwVvRsmB8PgMAF9NalbRCBobUSoLoKxM6gCOMAKho0=; b=WPjqVrlI6U7z9Al6M6Kc5tNEf4NRKMsJvuTWKW2vrQlgJzd3CiMUjcSp/e9ILtJUGA CoW0rZR8WGPvNib5BoNCAyKWg3jz8UwCfKgeOSh6WT8Nj7oMY7LwGEgSdNxtKbUwi+Wt HYAlW8evpQejOPJRRe2wirPGhmMQ5VHbDwU8mIuOL7sxlGFDPnGMF5FOkdUvEQhQw984 LjcKiSOndSPB+lRBS1ZeIG6zh1csKYJ0H/W2UzTQEHKMPMjFY29ZPkX+Ie/g8e4XCApq H43JG+j6lHFRiAt/wSk/2Jjyx+Lp4A2mHsidilsOtbRsciDOsXSTtEwZQ0E2radthbEl TNyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729478214; x=1730083014; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SDwVvRsmB8PgMAF9NalbRCBobUSoLoKxM6gCOMAKho0=; b=MfLz7YrcTyRIdqWAgnC/4UyViENGd0ILEP6kvhYx9tFmpKNSqNWpWBvl9zGeXLxEUm FIUy2m844h93xrnTc2ouH0fm4VbSJB8W5hXaG8G8XhUq1ABLFK54ZZLFfbjbCcL3XUn9 N4fM8NajZ4aiqTvbQXql/BMhYLDnJnqhx1BC4bb8RO4RJ+BMvycE96autR6aaWNdWxap a33o+S7rweshc+A6EovA+pK4Q8nOFuhPW1TjrdkLqV48ZbC7Ohimkaa2BXoIYQUWSerm EAwAexpntAOqaFIoWvQnHZWbPkdmEfx4a7UW8RkTdEbP7ayUljjGdkuHdkToja+AaCSV iMQw== X-Forwarded-Encrypted: i=1; AJvYcCW067xKRG/i8OyDcaryMHSUVHCwgSHX5JjxkrzIHwAdGoLOId8+zA2Gq75UzvKhm2Li9BpXrC/cE8K9iJ/EYEWV@lists.infradead.org X-Gm-Message-State: AOJu0Yz8tjcN+Odh/yqfjroL+Aex1DWGvnbGTR3anM4vwj+BqbqbRyO6 XSnrXRAfBXllECNf6XrZW3R/EgMET0svCdGs9/8uMbAFQY26KaYRY5GCfhIn4PU= X-Google-Smtp-Source: AGHT+IGNXTzbHIjYscMQc1FyHJL74YRfT9c4LzptWN49IdWjspBw/dUxnVD8S9MWaYzR1JmG3gfNjA== X-Received: by 2002:a17:90a:bc9:b0:2d8:7a63:f9c8 with SMTP id 98e67ed59e1d1-2e3dc2d22f0mr20946491a91.14.1729478213703; Sun, 20 Oct 2024 19:36:53 -0700 (PDT) Received: from [127.0.1.1] (71-34-69-82.ptld.qwest.net. [71.34.69.82]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e5ad355bebsm2337008a91.7.2024.10.20.19.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2024 19:36:53 -0700 (PDT) From: Drew Fustini Subject: [PATCH net-next v4 0/3] Add the dwmac driver support for T-HEAD TH1520 SoC Date: Sun, 20 Oct 2024 19:35:59 -0700 Message-Id: <20241020-th1520-dwmac-v4-0-c77acd33ccef@tenstorrent.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAA++FWcC/x2MQQqAIBAAvyJ7TlAxkr4SHUq33EMWKiWEf086D XOYeSFhJEwwshci3pToDE10x8D6JezIyTUHJZSWQgmevewb3HMslqPU1prNaDWs0JIr4kbl300 QMPOAJcNc6wd0tB++aAAAAA== To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Maxime Coquelin , Emil Renner Berthing , Jisheng Zhang , Guo Ren , Fu Wei , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Lunn , Drew Fustini Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Drew Fustini , linux-stm32@st-md-mailman.stormreply.com X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_193655_232890_18B14799 X-CRM114-Status: GOOD ( 17.91 ) 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 series adds support for dwmac gigabit ethernet in the T-Head TH1520 RISC-V SoC along with dts patches to enable the ethernet ports on the BeagleV Ahead and the LicheePi 4A. The pinctrl-th1520 driver, pinctrl binding, and related dts patches are in linux-next so there are no longer any prerequisite series that need to be applied first. Changes in v4: - Rebase on next for pinctrl dependency - Add 'net-next' prefix to subject per maintainer-netdev.rst - Add clocks, clock-names, interrupts and interrupt-names to binding - Simplify driver code by switching from regmap to regualar mmio Changes in v3: - Rebase on v6.12-rc1 - Remove thead,rx-internal-delay and thead,tx-internal-delay properties - Remove unneeded call to thead_dwmac_fix_speed() during probe - Fix filename for the yaml file in MAINTAINERS patch - Link: https://lore.kernel.org/linux-riscv/20240930-th1520-dwmac-v3-0-ae3e03c225ab@tenstorrent.com/ Changes in v2: - Drop the first patch as it is no longer needed due to upstream commit d01e0e98de31 ("dt-bindings: net: dwmac: Validate PBL for all IP-cores") - Rename compatible from "thead,th1520-dwmac" to "thead,th1520-gmac" - Add thead,rx-internal-delay and thead,tx-internal-delay properties and check that it does not exceed the maximum value - Convert from stmmac_dvr_probe() to devm_stmmac_pltfr_probe() and delete the .remove_new hook as it is no longer needed - Handle return value of regmap_write() in case it fails - Add phy reset delay properties to the BeagleV Ahead device tree - Link: https://lore.kernel.org/linux-riscv/20240926-th1520-dwmac-v2-0-f34f28ad1dc9@tenstorrent.com/ Changes in v1: - remove thead,gmacapb that references syscon for APB registers - add a second memory region to gmac nodes for the APB registers - Link: https://lore.kernel.org/all/20240713-thead-dwmac-v1-0-81f04480cd31@tenstorrent.com/ --- Emil Renner Berthing (1): riscv: dts: thead: Add TH1520 ethernet nodes Jisheng Zhang (2): dt-bindings: net: Add T-HEAD dwmac support net: stmmac: Add glue layer for T-HEAD TH1520 SoC .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../devicetree/bindings/net/thead,th1520-gmac.yaml | 115 +++++++++ MAINTAINERS | 2 + arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 91 +++++++ .../boot/dts/thead/th1520-lichee-module-4a.dtsi | 119 +++++++++ arch/riscv/boot/dts/thead/th1520.dtsi | 50 ++++ drivers/net/ethernet/stmicro/stmmac/Kconfig | 10 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c | 268 +++++++++++++++++++++ 9 files changed, 657 insertions(+) --- base-commit: f2493655d2d3d5c6958ed996b043c821c23ae8d3 change-id: 20241020-th1520-dwmac-e14cc8f8427b Best regards,