From patchwork Tue May 28 16:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13677025 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2055.outbound.protection.outlook.com [40.107.20.55]) (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 9571E16D4FF for ; Tue, 28 May 2024 16:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716914273; cv=fail; b=rBizCQKrLWhLQeckD+LV0wiz81TE2CAHsKFCB+5jLOPyjCsytOoPsd7NvTgbKMW/hAI/CsKw7VfjXqec++UoPIJx3/f6RhsBZLF2U5IMKueHQXqGPkDao67PYIgEBkqYLVyyUYdrxpeot7OJlp0XuqHfbji8r5SyRfujgvywygQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716914273; c=relaxed/simple; bh=+d8de66yaT8xiheUwXMRKmPwCEhj+TaoAFr0loD9Gkk=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=AdA3mBZJTSoJuFfiGcM51T29rVGuB0jfnW4Ue1I/LTDXNiRKSgzBK83DoezyuX4nRmv1XF9RsZYYYBzGlsH0xrAefecttW5JU0lyJCsL3F1g/e1or/0pLK+5q3GKeNL9U0a/juWhr3pA+ldKsIEoitLqaKqnaTntY7jhl5Tacas= 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=KR/BNAgw; arc=fail smtp.client-ip=40.107.20.55 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="KR/BNAgw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MDa6w2yGc1vjzKByiA5rjDGfO11IAikAGZcNObLzqAT/62tJ7Q2srow03GByyusPf1DcdjJQllmKKOlybpGFo5ftNuti8AtLX8na0KpDgeoFW8mCL4FpozYVaMKJ66AAOR3s1KV23qWyNGtipvSsgwDt0dQ9SSIQQUKj/13i/wyk3VIuTns/Xx3dmO9KqcPBoqwOsb0gKc4w3lJxxMeppbSI0x3v6TC/hWukY6TtT5SKsGgxAU4MqzR6YvhZAyRJXsV3oYdiFn5MH7CcCMeKDPbA/tlVjCN8xUAG9PTfTgGrj8yWKguEsKbQTtVHn9REulzaqdmnixPTHol7LiIJnA== 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=b3u9q8cHqVMZURDuomlOuVUsRvMYihu+yaWiEmc8Kwc=; b=mcXo3lC4LgV3zfbQF7SdNwncR/4KNWYy3Q35Pn/xZSJ7TDGEuURBJXeIvr8lolr028sWYl+igePv3//yK1MvAHbGd9mQreaY7pJRQg6ouTW4jzQX4g29y4WENxkhdK3N3F0qENA96TDlEuxEuENZEs7QIp4g9fLsPdQr515NwKpP09S++YsvrJCklYODMGuwuFYH4nsPp9R4q3a/VCtdQZgepSbmsfr0BGPAoBcyn/s34RjqKjDg7czp8UgZlENaQRwVA4BtSQT3deboZtCy6bOHpO5xVfv+9JM6R1dFBt3+6vKt/2h+IgjVUyKxpg46OAI/n/bV1kqNViz4wH3Ygw== 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=b3u9q8cHqVMZURDuomlOuVUsRvMYihu+yaWiEmc8Kwc=; b=KR/BNAgwDCW+J8DxTRKgSqRHM+QjuV2P5ETiwiC/7tgr9AxKQ/I6aZE1N2eF4Bci0NzCeidD3QbTic+CkYzDNJv89Ig5yxMcNFZziMXO1MInzB/xjMeIi66k/ochMqlr2Gy/Jo2Sz/c0hq1bqWJ1S86+alBAz0yJdmXQwHNdjpg= 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 AM9PR04MB8416.eurprd04.prod.outlook.com (2603:10a6:20b:3b7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Tue, 28 May 2024 16:37:48 +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.7611.016; Tue, 28 May 2024 16:37:48 +0000 From: Frank Li To: krzk@kernel.org Cc: Frank.Li@nxp.com, conor+dt@kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, imx@lists.linux.dev, krzk+dt@kernel.org, linux-kernel@vger.kernel.org, robh@kernel.org, vkoul@kernel.org Subject: [PATCH v2 1/1] dt-bindings: fsl-qdma: Convert to yaml format Date: Tue, 28 May 2024 12:37:34 -0400 Message-Id: <20240528163734.2471268-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SN7PR04CA0213.namprd04.prod.outlook.com (2603:10b6:806:127::8) 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_|AM9PR04MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: dc41cd65-837f-46fd-5cd1-08dc7f34829e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|52116005|366007|376005|38350700005; X-Microsoft-Antispam-Message-Info: Qke0GqrdMhP9E1eaAptvN3HJCVAQanwfLtJtw2IIzgrEIUwYrp7FWP+mElhJirEJ1VEp94tYNsmyrtbPe2Zp7xbnMVs8eyKBVcQWLtsbfHMGAYVHpA3KdD4DEhgRrkWxjFWJtDQVlBLka3mMfb3TFvrYTgkELJnK4jq/EQwmb3ITGxirRomqR48gV4Lrugf6FmnKRFKFNUfZi0qFGH4w68k2t6Rhf7otOBHeJZYdeq03LE9MA+8f3U+cNVZINfEg81M6XcM23zQnHQFjv+rBm9TizqC+uoOMOdhHS6wNtIcwACBEMkXGo0jYMT8KC3vkxuIeGa4Uta47UQwv0xlsryRY9DfiCYiccFU1OIpb5kHNyEU5aBZ+Nh3UiIakudtvEg/hBbLzq/Wdv3+zzoWkL/D8TlFJwnIWugRi37Uw6Vs+cV4YGa2O+k9T0p2aytdobUATZ9fskSV0ABZQ6WGva+LC19kCUnn/l8RABDMVjXvgV2hqOGeyrKWzMSa14yEUt6bcdxv2xyg04jEnKXBpPABh6uZNEXWevzU6/bHu2YfTiQPWDSTsFcuiPwjJBeJxxPjKkAN6doX3neyfUvRdYeMqbkX6zyaFnV33+RBKjuWu7+sUVvaoflVLD410xUcDejz/wx4jx7cCR8kRf7my/pZcChENY44OP/XTp1LHMIbGpiEmZ0UDQPRXPVmOg6YoCl7IvVj1vpt1mPWvL6nAuBDw8/l+iZO+Ob6GY6Slpobyo5Xums/p9toaUO8q9eqtR8oKZWOr4CMecKE+OJZLvC9x2uhcnAAe+UuWSGlbGio6SBse43v63jb7oCTqxYvA9VV0DIZz4e+B8Jq0gcD208kI7mH3YqazhG10fEnEXpT9lY+1FDXY1kru3UtzXmUCgXEKjRSltPskC5qo7zazXWFDFEuYjfC78W2LeCk26WIGjDXpQorgcLjcYI5eqnR0u5poVKE41rqYtPokm7owa0RCOpJGb/nXfIEWXnNjSejBIDnSd4pMyQIJIc+1KaVQobHlAJV4Myh4GKXIeEhxdl9YMSrAJI6wrhYFaKLxxAGEQjOH7VpxqiVgCFvWNYciagvLGQNtEjzWAQOx/2WeqVODP9VyakM5EnF62r08CcEf2M08F9iKCix1g6984K/+pBssuMg/kuzavvGLpF2lSZlGbyiY69tAs1XcpjQI3mO9Pa6EYiLQy+UZMiNckUKNkDOfKzaubhwleHRSn2Au2EFNLc/KsNItt6OCk2bT+/0tFYNqh4EBZ+OW2dre3Q8Mg5X/IeUPz+BDbLgnYpkcgTNRpWiBfPjTeVjR0K0QZ+M= 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)(1800799015)(52116005)(366007)(376005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7EiIHABd5d+P3XoSgMMXyW2awuB6A2AgmaH12hJclH8qA3aD9Vo8/N6g+7tytt/i3kObkCrPalBb40lbMnvTLDBWZEIgdjnTOK88uydEwRnQPT9LG8WrdfYKyRdva0Piw7b3okZvxvR67voP23U+Me28nCWePbsfbluTwa1cgXkbjW4r6gtn9jLgCf6keDJceKQHB3/0h1G4moqQyXvNnHyCr63GFvYJ8x+50Fa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IRV9kqfNm+k8HbNBbjm76/i0ABhPXjoD1Y6/BKVK5tjhmNP+f5ZMd1G9Uz6iW1z/IyuX2MWfxrGfTfOPo/WD114i2pEtbdKh3ECcmOmAOgY8ozYmY7aEyRMP3NL2XL93FQNMYpS65+KJB/Nf66/6VmkkKVSt2Cv9NiCjGLGsXE58gPkbmBMRFjCj6rLm0s9h2asYUJaqDhn+nFNKxCrlo3q/B+moUs9sZmnC/0OWXESH2ryyCRhL7Bzskp9yssd1u4tmob850esh77lwvWRnSXm5M X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc41cd65-837f-46fd-5cd1-08dc7f34829e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2024 16:37:48.7262 (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: pdi33JhmOcd3f3mGSlAupx2eafAGMm9MN+jw63nRKjri8oiaVrQPMUBzP1UbJYZaf9KK5X9KKqnfVRaS/cWTXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8416 Convert binding doc from txt to yaml. Re-order interrupt-names to align example. Add #dma-cell in example. Change 'reg' in example to 32bit address. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski --- Notes: Change from v1 to v2: - dma-channels's minimum and maximum - add Constraints for fsl,dma-queues - move unevaluatedProperties after allof - add interrupts contraints for ls1021. Pass dt_binding_check: make dt_binding_check DT_SCHEMA_FILES=fsl-qdma.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/dma/fsl-qdma.example.dts DTC_CHK Documentation/devicetree/bindings/dma/fsl-qdma.example.dtb .../devicetree/bindings/dma/fsl-qdma.txt | 58 -------- .../devicetree/bindings/dma/fsl-qdma.yaml | 124 ++++++++++++++++++ 2 files changed, 124 insertions(+), 58 deletions(-) delete mode 100644 Documentation/devicetree/bindings/dma/fsl-qdma.txt create mode 100644 Documentation/devicetree/bindings/dma/fsl-qdma.yaml diff --git a/Documentation/devicetree/bindings/dma/fsl-qdma.txt b/Documentation/devicetree/bindings/dma/fsl-qdma.txt deleted file mode 100644 index da371c4d406ce..0000000000000 --- a/Documentation/devicetree/bindings/dma/fsl-qdma.txt +++ /dev/null @@ -1,58 +0,0 @@ -NXP Layerscape SoC qDMA Controller -================================== - -This device follows the generic DMA bindings defined in dma/dma.txt. - -Required properties: - -- compatible: Must be one of - "fsl,ls1021a-qdma": for LS1021A Board - "fsl,ls1028a-qdma": for LS1028A Board - "fsl,ls1043a-qdma": for ls1043A Board - "fsl,ls1046a-qdma": for ls1046A Board -- reg: Should contain the register's base address and length. -- interrupts: Should contain a reference to the interrupt used by this - device. -- interrupt-names: Should contain interrupt names: - "qdma-queue0": the block0 interrupt - "qdma-queue1": the block1 interrupt - "qdma-queue2": the block2 interrupt - "qdma-queue3": the block3 interrupt - "qdma-error": the error interrupt -- fsl,dma-queues: Should contain number of queues supported. -- dma-channels: Number of DMA channels supported -- block-number: the virtual block number -- block-offset: the offset of different virtual block -- status-sizes: status queue size of per virtual block -- queue-sizes: command queue size of per virtual block, the size number - based on queues - -Optional properties: - -- dma-channels: Number of DMA channels supported by the controller. -- big-endian: If present registers and hardware scatter/gather descriptors - of the qDMA are implemented in big endian mode, otherwise in little - mode. - -Examples: - - qdma: dma-controller@8390000 { - compatible = "fsl,ls1021a-qdma"; - reg = <0x0 0x8388000 0x0 0x1000>, /* Controller regs */ - <0x0 0x8389000 0x0 0x1000>, /* Status regs */ - <0x0 0x838a000 0x0 0x2000>; /* Block regs */ - interrupts = , - , - ; - interrupt-names = "qdma-error", - "qdma-queue0", "qdma-queue1"; - dma-channels = <8>; - block-number = <2>; - block-offset = <0x1000>; - fsl,dma-queues = <2>; - status-sizes = <64>; - queue-sizes = <64 64>; - big-endian; - }; - -DMA clients must use the format described in dma/dma.txt file. diff --git a/Documentation/devicetree/bindings/dma/fsl-qdma.yaml b/Documentation/devicetree/bindings/dma/fsl-qdma.yaml new file mode 100644 index 0000000000000..1b689a2529c87 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/fsl-qdma.yaml @@ -0,0 +1,124 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/fsl-qdma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Layerscape SoC qDMA Controller + +maintainers: + - Frank Li + +properties: + compatible: + enum: + - fsl,ls1021a-qdma + - fsl,ls1028a-qdma + - fsl,ls1043a-qdma + - fsl,ls1046a-qdma + + reg: + items: + - description: Controller regs + - description: Status regs + - description: Block regs + + interrupts: + minItems: 2 + maxItems: 5 + + interrupt-names: + minItems: 2 + items: + - const: qdma-error + - const: qdma-queue0 + - const: qdma-queue1 + - const: qdma-queue2 + - const: qdma-queue3 + + dma-channels: + minimum: 1 + maximum: 64 + + fsl,dma-queues: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Should contain number of queues supported. + minimum: 1 + maximum: 4 + + block-number: + $ref: /schemas/types.yaml#/definitions/uint32 + description: the virtual block number + + block-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: the offset of different virtual block + + status-sizes: + $ref: /schemas/types.yaml#/definitions/uint32 + description: status queue size of per virtual block + + queue-sizes: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + command queue size of per virtual block, the size number + based on queues + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + If present registers and hardware scatter/gather descriptors + of the qDMA are implemented in big endian mode, otherwise in little + mode. + +required: + - compatible + - reg + - interrupts + - interrupt-names + - fsl,dma-queues + - block-number + - block-offset + - status-sizes + - queue-sizes + +allOf: + - $ref: dma-controller.yaml# + - if: + properties: + compatible: + contains: + enum: + - fsl,ls1021a-qdma + then: + properties: + interrupts: + maxItems: 3 + interrupt-names: + maxItems: 3 + +unevaluatedProperties: false + +examples: + - | + #include + + dma-controller@8390000 { + compatible = "fsl,ls1021a-qdma"; + reg = <0x8388000 0x1000>, /* Controller regs */ + <0x8389000 0x1000>, /* Status regs */ + <0x838a000 0x2000>; /* Block regs */ + interrupts = , + , + ; + interrupt-names = "qdma-error", "qdma-queue0", "qdma-queue1"; + #dma-cells = <1>; + dma-channels = <8>; + block-number = <2>; + block-offset = <0x1000>; + status-sizes = <64>; + queue-sizes = <64 64>; + big-endian; + fsl,dma-queues = <2>; + }; +