From patchwork Thu May 29 14:35:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4081 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4B1113F0E8 for ; Thu, 29 May 2025 16:35:57 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-6047edc5cebsf1032004a12.1 for ; Thu, 29 May 2025 07:35:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1748529357; cv=pass; d=google.com; s=arc-20240605; b=hNCsdiEgM5oqk0/6GXivSlWlfvXNBUraJQOvPSO40plztyOrNL/JkziI0oMY7IsTfR GmJkqYwgg6dy2iEYnSqDGmxocd51JxnBxtNHqxGBsE3f5jzsrPD1oQAqOAlvcY8gVXze gR4x2z+NA7efFHwWdNOHdTw7Qn14O5Ie3l69XXftK1hYqAVBV5xhez2ZPzVLx+vWlz4Z VjM7UVkI2Q9IqF39eDYXThel+izLDN9eVgYhLez19y3iilDGCPq+lgleotLfGwQtFerJ aqmowYos7Gc5dlIxYPZNDwrHF1p3LapcqIb5wI1icNYFrE4Zi/ZCFrQvr/SGIWWSmMOM IKgg== 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=xvoc2BDbHY0eWoAKlsxP/98KtxtA8+yzK4+Fljho/Xo=; fh=1N4BB7Qw7/G7kwZj0ZcAgU0Wbvx10dZkDcUfP4MV344=; b=bJBGmgXp8SmVJPdmJmBva+gFT9BqnL6oZBDllTWVcYUekrxyTXpgaP3ooxTN/RuKof Bh7Dr3V3DI31jg/tvN6YC0ha1f4R5e7N64EWmQ9UrD5JuPeLBExswL6KciRAxaoDYWoZ RPTp2wd5Owns1JKZst6r00l+W9pHuwkx+x/hsW2SRrrYCtPvrgBuBD92d+Wa2JzlWarF rjyvSRqWcvonvV+BAsKHpzWxGpFYrGOjmkynMyoMAicH+JjT1KcM6X5FLBWQ3nOldBf3 lyR+fBxeeWk5wo++zfTHg4AUg8Uv5jwbh7PHtXwMThM4Ae7mLTYq1dDSzEZXhEQnDrP3 rg/w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=olVoYtpC; 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=1748529357; x=1749134157; 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=xvoc2BDbHY0eWoAKlsxP/98KtxtA8+yzK4+Fljho/Xo=; b=BRKD3viq0BIf0BXMrt9TWH7C0+Rdb2o+iuZ5Uz/MtVVesIEiM3PcSviOYgxer6zNPT XTm7s9mJNof04y0Kjpxsc0Mvm6tKEfX1D0hevd3CssI1077z+biN64AEg4b9BMrGJ+hQ oSAvZ8shccCxHRERHmsPTV9IAOFEKulIF1XJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748529357; x=1749134157; 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=xvoc2BDbHY0eWoAKlsxP/98KtxtA8+yzK4+Fljho/Xo=; b=hrogKD6y70sCcKHFUKDqgwu7qWokkgS28OedCbsLYkLYymW4HytHcIvRYZSFpDZif7 lVkhfIZQrfEduaU3FIUnbVmMvkfVU/H2XenLNwtMrnwErBwMuz2PkkbTy47Pl7Xh83/f jBlH1eN3plVc2qOkjLo6MHZINFAdNkBekWQuQsszxbTmD1eitZIuy1KEb76cBf4SUWFM oFUp1WZCrdd3whfN1fougJ5gDgfOGof1uuAhJbpVdMJ8Md0Aa9s/2gxUS3IoM/i+ufcj BUSw+j+F/dVRo5psjzHimm1jocxNCdoHYeAU3sWnis1N/7kUJ4PbLl+S630mqVhBP0wp KZUg== X-Forwarded-Encrypted: i=2; AJvYcCWinfI6JkCDyrIo9WP/okCNj1uH9a18WAi+OC/iLe3lmzqT8k6imiRImSlE0T1inWzZ4rnfbmc/gqQsHFZa@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Ywjh6PTJ1YqdOKlxu7lMed06MVHILqRVfR99Rvzzt1T/2LFuOzg ihAWuVCOFYdtivWY6DnEg4hSw8toZ6uP+VPeBL/y2YNSFCyXRg4ozerI490tjVNiXFlKLw== X-Google-Smtp-Source: AGHT+IEYhluQfh1QH3ZtQn9jomASK8lmOyh3LRe4KrWT40RMpdRL8nWX6fUd2KXjxkokWnDqhUaQLQ== X-Received: by 2002:a05:6402:2685:b0:601:ff94:4a41 with SMTP id 4fb4d7f45d1cf-6051c508081mr5085847a12.29.1748529356617; Thu, 29 May 2025 07:35:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h=AZMbMZdAjR66omAvUS+L3V8FPxjFEu4nPQGpo7hYaZsDOxSqZg== Received: by 2002:a05:6402:1d4b:b0:601:d62c:7601 with SMTP id 4fb4d7f45d1cf-60538d3fbe7ls880674a12.2.-pod-prod-01-eu; Thu, 29 May 2025 07:35:54 -0700 (PDT) X-Received: by 2002:a17:906:e51:b0:ad5:7bc4:84be with SMTP id a640c23a62f3a-ad8a1ff4252mr426096866b.52.1748529354409; Thu, 29 May 2025 07:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748529354; cv=none; d=google.com; s=arc-20240605; b=T1NlTpr9UoXxlfhcJyWJfOZil1uvHPKyUx+Kx40UboXkNqP+kzZx+NA2PY2bwNp4il Z2AKrBOXAfzqHhjZuUmYw8gmlPikcar81fEF5S4VeiJt0471FwIhabgPxNZNqS9pyJ7+ QtCZugdA1LOwOgJDIVE9hKIuI0O/qbzWfHW0V9DNKbSGQ+9NfHYKRryI3VVJVFWGQ3kR dOU6GtgqnubaiOenGZVgoKafLpny3oagb4XVp5Oq5hjQL11Zma+74ZiillszRH/kDbao Z65L3l7TrWwffYJf0M4bh9XNdiFp6frgqfEzinFjytDQtZvsa4Z1Njooejw3Ux4SWb2k EloA== 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=gZBCgnAET/7svvvAxCFqw/qkQj58y6b6iHWz5ZaJvGE=; fh=vqrinMzYkkJLwao5AKQ+d3yhBQ95Lkeqr1tW4iaxhgA=; b=a0p9EADfg/3TO5er2raDB9NYw7f+qzQ3ig7mSl/77HDnNU2XUldB9SKgsNLz4K/cjp YPMHXBq6YbT7t14nmGmf2/DJCmhf+Ix2XRVPhfVPrs7741OaSU8/6u++38QXGnG7wsdd V9n6/84VuJKj3NVGjCTBxAxA/35sRzOMZ76z7DsyT6nMdFFnLH1D7VJhVPRqMd9gXJen DBg72fFgWYnwbsKtBjMEOK6nsjxJb2T4EfTx06dvPgKYelEi5eSFZZWhsYX1zRPLWDWj WPg8T8GsSj6cm5cCa2jwE46K91sCyj/JlwI1z490g9qDpma4MbVvwKwbnIVuTwmT3FgW xL7A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=olVoYtpC; 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-ada5dc89619sor87956466b.7.2025.05.29.07.35.54 for (Google Transport Security); Thu, 29 May 2025 07:35: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-Gm-Gg: ASbGncsjYs3shWDempOAcmxlA/94R9CKo67B+5Zqj5XmWPSerTHx1h4bv7qNFm3RrwW BTP86/HeCZ+6fGrxIJMTWBKQMf2dAPpF6c8teNgXyK7pXx+Jk0Rwhj0zHJsgV7MTDRjZgjqNI2L k2ClcmnIQLgSy+Fww0acVV204tLXG1HBjgXShqXp1tAuD+67N1nBvnbm1Md3XV30qiS4Dj7s8ye 8QtKq+9VWB03RhpNmWQAFA5hY1tPt/WcGsED9MGdS+OK5N5fTJnzcff5Qp6C6EdgJQv+vhG0Y2t z3KEaEcoaeEoKiOEv2aeJks7yQX7uUTQZdVpucpx32rCwpPANKB6pHR8UYeALKE2z6Hhps1nc4Q dAYTl4U2ldHl+WAH4 X-Received: by 2002:a17:906:b810:b0:adb:2f9c:34bb with SMTP id a640c23a62f3a-adb2f9c7504mr24458666b.49.1748529353961; Thu, 29 May 2025 07:35:53 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.42.248]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d7ff075sm154305866b.37.2025.05.29.07.35.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 May 2025 07:35:53 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, michael@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 v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Date: Thu, 29 May 2025 16:35:08 +0200 Message-ID: <20250529143544.2381031-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250529143544.2381031-1-dario.binacchi@amarulasolutions.com> References: <20250529143544.2381031-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=olVoYtpC; 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 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 | 131 ++++++++++++++++++ 2 files changed, 131 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..f90fdfbb74a8 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml @@ -0,0 +1,131 @@ +# 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 (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: + 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>; + };