diff options
author | Andrew McRae <amcrae@google.com> | 2022-03-02 13:35:22 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-16 15:23:14 +0000 |
commit | bb733b03ecda9eb4fdff4a99ee187538092aeefd (patch) | |
tree | 381cf617554105ead38e0e3744f285467a67d6a7 | |
parent | c06b595f531bb71ee393e6220caba24805aacfd9 (diff) | |
download | chrome-ec-bb733b03ecda9eb4fdff4a99ee187538092aeefd.tar.gz |
nissa: Add Nereid initial power signal configuration
Add power signal DTS configuration for Nereid.
Does not include ADC comparator support, which is
dependent on an upstreamed feature.
BUG=b:201000950
TEST=zmake configure -b nereid
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I43f9f1279e47cc54022a4196440f11632869d6ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3499822
-rw-r--r-- | zephyr/projects/nissa/BUILD.py | 1 | ||||
-rw-r--r-- | zephyr/projects/nissa/nereid_power_signals.dts | 190 | ||||
-rw-r--r-- | zephyr/projects/nissa/prj_nereid.conf | 4 |
3 files changed, 195 insertions, 0 deletions
diff --git a/zephyr/projects/nissa/BUILD.py b/zephyr/projects/nissa/BUILD.py index 58753ef9dc..41d56411d2 100644 --- a/zephyr/projects/nissa/BUILD.py +++ b/zephyr/projects/nissa/BUILD.py @@ -44,6 +44,7 @@ register_nissa_project( here / "nereid_overlay.dts", here / "nereid_motionsense.dts", here / "nereid_keyboard.dts", + here / "nereid_power_signals.dts", ], extra_kconfig_files=[here / "prj_nereid.conf"], ) diff --git a/zephyr/projects/nissa/nereid_power_signals.dts b/zephyr/projects/nissa/nereid_power_signals.dts new file mode 100644 index 0000000000..95edfdddf5 --- /dev/null +++ b/zephyr/projects/nissa/nereid_power_signals.dts @@ -0,0 +1,190 @@ +/* Copyright 2022 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. + */ + +/ { + chosen { + intel-ap-pwrseq,espi = &espi0; + }; + + common-pwrseq { + compatible = "intel,ap-pwrseq"; + + sys-pwrok-delay = <10>; + all-sys-pwrgd-timeout = <20>; + pwrseq-espi-max-freq = <50>; + }; + + pwr-en-pp5000-s5 { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "PP5000_S5 enable output to regulator"; + enum-name = "PWR_EN_PP5000_A"; + gpios = <&gpiok 5 0>; + output; + }; + pwr-en-pp3300-s5 { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "PP3300_S5 enable output to LS"; + enum-name = "PWR_EN_PP3300_A"; + gpios = <&gpioc 5 0>; + output; + }; + pwr-pg-ec-rsmrst-odl { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "RSMRST power good from regulator"; + enum-name = "PWR_RSMRST"; + gpios = <&gpioe 1 0>; + interrupt-flags = <GPIO_INT_EDGE_BOTH>; + }; + pwr-ec-pch-rsmrst-odl { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "RSMRST output to PCH"; + enum-name = "PWR_EC_PCH_RSMRST"; + gpios = <&gpioh 0 0>; + output; + }; + pwr-slp-s0-l { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "SLP_S0_L input from PCH"; + enum-name = "PWR_SLP_S0"; + gpios = <&gpioe 4 GPIO_ACTIVE_LOW>; + interrupt-flags = <GPIO_INT_EDGE_BOTH>; + }; + pwr-slp-s3-l { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "SLP_S3_L input from PCH"; + enum-name = "PWR_SLP_S3"; + gpios = <&gpioh 3 GPIO_ACTIVE_LOW>; + interrupt-flags = <GPIO_INT_EDGE_BOTH>; + }; + pwr-slp-sus-l { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "SLP_SUS_L input from PCH"; + enum-name = "PWR_SLP_SUS"; + gpios = <&gpiog 2 GPIO_ACTIVE_LOW>; + interrupt-flags = <GPIO_INT_EDGE_BOTH>; + }; + pwr-ec-soc-dsw-pwrok { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "DSW_PWROK output to PCH"; + enum-name = "PWR_EC_SOC_DSW_PWROK"; + gpios = <&gpiol 7 0>; + output; + }; + pwr-vccst-pwrgd-od { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "VCCST_PWRGD output to PCH"; + enum-name = "PWR_VCCST_PWRGD"; + gpios = <&gpioe 5 GPIO_OPEN_DRAIN>; + output; + }; + pwr-imvp9-vrrdy-od { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "VRRDY input from IMVP9"; + enum-name = "PWR_IMVP9_VRRDY"; + gpios = <&gpioj 4 0>; + }; + pwr-pch-pwrok { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "PCH_PWROK output to PCH"; + enum-name = "PWR_PCH_PWROK"; + gpios = <&gpiod 6 GPIO_OPEN_DRAIN>; + output; + }; + pwr-ec-pch-sys-pwrok { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "SYS_PWROK output to PCH"; + enum-name = "PWR_EC_PCH_SYS_PWROK"; + gpios = <&gpiof 2 0>; + output; + }; + pwr-sys-rst-l { + compatible = "intel,ap-pwrseq-gpio"; + dbg-label = "SYS_RESET# output to PCH"; + enum-name = "PWR_SYS_RST"; + gpios = <&gpiod 1 (GPIO_ACTIVE_LOW|GPIO_OPEN_DRAIN)>; + output; + }; + pwr-slp-s4 { + compatible = "intel,ap-pwrseq-vw"; + dbg-label = "SLP_S4 virtual wire input from PCH"; + enum-name = "PWR_SLP_S4"; + virtual-wire = "ESPI_VWIRE_SIGNAL_SLP_S4"; + vw-invert; + }; + pwr-slp-s5 { + compatible = "intel,ap-pwrseq-vw"; + dbg-label = "SLP_S5 virtual wire input from PCH"; + enum-name = "PWR_SLP_S5"; + virtual-wire = "ESPI_VWIRE_SIGNAL_SLP_S5"; + vw-invert; + }; + pwr-all-sys-pwrgd { + /* + * This is a board level signal, since this + * signal needs some special processing. + */ + compatible = "intel,ap-pwrseq-external"; + dbg-label = "Combined all power good"; + enum-name = "PWR_ALL_SYS_PWRGD"; + }; + /* + * TODO: Add ADC comparators + * Temporary board based signals. + */ + pwr-dsw-pwrgd { + compatible = "intel,ap-pwrseq-external"; + dbg-label = "ADC for 3.3V"; + enum-name = "PWR_DSW_PWROK"; + }; + pwr-pg-pp1p05 { + compatible = "intel,ap-pwrseq-external"; + dbg-label = "ADC for 1.05V"; + enum-name = "PWR_PG_PP1P05"; + }; +}; + +/* + * Because the power signals directly reference the GPIOs, + * the correspinding named-gpios need to have no-auto-init set. + */ +&gpio_ec_soc_dsw_pwrok { + no-auto-init; +}; +&gpio_ec_soc_pch_pwrok_od { + no-auto-init; +}; +&gpio_ec_soc_rsmrst_l { + no-auto-init; +}; +&gpio_ec_soc_sys_pwrok { + no-auto-init; +}; +&gpio_ec_soc_vccst_pwrgd_od { + no-auto-init; +}; +&gpio_en_pp3300_s5 { + no-auto-init; +}; +&gpio_en_pp5000_s5 { + no-auto-init; +}; +&gpio_imvp91_vrrdy_od { + no-auto-init; +}; +&gpio_rsmrst_pwrgd_l { + no-auto-init; +}; +&gpio_slp_s0_l { + no-auto-init; +}; +&gpio_slp_s3_l { + no-auto-init; +}; +&gpio_slp_sus_l { + no-auto-init; +}; +&gpio_sys_rst_odl { + no-auto-init; +}; diff --git a/zephyr/projects/nissa/prj_nereid.conf b/zephyr/projects/nissa/prj_nereid.conf index 29a7073f38..8edfa56dd7 100644 --- a/zephyr/projects/nissa/prj_nereid.conf +++ b/zephyr/projects/nissa/prj_nereid.conf @@ -52,3 +52,7 @@ CONFIG_PLATFORM_EC_USB_PD_STARTUP_DELAY_MS=2000 # Charger driver and configuration CONFIG_PLATFORM_EC_CHARGER_SM5803=y CONFIG_PLATFORM_EC_OCPC_DEF_RBATT_MOHMS=21 +# Power Sequence +CONFIG_AP_PWRSEQ=y +CONFIG_X86_NON_DSX_PWRSEQ_ADL=y +CONFIG_X86_NON_DSX_PWRSEQ_CONSOLE=y |