From patchwork Wed Dec 1 04:12:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12694261 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 CF0A6C433EF for ; Wed, 1 Dec 2021 04:15:48 +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=Kdq39Em7Y0iwFRiEVOCFwQeOGhN23qCal17zY5BPnCU=; b=JUk08nyMgGoRbL VTI6JEMFu38I1p35yD4Y8/Fws9imkGDDDFJihrlF0RJrHn1Y3tFEhdUO9wh5LGaBKFmixq1BA6x+d DhuMEmDGNpMXJmAzFk0a+z3NfNaTuqiUJE00GClB+DnRhv7cQ8nGJFafRSni6hrcUrtmeZMImM9Uk JOgfifSZfpRhNLM4sMqKoG25DxHpBsL6IDeDy7Z6IfSySS3KYZsjeHDudzl/lFpiKBbUTV0Hnv2FL oTo4PBHQZzfM1obKRMnByUYaVWtiQqWccODY+pUc59G3+hX8n1aeQztmIFADHUVNaxetJvAOMfFGU 4hth7C8bu3wzCjRspmrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msGzz-007Pht-I2; Wed, 01 Dec 2021 04:13:39 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msGz4-007PQp-06 for linux-arm-kernel@lists.infradead.org; Wed, 01 Dec 2021 04:12:43 +0000 Received: by mail-pj1-x102b.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so216663pjj.0 for ; Tue, 30 Nov 2021 20:12:41 -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=Ghs9h0Wn3m4GG42iSZLt5BTn7S2LUyXpA+w/Xs7MsHuanlP1am/7Khp9yh4vfsRNNF jkCQ2cTLm8tSfWSqheDaIOfjCnC/nDgG9U1sg39deZhOCFMknAKaOsezXsuVMYvWuhEi iAiIAhM/tjxp8lMsYh2vbj3guQios5F45ko5+mydZOJzA4Ej2lSA/2O7/RVUj8DHzEGK UfbZRbvjbUJ6fOcRWLM0kS+qGJrjUDZ1cReMRgutYKlTSufvyLasSPIr/eoJdCIo2qce sFKAwk7+mjopTLR63E7Ccp72qELJ39fqn1+fQrsv84dOW428n/WpydNGSTY/eKxF6Rzx L3/A== 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=7m1Obd9TUWhIPh8kWAxW7VdbfcoIaYPc5les6y0GBIUYhaRfJXAmiXYdwDeq2uDj+z vGQ4ghJCC7zyxBqvPLW8HwUon5CUvNMlXe3XjNuFgfz+2yqLj7pT46NOgfekqPjHmZAk fnB+Tbc/2iIflntUBoOWSSWH8IuAD/ZXVIVxggS6Bq0Yfd2WDaDJomyDWLZ06CFSD5oW msHVPotvykoe/4VBkEVFPhMQ5+uGQ5Nwr5zmx/IOy+gRlz0CqXKMzvkTlRayuF5z0iSQ 2r/1IUTBphDjIt0mjeWvuBFlPqoIte95rDSZh52LMu7kOXKkndy6eQWVh4RDtmWQLdmc B7yA== X-Gm-Message-State: AOAM531KhNjg53MBqFSr7oPXBKiUEENe5yjS1GgNlxshgSUpB8xeY3oy 6QDwW0cfVka+g0SpbDiH7M0= X-Google-Smtp-Source: ABdhPJz+AGJrWdIboGE4ESLzP2gQL0G1mkxQUQYapwquMrl2Sdr59PkdZxUMOJWz2TJCza5Ier3z6w== X-Received: by 2002:a17:90a:e389:: with SMTP id b9mr4173549pjz.235.1638331961253; Tue, 30 Nov 2021 20:12:41 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 20:12:40 -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 5/7] dt-bindings: net: Convert AMAC to YAML Date: Tue, 30 Nov 2021 20:12:26 -0800 Message-Id: <20211201041228.32444-6-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_201242_078934_1CC2000B X-CRM114-Status: GOOD ( 19.43 ) 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 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