From patchwork Wed Dec 1 17:56:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12650521 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 A0B13C433EF for ; Wed, 1 Dec 2021 17:59:17 +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=nXu399RAgP0S8AVy7GTnagjU5AomzwUDkZ/g+FQhs4Y=; b=Ov9G4l1XJ1bw8D DzKxF5YZdJsjvJYXGTeL9+L+mmXY7e0UZab6uGhunyV3he5ucEFktIfgZVfZVwGWUhJqxKyNeOOcw 6d7kiprIYd6RgvRFpLPrDcRZ4fWy1V0JQj56gyl3sN+TxqHZYFj3RYOGIlMEQiq0C1LZIfkcqtwVI 7cxXOn8LKT2ZaizMayaI7BABjrUTPuplnqTuR1op7eMr7ou4+yVlmwyefL4rsi6glstzA3qPl7nG5 iruygXMazn3jqOg/2yIqIUTotJ/pdqHo8UqDAgf0022O8vhCff2pubVyBmHKDQRXweZmVGtH/fJaX aB0HrPRwGN6p4pdszZqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msTsy-009ePk-9N; Wed, 01 Dec 2021 17:59:16 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msTqv-009dMm-2k; Wed, 01 Dec 2021 17:57:10 +0000 Received: by mail-pf1-x42d.google.com with SMTP id 8so25300456pfo.4; Wed, 01 Dec 2021 09:57:08 -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=KYMDVSre6+yLu8zD+7T8spnd61FbSvWPFURC895A/Tk=; b=KcIbR+oPFhCoj00vXrvlusdYemqIiSOnE3GdyiYRztMB8Dy/rlm9R2MvyGGcvK1O9d cUgPkbAwPzfGzKYLY4AVmh0HqDvwtbdupglIiJmRQx7AqjhOHsFW8r9NZhHkf8lgVhy5 BOPFsCFO246aG7YocvXhutSYzxpXXQnNILQvbDDsQyBdv9Dx9WbjJdbMjPHaepWuEij+ ST9OkZqM40nFH/YP2ynakoFYX2BAtPcZYXYcuPPZ4OxeqgHPgRBRlkC8mOUUnSfWJ0Yv qaNq8/DkQzpqgdrsDZvPKec22B2xZfUfnhfrkBKCBkhH2P/UVu2lcmRJTQzpSR5IsucT 2qcg== 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=KYMDVSre6+yLu8zD+7T8spnd61FbSvWPFURC895A/Tk=; b=f8iD0NV2H1nCLfDs6zAenaBD7hHc80BeaD83pIS6A/8ewLooAFG6P7IRFmZ05R9gAj AcmJpCgOnG5da/hFGGvX3DmoY2oWCmU+l2Oa9KGqkWPOi7zR1I7N49GbINPKyWIwbMHi bsj7pdRA3bTa8UiMTt4fARP+w4IFOrpGz8e6Vtjb5IzJHQvTyuMNUyNN4afmBdgbNA2m NKMbH2dtbKk0/9/3SwViVyllxVo3cOQeRyuWyZV/nj+EVqJL3xdlKEA398R3yY6R5iC3 pfn8VCzNJkGK5S6uo9VxaRvf4m1wA+YsGrg0sQF8a5IYFmuw54AqsbHisIPJLPJPC1vy r4HA== X-Gm-Message-State: AOAM532Bv2j24qeA1k6MuJsI02NV4P4+6vS6av0OzHnde0RQ33QSkafG j+KZvHafvkZOOF6BD9dqZBk= X-Google-Smtp-Source: ABdhPJwJCTGDL3Jx21xteh0JyBvOYoagGEJ8sFjmkkeVQ65cWgvIiV7LDRhQeT7DVJ1qfm0XXh4Hrw== X-Received: by 2002:a63:5520:: with SMTP id j32mr5904336pgb.443.1638381427878; Wed, 01 Dec 2021 09:57:07 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j13sm471546pfc.151.2021.12.01.09.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 09:57:07 -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 , Kishon Vijay Abraham I , Vinod Koul , 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), linux-phy@lists.infradead.org (open list:GENERIC PHY FRAMEWORK) Subject: [PATCH net-next v2 6/9] dt-bindings: net: Convert AMAC to YAML Date: Wed, 1 Dec 2021 09:56:49 -0800 Message-Id: <20211201175652.4722-7-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211201175652.4722-1-f.fainelli@gmail.com> References: <20211201175652.4722-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-20211201_095709_153936_6FD40677 X-CRM114-Status: GOOD ( 17.83 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Convert the Broadcom AMAC Device Tree binding to YAML to help with schema and dtbs checking. Signed-off-by: Florian Fainelli --- .../devicetree/bindings/net/brcm,amac.txt | 30 ------- .../devicetree/bindings/net/brcm,amac.yaml | 88 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 89 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,amac.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,amac.yaml diff --git a/Documentation/devicetree/bindings/net/brcm,amac.txt b/Documentation/devicetree/bindings/net/brcm,amac.txt deleted file mode 100644 index 0120ebe93262..000000000000 --- a/Documentation/devicetree/bindings/net/brcm,amac.txt +++ /dev/null @@ -1,30 +0,0 @@ -Broadcom AMAC Ethernet Controller Device Tree Bindings -------------------------------------------------------------- - -Required properties: - - compatible: "brcm,amac" - "brcm,nsp-amac" - "brcm,ns2-amac" - - reg: Address and length of the register set for the device. It - contains the information of registers in the same order as - described by reg-names - - reg-names: Names of the registers. - "amac_base": Address and length of the GMAC registers - "idm_base": Address and length of the GMAC IDM registers - (required for NSP and Northstar2) - "nicpm_base": Address and length of the NIC Port Manager - registers (required for Northstar2) - - interrupts: Interrupt number - -The MAC address will be determined using the optional properties -defined in ethernet.txt. - -Examples: - -amac0: ethernet@18022000 { - compatible = "brcm,nsp-amac"; - reg = <0x18022000 0x1000>, - <0x18110000 0x1000>; - reg-names = "amac_base", "idm_base"; - interrupts = ; -}; diff --git a/Documentation/devicetree/bindings/net/brcm,amac.yaml b/Documentation/devicetree/bindings/net/brcm,amac.yaml new file mode 100644 index 000000000000..d9de68aba7d3 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,amac.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/brcm,amac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom AMAC Ethernet Controller Device Tree Bindings + +maintainers: + - Florian Fainelli + +allOf: + - $ref: "ethernet-controller.yaml#" + - if: + properties: + compatible: + contains: + enum: + - brcm,amac + then: + properties: + reg: + minItems: 1 + maxItems: 2 + reg-names: + minItems: 1 + maxItems: 2 + items: + - const: amac_base + - const: idm_base + + - if: + properties: + compatible: + contains: + enum: + - brcm,nsp-amac + then: + properties: + reg: + minItems: 2 + maxItems: 2 + reg-names: + items: + - const: amac_base + - const: idm_base + + - if: + properties: + compatible: + contains: + enum: + - brcm,ns2-amac + then: + properties: + reg: + minItems: 3 + maxItems: 3 + reg-names: + items: + - const: amac_base + - const: idm_base + - const: nicpm_base + +properties: + compatible: + enum: + - brcm,amac + - brcm,nsp-amac + - brcm,ns2-amac + + interrupts: + maxItems: 1 + + +unevaluatedProperties: false + +examples: + - | + #include + + amac0: ethernet@18022000 { + compatible = "brcm,nsp-amac"; + reg = <0x18022000 0x1000>, + <0x18110000 0x1000>; + reg-names = "amac_base", "idm_base"; + interrupts = ; + }; diff --git a/MAINTAINERS b/MAINTAINERS index eb0f6caf0062..6b32420bd9bd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3872,7 +3872,7 @@ M: Rafał Miłecki M: bcm-kernel-feedback-list@broadcom.com L: netdev@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/net/brcm,amac.txt +F: Documentation/devicetree/bindings/net/brcm,amac.yaml F: drivers/net/ethernet/broadcom/bgmac* F: drivers/net/ethernet/broadcom/unimac.h