From patchwork Tue Sep 19 20:09:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 142077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3652241vqi; Tue, 19 Sep 2023 13:09:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFywgERwLTjIUtsQPqzmgFQsmMdlNIyWOR7qm29HWcgdYGiFAiZih9uHyk+16DuprFolZ3F X-Received: by 2002:a17:90a:cb86:b0:271:ae4f:dd12 with SMTP id a6-20020a17090acb8600b00271ae4fdd12mr809111pju.26.1695154196155; Tue, 19 Sep 2023 13:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695154196; cv=none; d=google.com; s=arc-20160816; b=vwSAyYeD626xdW2gpyzsvv3EdTd/JuxFTSOT0lsSmBy7f4z6yh8ZUhCSyuLGLiCcsY opse7nBUyRbzIPODDAuu9Ol0UmoYI3PDu2ic4I1LvNv2MrJbmwRPHpeX2Y5cOoZcGXSi n3nU5GHmiznWga+YsAaQWjJORka2S4Hf4bfKgHwOSuRnZGHHW7+cQfgCGUSer2KVuw4B YVZEEA1aGLDMjOgD2bnFohn6H0ep4nMtdxrp9TLS0AV6/2OiYhG4kqEseXrMKqSVPhwa a7I4Q3syCk4sd+fBg/fw90J8qEahDejr/XsTqxEFJctaAW4S9ERPNauVJoRrPB4R3nsm e8yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=g0WiBmsHIOeFK2gcpmFqX8X67rjK0spS5G9kJB9PzZk=; fh=Prnr84Gs8aS247yiiutDeIIY/YukG5ONAQX7rC7mc4U=; b=rzTiqb5Bu6u04KbsJugAgAc/2rRm2Nfq60JKReA0AM2AzrSqpNud2x9iMvqeo1CXw2 S6wNSfytotc0hQnfD/0RMzt1tdbCPUcpXSqdG2z6ryA8GpwOlEZnxfPQhSs/JKiiIdt1 VKZbCMzT/tztKTNOTk+uNw4YEyT7TUde5qmidun0Dd/gr4t5TTUwGbXm2cM3WBInJl6O vcfdSwPwZFAOZ5LfhGZHq2iDsPoG6Gbhw28lOx9iM8cAYA0atXRHxDwnyz6FX+LJ3Yz7 1v2S7s4Z3qmu/F94KdnDZL0wznFs/brZsvPbfgfBgA9yxT2+M7reYE+IEXjp2jEW2bxA S7qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kW/cXRy/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id mu18-20020a17090b389200b0025bdaaf0d17si10909793pjb.33.2023.09.19.13.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 13:09:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kW/cXRy/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9CABF8268126; Tue, 19 Sep 2023 13:09:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232994AbjISUJp (ORCPT + 26 others); Tue, 19 Sep 2023 16:09:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232036AbjISUJo (ORCPT ); Tue, 19 Sep 2023 16:09:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F106B6; Tue, 19 Sep 2023 13:09:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD448C433C7; Tue, 19 Sep 2023 20:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695154178; bh=FNVxPQJYr8MGjYiR3OTqCQUWjoyGVbh3+o5wbD/5/Oo=; h=From:To:Cc:Subject:Date:From; b=kW/cXRy/ERILUTE2Xlx40q8HHGOjpKWXtl5rWAofkxPPzWTNeG7Abs8zffXM1voUH vjh3HQnJvcBhXgy+q06ykvdvhUzZ7uEAtCGbyMsFoAj3hS3/dLrqHv8z5kB+3fwZ0l hgHkg3yTwcxG+L8QkJ8Mcn4aD1VwdWTIW64oNNABxXz2nc308yT9vGCEnTwUqd3Fj2 Q4D6rMUp4wT3uWr21PGp1Tbwp9k4Ut0Ubbo6Nn7JG6UR/j8TCDspgaUKnElLph9zpl Ayt+l5VDStCugUnoJExYEgf6midsmtOHMoYS0VIqflS+y4JP/k1+c4qPsvv3PczsVt ZsNbucvytR3lg== Received: (nullmailer pid 137500 invoked by uid 1000); Tue, 19 Sep 2023 20:09:35 -0000 From: Rob Herring To: Linus Walleij , Krzysztof Kozlowski , Conor Dooley , Pavel Machek , Lee Jones Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v2] dt-bindings: mfd: armltd: Move Arm board syscon's to separate schema Date: Tue, 19 Sep 2023 15:09:21 -0500 Message-Id: <20230919200930.137164-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 19 Sep 2023 13:09:53 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777498006662527695 X-GMAIL-MSGID: 1777498006662527695 The Arm Ltd board bindings are a bit unusual in that they define child nodes for various syscon's. The schemas are also incomplete as they lack constraints on having additional properties and some properties are missing. As the bindings for the different platforms only vary by compatibles, combine them into a single schema doc. Add the "arm,im-pd1-syscon" compatible which was not documented. Add "ranges", "#address-cells", and "#size-cells properties which were missing. With this, fix the error exposed in the register-bit-led binding. Reviewed-by: Linus Walleij Signed-off-by: Rob Herring --- .../bindings/arm/arm,integrator.yaml | 39 ----------- .../devicetree/bindings/arm/arm,realview.yaml | 37 ---------- .../bindings/arm/arm,versatile.yaml | 40 +++-------- .../bindings/leds/register-bit-led.yaml | 2 +- .../mfd/arm,dev-platforms-syscon.yaml | 67 +++++++++++++++++++ 5 files changed, 76 insertions(+), 109 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/arm,dev-platforms-syscon.yaml diff --git a/Documentation/devicetree/bindings/arm/arm,integrator.yaml b/Documentation/devicetree/bindings/arm/arm,integrator.yaml index 98ff5698ae1f..1bdbd1b7ee38 100644 --- a/Documentation/devicetree/bindings/arm/arm,integrator.yaml +++ b/Documentation/devicetree/bindings/arm/arm,integrator.yaml @@ -40,45 +40,6 @@ properties: items: - const: arm,integrator-sp - core-module@10000000: - type: object - description: the root node in the Integrator platforms must contain - a core module child node. They are always at physical address - 0x10000000 in all the Integrator variants. - properties: - compatible: - items: - - const: arm,core-module-integrator - - const: syscon - - const: simple-mfd - reg: - maxItems: 1 - - required: - - compatible - - reg - -patternProperties: - "^syscon@[0-9a-f]+$": - description: All Integrator boards must provide a system controller as a - node in the root of the device tree. - type: object - properties: - compatible: - items: - - enum: - - arm,integrator-ap-syscon - - arm,integrator-cp-syscon - - arm,integrator-sp-syscon - - const: syscon - reg: - maxItems: 1 - - required: - - compatible - - reg - - required: - compatible - core-module@10000000 diff --git a/Documentation/devicetree/bindings/arm/arm,realview.yaml b/Documentation/devicetree/bindings/arm/arm,realview.yaml index 8d3ed2e4ed31..d1bdee98f9af 100644 --- a/Documentation/devicetree/bindings/arm/arm,realview.yaml +++ b/Documentation/devicetree/bindings/arm/arm,realview.yaml @@ -75,43 +75,6 @@ properties: type: object description: All RealView boards must provide a syscon system controller node inside the soc node. - properties: - compatible: - oneOf: - - items: - - const: arm,realview-eb11mp-revb-syscon - - const: arm,realview-eb-syscon - - const: syscon - - const: simple-mfd - - items: - - const: arm,realview-eb11mp-revc-syscon - - const: arm,realview-eb-syscon - - const: syscon - - const: simple-mfd - - items: - - const: arm,realview-eb-syscon - - const: syscon - - const: simple-mfd - - items: - - const: arm,realview-pb1176-syscon - - const: syscon - - const: simple-mfd - - items: - - const: arm,realview-pb11mp-syscon - - const: syscon - - const: simple-mfd - - items: - - const: arm,realview-pba8-syscon - - const: syscon - - const: simple-mfd - - items: - - const: arm,realview-pbx-syscon - - const: syscon - - const: simple-mfd - - required: - - compatible - - reg required: - compatible diff --git a/Documentation/devicetree/bindings/arm/arm,versatile.yaml b/Documentation/devicetree/bindings/arm/arm,versatile.yaml index 13e52ba92060..7a3caf6af200 100644 --- a/Documentation/devicetree/bindings/arm/arm,versatile.yaml +++ b/Documentation/devicetree/bindings/arm/arm,versatile.yaml @@ -14,6 +14,14 @@ description: |+ with various pluggable interface boards, in essence the Versatile PB version is a superset of the Versatile AB version. + The root node in the Versatile platforms must contain a core module child + node. They are always at physical address 0x10000000 in all the Versatile + variants. + + When fitted with the IB2 Interface Board, the Versatile AB will present an + optional system controller node which controls the extra peripherals on the + interface board. + properties: $nodename: const: '/' @@ -32,38 +40,6 @@ properties: items: - const: arm,versatile-pb - core-module@10000000: - type: object - description: the root node in the Versatile platforms must contain - a core module child node. They are always at physical address - 0x10000000 in all the Versatile variants. - properties: - compatible: - items: - - const: arm,core-module-versatile - - const: syscon - - const: simple-mfd - reg: - maxItems: 1 - - required: - - compatible - - reg - -patternProperties: - "^syscon@[0-9a-f]+$": - type: object - description: When fitted with the IB2 Interface Board, the Versatile - AB will present an optional system controller node which controls the - extra peripherals on the interface board. - properties: - compatible: - contains: - const: arm,versatile-ib2-syscon - required: - - compatible - - reg - required: - compatible - core-module@10000000 diff --git a/Documentation/devicetree/bindings/leds/register-bit-led.yaml b/Documentation/devicetree/bindings/leds/register-bit-led.yaml index ed26ec19ecbd..20930d327ae9 100644 --- a/Documentation/devicetree/bindings/leds/register-bit-led.yaml +++ b/Documentation/devicetree/bindings/leds/register-bit-led.yaml @@ -60,7 +60,7 @@ examples: - | syscon@10000000 { - compatible = "arm,realview-pb1176-syscon", "syscon"; + compatible = "arm,realview-pb1176-syscon", "syscon", "simple-mfd"; reg = <0x10000000 0x1000>; #address-cells = <1>; #size-cells = <1>; diff --git a/Documentation/devicetree/bindings/mfd/arm,dev-platforms-syscon.yaml b/Documentation/devicetree/bindings/mfd/arm,dev-platforms-syscon.yaml new file mode 100644 index 000000000000..46b164ae0831 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/arm,dev-platforms-syscon.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/arm,dev-platforms-syscon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Arm Ltd Developer Platforms System Controllers + +maintainers: + - Linus Walleij + +description: + The Arm Ltd Integrator, Realview, and Versatile families of developer + platforms are contain various system controller blocks. Often these blocks + are part of a daughterboard or motherboard module. + +properties: + compatible: + oneOf: + - items: + - enum: + - arm,integrator-ap-syscon + - arm,integrator-cp-syscon + - arm,integrator-sp-syscon + - arm,im-pd1-syscon + - const: syscon + - items: + - enum: + - arm,core-module-integrator + - arm,integrator-ap-syscon + - arm,integrator-cp-syscon + - arm,integrator-sp-syscon + - arm,realview-eb-syscon + - arm,realview-pb1176-syscon + - arm,realview-pb11mp-syscon + - arm,realview-pba8-syscon + - arm,realview-pbx-syscon + - arm,versatile-ib2-syscon + - const: syscon + - const: simple-mfd + - items: + - enum: + - arm,realview-eb11mp-revb-syscon + - arm,realview-eb11mp-revc-syscon + - const: arm,realview-eb-syscon + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + + ranges: true + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + +required: + - compatible + - reg + +additionalProperties: + type: object + +...