From patchwork Mon Dec 6 18:00:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12694951 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 E43DCC433F5 for ; Mon, 6 Dec 2021 18:04:15 +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=f6cgHAvbV6LBDWfJulobw33DkAvXWBFameuTH8RkSWU=; b=bprLVfmSCbbZSO ZcMAhn4vicC5y7ybjJ5tS2e4H/+Va4U7I1GsE6dstQTh49ZqJYTMmU7NeAuum0urTBPIFqjdV7dPI vMvFgwVTet/XhV7d0/QggAVzUwcG0vdG38Y8Jp74kHz6luf6DsBqJZ2BK4PXw6TRUO4F8JZYjuxYz GaLJpsjnzBw8l9BoZmFgnKx31Macg+ssuqHJ6Pdp33LWF2eMyBtaDHEsnGjPFSvip5ri5pWzpKj0E oGsXsEDpk+/erVDn6mTgGBxaKlRmhfHQdcfS/iqBpsW5Aicfpc6Kh96yCelqNhJl2EbW0N0733RnM 8tb2BCnZKj1X6ueoi91w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muIJq-005BZl-Hm; Mon, 06 Dec 2021 18:02:31 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muIIO-005Akz-D7; Mon, 06 Dec 2021 18:01:02 +0000 Received: by mail-pg1-x534.google.com with SMTP id q16so11200563pgq.10; Mon, 06 Dec 2021 10:00:59 -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=7lGSpdbBtSUGX8TNpVCqyb1N9KeekyFB33Hw0tfwp0Q=; b=bub+lU47r+RTeRssGc2TDlza/a1TPsewO1uqfzgN9o/JJbyf3cZ0L5dGxmEUIrWixD 3UsHOYdPyWgoumBTrdRJL5wnWQ7VY4HDhwvZ2h+FweNKg2j5Ihhua58YTIP2QpzxW1NE El4BexW8eoBGrkFkf7ZcdSkHfdUHHxqD2uEIJgd4HHefEf5cuDlmGfyP/qdWJMwft3MD H/DItoZDnVzUnFj/8Gxhbu1TIJ/li0W0CWSNHXRPVBl7YqtsXlAx1TRAx7R5lrWkutO2 2LxTCFy43Yngc+P2txEuDifHiME3SSA7tgyITVuipGWFLHr38kBME2NcOmUvhkgJemhM yIkw== 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=7lGSpdbBtSUGX8TNpVCqyb1N9KeekyFB33Hw0tfwp0Q=; b=pHufHE8DMP1JdJBOdQgy11sNk2kpMwfl+pUXi7f76iukfXiRvtOQuiALLIuOlDSkcc m0PUZE5auFT5WkLnFvX7Q2kLGy6UBxWAQR+7Lj/IUftoJUspS9aebyE8sxmTaP/6Wjum Pu5gSEQjbpzT44HUpQypjhZcZ7oODFk37SY4O8JA+GZva0SfJRpwUU6BCvhyVlBYtFNl 7ofiOHUKlDtJSkAW8N159BZ6h4VfWf6mbwvppSBStf0SH68I3XSfLm2xav86TsbqvzBs RRvINWcaPV6PsDOOSshEZ4H8/z1evzxgDr13vXv0Urrte/m9XBwBgRNuZKdsIkSjqH+9 Pwqg== X-Gm-Message-State: AOAM5337IL9ST+idMJqDd9ct23MfNYNl1lY7Ptt96uKOpzn9zV/KaOPx 24uE4MPIoLZR+0lny9pLKonbSVgUrYo= X-Google-Smtp-Source: ABdhPJxnQRDGONRk3NqmP47XAMsozQQX7iGhAcfjk61t9xINQJ1Tdldn4MNeuLonI3UDKv/HrIQlFw== X-Received: by 2002:a63:d04:: with SMTP id c4mr15932769pgl.472.1638813659070; Mon, 06 Dec 2021 10:00:59 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id u11sm5444070pfg.120.2021.12.06.10.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Dec 2021 10:00:58 -0800 (PST) From: Florian Fainelli To: devicetree@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 , netdev@vger.kernel.org (open list:NETWORKING DRIVERS), 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 v3 5/8] dt-bindings: net: Convert AMAC to YAML Date: Mon, 6 Dec 2021 10:00:46 -0800 Message-Id: <20211206180049.2086907-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211206180049.2086907-1-f.fainelli@gmail.com> References: <20211206180049.2086907-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-20211206_100100_508201_0B404A7B X-CRM114-Status: GOOD ( 16.93 ) 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 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 5e1064c23f41..404e76d625f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3861,7 +3861,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