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: 139789 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp563519vqi; Thu, 14 Sep 2023 12:06:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyLgLRTIDiIKDdEpXzt1xy5zq3Q2uSvNNp849Oi7O7Bt6cKp4OMGovlIca94iVisSOSOhe X-Received: by 2002:a17:90a:c70e:b0:263:161c:9e9c with SMTP id o14-20020a17090ac70e00b00263161c9e9cmr3896988pjt.12.1694718373634; Thu, 14 Sep 2023 12:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694718373; cv=none; d=google.com; s=arc-20160816; b=YS7qXHkstcJg50+ujOoyQANi9CshV3lhiD2Kg6Mp9TygPtOCASIrFwWrQRpAjUpmRY Eccy6EF3FLmF6Q4ZKgS3aZp6qMq2jjXNru3ISFgrX7ZZNBqRaFE0m5wkaZEOR51sBMXi vgXzpmZ6eErSRYOszY6m9uiQ/WV4KpLvzQLOz24vuj9GbPDEBjfHNQDE/Th0r7Xh6XNx urB3UHsCb6Urma8BAFXlPk5l2nJ+MHQoXHfDNUxEwChiHhRD0oFooQsNxomoweggHAjT dQi0wzf0Fsqaew5TFzbzLbubfGyOYixR16dC/Vs5f+Lv0voAbqxKYh/UJHzAbzAtiBdf 4ItQ== 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 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 b31-20020a630c1f000000b005503f25aac2si1915923pgl.241.2023.09.14.12.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 12:06:13 -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=Fdu3g6ac; 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 BDE2C82F44D3; Thu, 14 Sep 2023 12:02:07 -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 S241457AbjINTB6 (ORCPT + 33 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 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]); Thu, 14 Sep 2023 12:02:07 -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 fry.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777041013558677181 X-GMAIL-MSGID: 1777041013558677181 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