From d93dd060809f3db32ef3198121989e26e3049e00 Mon Sep 17 00:00:00 2001 From: Michael Auchter Date: Thu, 24 Sep 2020 14:52:14 -0500 Subject: dt-bindings: iio: dac: ad5686: add binding Add a binding for AD5686 Signed-off-by: Michael Auchter Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200924195215.49443-3-michael.auchter@ni.com Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/dac/adi,ad5686.yaml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml new file mode 100644 index 000000000000..8065228e5df8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5686.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5686 and similar multi-channel DACs + +maintainers: + - Michael Auchter + +description: | + Binding for Analog Devices AD5686 and similar multi-channel DACs + +properties: + compatible: + enum: + - adi,ad5311r + - adi,ad5338r + - adi,ad5671r + - adi,ad5675r + - adi,ad5691r + - adi,ad5692r + - adi,ad5693 + - adi,ad5693r + - adi,ad5694 + - adi,ad5694r + - adi,ad5695r + - adi,ad5696 + - adi,ad5696r + + reg: + maxItems: 1 + + vcc-supply: + description: | + The regulator supply for DAC reference voltage. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ad5686: dac@0 { + compatible = "adi,ad5686"; + reg = <0>; + vcc-supply = <&dac_vref>; + }; + }; +... -- cgit v1.2.3 From 324b9f2987441d6e53d314e64500de9fc65b0c12 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Tue, 6 Oct 2020 14:07:42 +0200 Subject: dt-bindings: iio: imu: st_lsm6dsx: add lsm6dst device bindings Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Link: https://lore.kernel.org/r/05e4273f2544230049b2cd82c6bf1be788a8e483.1601985763.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron --- Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt b/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt index cef4bc16fce1..7c6742d3e992 100644 --- a/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt +++ b/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt @@ -16,6 +16,7 @@ Required properties: "st,lsm9ds1-imu" "st,lsm6ds0" "st,lsm6dsrx" + "st,lsm6dst" - reg: i2c address of the sensor / spi cs line Optional properties: -- cgit v1.2.3 From e94b3c608a2a886758da87dc5bb383e5eddce666 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 6 Oct 2020 18:17:34 -0700 Subject: dt-bindings: iio: sx9310: Add various settings as DT properties We need to set various bits in the hardware registers for this device to operate properly depending on how it is installed. Add a handful of DT properties to configure these things. Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-6-swboyd@chromium.org Signed-off-by: Jonathan Cameron --- .../bindings/iio/proximity/semtech,sx9310.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml index 5739074d3592..ccfb163f3d34 100644 --- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml @@ -40,6 +40,63 @@ properties: "#io-channel-cells": const: 1 + semtech,cs0-ground: + description: Indicates the CS0 sensor is connected to ground. + type: boolean + + semtech,combined-sensors: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + List of which sensors are combined and represented by CS3. + Possible values are - + 3 - CS3 (internal) + 0 1 - CS0 + CS1 + 1 2 - CS1 + CS2 (default) + 0 1 2 3 - CS0 + CS1 + CS2 + CS3 + items: + enum: [ 0, 1, 2, 3 ] + minItems: 1 + maxItems: 4 + + semtech,resolution: + description: + Capacitance measure resolution. Refer to datasheet for more details. + enum: + - coarsest + - very-coarse + - coarse + - medium-coarse + - medium + - fine + - very-fine + - finest + + semtech,startup-sensor: + $ref: /schemas/types.yaml#definitions/uint32 + enum: [0, 1, 2, 3] + default: 0 + description: + Sensor used for start-up proximity detection. The combined + sensor is represented by the value 3. This is used for initial + compensation. + + semtech,proxraw-strength: + $ref: /schemas/types.yaml#definitions/uint32 + enum: [0, 2, 4, 8] + default: 2 + description: + PROXRAW filter strength. A value of 0 represents off, and other values + represent 1-1/N. + + semtech,avg-pos-strength: + $ref: /schemas/types.yaml#definitions/uint32 + enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295] + default: 16 + description: + Average positive filter strength. A value of 0 represents off and + UINT_MAX (4294967295) represents infinite. Other values + represent 1-1/N. + required: - compatible - reg @@ -61,5 +118,11 @@ examples: vdd-supply = <&pp3300_a>; svdd-supply = <&pp1800_prox>; #io-channel-cells = <1>; + semtech,cs0-ground; + semtech,combined-sensors = <1 2 3>; + semtech,resolution = "fine"; + semtech,startup-sensor = <1>; + semtech,proxraw-strength = <2>; + semtech,avg-pos-strength = <64>; }; }; -- cgit v1.2.3 From b4ae07cde9b31bf94f38ef5c6f0750642f325c2f Mon Sep 17 00:00:00 2001 From: Fabien Parent Date: Mon, 12 Oct 2020 22:52:17 +0200 Subject: dt-bindings: iio: adc: auxadc: add doc for MT8516 SoC Add documentation for the auxadc binding for MT8516 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201012205218.3010868-1-fparent@baylibre.com Signed-off-by: Jonathan Cameron --- Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt b/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt index 78c06e05c8e5..1b7ff9e5615a 100644 --- a/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt +++ b/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt @@ -17,6 +17,7 @@ Required properties: - "mediatek,mt7622-auxadc": For MT7622 family of SoCs - "mediatek,mt8173-auxadc": For MT8173 family of SoCs - "mediatek,mt8183-auxadc", "mediatek,mt8173-auxadc": For MT8183 family of SoCs + - "mediatek,mt8516-auxadc", "mediatek,mt8173-auxadc": For MT8516 family of SoCs - reg: Address range of the AUXADC unit. - clocks: Should contain a clock specifier for each entry in clock-names - clock-names: Should contain "main". -- cgit v1.2.3 From c95003d895bde422e0daedab868d487dc40f84d4 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva Date: Wed, 14 Oct 2020 11:49:26 +0100 Subject: dt-bindings: fxas21002c: convert bindings to yaml Convert fxas21002c gyroscope sensor bindings documentation to yaml schema, remove the textual bindings document and update MAINTAINERS entry. Signed-off-by: Rui Miguel Silva Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201014104926.688666-1-rmfrfs@gmail.com Signed-off-by: Jonathan Cameron --- .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 ------- .../bindings/iio/gyroscope/nxp,fxas21002c.yaml | 95 ++++++++++++++++++++++ 2 files changed, 95 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt b/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt deleted file mode 100644 index 465e104bbf14..000000000000 --- a/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt +++ /dev/null @@ -1,31 +0,0 @@ -* NXP FXAS21002C Gyroscope device tree bindings - -http://www.nxp.com/products/sensors/gyroscopes/3-axis-digital-gyroscope:FXAS21002C - -Required properties: - - compatible : should be "nxp,fxas21002c" - - reg : the I2C address of the sensor or SPI chip select number for the - device. - - vdd-supply: phandle to the regulator that provides power to the sensor. - - vddio-supply: phandle to the regulator that provides power to the bus. - -Optional properties: - - reset-gpios : gpio used to reset the device, see gpio/gpio.txt - - interrupts : device support 2 interrupts, INT1 and INT2, - the interrupts can be triggered on rising or falling edges. - See interrupt-controller/interrupts.txt - - interrupt-names: should contain "INT1" or "INT2", the gyroscope interrupt - line in use. - - drive-open-drain: the interrupt/data ready line will be configured - as open drain, which is useful if several sensors share - the same interrupt line. This is a boolean property. - (This binding is taken from pinctrl/pinctrl-bindings.txt) - -Example: - -gyroscope@20 { - compatible = "nxp,fxas21002c"; - reg = <0x20>; - vdd-supply = <®_peri_3p15v>; - vddio-supply = <®_peri_3p15v>; -}; diff --git a/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml b/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml new file mode 100644 index 000000000000..d97ee774d6a6 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/gyroscope/nxp,fxas21002c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP FXAS21002C Gyroscope + +maintainers: + - Rui Miguel Silva + +description: | + 3 axis digital gyroscope device with an I2C and SPI interface. + http://www.nxp.com/products/sensors/gyroscopes/3-axis-digital-gyroscope:FXAS21002C + +properties: + compatible: + const: nxp,fxas21002c + + reg: + maxItems: 1 + + vdd-supply: + description: Regulator that provides power to the sensor + + vddio-supply: + description: Regulator that provides power to the bus + + reset-gpios: + maxItems: 1 + description: GPIO connected to reset + + interrupts: + minItems: 1 + maxItems: 2 + description: Either interrupt may be triggered on rising or falling edges. + + interrupt-names: + minItems: 1 + maxItems: 2 + items: + enum: + - INT1 + - INT2 + + drive-open-drain: + type: boolean + description: the interrupt/data ready line will be configured as open drain, + which is useful if several sensors share the same interrupt + line. + + spi-max-frequency: + maximum: 2000000 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + gyroscope@20 { + compatible = "nxp,fxas21002c"; + reg = <0x20>; + + vdd-supply = <®_peri_3p15v>; + vddio-supply = <®_peri_3p15v>; + + interrupt-parent = <&gpio1>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "INT1"; + }; + }; + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + gyroscope@0 { + compatible = "nxp,fxas2102c"; + reg = <0x0>; + + spi-max-frequency = <2000000>; + + interrupt-parent = <&gpio2>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "INT2"; + }; + }; -- cgit v1.2.3 From 675cb4ad1b9e431800bf2ffc49547ca048670257 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sun, 9 Aug 2020 12:17:47 +0100 Subject: dt-bindings: iio: adc: ti,adc084s021 yaml conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Rob Herring Cc: Mårten Lindahl Link: https://lore.kernel.org/r/20200809111753.156236-8-jic23@kernel.org --- .../devicetree/bindings/iio/adc/ti,adc084s021.yaml | 58 ++++++++++++++++++++++ .../devicetree/bindings/iio/adc/ti-adc084s021.txt | 19 ------- 2 files changed, 58 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml new file mode 100644 index 000000000000..1a113b30a414 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml @@ -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 + +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>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt deleted file mode 100644 index 4259e50620bc..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/ti-adc084s021.txt +++ /dev/null @@ -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>; -}; -- cgit v1.2.3 From 3079188f821cfbdbb0b12f668335931a87eb14c6 Mon Sep 17 00:00:00 2001 From: Cristian Pop Date: Mon, 28 Sep 2020 12:09:56 +0300 Subject: iio:Documentation: Add documentation for label channel attribute If a label is defined for this channel add that to the channel specific attributes. This is useful for userspace to be able to identify an individual channel. Signed-off-by: Cristian Pop Link: https://lore.kernel.org/r/20200928090959.88842-2-cristian.pop@analog.com Signed-off-by: Jonathan Cameron --- Documentation/ABI/testing/sysfs-bus-iio | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation') diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index a9d51810a3ba..4a72ee43dee8 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1715,6 +1715,16 @@ Description: Raw counter device counters direction for channel Y. +What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_label +What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_label +KernelVersion: 5.8 +Contact: linux-iio@vger.kernel.org +Description: + Optional symbolic label to a device channel. + If a label is defined for this channel add that to the channel + specific attributes. This is useful for userspace to be able to + better identify an individual channel. + What: /sys/bus/iio/devices/iio:deviceX/in_phaseY_raw KernelVersion: 4.18 Contact: linux-iio@vger.kernel.org -- cgit v1.2.3 From 7d4156ddf1b838b100a037d02d4bf15ccb3ccd26 Mon Sep 17 00:00:00 2001 From: Cristian Pop Date: Mon, 28 Sep 2020 12:09:58 +0300 Subject: dt-bindings:iio:adc:adi,ad7768-1: Add documentation for channel label Optional attribute for better identification of the channels. Signed-off-by: Cristian Pop Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200928090959.88842-4-cristian.pop@analog.com Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/adc/adi,ad7768-1.yaml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml index d3733ad8785a..6be43bf5c1e0 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml @@ -29,6 +29,12 @@ properties: interrupts: maxItems: 1 + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + vref-supply: description: ADC reference voltage supply @@ -61,6 +67,24 @@ required: - spi-cpha - adi,sync-in-gpios +patternProperties: + "^channel@([0-9]|1[0-5])$": + type: object + description: | + Represents the external channels which are connected to the device. + + properties: + reg: + description: | + The channel number. + + label: + description: | + Unique name to identify which channel this is. + required: + - reg + additionalProperties: false + additionalProperties: false examples: @@ -84,6 +108,14 @@ examples: reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; clocks = <&ad7768_mclk>; clock-names = "mclk"; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + label = "channel_0"; + }; }; }; ... -- cgit v1.2.3 From 7f79711533a96b02e1e24e2e36a29b08734e36e2 Mon Sep 17 00:00:00 2001 From: Cristian Pop Date: Mon, 28 Sep 2020 12:09:59 +0300 Subject: dt-bindings:iio:adc:adc.txt: Add documentation for channel label attribute Optional attribute for better identification of the channels. Signed-off-by: Cristian Pop Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200928090959.88842-5-cristian.pop@analog.com Signed-off-by: Jonathan Cameron --- Documentation/devicetree/bindings/iio/adc/adc.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/adc.txt b/Documentation/devicetree/bindings/iio/adc/adc.txt index 5bbaa330a250..4b37575bbddc 100644 --- a/Documentation/devicetree/bindings/iio/adc/adc.txt +++ b/Documentation/devicetree/bindings/iio/adc/adc.txt @@ -5,18 +5,24 @@ Optional properties for child nodes: - diff-channels : Differential channels muxed for this ADC. The first value specifies the positive input pin, the second value the negative input pin. +- reg: The channel number. +- label: Unique name to identify which channel this is. Example: adc@0 { compatible = "some,adc"; ... channel@0 { + reg = <0>; + label = "channel_0_name"; bipolar; diff-channels = <0 1>; ... }; channel@1 { + reg = <1>; + label = "channel_1_name"; diff-channels = <2 3>; ... }; -- cgit v1.2.3 From 396cd5092caf8daaa72139c81f16d4aa1ecd560d Mon Sep 17 00:00:00 2001 From: Gene Chen Date: Tue, 20 Oct 2020 16:07:45 +0800 Subject: dt-bindings: iio: adc: add bindings doc for MT6360 ADC This change adds the binding doc for the MT6360 ADC. Signed-off-by: Gene Chen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1603181267-15610-2-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Jonathan Cameron --- .../bindings/iio/adc/mediatek,mt6360-adc.yaml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,mt6360-adc.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt6360-adc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6360-adc.yaml new file mode 100644 index 000000000000..db4e3613c104 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6360-adc.yaml @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/mediatek,mt6360-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek MT6360 and similar ADCs + +maintainers: + - Gene Chen + +properties: + compatible: + const: mediatek,mt6360-adc + + "#io-channel-cells": + const: 1 + +required: + - compatible + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + adc { + compatible = "mediatek,mt6360-adc"; + #io-channel-cells = <1>; + }; +... -- cgit v1.2.3 From d4686c52a20b51f539d8a5d09807441af490602b Mon Sep 17 00:00:00 2001 From: Gene Chen Date: Tue, 20 Oct 2020 16:07:46 +0800 Subject: Documentation: ABI: testing: mt6360: Add ADC sysfs guideline Add ABI documentation for mt6360 ADC sysfs interfaces. Signed-off-by: Gene Chen Link: https://lore.kernel.org/r/1603181267-15610-3-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Jonathan Cameron --- Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 (limited to 'Documentation') diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 b/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 new file mode 100644 index 000000000000..e5a7b1c7cca3 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 @@ -0,0 +1,78 @@ +What: /sys/bus/iio/devices/iio:deviceX/in_voltage0_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 USBID ADC which connected to connector ID pin. + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_voltage1_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 VBUS ADC with lower accuracy(+-75mA) + higher measure range(1~22mV) + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_voltage2_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 VBUS ADC with higher accuracy(+-30mA) + lower measure range(1~9.76V) + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_voltage3_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 VSYS ADC + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_voltage4_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 VBAT ADC + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_current5_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 IBUS ADC + Calculating with scale and offset returns voltage in uA + +What: /sys/bus/iio/devices/iio:deviceX/in_current6_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 IBAT ADC + Calculating with scale and offset returns voltage in uA + +What: /sys/bus/iio/devices/iio:deviceX/in_current7_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 CHG_VDDP ADC + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_temp8_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 IC junction temperature + Calculating with scale and offset returns temperature in degree + +What: /sys/bus/iio/devices/iio:deviceX/in_voltage9_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 VREF_TS ADC + Calculating with scale and offset returns voltage in uV + +What: /sys/bus/iio/devices/iio:deviceX/in_voltage10_raw +KernelVersion: 5.8.0 +Contact: gene_chen@richtek.com +Description: + Indicated MT6360 TS ADC + Calculating with scale and offset returns voltage in uV -- cgit v1.2.3 From 126df08e54b183fe921f14e811507d6e2b54e042 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:42 +0000 Subject: dt-bindings:iio:humidity:hdc100x Drop separate doc + add to trivial-devices Very simple binding for this i2c device with no properties beyond reg and compatible. Hence doesn't need it's own document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031134110.724233-2-jic23@kernel.org --- .../devicetree/bindings/iio/humidity/hdc100x.txt | 17 ----------------- Documentation/devicetree/bindings/trivial-devices.yaml | 10 ++++++++++ 2 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/humidity/hdc100x.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/humidity/hdc100x.txt b/Documentation/devicetree/bindings/iio/humidity/hdc100x.txt deleted file mode 100644 index c52333bdfd19..000000000000 --- a/Documentation/devicetree/bindings/iio/humidity/hdc100x.txt +++ /dev/null @@ -1,17 +0,0 @@ -* HDC100x temperature + humidity sensors - -Required properties: - - compatible: Should contain one of the following: - ti,hdc1000 - ti,hdc1008 - ti,hdc1010 - ti,hdc1050 - ti,hdc1080 - - reg: i2c address of the sensor - -Example: - -hdc100x@40 { - compatible = "ti,hdc1000"; - reg = <0x40>; -}; diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 25cfcc904240..9f8531d4d33e 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -352,6 +352,16 @@ properties: - ti,ads7830 # Temperature Monitoring and Fan Control - ti,amc6821 + # Temperature and humidity sensor with i2c interface + - ti,hdc1000 + # Temperature and humidity sensor with i2c interface + - ti,hdc1008 + # Temperature and humidity sensor with i2c interface + - ti,hdc1010 + # Temperature and humidity sensor with i2c interface + - ti,hdc1050 + # Temperature and humidity sensor with i2c interface + - ti,hdc1080 # Temperature sensor with 2-wire interface - ti,lm73 # Temperature sensor with integrated fan control -- cgit v1.2.3 From 3c055f31ac69c7bd6dfc864ab9c0d1331fe26ae5 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:43 +0000 Subject: dt-bindings:iio:humidity:htu21 Drop separate doc + add to trivial-devices Very simple binding for this i2c device with no properties beyond reg and compatible. Hence doesn't need it's own document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-3-jic23@kernel.org --- Documentation/devicetree/bindings/iio/humidity/htu21.txt | 13 ------------- Documentation/devicetree/bindings/trivial-devices.yaml | 4 ++++ 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/humidity/htu21.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/humidity/htu21.txt b/Documentation/devicetree/bindings/iio/humidity/htu21.txt deleted file mode 100644 index 97d79636f7ae..000000000000 --- a/Documentation/devicetree/bindings/iio/humidity/htu21.txt +++ /dev/null @@ -1,13 +0,0 @@ -*HTU21 - Measurement-Specialties htu21 temperature & humidity sensor and humidity part of MS8607 sensor - -Required properties: - - - compatible: should be "meas,htu21" or "meas,ms8607-humidity" - - reg: I2C address of the sensor - -Example: - -htu21@40 { - compatible = "meas,htu21"; - reg = <0x40>; -}; diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 9f8531d4d33e..49c67a6a1332 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -128,6 +128,10 @@ properties: - mcube,mc3230 # MEMSIC 2-axis 8-bit digital accelerometer - memsic,mxc6225 + # Measurement Specialities I2C temperature and humidity sensor + - meas,htu21 + # Measurement Specialities temp and humidity part of ms8607 device + - meas,ms8607-humidity # Microchip differential I2C ADC, 1 Channel, 18 bit - microchip,mcp3421 # Microchip differential I2C ADC, 2 Channel, 18 bit -- cgit v1.2.3 From 9a6ac3138258393225621c711f62c7e6ff639b78 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:44 +0000 Subject: dt-bindings:iio:humidity:st,hts221 yaml conversion. Straight forward conversion of this temperature and pressure sensor binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20201031134110.724233-4-jic23@kernel.org --- .../devicetree/bindings/iio/humidity/hts221.txt | 30 ------------- .../bindings/iio/humidity/st,hts221.yaml | 52 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 30 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/humidity/hts221.txt create mode 100644 Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/humidity/hts221.txt b/Documentation/devicetree/bindings/iio/humidity/hts221.txt deleted file mode 100644 index 84d029372260..000000000000 --- a/Documentation/devicetree/bindings/iio/humidity/hts221.txt +++ /dev/null @@ -1,30 +0,0 @@ -* HTS221 STM humidity + temperature sensor - -Required properties: -- compatible: should be "st,hts221" -- reg: i2c address of the sensor / spi cs line - -Optional properties: -- drive-open-drain: the interrupt/data ready line will be configured - as open drain, which is useful if several sensors share the same - interrupt line. This is a boolean property. - If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or - IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line - when it is not active, whereas a pull-up one is needed when interrupt - line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING. - Refer to pinctrl/pinctrl-bindings.txt for the property description. -- interrupts: interrupt mapping for IRQ. It should be configured with - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or - IRQ_TYPE_EDGE_FALLING. - - Refer to interrupt-controller/interrupts.txt for generic interrupt - client node bindings. - -Example: - -hts221@5f { - compatible = "st,hts221"; - reg = <0x5f>; - interrupt-parent = <&gpio0>; - interrupts = <0 IRQ_TYPE_EDGE_RISING>; -}; diff --git a/Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml b/Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml new file mode 100644 index 000000000000..396451c26728 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/humidity/st,hts221.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HTS221 STM humidity + temperature sensor + +maintainers: + - Lorenzo Bianconi + +description: | + Humidity and temperature sensor with I2C interface and data ready + interrupt. + +properties: + compatible: + const: st,hts221 + + reg: + maxItems: 1 + + drive-open-drain: + type: boolean + description: + The interrupt/data ready line will be configured as open drain, which + is useful if several sensors share the same interrupt line. + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hts221@5f { + compatible = "st,hts221"; + reg = <0x5f>; + interrupt-parent = <&gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; + }; + }; +... -- cgit v1.2.3 From 4dd49a1b9b9f801b4a479681987bc5c9eb61bd90 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:45 +0000 Subject: dt-bindings:iio:humidity:dht11 yaml conversion The conversion is straight forward, but leaves an open question. The compatible for this device has never had a vendor. Harald Geyer has identified as probably being made by aosong, but we have no current match to any of their more specific part numbers. As such, this is noted in the file but the compatible doesn't include the vendor prefix. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-By: Harald Geyer Link: https://lore.kernel.org/r/20201031134110.724233-5-jic23@kernel.org --- .../devicetree/bindings/iio/humidity/dht11.txt | 14 -------- .../devicetree/bindings/iio/humidity/dht11.yaml | 41 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/humidity/dht11.txt create mode 100644 Documentation/devicetree/bindings/iio/humidity/dht11.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/humidity/dht11.txt b/Documentation/devicetree/bindings/iio/humidity/dht11.txt deleted file mode 100644 index ecc24c199fd6..000000000000 --- a/Documentation/devicetree/bindings/iio/humidity/dht11.txt +++ /dev/null @@ -1,14 +0,0 @@ -* DHT11 humidity/temperature sensor (and compatibles like DHT22) - -Required properties: - - compatible: Should be "dht11" - - gpios: Should specify the GPIO connected to the sensor's data - line, see "gpios property" in - Documentation/devicetree/bindings/gpio/gpio.txt. - -Example: - -humidity_sensor { - compatible = "dht11"; - gpios = <&gpio0 6 0>; -} diff --git a/Documentation/devicetree/bindings/iio/humidity/dht11.yaml b/Documentation/devicetree/bindings/iio/humidity/dht11.yaml new file mode 100644 index 000000000000..2247481d0203 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/humidity/dht11.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/humidity/dht11.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: DHT11 humidity + temperature sensor + +maintainers: + - Harald Geyer + +description: | + A simple and low cost module providing a non standard single GPIO based + interface. It is believed the part is made by aosong but don't have + absolute confirmation of this, or what the aosong part number is. + +properties: + compatible: + const: dht11 + + reg: + maxItems: 1 + + gpios: + maxItems: 1 + description: + Single, interrupt capable, GPIO used to communicate with the device. + +required: + - compatible + - gpios + +additionalProperties: false + +examples: + - | + humidity_sensor { + compatible = "dht11"; + gpios = <&gpio0 6 0>; + }; +... -- cgit v1.2.3 From 88b448502381fd1e8e30789640f470abb32c669e Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:46 +0000 Subject: dt-bindings:iio:pressure:ms5637 Drop separate doc + add to trivial-devices Very simple binding for this i2c device with no properties beyond reg and compatible. Hence doesn't need it's own document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-6-jic23@kernel.org --- .../devicetree/bindings/iio/pressure/ms5637.txt | 17 ----------------- Documentation/devicetree/bindings/trivial-devices.yaml | 8 ++++++++ 2 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/pressure/ms5637.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/pressure/ms5637.txt b/Documentation/devicetree/bindings/iio/pressure/ms5637.txt deleted file mode 100644 index 1f43ffa068ac..000000000000 --- a/Documentation/devicetree/bindings/iio/pressure/ms5637.txt +++ /dev/null @@ -1,17 +0,0 @@ -* MS5637 - Measurement-Specialties MS5637, MS5805, MS5837 and MS8607 pressure & temperature sensor - -Required properties: - - -compatible: should be one of the following - meas,ms5637 - meas,ms5805 - meas,ms5837 - meas,ms8607-temppressure - -reg: I2C address of the sensor - -Example: - -ms5637@76 { - compatible = "meas,ms5637"; - reg = <0x76>; -}; diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 49c67a6a1332..a8db256c2a93 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -130,8 +130,16 @@ properties: - memsic,mxc6225 # Measurement Specialities I2C temperature and humidity sensor - meas,htu21 + # Measurement Specialities I2C pressure and temperature sensor + - meas,ms5637 + # Measurement Specialities I2C pressure and temperature sensor + - meas,ms5805 + # Measurement Specialities I2C pressure and temperature sensor + - meas,ms5837 # Measurement Specialities temp and humidity part of ms8607 device - meas,ms8607-humidity + # Measurement Specialities temp and pressure part of ms8607 device + - meas,ms8607-temppressure # Microchip differential I2C ADC, 1 Channel, 18 bit - microchip,mcp3421 # Microchip differential I2C ADC, 2 Channel, 18 bit -- cgit v1.2.3 From 1cf4ad3f609b86044974110ee38d4956f404c409 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:47 +0000 Subject: dt-bindings:iio:pressure:murata,zpa2326 yaml conversion Simple conversion with a few minor tweaks: * I added 1MHz max for spi-max-frequency * I have give myself as the maintainer. This driver was written by Gregor Boirie but I don't have an up to date email address for Gregor. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-7-jic23@kernel.org --- .../bindings/iio/pressure/murata,zpa2326.yaml | 62 ++++++++++++++++++++++ .../devicetree/bindings/iio/pressure/zpa2326.txt | 29 ---------- 2 files changed, 62 insertions(+), 29 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/pressure/murata,zpa2326.yaml delete mode 100644 Documentation/devicetree/bindings/iio/pressure/zpa2326.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/pressure/murata,zpa2326.yaml b/Documentation/devicetree/bindings/iio/pressure/murata,zpa2326.yaml new file mode 100644 index 000000000000..d6103be03460 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/pressure/murata,zpa2326.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/pressure/murata,zpa2326.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Murata ZPA2326 pressure sensor + +maintainers: + - Jonathan Cameron + +description: | + Pressure sensor from Murata with SPI and I2C bus interfaces. + + +properties: + compatible: + const: murata,zpa2326 + + reg: + maxItems: 1 + + vdd-supply: true + vref-supply: true + + interrupts: + maxItems: 1 + + spi-max-frequency: + maximum: 1000000 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pressure@5c { + compatible = "murata,zpa2326"; + reg = <0x5c>; + interrupt-parent = <&gpio>; + interrupts = <12>; + vdd-supply = <&ldo_1v8_gnss>; + }; + }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + pressure@0 { + compatible = "murata,zpa2326"; + reg = <0>; + spi-max-frequency = <500000>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/pressure/zpa2326.txt b/Documentation/devicetree/bindings/iio/pressure/zpa2326.txt deleted file mode 100644 index a36ab3e0c3f7..000000000000 --- a/Documentation/devicetree/bindings/iio/pressure/zpa2326.txt +++ /dev/null @@ -1,29 +0,0 @@ -Murata ZPA2326 pressure sensor - -Pressure sensor from Murata with SPI and I2C bus interfaces. - -Required properties: -- compatible: "murata,zpa2326" -- reg: the I2C address or SPI chip select the device will respond to - -Recommended properties for SPI bus usage: -- spi-max-frequency: maximum SPI bus frequency as documented in - Documentation/devicetree/bindings/spi/spi-bus.txt - -Optional properties: -- vref-supply: an optional regulator that needs to be on to provide VREF - power to the sensor -- vdd-supply: an optional regulator that needs to be on to provide VDD - power to the sensor -- interrupts: interrupt mapping for IRQ as documented in - Documentation/devicetree/bindings/interrupt-controller/interrupts.txt - -Example: - -zpa2326@5c { - compatible = "murata,zpa2326"; - reg = <0x5c>; - interrupt-parent = <&gpio>; - interrupts = <12>; - vdd-supply = <&ldo_1v8_gnss>; -}; -- cgit v1.2.3 From b1b69ba70de7233d5424b11b05f585359c26c8a7 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:48 +0000 Subject: dt-bindings:iio:pressure:meas,ms5611 yaml conversion. One addition here was to put in a 20MHz maximum for the SPI bus as specified in the datasheets of both support parts. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Tomasz Duszynski Link: https://lore.kernel.org/r/20201031134110.724233-8-jic23@kernel.org --- .../bindings/iio/pressure/meas,ms5611.yaml | 57 ++++++++++++++++++++++ .../devicetree/bindings/iio/pressure/ms5611.txt | 19 -------- 2 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml delete mode 100644 Documentation/devicetree/bindings/iio/pressure/ms5611.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml new file mode 100644 index 000000000000..4f06707450bf --- /dev/null +++ b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/pressure/meas,ms5611.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Measurement Specialities ms5611 and similar pressure sensors + +maintainers: + - Tomasz Duszynski + +description: | + Pressure sensors from MEAS Switzerland with SPI and I2C bus interfaces. + +properties: + compatible: + enum: + - meas,ms5607 + - meas,ms5611 + + reg: + maxItems: 1 + + vdd-supply: true + + spi-max-frequency: + maximum: 20000000 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pressure@77 { + compatible = "meas,ms5607"; + reg = <0x77>; + vdd-supply = <&ldo_3v3_gnss>; + }; + }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + pressure@0 { + compatible = "meas,ms5611"; + reg = <0>; + vdd-supply = <&ldo_3v3_gnss>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/pressure/ms5611.txt b/Documentation/devicetree/bindings/iio/pressure/ms5611.txt deleted file mode 100644 index 17bca866c084..000000000000 --- a/Documentation/devicetree/bindings/iio/pressure/ms5611.txt +++ /dev/null @@ -1,19 +0,0 @@ -MEAS ms5611 family pressure sensors - -Pressure sensors from MEAS Switzerland with SPI and I2C bus interfaces. - -Required properties: -- compatible: "meas,ms5611" or "meas,ms5607" -- reg: the I2C address or SPI chip select the device will respond to - -Optional properties: -- vdd-supply: an optional regulator that needs to be on to provide VDD - power to the sensor. - -Example: - -ms5607@77 { - compatible = "meas,ms5607"; - reg = <0x77>; - vdd-supply = <&ldo_3v3_gnss>; -}; -- cgit v1.2.3 From 1517c6a30c0d16a80e5955ef058a2978331e5bdc Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:49 +0000 Subject: dt-bindings:iio:pressure:hoperf,hp03 yaml conversion One quirk in the txt file was that the xclr gpio was specified as xclr-gpio rather than xclr-gpios. I've fixed that in the yaml version. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Marek Vasut Link: https://lore.kernel.org/r/20201031134110.724233-9-jic23@kernel.org --- .../bindings/iio/pressure/hoperf,hp03.yaml | 47 ++++++++++++++++++++++ .../devicetree/bindings/iio/pressure/hp03.txt | 17 -------- 2 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/pressure/hoperf,hp03.yaml delete mode 100644 Documentation/devicetree/bindings/iio/pressure/hp03.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/pressure/hoperf,hp03.yaml b/Documentation/devicetree/bindings/iio/pressure/hoperf,hp03.yaml new file mode 100644 index 000000000000..69a3759e23db --- /dev/null +++ b/Documentation/devicetree/bindings/iio/pressure/hoperf,hp03.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/pressure/hoperf,hp03.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HopeRF HP03 digital pressure/temperature sensors + +maintainers: + - Marek Vasut + +description: | + Digital pressure and temperature sensor with an I2C interface. + +properties: + compatible: + const: hoperf,hp03 + + reg: + maxItems: 1 + + xclr-gpios: + description: + The XCLR pin is a reset of the ADC in the chip, it must be pulled + HI before the conversion and readout of the value from the ADC + registers and pulled LO afterward. + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pressure@77 { + compatible = "hoperf,hp03"; + reg = <0x77>; + xclr-gpios = <&portc 0 0x0>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/pressure/hp03.txt b/Documentation/devicetree/bindings/iio/pressure/hp03.txt deleted file mode 100644 index 831dbee7a5c3..000000000000 --- a/Documentation/devicetree/bindings/iio/pressure/hp03.txt +++ /dev/null @@ -1,17 +0,0 @@ -HopeRF HP03 digital pressure/temperature sensors - -Required properties: -- compatible: must be "hoperf,hp03" -- xclr-gpio: must be device tree identifier of the XCLR pin. - The XCLR pin is a reset of the ADC in the chip, - it must be pulled HI before the conversion and - readout of the value from the ADC registers and - pulled LO afterward. - -Example: - -hp03@77 { - compatible = "hoperf,hp03"; - reg = <0x77>; - xclr-gpio = <&portc 0 0x0>; -}; -- cgit v1.2.3 From 7fd5da368ed5895744372edc729d54e1a9728e40 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:50 +0000 Subject: dt-bindings:iio:proximity:semtech,sx9500 yaml conversion. Simple conversion. There hasn't been much activity around this driver for a long time and I don't think I have any up to date contact details for the original authors. As such, I've listed myself as the binding maintainer. More than happy to hand it off to someone more relevant though! Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-10-jic23@kernel.org --- .../bindings/iio/proximity/semtech,sx9500.yaml | 50 ++++++++++++++++++++++ .../devicetree/bindings/iio/proximity/sx9500.txt | 23 ---------- 2 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/proximity/semtech,sx9500.yaml delete mode 100644 Documentation/devicetree/bindings/iio/proximity/sx9500.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9500.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9500.yaml new file mode 100644 index 000000000000..66dd01506859 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9500.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9500.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Semtech's SX9500 capacitive proximity button device + +maintainers: + - Jonathan Cameron + +properties: + compatible: + const: semtech,sx9500 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + description: + GPIO connected to the active low reset pin. + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + proximity@28 { + compatible = "semtech,sx9500"; + reg = <0x28>; + interrupt-parent = <&gpio2>; + interrupts = <16 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/proximity/sx9500.txt b/Documentation/devicetree/bindings/iio/proximity/sx9500.txt deleted file mode 100644 index c54455db3bec..000000000000 --- a/Documentation/devicetree/bindings/iio/proximity/sx9500.txt +++ /dev/null @@ -1,23 +0,0 @@ -Semtech's SX9500 capacitive proximity button device driver - -Required properties: - - compatible: must be "semtech,sx9500" - - reg: i2c address where to find the device - - interrupts : the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic - interrupt client node bindings. - -Optional properties: - - reset-gpios: Reference to the GPIO connected to the device's active - low reset pin. - -Example: - -sx9500@28 { - compatible = "semtech,sx9500"; - reg = <0x28>; - interrupt-parent = <&gpio2>; - interrupts = <16 IRQ_TYPE_LEVEL_LOW>; - reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; -}; -- cgit v1.2.3 From b4be8bd1c6a20113737428fc5583aae8d45290ae Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:51 +0000 Subject: dt-bindings:iio:proximity:st,vl53l0x yaml conversion Straight forward conversion from txt to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Song Qiang Link: https://lore.kernel.org/r/20201031134110.724233-11-jic23@kernel.org --- .../bindings/iio/proximity/st,vl53l0x.yaml | 42 ++++++++++++++++++++++ .../devicetree/bindings/iio/proximity/vl53l0x.txt | 18 ---------- 2 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml delete mode 100644 Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml b/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml new file mode 100644 index 000000000000..656460d9d8c8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/proximity/st,vl53l0x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ST VL53L0X ToF ranging sensor + +maintainers: + - Song Qiang + +properties: + compatible: + const: st,vl53l0x + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + proximity@29 { + compatible = "st,vl53l0x"; + reg = <0x29>; + interrupt-parent = <&gpio>; + interrupts = <23 IRQ_TYPE_EDGE_FALLING>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt b/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt deleted file mode 100644 index dfe00eb961cd..000000000000 --- a/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt +++ /dev/null @@ -1,18 +0,0 @@ -ST VL53L0X ToF ranging sensor - -Required properties: - - compatible: must be "st,vl53l0x" - - reg: i2c address where to find the device - -Optional properties: - - interrupts: Interrupt for notifying that new measurement is ready. - If no interrupt is specified, polling is used. - -Example: - -vl53l0x@29 { - compatible = "st,vl53l0x"; - reg = <0x29>; - interrupt-parent = <&gpio>; - interrupts = <23 IRQ_TYPE_EDGE_FALLING>; -}; -- cgit v1.2.3 From d08a718742aa90f8ff496fd0916d3ce242c5421b Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:52 +0000 Subject: dt-bindings:iio:proximity:ams,as3935 yaml conversion A straight forward conversion of this binding. I have added a maximum SPI frequency from the datasheet. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031134110.724233-12-jic23@kernel.org --- .../bindings/iio/proximity/ams,as3935.yaml | 71 ++++++++++++++++++++++ .../devicetree/bindings/iio/proximity/as3935.txt | 34 ----------- 2 files changed, 71 insertions(+), 34 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml delete mode 100644 Documentation/devicetree/bindings/iio/proximity/as3935.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml b/Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml new file mode 100644 index 000000000000..7fcba5d6d508 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/proximity/ams,as3935.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Austrian Microsystems AS3935 Franklin lightning sensor + +maintainers: + - Matt Ranostay + +description: + This lightening distance sensor uses an I2C or SPI interface. The + binding currently only covers the SPI option. + +properties: + compatible: + const: ams,as3935 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 2000000 + + spi-cpha: true + + interrupts: + maxItems: 1 + + ams,tuning-capacitor-pf: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Calibration tuning capacitor stepping value. This will require using + the calibration data from the manufacturer. + minimum: 0 + maximum: 120 + + ams,nflwdth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Set the noise and watchdog threshold register on startup. This will + need to set according to the noise from the MCU board, and possibly + the local environment. Refer to the datasheet for the threshold settings. + +required: + - compatible + - reg + - spi-cpha + - interrupts + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + lightning@0 { + compatible = "ams,as3935"; + reg = <0>; + spi-max-frequency = <400000>; + spi-cpha; + interrupt-parent = <&gpio1>; + interrupts = <16 1>; + ams,tuning-capacitor-pf = <80>; + ams,nflwdth = <0x44>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/proximity/as3935.txt b/Documentation/devicetree/bindings/iio/proximity/as3935.txt deleted file mode 100644 index 849115585d55..000000000000 --- a/Documentation/devicetree/bindings/iio/proximity/as3935.txt +++ /dev/null @@ -1,34 +0,0 @@ -Austrian Microsystems AS3935 Franklin lightning sensor device driver - -Required properties: - - compatible: must be "ams,as3935" - - reg: SPI chip select number for the device - - spi-max-frequency: specifies maximum SPI clock frequency - - spi-cpha: SPI Mode 1. Refer to spi/spi-bus.txt for generic SPI - slave node bindings. - - interrupts : the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic - interrupt client node bindings. - -Optional properties: - - ams,tuning-capacitor-pf: Calibration tuning capacitor stepping - value 0 - 120pF. This will require using the calibration data from - the manufacturer. - - ams,nflwdth: Set the noise and watchdog threshold register on - startup. This will need to set according to the noise from the - MCU board, and possibly the local environment. Refer to the - datasheet for the threshold settings. - -Example: - -as3935@0 { - compatible = "ams,as3935"; - reg = <0>; - spi-max-frequency = <400000>; - spi-cpha; - interrupt-parent = <&gpio1>; - interrupts = <16 1>; - ams,tuning-capacitor-pf = <80>; - ams,nflwdth = <0x44>; -}; -- cgit v1.2.3 From 3eccfe575e00b9cdaed0600c079194b0be358ac9 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:40:53 +0000 Subject: dt-bindings:iio:dac:ti,dac5571 yaml conversion. A few tweaks in this conversion. * The example didn't have the I2C address of 4C in the node name so fixed that. * The reference voltage in the txt file is an optional binding, but the driver is making use of it to provide the scaling of the output channels. As such I have made it required going forwards. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20201031134110.724233-13-jic23@kernel.org --- .../devicetree/bindings/iio/dac/ti,dac5571.txt | 24 ---------- .../devicetree/bindings/iio/dac/ti,dac5571.yaml | 52 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/dac/ti,dac5571.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti,dac5571.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac5571.txt b/Documentation/devicetree/bindings/iio/dac/ti,dac5571.txt deleted file mode 100644 index 03af6b9a4d07..000000000000 --- a/Documentation/devicetree/bindings/iio/dac/ti,dac5571.txt +++ /dev/null @@ -1,24 +0,0 @@ -* Texas Instruments DAC5571 Family - -Required properties: - - compatible: Should contain - "ti,dac5571" - "ti,dac6571" - "ti,dac7571" - "ti,dac5574" - "ti,dac6574" - "ti,dac7574" - "ti,dac5573" - "ti,dac6573" - "ti,dac7573" - - reg: Should contain the DAC I2C address - -Optional properties: - - vref-supply: The regulator supply for DAC reference voltage - -Example: -dac@0 { - compatible = "ti,dac5571"; - reg = <0x4C>; - vref-supply = <&vdd_supply>; -}; diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac5571.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac5571.yaml new file mode 100644 index 000000000000..714191724f7c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac5571.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/ti,dac5571.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments DAC5571 Family + +maintainers: + - Sean Nyekjaer + +properties: + compatible: + enum: + - ti,dac5571 + - ti,dac6571 + - ti,dac7571 + - ti,dac5574 + - ti,dac6574 + - ti,dac7574 + - ti,dac5573 + - ti,dac6573 + - ti,dac7573 + + reg: + maxItems: 1 + + vref-supply: + description: + Reference voltage must be supplied to establish the scaling of the + output voltage. + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + dac@4c { + compatible = "ti,dac