From patchwork Fri May 30 16:07:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4092 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AD84640D04 for ; Fri, 30 May 2025 18:07:57 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-450ce0adcf7sf968955e9.1 for ; Fri, 30 May 2025 09:07:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1748621277; cv=pass; d=google.com; s=arc-20240605; b=So4AKkrOLBJGu1K1FiHbLGXZv5esvPPVN/bd8mypOvPG0h+4U8pG6JuSKsx3VrVl16 TCn19Ymuu5lJ/ScWKfXgT5GGXm4Mt9KcPaZmID0WFBNtICKWNE+pqFn3UNH56OB1Vpr5 Iy5La9izg43FONCxPp/f9Nr7jWMUpfRAovKUKjs73fmHFO5k6oAvOw1JCmFDyJy+Ny1e UiKc7zWfrzxLUeNnTIymXxRSoyvS6M7DgnxlwU5plkI1hP/emHlAfcN2Ke2Fl4NDFyQK LuWJHUtuuJrYGn/J1lIv9uSh3XVYcivatjLLDiknuVZ/W4jRpOQEe1wLtsdF+45u8tAW UR7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/ScbcCfWZSflpRFG8/NhF2MMIXSHGuZcAYJw6iSHY3w=; fh=E+9V4Hy0fL+avFl2j6f4kq/R50Q8eMrGPBug6VDLD/4=; b=aSxuSGHYbVknT8OAsQSYkZBRhN+yIRaXBUdYrT74nnud/ZN/+Lig2bw0smHai61nDz rfI0OtbYDgwREvYBku90AKuxuQgZDvij0pHAuPZtPq+Z+RidFC3Oja5lrojPFyF28H0K PpLfLMqlg5dvbENNHpLfGyDE/v/AF72GA5IvAOQCxtvEaSMFZiyazPbMN6kgc4ZDSUU6 QOpeNWdO4cYAonqHQwrBSt5KT+0Ln8nk4f4XKqr9AcWDD+jVm2KLms//uGqXKDDvz4zu Kg53vAgbxc74t8bKd5Zebq8Xbwa0Din6HbWvC5/u4u5MT2ejDDYEBISUxfJyI2Y5LqvI iOpw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CeCKFnZp; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1748621277; x=1749226077; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/ScbcCfWZSflpRFG8/NhF2MMIXSHGuZcAYJw6iSHY3w=; b=rNR04WDa6IDLzF3UTapcoSJgTi1ocN4hyA0XFr4BbDQ5tT2vmn+GIUmEixC7ilxaV8 VKdfRBJUdt5/94V1WWscLAwY4p6bt4wnxVpM68ihR5/qmEcBuxfeO80pebMAEh+hHWe8 iK3fTMXYOY9eMU6YVw4p0yNs5A9hyMrPPjJfM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748621277; x=1749226077; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/ScbcCfWZSflpRFG8/NhF2MMIXSHGuZcAYJw6iSHY3w=; b=sITm2jvrYEiPoVghwcrL3xs4Lg+t05LhBfasIrhyToiyG2dguiP5wc4N7lu3TC9A9H eG1WljmjlZtejd8FQZWnb/xPU7dRPbMHRCO8WobzKgvct1kvLGxkiGt1bV+4p7l47jgv arEYTyuDdtBaYHuTjmIGO6BNqk0ki5DNE+ODWhirmbYB/6OrlIUtSot8qNdFtMRJfbtl W1gBcergvifTdGNxw7ZKBjUOz5bMBYzwkBbqihGMiPzn87ldQu0LWJJZtvEwv+eqxVAf UWVyFAtWqH0bsDF1b2x5toLCZmXeeq5852rg58TmCA+0kUNlA19BpEhbWn29/aeKvtSe cq9g== X-Forwarded-Encrypted: i=2; AJvYcCUP8Yg/5yXMkUttHcBXN+em8vpTAVrcqzfjwO65UK23w1Byks+gtJT3xgyRfTQVeae11mzFUnr4FHTwezTL@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yw24lHrGTUcuFPclLTBytUsKYEVA+DS58I1tgk6LTGPskk6kY+F 3NNwf4igEq+vo/8JGe3iP8+ETcO7zZTliB2HA9SZ7bR/bjFnDtWaJ7BARLqAHDQGXqb0qQ== X-Google-Smtp-Source: AGHT+IGdWXJnV1cDK2qoZr/b5CsrHzaucQmJ47ww4KlVb9hdCAZyUxnUS4dbjZuLhTHEPzm+2j4Csg== X-Received: by 2002:a05:600c:3595:b0:439:8294:2115 with SMTP id 5b1f17b1804b1-450d7bd5e14mr10066305e9.8.1748621277093; Fri, 30 May 2025 09:07:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=AZMbMZd/db4lLCJE4STDAMKMOmmCdlLl/LukJ5NtXEORRxkwig== Received: by 2002:a05:600c:4f10:b0:43c:f001:2ff1 with SMTP id 5b1f17b1804b1-450cebc24e2ls8365515e9.0.-pod-prod-00-eu; Fri, 30 May 2025 09:07:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUVvSww5afj+5a8vejy9M0H5rb2u9g6uaIAauva+cao9Ku9ww+1YK7Rw5SoaPAtdtAy09Ea1gA2luHkzIOo@amarulasolutions.com X-Received: by 2002:a05:600c:a104:b0:43c:ed33:a500 with SMTP id 5b1f17b1804b1-450ce8784famr59318525e9.10.1748621274873; Fri, 30 May 2025 09:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748621274; cv=none; d=google.com; s=arc-20240605; b=GRMn9XCcDiFm/XZrvQyI+BJ3rm55FhqpGhEF3SCkCKdgrt8Ck+V8fN7voFHycEXyxU 5oPAztbT2I2Tfr2hFzdjonbnvSrsctyWxWH6HMBPhbTY65lTJBIq6Sb+Z0OELjHcat/x 8fEe+5GPkuDasv1O2QvdWroy5SPJIRSpBeWWNpqg/TsjYhc3jLiX2Ewn0SmjQ9Jk83wV HOQD29tD7BC8s1+OwTj/NcbFjbKYTAAsYZ6supzkfaCUrqKDyWzZPC7agjkMNuNBUICv a5FsO5ncrqKX7iCaL8MFWFKKZIcnbc6MvIonWnlPnu0FnBh/nAIkTTBapnHWNRqM0rtu Sx1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=bvMdIH4nN1sFDJOlm2BIuEd8Qez9m/rrIfFo0iNwOy8=; fh=p6i2rRUIMQvxp57FX9vEkzfMbccTAegEwgmU9mwacn4=; b=M2oC/QmYF9zR2trkuAyj00k6x3F+QcpvvRl4NL++vWF27OAOoC35KecsVU5Itepbx9 agjvKF7WFjFXjqbgzHoa4YXeunHsrINvzqW1WBU1r9p8qGewAwkrT5MJcJLZMxy7TDYt OWfo3TtmZGQ/AeRF0k6VaddTSkRz5GIxeyxvR98FwoF22WqJnt/aZiELsyGOXXRUK4R2 F9B/oupjq5STgkn5egrHvPV4I4rK7b+UHeTz9cDyjlL7v7ODULut59XgbHjwG41K175T KOSHpRGtRyMyrIx8TJO8gT1uN4E2d1Iva3wNrFZlTNYz93y8f5W53eXBtnCgCOreTmnM P77Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CeCKFnZp; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-450d64091f4sor6624575e9.3.2025.05.30.09.07.54 for (Google Transport Security); Fri, 30 May 2025 09:07:54 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVK8ClbngHeK4e/tmtgWB6flMyJW1z01SK2TKkZD1rMKU11jpDvg/RUplFQw7ZuC6besNcYzCCTsYqivFui@amarulasolutions.com X-Gm-Gg: ASbGnctU2B2Cwy5jvEYCAxErBc0movi47xtQj/UN4TT3+1SemCwifkZ13Ka7AupajpX BZgUzCr5or+USgUx8xJ6y9tY01HY1b9zy+21JjQstyUkIXfgfOaR0vBGQHWPKKoXNE+sC61h0Kt cNompUuxG6lfMlFoNtj3DF+4+0ENCVXGdVtmXTioXxafOE55o4shY2vlKSb7M3x76gi66b1RsX0 GteqHx23/MUeYeOIwhLfSyfLifUrcL7pHNa6bczuQs2+VHDCAFQuIMAcCWruraeyGTd7FVJha7o WgUVmqjYgapnjcRpWOgIVa7ufLeINkUtDmRJlkgr8Sk7RZnj++EDqpSNBmSciIJEGBoBIbaEfHh orS8Yb+bPlBQI0hGcLetWYGBiGTyUKzdkzazouqVbEVHWSjj9JQ4= X-Received: by 2002:a05:600c:4649:b0:43c:ec72:3daf with SMTP id 5b1f17b1804b1-450ce88aa5dmr54520215e9.14.1748621274332; Fri, 30 May 2025 09:07:54 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.43.33]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450dcc18a80sm9716365e9.38.2025.05.30.09.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 May 2025 09:07:53 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Frank Li , linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Lee Jones , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Date: Fri, 30 May 2025 18:07:32 +0200 Message-ID: <20250530160748.2476088-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250530160748.2476088-1-dario.binacchi@amarulasolutions.com> References: <20250530160748.2476088-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CeCKFnZp; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Convert the Freescale MXS Low-Resoulution ADC (LRADC) device tree binding documentation to json-schema. The clocks and #io-channel-cells properties have also been added; They are present in the respective SoC DTSI files but were missing from the old mxs-lradc.txt file. Signed-off-by: Dario Binacchi Reviewed-by: Conor Dooley --- Changes in v5: - Fix description formatting. Changes in v4: - Fix typo Low-Resoulution -> Low-Resolution' - Wrap lines at 80 char. - Drop '|' from the description - Describe what each interrupt is for. - Move touchscreen-wires constraint for imx28 to the top level Changes in v3: - Add Reviewed-by tag of Conor Dooley .../devicetree/bindings/mfd/mxs-lradc.txt | 45 ------ .../devicetree/bindings/mfd/mxs-lradc.yaml | 134 ++++++++++++++++++ 2 files changed, 134 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt create mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.yaml diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt b/Documentation/devicetree/bindings/mfd/mxs-lradc.txt deleted file mode 100644 index 755cbef0647d..000000000000 --- a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt +++ /dev/null @@ -1,45 +0,0 @@ -* Freescale MXS LRADC device driver - -Required properties: -- compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc" - for i.MX28 SoC -- reg: Address and length of the register set for the device -- interrupts: Should contain the LRADC interrupts - -Optional properties: -- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen - to LRADC. Valid value is either 4 or 5. If this - property is not present, then the touchscreen is - disabled. 5 wires is valid for i.MX28 SoC only. -- fsl,ave-ctrl: number of samples per direction to calculate an average value. - Allowed value is 1 ... 32, default is 4 -- fsl,ave-delay: delay between consecutive samples. Allowed value is - 2 ... 2048. It is used if 'fsl,ave-ctrl' > 1, counts at - 2 kHz and its default is 2 (= 1 ms) -- fsl,settling: delay between plate switch to next sample. Allowed value is - 1 ... 2047. It counts at 2 kHz and its default is - 10 (= 5 ms) - -Example for i.MX23 SoC: - - lradc@80050000 { - compatible = "fsl,imx23-lradc"; - reg = <0x80050000 0x2000>; - interrupts = <36 37 38 39 40 41 42 43 44>; - fsl,lradc-touchscreen-wires = <4>; - fsl,ave-ctrl = <4>; - fsl,ave-delay = <2>; - fsl,settling = <10>; - }; - -Example for i.MX28 SoC: - - lradc@80050000 { - compatible = "fsl,imx28-lradc"; - reg = <0x80050000 0x2000>; - interrupts = <10 14 15 16 17 18 19 20 21 22 23 24 25>; - fsl,lradc-touchscreen-wires = <5>; - fsl,ave-ctrl = <4>; - fsl,ave-delay = <2>; - fsl,settling = <10>; - }; diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml new file mode 100644 index 000000000000..782b2f4005a0 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml @@ -0,0 +1,134 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/mxs-lradc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS Low-Resolution ADC (LRADC) + +maintainers: + - Dario Binacchi + +description: + The LRADC provides 16 physical channels of 12-bit resolution for + analog-to-digital conversion and includes an integrated 4-wire/5-wire + touchscreen controller. + +properties: + compatible: + items: + - enum: + - fsl,imx23-lradc + - fsl,imx28-lradc + + reg: + maxItems: 1 + + clocks: + minItems: 1 + + interrupts: + minItems: 9 + maxItems: 13 + + fsl,lradc-touchscreen-wires: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [4, 5] + description: > + Number of wires used to connect the touchscreen to LRADC. + + If this property is not present, then the touchscreen is disabled. + + fsl,ave-ctrl: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 32 + default: 4 + description: + Number of samples per direction to calculate an average value. + + fsl,ave-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 2 + maximum: 2048 + default: 2 + description: > + Delay between consecutive samples. + + It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its default value (2) + is 1 ms. + + fsl,settling: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 2047 + default: 10 + description: > + Delay between plate switch to next sample. + + It counts at 2 kHz and its default (10) is 5 ms. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - interrupts + +if: + properties: + compatible: + contains: + enum: + - fsl,imx23-lradc +then: + properties: + interrupts: + items: + - description: channel 0 + - description: channel 1 + - description: channel 2 + - description: channel 3 + - description: channel 4 + - description: channel 5 + - description: touchscreen + - description: channel 6 + - description: channel 7 + fsl,lradc-touchscreen-wires: + const: 4 +else: + properties: + interrupts: + items: + - description: threshold 0 + - description: threshold 1 + - description: channel 0 + - description: channel 1 + - description: channel 2 + - description: channel 3 + - description: channel 4 + - description: channel 5 + - description: button 0 + - description: button 1 + - description: touchscreen + - description: channel 6 + - description: channel 7 + +additionalProperties: false + +examples: + - | + lradc@80050000 { + compatible = "fsl,imx23-lradc"; + reg = <0x80050000 0x2000>; + interrupts = <36>, <37>, <38>, <39>, <40>, + <41>, <42>, <43>, <44>; + clocks = <&clks 26>; + #io-channel-cells = <1>; + fsl,lradc-touchscreen-wires = <4>; + fsl,ave-ctrl = <4>; + fsl,ave-delay = <2>; + fsl,settling = <10>; + };