Commit 749c1e14 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'iio-for-5.11a' of...

Merge tag 'iio-for-5.11a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new device support, features and cleanups for IIO in the 5.11 cycle

Usual mixed bag of new drivers / device support + cleanups etc with the
addition of a fairly big set of yaml conversions.

Txt to yaml format conversions.
In some cases dropped separate binding and moved to trivial devices (drop).

Listed by manufacturer
  - dht11 temperature(drop)
  - adi,ad2s90 adi,ad5272 adi,ad5592r adi,ad5758 adi,ad5933 adi,ad7303
    adi,adis16480 adi,adf4350
  - ams,as3935
  - asahi-kasei,ak8974
  - atmel,sama5d2-adc
  - avago,apds9300 avago,apds9960
  - bosch,bma180 bosch,bmc150_magn bosch,bme680 bosch,bmg180
  - brcm,iproc-static-adc
  - capella,cm36651
  - domintech,dmard06(drop)
  - fsl,mag3110 fsl,mma8452 fsl,vf610-dac
  - hoperf,hp03
  - honeywell,hmc5843
  - kionix,kxcjk1013
  - maxim,ds1803(drop) maxim,ds4424 maxim,max30100 maxim,max30102
    maxim,max31856 maxim,max31855k maxim,max44009
    maxim,max5481 maxim,max5821
  - meas,htu21(drop) meas,ms5367(drop) meas,ms5611 meas,tsys01(drop)
  - mediatek,mt2701-auxadc
  - melexis,mlx90614 melexis,mlx90632
  - memsic,mmc35240(drop)
  - microchip,mcp41010 microchip,mcp4131 microchip,mcp4725
  - murata,zap2326
  - nxp,fxas21002c nxp,lpc1850-dac
  - pni,rm3100
  - qcom,pm8018-adc qcom,spmi-iadc
  - renesas,isl29501 renesas,rcar-gyroadc
  - samsung,sensorhub-rinato
  - sensiron,sgp30
  - sentech,sx9500
  - sharp,gp2ap020a00f
  - st,hts221 st,lsm6dsx st,st-sensors(many!) st,uvis25 st,vcl53l0x st,vl6180
  - ti,adc084s021 ti,ads124s08
    ti,dac5571 ti,dac7311 ti,dac7512 ti,dac7612
    ti,hdc1000(drop) ti,palmas-gpadc ti,opt3001 ti,tmp07
  - upisemi,us51882
  - vishay,vcnl4035
  - x-powers,axp209

New device support
* adi,ad5685
  - Add support for AD5338R dual output 10-bit DAC
  - Add DT-binding doc.
* mediatek,mt6360
  - New driver for this SoC ADC with bindings and using new channel label
    support in the IIO core.
* st,lsm6dsx
  - Add support for LSM6DST

Core:
* Add "label" to device channels, provided via a new core callback. Including
  DT docs for when that is the source, and ABI docs.
* Add devm_iio_triggered_buffer_setup_ext to take extra attributes.
* dmaengine, unwrap use of iio_buffer_set_attrs()
* Drop iio_buffer_set_attrs()
* Centralize ioctl call handling. Later fix to ensure -EINVAL returned if
  no handler has run.
* Fix an issue with IIO_VAL_FRACTIONAL and negative values - doesn't affect
  any known existing drivers, but will impact a future one.
* kernel-doc fix in trigger.h
* file-ops ordering cleanup

Features
* semtech,sx9310
  - Add control of hardware gain, proximity thresholds, hysteresis and
    debounce.
  - Increase what information on hardware configuration can be provided
    via DT.

Cleanup and minor features
* adi,ad5685
  - Add of_match_table
* adi,ad7292
  - Drop pointless spi_set_drvdata() call
* adi,ad7298
  - Drop platform data and tidy up external reference config.
* adi,ad7303
  - Drop platform data handling as unused.
* adi,ad7768
  - Add new label attribute for channels provided from dt.
* adi,ad7887
  - devm_ usage in probe simplifying remove and error handling.
* adi,adis16201
  - Drop pointless spi_set_drvdata() call
* adi,adis16209
  - Drop pointless spi_set_drvdata() call
* adi,adis16240
  - White space fixup
* adi,adxl372
  - use new devm_iio_triggered-buffer_setup_ext()
* amlogic,meson-saradc
  - Drop pointless semicolon.
* amstaos,tsl2563
  - Put back i2c_device_id table as needed for greybus probing.
* atmel,at91_adc
  - Use of_device_get_match_data() instead of open coding it.
  - Constify some driver data
  - Add KCONFIG dep on CONFIG_OF and drop of_match_ptr()
  - Drop platform data as mostly dead code.
  - Tidy up reference voltage logic
* atmel-sama5d2
  - Drop a pointless semicolon
  - Merge buffer and trigger init into a separate function
  - Use new devm_iio_triggered_buff_setup_ext()
* avago,apds9960
  - Drop a pointless semicolon
* bosch,bmc150
  - Drop a pointless semicolon
  - Use new iio_triggered_buffer_setup_ext()
* bosch,bmp280
  - Drop a pointless semicolon
* fsl,mma8452
  - Constification
* (google),cros_ec
  - Use new devm_iio_triggered_buffer_setup_ext()
* hid-sensors
  - Use new iio_triggered_buffer_setup_ext()
* ingenic,adc
  - Drop a pointless semicolon
* invensense,icm426xx
  - Fix MAINTAINERS entry missing :
* mediatek,mt6577_audxac
  - Add binding doc for mt8516 compatible with mt8173
* motorola,cpcap-adc
  - Fix an implicit fallthrough marking that clang needs to avoid warning.
* samsung,exynos-adc
  - Stop relying on users counter form input device in ISR.
* st,lsm6dsx
  - add vdd and vddio regulator control (including binding update)
* st,stm32-adc
  - Tidy up code for dma transfers.
  - Adapt clock duty cycle for proper functioning. Note no known problems
    with existing boards.
* st,vl53l0x-i2c
  - Put back i2c_device_id table as needed for greybus probing.
* vishay,vcnl4035
  - Put back i2c_device_id table as needed for greybus probing.

* tag 'iio-for-5.11a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (126 commits)
  dt-bindings:iio:adc:x-powers,axp209-adc: txt to yaml conversion
  dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.
  dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion
  dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.
  dt-bindings:iio:magnetometer:honeywell,hmc5843: txt to yaml format conversion
  dt-bindings:iio:magnetometer:bosch,bmc150_magn: txt to yaml conversion.
  dt-bindings:iio:magnetometer:asahi-kasei,ak8974: txt to yaml format conversion
  dt-bindings:iio:magnetometer:fsl,mag3110: txt to yaml conversion
  dt-bindings:iio:light:st,vl6180: txt to yaml format conversion.
  dt-bindings:iio:light:vishay,vcnl4035: txt to yaml conversion
  dt-bindings:iio:light:st,uvis25: txt to yaml conversion for this UV sensor
  dt-bindings:iio:light:upisemi,us51882: txt to yaml conversion.
  dt-bindings:iio:light:ti,opt3001: txt to yaml conversion
  dt-bindings:iio:light:maxim,max44009: txt to yaml conversion.
  dt-bindings:iio:light:sharp,gp2ap020a00f: txt to yaml conversion.
  dt-bindings:iio:light:capella,cm36651: txt to yaml conversion.
  dt-bindings:iio:light:avago,apds9960: txt to yaml conversion
  dt-bindings:iio:light:avago,apds9300: txt to yaml conversion.
  dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion
  dt-bindings:iio:imu:adi,adis16480: txt to yaml conversion
  ...
