From patchwork Tue Apr 15 12:56:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 14052224 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 13A32C369AB for ; Tue, 15 Apr 2025 13:04:27 +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:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PYPY26UCzC6xpsXn5isIxKrrh9DoM4t2YOrxI8T2l/k=; b=iKQDGywTZVLL4880BpTe0PX/58 Y4krjbxl8QZRdtqPDoh3W71Zw+Xz1IwVVa+wUATRA3MwkttzUhLhD2VIuz8PmgkIo3TpMkAtrGMWv hqM3HcgBbjXUiZgmxfsTZU0jokPc2dr58fjnNjZ4DgnNqrNcO68kk1u5oHwYK+1xRYjy4j5y0IF7a rpJ/m8a/OPhg9o3dHV1C4M0EhOhAaLL0VOnp/qr1+GWZ84cpmczVImZAE5IVWksdfg6ImRKWKfMjz 4XxEbzXRonKtTsH092bXHHorsLT73SPyq1MAZYzzD8qJpkueFl0DlS9WZubVngCwxT/OhQlXt//57 VnQt+sdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4fxY-00000005qps-0Pj9; Tue, 15 Apr 2025 13:04:16 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u4fqO-00000005pZm-1dOj for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2025 12:56:54 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-39727fe912cso2758584f8f.3 for ; Tue, 15 Apr 2025 05:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744721811; x=1745326611; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PYPY26UCzC6xpsXn5isIxKrrh9DoM4t2YOrxI8T2l/k=; b=ToMnCVgNxOy+kf8ZAUXEfRYLNfFc92P6TjuWvXsiecgGMBnBfMW9m1+1fzJjPYNTTE Mn39amHIEL6SOK0cph+6LqYBRvHLlLZSpzpumpuYTDmGw+Fyqf34fPUR3IGtgSpShykt j7rTRjNjV3XBKD9zij5C3AFxTiLx6BUP6R9D08d95rocPoLLP/EPMxkhVm6mnMMX2TWI BP1FOSW27ml9fSe6BDTA0Qh+eVCM7OKXZqkNfP/nknd4z3d7zkTFu63kEc3MzemouTjd EzBZe2bbxB/iUvYLj7MZzGfeLU23TOeL39pmPuhTsuYqK1qII9TMN3T6BStIntWISkoN yAlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744721811; x=1745326611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PYPY26UCzC6xpsXn5isIxKrrh9DoM4t2YOrxI8T2l/k=; b=lOVsdnjdXPm48ObXWdOQ5IrM2RCYPVXmIKwGImYAxE8oMplSYka05qEgwZWB0tGa0P AqZ4xB5gjfEPIHDQ9WoV5hfQKOR8S8LyV4TBffdbwL8WQ7v2rlXkHgJIYAYO/Bw1a0zo 2xzHwgnosfvPIpFiEVImomt0Mftpy5epU6rRX/LITtiEaUsA4WoEm18UQcg4DP8oB2OB w/TtxY0mBbFxjUwARVd44KQalBJXXBhNat/ogIfeV4MlwG/1qy7ebUmi2hRNMrrNxXHA IykwebI2GfB9U+ap+mwifkV2lzge3Xhli3vFXqbdYbdwdI6Ze0cWbYCu5waxih4dil32 +lqw== X-Forwarded-Encrypted: i=1; AJvYcCUf+6Ay8BX+W+Zq4xs8yqeV2SVhJ7eJ+nVWAVSo05+4/gIyYU0DJNUlCrTU3k8noaP01VMstoQmrpFATKmn9YCC@lists.infradead.org X-Gm-Message-State: AOJu0YwB3JFit1uUjWVswlJLh0B1UNq61B2JnOEBWnQiq3UN0G2UbXdd RyIih8qbFsH2ceqqCStdlG4Gm18ZDpj/dfpS0pzDrhHWcl2+qLdj X-Gm-Gg: ASbGncuGnrk8NNMl21kafpktJBzcT/elJbyMOK1BEl76bqlpAXTxo9WDLtMJg8OVTOl EIiBY4gHbsNlb+3Ggjqjg2W6eJv3IkoMA6yBHLWWTUXs9wZJPvWzE5tWkFlBC6+6Gnl+mnH1Q1Q bhA1LgU/ulHfC9vM78nmshnJxYPEyB/ma5VAnd+JtyG+2cOOSw1NixrrmyhoavpxIO08nGc/ggU Ci8grbUEg8LCIrGwwhZNEXXon/tnN40XJzut10c3y5DMhmzp6vIExNkhmoL938KSAw/hVKzSZ9w Thh1lJH0dDzgraCXlg9yjaP3xt/9vaRnHo7rzhBxf5WwVSsbz0TTUs776vdoqeT9 X-Google-Smtp-Source: AGHT+IEj+WAN3UKiiamPKlLPy4YiJqmW4BceTVoWlm9S3vfGQsWZa6raYZh9S7F6MJZZAES9UXO2CQ== X-Received: by 2002:a5d:64a9:0:b0:39c:1efb:ec8e with SMTP id ffacd0b85a97d-39ea51d3205mr12237792f8f.6.1744721810508; Tue, 15 Apr 2025 05:56:50 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:1883:aa4:a265:bc12]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39eae96bf97sm13922334f8f.25.2025.04.15.05.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 05:56:49 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Philipp Zabel , Geert Uytterhoeven , Magnus Damm , "Russell King (Oracle)" , Giuseppe Cavallaro , Jose Abreu Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH net-next v6 2/4] dt-bindings: net: Document support for Renesas RZ/V2H(P) GBETH Date: Tue, 15 Apr 2025 13:56:40 +0100 Message-ID: <20250415125642.241427-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250415125642.241427-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250415125642.241427-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250415_055652_460036_3C1AB3D3 X-CRM114-Status: GOOD ( 17.21 ) 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 From: Lad Prabhakar GBETH IP on the Renesas RZ/V2H(P) SoC is integrated with Synopsys DesignWare MAC (version 5.20). Document the device tree bindings for the GBETH glue layer. Generic compatible string 'renesas,rzv2h-gbeth' is added since this module is identical on both the RZ/V2H(P) and RZ/G3E SoCs. The Rx/Tx clocks supplied for GBETH on the RZ/V2H(P) SoC is depicted below: Rx / Tx -------+------------- on / off ------- | | Rx-180 / Tx-180 +---- not ---- on / off ------- Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring (Arm) --- .../bindings/net/renesas,r9a09g057-gbeth.yaml | 201 ++++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 1 + 2 files changed, 202 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/renesas,r9a09g057-gbeth.yaml diff --git a/Documentation/devicetree/bindings/net/renesas,r9a09g057-gbeth.yaml b/Documentation/devicetree/bindings/net/renesas,r9a09g057-gbeth.yaml new file mode 100644 index 000000000000..02a6793c26f5 --- /dev/null +++ b/Documentation/devicetree/bindings/net/renesas,r9a09g057-gbeth.yaml @@ -0,0 +1,201 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/renesas,r9a09g057-gbeth.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GBETH glue layer for Renesas RZ/V2H(P) (and similar SoCs) + +maintainers: + - Lad Prabhakar + +select: + properties: + compatible: + contains: + enum: + - renesas,r9a09g057-gbeth + - renesas,rzv2h-gbeth + required: + - compatible + +properties: + compatible: + items: + - enum: + - renesas,r9a09g057-gbeth # RZ/V2H(P) + - const: renesas,rzv2h-gbeth + - const: snps,dwmac-5.20 + + reg: + maxItems: 1 + + clocks: + items: + - description: CSR clock + - description: AXI system clock + - description: PTP clock + - description: TX clock + - description: RX clock + - description: TX clock phase-shifted by 180 degrees + - description: RX clock phase-shifted by 180 degrees + + clock-names: + items: + - const: stmmaceth + - const: pclk + - const: ptp_ref + - const: tx + - const: rx + - const: tx-180 + - const: rx-180 + + interrupts: + minItems: 11 + + interrupt-names: + items: + - const: macirq + - const: eth_wake_irq + - const: eth_lpi + - const: rx-queue-0 + - const: rx-queue-1 + - const: rx-queue-2 + - const: rx-queue-3 + - const: tx-queue-0 + - const: tx-queue-1 + - const: tx-queue-2 + - const: tx-queue-3 + + resets: + items: + - description: AXI power-on system reset + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + - resets + +allOf: + - $ref: snps,dwmac.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + ethernet@15c30000 { + compatible = "renesas,r9a09g057-gbeth", "renesas,rzv2h-gbeth", "snps,dwmac-5.20"; + reg = <0x15c30000 0x10000>; + clocks = <&cpg CPG_MOD 0xbd>, <&cpg CPG_MOD 0xbc>, + <&ptp_clock>, <&cpg CPG_MOD 0xb8>, + <&cpg CPG_MOD 0xb9>, <&cpg CPG_MOD 0xba>, + <&cpg CPG_MOD 0xbb>; + clock-names = "stmmaceth", "pclk", "ptp_ref", + "tx", "rx", "tx-180", "rx-180"; + resets = <&cpg 0xb0>; + interrupts = , + , + , + , + , + , + , + , + , + , + ; + interrupt-names = "macirq", "eth_wake_irq", "eth_lpi", + "rx-queue-0", "rx-queue-1", "rx-queue-2", + "rx-queue-3", "tx-queue-0", "tx-queue-1", + "tx-queue-2", "tx-queue-3"; + phy-mode = "rgmii-id"; + snps,multicast-filter-bins = <256>; + snps,perfect-filter-entries = <128>; + rx-fifo-depth = <8192>; + tx-fifo-depth = <8192>; + snps,fixed-burst; + snps,force_thresh_dma_mode; + snps,axi-config = <&stmmac_axi_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + snps,txpbl = <32>; + snps,rxpbl = <32>; + phy-handle = <&phy0>; + + stmmac_axi_setup: stmmac-axi-config { + snps,lpi_en; + snps,wr_osr_lmt = <0xf>; + snps,rd_osr_lmt = <0xf>; + snps,blen = <16 8 4 0 0 0 0>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <4>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,priority = <0x1>; + snps,map-to-dma-channel = <0>; + }; + + queue1 { + snps,dcb-algorithm; + snps,priority = <0x2>; + snps,map-to-dma-channel = <1>; + }; + + queue2 { + snps,dcb-algorithm; + snps,priority = <0x4>; + snps,map-to-dma-channel = <2>; + }; + + queue3 { + snps,dcb-algorithm; + snps,priority = <0x8>; + snps,map-to-dma-channel = <3>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <4>; + + queue0 { + snps,dcb-algorithm; + snps,priority = <0x1>; + }; + + queue1 { + snps,dcb-algorithm; + snps,priority = <0x2>; + }; + + queue2 { + snps,dcb-algorithm; + snps,priority = <0x4>; + }; + + queue3 { + snps,dcb-algorithm; + snps,priority = <0x1>; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 4d4fcaeca8a8..b525eca53850 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -75,6 +75,7 @@ properties: - qcom,sm8150-ethqos - renesas,r9a06g032-gmac - renesas,rzn1-gmac + - renesas,rzv2h-gbeth - rockchip,px30-gmac - rockchip,rk3128-gmac - rockchip,rk3228-gmac