diff options
-rw-r--r-- | zephyr/projects/skyrim/BUILD.py | 1 | ||||
-rw-r--r-- | zephyr/projects/skyrim/adc.dts | 43 | ||||
-rw-r--r-- | zephyr/projects/skyrim/prj.conf | 3 |
3 files changed, 47 insertions, 0 deletions
diff --git a/zephyr/projects/skyrim/BUILD.py b/zephyr/projects/skyrim/BUILD.py index 05e9c5279d..03bade7c2f 100644 --- a/zephyr/projects/skyrim/BUILD.py +++ b/zephyr/projects/skyrim/BUILD.py @@ -9,6 +9,7 @@ def register_variant(project_name): zephyr_board="npcx9", dts_overlays=[ # Common to all projects. + here / "adc.dts", here / "battery.dts", here / "fan.dts", here / "gpio.dts", diff --git a/zephyr/projects/skyrim/adc.dts b/zephyr/projects/skyrim/adc.dts new file mode 100644 index 0000000000..b9c0c261eb --- /dev/null +++ b/zephyr/projects/skyrim/adc.dts @@ -0,0 +1,43 @@ +/* Copyright 2021 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <cros/thermistor/thermistor.dtsi> + +/ { + named-adc-channels { + compatible = "named-adc-channels"; + + adc_temp_soc: temp_soc { + label = "SOC"; + enum-name = "ADC_TEMP_SENSOR_SOC"; + channel = <0>; + }; + adc_temp_charger: temp_charger { + label = "CHARGER"; + enum-name = "ADC_TEMP_SENSOR_CHARGER"; + channel = <1>; + }; + adc_temp_memory: temp_memory { + label = "MEMORY"; + enum-name = "ADC_TEMP_SENSOR_MEMORY"; + channel = <2>; + }; + adc_core_imon1: core_imon1 { + label = "CORE_I"; + enum-name = "ADC_CORE_IMON1"; + channel = <3>; + }; + adc_core_imon2: core_imon2 { + label = "SOC_I"; + enum-name = "ADC_SOC_IMON2"; + channel = <4>; + }; + }; + +}; + +&adc0 { + status = "okay"; +}; diff --git a/zephyr/projects/skyrim/prj.conf b/zephyr/projects/skyrim/prj.conf index b0592a37a6..acc6df5602 100644 --- a/zephyr/projects/skyrim/prj.conf +++ b/zephyr/projects/skyrim/prj.conf @@ -26,6 +26,9 @@ CONFIG_PLATFORM_EC_PORT80=y # Power button CONFIG_PLATFORM_EC_POWER_BUTTON=y +# ADC +CONFIG_PLATFORM_EC_ADC=y + # External power CONFIG_PLATFORM_EC_HOSTCMD=y CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y |