arm64: dts: sprd: Add ADC calibration support
authorBaolin Wang <baolin.wang@linaro.org>
Wed, 13 Feb 2019 12:32:46 +0000 (20:32 +0800)
committerArnd Bergmann <arnd@arndb.de>
Mon, 18 Feb 2019 10:32:47 +0000 (11:32 +0100)
This patch adds phandles to the calibration cells provided by the Efuse
device, which is used to calibrate the ADC channel scales.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm64/boot/dts/sprd/sc2731.dtsi

index f2f2aa5..a2edc25 100644 (file)
                        #address-cells = <1>;
                        #size-cells = <1>;
                        hwlocks = <&hwlock 12>;
+
+                       adc_big_scale: calib@24 {
+                               reg = <0x24 0x2>;
+                       };
+
+                       adc_small_scale: calib@26 {
+                               reg = <0x26 0x2>;
+                       };
                };
 
                pmic_adc: adc@480 {
@@ -72,6 +80,8 @@
                        interrupts = <0>;
                        #io-channel-cells = <1>;
                        hwlocks = <&hwlock 4>;
+                       nvmem-cell-names = "big_scale_calib", "small_scale_calib";
+                       nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
                };
 
                vibrator@ec8 {