dt-bindings: yaml conversions of some simple ADC bindings.
Subsystems (3)
Jonathan Cameron
maintainercover dt-bindings: yaml conversions of some simple ADC bindings.
From: Jonathan Cameron <[email protected]>
This set coverts over some of the low hanging fruit from amongst the IIO ADC bindings. Mostly they are very straight forward bindings.
One quirk is that I found I had one old binding doc in my local checked out copy that never made it into mainline. I've created a special patch for that so we don't lose the history. It reflects the tags from the original patch that I seem to have messed up applying.
I've added the #io-channel-cells property to most of them, so that
additionalProperties: false works if they are used as providers of channels to consumers. For ADCs it is fairly likely they will be providing measurement services to another device in DT.
I have put the Maintainer as the original author of the old bindings / driver. Hopefully everyone is fine with that. If not, let me know and I'll put my own details in there as I'll end up reviewing pretty much anything that touches these anyway.
All comments welcome.
Jonathan Cameron (12):
dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate
binding doc.
dt-bindings: iio: adc: ti,adc108s102 yaml conversion
dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
dt-bindings: iio: adc: ti,adc0832 yaml conversion.
dt-bindings: iio: adc: ti,adc084s021 yaml conversion
dt-bindings: iio: adc: ti,adc12138 yaml conversion.
dt-bindings: iio: adc: ti,adc128s052 yaml conversion.
dt-bindings: iio: adc: ti,ads7950 binding conversion
dt-bindings: iio: adc: ti,ads8344 yaml conversion
dt-bindings: iio: adc: ti,tlc4541 binding conversion
Phil Reid (1):
dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding
doc
.../bindings/iio/adc/lltc,ltc2497.yaml | 44 +++++++++ .../devicetree/bindings/iio/adc/ltc2497.txt | 13 --- .../devicetree/bindings/iio/adc/mcp320x.txt | 57 ------------ .../devicetree/bindings/iio/adc/mcp3422.txt | 19 ---- .../bindings/iio/adc/microchip,mcp3201.yaml | 93 +++++++++++++++++++ .../bindings/iio/adc/ti,adc0832.yaml | 56 +++++++++++ .../bindings/iio/adc/ti,adc084s021.yaml | 58 ++++++++++++ .../bindings/iio/adc/ti,adc108s102.yaml | 47 ++++++++++ .../bindings/iio/adc/ti,adc12138.yaml | 85 +++++++++++++++++ .../bindings/iio/adc/ti,adc128s052.yaml | 59 ++++++++++++ .../bindings/iio/adc/ti,adc161s626.yaml | 51 ++++++++++ .../bindings/iio/adc/ti,ads7950.yaml | 64 +++++++++++++ .../bindings/iio/adc/ti,ads8344.yaml | 51 ++++++++++ .../bindings/iio/adc/ti,tlc4541.yaml | 52 +++++++++++ .../bindings/iio/adc/ti-adc0832.txt | 19 ---- .../bindings/iio/adc/ti-adc084s021.txt | 19 ---- .../bindings/iio/adc/ti-adc108s102.txt | 18 ---- .../bindings/iio/adc/ti-adc12138.txt | 37 -------- .../bindings/iio/adc/ti-adc128s052.txt | 25 ----- .../bindings/iio/adc/ti-adc161s626.txt | 18 ---- .../bindings/iio/adc/ti-ads7950.txt | 23 ----- .../bindings/iio/adc/ti-ads8344.txt | 19 ---- .../devicetree/bindings/trivial-devices.yaml | 16 ++++ 23 files changed, 676 insertions(+), 267 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml delete mode 100644 Documentation/devicetree/bindings/iio/adc/ltc2497.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/mcp320x.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/mcp3422.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc0832.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8344.txt
Signature · 1 line
2.28.0
Jonathan Cameron
maintainerPATCH 1/13 dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
From: Jonathan Cameron <[email protected]>
Drops the deprecated compatibles without the vendor name. Whilst the driver continues to support these for old dt blobs, any dt bindings that are actuallly verified against this document should be fixed to add the vendor name.
Enforces rule that spi-cpol == spi-cpha. Is there a cleaner way to do this?
Added the #io-channel-cells property to allow for consumers.
--- .../devicetree/bindings/iio/adc/mcp320x.txt | 57 ------------ .../bindings/iio/adc/microchip,mcp3201.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 57 deletions(-)
Documentation/devicetree/bindings/iio/adc/mcp320x.txt deleted +0 -57
@@ -1,57 +0,0 @@ -* Microchip Analog to Digital Converter (ADC) - -The node for this driver must be a child node of a SPI controller, hence -all mandatory properties described in - - Documentation/devicetree/bindings/spi/spi-bus.txt - -must be specified. - -Required properties: - - compatible: Must be one of the following, depending on the - model: - "mcp3001" (DEPRECATED) - "mcp3002" (DEPRECATED) - "mcp3004" (DEPRECATED) - "mcp3008" (DEPRECATED) - "mcp3201" (DEPRECATED) - "mcp3202" (DEPRECATED) - "mcp3204" (DEPRECATED) - "mcp3208" (DEPRECATED) - "mcp3301" (DEPRECATED) - - "microchip,mcp3001" - "microchip,mcp3002" - "microchip,mcp3004" - "microchip,mcp3008" - "microchip,mcp3201" - "microchip,mcp3202" - "microchip,mcp3204" - "microchip,mcp3208" - "microchip,mcp3301" - "microchip,mcp3550-50" - "microchip,mcp3550-60" - "microchip,mcp3551" - "microchip,mcp3553" - - NOTE: The use of the compatibles with no vendor prefix - is deprecated and only listed because old DT use them. - - - spi-cpha, spi-cpol (boolean): - Either SPI mode (0,0) or (1,1) must be used, so specify - none or both of spi-cpha, spi-cpol. The MCP3550/1/3 - is more efficient in mode (1,1) as only 3 instead of - 4 bytes need to be read from the ADC, but not all SPI - masters support it. - - - vref-supply: Phandle to the external reference voltage supply. - -Examples: -spi_controller { - mcp3x0x@0 { - compatible = "microchip,mcp3002"; - reg = <0>; - spi-max-frequency = <1000000>; - vref-supply = <&vref_reg>; - }; -};
Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml new file +93 -0
93 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [PATCH 01/13] dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
Quoted 9 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Drops the deprecated compatibles without the vendor name. Whilst the driver continues to support these for old dt blobs, any dt bindings that are actuallly verified against this document should be fixed to add the vendor name.
Enforces rule that spi-cpol == spi-cpha. Is there a cleaner way to do this?
dependencies:
spi-cpol: [ spi-cpha ]
spi-cpha: [ spi-cpol ]
With that,
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Oskar Andero <[email protected]>--- .../devicetree/bindings/iio/adc/mcp320x.txt | 57 ------------ .../bindings/iio/adc/microchip,mcp3201.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 57 deletions(-)
Re: [PATCH 01/13] dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
Quoted 8 lines · On Mon, 17 Aug 2020 20:24:51 -0600 Rob Herring <[email protected]> wrote:
Quoted 7 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Drops the deprecated compatibles without the vendor name. Whilst the driver continues to support these for old dt blobs, any dt bindings that are actuallly verified against this document should be fixed to add the vendor name.
Quoted 6 lines
Quoted 2 lines
Enforces rule that spi-cpol == spi-cpha. Is there a cleaner way to do this?
dependencies:
spi-cpol: [ spi-cpha ]
spi-cpha: [ spi-cpol ]
Great!
Quoted 4 lines
With that,
Reviewed-by Rob Herring <[email protected]>
Applied,
Thanks,
Jonathan
Quoted 10 lines
Quoted 10 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Oskar Andero <[email protected]>--- .../devicetree/bindings/iio/adc/mcp320x.txt | 57 ------------ .../bindings/iio/adc/microchip,mcp3201.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 57 deletions(-)
Jonathan Cameron
maintainerPATCH 2/13 dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
These i2c devices have simple bindings, well described by trivial-device.yaml so rather than convert the binding doc to yaml, let us just add them to trivial devices and drop the old binding document.
--- .../devicetree/bindings/iio/adc/mcp3422.txt | 19 ------------------- .../devicetree/bindings/trivial-devices.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/iio/adc/mcp3422.txt deleted +0 -19
@@ -1,19 +0,0 @@ -* Microchip mcp3421/2/3/4/6/7/8 chip family (ADC) - -Required properties: - - compatible: Should be - "microchip,mcp3421" or - "microchip,mcp3422" or - "microchip,mcp3423" or - "microchip,mcp3424" or - "microchip,mcp3425" or - "microchip,mcp3426" or - "microchip,mcp3427" or - "microchip,mcp3428" - - reg: I2C address for the device - -Example: -adc@0 { - compatible = "microchip,mcp3424"; - reg = <0x68>; -};
Documentation/devicetree/bindings/trivial-devices.yaml +16 -0
@@ -130,6 +130,22 @@ properties: - mcube,mc3230 # MEMSIC 2-axis 8-bit digital accelerometer - memsic,mxc6225 + # Microchip differential I2C ADC, 1 Channel, 18 bit + - microchip,mcp3421 + # Microchip differential I2C ADC, 2 Channel, 18 bit + - microchip,mcp3422 + # Microchip differential I2C ADC, 2 Channel, 18 bit + - microchip,mcp3423 + # Microchip differential I2C ADC, 4 Channel, 18 bit + - microchip,mcp3424 + # Microchip differential I2C ADC, 1 Channel, 16 bit + - microchip,mcp3425 + # Microchip differential I2C ADC, 2 Channel, 16 bit + - microchip,mcp3426 + # Microchip differential I2C ADC, 2 Channel, 16 bit + - microchip,mcp3427 + # Microchip differential I2C ADC, 4 Channel, 16 bit + - microchip,mcp3428 # Microchip 7-bit Single I2C Digital POT (5k) - microchip,mcp4017-502 # Microchip 7-bit Single I2C Digital POT (10k)
Signature · 1 line
2.28.0
Re: [PATCH 02/13] dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.
Quoted 7 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
These i2c devices have simple bindings, well described by
trivial-device.yamlso rather than convert the binding doc to yaml, let us just add them to trivial devices and drop the old binding document.
Quoted 6 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Angelo Compagnucci <[email protected]>--- .../devicetree/bindings/iio/adc/mcp3422.txt | 19 ------------------- .../devicetree/bindings/trivial-devices.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-)
Re: [PATCH 02/13] dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.
Quoted 8 lines · On Mon, 17 Aug 2020 20:27:26 -0600 Rob Herring <[email protected]> wrote:
Quoted 7 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
These i2c devices have simple bindings, well described by
trivial-device.yamlso rather than convert the binding doc to yaml, let us just add them to trivial devices and drop the old binding document.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Angelo Compagnucci <[email protected]>--- .../devicetree/bindings/iio/adc/mcp3422.txt | 19 ------------------- .../devicetree/bindings/trivial-devices.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-)Reviewed-by Rob Herring <[email protected]>
Applied
Jonathan Cameron
maintainerPATCH 3/13 dt-bindings: iio: adc: ti,adc108s102 yaml conversion
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Very simple conversion of spi device with reference supply.
Added the #io-channel-cells property to allow for consumers.
--- .../bindings/iio/adc/ti,adc108s102.yaml | 47 +++++++++++++++++++ .../bindings/iio/adc/ti-adc108s102.txt | 18 ------- 2 files changed, 47 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml new file +47 -0
@@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc108s102.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC108S102 and ADC128S102 + +maintainers: + - Bogdan Pricop <[email protected]> + +description: | + Family of 8 channel, 10/12 bit, SPI, single ended ADCs. + +properties: + compatible: + const: + ti,adc108s102 + + reg: true + vref-supply: true + spi-max-frequency: true + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells= <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc108s102"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <1000000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt deleted +0 -18
@@ -1,18 +0,0 @@ -* Texas Instruments' ADC108S102 and ADC128S102 ADC chip - -Required properties: - - compatible: Should be "ti,adc108s102" - - reg: spi chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "ti,adc108s102"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <1000000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 03/13] dt-bindings: iio: adc: ti,adc108s102 yaml conversion
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Very simple conversion of spi device with reference supply.
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Jan Kiszka <[email protected]>--- .../bindings/iio/adc/ti,adc108s102.yaml | 47 +++++++++++++++++++ .../bindings/iio/adc/ti-adc108s102.txt | 18 ------- 2 files changed, 47 insertions(+), 18 deletions(-)
Re: [PATCH 03/13] dt-bindings: iio: adc: ti,adc108s102 yaml conversion
Quoted 15 lines · On Mon, 17 Aug 2020 20:27:57 -0600 Rob Herring <[email protected]> wrote:
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Very simple conversion of spi device with reference supply.
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Jan Kiszka <[email protected]>--- .../bindings/iio/adc/ti,adc108s102.yaml | 47 +++++++++++++++++++ .../bindings/iio/adc/ti-adc108s102.txt | 18 ------- 2 files changed, 47 insertions(+), 18 deletions(-)
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied.
Thanks,
Jonathan
Jonathan Cameron
maintainerPATCH 4/13 dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Very simple binding for this i2c device with a reference supply.
Added the #io-channel-cells property to allow for consumers.
--- .../bindings/iio/adc/lltc,ltc2497.yaml | 44 +++++++++++++++++++ .../devicetree/bindings/iio/adc/ltc2497.txt | 13 ------ 2 files changed, 44 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml new file +44 -0
@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2497.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Linear Technology / Analog Devices LTC2497 ADC + +maintainers: + - Michael Hennerich <[email protected]> + +description: | + 16bit ADC supporting up to 16 single ended or 8 differential inputs. + I2C interface. + +properties: + compatible: + const: + lltc,ltc2497 + + reg: true + vref-supply: true + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + adc@76 { + compatible = "lltc,ltc2497"; + reg = <0x76>; + vref-supply = <<c2497_reg>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ltc2497.txt deleted +0 -13
@@ -1,13 +0,0 @@ -* Linear Technology / Analog Devices LTC2497 ADC - -Required properties: - - compatible: Must be "lltc,ltc2497" - - reg: Must contain the ADC I2C address - - vref-supply: The regulator supply for ADC reference voltage - -Example: - ltc2497: adc@76 { - compatible = "lltc,ltc2497"; - reg = <0x76>; - vref-supply = <<c2497_reg>; - };
Signature · 1 line
2.28.0
Re: [PATCH 04/13] dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Very simple binding for this i2c device with a reference supply.
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Michael Hennerich <[email protected]>--- .../bindings/iio/adc/lltc,ltc2497.yaml | 44 +++++++++++++++++++ .../devicetree/bindings/iio/adc/ltc2497.txt | 13 ------ 2 files changed, 44 insertions(+), 13 deletions(-)
Re: [PATCH 04/13] dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
Quoted 15 lines · On Mon, 17 Aug 2020 20:28:30 -0600 Rob Herring <[email protected]> wrote:
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Very simple binding for this i2c device with a reference supply.
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Michael Hennerich <[email protected]>--- .../bindings/iio/adc/lltc,ltc2497.yaml | 44 +++++++++++++++++++ .../devicetree/bindings/iio/adc/ltc2497.txt | 13 ------ 2 files changed, 44 insertions(+), 13 deletions(-)
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied
Jonathan Cameron
maintainerPATCH 5/13 dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple conversion for this ADC driver. Note that I haven't put limits on the spi-max-sampling-frequency because the adc161s626 doesn't state one clearly defined value.
Added the #io-channel-cells property to allow for consumers.
--- .../bindings/iio/adc/ti,adc161s626.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-adc161s626.txt | 18 ------- 2 files changed, 51 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml new file +51 -0
@@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc161s626.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC141S626 and ADC161S626 ADCs + +maintainers: + - Matt Ranostay <[email protected]> + +description: | + Single channel 14/16bit differential ADCs + +properties: + compatible: + enum: + - ti,adc141s626 + - ti,adc161s626 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vdda-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc161s626"; + vdda-supply = <&vdda_fixed>; + reg = <0>; + spi-max-frequency = <4300000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt deleted +0 -18
@@ -1,18 +0,0 @@ -* Texas Instruments ADC141S626 and ADC161S626 chips - -Required properties: - - compatible: Should be "ti,adc141s626" or "ti,adc161s626" - - reg: spi chip select number for the device - - vdda-supply: supply voltage to VDDA pin - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "ti,adc161s626"; - vdda-supply = <&vdda_fixed>; - reg = <0>; - spi-max-frequency = <4300000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 05/13] dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
Quoted 11 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion for this ADC driver. Note that I haven't put limits on the spi-max-sampling-frequency because the adc161s626 doesn't state one clearly defined value.
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Matt Ranostay <[email protected]>
Quoted 89 lines
--- .../bindings/iio/adc/ti,adc161s626.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-adc161s626.txt | 18 ------- 2 files changed, 51 insertions(+), 18 deletions(-)Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml new file +51
-0@@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc161s626.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC141S626 and ADC161S626 ADCs + +maintainers: + - Matt Ranostay <[email protected]> + +description: | + Single channel 14/16bit differential ADCs + +properties: + compatible: + enum: + - ti,adc141s626 + - ti,adc161s626 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vdda-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc161s626"; + vdda-supply = <&vdda_fixed>; + reg = <0>; + spi-max-frequency = <4300000>; + #io-channel-cells = <1>; + }; + }; +...Documentation/devicetree/bindings/iio/adc/ti-adc161s626.txt deleted +0
-19@@ -1,18 +0,0 @@ -* Texas Instruments ADC141S626 and ADC161S626 chips - -Required properties: - - compatible: Should be "ti,adc141s626" or "ti,adc161s626" - - reg: spi chip select number for the device - - vdda-supply: supply voltage to VDDA pin - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "ti,adc161s626"; - vdda-supply = <&vdda_fixed>; - reg = <0>; - spi-max-frequency = <4300000>; -}; --2.28.0
Re: [PATCH 05/13] dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
In reply to Jonathan CameronQuoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion for this ADC driver. Note that I haven't put limits on the spi-max-sampling-frequency because the adc161s626 doesn't state one clearly defined value.
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Matt Ranostay <[email protected]>--- .../bindings/iio/adc/ti,adc161s626.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-adc161s626.txt | 18 ------- 2 files changed, 51 insertions(+), 18 deletions(-)
Re: [PATCH 05/13] dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
Quoted 17 lines · On Mon, 17 Aug 2020 20:28:57 -0600 Rob Herring <[email protected]> wrote:
Quoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion for this ADC driver. Note that I haven't put limits on the spi-max-sampling-frequency because the adc161s626 doesn't state one clearly defined value.
Quoted 9 lines
Added the #io-channel-cells property to allow for consumers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Matt Ranostay <[email protected]>--- .../bindings/iio/adc/ti,adc161s626.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-adc161s626.txt | 18 ------- 2 files changed, 51 insertions(+), 18 deletions(-)
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied
Jonathan Cameron
maintainerPATCH 6/13 dt-bindings: iio: adc: ti,adc0832 yaml conversion.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple binding conversion of this SPI ADC binding, with reference voltage.
Added the optional property #io-channel-cells to allow for consumers of channels if that makes sense for a given board.
--- .../bindings/iio/adc/ti,adc0832.yaml | 56 +++++++++++++++++++ .../bindings/iio/adc/ti-adc0832.txt | 19 ------- 2 files changed, 56 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml new file +56 -0
@@ -0,0 +1,56 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc0832.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC0832 and similar ADCs + +maintainers: + - Akinobu Mita <[email protected]> + +description: | + 8 bit ADCs with 1, 2, 4 or 8 inputs for single ended or differential + conversion. + +properties: + compatible: + enum: + - ti,adc0831 + - ti,adc0832 + - ti,adc0834 + - ti,adc0838 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: + description: External reference, needed to establish input scaling + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc0832"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <200000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-adc0832.txt deleted +0 -19
@@ -1,19 +0,0 @@ -* Texas Instruments' ADC0831/ADC0832/ADC0832/ADC0838 - -Required properties: - - compatible: Should be one of - * "ti,adc0831" - * "ti,adc0832" - * "ti,adc0834" - * "ti,adc0838" - - reg: spi chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - - spi-max-frequency: Max SPI frequency to use (< 400000) - -Example: -adc@0 { - compatible = "ti,adc0832"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <200000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 06/13] dt-bindings: iio: adc: ti,adc0832 yaml conversion.
Quoted 8 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding conversion of this SPI ADC binding, with reference voltage.
Added the optional property #io-channel-cells to allow for consumers of channels if that makes sense for a given board.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Akinobu Mita <[email protected]>--- .../bindings/iio/adc/ti,adc0832.yaml | 56 +++++++++++++++++++ .../bindings/iio/adc/ti-adc0832.txt | 19 ------- 2 files changed, 56 insertions(+), 19 deletions(-)
Jonathan Cameron
maintainerPATCH 7/13 dt-bindings: iio: adc: ti,adc084s021 yaml conversion
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple conversion.
Added the #io-channel-cells optional property to allow for consumer bindings if appropriate on a given board.
--- .../bindings/iio/adc/ti,adc084s021.yaml | 58 +++++++++++++++++++ .../bindings/iio/adc/ti-adc084s021.txt | 19 ------ 2 files changed, 58 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml new file +58 -0
@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc084s021.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC084S021 ADC + +maintainers: + - Mårten Lindahl <[email protected]> + +description: | + 8 bit ADC with 4 channels + +properties: + compatible: + const: ti,adc084s021 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: + description: External reference, needed to establish input scaling + + spi-cpol: true + spi-cpha: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + - spi-cpol + - spi-cpha + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc084s021"; + reg = <0>; + vref-supply = <&adc_vref>; + spi-cpol; + spi-cpha; + spi-max-frequency = <16000000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt deleted +0 -19
@@ -1,19 +0,0 @@ -* Texas Instruments' ADC084S021 - -Required properties: - - compatible : Must be "ti,adc084s021" - - reg : SPI chip select number for the device - - vref-supply : The regulator supply for ADC reference voltage - - spi-cpol : Per spi-bus bindings - - spi-cpha : Per spi-bus bindings - - spi-max-frequency : Per spi-bus bindings - -Example: -adc@0 { - compatible = "ti,adc084s021"; - reg = <0>; - vref-supply = <&adc_vref>; - spi-cpol; - spi-cpha; - spi-max-frequency = <16000000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 07/13] dt-bindings: iio: adc: ti,adc084s021 yaml conversion
Quoted 7 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion.
Added the #io-channel-cells optional property to allow for consumer bindings if appropriate on a given board.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Mårten Lindahl <[email protected]>--- .../bindings/iio/adc/ti,adc084s021.yaml | 58 +++++++++++++++++++ .../bindings/iio/adc/ti-adc084s021.txt | 19 ------ 2 files changed, 58 insertions(+), 19 deletions(-)
Re: [PATCH 07/13] dt-bindings: iio: adc: ti,adc084s021 yaml conversion
Quoted 16 lines · On Mon, 17 Aug 2020 20:30:00 -0600 Rob Herring <[email protected]> wrote:
Quoted 7 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion.
Added the #io-channel-cells optional property to allow for consumer bindings if appropriate on a given board.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Mårten Lindahl <[email protected]>--- .../bindings/iio/adc/ti,adc084s021.yaml | 58 +++++++++++++++++++ .../bindings/iio/adc/ti-adc084s021.txt | 19 ------ 2 files changed, 58 insertions(+), 19 deletions(-)
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied
Jonathan Cameron
maintainerRe: [PATCH 07/13] dt-bindings: iio: adc: ti,adc084s021 yaml conversion
Quoted 19 lines · On Sat, 29 Aug 2020 18:53:31 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 16 lines · On Mon, 17 Aug 2020 20:30:00 -0600 Rob Herring <[email protected]> wrote:
Quoted 14 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion.
Added the #io-channel-cells optional property to allow for consumer bindings if appropriate on a given board.
Signed-off-by Jonathan Cameron <[email protected]>Cc Mårten Lindahl <[email protected]>--- .../bindings/iio/adc/ti,adc084s021.yaml | 58 +++++++++++++++++++ .../bindings/iio/adc/ti-adc084s021.txt | 19 ------ 2 files changed, 58 insertions(+), 19 deletions(-)
Quoted 2 lines
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>Applied
Or apparently I didn't. Not sure what happened here, but now actually applied to the togreg branch of iio.git.
Thanks,
Jonathan
Quoted 3 lines
Jonathan Cameron
maintainerPATCH 8/13 dt-bindings: iio: adc: ti,adc12138 yaml conversion.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple binding conversion. Only addition was #io-channel-cells to allow for potential consumers of the channels on this device.
--- .../bindings/iio/adc/ti,adc12138.yaml | 85 +++++++++++++++++++ .../bindings/iio/adc/ti-adc12138.txt | 37 -------- 2 files changed, 85 insertions(+), 37 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml new file +85 -0
@@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc12138.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC12138 and similar self-calibrating ADCs + +maintainers: + - Akinobu Mita <[email protected]> + +description: | + 13 bit ADCs with 1, 2 or 8 inputs and self calibrating circuitry to + correct for linearity, zero and full scale errors. + +properties: + compatible: + enum: + - ti,adc12130 + - ti,adc12132 + - ti,adc12138 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: End of Conversion (EOC) interrupt + + clocks: + maxItems: 1 + description: Conversion clock input. + + spi-max-frequency: true + + vref-p-supply: + description: The regulator supply for positive analog voltage reference + + vref-n-suppy: + description: | + The regulator supply for negative analog voltage reference + (Note that this must not go below GND or exceed vref-p) + If not specified, this is assumed to be analog ground. + + ti,acquisition-time: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 6, 10, 18, 34] + description: | + The number of conversion clock periods for the S/H's acquisition time. + For high source impedances, this value can be increased to 18 or 34. + For less ADC accuracy and/or slower CCLK frequencies this value may be + decreased to 6. See section 6.0 INPUT SOURCE RESISTANCE in the + datasheet for details. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - vref-p-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc12138"; + reg = <0>; + interrupts = <28 IRQ_TYPE_EDGE_RISING>; + interrupt-parent = <&gpio1>; + clocks = <&cclk>; + vref-p-supply = <&ldo4_reg>; + spi-max-frequency = <5000000>; + ti,acquisition-time = <6>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt deleted +0 -37
@@ -1,37 +0,0 @@ -* Texas Instruments' ADC12130/ADC12132/ADC12138 - -Required properties: - - compatible: Should be one of - * "ti,adc12130" - * "ti,adc12132" - * "ti,adc12138" - - reg: SPI chip select number for the device - - interrupts: Should contain interrupt for EOC (end of conversion) - - clocks: phandle to conversion clock input - - spi-max-frequency: Definision as per - Documentation/devicetree/bindings/spi/spi-bus.txt - - vref-p-supply: The regulator supply for positive analog voltage reference - -Optional properties: - - vref-n-supply: The regulator supply for negative analog voltage reference - (Note that this must not go below GND or exceed vref-p) - If not specified, this is assumed to be analog ground. - - ti,acquisition-time: The number of conversion clock periods for the S/H's - acquisition time. Should be one of 6, 10, 18, 34. If not specified, - default value of 10 is used. - For high source impedances, this value can be increased to 18 or 34. - For less ADC accuracy and/or slower CCLK frequencies this value may be - decreased to 6. See section 6.0 INPUT SOURCE RESISTANCE in the - datasheet for details. - -Example: -adc@0 { - compatible = "ti,adc12138"; - reg = <0>; - interrupts = <28 IRQ_TYPE_EDGE_RISING>; - interrupt-parent = <&gpio1>; - clocks = <&cclk>; - vref-p-supply = <&ldo4_reg>; - spi-max-frequency = <5000000>; - ti,acquisition-time = <6>; -};
Signature · 1 line
2.28.0
Rob Herring
maintainerRe: [PATCH 08/13] dt-bindings: iio: adc: ti,adc12138 yaml conversion.
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding conversion. Only addition was #io-channel-cells to allow for potential consumers of the channels on this device.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Akinobu Mita <[email protected]>--- .../bindings/iio/adc/ti,adc12138.yaml | 85 +++++++++++++++++++ .../bindings/iio/adc/ti-adc12138.txt | 37 -------- 2 files changed, 85 insertions(+), 37 deletions(-)
My bot found errors running 'make dt_binding_check' on your patch:
Error: Documentation/devicetree/bindings/iio/adc/ti,adc12138.example.dts:26.34-35 syntax error FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:330: Documentation/devicetree/bindings/iio/adc/ti,adc12138.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1334: dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1342594
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
Jonathan Cameron
maintainerRe: [PATCH 08/13] dt-bindings: iio: adc: ti,adc12138 yaml conversion.
Quoted 24 lines · On Wed, 12 Aug 2020 10:29:07 -0600 Rob Herring <[email protected]> wrote:
Quoted 5 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding conversion. Only addition was #io-channel-cells to allow for potential consumers of the channels on this device.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Akinobu Mita <[email protected]>--- .../bindings/iio/adc/ti,adc12138.yaml | 85 +++++++++++++++++++ .../bindings/iio/adc/ti-adc12138.txt | 37 -------- 2 files changed, 85 insertions(+), 37 deletions(-)My bot found errors running 'make
dt_binding_check' on your patch:Error: Documentation/devicetree/bindings/iio/adc/ti,adc12138.example.dts:26.34-35 syntax error FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:330:Documentation/devicetree/bindings/iio/adc/ti,adc12138.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1334:dt_binding_check] Error 2
Quoted 9 lines
See https://patchwork.ozlabs.org/patch/1342594
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
Not sure how I missed this one in testing. It is a missing include. I don't propose to resend the series though until more comments are in.
Thanks,
Jonathan
Re: [PATCH 08/13] dt-bindings: iio: adc: ti,adc12138 yaml conversion.
In reply to Jonathan CameronQuoted 48 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding conversion. Only addition was #io-channel-cells to allow for potential consumers of the channels on this device.
Signed-off-by Jonathan Cameron <[email protected]>Cc Akinobu Mita <[email protected]>--- .../bindings/iio/adc/ti,adc12138.yaml | 85 +++++++++++++++++++ .../bindings/iio/adc/ti-adc12138.txt | 37 -------- 2 files changed, 85 insertions(+), 37 deletions(-)Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml new file +29
-0@@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc12138.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC12138 and similar self-calibrating ADCs + +maintainers: + - Akinobu Mita <[email protected]> + +description: | + 13 bit ADCs with 1, 2 or 8 inputs and self calibrating circuitry to + correct for linearity, zero and full scale errors. + +properties: + compatible: + enum: + - ti,adc12130 + - ti,adc12132 + - ti,adc12138 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: End of Conversion (EOC) interrupt +
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml line 39
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml new file +10
-0+ clocks: + maxItems: 1 + description: Conversion clock input. + + spi-max-frequency: true + + vref-p-supply: + description: The regulator supply for positive analog voltage reference + + vref-n-suppy:
typo
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml line 47
Quoted 8 lines
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml new file +8
-0+ description: | + The regulator supply for negative analog voltage reference + (Note that this must not go below GND or exceed vref-p) + If not specified, this is assumed to be analog ground. + + ti,acquisition-time: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 6, 10, 18, 34]
Inconsistent spacing for brackets. 0 or 1 space is fine.
Quoted 84 lines
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml new file +38
-0+ description: | + The number of conversion clock periods for the S/H's acquisition time. + For high source impedances, this value can be increased to 18 or 34. + For less ADC accuracy and/or slower CCLK frequencies this value may be + decreased to 6. See section 6.0 INPUT SOURCE RESISTANCE in the + datasheet for details. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - vref-p-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc12138"; + reg = <0>; + interrupts = <28 IRQ_TYPE_EDGE_RISING>; + interrupt-parent = <&gpio1>; + clocks = <&cclk>; + vref-p-supply = <&ldo4_reg>; + spi-max-frequency = <5000000>; + ti,acquisition-time = <6>; + #io-channel-cells = <1>; + }; + }; +...Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt deleted +0
-38@@ -1,37 +0,0 @@ -* Texas Instruments' ADC12130/ADC12132/ADC12138 - -Required properties: - - compatible: Should be one of - * "ti,adc12130" - * "ti,adc12132" - * "ti,adc12138" - - reg: SPI chip select number for the device - - interrupts: Should contain interrupt for EOC (end of conversion) - - clocks: phandle to conversion clock input - - spi-max-frequency: Definision as per - Documentation/devicetree/bindings/spi/spi-bus.txt - - vref-p-supply: The regulator supply for positive analog voltage reference - -Optional properties: - - vref-n-supply: The regulator supply for negative analog voltage reference - (Note that this must not go below GND or exceed vref-p) - If not specified, this is assumed to be analog ground. - - ti,acquisition-time: The number of conversion clock periods for the S/H's - acquisition time. Should be one of 6, 10, 18, 34. If not specified, - default value of 10 is used. - For high source impedances, this value can be increased to 18 or 34. - For less ADC accuracy and/or slower CCLK frequencies this value may be - decreased to 6. See section 6.0 INPUT SOURCE RESISTANCE in the - datasheet for details. - -Example: -adc@0 { - compatible = "ti,adc12138"; - reg = <0>; - interrupts = <28 IRQ_TYPE_EDGE_RISING>; - interrupt-parent = <&gpio1>; - clocks = <&cclk>; - vref-p-supply = <&ldo4_reg>; - spi-max-frequency = <5000000>; - ti,acquisition-time = <6>; -}; --2.28.0
Jonathan Cameron
maintainerPATCH 9/13 dt-bindings: iio: adc: ti,adc128s052 yaml conversion.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple binding. Only addition to txt version is
as a provider of channels to other devices using the consumer binding.
--- .../bindings/iio/adc/ti,adc128s052.yaml | 59 +++++++++++++++++++ .../bindings/iio/adc/ti-adc128s052.txt | 25 -------- 2 files changed, 59 insertions(+), 25 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml new file +59 -0
@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc128s052.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADC128S052 and similar ADCs + +maintainers: + - Angelo Compagnucci <[email protected]> + +description: | + Family of 12 bit SPI ADCs with 2 to 8 channels with a range of different + target sample rates. + +properties: + compatible: + enum: + - ti,adc122s021 + - ti,adc122s051 + - ti,adc122s101 + - ti,adc124s021 + - ti,adc124s051 + - ti,adc124s101 + - ti,adc128s052 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,adc128s052"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <1000000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt deleted +0 -25
@@ -1,25 +0,0 @@ -* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip - -Required properties: - - compatible: Should be one of: - - "ti,adc128s052" - - "ti,adc122s021" - - "ti,adc122s051" - - "ti,adc122s101" - - "ti,adc124s021" - - "ti,adc124s051" - - "ti,adc124s101" - - reg: spi chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "ti,adc128s052"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <1000000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 09/13] dt-bindings: iio: adc: ti,adc128s052 yaml conversion.
Quoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding. Only addition to txt version is
as a provider of channels to other devices using the consumer binding.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Angelo Compagnucci <[email protected]>--- .../bindings/iio/adc/ti,adc128s052.yaml | 59 +++++++++++++++++++ .../bindings/iio/adc/ti-adc128s052.txt | 25 -------- 2 files changed, 59 insertions(+), 25 deletions(-)
Re: [PATCH 09/13] dt-bindings: iio: adc: ti,adc128s052 yaml conversion.
Quoted 15 lines · On Mon, 17 Aug 2020 20:30:34 -0600 Rob Herring <[email protected]> wrote:
Quoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding. Only addition to txt version is
as a provider of channels to other devices using the consumer binding.Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Angelo Compagnucci <[email protected]>--- .../bindings/iio/adc/ti,adc128s052.yaml | 59 +++++++++++++++++++ .../bindings/iio/adc/ti-adc128s052.txt | 25 -------- 2 files changed, 59 insertions(+), 25 deletions(-)
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied
Jonathan Cameron
maintainerPATCH 10/13 dt-bindings: iio: adc: ti,ads7950 binding conversion
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple conversion. This binding already had the
that is necessary, I'm happy to leave it as previously documented.
--- .../bindings/iio/adc/ti,ads7950.yaml | 64 +++++++++++++++++++ .../bindings/iio/adc/ti-ads7950.txt | 23 ------- 2 files changed, 64 insertions(+), 23 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads7950.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADS7950 and similar ADCs + +maintainers: + - David Lechner <[email protected]> + +description: | + Family of 4-16 channel, 8-12 bit ADCs with SPI interface. + +properties: + compatible: + enum: + - ti,ads7950 + - ti,ads7951 + - ti,ads7952 + - ti,ads7953 + - ti,ads7954 + - ti,ads7955 + - ti,ads7956 + - ti,ads7957 + - ti,ads7958 + - ti,ads7959 + - ti,ads7960 + - ti,ads7961 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: + description: Supply the 2.5V or 5V reference voltage + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt deleted +0 -23
@@ -1,23 +0,0 @@ -* Texas Instruments ADS7950 family of A/DC chips - -Required properties: - - compatible: Must be one of "ti,ads7950", "ti,ads7951", "ti,ads7952", - "ti,ads7953", "ti,ads7954", "ti,ads7955", "ti,ads7956", "ti,ads7957", - "ti,ads7958", "ti,ads7959", "ti,ads7960", or "ti,ads7961" - - reg: SPI chip select number for the device - - #io-channel-cells: Must be 1 as per ../iio-bindings.txt - - vref-supply: phandle to a regulator node that supplies the 2.5V or 5V - reference voltage - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "ti,ads7957"; - reg = <0>; - #io-channel-cells = <1>; - vref-supply = <&refin_supply>; - spi-max-frequency = <10000000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 10/13] dt-bindings: iio: adc: ti,ads7950 binding conversion
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion. This binding already had the
that is necessary, I'm happy to leave it as previously documented.
This commit message doesn't make sense to me. It should probably just say "this converts the device tree bindings to yml" or so.
Quoted 38 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc David Lechner <[email protected]>--- .../bindings/iio/adc/ti,ads7950.yaml | 64 +++++++++++++++++++ .../bindings/iio/adc/ti-ads7950.txt | 23 ------- 2 files changed, 64 insertions(+), 23 deletions(-)Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +24
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads7950.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADS7950 and similar ADCs + +maintainers: + - David Lechner <[email protected]> + +description: | + Family of 4-16 channel, 8-12 bit ADCs with SPI interface. + +properties: + compatible: + enum: + - ti,ads7950 + - ti,ads7951 + - ti,ads7952 + - ti,ads7953 + - ti,ads7954 + - ti,ads7955 + - ti,ads7956
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +10
-0+ - ti,ads7957 + - ti,ads7958 + - ti,ads7959 + - ti,ads7960 + - ti,ads7961 + + reg: + maxItems: 1 + + spi-max-frequency: true
According to the datasheet, max frequency is 20MHz, so this can be:
spi-max-frequency:
maximum: 20000000
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml line 37
Quoted 3 lines
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +3
-0+ + vref-supply: + description: Supply the 2.5V or 5V reference voltage
Should this say "Supplies ..."?
Quoted 26 lines
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +26
-0+ + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; + #io-channel-cells = <1>; + }; + };
Jonathan Cameron
maintainerRe: [PATCH 10/13] dt-bindings: iio: adc: ti,ads7950 binding conversion
Quoted 8 lines · On Wed, 12 Aug 2020 11:30:28 -0500 David Lechner <[email protected]> wrote:
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple conversion. This binding already had the
that is necessary, I'm happy to leave it as previously documented.This commit message doesn't make sense to me. It should probably just say "this converts the device tree bindings to yml" or so.
I'm not sure what happened there. I think perhaps a line got accidentally removed. It was meant to talk about the fact #io-channel-cells is marked as required which may not make sense for all boards with this part. Will rewrite for v2.
Jonathan
Quoted 89 lines
Quoted 39 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc David Lechner <[email protected]>--- .../bindings/iio/adc/ti,ads7950.yaml | 64 +++++++++++++++++++ .../bindings/iio/adc/ti-ads7950.txt | 23 ------- 2 files changed, 64 insertions(+), 23 deletions(-)Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +24
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads7950.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADS7950 and similar ADCs + +maintainers: + - David Lechner <[email protected]> + +description: | + Family of 4-16 channel, 8-12 bit ADCs with SPI interface. + +properties: + compatible: + enum: + - ti,ads7950 + - ti,ads7951 + - ti,ads7952 + - ti,ads7953 + - ti,ads7954 + - ti,ads7955 + - ti,ads7956Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +10
-0+ - ti,ads7957 + - ti,ads7958 + - ti,ads7959 + - ti,ads7960 + - ti,ads7961 + + reg: + maxItems: 1 + + spi-max-frequency: trueAccording to the datasheet, max frequency is 20MHz, so this can be:
spi-max-frequency:
maximum: 20000000Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml line 37
Quoted 3 lines
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +3
-0+ + vref-supply: + description: Supply the 2.5V or 5V reference voltageShould this say "Supplies ..."?
Quoted 26 lines
Documentation/devicetree/bindings/iio/adc/ti,ads7950.yaml new file +26
-0+ + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; + #io-channel-cells = <1>; + }; + };
Jonathan Cameron
maintainerPATCH 11/13 dt-bindings: iio: adc: ti,ads8344 yaml conversion
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
--- .../bindings/iio/adc/ti,ads8344.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-ads8344.txt | 19 ------- 2 files changed, 51 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml new file +51 -0
@@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads8344.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADS8344 ADC + +maintainers: + - Gregory Clement <[email protected]> + +description: | + 16bit 8-channel ADC with single ended inputs. + +properties: + compatible: + const: ti,ads8344 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: + description: Supply the 2.5V or 5V reference voltage + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,ads8344"; + reg = <0>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-ads8344.txt deleted +0 -19
@@ -1,19 +0,0 @@ -* Texas Instruments ADS8344 A/DC chip - -Required properties: - - compatible: Must be "ti,ads8344" - - reg: SPI chip select number for the device - - vref-supply: phandle to a regulator node that supplies the - reference voltage - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "ti,ads8344"; - reg = <0>; - vref-supply = <&refin_supply>; - spi-max-frequency = <10000000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 11/13] dt-bindings: iio: adc: ti,ads8344 yaml conversion
Quoted 10 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
Signed-off-by Jonathan Cameron <[email protected]>--- .../bindings/iio/adc/ti,ads8344.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-ads8344.txt | 19 ------- 2 files changed, 51 insertions(+), 19 deletions(-)
Re: [PATCH 11/13] dt-bindings: iio: adc: ti,ads8344 yaml conversion
Quoted 5 lines · On Mon, 17 Aug 2020 20:31:56 -0600 Rob Herring <[email protected]> wrote:
Quoted 4 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Jonathan Cameron <[email protected]>--- .../bindings/iio/adc/ti,ads8344.yaml | 51 +++++++++++++++++++ .../bindings/iio/adc/ti-ads8344.txt | 19 ------- 2 files changed, 51 insertions(+), 19 deletions(-)Reviewed-by Rob Herring <[email protected]>
Applied
Jonathan Cameron
maintainerPATCH 12/13 dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc
In reply to Jonathan CameronFrom: Phil Reid <[email protected]>
JC: Seems that I messed up applying the original driver patches, and this file never actually made it into the tree.
I have picked up original Ack and Sign-off so as to record the history.
--- .../devicetree/bindings/iio/adc/ti-tlc4541.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt new file +17 -0
@@ -0,0 +1,17 @@ +* Texas Instruments' TLC4541 + +Required properties: + - compatible: Should be one of + * "ti,tlc4541" + * "ti,tlc3541" + - reg: SPI chip select number for the device + - vref-supply: The regulator supply for ADC reference voltage + - spi-max-frequency: Max SPI frequency to use (<= 200000) + +Example: +adc@0 { + compatible = "ti,tlc4541"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <200000>; +};
Signature · 1 line
2.28.0
Jonathan Cameron
AppliedRe: [PATCH 12/13] dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc
Quoted 11 lines · On Sun, 9 Aug 2020 12:17:52 +0100 Jonathan Cameron <[email protected]> wrote:
From: Phil Reid <[email protected]>
JC: Seems that I messed up applying the original driver patches, and this file never actually made it into the tree.
I have picked up original Ack and Sign-off so as to record the history.
Acked-by Rob Herring <[email protected]>Signed-off-by Phil Reid <[email protected]>Signed-off-by Jonathan Cameron <[email protected]>
Applied.
Quoted 27 lines
--- .../devicetree/bindings/iio/adc/ti-tlc4541.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt new file +17
-0@@ -0,0 +1,17 @@ +* Texas Instruments' TLC4541 + +Required properties: + - compatible: Should be one of + * "ti,tlc4541" + * "ti,tlc3541" + - reg: SPI chip select number for the device + - vref-supply: The regulator supply for ADC reference voltage + - spi-max-frequency: Max SPI frequency to use (<= 200000) + +Example: +adc@0 { + compatible = "ti,tlc4541"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <200000>; +};
Jonathan Cameron
maintainerPATCH 13/13 dt-bindings: iio: adc: ti,tlc4541 binding conversion
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
Dropped the stated value of maximum spi bus frequency as it does not seem to correspond to the datasheet. The value of 200kHz is the max sampling frequency of the ADC, not the clock frequency of the SPI bus.
Added #io-channel-cells to allow use as a provider of channels to other devices via the consumer binding.
--- .../bindings/iio/adc/ti,tlc4541.yaml | 52 +++++++++++++++++++ .../bindings/iio/adc/ti-tlc4541.txt | 17 ------ 2 files changed, 52 insertions(+), 17 deletions(-)
Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml new file +52 -0
@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,tlc4541.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TLC4541 and similar ADCs + +maintainers: + - Phil Reid <[email protected]> + +description: | + 14/16bit single channel ADC with SPI interface. + +properties: + compatible: + enum: + - ti,tlc3541 + - ti,tlc4541 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,tlc4541"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <200000>; + #io-channel-cells = <1>; + }; + }; +...
Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt deleted +0 -17
@@ -1,17 +0,0 @@ -* Texas Instruments' TLC4541 - -Required properties: - - compatible: Should be one of - * "ti,tlc4541" - * "ti,tlc3541" - - reg: SPI chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - - spi-max-frequency: Max SPI frequency to use (<= 200000) - -Example: -adc@0 { - compatible = "ti,tlc4541"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <200000>; -};
Signature · 1 line
2.28.0
Re: [PATCH 13/13] dt-bindings: iio: adc: ti,tlc4541 binding conversion
Quoted 8 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
Dropped the stated value of maximum spi bus frequency as it does not seem to correspond to the datasheet. The value of 200kHz is the max sampling frequency of the ADC, not the clock frequency of the SPI bus.
Quoted 5 lines
Added #io-channel-cells to allow use as a provider of channels to other devices via the consumer binding.
Signed-off-by Jonathan Cameron <[email protected]>Cc Phil Reid <[email protected]>
Yes, the spi frequency can be higher.
Thanks.
Quoted 87 lines
--- .../bindings/iio/adc/ti,tlc4541.yaml | 52 +++++++++++++++++++ .../bindings/iio/adc/ti-tlc4541.txt | 17 ------ 2 files changed, 52 insertions(+), 17 deletions(-)Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml new file +52
-0@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,tlc4541.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TLC4541 and similar ADCs + +maintainers: + - Phil Reid <[email protected]> + +description: | + 14/16bit single channel ADC with SPI interface. + +properties: + compatible: + enum: + - ti,tlc3541 + - ti,tlc4541 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,tlc4541"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <200000>; + #io-channel-cells = <1>; + }; + }; +...Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt deleted +0
-17@@ -1,17 +0,0 @@ -* Texas Instruments' TLC4541 - -Required properties: - - compatible: Should be one of - * "ti,tlc4541" - * "ti,tlc3541" - - reg: SPI chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - - spi-max-frequency: Max SPI frequency to use (<= 200000) - -Example: -adc@0 { - compatible = "ti,tlc4541"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <200000>; -};
Signature · 2 lines
Regards Phil Reid
Re: [PATCH 13/13] dt-bindings: iio: adc: ti,tlc4541 binding conversion
In reply to Jonathan CameronQuoted 11 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
Dropped the stated value of maximum spi bus frequency as it does not seem to correspond to the datasheet. The value of 200kHz is the max sampling frequency of the ADC, not the clock frequency of the SPI bus.Added #io-channel-cells to allow use as a provider of channels to other devices via the consumer binding.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Phil Reid <[email protected]>--- .../bindings/iio/adc/ti,tlc4541.yaml | 52 +++++++++++++++++++ .../bindings/iio/adc/ti-tlc4541.txt | 17 ------ 2 files changed, 52 insertions(+), 17 deletions(-)
Re: [PATCH 13/13] dt-bindings: iio: adc: ti,tlc4541 binding conversion
Quoted 20 lines · On Mon, 17 Aug 2020 20:32:43 -0600 Rob Herring <[email protected]> wrote:
Quoted 11 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Simple binding so easy to convert.
Dropped the stated value of maximum spi bus frequency as it does not seem to correspond to the datasheet. The value of 200kHz is the max sampling frequency of the ADC, not the clock frequency of the SPI bus.Added #io-channel-cells to allow use as a provider of channels to other devices via the consumer binding.
Quoted 7 lines
Signed-off-by Jonathan Cameron <[email protected]>Cc Phil Reid <[email protected]>--- .../bindings/iio/adc/ti,tlc4541.yaml | 52 +++++++++++++++++++ .../bindings/iio/adc/ti-tlc4541.txt | 17 ------ 2 files changed, 52 insertions(+), 17 deletions(-)
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>
Applied. Thanks. I'll fix up the remaining patches that need it and send a v2.
Thanks,
Jonathan