From patchwork Tue Jan 7 16:16:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13929278 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2084.outbound.protection.outlook.com [40.107.22.84]) (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 76FFA1F4E2E for ; Tue, 7 Jan 2025 16:16:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736266616; cv=fail; b=Zagn/rsdJwZdhEXAike3E9fIeJYWth66Ad9lgQF3q4I2r1X1xmFcBQSEu3dMz/lzzpIsQvD71X9CHdMwBgTqad9UFLSIBx0Jdq7l8RX+yYK7KzXUo2nrSyLUXbUs0NWmwzQtazUssPQoZ5TeClX/C0+TC8CDC2X3CHTlusa72mw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736266616; c=relaxed/simple; bh=KYvJ3ccd0Efr1yayEfrnw5zFeEWG8CZn/Uq8H5XlGJQ=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=jxKiV2wclDgtRPiuV6JLYvfsGUATch9S2YfYHKJRo5aEdvSWLT323gKi6/tmqltfgKvyh6tOWt2EReUFypWjBCWa2DRo4fr3NzsnuL9i8CktcOi+00M/md5+VSuIORHWHXX7tYmcZy61EE1OXU9nnK+q5OrvQa10hkDgYdrUvbs= 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 (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=dnWVh/wI; arc=fail smtp.client-ip=40.107.22.84 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 (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="dnWVh/wI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B5LhkY4Y9UjX79hb/5fKpZ/q4dxzA7X/aZJgBiurYC4VrYnzZXB6PrB8KjhWvmEEdm7BXzUw9PYH3j6X0nerVcCatC8kk8wEHuYXnp9fq5qosEXEg7KUJfbWfNcfXunD4WPqQpwYwp8Ay9R+Izd0ZfnLZ5kWMNSgCfE1U5eo7GAn0BUfyTb0LAfsI0U+iay/itX3CUaan92EqXDKp9AIJ+1Y+XWJKQp0qy4PCK1t4LHdIFPU+wqAQrc+Na3JVv6faVIhKQoN3UOUBrIcLAfTW9U22v5Zy78GfhOkSdKQvIXnNxDwVsmBRqAzJkJHJGwp1KbJeRa7yvyxTZ7DxOXDCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IBfE6T9JDPqYAPA1hdD7JO22S94pOEeKjcrBwIhvapY=; b=D8kt7ePcV1HDCZ0vbRTIXXAcfKjz4lB3nISefA5tbi36Ulcw7YkfX1JJBxO+OzwD0qh1l/gebjWC3ONs9rKBgg/EKDw0LoQ+AACuHTV9VVarMbdnr75LJWi85kOBswiZS0zfk0QbqDN9dmsj0ApiFfJUehKKe7IFNFGowrRg3KEMV3nt+l1LJNnsoFDnDHbQFXwFd+qxvsm8rR19RaavV0gpPIbOoXR5EIgiwjvFyVlqggi9DA9gFCelCb4wzsa+tyTTY3MzSTznaIFSDGeGqQ9Qlu6EEWu3cBOZ4PC1CkrS/9KDF6ivAQsf2k/qDYopSVTxJlnpJh2I+z2328F43g== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IBfE6T9JDPqYAPA1hdD7JO22S94pOEeKjcrBwIhvapY=; b=dnWVh/wIi7RrlIkXKFzpc3BQ2bL+nNJt0m4oDIZCdbOA+CTfNt6mb+jhIWmJ2weOizeEszAhZDig9B2uNXJUC8M0559ntaPWnAgfjcFFpwAN0MPYhMYV/wWLVR3rqWV7izm1Wzo7LiQnJ27sm/tg/tWw6x6Pn/9tujaIGPjkxSBT5yMT8vSmp5gyaKp4HqOTcUTIOKn2bYYEkpPBf8YqO3WukSjoayFaUTbnpNfMEU20BiY4daorVy8i/VYLYWueKH3pV9dva4GzTN7ojM/edDp89M7l9w+1DIUDFOya9MaOvNL4Y1+mU4QdoCWvJcE6SQ9ua2rv0qgooUutri0A0g== 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 DB9PR04MB8493.eurprd04.prod.outlook.com (2603:10a6:10:2c5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8293.17; Tue, 7 Jan 2025 16:16:44 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.8335.010; Tue, 7 Jan 2025 16:16:44 +0000 From: Frank Li To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , linux-leds@vger.kernel.org (open list:LED 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 v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format Date: Tue, 7 Jan 2025 11:16:26 -0500 Message-Id: <20250107161628.121685-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BYAPR01CA0001.prod.exchangelabs.com (2603:10b6:a02:80::14) 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_|DB9PR04MB8493:EE_ X-MS-Office365-Filtering-Correlation-Id: 31063cc1-7733-484b-4fb3-08dd2f36ad79 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: odUY+OeXUTjs9UlHuNoi6/b3dO44PISyjX8oemrrWH6jYyWQxbvHzdnDxorW4aeLIApf/aM10zXIB3bQS2sIhSJxBZCfy3Ra6MuJsk7O9FSEijHbPiClUpMXJf6T3sFWUL9G6d7PaIpidkCgWgAJTwf0MmwyDW+z/XLh4gDSA/kdqE1D9vpujt/ByqcX67vFR4coiw27AGEEAIqrCA5GYv3UatF8OJHxPQZFVxd89e/V2I9DqKO2RIpcsZkltwzJI51As0vRlRMjBtYFthnjI+5b3ss+82EEYN7L5B5nE7OHJ2fu8tcMg4YnOS6eHtPV8+i87PcEZ0b9SfnwYFwbPtmQHB6tgIBCTBiLYHEBja+EHZfpU5wmjFtoxvSQfmYy2wOzZTHHXwohefaWrJMYA+8/xCOIAU3ri3RF41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look.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: I3Nakh5QgREkx8OGHgjJPj1ypy1xlN7pMgUA0r8czhnVgF/lh9ZJjaKva4HqZMsdvJGEXvYOxzCsHxjcCKDWpMQEjBpqPb/KhTKiDIUgyI9MLdc6zauJX3PcNrf44SgF9j/eiIZbSLtsFLr1RROZ0iFpX+eUC8y+rMKabjQHNUD1QQGn7kny/vxtoT81bThI6e9xfFpaHu/KzSL51y4FaUHUS72awvJzoJjg4ijWPkGfYJ50NAbW9tBtisPqYHJJU4YEOaAl4weCrnxH1ORauNiIjXK3Q5Gwy+SASc4vr9DyMdPtPR9mN0mHlBRcogqYV6AL6X9Lo4CsePZ/d8Duwy7P+DSFSca0WnbR/fQdR3rxE8ErgrTaM9/y2abW/jIKOch6LOsl5Z2WLvefeF/WUki/tXEnu0S0WfVuaobrmdZX9sTvj5iBgLkOQHpOUxeKNP8LbCBQVMBCQyP5m0ngMI4EkBwXuvsxj0Z0Za++7GclpSuL5yfsa9k7CULNHFMrHlclBgPflenD3wo02+AAuIacISPA8st1zPKiB3fIToSZ7jbiU+ycrpo9+W0sd2bXew32bB+7wHHFfm9VfoAwxiXv6WIGWXWCVEwO0ubGQU3SQ5Y4Ila+YYGDv5LmlBtrPLT+frzUFr5ueVSk0d2Vp4RWCCBM24o1O+I+XSOQ0szE3F0S88D/9/4LpIx5KjYCbrE46al/OOJkgd62mrDXpOBEZrgKihUQzlxLpSAXrWw9zUXWuADHOdi0uVSFBMf7/tMCSbl2txwa8nrl6eJHaJgX25LYEm0zwecYd6KMK4MDYTK5YiVk84p1QzOEsanERZfdGPd2V4IW/ypzi1Tn0dnCPFb6s8jJYRaRmFoIhF92iuBWCJ1V1D3GY2g8qGp///JlStw7SIyQ6wONdqlOkSqUHD1rB5YKAvSqb6GoptuUIQ+W4cbosZJLAjrXTFhIZHtllzDwo1bCe05jziLX/rM7eOXyRENVN8o9scpyvZuivDGXKrrFP+yVOzQ7NsUHbFp1w8ipn4RSjmtHQb8/MacdksQR6hIGguBaZZ+4yoK/UqI5QnJtMPjqKPQ3ydliOjNsSmJiGehbbm0pUs3h4EfHwjJ9V3PPTk4xBdg457zvD8vA4Bnk/IJ0MVg49DDP1SEmtJe6FaRX9ceodwEH9ZKWWyJrccm52RmFHCMwytIBqe9D8yJqh6LBhakBr1Iuoq7eQveFa3poygVqdP2x6HwXrrmvCT1qTiaQ9MtRnBdQ1/UWXmCkR/Gkp/JQKU+95QZkVCgApjiXdctcpBfimvxTgEG2K98n07PImJZ+JAv/lSShSlyzVJ8UUWyWsRfIz4ugQX9ocPlqv1CiI/70WU5YO/alDwj1MDLtkJ60o5D+VHwZf/dozBtucx93SDmDIBDUCH0IDvRed4xL+ttQD16x6joReu9qh0PaofpLqmd4knppl6w0vYGbU9E4wH87rhJ5DGf0gT0itgzLEOk71eiqJcfUgdlFa0jTM1KOh8KS1N6272uAJmo1KYoSMPq91Z5S8qKaUrxAHmirMABWSej/G86AoK9+SNsqHiy5bwEL2VxfcejSBSiahwZEDaIF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31063cc1-7733-484b-4fb3-08dd2f36ad79 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2025 16:16:44.4093 (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: /hyOC5U8T0R0c+RdsnynlwbUpEa+sX7OBdk8vydI0KeofkaMzJe95XlKuBJ4KOersyCFzHw33rrfszVQ+ItLVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8493 Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK warning. arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb: /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108'] Additional change: - ref to common.yaml for child nodes. - limit child's reg to 0 - 7 for ti,tlc59108. - fix typo 'linux,default_trigger' in example. - change child node name's prefix to led-. - change nodename to led-controller. - fix properties order in example. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) --- change from v1 to v2 - using "^led@[0-9a-f]$" - remove minimum: 0 --- .../bindings/leds/leds-tlc591xx.txt | 40 --------- .../devicetree/bindings/leds/ti,tlc59116.yaml | 90 +++++++++++++++++++ 2 files changed, 90 insertions(+), 40 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-tlc591xx.txt create mode 100644 Documentation/devicetree/bindings/leds/ti,tlc59116.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt b/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt deleted file mode 100644 index 3bbbf70244119..0000000000000 --- a/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt +++ /dev/null @@ -1,40 +0,0 @@ -LEDs connected to tlc59116 or tlc59108 - -Required properties -- compatible: should be "ti,tlc59116" or "ti,tlc59108" -- #address-cells: must be 1 -- #size-cells: must be 0 -- reg: typically 0x68 - -Each led is represented as a sub-node of the ti,tlc59116. -See Documentation/devicetree/bindings/leds/common.txt - -LED sub-node properties: -- reg: number of LED line, 0 to 15 or 0 to 7 -- label: (optional) name of LED -- linux,default-trigger : (optional) - -Examples: - -tlc59116@68 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "ti,tlc59116"; - reg = <0x68>; - - wan@0 { - label = "wrt1900ac:amber:wan"; - reg = <0x0>; - }; - - 2g@2 { - label = "wrt1900ac:white:2g"; - reg = <0x2>; - }; - - alive@9 { - label = "wrt1900ac:green:alive"; - reg = <0x9>; - linux,default_trigger = "heartbeat"; - }; -}; diff --git a/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml b/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml new file mode 100644 index 0000000000000..ce9713793908a --- /dev/null +++ b/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LEDs connected to tlc59116 or tlc59108 + +maintainers: + - Andrew Lunn + +properties: + compatible: + enum: + - ti,tlc59108 + - ti,tlc59116 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + properties: + reg: + items: + minimum: 0 + maximum: 15 + + unevaluatedProperties: false + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +allOf: + - if: + properties: + compatible: + contains: + const: ti,tlc59108 + then: + patternProperties: + "^led@[0-9a-f]$": + properties: + reg: + items: + maximum: 7 + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@68 { + compatible = "ti,tlc59116"; + reg = <0x68>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0x0>; + label = "wrt1900ac:amber:wan"; + }; + + led@2 { + reg = <0x2>; + label = "wrt1900ac:white:2g"; + }; + + led@9 { + reg = <0x9>; + label = "wrt1900ac:green:alive"; + linux,default-trigger = "heartbeat"; + }; + }; + }; +