From patchwork Fri Nov 18 00:59:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 22003 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp710769wrr; Thu, 17 Nov 2022 17:02:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf4A0iZqZqmTtISBbfnT0+8XwScXsqPw/e7jnvA35jrtvH6yMVsETywmJLz/g+V/5COss7Uu X-Received: by 2002:a63:1965:0:b0:464:a9a6:5717 with SMTP id 37-20020a631965000000b00464a9a65717mr4313921pgz.584.1668733342025; Thu, 17 Nov 2022 17:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668733342; cv=none; d=google.com; s=arc-20160816; b=GEjmpKktoHHOzlwEppwDNDA0I+F6XCtnkL8d58cwEkui9w9yN6hZNGghEMJo0xOSor GtnQvkZFYwpGGzkhxu3e8wcVx1AtkWjgY9ZmpIpmr6n9DLUNlvz1z6KY7WODymSCZI47 bml6mhut5sgkStJjTeG9aePAmfqCz1Hf2lA7XUZJwj4+TZE6bKpkHbwwHV+y9johpLbj WX81ZODVfTUDgsxL0tqyZ6Mc8WkLDdUJqu72Rt1X5rUuS33DkXY5fX8TRQdn3kSBsu5u Vr3+bfiFzT3JTMAbkPcSRO/PGDkt3+vUZYq0NQ3EGtn+KbG2zMTsO1LKxoxTnfUrzCUs RAAQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mK+ROnhI7X82owWIxHNohnYdQMDPnGqevcLrbZZp2FQ=; b=SW2kkiv0ptGb9pa+QkeEKa5vnmFk1pwxQa8yyHpiN9CWEUn+R77d+ew85EyClhXGtZ dv+3vYwrnp/sK2xX1tT8thKmC8giK4gngHvv7tT3ZBEPfAzuSrUsqkx6NbCUTGadQA5l gtcArWO8vkw3QbERlckX6B7U01nD5H43zvyC/ygeNC3/cSyGYurs5XobLzcehGH7fxpY nTEm0rQwUGlTPQGOxLZnftH01iq6uscctfSBc5qj52sWz7BvHr81q+n6/RDgMW3fxewY SmbTh04eMUV1QUsGDElfdSd8kz7WjMFHNyyhoyNOJmDTbTmoQTowwbVqemfQ3Fz6fV5X WBlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k71-20020a62844a000000b0053e5ac66c3csi2246666pfd.38.2022.11.17.17.02.06; Thu, 17 Nov 2022 17:02:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240816AbiKRBAY (ORCPT + 99 others); Thu, 17 Nov 2022 20:00:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240801AbiKRBAS (ORCPT ); Thu, 17 Nov 2022 20:00:18 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CEBE73055C; Thu, 17 Nov 2022 17:00:16 -0800 (PST) Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 18 Nov 2022 09:59:11 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id DC56420584CE; Fri, 18 Nov 2022 09:59:11 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Fri, 18 Nov 2022 09:59:11 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id A165FB62A4; Fri, 18 Nov 2022 09:59:11 +0900 (JST) From: Kunihiko Hayashi To: Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 1/2] dt-bindings: spi: Add Socionext F_OSPI controller bindings Date: Fri, 18 Nov 2022 09:59:03 +0900 Message-Id: <20221118005904.23557-2-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221118005904.23557-1-hayashi.kunihiko@socionext.com> References: <20221118005904.23557-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749793732884776509?= X-GMAIL-MSGID: =?utf-8?q?1749793732884776509?= Add devicetree binding documentation for Socionext F_OSPI SPI flash controller. Signed-off-by: Kunihiko Hayashi --- .../bindings/spi/socionext,f-ospi.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/socionext,f-ospi.yaml diff --git a/Documentation/devicetree/bindings/spi/socionext,f-ospi.yaml b/Documentation/devicetree/bindings/spi/socionext,f-ospi.yaml new file mode 100644 index 000000000000..f52cac9ee9f8 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/socionext,f-ospi.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/spi/socionext,f-ospi.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Socionext F_OSPI controller + +description: | + The Socionext F_OSPI is a controller used to interface with flash + memories using the SPI communication interface. + +maintainers: + - Kunihiko Hayashi + +allOf: + - $ref: "spi-controller.yaml#" + +properties: + compatible: + const: socionext,f-ospi + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + num-cs: + minimum: 1 + maximum: 4 + + socionext,cs-start-cycle: + description: + Specifies the number of SPI_CLK cycles between CS assertion and + command transfer. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 15 + + socionext,cs-end-cycle: + description: + Specify the number of SPI_CLK cycles between data transfer and + CS deassertion. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 15 + + socionext,cs-deassert-clk-cycle: + description: + Specify the number of SPI_CLK cycles to output while CS is deasserted. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 15 + + socionext,alternative-byte: + description: + Specify the extra bytes to transfer after address transfer. + $ref: /schemas/types.yaml#/definitions/uint32-array + items: + - description: the number of bytes to transfer + maximum: 4 + - description: value to transfer + default: 0 + - description: bit-width to transfer + enum: [0, 1, 2, 4, 8] + + socionext,data-swap-2byte: + description: + Indicates swap byte order per 2-bytes. + type: boolean + + socionext,data-swap-4byte: + description: + Indicates swap byte order per 4-bytes. + type: boolean + +required: + - compatible + - reg + - clocks + - "#address-cells" + - "#size-cells" + +unevaluatedProperties: false + +examples: + - | + ospi0: spi@80000000 { + compatible = "socionext,f-ospi"; + reg = <0x80000000 0x1000>; + clocks = <&clks 0>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + + flash@0 { + compatible = "spansion,s25fl128s", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + }; + };