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

Configure Feed

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

dt-bindings: iio: adc: Split out QCOM VADC channel properties

Split out the common channel properties for QCOM VADC devices into a
separate file so that it can be included as a reference for devices
using them. This will be needed for the upcoming ADC5 Gen3 binding
support patch, as ADC5 Gen3 also uses all of these common properties.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Jishnu Prakash and committed by
Jonathan Cameron
9f3a352e 6de23f81

+86 -74
+84
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc-common.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/adc/qcom,spmi-vadc-common.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. SPMI PMIC ADC channels 8 + 9 + maintainers: 10 + - Jishnu Prakash <jishnu.prakash@oss.qualcomm.com> 11 + 12 + description: 13 + This defines the common properties used to define Qualcomm VADC channels. 14 + 15 + properties: 16 + reg: 17 + description: 18 + ADC channel number (PMIC-specific for versions after PMIC5 ADC). 19 + maxItems: 1 20 + 21 + label: 22 + description: 23 + ADC input of the platform as seen in the schematics. 24 + For thermistor inputs connected to generic AMUX or GPIO inputs 25 + these can vary across platform for the same pins. Hence select 26 + the platform schematics name for this channel. 27 + 28 + qcom,decimation: 29 + $ref: /schemas/types.yaml#/definitions/uint32 30 + description: 31 + This parameter is used to decrease ADC sampling rate. 32 + Quicker measurements can be made by reducing decimation ratio. 33 + 34 + qcom,pre-scaling: 35 + $ref: /schemas/types.yaml#/definitions/uint32-array 36 + description: 37 + Used for scaling the channel input signal before the signal is 38 + fed to VADC. The configuration for this node is to know the 39 + pre-determined ratio and use it for post scaling. It is a pair of 40 + integers, denoting the numerator and denominator of the fraction by which 41 + input signal is multiplied. For example, <1 3> indicates the signal is scaled 42 + down to 1/3 of its value before ADC measurement. 43 + If property is not found default value depending on chip will be used. 44 + oneOf: 45 + - items: 46 + - const: 1 47 + - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ] 48 + - items: 49 + - const: 10 50 + - const: 81 51 + 52 + qcom,ratiometric: 53 + type: boolean 54 + description: | 55 + Channel calibration type. 56 + - For compatible property "qcom,spmi-vadc", if this property is 57 + specified VADC will use the VDD reference (1.8V) and GND for 58 + channel calibration. If property is not found, channel will be 59 + calibrated with 0.625V and 1.25V reference channels, also 60 + known as absolute calibration. 61 + - For other compatible properties, if this property is specified 62 + VADC will use the VDD reference (1.875V) and GND for channel 63 + calibration. If property is not found, channel will be calibrated 64 + with 0V and 1.25V reference channels, also known as absolute calibration. 65 + 66 + qcom,hw-settle-time: 67 + $ref: /schemas/types.yaml#/definitions/uint32 68 + description: | 69 + Time between AMUX getting configured and the ADC starting 70 + conversion. The 'hw_settle_time' is an index used from valid values 71 + and programmed in hardware to achieve the hardware settling delay. 72 + 73 + qcom,avg-samples: 74 + $ref: /schemas/types.yaml#/definitions/uint32 75 + description: | 76 + Number of samples to be used for measurement. 77 + Averaging provides the option to obtain a single measurement 78 + from the ADC that is an average of multiple samples. The value 79 + selected is 2^(value). 80 + 81 + required: 82 + - reg 83 + 84 + additionalProperties: true
+2 -74
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
··· 56 56 patternProperties: 57 57 "^channel@[0-9a-f]+$": 58 58 type: object 59 - additionalProperties: false 59 + unevaluatedProperties: false 60 60 description: | 61 61 Represents the external channels which are connected to the ADC. 62 62 For compatible property "qcom,spmi-vadc" following channels, also known as ··· 64 64 configuration nodes should be defined: 65 65 VADC_REF_625MV and/or VADC_SPARE1(based on PMIC version) VADC_REF_1250MV, 66 66 VADC_GND_REF and VADC_VDD_VADC. 67 - 68 - properties: 69 - reg: 70 - maxItems: 1 71 - description: | 72 - ADC channel number. 73 - See include/dt-bindings/iio/qcom,spmi-vadc.h 74 - For PMIC7 ADC, the channel numbers are specified separately per PMIC 75 - in the PMIC-specific files in include/dt-bindings/iio/. 76 - 77 - label: 78 - description: | 79 - ADC input of the platform as seen in the schematics. 80 - For thermistor inputs connected to generic AMUX or GPIO inputs 81 - these can vary across platform for the same pins. Hence select 82 - the platform schematics name for this channel. 83 - 84 - qcom,decimation: 85 - $ref: /schemas/types.yaml#/definitions/uint32 86 - description: | 87 - This parameter is used to decrease ADC sampling rate. 88 - Quicker measurements can be made by reducing decimation ratio. 89 - 90 - qcom,pre-scaling: 91 - description: | 92 - Used for scaling the channel input signal before the signal is 93 - fed to VADC. The configuration for this node is to know the 94 - pre-determined ratio and use it for post scaling. It is a pair of 95 - integers, denoting the numerator and denominator of the fraction by which 96 - input signal is multiplied. For example, <1 3> indicates the signal is scaled 97 - down to 1/3 of its value before ADC measurement. 98 - If property is not found default value depending on chip will be used. 99 - $ref: /schemas/types.yaml#/definitions/uint32-array 100 - oneOf: 101 - - items: 102 - - const: 1 103 - - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ] 104 - - items: 105 - - const: 10 106 - - const: 81 107 - 108 - qcom,ratiometric: 109 - description: | 110 - Channel calibration type. 111 - - For compatible property "qcom,spmi-vadc", if this property is 112 - specified VADC will use the VDD reference (1.8V) and GND for 113 - channel calibration. If property is not found, channel will be 114 - calibrated with 0.625V and 1.25V reference channels, also 115 - known as absolute calibration. 116 - - For compatible property "qcom,spmi-adc5", "qcom,spmi-adc7" and 117 - "qcom,spmi-adc-rev2", if this property is specified VADC will use 118 - the VDD reference (1.875V) and GND for channel calibration. If 119 - property is not found, channel will be calibrated with 0V and 1.25V 120 - reference channels, also known as absolute calibration. 121 - type: boolean 122 - 123 - qcom,hw-settle-time: 124 - $ref: /schemas/types.yaml#/definitions/uint32 125 - description: | 126 - Time between AMUX getting configured and the ADC starting 127 - conversion. The 'hw_settle_time' is an index used from valid values 128 - and programmed in hardware to achieve the hardware settling delay. 129 - 130 - qcom,avg-samples: 131 - $ref: /schemas/types.yaml#/definitions/uint32 132 - description: | 133 - Number of samples to be used for measurement. 134 - Averaging provides the option to obtain a single measurement 135 - from the ADC that is an average of multiple samples. The value 136 - selected is 2^(value). 137 - 138 - required: 139 - - reg 67 + $ref: /schemas/iio/adc/qcom,spmi-vadc-common.yaml 140 68 141 69 allOf: 142 70 - if: