From patchwork Wed Dec 1 04:12:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12694262 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 691E8C433EF for ; Wed, 1 Dec 2021 04:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8zfmkReUM8W139Y5MLlOWWJ7KmCQjO11AqZvPcW4sE8=; b=nWRPqfZXgmo/RP g266Xwtl+Nje7b4BwHUOTPgvqAbyqF7BTQO4CST0/BWEhzLReIvL45zcuzlv0NJj6PXw+diM81wB5 ThKv9tqdKZDwrpd5R/gr6Dn0dUeR4pgH3lgNbmaFI3V98bISZuPI9aAh4RMASEMthGvRE6c3Gh2gA YN5Sna2F9UJy1OyusSO6LNBYahOmqwQ+85LZmBbi1t5WM9zOrrT86/Ti9owvOKbAO2xB/T2nqJJlf wR/3cbltD6gVOS4y6PWKD5D41e+WkkSJ79EOSnAuLgeMkMEYHuSwyGLDaPd4GYC6X6nCorm48CtHL PEwTtCQSWwlOuxtBX1lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msH0J-007PpU-NK; Wed, 01 Dec 2021 04:14:00 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msGz5-007PRE-RY for linux-arm-kernel@lists.infradead.org; Wed, 01 Dec 2021 04:12:45 +0000 Received: by mail-pj1-x102c.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so19970578pjc.4 for ; Tue, 30 Nov 2021 20:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QnOl9pS4YwArjHGgjzz1ujnilCqfZpwQuY83gQxN+dA=; b=ju6S4vdD6ks7/xXMnbMwpIcH15H08wA41nE9cOZreOJUXUqkjNYmJZ952hyUOMBblI 3N7PIEyU3n/37cwWztiUNK7FHp8sPHElKuVQ9v+2AlN2cRKiv/8QDAikpRDMl6ysBWES 6KCa6BlcGGDWnaI9mfX568u+F0vB/pJiUd8WLbN6hE4NCV0WpMkfRDboYAPDtf0cN8zD oHT8ZbXGtIVdDEb90fc7yozBRL88ZPixijWyHKq9Eu64uNaLPbMLQmq0rhWg0wkDqPlT 3w47CklvAjALTCLi8hJtPYVsMdguWKamknXlxWy3aZNi1XgOngenRW1oRQi2kkyrC9Na qpCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QnOl9pS4YwArjHGgjzz1ujnilCqfZpwQuY83gQxN+dA=; b=PV//EKvQQ4Dl+Pjd5Yox3eXP7hT2VRhMA/dAkub8Oi+2VwjUOYucxp4J8aHyjSps72 zzEhIJV6xfBGoY6S2+ENM5z97R1ngDFbawKva5VVw2r90HOd7hPQcghkltpsFcbujFik fW0zu09+TW8yKb6Wjv3Pt7G/kF+KOQc4pAGhdLfC8OW7T7l6YsaMlG1P2IA7jEkHrMHc phmanDeVOHfoqEDUHSRzvWqxXkBryBr+E+UrVBzsB0gfOmkQo2ba6eoXqAvukgse8U98 E6nPhImfTAAg4M/limFEqaGcSNCFqJMTIwGU1dtbzkEB3xS9HWlX/KQ6MQ2QH8iHigCC 8LrA== X-Gm-Message-State: AOAM530tIsRs1xZb6pJPUHSsW0jAPpBqX+OrZPQzBt9QiiQ38E9JS3Fs xxo1h/1/4mAxU/gt1YW53W8= X-Google-Smtp-Source: ABdhPJyfgo1kyazz8qEK1SyEP5TB48crf42REQ2nITGkQ11f66OA25gkuqq2y0t8Mv9suNP/ft1PXg== X-Received: by 2002:a17:90a:6f61:: with SMTP id d88mr4338069pjk.109.1638331963052; Tue, 30 Nov 2021 20:12:43 -0800 (PST) Received: from 7YHHR73.igp.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id s8sm4296451pfe.196.2021.11.30.20.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 20:12:42 -0800 (PST) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , "David S. Miller" , Jakub Kicinski , Rob Herring , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM IPROC GBIT ETHERNET DRIVER), Doug Berger , Ray Jui , Scott Branden , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM IPROC ARM ARCHITECTURE) Subject: [PATCH net-next 6/7] dt-bindings: net: Convert SYSTEMPORT to YAML Date: Tue, 30 Nov 2021 20:12:27 -0800 Message-Id: <20211201041228.32444-7-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211201041228.32444-1-f.fainelli@gmail.com> References: <20211201041228.32444-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_201243_923344_DFC0F8BB X-CRM114-Status: GOOD ( 22.76 ) 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 Convert the Broadcom SYSTEMPORT Ethernet controller Device Tree binding to YAML. Signed-off-by: Florian Fainelli --- .../bindings/net/brcm,systemport.txt | 38 --------- .../bindings/net/brcm,systemport.yaml | 83 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 84 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.yaml diff --git a/Documentation/devicetree/bindings/net/brcm,systemport.txt b/Documentation/devicetree/bindings/net/brcm,systemport.txt deleted file mode 100644 index 75736739bfdd..000000000000 --- a/Documentation/devicetree/bindings/net/brcm,systemport.txt +++ /dev/null @@ -1,38 +0,0 @@ -* Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) - -Required properties: -- compatible: should be one of: - "brcm,systemport-v1.00" - "brcm,systemportlite-v1.00" or - "brcm,systemport" -- reg: address and length of the register set for the device. -- interrupts: interrupts for the device, first cell must be for the rx - interrupts, and the second cell should be for the transmit queues. An - optional third interrupt cell for Wake-on-LAN can be specified -- local-mac-address: Ethernet MAC address (48 bits) of this adapter -- phy-mode: Should be a string describing the PHY interface to the - Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt -- fixed-link: see Documentation/devicetree/bindings/net/fixed-link.txt for - the property specific details - -Optional properties: -- systemport,num-tier2-arb: number of tier 2 arbiters, an integer -- systemport,num-tier1-arb: number of tier 1 arbiters, an integer -- systemport,num-txq: number of HW transmit queues, an integer -- systemport,num-rxq: number of HW receive queues, an integer -- clocks: When provided, must be two phandles to the functional clocks nodes of - the SYSTEMPORT block. The first phandle is the main SYSTEMPORT clock used - during normal operation, while the second phandle is the Wake-on-LAN clock. -- clock-names: When provided, names of the functional clock phandles, first - name should be "sw_sysport" and second should be "sw_sysportwol". - -Example: -ethernet@f04a0000 { - compatible = "brcm,systemport-v1.00"; - reg = <0xf04a0000 0x4650>; - local-mac-address = [ 00 11 22 33 44 55 ]; - fixed-link = <0 1 1000 0 0>; - phy-mode = "gmii"; - interrupts = <0x0 0x16 0x0>, - <0x0 0x17 0x0>; -}; diff --git a/Documentation/devicetree/bindings/net/brcm,systemport.yaml b/Documentation/devicetree/bindings/net/brcm,systemport.yaml new file mode 100644 index 000000000000..f8bfc5474a19 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,systemport.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/brcm,systemport.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) + +maintainers: + - Florian Fainelli + +properties: + compatible: + enum: + - brcm,systemport-v1.00 + - brcm,systemportlite-v1.00 + - brcm,systemport + + reg: + maxItems: 1 + + interrupts: + minItems: 2 + maxItems: 3 + items: + - description: interrupt line for RX queues + - description: interrupt line for TX queues + - description: interrupt line for Wake-on-LAN + + clocks: + items: + - description: main clock + - description: Wake-on-LAN clock + + clock-names: + items: + - const: sw_sysport + - const: sw_sysportwol + + "systemport,num-tier2-arb": + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of tier 2 arbiters + + "systemport,num-tier1-arb": + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of tier 2 arbiters + + "systemport,num-txq": + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of HW transmit queues + + "systemport,num-rxq": + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of HW receive queues + +required: + - reg + - interrupts + - phy-mode + +allOf: + - $ref: "ethernet-controller.yaml#" + +additionalProperties: true + +examples: + - | + ethernet@f04a0000 { + compatible = "brcm,systemport-v1.00"; + reg = <0xf04a0000 0x4650>; + local-mac-address = [ 00 11 22 33 44 55 ]; + phy-mode = "gmii"; + interrupts = <0x0 0x16 0x0>, + <0x0 0x17 0x0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 6b32420bd9bd..8f544447ef94 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3983,6 +3983,7 @@ L: netdev@vger.kernel.org S: Supported F: drivers/net/ethernet/broadcom/bcmsysport.* F: drivers/net/ethernet/broadcom/unimac.h +F: Documentation/devicetree/bindings/net/brcm,systemport.yaml BROADCOM TG3 GIGABIT ETHERNET DRIVER M: Siva Reddy Kallam