From patchwork Wed May 29 19:36:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13679447 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2086.outbound.protection.outlook.com [40.107.6.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F40D42045 for ; Wed, 29 May 2024 19:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717011434; cv=fail; b=ERnrAMGhAjGQIJVMSwKvuVXbKfoK57E/zMgjNmEKQ7mWDBdE3r0NC1D9/IRWPUbgz6tzxfR6FDvyIT49Y+U78D594HNlYSn90EQ0XD0ZJe8dR/mFAxLujcflJwyFAY70m5CLL+G6/mzimGSgUGK0bZ0Rwdj4YC08tapGiejtGmk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717011434; c=relaxed/simple; bh=78y6owJf/6kQvgJy8xgdIWalMSoQai2qVhOK56ujX/E=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=H0IYn2sBWVKwIdpg8Gj+FwHAqOAIeBYQdbcWWzjUm2R/3oqkZgZz92KVBgoD5g0SdJyREr0ZeBIbrwyIM+Xt8CBL1POmLnxeek+TqSq3IuzZeBUMhCd85f63wie7f1ZxRlITWUBxdyjvrDoy09XIW0LiTXeib4H5BVF14akfJ4s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=cxQxOIFl; arc=fail smtp.client-ip=40.107.6.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cxQxOIFl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ilXwMnDjKcz7RfDbisSbBa7ZdYDgROdehjDxf1IBa6s5GRi4k5SFVTq/xC9wIbK9lvvZczFt4pQNLBuwJu6W7+LaGbPZ890Kj+tTofajE0Pp2Ra++bkDLrrga3REnT7jhJ3tj9zf4LJH4grbhdu4WbQA3fHeKUzlQwRGs1GBqVA48IYcCXuYpgAmBh98bzbLEm/FoH79yphiNUCci41Bl85MxLvKjVHg++wYB81xjtGrYVV2clOr/EyqiGt5CM7F7KzJaF6lPG//3jcqUgI6azAVgqOw29nmgsm9CDdKsu+L14EFAzisq+tZtBJqoAPbkMHb5QP+fn0g2YIkU0biZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=d+i6Q18CVQUbsgabYWX1sdl8SAE/noRujsFZ6a7czo8=; b=mgqaWRJJjo1WlbgkgmheShZrBTL75i8VPyxq6mMIDZXV09wvwFKLmE43Vj+jvAVAZltiZsqKFJzfRe0OCX2uWOsXpOywzvJMza24gXEEphCb4E7p6T9UP89PbeVPA4GyG84uhFuGN8i3HjCzRvsmwjsSc7RNKevdPWl2pNiOs/RTvlOeoaEISJrdAP6PllwA3cfXOwIdjTEms4v9C+p82VFshtsIlL70Hy3gt09PXhNasw4x+k0kw8o1f1/u/YsT9Wn2dPQZjyyvkLN1q1yUtqTiTzJc7wDOmBiI25+/uFVTxiq+WYs7+ho4YROhZJJZdn0HFWKXPtrNaCOrjhbl+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d+i6Q18CVQUbsgabYWX1sdl8SAE/noRujsFZ6a7czo8=; b=cxQxOIFlT/Wn7FYmFVejREO03yyoXULk0RfEwhRP/J1nh9oWS/T+NOl6Xpyy1PtsKq6TxpZWvSfi/DDITWs/nL+ol+DCDoFP7rnpxwZY22QPrN6QvN6jsVM6evj/lVzeosrYV7MAEVAogVx5X6SR/kljkT9xyvhv4H7H4HV0Ugg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by VI1PR04MB7023.eurprd04.prod.outlook.com (2603:10a6:800:12f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Wed, 29 May 2024 19:37:09 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7633.018; Wed, 29 May 2024 19:37:09 +0000 From: Frank Li To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vladimir Oltean , linux-spi@vger.kernel.org (open list:SPI SUBSYSTEM), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Cc: imx@lists.linux.dev Subject: [PATCH 1/1] spi: dt-bindings: fsl-dspi: Convert to yaml format Date: Wed, 29 May 2024 15:36:50 -0400 Message-Id: <20240529193651.1029840-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BYAPR07CA0076.namprd07.prod.outlook.com (2603:10b6:a03:12b::17) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI1PR04MB7023:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fabf339-8d90-431a-155e-08dc8016bac7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007|52116005|38350700005; X-Microsoft-Antispam-Message-Info: arsDpqDlv8/to9DOlJm8du+TRbF81fAMhY9c0gXY9aKGfWVqGV3hRc1Ru3vuM4oLrAR19205If9MAbKVWs7QBYtpsK0AZpm45Hl69RXuy9XJJkQ1BpLF2PH3JP4u0bEw0pf3Tyw9aLa7CCxK72f7iXEdM13+yrhdl8MKVxTv6uNd9110liVXVRR+telbGerjH8/v6gm6IqEsRe+B85z/7xbuBxMgmfJbFxDuBWmfQc2s3oVHif8ArS/UVCFsBlGwPse55Uupgd9+jlBjE5qJ+SABVJfigGhwkTw3/rcXuMFUCgnFlUVJ+4aYWqETOjjWxXCA5RKXmQctu6Z8lyTaUyLVeE51ypjO8Z95y69o8u2S9G7pyjAQ3731aUJc/MuArdXdyinEpi2MsXrU5MPxfmYM3McTWAJep9BVB6MkvwZx6m/56PsrBrbURF/K+dS3bo8yLIfIKsjsoAhuAhxp9PiYGxj4KfNzY7KIpBv2RhgTeSpGgjdrC6cf9E0/WS/yWlCTIabFqRL4Vuk4SRwxH9JC2IJyuNZFnXUnpJgxAL3CGSMcDtw0Uqy7qAWxrLeU95Mp5fSHlSYpGJeLHD6c/zZ54iQlE4mf8RSnb94/u/YJvxqrkJq3wwrTjjKeuR4XAmQvfWMjQ2ju2BKkWPebh1DZkA5yzTRHEdMMmJe89SoCeeF36oOKMxkpsU2PPPMmg3vFLPQJ2cLQxTnBEEOGJrA54pLhQ0UV+mVX56gOCRJ18hQr1JZMTauKLk5A4SqzFiITUpks4k6ctNDTPqjjAK42RQyMa1Sgro0em8dejZV896lc01oBBYUorB3lh0nRunbr72I7JYFVW1gvCTOgJoJJ1nLpVCZjVlVEgvNYtVMEu1qOA8SeN8FGiG6aeBRQkxT5z1FtJG13GrV01Kmot6gR9vt565pObrTIul59zQeKTRp3SVC9EO9xL0vrgXru0GjFWpuH5+Cnzu9YuaeGGF1aev203khHekE1LuPSrRPahVvx2TxXiOTv/+nvk6C375+6Ut3h124LfFMxaCG/XMkUK//RfbEu3MU6qtwmGgGrTici9JpSde4Ua3Z9tI8vE2lcoz/iaN+aLvhx9ZQVk2Srq+3wxK81cXdfBVBqReMBgJMZUJlWf3XfG/+EMAn3t5Q/IrUUTPC9+hfEca/gWxHTcjMTMXlRy5WI8K64mvkm/ARAQWsa/lVQpaNhO8oyL6yh86mj6llIHRwCjx/4nf8f/+TA2DXYpXn/N8lOu71HS8WUfrQwWDlMR8w3OnB2yqYCJ7zDSyWNzQEDorrmyg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007)(52116005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3fWLeX8qZYNZNqxzwBrCdFkVAclMn77NIbvOixqMg3qzHbDyCFMOx+ldONg18qJh4viRDaTWDr9DC3qhKxuXDPjIllskoTFZirLqKk0XAiiNpnoGaSqryQhVNqohmblzWnZE/SQsps1gwWqD5554zlxzACMf3sMH4tKdivDmasn50H0OyIvBefSYeA8ZrFlkxewRgkRPcN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wcMeN8z7Ok35Vx0Ax8gLEhB21PGx+yq+BMoe6Q6SVgHjMBSAc3m+QFPxCtnFOrG/pHQ20XXKVJ6xMogTUS6VTdFamTTULm8CSISrGqc47Mu9z1zdp1RdxFPxfhXKVoLTbKvYrLLmYatIsRHeYJF0k2ck3sb+5JafIFFH8OqxridPYxtwJ83z51rpt177rwxgvC3PLQmudv6iwlcj8s6+1oPEbKCp719eND8+wcuM6bozzVMGVzASITuDBe1VwRHmGehFQb6iYWLKXAx/3Q5HOUm9+p4JbNr66Y8yM6iQXVim6r+Uthp2VcuJnZ1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fabf339-8d90-431a-155e-08dc8016bac7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 19:37:09.3192 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ujmAd3J02n95ck3B6BRD4HkHND13ohUNg0RQmQwvT+XjV2QgVzEg755T8Ka9Fhjbgc6W22SDxfM1De8xp9Ibjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7023 Convert dt-binding spi-fsl-dspi.txt to yaml format. Addtional changes during convert: - compatible string "fsl,ls1028a-dspi" can be followed by fsl,ls1021a-v1.0-dspi - Change "dspi0@4002c000" to "spi@4002c000" in example - Reorder properties in example - Use GIC include in example Signed-off-by: Frank Li --- Notes: pass dt_binding_check make dt_binding_check DT_SCHEMA_FILES=fsl,dspi.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/spi/fsl,dspi.example.dts DTC_CHK Documentation/devicetree/bindings/spi/fsl,dspi.example.dtb .../devicetree/bindings/spi/fsl,dspi.yaml | 126 ++++++++++++++++++ .../devicetree/bindings/spi/spi-fsl-dspi.txt | 65 --------- 2 files changed, 126 insertions(+), 65 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/fsl,dspi.yaml delete mode 100644 Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt diff --git a/Documentation/devicetree/bindings/spi/fsl,dspi.yaml b/Documentation/devicetree/bindings/spi/fsl,dspi.yaml new file mode 100644 index 0000000000000..12a67b2cc25c8 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/fsl,dspi.yaml @@ -0,0 +1,126 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/fsl,dspi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ARM Freescale DSPI controller + +maintainers: + - Frank Li + +properties: + compatible: + oneOf: + - enum: + - fsl,vf610-dspi + - fsl,ls1021a-v1.0-dspi + - fsl,ls1012a-dspi + - fsl,ls1028a-dspi + - fsl,ls1043a-dspi + - fsl,ls1046a-dspi + - fsl,ls1088a-dspi + - fsl,ls2080a-dspi + - fsl,ls2085a-dspi + - fsl,lx2160a-dspi + - items: + - enum: + - fsl,ls1012a-dspi + - fsl,ls1043a-dspi + - fsl,ls1046a-dspi + - fsl,ls1088a-dspi + - const: fsl,ls1021a-v1.0-dspi + - items: + - const: fsl,ls2080a-dspi + - const: fsl,ls2085a-dspi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: dspi + + pinctrl-0: true + + pinctrl-names: + items: + - const: default + + spi-num-chipselects: + $ref: /schemas/types.yaml#/definitions/uint32 + description: the number of the chipselect signals. + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + If present the dspi device's registers are implemented + in big endian mode. + + bus-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: the slave chip chipselect signal number. + + fsl,spi-cs-sck-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + a delay in nanoseconds between activating chip + select and the start of clock signal, at the start of a transfer. + fsl,spi-sck-cs-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + a delay in nanoseconds between stopping the clock + signal and deactivating chip select, at the end of a transfer. + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - pinctrl-0 + - pinctrl-names + - spi-num-chipselects + +allOf: + - $ref: spi-controller.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + spi@4002c000 { + compatible = "fsl,vf610-dspi"; + reg = <0x4002c000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = ; + clocks = <&clks VF610_CLK_DSPI0>; + clock-names = "dspi"; + spi-num-chipselects = <5>; + bus-num = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dspi0_1>; + big-endian; + + flash@0 { + compatible = "atmel,at26df081a"; + reg = <0>; + spi-max-frequency = <16000000>; + spi-cpol; + spi-cpha; + linux,modalias = "m25p80"; + modal = "at26df081a"; + fsl,spi-cs-sck-delay = <100>; + fsl,spi-sck-cs-delay = <50>; + }; + }; diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt deleted file mode 100644 index 30a79da9c039d..0000000000000 --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt +++ /dev/null @@ -1,65 +0,0 @@ -ARM Freescale DSPI controller - -Required properties: -- compatible : must be one of: - "fsl,vf610-dspi", - "fsl,ls1021a-v1.0-dspi", - "fsl,ls1012a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), - "fsl,ls1028a-dspi", - "fsl,ls1043a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), - "fsl,ls1046a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), - "fsl,ls1088a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), - "fsl,ls2080a-dspi" (optionally followed by "fsl,ls2085a-dspi"), - "fsl,ls2085a-dspi", - "fsl,lx2160a-dspi", -- reg : Offset and length of the register set for the device -- interrupts : Should contain SPI controller interrupt -- clocks: from common clock binding: handle to dspi clock. -- clock-names: from common clock binding: Shall be "dspi". -- pinctrl-0: pin control group to be used for this controller. -- pinctrl-names: must contain a "default" entry. -- spi-num-chipselects : the number of the chipselect signals. - -Optional property: -- big-endian: If present the dspi device's registers are implemented - in big endian mode. -- bus-num : the slave chip chipselect signal number. - -Optional SPI slave node properties: -- fsl,spi-cs-sck-delay: a delay in nanoseconds between activating chip - select and the start of clock signal, at the start of a transfer. -- fsl,spi-sck-cs-delay: a delay in nanoseconds between stopping the clock - signal and deactivating chip select, at the end of a transfer. - -Example: - -dspi0@4002c000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,vf610-dspi"; - reg = <0x4002c000 0x1000>; - interrupts = <0 67 0x04>; - clocks = <&clks VF610_CLK_DSPI0>; - clock-names = "dspi"; - spi-num-chipselects = <5>; - bus-num = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_dspi0_1>; - big-endian; - - sflash: at26df081a@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "atmel,at26df081a"; - spi-max-frequency = <16000000>; - spi-cpol; - spi-cpha; - reg = <0>; - linux,modalias = "m25p80"; - modal = "at26df081a"; - fsl,spi-cs-sck-delay = <100>; - fsl,spi-sck-cs-delay = <50>; - }; -}; - -