parents f65b243d 16be06aa
......@@ -1743,6 +1743,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
......
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
Device tree bindings for Domintech DMARD05, DMARD06, DMARD07 accelerometers
Required properties:
- compatible : Should be "domintech,dmard05"
or "domintech,dmard06"
or "domintech,dmard07"
- reg : I2C address of the chip. Should be 0x1c
Example:
&i2c1 {
/* ... */
accelerometer@1c {
compatible = "domintech,dmard06";
reg = <0x1c>;
};
/* ... */
};
......@@ -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>;
...
};
......
......@@ -29,6 +29,12 @@ properties:
interrupts:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
vref-supply:
description:
ADC reference voltage supply
......@@ -62,6 +68,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:
......@@ -85,6 +109,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";
};
};
};
...
* AT91 SAMA5D2 Analog to Digital Converter (ADC)
Required properties:
- compatible: Should be "atmel,sama5d2-adc" or "microchip,sam9x60-adc".
- reg: Should contain ADC registers location and length.
- interrupts: Should contain the IRQ line for the ADC.
- clocks: phandle to device clock.
- clock-names: Must be "adc_clk".
- vref-supply: Supply used as reference for conversions.
- vddana-supply: Supply for the adc device.
- atmel,min-sample-rate-hz: Minimum sampling rate, it depends on SoC.
- atmel,max-sample-rate-hz: Maximum sampling rate, it depends on SoC.
- atmel,startup-time-ms: Startup time expressed in ms, it depends on SoC.
- atmel,trigger-edge-type: One of possible edge types for the ADTRG hardware
trigger pin. When the specific edge type is detected, the conversion will
start. Possible values are rising, falling, or both.
This property uses the IRQ edge types values: IRQ_TYPE_EDGE_RISING ,
IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH
Optional properties:
- dmas: Phandle to dma channel for the ADC.
- dma-names: Must be "rx" when dmas property is being used.
See ../../dma/dma.txt for details.
- #io-channel-cells: in case consumer drivers are attached, this must be 1.
See <Documentation/devicetree/bindings/iio/iio-bindings.txt> for details.
Properties for consumer drivers:
- Consumer drivers can be connected to this producer device, as specified
in <Documentation/devicetree/bindings/iio/iio-bindings.txt>
- Channels exposed are specified in:
<dt-bindings/iio/adc/at91-sama5d2_adc.txt>
Example:
adc: adc@fc030000 {
compatible = "atmel,sama5d2-adc";
reg = <0xfc030000 0x100>;
interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&adc_clk>;
clock-names = "adc_clk";
atmel,min-sample-rate-hz = <200000>;
atmel,max-sample-rate-hz = <20000000>;
atmel,startup-time-ms = <4>;
vddana-supply = <&vdd_3v3_lp_reg>;
vref-supply = <&vdd_3v3_lp_reg>;
atmel,trigger-edge-type = <IRQ_TYPE_EDGE_BOTH>;
dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>;
dma-names = "rx";
#io-channel-cells = <1>;
}
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/atmel,sama5d2-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AT91 SAMA5D2 Analog to Digital Converter (ADC)
maintainers:
- Ludovic Desroches <ludovic.desroches@atmel.com>
- Eugen Hristev <eugen.hristev@microchip.com>
properties:
compatible:
enum:
- atmel,sama5d2-adc
- microchip,sam9x60-adc
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: adc_clk
vref-supply: true
vddana-supply: true
atmel,min-sample-rate-hz:
description: Minimum sampling rate, it depends on SoC.
atmel,max-sample-rate-hz:
description: Maximum sampling rate, it depends on SoC.
atmel,startup-time-ms:
description: Startup time expressed in ms, it depends on SoC.
atmel,trigger-edge-type:
$ref: '/schemas/types.yaml#/definitions/uint32'
description:
One of possible edge types for the ADTRG hardware trigger pin.
When the specific edge type is detected, the conversion will
start. Should be one of IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING
or IRQ_TYPE_EDGE_BOTH.
enum: [1, 2, 3]
dmas:
maxItems: 1
dma-names:
const: rx
"#io-channel-cells":
const: 1
additionalProperties: false
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- vref-supply
- vddana-supply
- atmel,min-sample-rate-hz
- atmel,max-sample-rate-hz
- atmel,startup-time-ms
- atmel,trigger-edge-type
examples:
- |
#include <dt-bindings/dma/at91.h>
#include <dt-bindings/interrupt-controller/irq.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
adc@fc030000 {
compatible = "atmel,sama5d2-adc";
reg = <0xfc030000 0x100>;
interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&adc_clk>;
clock-names = "adc_clk";
atmel,min-sample-rate-hz = <200000>;
atmel,max-sample-rate-hz = <20000000>;
atmel,startup-time-ms = <4>;
vddana-supply = <&vdd_3v3_lp_reg>;
vref-supply = <&vdd_3v3_lp_reg>;
atmel,trigger-edge-type = <IRQ_TYPE_EDGE_BOTH>;
dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>;
dma-names = "rx";
#io-channel-cells = <1>;
};
};
...
* X-Powers AXP ADC bindings
Required properties:
- compatible: should be one of:
- "x-powers,axp209-adc",
- "x-powers,axp221-adc",
- "x-powers,axp813-adc",
- #io-channel-cells: should be 1,
Example:
&axp22x {
adc {
compatible = "x-powers,axp221-adc";
#io-channel-cells = <1>;
};
};
ADC channels and their indexes per variant:
AXP209
------
0 | acin_v
1 | acin_i
2 | vbus_v
3 | vbus_i
4 | pmic_temp
5 | gpio0_v
6 | gpio1_v
7 | ipsout_v
8 | batt_v
9 | batt_chrg_i
10 | batt_dischrg_i
AXP22x
------
0 | pmic_temp
1 | batt_v
2 | batt_chrg_i
3 | batt_dischrg_i
AXP813
------
0 | pmic_temp
1 | gpio0_v
2 | batt_v
3 | batt_chrg_i
4 | batt_dischrg_i
# 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 <gene_chen@richtek.com>
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>;
};
...
......@@ -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".
......
* Renesas R-Car GyroADC device driver
The GyroADC block is a reduced SPI block with up to 8 chipselect lines,
which supports the SPI protocol of a selected few SPI ADCs. The SPI ADCs
are sampled by the GyroADC block in a round-robin fashion and the result
presented in the GyroADC registers.
Required properties:
- compatible: Should be "<soc-specific>", "renesas,rcar-gyroadc".
The <soc-specific> should be one of:
renesas,r8a7791-gyroadc - for the GyroADC block present
in r8a7791 SoC
renesas,r8a7792-gyroadc - for the GyroADC with interrupt
block present in r8a7792 SoC
- reg: Address and length of the register set for the device
- clocks: References to all the clocks specified in the clock-names
property as specified in
Documentation/devicetree/bindings/clock/clock-bindings.txt.
- clock-names: Shall contain "fck". The "fck" is the GyroADC block clock.
- power-domains: Must contain a reference to the PM domain, if available.
- #address-cells: Should be <1> (setting for the subnodes) for all ADCs
except for "fujitsu,mb88101a". Should be <0> (setting for
only subnode) for "fujitsu,mb88101a".
- #size-cells: Should be <0> (setting for the subnodes)
Sub-nodes:
You must define subnode(s) which select the connected ADC type and reference
voltage for the GyroADC channels.
Required properties for subnodes:
- compatible: Should be either of:
"fujitsu,mb88101a"
- Fujitsu MB88101A compatible mode,
12bit sampling, up to 4 channels can be sampled in
round-robin fashion. One Fujitsu chip supplies four
GyroADC channels with data as it contains four ADCs
on the chip and thus for 4-channel operation, single
MB88101A is required. The Cx chipselect lines of the
MB88101A connect directly to two CHS lines of the
GyroADC, no demuxer is required. The data out line
of each MB88101A connects to a shared input pin of
the GyroADC.
"ti,adcs7476" or "ti,adc121" or "adi,ad7476"
- TI ADCS7476 / TI ADC121 / ADI AD7476 compatible mode,
15bit sampling, up to 8 channels can be sampled in
round-robin fashion. One TI/ADI chip supplies single
ADC channel with data, thus for 8-channel operation,
8 chips are required. A 3:8 chipselect demuxer is
required to connect the nCS line of the TI/ADI chips
to the GyroADC, while MISO line of each TI/ADI ADC
connects to a shared input pin of the GyroADC.
"maxim,max1162" or "maxim,max11100"
- Maxim MAX1162 / Maxim MAX11100 compatible mode,
16bit sampling, up to 8 channels can be sampled in
round-robin fashion. One Maxim chip supplies single
ADC channel with data, thus for 8-channel operation,
8 chips are required. A 3:8 chipselect demuxer is
required to connect the nCS line of the MAX chips
to the GyroADC, while MISO line of each Maxim ADC
connects to a shared input pin of the GyroADC.
- reg: Should be the number of the analog input. Should be present
for all ADCs except "fujitsu,mb88101a".
- vref-supply: Reference to the channel reference voltage regulator.
Example:
vref_max1162: regulator-vref-max1162 {
compatible = "regulator-fixed";
regulator-name = "MAX1162 Vref";
regulator-min-microvolt = <4096000>;
regulator-max-microvolt = <4096000>;
};
adc@e6e54000 {
compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc";
reg = <0 0xe6e54000 0 64>;
clocks = <&mstp9_clks R8A7791_CLK_GYROADC>;
clock-names = "fck";
power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
pinctrl-0 = <&adc_pins>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
adc@0 {
reg = <0>;
compatible = "maxim,max1162";
vref-supply = <&vref_max1162>;
};
adc@1 {
reg = <1>;
compatible = "maxim,max1162";
vref-supply = <&vref_max1162>;
};
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/renesas,rcar-gyroadc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car GyroADC
maintainers:
- Marek Vasut <marek.vasut+renesas@gmail.com>
description: |
The GyroADC block is a reduced SPI block with up to 8 chipselect lines,
which supports the SPI protocol of a selected few SPI ADCs. The SPI ADCs
are sampled by the GyroADC block in a round-robin fashion and the result
presented in the GyroADC registers.
The ADC bindings should match with that of the devices connected to a
full featured SPI bus.
properties:
compatible:
items:
- enum:
- renesas,r8a7791-gyroadc
- renesas,r8a7792-gyroadc
- const: renesas,rcar-gyroadc
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: fck
power-domains: true
resets: true
"#address-cells":
const: 1
"#size-cells":
const: 0
additionalProperties: false
required:
- compatible
- reg
- clocks
- clock-names
- "#address-cells"
- "#size-cells"
patternProperties:
"@[0-7]$":
type: object
properties:
compatible:
description: |
fujitsu,mb88101a
- Fujitsu MB88101A compatible mode,
12bit sampling, up to 4 channels can be sampled in round-robin
fashion. One Fujitsu chip supplies four GyroADC channels with
data as it contains four ADCs on the chip and thus for 4-channel
operation, single MB88101A is required. The Cx chipselect lines
of the MB88101A connect directly to two CHS lines of the GyroADC,
no demuxer is required. The data out line of each MB88101A
connects to a shared input pin of the GyroADC.
ti,adcs7476 or ti,adc121 or adi,ad7476
- TI ADCS7476 / TI ADC121 / ADI AD7476 compatible mode, 15bit
sampling, up to 8 channels can be sampled in round-robin
fashion. One TI/ADI chip supplies single ADC channel with data,
thus for 8-channel operation, 8 chips are required.
A 3:8 chipselect demuxer is required to connect the nCS line
of the TI/ADI chips to the GyroADC, while MISO line of each
TI/ADI ADC connects to a shared input pin of the GyroADC.
maxim,max1162 or maxim,max11100
- Maxim MAX1162 / Maxim MAX11100 compatible mode, 16bit sampling,
up to 8 channels can be sampled in round-robin fashion. One
Maxim chip supplies single ADC channel with data, thus for
8-channel operation, 8 chips are required.
A 3:8 chipselect demuxer is required to connect the nCS line
of the MAX chips to the GyroADC, while MISO line of each Maxim
ADC connects to a shared input pin of the GyroADC.
enum:
- adi,7476
- fujitsu,mb88101a
- maxim,max1162
- maxim,max11100
- ti,adcs7476
- ti,adc121
reg:
minimum: 0
maximum: 7
vref-supply: true
additionalProperties: false
required:
- compatible
- reg
- vref-supply
examples:
- |
#include <dt-bindings/clock/r8a7791-clock.h>
#include <dt-bindings/power/r8a7791-sysc.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
adc@e6e54000 {
compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc";
reg = <0 0xe6e54000 0 64>;
clocks = <&mstp9_clks R8A7791_CLK_GYROADC>;
clock-names = "fck";
power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
pinctrl-0 = <&adc_pins>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
adc@0 {
reg = <0>;
compatible = "maxim,max1162";
vref-supply = <&vref_max1162>;
};
adc@1 {
reg = <1>;
compatible = "maxim,max1162";
vref-supply = <&vref_max1162>;
};
};
};
...
# 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 <martenli@axis.com>
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>;
};
};
...
* 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>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/x-powers,axp209-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: X-Powers AXP ADC bindings
maintainers:
- Chen-Yu Tsai <wens@csie.org>
description: |
ADC is frequently used as a provider to consumers of the ADC channels.
Device is a child of an axp209 multifunction device
ADC channels and their indexes per variant:
AXP209
------
0 | acin_v
1 | acin_i
2 | vbus_v
3 | vbus_i
4 | pmic_temp
5 | gpio0_v
6 | gpio1_v
7 | ipsout_v
8 | batt_v
9 | batt_chrg_i
10 | batt_dischrg_i
AXP22x
------
0 | pmic_temp
1 | batt_v
2 | batt_chrg_i
3 | batt_dischrg_i
AXP813
------
0 | pmic_temp
1 | gpio0_v
2 | batt_v
3 | batt_chrg_i
4 | batt_dischrg_i
properties:
compatible:
enum:
- x-powers,axp209-adc
- x-powers,axp221-adc
- x-powers,axp813-adc
"#io-channel-cells":
const: 1
additionalProperties: false
examples:
- |
axp221 {
adc {
compatible = "x-powers,axp221-adc";
#io-channel-cells = <1>;
};
};
...
Bosch Sensortec BME680 pressure/temperature/humidity/voc sensors
Required properties:
- compatible: must be "bosch,bme680"
Example:
bme680@76 {
compatible = "bosch,bme680";
reg = <0x76>;
};
* Sensirion SGP30/SGPC3 multi-pixel Gas Sensor
Required properties:
- compatible: must be one of
"sensirion,sgp30"
"sensirion,sgpc3"
- reg: the I2C address of the sensor
Example:
gas@58 {
compatible = "sensirion,sgp30";
reg = <0x58>;
};
Analog Devices AD5758 DAC device driver
Required properties for the AD5758:
- compatible: Must be "adi,ad5758"
- reg: SPI chip select number for the device
- spi-max-frequency: Max SPI frequency to use (< 50000000)
- spi-cpha: is the only mode that is supported
Required properties:
- adi,dc-dc-mode: Mode of operation of the dc-to-dc converter
Dynamic Power Control (DPC)
In this mode, the AD5758 circuitry senses the output
voltage and dynamically regulates the supply voltage,
VDPC+, to meet compliance requirements plus an optimized
headroom voltage for the output buffer.
Programmable Power Control (PPC)
In this mode, the VDPC+ voltage is user-programmable to
a fixed level that needs to accommodate the maximum output
load required.
The output of the DAC core is either converted to a
current or voltage output at the VIOUT pin. Only one mode
can be enabled at any one time.
The following values are currently supported:
* 1: DPC current mode
* 2: DPC voltage mode
* 3: PPC current mode
Depending on the selected output mode (voltage or current) one of the
two properties must
be present:
- adi,range-microvolt: Voltage output range
The array of voltage output ranges must contain two fields:
* <0 5000000>: 0 V to 5 V voltage range
* <0 10000000>: 0 V to 10 V voltage range
* <(-5000000) 5000000>: ±5 V voltage range
* <(-10000000) 10000000>: ±10 V voltage range
- adi,range-microamp: Current output range
The array of current output ranges must contain two fields:
* <0 20000>: 0 mA to 20 mA current range
* <0 24000>: 0 mA to 24 mA current range
* <4 24000>: 4 mA to 20 mA current range
* <(-20000) 20000>: ±20 mA current range
* <(-24000) 24000>: ±24 mA current range
* <(-1000) 22000>: −1 mA to +22 mA current range
Optional properties:
- reset-gpios : GPIO spec for the RESET pin. If specified, it will be
asserted during driver probe.
- adi,dc-dc-ilim-microamp: The dc-to-dc converter current limit
The following values are currently supported [uA]:
* 150000
* 200000
* 250000
* 300000
* 350000
* 400000
- adi,slew-time-us: The time it takes for the output to reach the
full scale [uS]
The supported range is between 133us up to 1023984375us
AD5758 Example:
dac@0 {
compatible = "adi,ad5758";
reg = <0>;
spi-max-frequency = <1000000>;
spi-cpha;
reset-gpios = <&gpio 22 0>;
adi,dc-dc-mode = <2>;
adi,range-microvolt = <0 10000000>;
adi,dc-dc-ilim-microamp = <200000>;
adi,slew-time-us = <125000>;
};
Analog Devices AD7303 DAC device driver
Required properties:
- compatible: Must be "adi,ad7303"
- reg: SPI chip select number for the device
- spi-max-frequency: Max SPI frequency to use (< 30000000)
- Vdd-supply: Phandle to the Vdd power supply
Optional properties:
- REF-supply: Phandle to the external reference voltage supply. This should
only be set if there is an external reference voltage connected to the REF
pin. If the property is not set Vdd/2 is used as the reference voltage.
Example:
ad7303@4 {
compatible = "adi,ad7303";
reg = <4>;
spi-max-frequency = <10000000>;
Vdd-supply = <&vdd_supply>;
adi,use-external-reference;
REF-supply = <&vref_supply>;
};
# 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 <michael.auchter@ni.com>
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>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/adi,ad5758.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD5758 DAC
maintainers:
- Michael Hennerich <Michael.Hennerich@analog.com>
properties:
compatible:
const: adi,ad5758
reg:
maxItems: 1
spi-max-frequency: true
spi-cpha: true
adi,dc-dc-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 3]
description: |
Mode of operation of the dc-to-dc converter
Dynamic Power Control (DPC)
In this mode, the AD5758 circuitry senses the output voltage and
dynamically regulates the supply voltage, VDPC+, to meet compliance
requirements plus an optimized headroom voltage for the output buffer.
Programmable Power Control (PPC)
In this mode, the VDPC+ voltage is user-programmable to a fixed level
that needs to accommodate the maximum output load required.
The output of the DAC core is either converted to a current or
voltage output at the VIOUT pin. Only one mode can be enabled at
any one time.
The following values are currently supported:
* 1: DPC current mode
* 2: DPC voltage mode
* 3: PPC current mode
Depending on the selected output mode (voltage or current) one of the
two properties must be present:
adi,range-microvolt:
$ref: /schemas/types.yaml#/definitions/int32-array
description: |
Voltage output range specified as <minimum, maximum>
enum:
- [[0, 5000000]]
- [[0, 10000000]]
- [[-5000000, 5000000]]
- [[-10000000, 10000000]]
adi,range-microamp:
$ref: /schemas/types.yaml#/definitions/int32-array
description: |
Current output range specified as <minimum, maximum>
enum:
- [[0, 20000]]
- [[0, 24000]]
- [[4, 24000]]
- [[-20000, 20000]]
- [[-24000, 24000]]
- [[-1000, 22000]]
reset-gpios: true
adi,dc-dc-ilim-microamp:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [150000, 200000, 250000, 300000, 350000, 400000]
description: |
The dc-to-dc converter current limit.
adi,slew-time-us:
description: |
The time it takes for the output to reach the full scale [uS]
minimum: 133
maximum: 1023984375
required:
- compatible
- reg
- spi-cpha
- adi,dc-dc-mode
allOf:
- if:
properties:
adi,dc-dc-mode:
contains:
enum: [1, 3]
then:
properties:
adi,range-microvolt: false
required:
- adi,range-microamp
else:
properties:
adi,range-microamp: false
required:
- adi,range-microvolt
additionalProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
dac@0 {
compatible = "adi,ad5758";
reg = <0>;
spi-max-frequency = <1000000>;
spi-cpha;
reset-gpios = <&gpio 22 0>;
adi,dc-dc-mode = <2>;
adi,range-microvolt = <0 10000000>;
adi,dc-dc-ilim-microamp = <200000>;
adi,slew-time-us = <125000>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/adi,ad7303.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD7303 DAC
maintainers:
- Lars-Peter Clausen <lars@metafoo.de>
properties:
compatible:
const: adi,ad7303
reg:
maxItems: 1
Vdd-supply:
description:
Used to calculate output channel scalling if REF-supply not specified.
REF-supply:
description:
If not provided, Vdd/2 is used as the reference voltage.
spi-max-frequency:
maximum: 30000000
required:
- compatible
- reg
- Vdd-supply
additionalProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
dac@4 {
compatible = "adi,ad7303";
reg = <4>;
spi-max-frequency = <10000000>;
Vdd-supply = <&vdd_supply>;
REF-supply = <&vref_supply>;
};
};
...
Maxim Integrated DS4422/DS4424 7-bit Sink/Source Current DAC Device Driver
Datasheet publicly available at:
https://datasheets.maximintegrated.com/en/ds/DS4422-DS4424.pdf
Required properties:
- compatible: Should be one of
maxim,ds4422
maxim,ds4424
- reg: Should contain the DAC I2C address
Optional properties:
- vcc-supply: Power supply is optional. If not defined, driver will ignore it.
Example:
ds4224@10 {
compatible = "maxim,ds4424";
reg = <0x10>; /* When A0, A1 pins are ground */
vcc-supply = <&vcc_3v3>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/fsl,vf610-dac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale vf610 Digital to Analog Converter
maintainers:
- Sanchayan Maity <maitysanchayan@gmail.com>
properties:
compatible:
const: fsl,vf610-dac
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: dac
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/vf610-clock.h>
bus@40000000 {
compatible = "fsl,aips-bus", "simple-bus";
reg = <0x40000000 0x00070000>;
ranges;
#address-cells = <1>;
#size-cells = <1>;
dac@400cc000 {
compatible = "fsl,vf610-dac";
reg = <0x400cc000 0x1000>;
interrupts = <55 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "dac";
clocks = <&clks VF610_CLK_DAC0>;
};
};
...
NXP LPC1850 DAC bindings
Required properties:
- compatible: Should be "nxp,lpc1850-dac"
- reg: Offset and length of the register set for the ADC device
- interrupts: The interrupt number for the ADC device
- clocks: The root clock of the ADC controller
- vref-supply: The regulator supply ADC reference voltage
- resets: phandle to reset controller and line specifier
Example:
dac: dac@400e1000 {
compatible = "nxp,lpc1850-dac";
reg = <0x400e1000 0x1000>;
interrupts = <0>;
clocks = <&ccu1 CLK_APB3_DAC>;
vref-supply = <&reg_vdda>;
resets = <&rgu 42>;
};
Maxim max5821 DAC device driver
Required properties:
- compatible: Must be "maxim,max5821"
- reg: Should contain the DAC I2C address
- vref-supply: Phandle to the vref power supply
Example:
max5821@38 {
compatible = "maxim,max5821";
reg = <0x38>;
vref-supply = <&reg_max5821>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/maxim,ds4424.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Integrated DS4422/DS4424 7-bit Sink/Source Current DAC
maintainers:
- Ismail Kose <ihkose@gmail.com>
description: |
Datasheet publicly available at:
https://datasheets.maximintegrated.com/en/ds/DS4422-DS4424.pdf
properties:
compatible:
enum:
- maxim,ds4422
- maxim,ds4424
reg:
maxItems: 1
vcc-supply: true
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
dac@10 {
compatible = "maxim,ds4424";
reg = <0x10>; /* When A0, A1 pins are ground */
vcc-supply = <&vcc_3v3>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/maxim,max5821.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim max5821 dual 10-bit DAC
maintainers:
- Philippe Reynes <tremyfr@yahoo.fr>
description: |
Datasheet publicly available at:
https://datasheets.maximintegrated.com/en/ds/MAX5821.pdf
properties:
compatible:
const: maxim,max5821
reg:
maxItems: 1
vref-supply: true
required:
- compatible
- reg
- vref-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
dac@38 {
compatible = "maxim,max5821";
reg = <0x38>;
vref-supply = <&reg_max5821>;
};
};
...
Microchip mcp4725 and mcp4726 DAC device driver
Required properties:
- compatible: Must be "microchip,mcp4725" or "microchip,mcp4726"
- reg: Should contain the DAC I2C address
- vdd-supply: Phandle to the Vdd power supply. This supply is used as a
voltage reference on mcp4725. It is used as a voltage reference on
mcp4726 if there is no vref-supply specified.
Optional properties (valid only for mcp4726):
- vref-supply: Optional phandle to the Vref power supply. Vref pin is
used as a voltage reference when this supply is specified.
- microchip,vref-buffered: Boolean to enable buffering of the external
Vref pin. This boolean is not valid without the vref-supply. Quoting
the datasheet: This is offered in cases where the reference voltage
does not have the current capability not to drop its voltage when
connected to the internal resistor ladder circuit.
Examples:
/* simple mcp4725 */
mcp4725@60 {
compatible = "microchip,mcp4725";
reg = <0x60>;
vdd-supply = <&vdac_vdd>;
};
/* mcp4726 with the buffered external reference voltage */
mcp4726@60 {
compatible = "microchip,mcp4726";
reg = <0x60>;
vdd-supply = <&vdac_vdd>;
vref-supply = <&vdac_vref>;
microchip,vref-buffered;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4725.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip mcp4725 and mcp4726 DAC
maintainers:
- Tomas Novotny <tomas@novotny.cz>
properties:
compatible:
enum:
- microchip,mcp4725
- microchip,mcp4726
reg:
maxItems: 1
vdd-supply:
description: |
Provides both power and acts as the reference supply on the mcp4725.
For the mcp4726 it will be used as the reference voltage if vref-supply
is not provided.
vref-supply:
description:
Vref pin is used as a voltage reference when this supply is specified.
microchip,vref-buffered:
type: boolean
description: |
Enable buffering of the external Vref pin. This boolean is not valid
without the vref-supply. Quoting the datasheet: This is offered in
cases where the reference voltage does not have the current
capability not to drop its voltage when connected to the internal
resistor ladder circuit.
allOf:
- if:
not:
properties:
compatible:
contains:
const: microchip,mcp4726
then:
properties:
vref-supply: false
microchip,vref-buffered: false
required:
- compatible
- reg
- vdd-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
mcp4725@60 {
compatible = "microchip,mcp4725";
reg = <0x60>;
vdd-supply = <&vdac_vdd>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/nxp,lpc1850-dac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP LPC1850 DAC bindings
maintainers:
- Jonathan Cameron <jic23@kernel.org>
description:
Supports the DAC found on the LPC1850 SoC.
properties:
compatible:
const: nxp,lpc1850-dac
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
vref-supply: true
resets:
maxItems: 1
required:
- compatible
- reg
- interrupts
- clocks
- vref-supply
- resets
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/lpc18xx-ccu.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
dac: dac@400e1000 {
compatible = "nxp,lpc1850-dac";
reg = <0x400e1000 0x1000>;
interrupts = <0>;
clocks = <&ccu1 CLK_APB3_DAC>;
vref-supply = <&reg_vdda>;
resets = <&rgu 42>;
};
};
...
* 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>;
};
# 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 <sean@geanix.com>
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,dac5571";
reg = <0x4C>;
vref-supply = <&vdd_supply>;
};
};
...
TI DAC7311 device tree bindings
Required properties:
- compatible: must be set to:
* "ti,dac7311"
* "ti,dac6311"
* "ti,dac5311"
- reg: spi chip select number for the device
- vref-supply: The regulator supply for ADC reference voltage
Optional properties:
- spi-max-frequency: Max SPI frequency to use
Example:
spi_master {
dac@0 {
compatible = "ti,dac7311";
reg = <0>; /* CS0 */
spi-max-frequency = <1000000>;
vref-supply = <&vdd_supply>;
};
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/ti,dac7311.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments DAC5311 and similar SPI DACs
maintainers:
- Charles-Antoine Couret <charles-antoine.couret@essensium.com>
properties:
compatible:
enum:
- ti,dac7311
- ti,dac6311
- ti,dac5311
reg:
maxItems: 1
vref-supply:
description:
Reference voltage must be supplied to establish the scaling of the
output voltage.
spi-max-frequency: true
required:
- compatible
- reg
- vref-supply
additionalProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
dac@0 {
compatible = "ti,dac7311";
reg = <0>; /* CS0 */
spi-max-frequency = <1000000>;
vref-supply = <&vdd_supply>;
};
};
...
TI DAC7512 DEVICETREE BINDINGS
Required properties:
- "compatible" Must be set to "ti,dac7512"
Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply. In particular, "reg" and "spi-max-frequency" properties must be given.
Example:
spi_master {
dac7512: dac7512@0 {
compatible = "ti,dac7512";
reg = <0>; /* CS0 */
spi-max-frequency = <1000000>;
};
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/ti,dac7512.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments DAC7512 DAC
maintainers:
- Jonathan Cameron <jic23@kernel.org>
properties:
compatible:
const: ti,dac7512
reg:
maxItems: 1
spi-max-frequency:
description:
Maximum frequency is reduced for supply voltage of less than 3.6V
maximum: 30000000
required:
- compatible
- reg
additionalProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
dac@0 {
compatible = "ti,dac7512";
reg = <0>; /* CS0 */
spi-max-frequency = <1000000>;
};
};
...
* Texas Instruments Dual, 12-Bit Serial Input Digital-to-Analog Converter
The DAC7612 is a dual, 12-bit digital-to-analog converter (DAC) with guaranteed
12-bit monotonicity performance over the industrial temperature range.
Is is programmable through an SPI interface.
The internal DACs are loaded when the LOADDACS pin is pulled down.
https://www.ti.com/lit/ds/sbas106/sbas106.pdf
Required Properties:
- compatible: Should be one of:
"ti,dac7612"
"ti,dac7612u"
"ti,dac7612ub"
- reg: Definition as per Documentation/devicetree/bindings/spi/spi-bus.txt
Optional Properties:
- ti,loaddacs-gpios: GPIO descriptor for the LOADDACS pin.
- spi-*: Definition as per Documentation/devicetree/bindings/spi/spi-bus.txt
Example:
dac@1 {
compatible = "ti,dac7612";
reg = <0x1>;
ti,loaddacs-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/ti,dac7612.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments DAC7612 family of DACs
description:
The DAC7612 is a dual, 12-bit digital-to-analog converter (DAC) with
guaranteed 12-bit monotonicity performance over the industrial temperature
range. Is is programmable through an SPI interface.
maintainers:
- Ricardo Ribalda Delgado <ricardo@ribalda.com>
properties:
compatible:
enum:
- ti,dac7612
- ti,dac7612u
- ti,dac7612ub
reg:
maxItems: 1
ti,loaddacs-gpios:
description:
DACs are loaded when the pin connected to this GPIO is pulled low.
maxItems: 1
spi-max-frequency: true
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
dac@1 {
compatible = "ti,dac7612";
reg = <0x1>;
ti,loaddacs-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>;
};
};
...
Freescale vf610 Digital to Analog Converter bindings
The devicetree bindings are for the new DAC driver written for
vf610 SoCs from Freescale.
Required properties:
- compatible: Should contain "fsl,vf610-dac"
- reg: Offset and length of the register set for the device
- interrupts: Should contain the interrupt for the device
- clocks: The clock is needed by the DAC controller
- clock-names: Must contain "dac" matching entry in the clocks property.
Example:
dac0: dac@400cc000 {
compatible = "fsl,vf610-dac";
reg = <0x400cc000 0x1000>;
interrupts = <55 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "dac";
clocks = <&clks VF610_CLK_DAC0>;
};
* 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 = <&reg_peri_3p15v>;
vddio-supply = <&reg_peri_3p15v>;
};
# 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 <rmfrfs@gmail.com>
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 <dt-bindings/interrupt-controller/irq.h>
i2c0 {
#address-cells = <1>;
#size-cells = <0>;
gyroscope@20 {
compatible = "nxp,fxas21002c";
reg = <0x20>;
vdd-supply = <&reg_peri_3p15v>;
vddio-supply = <&reg_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";
};
};
Maxim MAX30100 heart rate and pulse oximeter sensor
* https://datasheets.maximintegrated.com/en/ds/MAX30100.pdf
Required properties:
- compatible: must be "maxim,max30100"
- reg: the I2C address of the sensor
- interrupts: the sole interrupt generated by the device
Refer to interrupt-controller/interrupts.txt for generic
interrupt client node bindings.
Optional properties:
- maxim,led-current-microamp: configuration for LED current in microamperes
while the engine is running. First indexed value is the configuration for
the RED LED, and second value is for the IR LED.
Refer to the datasheet for the allowed current values.
Example:
max30100@57 {
compatible = "maxim,max30100";
reg = <0x57>;
maxim,led-current-microamp = <24000 50000>;
interrupt-parent = <&gpio1>;
interrupts = <16 2>;
};
Maxim MAX30102 heart rate and pulse oximeter sensor
Maxim MAX30105 optical particle-sensing module
* https://datasheets.maximintegrated.com/en/ds/MAX30102.pdf
* https://datasheets.maximintegrated.com/en/ds/MAX30105.pdf
Required properties:
- compatible: must be "maxim,max30102" or "maxim,max30105"
- reg: the I2C address of the sensor
- interrupts: the sole interrupt generated by the device
Refer to interrupt-controller/interrupts.txt for generic
interrupt client node bindings.
Optional properties:
- maxim,red-led-current-microamp: configuration for red LED current
- maxim,ir-led-current-microamp: configuration for IR LED current
- maxim,green-led-current-microamp: configuration for green LED current
(max30105 only)
Note that each step is approximately 200 microamps, ranging from 0 uA to
50800 uA.
Example:
max30102@57 {
compatible = "maxim,max30102";
reg = <0x57>;
maxim,red-led-current-microamp = <7000>;
maxim,ir-led-current-microamp = <7000>;
interrupt-parent = <&gpio1>;
interrupts = <16 2>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/health/maxim,max30100.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX30100 heart rate and pulse oximeter sensor
maintainers:
- Matt Ranostay <matt.ranostay@konsulko.com>
properties:
compatible:
const: maxim,max30100
reg:
maxItems: 1
interrupts:
maxItems: 1
description: Connected to ADC_RDY pin.
maxim,led-current-microamp:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2
maxItems: 2
description: |
LED current whilst the engine is running. First indexed value is
the configuration for the RED LED, and second value is for the IR LED.
additionalProperties: false
required:
- compatible
- reg
- interrupts
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
heart-rate@57 {
compatible = "maxim,max30100";
reg = <0x57>;
maxim,led-current-microamp = <24000 50000>;
interrupt-parent = <&gpio1>;
interrupts = <16 2>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/health/maxim,max30102.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX30102 heart rate and pulse oximeter and MAX30105 particle-sensor
maintainers:
- Matt Ranostay <matt.ranostay@konsulko.com>
properties:
compatible:
enum:
- maxim,max30102
- maxim,max30105
reg:
maxItems: 1
interrupts:
maxItems: 1
description: Connected to ADC_RDY pin.
maxim,red-led-current-microamp:
description: RED LED current. Each step is approximately 200 microamps.
minimum: 0
maximum: 50800
maxim,ir-led-current-microamp:
description: IR LED current. Each step is approximately 200 microamps.
minimum: 0
maximum: 50800
maxim,green-led-current-microamp:
description: Green LED current. Each step is approximately 200 microamps.
minimum: 0
maximum: 50800
allOf:
- if:
properties:
compatible:
contains:
const: maxim,max30100
then:
properties:
maxim,green-led-current-microamp: false
additionalProperties: false
required:
- compatible
- reg
- interrupts
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
heart-rate@57 {
compatible = "maxim,max30102";
reg = <0x57>;
maxim,red-led-current-microamp = <7000>;
maxim,ir-led-current-microamp = <7000>;
interrupt-parent = <&gpio1>;
interrupts = <16 2>;
};
};
...
* 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>;
}
# 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 <harald@ccbib.org>
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>;
};
...
* 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>;
};
* 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>;
};
*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>;
};
# 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 <lorenzo@kernel.org>
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 <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
hts221@5f {
compatible = "st,hts221";
reg = <0x5f>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
};
...
Analog Devices AD5933/AD5934 Impedance Converter, Network Analyzer
https://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD5934.pdf
Required properties:
- compatible : should be one of
"adi,ad5933"
"adi,ad5934"
- reg : the I2C address.
- vdd-supply : The regulator supply for DVDD, AVDD1 and AVDD2 when they
are connected together.
Optional properties:
- clocks : external clock reference.
- clock-names : must be "mclk" if clocks is set.
Example for a I2C device node:
impedance-analyzer@0d {
compatible = "adi,adxl345";
reg = <0x0d>;
vdd-supply = <&vdd_supply>;
clocks = <&ref_clk>;
clock-names = "mclk";
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/impedance-analyzer/adi,ad5933.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD5933/AD5934 Impedance Converter, Network Analyzer
maintainers:
- Marcelo Schmitt <marcelo.schmitt1@gmail.com>
- Gabriel Capella <gabriel@capella.pro>
description: |
https://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD5934.pdf
properties:
compatible:
enum:
- adi,ad5933
- adi,ad5934
reg:
maxItems: 1
vdd-supply:
description: |
The regulator supply for DVDD, AVDD1 and AVDD2 when they
are connected together. Used to calculate voltage scaling of measurement
channels.
clocks:
maxItems: 1
clock-names:
const: mclk
additionalProperties: false
required:
- compatible
- reg
- vdd-supply
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
impedance-analyzer@d {
compatible = "adi,ad5933";
reg = <0x0d>;
vdd-supply = <&vdd_supply>;
clocks = <&ref_clk>;
clock-names = "mclk";
};
};
...
Analog Devices ADIS16480 and similar IMUs
Required properties for the ADIS16480:
- compatible: Must be one of
* "adi,adis16375"
* "adi,adis16480"
* "adi,adis16485"
* "adi,adis16488"
* "adi,adis16490"
* "adi,adis16495-1"
* "adi,adis16495-2"
* "adi,adis16495-3"
* "adi,adis16497-1"
* "adi,adis16497-2"
* "adi,adis16497-3"
- reg: SPI chip select number for the device
- spi-max-frequency: Max SPI frequency to use
see: Documentation/devicetree/bindings/spi/spi-bus.txt
- spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
- spi-cpol: See Documentation/devicetree/bindings/spi/spi-bus.txt
- interrupts: interrupt mapping for IRQ, accepted values are:
* IRQF_TRIGGER_RISING
* IRQF_TRIGGER_FALLING
Optional properties:
- interrupt-names: Data ready line selection. Valid values are:
* DIO1
* DIO2
* DIO3
* DIO4
If this field is left empty, DIO1 is assigned as default data ready
signal.
- reset-gpios: must be the device tree identifier of the RESET pin. As the line
is active low, it should be marked GPIO_ACTIVE_LOW.
- clocks: phandle to the external clock. Should be set according to
"clock-names".
If this field is left empty together with the "clock-names" field, then
the internal clock is used.
- clock-names: The name of the external clock to be used. Valid values are:
* sync: In sync mode, the internal clock is disabled and the frequency
of the external clock signal establishes therate of data
collection and processing. See Fig 14 and 15 in the datasheet.
The clock-frequency must be:
* 3000 to 4500 Hz for adis1649x devices.
* 700 to 2400 Hz for adis1648x devices.
* pps: In Pulse Per Second (PPS) Mode, the rate of data collection and
production is equal to the product of the external clock
frequency and the scale factor in the SYNC_SCALE register, see
Table 154 in the datasheet.
The clock-frequency must be:
* 1 to 128 Hz for adis1649x devices.
* This mode is not supported by adis1648x devices.
If this field is left empty together with the "clocks" field, then the
internal clock is used.
- adi,ext-clk-pin: The DIOx line to be used as an external clock input.
Valid values are:
* DIO1
* DIO2
* DIO3
* DIO4
Each DIOx pin supports only one function at a time (data ready line
selection or external clock input). When a single pin has two
two assignments, the enable bit for the lower priority function
automatically resets to zero (disabling the lower priority function).
Data ready has highest priority.
If this field is left empty, DIO2 is assigned as default external clock
input pin.
Example:
imu@0 {
compatible = "adi,adis16495-1";
reg = <0>;
spi-max-frequency = <3200000>;
spi-cpol;
spi-cpha;
interrupts = <25 IRQF_TRIGGER_FALLING>;
interrupt-parent = <&gpio>;
interrupt-names = "DIO2";
clocks = <&adis16495_sync>;
clock-names = "sync";
adi,ext-clk-pin = "DIO1";
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/imu/adi,adis16480.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices ADIS16480 and similar IMUs
maintainers:
- Alexandru Ardelean <alexandru.ardelean@analog.com>
properties:
compatible:
enum:
- adi,adis16375
- adi,adis16480
- adi,adis16485
- adi,adis16488
- adi,adis16490
- adi,adis16495-1
- adi,adis16495-2
- adi,adis16495-3
- adi,adis16497-1
- adi,adis16497-2
- adi,adis16497-3
reg:
maxItems: 1
interrupts:
minItems: 1
maxItems: 2
description: |
Accepted interrupt types are:
* IRQ_TYPE_EDGE_RISING
* IRQ_TYPE_EDGE_FALLING
interrupt-names:
minItems: 1
maxItems: 2
description:
Default if not supplied is DIO1.
items:
enum:
- DIO1
- DIO2
- DIO3
- DIO4
spi-max-frequency: true
spi-cpha: true
spi-cpol: true
reset-gpios:
maxItems: 1
description: Connected to RESET pin which is active low.
clocks:
maxItems: 1
description: If not provided, then the internal clock is used.
clock-names:
description: |
sync: In sync mode, the internal clock is disabled and the frequency
of the external clock signal establishes therate of data
collection and processing. See Fig 14 and 15 in the datasheet.
The clock-frequency must be:
* 3000 to 4500 Hz for adis1649x devices.
* 700 to 2400 Hz for adis1648x devices.
pps: In Pulse Per Second (PPS) Mode, the rate of data collection and
production is equal to the product of the external clock
frequency and the scale factor in the SYNC_SCALE register, see
Table 154 in the datasheet.
The clock-frequency must be:
* 1 to 128 Hz for adis1649x devices.
* This mode is not supported by adis1648x devices.
enum:
- sync
- pps
adi,ext-clk-pin:
$ref: /schemas/types.yaml#/definitions/string
description: |
The DIOx line to be used as an external clock input.
Each DIOx pin supports only one function at a time (data ready line
selection or external clock input). When a single pin has two
two assignments, the enable bit for the lower priority function
automatically resets to zero (disabling the lower priority function).
Data ready has highest priority.
If not provided then DIO2 is assigned as default external clock
input pin.
enum:
- DIO1
- DIO2
- DIO3
- DIO4
additionalProperties: false
required:
- compatible
- reg
- interrupts
- spi-cpha
- spi-cpol
- spi-max-frequency
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
imu@0 {
compatible = "adi,adis16495-1";
reg = <0>;
spi-max-frequency = <3200000>;
spi-cpol;
spi-cpha;
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio>;
interrupt-names = "DIO2";
clocks = <&adis16495_sync>;
clock-names = "sync";
adi,ext-clk-pin = "DIO1";
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/imu/st,lsm6dsx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STM 6-axis (acc + gyro) IMU Mems sensors
maintainers:
- Lorenzo Bianconi <lorenzo@kernel.org>
description:
Devices have both I2C and SPI interfaces.
properties:
compatible:
enum:
- st,lsm6ds3
- st,lsm6ds3h
- st,lsm6dsl
- st,lsm6dsm
- st,ism330dlc
- st,lsm6dso
- st,asm330lhh
- st,lsm6dsox
- st,lsm6dsr
- st,lsm6ds3tr-c
- st,ism330dhcx
- st,lsm9ds1-imu
- st,lsm6ds0
- st,lsm6dsrx
- st,lsm6dst
reg:
maxItems: 1
interrupts:
minItems: 1
maxItems: 2
description:
Supports up to 2 interrupt lines via the INT1 and INT2 pins.
spi-max-frequency: true
st,drdy-int-pin:
$ref: '/schemas/types.yaml#/definitions/uint32'
description: |
The pin on the package that will be used to signal data ready
enum:
- 1
- 2
st,pullups:
type: boolean
description: enable/disable internal i2c controller pullup resistors.
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.
wakeup-source:
$ref: /schemas/types.yaml#/definitions/flag
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
imu@6b {
compatible = "st,lsm6dsm";
reg = <0x6b>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
};
...
* ST_LSM6DSx driver for STM 6-axis (acc + gyro) imu Mems sensors
Required properties:
- compatible: must be one of:
"st,lsm6ds3"
"st,lsm6ds3h"
"st,lsm6dsl"
"st,lsm6dsm"
"st,ism330dlc"
"st,lsm6dso"
"st,asm330lhh"
"st,lsm6dsox"
"st,lsm6dsr"
"st,lsm6ds3tr-c"
"st,ism330dhcx"
"st,lsm9ds1-imu"
"st,lsm6ds0"
"st,lsm6dsrx"
- reg: i2c address of the sensor / spi cs line
Optional properties:
- st,drdy-int-pin: the pin on the package that will be used to signal
"data ready" (valid values: 1 or 2).
- st,pullups : enable/disable internal i2c controller pullup resistors.
- 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)
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.
- 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.
- wakeup-source: Enables wake up of host system on event.
Refer to interrupt-controller/interrupts.txt for generic interrupt
client node bindings.
Example:
lsm6dsm@6b {
compatible = "st,lsm6dsm";
reg = <0x6b>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
* Avago APDS9300 ambient light sensor
https://www.avagotech.com/docs/AV02-1077EN
Required properties:
- compatible : should be "avago,apds9300"
- reg : the I2C address of the sensor
Optional properties:
- interrupts : interrupt mapping for GPIO IRQ
Example:
apds9300@39 {
compatible = "avago,apds9300";
reg = <0x39>;
interrupt-parent = <&gpio2>;
interrupts = <29 8>;
};
* Avago APDS9960 gesture/RGB/ALS/proximity sensor
https://www.avagotech.com/docs/AV02-4191EN
Required properties:
- compatible: must be "avago,apds9960"
- reg: the I2c address of the sensor
- interrupts : the sole interrupt generated by the device
Refer to interrupt-controller/interrupts.txt for generic interrupt client
node bindings.
Example:
apds9960@39 {
compatible = "avago,apds9960";
reg = <0x39>;
interrupt-parent = <&gpio1>;
interrupts = <16 1>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Avago APDS9300 ambient light sensor
maintainers:
- Jonathan Cameron <jic23@kernel.org>
description: |
Datasheet at https://www.avagotech.com/docs/AV02-1077EN
properties:
compatible:
const: avago,apds9300
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@39 {
compatible = "avago,apds9300";
reg = <0x39>;
interrupt-parent = <&gpio2>;
interrupts = <29 8>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Avago APDS9960 gesture/RGB/ALS/proximity sensor
maintainers:
- Matt Ranostay <matt.ranostay@konsulko.com>
description: |
Datasheet at https://www.avagotech.com/docs/AV02-4191EN
properties:
compatible:
const: avago,apds9960
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@39 {
compatible = "avago,apds9960";
reg = <0x39>;
interrupt-parent = <&gpio1>;
interrupts = <16 1>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/capella,cm36651.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Capella CM36651 I2C Proximity and Color Light sensor
maintainers:
- Beomho Seo <beomho.seo@samsung.com>
properties:
compatible:
const: capella,cm36651
reg:
maxItems: 1
interrupts:
maxItems: 1
vled-supply:
description: |
Supply for the IR_LED which is part of the cm36651 for proximity detection.
additionalProperties: false
required:
- compatible
- reg
- interrupts
- vled-supply
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@18 {
compatible = "capella,cm36651";
reg = <0x18>;
interrupt-parent = <&gpx0>;
interrupts = <2 0>;
vled-supply = <&ps_als_reg>;
};
};
...
* Capella CM36651 I2C Proximity and Color Light sensor
Required properties:
- compatible: must be "capella,cm36651"
- reg: the I2C address of the device
- interrupts: interrupt-specifier for the sole interrupt
generated by the device
- vled-supply: regulator for the IR LED. IR_LED is a part
of the cm36651 for proximity detection.
As covered in ../../regulator/regulator.txt
Example:
i2c_cm36651: i2c-gpio {
/* ... */
cm36651@18 {
compatible = "capella,cm36651";
reg = <0x18>;
interrupt-parent = <&gpx0>;
interrupts = <2 0>;
vled-supply = <&ps_als_reg>;
};
/* ... */
};
* Sharp GP2AP020A00F I2C Proximity/ALS sensor
The proximity detector sensor requires power supply
for its built-in led. It is also defined by this binding.
Required properties:
- compatible : should be "sharp,gp2ap020a00f"
- reg : the I2C slave address of the light sensor
- interrupts : interrupt specifier for the sole interrupt generated
by the device
- vled-supply : VLED power supply, as covered in ../regulator/regulator.txt
Example:
gp2ap020a00f@39 {
compatible = "sharp,gp2ap020a00f";
reg = <0x39>;
interrupts = <2 0>;
vled-supply = <...>;
};
* MAX44009 Ambient Light Sensor
Required properties:
- compatible: should be "maxim,max44009"
- reg: the I2C address of the device (default is <0x4a>)
Optional properties:
- interrupts: interrupt mapping for GPIO IRQ. Should be configured with
IRQ_TYPE_EDGE_FALLING.
Refer to interrupt-controller/interrupts.txt for generic interrupt client
node bindings.
Example:
light-sensor@4a {
compatible = "maxim,max44009";
reg = <0x4a>;
interrupt-parent = <&gpio1>;
interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/maxim,max44009.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MAX44009 Ambient Light Sensor
maintainers:
- Robert Eshleman <bobbyeshleman@gmail.com>
properties:
compatible:
const: maxim,max44009
reg:
maxItems: 1
description: Default address is 0x4a
interrupts:
maxItems: 1
description: Should be configured with type IRQ_TYPE_EDGE_FALLING
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@4a {
compatible = "maxim,max44009";
reg = <0x4a>;
interrupt-parent = <&gpio1>;
interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
};
};
...
* Texas Instruments OPT3001 Ambient Light Sensor
The driver supports interrupt-driven and interrupt-less operation, depending
on whether an interrupt property has been populated into the DT. Note that
the optional generation of IIO events on rising/falling light threshold changes
requires the use of interrupts. Without interrupts, only the simple reading
of the current light value is supported through the IIO API.
https://www.ti.com/product/opt3001
Required properties:
- compatible: should be "ti,opt3001"
- reg: the I2C address of the sensor
Optional properties:
- interrupts: interrupt mapping for GPIO IRQ (configure for falling edge)
Example:
opt3001@44 {
compatible = "ti,opt3001";
reg = <0x44>;
interrupt-parent = <&gpio1>;
interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
};
* ISL29501 Time-of-flight sensor.
Required properties:
- compatible : should be "renesas,isl29501"
- reg : the I2C address of the sensor
Example:
isl29501@57 {
compatible = "renesas,isl29501";
reg = <0x57>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/sharp,gp2ap020a00f.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Sharp GP2AP020A00F I2C Proximity/ALS sensor
maintainers:
- Kyungmin Park <kyungmin.park@samsung.com>
description: |
The proximity detector sensor requires power supply for its built-in led.
properties:
compatible:
const: sharp,gp2ap020a00f
reg:
maxItems: 1
interrupts:
maxItems: 1
vled-supply: true
additionalProperties: false
required:
- compatible
- reg
- interrupts
- vled-supply
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@39 {
compatible = "sharp,gp2ap020a00f";
reg = <0x39>;
interrupts = <2 0>;
vled-supply = <&als_reg>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/st,uvis25.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ST UVIS25 uv sensor
maintainers:
- Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
properties:
compatible:
const: st,uvis25
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
uv-sensor@47 {
compatible = "st,uvis25";
reg = <0x47>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/st,vl6180.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicro VL6180 ALS, range and proximity sensor
maintainers:
- Manivannan Sadhasivam <manivannanece23@gmail.com>
- Peter Meerwald-Stadler <pmeerw@pmeerw.net>
description: |
Proximity sensing module incorporating time of flight sensor
Datasheet at https://www.st.com/resource/en/datasheet/vl6180x.pdf
properties:
compatible:
const: st,vl6180
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
proximity@29 {
compatible = "st,vl6180";
reg = <0x29>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/ti,opt3001.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments OPT3001 Ambient Light Sensor
maintainers:
- Andreas Dannenberg <dannenberg@ti.com>
description: |
The device supports interrupt-driven and interrupt-less operation, depending
on whether an interrupt property has been populated into the DT.
properties:
compatible:
const: ti,opt3001
reg:
maxItems: 1
interrupts:
maxItems: 1
description: Should be configured with type IRQ_TYPE_EDGE_FALLING
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@44 {
compatible = "ti,opt3001";
reg = <0x44>;
interrupt-parent = <&gpio1>;
interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/upisemi,us5182.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: UPISEMI us5182d I2C ALS and Proximity sensor
maintainers:
- Jonathan Cameron <jic23@kernel.org>
properties:
compatible:
const: upisemi,asd5182
reg:
maxItems: 1
upsemi,glass-coef:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
glass attenuation factor - compensation factor of resolution 1000
for material transmittance.
default: 1000
upisemi,dark-ths:
$ref: /schemas/types.yaml#/definitions/uint16-array
minItems: 8
maxItems: 8
description:
16-bit thresholds (adc counts) corresponding to every scale.
upisemi,upper-dark-gain:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4)
applied when light > threshold.
default: 0
upisemi,lower-dark-gain:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4)
applied when light < threshold.
default: 0x16
upisemi,continuous:
$ref: /schemas/types.yaml#definitions/flag
description: |
This chip has two power modes: one-shot (chip takes one measurement and
then shuts itself down) and continuous (chip takes continuous
measurements). The one-shot mode is more power-friendly but the
continuous mode may be more reliable. If this property is specified
the continuous mode will be used instead of the default one-shot one for
raw reads.
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@39 {
compatible = "upisemi,usd5182";
reg = <0x39>;
upisemi,glass-coef = < 1000 >;
upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;
upisemi,upper-dark-gain = /bits/ 8 <0x00>;
upisemi,lower-dark-gain = /bits/ 8 <0x16>;
};
};
...
* UPISEMI us5182d I2C ALS and Proximity sensor
Required properties:
- compatible: must be "upisemi,usd5182"
- reg: the I2C address of the device
Optional properties:
- upisemi,glass-coef: glass attenuation factor - compensation factor of
resolution 1000 for material transmittance.
- upisemi,dark-ths: array of 8 elements containing 16-bit thresholds (adc
counts) corresponding to every scale.
- upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4
fractional bits - Q4.4) applied when light > threshold
- upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4
fractional bits - Q4.4) applied when light < threshold
- upisemi,continuous: This chip has two power modes: one-shot (chip takes one
measurement and then shuts itself down) and continuous (
chip takes continuous measurements). The one-shot mode is
more power-friendly but the continuous mode may be more
reliable. If this property is specified the continuous
mode will be used instead of the default one-shot one for
raw reads.
If the optional properties are not specified these factors will default to the
values in the below example.
The glass-coef defaults to no compensation for the covering material.
The threshold array defaults to experimental values that work with US5182D
sensor on evaluation board - roughly between 12-32 lux.
There will be no dark-gain compensation by default when ALS > thresh
(0 * dark-gain), and a 1.35 compensation factor when ALS < thresh.
Example:
usd5182@39 {
compatible = "upisemi,usd5182";
reg = <0x39>;
upisemi,glass-coef = < 1000 >;
upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;
upisemi,upper-dark-gain = /bits/ 8 <0x00>;
upisemi,lower-dark-gain = /bits/ 8 <0x16>;
};
* ST UVIS25 uv sensor
Required properties:
- compatible: should be "st,uvis25"
- reg: i2c address of the sensor / spi cs line
Optional properties:
- 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:
uvis25@47 {
compatible = "st,uvis25";
reg = <0x47>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
VISHAY VCNL4035 - Ambient Light and proximity sensor
Link to datasheet: https://www.vishay.com/docs/84251/vcnl4035x01.pdf
Required properties:
-compatible: should be "vishay,vcnl4035"
-reg: I2C address of the sensor, should be 0x60
-interrupts: interrupt mapping for GPIO IRQ (level active low)
Example:
light-sensor@60 {
compatible = "vishay,vcnl4035";
reg = <0x60>;
interrupt-parent = <&gpio4>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/light/vishay,vcnl4035.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: VISHAY VCNL4035 ambient Light and proximity sensor
maintainers:
- Jonathan Cameron <jic23@kernel.org>
description: |
Datasheet at https://www.vishay.com/docs/84251/vcnl4035x01.pdf
properties:
compatible:
const: vishay,vcnl4035
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
light-sensor@60 {
compatible = "vishay,vcnl4035";
reg = <0x60>;
interrupt-parent = <&gpio4>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
};
...
STMicro VL6180 - ALS, range and proximity sensor
Link to datasheet: https://www.st.com/resource/en/datasheet/vl6180x.pdf
Required properties:
-compatible: should be "st,vl6180"
-reg: the I2C address of the sensor
Example:
vl6180@29 {
compatible = "st,vl6180";
reg = <0x29>;
};
* Asahi Kasei AK8974 magnetometer sensor
Required properties:
- compatible:
* "asahi-kasei,ak8974"
* "alps,hscdtd008a"
- reg : the I2C address of the magnetometer
Optional properties:
- avdd-supply: regulator supply for the analog voltage
(see regulator/regulator.txt)
- dvdd-supply: regulator supply for the digital voltage
(see regulator/regulator.txt)
- interrupts: data ready (DRDY) and interrupt (INT1) lines
from the chip, the DRDY interrupt must be placed first.
The interrupts can be triggered on rising or falling
edges alike.
- mount-matrix: an optional 3x3 mounting rotation matrix
Example:
ak8974@f {
compatible = "asahi-kasei,ak8974";
reg = <0x0f>;
avdd-supply = <&foo_reg>;
dvdd-supply = <&bar_reg>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>,
<1 IRQ_TYPE_EDGE_RISING>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/asahi-kasei,ak8974.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Asahi Kasei AK8974 magnetometer sensor
maintainers:
- Linus Walleij <linus.walleij@linaro.org>
properties:
compatible:
enum:
- alps,hscdtd008a
- asahi-kasei,ak8974
reg:
maxItems: 1
interrupts:
minItems: 1
maxItems: 2
description: |
Data ready (DRDY) and interrupt (INT1) lines from the chip. The DRDY
interrupt must be placed first. The interrupts can be triggered on
rising or falling edges.
avdd-supply: true
dvdd-supply: true
mount-matrix: true
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@f {
compatible = "asahi-kasei,ak8974";
reg = <0x0f>;
avdd-supply = <&foo_reg>;
dvdd-supply = <&bar_reg>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>,
<1 IRQ_TYPE_EDGE_RISING>;
};
};
...
* Bosch BMC150 magnetometer sensor
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf
Required properties:
- compatible : should be one of:
"bosch,bmc150_magn"
"bosch,bmc156_magn"
"bosch,bmm150"
"bosch,bmm150_magn" (DEPRECATED, use bosch,bmm150)
- reg : the I2C address of the magnetometer
Optional properties:
- interrupts : interrupt mapping for GPIO IRQ
Example:
bmc150_magn@12 {
compatible = "bosch,bmc150_magn";
reg = <0x12>;
interrupt-parent = <&gpio1>;
interrupts = <0 1>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/bosch,bmc150_magn.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Bosch BMC150 magnetometer sensor
maintainers:
- Jonathan Cameron <jic23@kernel.org>
description: |
Supports a range of parts, some of which form part of a multi die
package that also contains other sensors. The interface is independent
however, so a separate driver is used to support the magnetometer part.
Datasheet at:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf
properties:
compatible:
description:
Note the bmm150_magn is a deprecated compatible as this part contains only
a magnetometer.
enum:
- bosch,bmc150_magn
- bosch,bmc156_magn
- bosch,bmm150
- bosch,bmm150_magn
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@12 {
compatible = "bosch,bmc150_magn";
reg = <0x12>;
interrupt-parent = <&gpio1>;
interrupts = <0 1>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/fsl,mag3110.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale MAG3110 magnetometer sensor
maintainers:
- Anson Huang <Anson.Huang@nxp.com>
properties:
compatible:
const: fsl,mag3110
reg:
maxItems: 1
interrupts:
maxItems: 1
vdd-supply: true
vddio-supply: true
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@e {
compatible = "fsl,mag3110";
reg = <0x0e>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3_mag3110_int>;
interrupt-parent = <&gpio3>;
interrupts = <16 IRQ_TYPE_EDGE_RISING>;
};
};
...
* Honeywell HMC5843 magnetometer sensor
Required properties:
- compatible : should be "honeywell,hmc5843"
Other models which are supported with driver are:
"honeywell,hmc5883"
"honeywell,hmc5883l"
"honeywell,hmc5983"
- reg : the I2C address of the magnetometer - typically 0x1e
Optional properties:
- gpios : should be device tree identifier of the magnetometer DRDY pin
Example:
hmc5843@1e {
compatible = "honeywell,hmc5843"
reg = <0x1e>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/honeywell,hmc5843.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Honeywell HMC5843 magnetometer sensor
maintainers:
- Neil Brown <neilb@suse.de>
properties:
compatible:
enum:
- honeywell,hmc5843
- honeywell,hmc5883
- honeywell,hmc5883l
- honeywell,hmc5983
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@1e {
compatible = "honeywell,hmc5843";
reg = <0x1e>;
};
};
...
* FREESCALE MAG3110 magnetometer sensor
Required properties:
- compatible : should be "fsl,mag3110"
- reg : the I2C address of the magnetometer
Optional properties:
- interrupts: the sole interrupt generated by the device
Refer to interrupt-controller/interrupts.txt for generic interrupt client
node bindings.
- vdd-supply: phandle to the regulator that provides power to the sensor.
- vddio-supply: phandle to the regulator that provides power to the sensor's IO.
Example:
magnetometer@e {
compatible = "fsl,mag3110";
reg = <0x0e>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3_mag3110_int>;
interrupt-parent = <&gpio3>;
interrupts = <16 IRQ_TYPE_EDGE_RISING>;
};
* MEMSIC MMC35240 magnetometer sensor
Required properties:
- compatible : should be "memsic,mmc35240"
- reg : the I2C address of the magnetometer
Example:
mmc35240@30 {
compatible = "memsic,mmc35240";
reg = <0x30>;
};
* PNI RM3100 3-axis magnetometer sensor
Required properties:
- compatible : should be "pni,rm3100"
- reg : the I2C address or SPI chip select number of the sensor.
Optional properties:
- interrupts: data ready (DRDY) from the chip.
The interrupts can be triggered on level high.
Example:
rm3100: rm3100@20 {
compatible = "pni,rm3100";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/pni,rm3100.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: PNI RM3100 3-axis magnetometer sensor
maintainers:
- Song Qiang <songqiang1304521@gmail.com>
properties:
compatible:
const: pni,rm3100
reg:
maxItems: 1
interrupts:
maxItems: 1
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@20 {
compatible = "pni,rm3100";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
};
};
...
* Analog Devices AD5272 digital potentiometer
The node for this device must be a child node of a I2C controller, hence
all mandatory properties for your controller must be specified. See directory:
Documentation/devicetree/bindings/i2c
for more details.
Required properties:
- compatible: Must be one of the following, depending on the model:
adi,ad5272-020
adi,ad5272-050
adi,ad5272-100
adi,ad5274-020
adi,ad5274-100
Optional properties:
- reset-gpios: GPIO specification for the RESET input. This is an
active low signal to the AD5272.
Example:
ad5272: potentiometer@2f {
reg = <0x2F>;
compatible = "adi,ad5272-020";
reset-gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/potentiometer/adi,ad5272.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD5272 digital potentiometer
maintainers:
- Phil Reid <preid@electromag.com.au>
description: |
Datasheet: https://www.analog.com/en/products/ad5272.html
properties:
compatible:
enum:
- adi,ad5272-020
- adi,ad5272-050
- adi,ad5272-100
- adi,ad5274-020
- adi,ad5274-100
reg:
maxItems: 1
reset-gpios:
description:
Active low signal to the AD5272 RESET input.
additionalProperties: false
required:
- compatible
- reg
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
potentiometer@2f {
compatible = "adi,ad5272-020";
reg = <0x2F>;
reset-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
};
};
...
* Maxim Integrated DS1803 digital potentiometer driver
The node for this driver must be a child node of a I2C controller, hence
all mandatory properties for your controller must be specified. See directory:
Documentation/devicetree/bindings/i2c
for more details.
Required properties:
- compatible: Must be one of the following, depending on the
model:
"maxim,ds1803-010",
"maxim,ds1803-050",
"maxim,ds1803-100"
Example:
ds1803: ds1803@1 {
reg = <0x28>;
compatible = "maxim,ds1803-010";
};
* Maxim Linear-Taper Digital Potentiometer MAX5481-MAX5484
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:
"maxim,max5481"
"maxim,max5482"
"maxim,max5483"
"maxim,max5484"
Example:
max548x: max548x@0 {
compatible = "maxim,max5482";
spi-max-frequency = <7000000>;
reg = <0>; /* chip-select */
};
* Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer
Datasheet publicly available at:
https://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
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:
"microchip,mcp41010"
"microchip,mcp41050"
"microchip,mcp41100"
"microchip,mcp42010"
"microchip,mcp42050"
"microchip,mcp42100"
Example:
potentiometer@0 {
compatible = "microchip,mcp41010";
reg = <0>;
spi-max-frequency = <500000>;
};
* Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X Digital Potentiometer
driver
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:
"microchip,mcp4131-502"
"microchip,mcp4131-103"
"microchip,mcp4131-503"
"microchip,mcp4131-104"
"microchip,mcp4132-502"
"microchip,mcp4132-103"
"microchip,mcp4132-503"
"microchip,mcp4132-104"
"microchip,mcp4141-502"
"microchip,mcp4141-103"
"microchip,mcp4141-503"
"microchip,mcp4141-104"
"microchip,mcp4142-502"
"microchip,mcp4142-103"
"microchip,mcp4142-503"
"microchip,mcp4142-104"
"microchip,mcp4151-502"
"microchip,mcp4151-103"
"microchip,mcp4151-503"
"microchip,mcp4151-104"
"microchip,mcp4152-502"
"microchip,mcp4152-103"
"microchip,mcp4152-503"
"microchip,mcp4152-104"
"microchip,mcp4161-502"
"microchip,mcp4161-103"
"microchip,mcp4161-503"
"microchip,mcp4161-104"
"microchip,mcp4162-502"
"microchip,mcp4162-103"
"microchip,mcp4162-503"
"microchip,mcp4162-104"
"microchip,mcp4231-502"
"microchip,mcp4231-103"
"microchip,mcp4231-503"
"microchip,mcp4231-104"
"microchip,mcp4232-502"
"microchip,mcp4232-103"
"microchip,mcp4232-503"
"microchip,mcp4232-104"
"microchip,mcp4241-502"
"microchip,mcp4241-103"
"microchip,mcp4241-503"
"microchip,mcp4241-104"
"microchip,mcp4242-502"
"microchip,mcp4242-103"
"microchip,mcp4242-503"
"microchip,mcp4242-104"
"microchip,mcp4251-502"
"microchip,mcp4251-103"
"microchip,mcp4251-503"
"microchip,mcp4251-104"
"microchip,mcp4252-502"
"microchip,mcp4252-103"
"microchip,mcp4252-503"
"microchip,mcp4252-104"
"microchip,mcp4261-502"
"microchip,mcp4261-103"
"microchip,mcp4261-503"
"microchip,mcp4261-104"
"microchip,mcp4262-502"
"microchip,mcp4262-103"
"microchip,mcp4262-503"
"microchip,mcp4262-104"
Example:
mcp4131: mcp4131@0 {
compatible = "mcp4131-502";
reg = <0>;
spi-max-frequency = <500000>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/potentiometer/microchip,mcp41010.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer
maintainers:
- Chris Coffey <cmc@babblebit.net>
description: |
Datasheet: https://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
properties:
compatible:
enum:
- microchip,mcp41010
- microchip,mcp41050
- microchip,mcp41100
- microchip,mcp42010
- microchip,mcp42050
- microchip,mcp42100
reg:
maxItems: 1
spi-max-frequency: true
additionalProperties: false
required:
- compatible
- reg
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
potentiometer@0 {
compatible = "microchip,mcp41010";
reg = <0>;
spi-max-frequency = <500000>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/potentiometer/microchip,mcp4131.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X Digital Potentiometer
maintainers:
- Slawomir Stepien <sst@poczta.fm>
properties:
compatible:
enum:
- microchip,mcp4131-103
- microchip,mcp4131-104
- microchip,mcp4131-502
- microchip,mcp4131-503
- microchip,mcp4132-103
- microchip,mcp4132-104
- microchip,mcp4132-502
- microchip,mcp4132-503
- microchip,mcp4141-103
- microchip,mcp4141-104
- microchip,mcp4141-502
- microchip,mcp4141-503
- microchip,mcp4142-103
- microchip,mcp4142-104
- microchip,mcp4142-502
- microchip,mcp4142-503
- microchip,mcp4151-103
- microchip,mcp4151-104
- microchip,mcp4151-502
- microchip,mcp4151-503
- microchip,mcp4152-103
- microchip,mcp4152-104
- microchip,mcp4152-502
- microchip,mcp4152-503
- microchip,mcp4161-103
- microchip,mcp4161-104
- microchip,mcp4161-502
- microchip,mcp4161-503
- microchip,mcp4162-103
- microchip,mcp4162-104
- microchip,mcp4162-502
- microchip,mcp4162-503
- microchip,mcp4231-103
- microchip,mcp4231-104
- microchip,mcp4231-502
- microchip,mcp4231-503
- microchip,mcp4232-103
- microchip,mcp4232-104
- microchip,mcp4232-502
- microchip,mcp4232-503
- microchip,mcp4241-103
- microchip,mcp4241-104
- microchip,mcp4241-502
- microchip,mcp4241-503
- microchip,mcp4242-103
- microchip,mcp4242-104
- microchip,mcp4242-502
- microchip,mcp4242-503
- microchip,mcp4251-103
- microchip,mcp4251-104
- microchip,mcp4251-502
- microchip,mcp4251-503
- microchip,mcp4252-103
- microchip,mcp4252-104
- microchip,mcp4252-502
- microchip,mcp4252-503
- microchip,mcp4261-103
- microchip,mcp4261-104
- microchip,mcp4261-502
- microchip,mcp4261-503
- microchip,mcp4262-103
- microchip,mcp4262-104
- microchip,mcp4262-502
- microchip,mcp4262-503
reg:
maxItems: 1
spi-max-frequency: true
additionalProperties: false
required:
- compatible
- reg
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
potentiometer@0 {
compatible = "mcp4131-502";
reg = <0>;
spi-max-frequency = <500000>;
};
};
...
# 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 <marex@denx.de>
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>;
};
};
...
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>;
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment