Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4121294rdb; Thu, 14 Sep 2023 12:23:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+jYCfhvY3WruhnNcKG3+asy/mIPHW4V3HAGCwe3BkN0MiL93oJ9wBvPPzKcfDZ0QATpG2 X-Received: by 2002:a17:90a:a602:b0:26d:689f:4253 with SMTP id c2-20020a17090aa60200b0026d689f4253mr3892499pjq.6.1694719386004; Thu, 14 Sep 2023 12:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694719385; cv=none; d=google.com; s=arc-20160816; b=jA8OPrFTU0u4P0D/Jy7KeBxFXKBQDAOxkkIC6wihp6Td0g5NFRaWdef4Ae2dari9fR rj2FYt0n46I2LXm7sebJM04Hb7456x7iJStkGNBbWg6PiFnkuezh2dQyqATKezZbCduG WOHfxizeNy6YR+ej2njZVzaK+NcUVJ3NTFlLQ69zzjsHquyZct6X1oHls19/0eSpv0T7 ai9EVTCKMKmf3zIPsPrV+kEnP8m5ctFEZePdzH40qt2RisGrl+qF6vqdNUM45TWUjdqW YXGNvtWh9UoixvaFnohZLpxLJCuFqyCylOfGHQPxZ8lUjBeygQ6WZLHuDQcT2At9ES9O BFQw== 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=oAZah0tizYHjbUgL/dX0rWkpBwuJayRhP1u+yASEfmk=; fh=+MxR0lyEmkD3pAsn11pfy7IA57qqvBtBH7ffSWk6ETc=; b=04Aq3yCrwWVHvB6g8VTmIjrJTjNIt6WIzTSiOBIYcD2Lb+IHV3a/CpaSgO73sjZGn1 bBt7PWichMVEflZ2zEBGSRURFUAI5QAQcWrQm2HKGjBj3geLpWEIyqo1OC8JJneb7G4S TkXqmWuN2c9NOektvUIKeaV7IJAQZszq4V8v1lNI910A9l+P9yoRoW1si+1WPHZ9/uo6 ASHCY3hYm0V977vqHRgMoqxw2rNAuCuKxJUNC66uRSxKSD2FOmwtF1wLR6zOEVsSSLAq JJEszKlDYe4Qn1ZXNadtk1bWmzoA6SQf2YseBOP9WmEKrtEGGPOo9OYgDeNNPGLpCtip Z/HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fdu3g6ac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id fs20-20020a17090af29400b00268a8e0cab3si1788637pjb.178.2023.09.14.12.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 12:23:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fdu3g6ac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 3481180B90A5; Thu, 14 Sep 2023 12:02:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241438AbjINTB6 (ORCPT + 99 others); Thu, 14 Sep 2023 15:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241250AbjINTBq (ORCPT ); Thu, 14 Sep 2023 15:01:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E559E1FC8; Thu, 14 Sep 2023 12:00:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6B60C433C7; Thu, 14 Sep 2023 19:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694718040; bh=e/WqClIhZFIvxsH2m/vcZyh47owt6UND8vvCxVGOp3A=; h=From:To:Cc:Subject:Date:From; b=Fdu3g6acgNeWRXRtXWywO5/uC/2b5ExwuI4KqocoA62A2COH3+y92OYVKzlMnQ3jG eXbFaqn0dhrw0q3lNNntAMly6+6TMivTL29K0+esWcY3m4r+2QsOEzHlR57XXGk7G+ 1Yul+eqdwV7JD4A0WOrNygJ8/65BFyaOQbHabmR/sImVn4xOGE+4FRHyGSmaahg8gG z0uqaIVnkEBqVZQfNcsgPc63REpAl2X8jwfKh3OimorCs/8yWweV1YJk7oZxFXL9q5 O4ud2LpaGQ5ygovHBiHoDcvcIRtSAqIOjo5MRPbMdH+oJHqHBUTvmO6ypaq7bmt7E1 pM1yNXSxTN3aQ== Received: (nullmailer pid 1853065 invoked by uid 1000); Thu, 14 Sep 2023 19:00:39 -0000 From: Rob Herring To: Mark Brown , Krzysztof Kozlowski , Conor Dooley , Linus Walleij Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] spi: dt-bindings: arm,pl022: Move child node properties to separate schema Date: Thu, 14 Sep 2023 14:00:17 -0500 Message-Id: <20230914190033.1852600-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (morse.vger.email [0.0.0.0]); Thu, 14 Sep 2023 12:02:17 -0700 (PDT) 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 morse.vger.email In order to validate SPI peripherals, SPI controller-specific child node properties need to be in a separate schema, spi-peripheral-props.yaml, which SPI peripheral schemas reference. Move the arm,pl022 child properties to their own schema file and add a $ref in spi-peripheral-props.yaml. Signed-off-by: Rob Herring --- .../spi/arm,pl022-peripheral-props.yaml | 61 +++++++++++++++++++ .../bindings/spi/spi-peripheral-props.yaml | 1 + .../devicetree/bindings/spi/spi-pl022.yaml | 51 ---------------- 3 files changed, 62 insertions(+), 51 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/arm,pl022-peripheral-props.yaml diff --git a/Documentation/devicetree/bindings/spi/arm,pl022-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/arm,pl022-peripheral-props.yaml new file mode 100644 index 000000000000..bb8b6863b109 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/arm,pl022-peripheral-props.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/arm,pl022-peripheral-props.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Peripheral-specific properties for Arm PL022 SPI controller + +maintainers: + - Linus Walleij + +select: false + +properties: + pl022,interface: + description: SPI interface type + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 0 # SPI + - 1 # Texas Instruments Synchronous Serial Frame Format + - 2 # Microwire (Half Duplex) + + pl022,com-mode: + description: Specifies the transfer mode + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 0 # interrupt mode + - 1 # polling mode + - 2 # DMA mode + default: 1 + + pl022,rx-level-trig: + description: Rx FIFO watermark level + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 4 + + pl022,tx-level-trig: + description: Tx FIFO watermark level + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 4 + + pl022,ctrl-len: + description: Microwire interface - Control length + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0x03 + maximum: 0x1f + + pl022,wait-state: + description: Microwire interface - Wait state + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + + pl022,duplex: + description: Microwire interface - Full/Half duplex + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + +additionalProperties: true +... diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 782a014b63a7..dc4f7bb47090 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -115,6 +115,7 @@ properties: # The controller specific properties go here. allOf: + - $ref: arm,pl022-peripheral-props.yaml# - $ref: cdns,qspi-nor-peripheral-props.yaml# - $ref: samsung,spi-peripheral-props.yaml# - $ref: nvidia,tegra210-quad-peripheral-props.yaml# diff --git a/Documentation/devicetree/bindings/spi/spi-pl022.yaml b/Documentation/devicetree/bindings/spi/spi-pl022.yaml index 5e5a704a766e..7f174b7d0a26 100644 --- a/Documentation/devicetree/bindings/spi/spi-pl022.yaml +++ b/Documentation/devicetree/bindings/spi/spi-pl022.yaml @@ -74,57 +74,6 @@ properties: resets: maxItems: 1 -patternProperties: - "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-f]+$": - type: object - # SPI slave nodes must be children of the SPI master node and can - # contain the following properties. - properties: - pl022,interface: - description: SPI interface type - $ref: /schemas/types.yaml#/definitions/uint32 - enum: - - 0 # SPI - - 1 # Texas Instruments Synchronous Serial Frame Format - - 2 # Microwire (Half Duplex) - - pl022,com-mode: - description: Specifies the transfer mode - $ref: /schemas/types.yaml#/definitions/uint32 - enum: - - 0 # interrupt mode - - 1 # polling mode - - 2 # DMA mode - default: 1 - - pl022,rx-level-trig: - description: Rx FIFO watermark level - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 4 - - pl022,tx-level-trig: - description: Tx FIFO watermark level - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 4 - - pl022,ctrl-len: - description: Microwire interface - Control length - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0x03 - maximum: 0x1f - - pl022,wait-state: - description: Microwire interface - Wait state - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [0, 1] - - pl022,duplex: - description: Microwire interface - Full/Half duplex - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [0, 1] - required: - compatible - reg -- 2.40.1