diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2019-01-18 23:52:23 +0100 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2019-02-11 21:52:26 +0100 |
commit | f4c6e8e223c2c77cd3bdde4c9da280fb2338aa5b (patch) | |
tree | e8e66bd181c44f2a96462d62682eb2f09bbd0615 /arch/arm/boot/dts/meson8.dtsi | |
parent | ARM: dts: meson8m2: use the Meson8m2 specific SAR ADC compatible (diff) | |
download | linux-f4c6e8e223c2c77cd3bdde4c9da280fb2338aa5b.tar.xz linux-f4c6e8e223c2c77cd3bdde4c9da280fb2338aa5b.zip |
ARM: dts: meson8: add the temperature calibration data for the SAR ADC
The SAR ADC can measure the chip temperature of the SoC. This only
works if the chip is calibrated and if the calibration data is written
to the correct registers. The calibration data is stored in the upper
two bytes of eFuse offset 0x1f4.
This adds the eFuse cell for the temperature calibration data and
passes it to the SAR ADC. We also need to pass the HHI sysctrl node to
the SAR ADC because the 4th TSC (temperature sensor calibration
coefficient) bit is stored in the HHI region (unlike bits [3:0] which
are stored directly inside the SAR ADC's register area).
On boards that have the SAR ADC enabled channel 8 can be used to
measure the chip temperature.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'arch/arm/boot/dts/meson8.dtsi')
-rw-r--r-- | arch/arm/boot/dts/meson8.dtsi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 66b167537aaa..a9781243453e 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -449,6 +449,11 @@ compatible = "amlogic,meson8-efuse"; clocks = <&clkc CLKID_EFUSE>; clock-names = "core"; + + temperature_calib: calib@1f4 { + /* only the upper two bytes are relevant */ + reg = <0x1f4 0x4>; + }; }; ðmac { @@ -536,6 +541,9 @@ clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_SAR_ADC>; clock-names = "clkin", "core"; + amlogic,hhi-sysctrl = <&hhi>; + nvmem-cells = <&temperature_calib>; + nvmem-cell-names = "temperature_calib"; }; &sdio { |