From nobody Sun Nov 24 19:46:35 2024 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8EA718891F for ; Sun, 3 Nov 2024 16:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730653091; cv=none; b=U0BunSniHXTCjPG448XUHheL0Ob/lpDSsfz/3GYt8jwm5iuEmZdSP9hX+ML1y7PKYfDM+EYb3ambArTt2thDK0ZIK3JS7kK+cf7uNz7QRhMo9xkaQK7V2EvywtCtW0rVb58ZOcY3ZMdu69Uflyn+lJEkNdpBiE2iztTtAeb9GJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730653091; c=relaxed/simple; bh=ytr4kv67qGAo7czUluBX9q+jXByw5RP4zcvFDppWqgM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XGjZNRWE1jOQ1oBtx73NrxFpkNuRScV8iWwNxPJeDHfMJrYsbz2toUw4HKaRRaI58mhnAOszzhPJqAcyVLfVxdgrml9oVXUMPTompMzqV/Gqo2gM1yytf3Y3Xglip7ZM9QWOukyyetMUGHyH01OGZpCw8ZAmKxc4GnZkYJKwBs4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=Fao65DWc; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="Fao65DWc" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-20caea61132so30712875ad.2 for ; Sun, 03 Nov 2024 08:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1730653088; x=1731257888; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pzL62SVyIjejPV0WK5Icvrl5yXIEFUYP1mc1b47FbtQ=; b=Fao65DWchUogFCxU8UfFv/dHziw9TQVs3kbSrpy3o39+v0nuhAcXnzuU48/BpNJ6PL KdH9o+YG/COPnPzxjNpFO2LiHNdyznUVlLdIH5WSQZBXHLfZ+D5QDiFndDu5I6Q7ZnTG Nq9QvNOMmASQgaFJdkTR9gzTk/M2QYgpvVtUeN/6bWeO3kxRx88pkzNOLU4gddHwJuOT jo7Yf1IHoRAZ/a3uvWHmHQF9b5s5RS95+zchVoSM+MywtSM4O4bAay4sTtb2hQwJ4VId 3066J/lL+lLOrs9tGwWkpzvMl4I01HhIzDpQOl+9txaBHX7sQiLfIJMAWDDyAa2pXLbd qz6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730653088; x=1731257888; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pzL62SVyIjejPV0WK5Icvrl5yXIEFUYP1mc1b47FbtQ=; b=ngnBOOI1mU3mY+Jwx3wV4eZSFSOSfP9GlzJ2J+cuV9HcoW605nfzJwEj7Xsd3nOOoI Fnw4O5k4ObyAabQEJbhD/AcCOV0CvyA/Eet/6g84OekLyn2Dv5UXUnMtZPzQzqHt3egM 0Mnrc7y1yhNRKSkkFQvpzqyQCGildvF5LsmZNwYBdzEA1T3dHer+bGrnakixrNiDFbqR GQ/9X2+1111K3wDp8e4nwQS7fFvVtmyN20CH1xpkacEDq5t9ocs2u48VbMqreDwiKSyU TicberTjnNKk8FVi9bB0su4QPODLcR2IhGyN8trvQh8QmorLk28MzhzdBamicKrDeuxF /PlQ== X-Forwarded-Encrypted: i=1; AJvYcCUa/BOpJ1bAnE5wMpOQIgyQK8Uha/f//l7gVkWP05mTrpUpbFCC2UX5k61nF/WZU6cGpMnAnDXz6wJ3dO8=@vger.kernel.org X-Gm-Message-State: AOJu0YxLv0JpLafxcO5W+ft72j+03Slxxl22Kk5DCouRxfp0OEkAJuYd ObfVP7Ggx3f61ktKnvZxrlaUzm+5YoS4oGnvVVucWhbi9IHfhx4KK1pOdc8cGRU= X-Google-Smtp-Source: AGHT+IFa5XNytNlWFhmE0DXZf4pmgbvq4x1WDC/qd9g/nrM981EhgPHOC8zQXwTK7AWCgpf8maFo3w== X-Received: by 2002:a17:902:d490:b0:20c:e222:619c with SMTP id d9443c01a7336-2111af5a32dmr117485425ad.42.1730653088162; Sun, 03 Nov 2024 08:58:08 -0800 (PST) Received: from [127.0.1.1] (71-34-69-82.ptld.qwest.net. [71.34.69.82]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057c9783sm47531355ad.236.2024.11.03.08.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 08:58:07 -0800 (PST) From: Drew Fustini Date: Sun, 03 Nov 2024 08:57:59 -0800 Subject: [PATCH net-next v7 1/2] dt-bindings: net: Add T-HEAD dwmac support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241103-th1520-gmac-v7-1-ef094a30169c@tenstorrent.com> References: <20241103-th1520-gmac-v7-0-ef094a30169c@tenstorrent.com> In-Reply-To: <20241103-th1520-gmac-v7-0-ef094a30169c@tenstorrent.com> 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, Krzysztof Kozlowski X-Mailer: b4 0.14.1 From: Jisheng Zhang Add documentation to describe the DesginWare-based GMAC controllers in the T-HEAD TH1520 SoC. Reviewed-by: Andrew Lunn Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jisheng Zhang Signed-off-by: Emil Renner Berthing [drew: rename compatible, add apb registers as second reg of gmac node, add clocks and interrupts poroperties] Signed-off-by: Drew Fustini --- .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../devicetree/bindings/net/thead,th1520-gmac.yaml | 110 +++++++++++++++++= ++++ MAINTAINERS | 1 + 3 files changed, 112 insertions(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Docume= ntation/devicetree/bindings/net/snps,dwmac.yaml index 4e2ba1bf788c..474ade185033 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -99,6 +99,7 @@ properties: - snps,dwxgmac-2.10 - starfive,jh7100-dwmac - starfive,jh7110-dwmac + - thead,th1520-gmac =20 reg: minItems: 1 diff --git a/Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml b= /Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml new file mode 100644 index 000000000000..6d9de3303762 --- /dev/null +++ b/Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/thead,th1520-gmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: T-HEAD TH1520 GMAC Ethernet controller + +maintainers: + - Drew Fustini + +description: | + The TH1520 GMAC is described in the TH1520 Peripheral Interface User Man= ual + https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs + + Features include + - Compliant with IEEE802.3 Specification + - IEEE 1588-2008 standard for precision networked clock synchronization + - Supports 10/100/1000Mbps data transfer rate + - Supports RGMII/MII interface + - Preamble and start of frame data (SFD) insertion in Transmit path + - Preamble and SFD deletion in the Receive path + - Automatic CRC and pad generation options for receive frames + - MDIO master interface for PHY device configuration and management + + The GMAC Registers consists of two parts + - APB registers are used to configure clock frequency/clock enable/clo= ck + direction/PHY interface type. + - AHB registers are use to configure GMAC core (DesignWare Core part). + GMAC core register consists of DMA registers and GMAC registers. + +select: + properties: + compatible: + contains: + enum: + - thead,th1520-gmac + required: + - compatible + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + items: + - enum: + - thead,th1520-gmac + - const: snps,dwmac-3.70a + + reg: + items: + - description: DesignWare GMAC IP core registers + - description: GMAC APB registers + + reg-names: + items: + - const: dwmac + - const: apb + + clocks: + items: + - description: GMAC main clock + - description: Peripheral registers interface clock + + clock-names: + items: + - const: stmmaceth + - const: pclk + + interrupts: + items: + - description: Combined signal for various interrupt events + + interrupt-names: + items: + - const: macirq + +required: + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + gmac0: ethernet@e7070000 { + compatible =3D "thead,th1520-gmac", "snps,dwmac-3.70a"; + reg =3D <0xe7070000 0x2000>, <0xec003000 0x1000>; + reg-names =3D "dwmac", "apb"; + clocks =3D <&clk 1>, <&clk 2>; + clock-names =3D "stmmaceth", "pclk"; + interrupts =3D <66>; + interrupt-names =3D "macirq"; + phy-mode =3D "rgmii-id"; + snps,fixed-burst; + snps,axi-config =3D <&stmmac_axi_setup>; + snps,pbl =3D <32>; + phy-handle =3D <&phy0>; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + compatible =3D "snps,dwmac-mdio"; + + phy0: ethernet-phy@0 { + reg =3D <0>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index f39ab140710f..72dee6d07ced 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19827,6 +19827,7 @@ L: linux-riscv@lists.infradead.org S: Maintained T: git https://github.com/pdp7/linux.git F: Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml +F: Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml F: arch/riscv/boot/dts/thead/ F: drivers/clk/thead/clk-th1520-ap.c F: include/dt-bindings/clock/thead,th1520-clk-ap.h --=20 2.34.1