From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D639C433F5 for ; Wed, 30 Mar 2022 10:08:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 81D76840E9; Wed, 30 Mar 2022 12:08:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1648634892; bh=vCkR/ycFs4dDBbo5plqShzEcrfLoK71DDC2IYsExh5M=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=SRV3Q4Lw6tfFaJhWFBgrIXnQxfZyzp/uxQmPrjJac7hu3KUtQpKWZXfSODSEtD61i DuOBxkgsBJy3luifw4lDHEGo+ewS7O2bQeNFRIaJcvndJ6LxUuYbdCrGT0cBcZ7tKO L7/tCjjC5xlkLy9wLjx362w39WktEbwbYUq2XVUcrnp59rSY3YYnZu/48nXOIl8mXF CqWGloA8AJXhBzEoDHAppUzCxko8pny9dMokTYVudkbB/TCvJK43w3W7wX+CweL3AE lXIscSUWqncEUMmyGZBbTRoZljByk42dHGJqRs65+88dx8EAXKbuRs2sk4jtzBfM9U wVG/ij91SvV+w== Received: by phobos.denx.de (Postfix, from userid 109) id 4C3C3840DE; Wed, 30 Mar 2022 12:07:47 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [91.198.250.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4E386840C1 for ; Wed, 30 Mar 2022 12:07:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp102.mailbox.org (unknown [91.198.250.119]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4KT2DV1qWnz9sSL; Wed, 30 Mar 2022 12:07:38 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: awilliams@marvell.com, cchavva@marvell.com Subject: [PATCH 00/52] mips: octeon: Add ethernet support Date: Wed, 30 Mar 2022 12:06:36 +0200 Message-Id: <20220330100728.871561-1-sr@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This patchset adds the networking files and drivers including device helper headers and C files. Please excuse the massive amount of files in this patch series. Also the sometimes huge files (mostly headers with register definitions) that I needed to include. The infrastructure code with all the headers is ported mistly without any intended functional changes from the 2013 Cavium / Marvell U-Boot version. It has undergone many hours of extensive code cleanup and reformatting. Some of it done by using tools (checkpatch, Lindent, clang format etc) and also some of it done manually, as I couldn't find some tools that could do the needed work in a reliable and functional way. The result is that checkpatch now only throws a "few" warnings that are left. Some of those can't be removed without an even more extensive cleanup / rewrite of the code, like the addition of typedefs. The added header, helper and infrastructure files in the first part of the patch-series (patches 1-43) are the foundation, that is used by the main Octeon U-Boot ethernet driver (patch 50/52). Patches 47-49 add the DT nodes and properties to the corresponding dtsi / dts files. Patches 51 & 52 finally enable the ethernet support both MIPS Octeon boards, EBB7304 & NIC23. All this is tested on the 2 Cavium / Marvell MIPS Octeon boards: EBB7304 & NIC23 This patchset including the small Marvell PHY patches is available in this gitlab branch: https://source.denx.de/u-boot/custodians/u-boot-marvell/-/tree/mips-octeon-ethernet-v1-2022-03-30 Thanks, Stefan Aaron Williams (40): mips: octeon: Add misc cvmx-* header files mips: octeon: Add cvmx-ilk-defs.h header file mips: octeon: Add cvmx-iob-defs.h header file mips: octeon: Add cvmx-lbk-defs.h header file mips: octeon: Add cvmx-npei-defs.h header file mips: octeon: Add cvmx-pcsxx-defs.h header file mips: octeon: Add cvmx-xcv-defs.h header file mips: octeon: Add cvmx-helper-agl.c mips: octeon: Add cvmx-helper-bgx.c mips: octeon: Add cvmx-helper-board.c mips: octeon: Add cvmx-helper-fpa.c mips: octeon: Add cvmx-helper-igl.c mips: octeon: Add cvmx-helper-ipd.c mips: octeon: Add cvmx-helper-loop.c mips: octeon: Add cvmx-helper-npi.c mips: octeon: Add cvmx-helper-pki.c mips: octeon: Add cvmx-helper-pko.c mips: octeon: Add cvmx-helper-pko3.c mips: octeon: Add cvmx-helper-rgmii.c mips: octeon: Add cvmx-helper-sgmii.c mips: octeon: Add cvmx-helper-sfp.c mips: octeon: Add cvmx-helper-xaui.c mips: octeon: Add cvmx-agl.c mips: octeon: Add cvmx-cmd-queue.c mips: octeon: Add cvmx-fau-compat.c mips: octeon: Add cvmx-fpa.c mips: octeon: Add cvmx-fpa-resource.c mips: octeon: Add cvmx-global-resource.c mips: octeon: Add cvmx-ilk.c mips: octeon: Add cvmx-ipd.c mips: octeon: Add cvmx-pki.c mips: octeon: Add cvmx-pki-resources.c mips: octeon: Add cvmx-pko.c mips: octeon: Add cvmx-pko3.c mips: octeon: Add cvmx-pko3-queue.c mips: octeon: Add cvmx-pko3-compat.c mips: octeon: Add cvmx-pko3-resources.c mips: octeon: Add cvmx-pko-internal-ports-range.c mips: octeon: Add cvmx-qlm-tables.c mips: octeon: Add cvmx-range.c Stefan Roese (12): mips: octeon: Misc changes to existing headers for upcoming eth support mips: octeon: Misc changes to existing C files for upcoming eth support mips: octeon: Makefile: Enable building of the newly added C files mips: octeon: cpu.c: Move bootmem init to arch_early_init_r() mips: octeon: cpu.c: Implement configure_lmtdma_window() mips: octeon: octeon_common.h: Move init SP because of increased image size mips: octeon: mrvl,cn73xx.dtsi: Add ethernet (BGX) and SMI DT nodes mips: octeon: mrvl,octeon-ebb7304.dts: Add ethernet DT support mips: octeon: mrvl,octeon-nic23.dts: Add ethernet DT support net: Add ethernet support for MIPS Octeon mips: octeon: ebb7304: Enable ethernet support mips: octeon: nic23: Enable ethernet support arch/mips/Kconfig | 1 + arch/mips/dts/mrvl,cn73xx.dtsi | 35 + arch/mips/dts/mrvl,octeon-ebb7304.dts | 45 + arch/mips/dts/mrvl,octeon-nic23.dts | 238 ++ arch/mips/mach-octeon/Makefile | 35 +- arch/mips/mach-octeon/cpu.c | 47 +- arch/mips/mach-octeon/cvmx-agl.c | 216 + arch/mips/mach-octeon/cvmx-bootmem.c | 3 +- arch/mips/mach-octeon/cvmx-cmd-queue.c | 449 +++ arch/mips/mach-octeon/cvmx-fau-compat.c | 53 + arch/mips/mach-octeon/cvmx-fpa-resource.c | 305 ++ arch/mips/mach-octeon/cvmx-fpa.c | 1672 ++++++++ arch/mips/mach-octeon/cvmx-global-resources.c | 639 +++ arch/mips/mach-octeon/cvmx-helper-agl.c | 231 ++ arch/mips/mach-octeon/cvmx-helper-bgx.c | 3215 +++++++++++++++ arch/mips/mach-octeon/cvmx-helper-board.c | 2030 ++++++++++ arch/mips/mach-octeon/cvmx-helper-cfg.c | 67 +- arch/mips/mach-octeon/cvmx-helper-fdt.c | 645 ++- arch/mips/mach-octeon/cvmx-helper-fpa.c | 329 ++ arch/mips/mach-octeon/cvmx-helper-ilk.c | 926 +++++ arch/mips/mach-octeon/cvmx-helper-ipd.c | 313 ++ arch/mips/mach-octeon/cvmx-helper-loop.c | 178 + arch/mips/mach-octeon/cvmx-helper-npi.c | 146 + arch/mips/mach-octeon/cvmx-helper-pki.c | 2156 ++++++++++ arch/mips/mach-octeon/cvmx-helper-pko.c | 312 ++ arch/mips/mach-octeon/cvmx-helper-pko3.c | 1252 ++++++ arch/mips/mach-octeon/cvmx-helper-rgmii.c | 431 ++ arch/mips/mach-octeon/cvmx-helper-sfp.c | 1877 +++++++++ arch/mips/mach-octeon/cvmx-helper-sgmii.c | 781 ++++ arch/mips/mach-octeon/cvmx-helper-xaui.c | 587 +++ arch/mips/mach-octeon/cvmx-helper.c | 45 +- arch/mips/mach-octeon/cvmx-ilk.c | 1618 ++++++++ arch/mips/mach-octeon/cvmx-ipd.c | 690 ++++ arch/mips/mach-octeon/cvmx-pki-resources.c | 519 +++ arch/mips/mach-octeon/cvmx-pki.c | 1619 ++++++++ .../cvmx-pko-internal-ports-range.c | 164 + arch/mips/mach-octeon/cvmx-pko.c | 1110 ++++++ arch/mips/mach-octeon/cvmx-pko3-compat.c | 656 +++ arch/mips/mach-octeon/cvmx-pko3-queue.c | 1331 ++++++ arch/mips/mach-octeon/cvmx-pko3-resources.c | 229 ++ arch/mips/mach-octeon/cvmx-pko3.c | 2143 ++++++++++ arch/mips/mach-octeon/cvmx-qlm-tables.c | 292 ++ arch/mips/mach-octeon/cvmx-range.c | 344 ++ arch/mips/mach-octeon/include/mach/cvmx-agl.h | 45 + .../mach-octeon/include/mach/cvmx-bootmem.h | 3 +- .../mach-octeon/include/mach/cvmx-config.h | 128 + arch/mips/mach-octeon/include/mach/cvmx-fau.h | 581 +++ arch/mips/mach-octeon/include/mach/cvmx-fpa.h | 3 +- .../mips/mach-octeon/include/mach/cvmx-fpa3.h | 37 - .../include/mach/cvmx-helper-board.h | 6 +- .../include/mach/cvmx-helper-fdt.h | 40 +- .../include/mach/cvmx-helper-pko.h | 2 +- .../mach-octeon/include/mach/cvmx-helper.h | 20 + .../mach-octeon/include/mach/cvmx-ilk-defs.h | 2269 +++++++++++ .../mach-octeon/include/mach/cvmx-iob-defs.h | 1328 ++++++ .../mach-octeon/include/mach/cvmx-lbk-defs.h | 157 + .../mips/mach-octeon/include/mach/cvmx-mdio.h | 516 +++ .../mach-octeon/include/mach/cvmx-npei-defs.h | 3550 +++++++++++++++++ .../include/mach/cvmx-pcsxx-defs.h | 787 ++++ .../include/mach/cvmx-pki-cluster.h | 343 ++ arch/mips/mach-octeon/include/mach/cvmx-pko.h | 213 + .../include/mach/cvmx-pko3-resources.h | 36 + .../mips/mach-octeon/include/mach/cvmx-pko3.h | 1052 +++++ .../mach-octeon/include/mach/cvmx-range.h | 23 + .../mips/mach-octeon/include/mach/cvmx-regs.h | 100 +- .../mach-octeon/include/mach/cvmx-xcv-defs.h | 226 ++ .../mach-octeon/include/mach/octeon_eth.h | 54 +- board/Marvell/octeon_nic23/board.c | 87 +- configs/octeon_ebb7304_defconfig | 7 + configs/octeon_nic23_defconfig | 10 +- drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/octeon/Makefile | 6 + drivers/net/octeon/octeon_eth.c | 1060 +++++ drivers/net/octeon/octeon_mdio.c | 226 ++ include/configs/octeon_common.h | 2 +- include/configs/octeon_ebb7304.h | 2 + 77 files changed, 42315 insertions(+), 586 deletions(-) create mode 100644 arch/mips/mach-octeon/cvmx-agl.c create mode 100644 arch/mips/mach-octeon/cvmx-cmd-queue.c create mode 100644 arch/mips/mach-octeon/cvmx-fau-compat.c create mode 100644 arch/mips/mach-octeon/cvmx-fpa-resource.c create mode 100644 arch/mips/mach-octeon/cvmx-fpa.c create mode 100644 arch/mips/mach-octeon/cvmx-global-resources.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-agl.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-bgx.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-board.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-fpa.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-ilk.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-ipd.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-loop.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-npi.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-pki.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-pko.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-pko3.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-rgmii.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-sfp.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-sgmii.c create mode 100644 arch/mips/mach-octeon/cvmx-helper-xaui.c create mode 100644 arch/mips/mach-octeon/cvmx-ilk.c create mode 100644 arch/mips/mach-octeon/cvmx-ipd.c create mode 100644 arch/mips/mach-octeon/cvmx-pki-resources.c create mode 100644 arch/mips/mach-octeon/cvmx-pki.c create mode 100644 arch/mips/mach-octeon/cvmx-pko-internal-ports-range.c create mode 100644 arch/mips/mach-octeon/cvmx-pko.c create mode 100644 arch/mips/mach-octeon/cvmx-pko3-compat.c create mode 100644 arch/mips/mach-octeon/cvmx-pko3-queue.c create mode 100644 arch/mips/mach-octeon/cvmx-pko3-resources.c create mode 100644 arch/mips/mach-octeon/cvmx-pko3.c create mode 100644 arch/mips/mach-octeon/cvmx-qlm-tables.c create mode 100644 arch/mips/mach-octeon/cvmx-range.c create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-agl.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-config.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fau.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ilk-defs.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-iob-defs.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-lbk-defs.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-mdio.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-npei-defs.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pcsxx-defs.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pki-cluster.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko3-resources.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pko3.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-range.h create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-xcv-defs.h create mode 100644 drivers/net/octeon/Makefile create mode 100644 drivers/net/octeon/octeon_eth.c create mode 100644 drivers/net/octeon/octeon_mdio.c -- 2.35.1