From patchwork Mon Feb 13 19:23:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 13138893 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 7FFB3C636D4 for ; Mon, 13 Feb 2023 19:25:43 +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=1n+2hJk1QUshCza+foJp/ObZIbYiNSTJeMGqikfXG+o=; b=2Ignbu08/l80L2 pHRzWrrSVrMVsjjnZjVPSEFmM11VA5eayHy+1FTadU6zjl+dCrmYWaPBPQU2woL+UaGfAjcx5DeCW hlMjKARsHyBxIzMl+okdUWOKzrS1HlHrH+oybF6Y8MD6L56DlvRHNRBA2ziSnoPqiE1YfRS2kindM Vwgq8Dch5BGW3YVxw8Q3lJUFPdvIuC/ibeZ0ezjBAxaIAx7s1ZwjB1qyZTiHvVcRSqhWubeMsiKOE JXMiq6L7g2VU9ecuZXWrv7WnO2iy1SSQal15hrhf4YvPqC66NyZfQ+5EUqUnRgtYYmHW9uzJw+LLk 1P5cAVQGRRjVzxoscwpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pReRM-00G0Tr-UT; Mon, 13 Feb 2023 19:24:41 +0000 Received: from pv50p00im-zteg10021401.me.com ([17.58.6.47]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pReRH-00G0SI-Vg for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 19:24:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1676316271; bh=xkmJJqu6MolKJdoAjsMp0nlBp8nKSB4Kl7pZsLx6TUk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=r/M6sjS5+L5YkZo5Ws5mZsv2Hz3oYUlnXUl7gzCyggfijeRIqHJ9zFRsZTSaB3+Sj oYIiLizNgoCK+hPv+HE7hGf53JdMCIbFAF1C8VPNRoiDL8tJ+sauAFeXDZV8FxtvUU b5T95e2nDMqWpTVpPfQgHWAI5G/1z1rq310UZqEFc4ZK38F27N6CWIvMtHGx//e2Jj 3zeJHLY159NVmdnGTREtwEikrNlpXx1mpc3n2MMwckVFGms78uiNwGNpwPIa0InS5R ZymRxo74P7WH2HQtUn/Uy8OdzjwnSAC8vC6nHm20tQmVSniBhlg08WU9Zd7m/tMVa+ vmMO/Eulu528g== Received: from localhost (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-zteg10021401.me.com (Postfix) with ESMTPSA id 4419F8E095F; Mon, 13 Feb 2023 19:24:29 +0000 (UTC) From: Alain Volmat To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Patrice Chotard Cc: Alain Volmat , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dt-bindings: spi: spi-st-ssc: convert to DT schema Date: Mon, 13 Feb 2023 20:23:48 +0100 Message-Id: <20230213192349.17101-1-avolmat@me.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: 2Gvif1CpBDyyDTT7F6ljF9AvkEw--yut X-Proofpoint-ORIG-GUID: 2Gvif1CpBDyyDTT7F6ljF9AvkEw--yut X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E517=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E11=2E64=2E514=2E0000000_definitions=3D2022-06-21=5F?= =?utf-8?q?01=3A2022-06-21=5F01=2C2020-02-14=5F11=2C2022-02-23=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 adultscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2302130169 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_112436_063355_3A041006 X-CRM114-Status: GOOD ( 17.56 ) 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 Convert spi-st-ssc.txt into st,ssc-spi.yaml for the ST Microelectronics SSC SPI driver. Signed-off-by: Alain Volmat Reviewed-by: Krzysztof Kozlowski --- v2: correct subject & commit log drop quotes around spi-controller.yaml remove extra spaces within example .../devicetree/bindings/spi/spi-st-ssc.txt | 40 ------------ .../devicetree/bindings/spi/st,ssc-spi.yaml | 61 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 62 insertions(+), 40 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/spi-st-ssc.txt create mode 100644 Documentation/devicetree/bindings/spi/st,ssc-spi.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-st-ssc.txt b/Documentation/devicetree/bindings/spi/spi-st-ssc.txt deleted file mode 100644 index 1bdc4709e474..000000000000 --- a/Documentation/devicetree/bindings/spi/spi-st-ssc.txt +++ /dev/null @@ -1,40 +0,0 @@ -STMicroelectronics SSC (SPI) Controller ---------------------------------------- - -Required properties: -- compatible : "st,comms-ssc4-spi" -- reg : Offset and length of the device's register set -- interrupts : The interrupt specifier -- clock-names : Must contain "ssc" -- clocks : Must contain an entry for each name in clock-names - See ../clk/* -- pinctrl-names : Uses "default", can use "sleep" if provided - See ../pinctrl/pinctrl-bindings.txt - -Optional properties: -- cs-gpios : List of GPIO chip selects - See ../spi/spi-bus.txt - -Child nodes represent devices on the SPI bus - See ../spi/spi-bus.txt - -Example: - spi@9840000 { - compatible = "st,comms-ssc4-spi"; - reg = <0x9840000 0x110>; - interrupts = ; - clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>; - clock-names = "ssc"; - pinctrl-0 = <&pinctrl_spi0_default>; - pinctrl-names = "default"; - cs-gpios = <&pio17 5 0>; - #address-cells = <1>; - #size-cells = <0>; - - st95hf@0{ - compatible = "st,st95hf"; - reg = <0>; - spi-max-frequency = <1000000>; - interrupts = <2 IRQ_TYPE_EDGE_FALLING>; - }; - }; diff --git a/Documentation/devicetree/bindings/spi/st,ssc-spi.yaml b/Documentation/devicetree/bindings/spi/st,ssc-spi.yaml new file mode 100644 index 000000000000..6a77cd3f5d6e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/st,ssc-spi.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/st,ssc-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics SSC SPI Controller + +description: | + The STMicroelectronics SSC SPI controller can be found on STi platforms + and it used to communicate with external devices using the + Serial Peripheral Interface. + +maintainers: + - Patrice Chotard + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + const: st,comms-ssc4-spi + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: ssc + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + #include + spi@9840000 { + compatible = "st,comms-ssc4-spi"; + reg = <0x9840000 0x110>; + interrupts = ; + clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>; + clock-names = "ssc"; + pinctrl-0 = <&pinctrl_spi0_default>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 2e32eb8d44f5..0fc3e4c6c1e5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2926,6 +2926,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained W: http://www.stlinux.com F: Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml +F: Documentation/devicetree/bindings/spi/st,ssc-spi.yaml F: arch/arm/boot/dts/sti* F: arch/arm/mach-sti/ F: drivers/ata/ahci_st.c