summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-04 00:10:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-04 00:10:58 +0300
commit332037d4bb28ee6ca1fb6e945be425ecf15da9f8 (patch)
treefcf355acece697f171d3417d6a278b51d796adb4 /Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml
parent1de16e38f1fdbfd9d842a06919098813ed93abf7 (diff)
parent560c6b914c6ec7d9d9a69fddbb5bf3bf71433e8b (diff)
downloadlinux-332037d4bb28ee6ca1fb6e945be425ecf15da9f8.tar.xz
Merge tag 'iio-for-5.11b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: 2nd set of IIO device support, features, cleanups and yaml conversions for 5.11 v2: Fix some missing Sign offs from me that Greg found in v1. Includes low priority/late breaking/long standing bug fixes. Note this includes the last few patches that were listed in the description for the previous pull request but weren't actually in the PULL. New devices support * bosch,bmc150-accel - Support for BMA222, including adding binding doc that was previously missing. * st,lsm6dsx - Support LSM6DSOP accelerometer + gyroscope sensor. yaml-conversions by manufacturer * core - adc - iio-binding (drop as now in dt-schema) - temperature (drop as not clear it is generic) * generic (no specific manufacturer) - dpot-dac - current-sense-amplifier - current-sense-shunt - envelope-detector - voltage-divider * adi,ad5592r adi,ad7124 adi,ad7292 adi,adf4350 * atmel,sama9260-adc * bosch,bma180 bosch,bmg180 * brcm,iproc-static-adc * capella,cm3605 * fsl,mma8452 * kionix,kxcjk1013 * maxim,max1027 (from trivial) * mediatek,mt2701-auxdac * microchip,mcp4531 (from trivial) * qcom,pm8018-adc qcom,spi-iadc * st,st-sensors * ti,ads124s08 ti,afe4403 ti,afe4404 ti,lmp91000 ti,palmas-gpadc Features * bosch,bmc150 - Handle unusual ACPI binding where two devices are provided in a single ACPI device (BOSC0200). - ACPI based mount matrix handling * st,hts221 - regulator control * st,lsm6dsx - regulator control Cleanup + minor fixes * core - Reduce duplication in iio_format_avail_{list,range}() and iio_format_list() - Fix an issue in the demux update code that could lead to misaligned data. Possible no existing driver hits this. Been there a very long time with no bug reports. - Improve iio_map_array_register() error handling. - Avoid polling driver again if try_reenable() callback returns non 0. Only users of this were bugs so also drop the return value. * core/cb_buffer - Return an error if no callback provided (include adding a dummy for one unusual case where no callback is valid). * trigger/hrtimer-trig, sysfs-trig - Fix an issue seen with PREEMPT_RT by marking irq_work as expiring in hard interrupt context. * adi,ad_sigma_delta library - Avoid putting SPI transfer buffers on stack for DMA safety reasons * adi,ad5272 - Fix discrepancy in polarity of reset line between binding documentation (which was right) and driver. * adi,ad7298 - Use devm for all of probe * atmel,at91_adc - Drop at91_adc_ids as only support DT probe - Simplify resolution selection and bindings - Drop binding for triggers and move into driver based on compatible. - Merge at91_adc_probe_dt() into main at91_adc_probe() * bosch,bmc150 - Drop unused structure member. * bosch,bmi160 - Fix overly long buffer due to wrong channel count. - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * fsl,mag3110 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * fsl,mpl3115 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * invn,mpu3050 - Use 64 bit local variable and FIELD_GET to simplify code that extracts values from OTP. * qcom,spmi-vadc - Drop wrong use of io-channel-ranges in binding doc. * rockchip,saradc - Fix a missing clk_disable_unprepare() in an error path. * rohm,rpr0521 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * samsung,exynos-adc - Drop wrong use of io-channel-ranges in binding doc. * st,lsm6dsx - Reduce duplication in the chip model specific tables. - Fix an issue with missed edge-interrupts that can occur when using the FIFO. * st,uvis21 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * ti,adc084s021 - Tidy up endian types to clear a warning. * ti,ads124s08 - Fix too long a buffer. - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() Counter * microchip,tcb-counter - Add Kamel Bouhara to MAINTAINERS - Fix CMR value check * tag 'iio-for-5.11b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (80 commits) iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume iio: imu: st_lsm6dsx: fix edge-trigger interrupts counter: microchip-tcb-capture: Fix CMR value check iio: sysfs-trigger: Mark irq_work to expire in hardirq context iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context iio: accel: bmc150: Get mount-matrix from ACPI iio: accel: bmc150: Check for a second ACPI device for BOSC0200 iio: accel: bmc150: Removed unused bmc150_accel_dat irq member iio:gyro:mpu3050 Treat otp value as a __le64 and use FIELD_GET() to break up iio:adc:ti-ads124s08: Fix alignment and data leak issues. iio:adc:ti-ads124s08: Fix buffer being too long. iio:pressure:mpl3115: Force alignment of buffer iio:imu:bmi160: Fix alignment and data leak issues iio:imu:bmi160: Fix too large a buffer. iio:magnetometer:mag3110: Fix alignment and data leak issues. iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. iio:light:rpr0521: Fix timestamp alignment and prevent data leak. iio:adc:ti-adc084s021 Tidy up endian types iio:trigger: rename try_reenable() to reenable() plus return void iio: Fix: Do not poll the driver again if try_reenable() callback returns non 0. ...
Diffstat (limited to 'Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml')
-rw-r--r--Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml166
1 files changed, 166 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml
new file mode 100644
index 000000000000..d186b713d6a7
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml
@@ -0,0 +1,166 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/qcom,pm8018-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm's PM8xxx voltage XOADC
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+description: |
+ The Qualcomm PM8xxx PMICs contain a HK/XO ADC (Housekeeping/Crystal
+ oscillator ADC) encompassing PM8018, PM8038, PM8058 and PM8921.
+
+properties:
+ compatible:
+ enum:
+ - qcom,pm8018-adc
+ - qcom,pm8038-adc
+ - qcom,pm8058-adc
+ - qcom,pm8921-adc
+
+ reg:
+ maxItems: 1
+ description:
+ ADC base address in the PMIC, typically 0x197.
+
+ xoadc-ref-supply:
+ description:
+ The reference voltage may vary with PMIC variant but is typically
+ something like 2.2 or 1.8V.
+
+ interrupts:
+ maxItems: 1
+
+ "#address-cells":
+ const: 2
+ description:
+ The first cell is the prescaler (on PM8058) or premux (on PM8921)
+ with two valid bits so legal values are 0x00, 0x01 or 0x02.
+ The second cell is the main analog mux setting (0x00..0x0f).
+ The combination of prescaler/premux and analog mux uniquely addresses
+ a hardware channel on all systems.
+
+ "#size-cells":
+ const: 0
+
+ "#io-channel-cells":
+ const: 2
+ description:
+ The cells are precaler or premux followed by the analog muxing line.
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - "#io-channel-cells"
+ - "#address-cells"
+ - "#size-cells"
+ - adc-channel@c
+ - adc-channel@d
+ - adc-channel@f
+
+patternProperties:
+ "^(adc-channel@)[0-9a-f]$":
+ type: object
+ description: |
+ ADC channel specific configuration.
+ Note that channels c, d and f must be present for calibration.
+ These three nodes are used for absolute and ratiometric calibration
+ and only need to have these reg values: they are by hardware definition
+ 1:1 ratio converters that sample 625, 1250 and 0 milliV and create
+ an interpolation calibration for all other ADCs.
+
+ properties:
+ reg:
+ maxItems: 1
+
+ qcom,decimation:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ This parameter is used to decrease the ADC sampling rate.
+ Quicker measurements can be made by reducing the decimation ratio.
+ Valid values are 512, 1024, 2048, 4096.
+ If the property is not found, a default value of 512 will be used.
+
+ qcom,ratiometric:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Channel calibration type. If this property is specified
+ VADC will use a special voltage references for channel
+ calibration. The available references are specified in the
+ as a u32 value setting (see below) and it is compulsory
+ to also specify this reference if ratiometric calibration
+ is selected.
+
+ If the property is not found, the channel will be
+ calibrated with the 0.625V and 1.25V reference channels, also
+ known as an absolute calibration.
+
+ The reference voltage pairs when using ratiometric calibration:
+ 0 = XO_IN/XOADC_GND
+ 1 = PMIC_IN/XOADC_GND
+ 2 = PMIC_IN/BMS_CSP
+ 3 (invalid)
+ 4 = XOADC_GND/XOADC_GND
+ 5 = XOADC_VREF/XOADC_GND
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@197 {
+ compatible = "qcom,pm8058-adc";
+ reg = <0x197>;
+ interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #io-channel-cells = <2>;
+
+ vcoin: adc-channel@0 {
+ reg = <0x00 0x00>;
+ };
+ vbat: adc-channel@1 {
+ reg = <0x00 0x01>;
+ };
+ dcin: adc-channel@2 {
+ reg = <0x00 0x02>;
+ };
+ ichg: adc-channel@3 {
+ reg = <0x00 0x03>;
+ };
+ vph_pwr: adc-channel@4 {
+ reg = <0x00 0x04>;
+ };
+ usb_vbus: adc-channel@a {
+ reg = <0x00 0x0a>;
+ };
+ die_temp: adc-channel@b {
+ reg = <0x00 0x0b>;
+ };
+ ref_625mv: adc-channel@c {
+ reg = <0x00 0x0c>;
+ };
+ ref_1250mv: adc-channel@d {
+ reg = <0x00 0x0d>;
+ };
+ ref_325mv: adc-channel@e {
+ reg = <0x00 0x0e>;
+ };
+ ref_muxoff: adc-channel@f {
+ reg = <0x00 0x0f>;
+ };
+ };
+ };
+...