Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: mfd: convert mxs-lradc bindings to json-schema

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 <dario.binacchi@amarulasolutions.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20250530160748.2476088-2-dario.binacchi@amarulasolutions.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Dario Binacchi and committed by
Lee Jones
009528b5 2d23e749

+134 -45
-45
Documentation/devicetree/bindings/mfd/mxs-lradc.txt
··· 1 - * Freescale MXS LRADC device driver 2 - 3 - Required properties: 4 - - compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc" 5 - for i.MX28 SoC 6 - - reg: Address and length of the register set for the device 7 - - interrupts: Should contain the LRADC interrupts 8 - 9 - Optional properties: 10 - - fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen 11 - to LRADC. Valid value is either 4 or 5. If this 12 - property is not present, then the touchscreen is 13 - disabled. 5 wires is valid for i.MX28 SoC only. 14 - - fsl,ave-ctrl: number of samples per direction to calculate an average value. 15 - Allowed value is 1 ... 32, default is 4 16 - - fsl,ave-delay: delay between consecutive samples. Allowed value is 17 - 2 ... 2048. It is used if 'fsl,ave-ctrl' > 1, counts at 18 - 2 kHz and its default is 2 (= 1 ms) 19 - - fsl,settling: delay between plate switch to next sample. Allowed value is 20 - 1 ... 2047. It counts at 2 kHz and its default is 21 - 10 (= 5 ms) 22 - 23 - Example for i.MX23 SoC: 24 - 25 - lradc@80050000 { 26 - compatible = "fsl,imx23-lradc"; 27 - reg = <0x80050000 0x2000>; 28 - interrupts = <36 37 38 39 40 41 42 43 44>; 29 - fsl,lradc-touchscreen-wires = <4>; 30 - fsl,ave-ctrl = <4>; 31 - fsl,ave-delay = <2>; 32 - fsl,settling = <10>; 33 - }; 34 - 35 - Example for i.MX28 SoC: 36 - 37 - lradc@80050000 { 38 - compatible = "fsl,imx28-lradc"; 39 - reg = <0x80050000 0x2000>; 40 - interrupts = <10 14 15 16 17 18 19 20 21 22 23 24 25>; 41 - fsl,lradc-touchscreen-wires = <5>; 42 - fsl,ave-ctrl = <4>; 43 - fsl,ave-delay = <2>; 44 - fsl,settling = <10>; 45 - };
+134
Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/mxs-lradc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale MXS Low-Resolution ADC (LRADC) 8 + 9 + maintainers: 10 + - Dario Binacchi <dario.binacchi@amarulasolutions.com> 11 + 12 + description: 13 + The LRADC provides 16 physical channels of 12-bit resolution for 14 + analog-to-digital conversion and includes an integrated 4-wire/5-wire 15 + touchscreen controller. 16 + 17 + properties: 18 + compatible: 19 + items: 20 + - enum: 21 + - fsl,imx23-lradc 22 + - fsl,imx28-lradc 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + clocks: 28 + minItems: 1 29 + 30 + interrupts: 31 + minItems: 9 32 + maxItems: 13 33 + 34 + fsl,lradc-touchscreen-wires: 35 + $ref: /schemas/types.yaml#/definitions/uint32 36 + enum: [4, 5] 37 + description: > 38 + Number of wires used to connect the touchscreen to LRADC. 39 + 40 + If this property is not present, then the touchscreen is disabled. 41 + 42 + fsl,ave-ctrl: 43 + $ref: /schemas/types.yaml#/definitions/uint32 44 + minimum: 1 45 + maximum: 32 46 + default: 4 47 + description: 48 + Number of samples per direction to calculate an average value. 49 + 50 + fsl,ave-delay: 51 + $ref: /schemas/types.yaml#/definitions/uint32 52 + minimum: 2 53 + maximum: 2048 54 + default: 2 55 + description: > 56 + Delay between consecutive samples. 57 + 58 + It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its default value (2) 59 + is 1 ms. 60 + 61 + fsl,settling: 62 + $ref: /schemas/types.yaml#/definitions/uint32 63 + minimum: 1 64 + maximum: 2047 65 + default: 10 66 + description: > 67 + Delay between plate switch to next sample. 68 + 69 + It counts at 2 kHz and its default (10) is 5 ms. 70 + 71 + "#io-channel-cells": 72 + const: 1 73 + 74 + required: 75 + - compatible 76 + - reg 77 + - clocks 78 + - interrupts 79 + 80 + if: 81 + properties: 82 + compatible: 83 + contains: 84 + enum: 85 + - fsl,imx23-lradc 86 + then: 87 + properties: 88 + interrupts: 89 + items: 90 + - description: channel 0 91 + - description: channel 1 92 + - description: channel 2 93 + - description: channel 3 94 + - description: channel 4 95 + - description: channel 5 96 + - description: touchscreen 97 + - description: channel 6 98 + - description: channel 7 99 + fsl,lradc-touchscreen-wires: 100 + const: 4 101 + else: 102 + properties: 103 + interrupts: 104 + items: 105 + - description: threshold 0 106 + - description: threshold 1 107 + - description: channel 0 108 + - description: channel 1 109 + - description: channel 2 110 + - description: channel 3 111 + - description: channel 4 112 + - description: channel 5 113 + - description: button 0 114 + - description: button 1 115 + - description: touchscreen 116 + - description: channel 6 117 + - description: channel 7 118 + 119 + additionalProperties: false 120 + 121 + examples: 122 + - | 123 + lradc@80050000 { 124 + compatible = "fsl,imx23-lradc"; 125 + reg = <0x80050000 0x2000>; 126 + interrupts = <36>, <37>, <38>, <39>, <40>, 127 + <41>, <42>, <43>, <44>; 128 + clocks = <&clks 26>; 129 + #io-channel-cells = <1>; 130 + fsl,lradc-touchscreen-wires = <4>; 131 + fsl,ave-ctrl = <4>; 132 + fsl,ave-delay = <2>; 133 + fsl,settling = <10>; 134 + };