From patchwork Thu May 29 08:31:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4074 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5CDD23F0E8 for ; Thu, 29 May 2025 10:32:11 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-6023b016d4fsf579713a12.3 for ; Thu, 29 May 2025 01:32:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1748507531; cv=pass; d=google.com; s=arc-20240605; b=OfCvJPyyQMah77l51nDrN3UpO4dFcRfNILMM9CexOXFCVuZpbpOLk9jA4712Q/dPnj z5XMefR3Cg2cxkSIkguf5D3p5IeDb8JjTtpdUGJsF2zLHNXLQDbMK5cRsxa6zOT0WQuv uqa+PFon1k7si37/rsQRBTLBg/uTWlRdJup6yXkgFckX+v3CSt+uWQR/LJBLzDus/P5I sdQXT4EGkcDEyv/l/h06i2uaqTCZH4vtha+rMnIRvijhtj62FP7YXAmD71/HY1H+qjgA WkJbj6MzfxzDy6NFYcyCgVUPXlFcuFwyWRjjhnS9PfG5StaoES/KiUbFdnDWVjjGxHFo 2Ogg== 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=ppImck0bN7/M3OVQ5y2rIZAMucNJRcO/ArqrXabtrbM=; fh=+q0wljaEE68ZlxXRdgQUMsegbcl9CilCWwuAUdZ2iqU=; b=O9FC7pw/arfPEutFb0h2m6w8pZXxGCm6MM0iXP5hFV9NoVeZ/blvcVqVK7d4HuZVi0 C32UOdCvKFd8fZdTraGpYv7QNPcni45QKD2Bdq6Fifr3sdgaPfaH9Xrx0G/k1Zo/5yB7 IovmtwQ9BTe9rbPk1Q36EOaTkJOVWn0DrjDg+MeZBb25aGOFIcqlljbswf7bv2bgErFg kLw3iaYXcIgNq63eXeW8+iMe0U5GokwkhecggkLtOMjr+7enh25uMTotuq+0NGOFtyNz rOKr8peQ6clee54RVPbiJkebspk/wwKH1dAeeArHmn3JwjqAyoOZgA0KRKiAJbLaM1Aa IVTQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hsceEzjJ; 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=1748507531; x=1749112331; 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=ppImck0bN7/M3OVQ5y2rIZAMucNJRcO/ArqrXabtrbM=; b=JmsnSdYdVDc0+6sTvbt4OpmvV6lHv0cImYA6t2p7U5nYFjrR/SYJq9NtVVPOBUDAf/ Hj31VmjWMtISe0N08gasjIxqJy8PXyZU7K+LSk+ha1t0jUndJ5/PbhtcW7STn6oj8lWq OD9WwbGADTX6WAvxOinXs2UV09K+evCLS5hYA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748507531; x=1749112331; 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=ppImck0bN7/M3OVQ5y2rIZAMucNJRcO/ArqrXabtrbM=; b=cK5RBNDPVU4Y2s/CDYM34GFan+tZL+7+tnmilbMiG2Wa9pjikMH4daiPne7iLdeV5d Pj5D7R1ARwTEVQMK30fO1fRwxPDC64sYqr9WUsqoGLET59ed7rTsMXDYWhfIyBw5RB5g mvt86D9gBgpiAHPkKui8GUqvFngFKQnC8IRGyTCl8RXXgdH4TV6Xt6AyWGlOOxWVwEGl rPFMPyOrlMOQBNQE6e5xqO50dLO+zHjZwoEQeDDyHPUURlN7+tMAajEIQ+06Oiy0fh/0 4QkdpXlPZEK1twvMKozy17MG20mjNs8p4jPW98ugi2orhkfWY2s04J3MDGlJUbFgSDS+ gTgQ== X-Forwarded-Encrypted: i=2; AJvYcCXEzwQ5DEGZs5NDEPyWXA7WrgPOOoMqb7JMl50UkTNzglJ9mmt3GjaOrCscB2ijVtWKAX6bVe24HDRmtif6@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxC7NaOuGt2KH9nT4qcCZMVUhShk6hz6H0ordFk3SOG2JmkyL6b gV/du18upgXJDrgHdrJd7mDB/n9p6jkmFQ5OzXD4SViPsE+ynC8zdw7686hCEnz1JcVljw== X-Google-Smtp-Source: AGHT+IFlLF2g3jktYsQ/N2estaUnzYk631EzdW/IW9HkTzgEFG1gDlk8z+dxfcAC3r1rRV81jUKcYw== X-Received: by 2002:a05:6402:3593:b0:5fb:c126:12c9 with SMTP id 4fb4d7f45d1cf-6054651c81amr933126a12.25.1748507530850; Thu, 29 May 2025 01:32:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=AZMbMZdOoXOKFlXhITM1WrdJ6oQaO5a0NH9eE5ZNAHO5ScOBlQ== Received: by 2002:a05:6402:234d:b0:601:956f:a0c3 with SMTP id 4fb4d7f45d1cf-60538d2f048ls634363a12.1.-pod-prod-03-eu; Thu, 29 May 2025 01:32:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX6CXjBGg0+IMfmw2yWcBzajw8OVedTEMRcGwzYA2dUjDIV8eztvOzVOVfLR2lcSglNXZ98yaqoTCN4AUY4@amarulasolutions.com X-Received: by 2002:a17:907:d90:b0:ad8:9428:6a2e with SMTP id a640c23a62f3a-adacda5d03bmr131675066b.4.1748507528485; Thu, 29 May 2025 01:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748507528; cv=none; d=google.com; s=arc-20240605; b=IAGbVCOagNPOENoZ4nqbkS2/w957vrU6j3aaOQSP3NluyjESaZxXgb/J5rpUk2reuM p9fBcDsOjvg5EZwbnzlYp+W8qiR5etxyCvZm6HgM91mnhLR7jDevTL0JcqaN8h56Lm6/ 2TNJjVSXDEIKIloRBO1jQowN00vkB07WPfbPAggV+Jw0McOIl2/AxXF/8f61CPzRxp6b bHy/RfZ3vzCWegn3BC63vu8ZC1YVGuXUUOUgTRqIEaNarWVQtuXkasFXGQn3muPEsWbT mIvPYp8HQCXWcuZMBfLoauY8W8LUGtxdnDSUKemoLRCqBCyLQJDVWG2cMoCGdwbzWOiT 4Q0Q== 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=sYTRpYaRCYAMKu8brCxqCw4EqlzslbYDhjqGeb1oUdY=; fh=i7J+MQGg4kvHhBBI6GCul7GZvANN2xEH3e41yz6Gla4=; b=PNNSTlYiEpjDhlJtkM5Kyfen3bRYMU6B8q6iHJZfT20NEKdjnSK7s+LRrxC8bsMvLz djOymPv/iTQwZ23q9osHxDA0CUPlt8ahfuDnQFJKei76beyoEQ+mthSKXW+5eNHCTVX4 ipPbo/S+lFFK2AN1VKJ62FZBruYBOMb84UwuRO1YymZDeE3GtJdgSa/LjNfbrI5Uc0BI 5XTO3RXEuKwMLiiir4J6dsHpq3T7YRTgBx5pHKbQll3k63TL5Wd3tRAlbDdHb7J3N14U /kqEMdr0LmdLQOV2gREw9GgwdlPp4ymO7Msmc1/Wp3x/H1LQ9lQM3LmGe3Aa9dzDm2dP t1HQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hsceEzjJ; 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 a640c23a62f3a-adabeecd30csor49303366b.13.2025.05.29.01.32.08 for (Google Transport Security); Thu, 29 May 2025 01:32:08 -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; AJvYcCWH1Q/Bq0Q6mhZBHd7lQisXK8RE6F5bqKtb9EVww8/W+BrStxvXnjTB/eHietLdV1O+r8xMAEG4s6lKU/Ha@amarulasolutions.com X-Gm-Gg: ASbGncsTvF2yJOBoTi/sBjoegOfTHQMps2tmqm97J2Zjph0Lau0mIZR+tQE+4Du81Z7 09UN/oR7ugz862ioLrkYptV8jAodSPgFtWbrU7s79GkArKvBNaZdFdYk0xe7wtFtrxTDjlGDbqE KLaRKo+3beu5ea9FSuO/pSOuqANm8gFpMKIa/m9AlptqXSXoMDi4O5ikz82xbvxDYXrjYbuyjTu OczBTpMEfQor7l43Dl3T/aDyJiNXSfThCAKaJ+a6/pVtUrnATae3m3KCX8NLO6zuG+5BHBxjS5f x03XSo3NXzj767vlg4vHwP8yonlPYYo859399EZT1RFSc8jkLhqvYhKpug6HuwBu23aPiVJ0N3e FCAMgrlzpI5NOM2qA X-Received: by 2002:a17:907:1c93:b0:ad2:4c38:5a22 with SMTP id a640c23a62f3a-adadf2a13ecmr120329666b.51.1748507527995; Thu, 29 May 2025 01:32:07 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.42.248]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d82e87esm100609866b.63.2025.05.29.01.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 May 2025 01:32:07 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, 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 v3 1/4] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Date: Thu, 29 May 2025 10:31:04 +0200 Message-ID: <20250529083201.2286915-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250529083201.2286915-1-dario.binacchi@amarulasolutions.com> References: <20250529083201.2286915-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=hsceEzjJ; 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 v3: - Add Reviewed-by tag of Conor Dooley .../devicetree/bindings/mfd/mxs-lradc.txt | 45 -------- .../devicetree/bindings/mfd/mxs-lradc.yaml | 106 ++++++++++++++++++ 2 files changed, 106 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..90391b02c715 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml @@ -0,0 +1,106 @@ +# 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-Resoulution 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 + 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 (i. e. 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 (i. e. 10) is 5 ms. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - interrupts + +if: + properties: + compatible: + contains: + enum: + - fsl,imx23-lradc +then: + properties: + fsl,lradc-touchscreen-wires: + const: 4 +else: + properties: + fsl,lradc-touchscreen-wires: + enum: [4, 5] + +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>; + };