From patchwork Thu Sep 14 19:00:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 13385861 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 66220EEAA66 for ; Thu, 14 Sep 2023 19:01: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: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:In-Reply-To:References: List-Owner; bh=z0WW9cK4c8LO6FtFAKrEcN7wBWisKmnUJb+iEWkIYO4=; b=kFLn6MgmNfC+AJ P7wLt54fN4T9aIaAc8nUSSPbFbcJewThqhxRrRthyzcdzGT22bhCGJERz930KV6TE+EUVuK0qTS3i V9mmbZnFyvNhplBqFmFbI7ZQV0t3OkzsXOqO3+rsk1i8aEB6mNHa/xM48lW2S9xdqiFGyNulXkIPV AKRrK1AURV1YpS1bVqEsKqMr3aVDTY5OLwrxmGvf1PKj9j/bgLi/yfNwMu/IRBAdvRfJtb0iO0xO4 1mFKtT8GwgcG1HF5/Jh3jmgJiNftzZfDcbdBWPC6zdo8klQFE7ssRUgPhbTDRdKZrzxoYdvSlpGVV n5+Uz/qBYbuVtq2yiSzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qgra1-0097mq-1H; Thu, 14 Sep 2023 19:00:45 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qgrZx-0097lw-1y for linux-arm-kernel@lists.infradead.org; Thu, 14 Sep 2023 19:00:43 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1EFE561E52; Thu, 14 Sep 2023 19:00:41 +0000 (UTC) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230914_120041_733264_9FAA11D0 X-CRM114-Status: GOOD ( 14.57 ) 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 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 Reviewed-by: Linus Walleij --- .../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