summaryrefslogtreecommitdiff
path: root/zephyr/program/skyrim/frostflow
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/program/skyrim/frostflow')
-rw-r--r--zephyr/program/skyrim/frostflow/CMakeLists.txt15
-rw-r--r--zephyr/program/skyrim/frostflow/battery.dtsi12
-rw-r--r--zephyr/program/skyrim/frostflow/frostflow.dtsi223
-rw-r--r--zephyr/program/skyrim/frostflow/include/keyboard_customization.h78
-rw-r--r--zephyr/program/skyrim/frostflow/led_pins.dtsi59
-rw-r--r--zephyr/program/skyrim/frostflow/led_policy.dtsi122
-rw-r--r--zephyr/program/skyrim/frostflow/motionsense.dtsi135
-rw-r--r--zephyr/program/skyrim/frostflow/project.conf33
-rw-r--r--zephyr/program/skyrim/frostflow/project.overlay19
-rw-r--r--zephyr/program/skyrim/frostflow/src/keyboard.c74
-rw-r--r--zephyr/program/skyrim/frostflow/src/keyboard_customization.c85
-rw-r--r--zephyr/program/skyrim/frostflow/src/ppc_config.c46
-rw-r--r--zephyr/program/skyrim/frostflow/src/thermal.c109
-rw-r--r--zephyr/program/skyrim/frostflow/src/usb_mux_config.c62
14 files changed, 0 insertions, 1072 deletions
diff --git a/zephyr/program/skyrim/frostflow/CMakeLists.txt b/zephyr/program/skyrim/frostflow/CMakeLists.txt
deleted file mode 100644
index dd7eae2384..0000000000
--- a/zephyr/program/skyrim/frostflow/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2022 The ChromiumOS Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-cros_ec_library_include_directories_ifdef(CONFIG_BOARD_FROSTFLOW include)
-zephyr_include_directories("include")
-zephyr_library_sources(
- "src/usb_mux_config.c"
- "src/ppc_config.c"
- "src/thermal.c"
-)
-zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD_CUSTOMIZATION
- "src/keyboard.c"
- "src/keyboard_customization.c"
-)
diff --git a/zephyr/program/skyrim/frostflow/battery.dtsi b/zephyr/program/skyrim/frostflow/battery.dtsi
deleted file mode 100644
index 2d6b28de70..0000000000
--- a/zephyr/program/skyrim/frostflow/battery.dtsi
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/ {
- batteries {
- default_battery: cdt_c340152 {
- compatible = "cdt,c340152", "battery-smart";
- };
- };
-};
diff --git a/zephyr/program/skyrim/frostflow/frostflow.dtsi b/zephyr/program/skyrim/frostflow/frostflow.dtsi
deleted file mode 100644
index 1cadf7ee2d..0000000000
--- a/zephyr/program/skyrim/frostflow/frostflow.dtsi
+++ /dev/null
@@ -1,223 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <dt-bindings/usbc_mux.h>
-
-#include "../i2c.dtsi"
-
-/ {
- named-gpios {
- /* Frostflow-specific GPIO customizations */
- };
-
- named-temp-sensors {
- compatible = "cros-ec,temp-sensors";
- temp_soc: soc-pct2075 {
- temp_host_high = <75>;
- temp_host_halt = <80>;
- temp_host_release_high = <65>;
- temp_host_release_halt = <70>;
- power-good-pin = <&gpio_pg_pwr_s5>;
- sensor = <&soc_pct2075>;
- };
- temp_amb: amb-pct2075 {
- temp_host_high = <65>;
- temp_host_halt = <70>;
- temp_host_release_high = <55>;
- temp_host_release_halt = <60>;
- temp_fan_off = <32>;
- temp_fan_max = <45>;
- power-good-pin = <&gpio_pg_pwr_s5>;
- sensor = <&amb_pct2075>;
- };
- };
-
- /* Rotation matrices for motion sensors. */
- motionsense-rotation-ref {
- compatible = "cros-ec,motionsense-rotation-ref";
- lid_rot_ref: lid-rotation-ref {
- mat33 = <1 0 0
- 0 1 0
- 0 0 1>;
- };
-
- base_rot_ref: base-rotation-ref {
- mat33 = <0 1 0
- 1 0 0
- 0 0 (-1)>;
- };
- };
-
- ppc_port0: aoz1380 {
- compatible = "aoz,aoz1380";
- status = "okay";
- };
-
- fan_steps_clamshell: fan-steps-clamshell {
- compatible = "cros-ec,fan-steps";
- level_0 {
- temp_on = <(-1) (-1) (-1) (-1) 31>;
- temp_off = <(-1) (-1) (-1) (-1) 99>;
- rpm_target = <0>;
- };
- level_1 {
- temp_on = <(-1) (-1) (-1) (-1) 32>;
- temp_off = <(-1) (-1) (-1) (-1) 30>;
- rpm_target = <2600>;
- };
- level_2 {
- temp_on = <(-1) (-1) (-1) (-1) 34>;
- temp_off = <(-1) (-1) (-1) (-1) 31>;
- rpm_target = <2900>;
- };
- level_3 {
- temp_on = <(-1) (-1) (-1) (-1) 36>;
- temp_off = <(-1) (-1) (-1) (-1) 33>;
- rpm_target = <3600>;
- };
- level_4 {
- temp_on = <(-1) (-1) (-1) (-1) 38>;
- temp_off = <(-1) (-1) (-1) (-1) 35>;
- rpm_target = <4200>;
- };
- level_5 {
- temp_on = <(-1) (-1) (-1) (-1) 45>;
- temp_off = <(-1) (-1) (-1) (-1) 37>;
- rpm_target = <4600>;
- };
- };
-
- fan_steps_tablet: fan-steps-tablet {
- compatible = "cros-ec,fan-steps";
- level_0 {
- temp_on = <(-1) (-1) (-1) (-1) 31>;
- temp_off = <(-1) (-1) (-1) (-1) 99>;
- rpm_target = <0>;
- };
- level_1 {
- temp_on = <(-1) (-1) (-1) (-1) 32>;
- temp_off = <(-1) (-1) (-1) (-1) 30>;
- rpm_target = <2600>;
- };
- level_2 {
- temp_on = <(-1) (-1) (-1) (-1) 34>;
- temp_off = <(-1) (-1) (-1) (-1) 31>;
- rpm_target = <2900>;
- };
- level_3 {
- temp_on = <(-1) (-1) (-1) (-1) 36>;
- temp_off = <(-1) (-1) (-1) (-1) 33>;
- rpm_target = <3600>;
- };
- level_4 {
- temp_on = <(-1) (-1) (-1) (-1) 38>;
- temp_off = <(-1) (-1) (-1) (-1) 35>;
- rpm_target = <4200>;
- };
- level_5 {
- temp_on = <(-1) (-1) (-1) (-1) 45>;
- temp_off = <(-1) (-1) (-1) (-1) 37>;
- rpm_target = <4600>;
- };
- };
-};
-
-&i2c1_0 {
- ppc_port1: nx20p348x@71 {
- compatible = "nxp,nx20p348x";
- status = "okay";
- reg = <0x71>;
- };
- ps8818_port1: ps8818@28 {
- compatible = "parade,ps8818";
- reg = <0x28>;
- flags = <(USB_MUX_FLAG_RESETS_IN_G3)>;
- board-set = "board_c1_ps8818_mux_set";
- };
-};
-
-&i2c4_1 {
- charger: isl9241@9 {
- compatible = "intersil,isl9241";
- status = "okay";
- reg = <0x9>;
- };
-};
-
-&amd_fp6_port0 {
- board-set = "board_c0_amd_fp6_mux_set";
-};
-
-&usbc_port0 {
- ppc = <&ppc_port0>;
- usb-mux-chain-0 {
- compatible = "cros-ec,usb-mux-chain";
- usb-muxes = <&amd_fp6_port0>;
- };
-};
-
-&usbc_port1 {
- ppc = <&ppc_port1>;
- usb-mux-chain-1-ps8818 {
- compatible = "cros-ec,usb-mux-chain";
- usb-muxes = <&amd_fp6_port1 &ps8818_port1>;
- };
-};
-
-&cros_kb_raw {
- pinctrl-0 = <
- &ksi0_gp31
- &ksi1_gp30
- &ksi2_gp27
- &ksi3_gp26
- &ksi4_gp25
- &ksi5_gp24
- &ksi6_gp23
- &ksi7_gp22
- &kso00_gp21
- &kso01_gp20
- &kso03_gp16
- &kso04_gp15
- &kso05_gp14
- &kso06_gp13
- &kso07_gp12
- &kso08_gp11
- &kso09_gp10
- &kso10_gp07
- &kso11_gp06
- &kso12_gp05
- &kso13_gp04
- &kso14_gp82
- >;
-};
-
-&temp_sensor_charger {
- temp_host_high = <75>;
- temp_host_halt = <80>;
- temp_host_release_high = <65>;
- temp_host_release_halt = <70>;
-};
-
-&temp_sensor_memory {
- temp_host_high = <75>;
- temp_host_halt = <80>;
- temp_host_release_high = <65>;
- temp_host_release_halt = <70>;
-};
-
-&temp_sensor_cpu {
- /delete-property/ temp_host_high;
- /delete-property/ temp_host_halt;
- /delete-property/ temp_host_release_high;
- /delete-property/ temp_fan_off;
- /delete-property/ temp_fan_max;
-};
-
-&fan0 {
- pwms = <&pwm0 0 PWM_KHZ(25) PWM_POLARITY_NORMAL>;
- rpm_min = <2400>;
- rpm_start = <2600>;
- rpm_max = <4600>;
-};
diff --git a/zephyr/program/skyrim/frostflow/include/keyboard_customization.h b/zephyr/program/skyrim/frostflow/include/keyboard_customization.h
deleted file mode 100644
index 2d2a997f91..0000000000
--- a/zephyr/program/skyrim/frostflow/include/keyboard_customization.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* Keyboard configuration */
-
-#ifndef __KEYBOARD_CUSTOMIZATION_H
-#define __KEYBOARD_CUSTOMIZATION_H
-
-/*
- * KEYBOARD_COLS_MAX has the build time column size. It's used to allocate
- * exact spaces for arrays. Actual keyboard scanning is done using
- * keyboard_cols, which holds a runtime column size.
- */
-#ifdef CONFIG_KEYBOARD_CUSTOMIZATION
-#undef KEYBOARD_COLS_MAX
-#undef KEYBOARD_ROWS
-
-#define KEYBOARD_COLS_MAX 15
-#define KEYBOARD_ROWS 8
-#endif
-
-/*
- * WARNING: Do not directly modify it. You should call keyboard_raw_set_cols,
- * instead. It checks whether you're eligible or not.
- */
-extern uint8_t keyboard_cols;
-
-#define KEYBOARD_ROW_TO_MASK(r) (1 << (r))
-
-/* Columns and masks for keys we particularly care about */
-#define KEYBOARD_COL_DOWN 11
-#define KEYBOARD_ROW_DOWN 5
-#define KEYBOARD_MASK_DOWN KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_DOWN)
-#define KEYBOARD_COL_ESC 1
-#define KEYBOARD_ROW_ESC 1
-#define KEYBOARD_MASK_ESC KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_ESC)
-#define KEYBOARD_COL_KEY_H 6
-#define KEYBOARD_ROW_KEY_H 1
-#define KEYBOARD_MASK_KEY_H KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_H)
-#define KEYBOARD_COL_KEY_R 3
-#define KEYBOARD_ROW_KEY_R 7
-#define KEYBOARD_MASK_KEY_R KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_R)
-#define KEYBOARD_COL_LEFT_ALT 10
-#define KEYBOARD_ROW_LEFT_ALT 6
-#define KEYBOARD_MASK_LEFT_ALT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_ALT)
-#define KEYBOARD_COL_REFRESH 2
-#define KEYBOARD_ROW_REFRESH 3
-#define KEYBOARD_MASK_REFRESH KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_REFRESH)
-#define KEYBOARD_COL_RIGHT_ALT 10
-#define KEYBOARD_ROW_RIGHT_ALT 0
-#define KEYBOARD_MASK_RIGHT_ALT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_RIGHT_ALT)
-#define KEYBOARD_DEFAULT_COL_VOL_UP 4
-#define KEYBOARD_DEFAULT_ROW_VOL_UP 1
-#define KEYBOARD_COL_LEFT_CTRL 0
-#define KEYBOARD_ROW_LEFT_CTRL 2
-#define KEYBOARD_MASK_LEFT_CTRL KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_CTRL)
-#define KEYBOARD_COL_RIGHT_CTRL 0
-#define KEYBOARD_ROW_RIGHT_CTRL 4
-#define KEYBOARD_MASK_RIGHT_CTRL KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_RIGHT_CTRL)
-#define KEYBOARD_COL_SEARCH 0
-#define KEYBOARD_ROW_SEARCH 3
-#define KEYBOARD_MASK_SEARCH KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_SEARCH)
-#define KEYBOARD_COL_KEY_0 9
-#define KEYBOARD_ROW_KEY_0 0
-#define KEYBOARD_MASK_KEY_0 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_0)
-#define KEYBOARD_COL_KEY_1 1
-#define KEYBOARD_ROW_KEY_1 7
-#define KEYBOARD_MASK_KEY_1 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_1)
-#define KEYBOARD_COL_KEY_2 4
-#define KEYBOARD_ROW_KEY_2 6
-#define KEYBOARD_MASK_KEY_2 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_2)
-#define KEYBOARD_COL_LEFT_SHIFT 7
-#define KEYBOARD_ROW_LEFT_SHIFT 1
-#define KEYBOARD_MASK_LEFT_SHIFT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_SHIFT)
-
-#endif /* __KEYBOARD_CUSTOMIZATION_H */
diff --git a/zephyr/program/skyrim/frostflow/led_pins.dtsi b/zephyr/program/skyrim/frostflow/led_pins.dtsi
deleted file mode 100644
index 78b9a59c40..0000000000
--- a/zephyr/program/skyrim/frostflow/led_pins.dtsi
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/ {
- pwmleds {
- compatible = "pwm-leds";
- pwm_y: pwm_y {
- pwms = <&pwm2 0 PWM_HZ(100) PWM_POLARITY_INVERTED>;
- };
- pwm_w: pwm_w {
- pwms = <&pwm3 0 PWM_HZ(100) PWM_POLARITY_INVERTED>;
- };
- };
-
- pwm-led-pins {
- compatible = "cros-ec,pwm-led-pins";
-
- color_off: color-off {
- led-color = "LED_OFF";
- led-id = "EC_LED_ID_BATTERY_LED";
- led-pwms = <&pwm_y &pwm_w>;
- led-values = <0 0>;
- };
-
- color_amber: color-amber {
- led-color = "LED_AMBER";
- led-id = "EC_LED_ID_BATTERY_LED";
- br-color = "EC_LED_COLOR_AMBER";
- led-pwms = <&pwm_y &pwm_w>;
- led-values = <100 0>;
- };
-
- color_white: color-white {
- led-color = "LED_WHITE";
- led-id = "EC_LED_ID_BATTERY_LED";
- br-color = "EC_LED_COLOR_WHITE";
- led-pwms = <&pwm_y &pwm_w>;
- led-values = <0 100>;
- };
- };
-};
-
-/* Amber "battery charging" LED */
-&pwm2 {
- status = "okay";
- clock-bus = "NPCX_CLOCK_BUS_LFCLK";
- pinctrl-0 = <&pwm2_gpc4>;
- pinctrl-names = "default";
-};
-
-/* White "battery full" LED */
-&pwm3 {
- status = "okay";
- clock-bus = "NPCX_CLOCK_BUS_LFCLK";
- pinctrl-0 = <&pwm3_gp80>;
- pinctrl-names = "default";
-};
diff --git a/zephyr/program/skyrim/frostflow/led_policy.dtsi b/zephyr/program/skyrim/frostflow/led_policy.dtsi
deleted file mode 100644
index e5875640fb..0000000000
--- a/zephyr/program/skyrim/frostflow/led_policy.dtsi
+++ /dev/null
@@ -1,122 +0,0 @@
-/ {
- led-colors {
- compatible = "cros-ec,led-policy";
-
- power-state-charge {
- charge-state = "PWR_STATE_CHARGE";
- /* Battery percent range (>= Empty, <= 94%) */
- batt-lvl = <0 94>;
-
- color-0 {
- led-color = <&color_amber>;
- };
- };
-
- power-state-charge-lvl-2 {
- charge-state = "PWR_STATE_CHARGE";
- /* Battery percent range (>= 95%, <= Near Full) */
- batt-lvl = <95 97>;
-
- color-0 {
- led-color = <&color_white>;
- };
- };
-
- power-state-near-full {
- charge-state = "PWR_STATE_CHARGE_NEAR_FULL";
-
- color-0 {
- led-color = <&color_white>;
- };
- };
-
- power-state-discharge-s0 {
- charge-state = "PWR_STATE_DISCHARGE";
- chipset-state = "POWER_S0";
- /* Battery percent range (>= 11%, <= Full) */
- batt-lvl = <11 100>;
-
- color-0 {
- led-color = <&color_white>;
- };
- };
-
- power-state-discharge-s0-batt-low {
- charge-state = "PWR_STATE_DISCHARGE";
- chipset-state = "POWER_S0";
- /* Battery percent range (>= Empty, <= 10%) */
- batt-lvl = <0 10>;
-
- /* Amber 1 sec, off 3 sec */
- color-0 {
- led-color = <&color_amber>;
- period-ms = <1000>;
- };
- color-1 {
- led-color = <&color_off>;
- period-ms = <3000>;
- };
- };
-
- power-state-discharge-s3 {
- charge-state = "PWR_STATE_DISCHARGE";
- chipset-state = "POWER_S3";
-
- /* White 1 sec, off 3 sec */
- color-0 {
- led-color = <&color_white>;
- period-ms = <1000>;
- };
- color-1 {
- led-color = <&color_off>;
- period-ms = <3000>;
- };
- };
-
- power-state-discharge-s5 {
- charge-state = "PWR_STATE_DISCHARGE";
- chipset-state = "POWER_S5";
-
- color-0 {
- led-color = <&color_off>;
- };
- };
-
- power-state-error-s0 {
- charge-state = "PWR_STATE_ERROR";
- chipset-state = "POWER_S0";
- /* Amber 1 sec, off 1 sec */
- color-0 {
- led-color = <&color_amber>;
- period-ms = <1000>;
- };
- color-1 {
- led-color = <&color_off>;
- period-ms = <1000>;
- };
- };
-
- power-state-error-s3 {
- charge-state = "PWR_STATE_ERROR";
- chipset-state = "POWER_S3";
- /* White 1 sec, off 3 sec */
- color-0 {
- led-color = <&color_white>;
- period-ms = <1000>;
- };
- color-1 {
- led-color = <&color_off>;
- period-ms = <3000>;
- };
- };
-
- power-state-error-s5 {
- charge-state = "PWR_STATE_ERROR";
- chipset-state = "POWER_S5";
-
- color-0 {
- led-color = <&color_off>;
- };
- };
- };
-};
diff --git a/zephyr/program/skyrim/frostflow/motionsense.dtsi b/zephyr/program/skyrim/frostflow/motionsense.dtsi
deleted file mode 100644
index f943bea4c8..0000000000
--- a/zephyr/program/skyrim/frostflow/motionsense.dtsi
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <dt-bindings/motionsense/utils.h>
-
-
-/ {
- aliases {
- /*
- * motion sense's <>_INT_EVENT is handled
- * by alias. Using the alias, each driver creates
- * its own <>_INT_EVENT.
- */
- bmi3xx-int = &base_accel;
- };
-
- /*
- * Declare mutexes used by sensor drivers.
- * A mutex node is used to create an instance of mutex_t.
- * A mutex node is referenced by a sensor node if the
- * corresponding sensor driver needs to use the
- * instance of the mutex.
- */
- motionsense-mutex {
- compatible = "cros-ec,motionsense-mutex";
- lid_mutex: lid-mutex {
- };
-
- mutex_bmi3xx: bmi3xx-mutex {
- };
- };
-
- /*
- * Driver specific data. A driver-specific data can be shared with
- * different motion sensors while they are using the same driver.
- *
- * If a node's compatible starts with "cros-ec,accelgyro-", it is for
- * a common structure defined in accelgyro.h.
- * e.g) compatible = "cros-ec,accelgyro-als-drv-data" is for
- * "struct als_drv_data_t" in accelgyro.h
- */
- motionsense-sensor-data {
- bma4xx_data: bma4xx-drv-data {
- compatible = "cros-ec,drvdata-bma4xx";
- status = "okay";
- };
-
- bmi3xx_data: bmi3xx-drv-data {
- compatible = "cros-ec,drvdata-bmi3xx";
- status = "okay";
- };
- };
-
- /*
- * List of motion sensors that creates motion_sensors array.
- * The nodelabel "lid_accel" and "base_accel" are used to indicate
- * motion sensor IDs for lid angle calculation.
- */
- motionsense-sensor {
- lid_accel: lid-accel {
- compatible = "cros-ec,bma4xx";
- status = "okay";
-
- active-mask = "SENSOR_ACTIVE_S0_S3";
- location = "MOTIONSENSE_LOC_LID";
- mutex = <&lid_mutex>;
- port = <&i2c_sensor>;
- drv-data = <&bma4xx_data>;
- rot-standard-ref = <&lid_rot_ref>;
- default-range = <2>;
- configs {
- compatible =
- "cros-ec,motionsense-sensor-config";
- ec-s0 {
- odr = <(12500 | ROUND_UP_FLAG)>;
- ec-rate = <100>;
- };
- ec-s3 {
- odr = <(12500 | ROUND_UP_FLAG)>;
- };
- };
- };
-
- base_accel: base-accel {
- compatible = "cros-ec,bmi3xx-accel";
- status = "okay";
-
- active-mask = "SENSOR_ACTIVE_S0_S3";
- location = "MOTIONSENSE_LOC_BASE";
- mutex = <&mutex_bmi3xx>;
- port = <&i2c_sensor>;
- rot-standard-ref = <&base_rot_ref>;
- drv-data = <&bmi3xx_data>;
-
- configs {
- compatible =
- "cros-ec,motionsense-sensor-config";
- ec-s0 {
- odr = <(12500 | ROUND_UP_FLAG)>;
- ec-rate = <100>;
- };
- ec-s3 {
- odr = <(12500 | ROUND_UP_FLAG)>;
- };
- };
- };
-
- base-gyro {
- compatible = "cros-ec,bmi3xx-gyro";
- status = "okay";
-
- active-mask = "SENSOR_ACTIVE_S0_S3";
- location = "MOTIONSENSE_LOC_BASE";
- mutex = <&mutex_bmi3xx>;
- port = <&i2c_sensor>;
- rot-standard-ref = <&base_rot_ref>;
- drv-data = <&bmi3xx_data>;
- };
- };
-
- motionsense-sensor-info {
- compatible = "cros-ec,motionsense-sensor-info";
-
- /*
- * list of GPIO interrupts that have to
- * be enabled at initial stage
- */
- sensor-irqs = <&int_accel_gyro>;
-
- /* list of sensors in force mode */
- accel-force-mode-sensors = <&lid_accel>;
- };
-};
diff --git a/zephyr/program/skyrim/frostflow/project.conf b/zephyr/program/skyrim/frostflow/project.conf
deleted file mode 100644
index 02da02d35d..0000000000
--- a/zephyr/program/skyrim/frostflow/project.conf
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 2022 The ChromiumOS Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Frostflow reference-board-specific Kconfig settings.
-CONFIG_BOARD_FROSTFLOW=y
-CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT_DERATE_PCT=10
-
-# TODO(b/215404321): Remove later in board development
-CONFIG_PLATFORM_EC_EEPROM_CBI_WP=y
-CONFIG_PLATFORM_EC_SYSTEM_UNLOCKED=n
-
-# LED
-CONFIG_PLATFORM_EC_LED_DT=y
-
-# Frostflow is capable of sinking 45W
-CONFIG_PLATFORM_EC_PD_MAX_POWER_MW=45000
-CONFIG_PLATFORM_EC_PD_MAX_CURRENT_MA=3000
-CONFIG_PLATFORM_EC_PD_MAX_VOLTAGE_MV=20000
-CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON=15000
-
-# Keyboard
-CONFIG_PLATFORM_EC_KEYBOARD_CUSTOMIZATION=y
-
-# Frostflow not have the USB HUB
-CONFIG_BOARD_USB_HUB_RESET=n
-
-# Battery
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
-
-# Fan
-CONFIG_PLATFORM_EC_FAN=y
-CONFIG_PLATFORM_EC_CUSTOM_FAN_CONTROL=y
diff --git a/zephyr/program/skyrim/frostflow/project.overlay b/zephyr/program/skyrim/frostflow/project.overlay
deleted file mode 100644
index a1bc7dbb5e..0000000000
--- a/zephyr/program/skyrim/frostflow/project.overlay
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* Skyrim program common DTS includes */
-#include "../adc.dtsi"
-#include "../fan.dtsi"
-#include "../gpio.dtsi"
-#include "../interrupts.dtsi"
-#include "../keyboard.dtsi"
-#include "../usbc.dtsi"
-
-/* Frostflow project DTS includes*/
-#include "frostflow.dtsi"
-#include "battery.dtsi"
-#include "led_pins.dtsi"
-#include "led_policy.dtsi"
-#include "motionsense.dtsi"
diff --git a/zephyr/program/skyrim/frostflow/src/keyboard.c b/zephyr/program/skyrim/frostflow/src/keyboard.c
deleted file mode 100644
index 2905f17941..0000000000
--- a/zephyr/program/skyrim/frostflow/src/keyboard.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "ec_commands.h"
-#include "keyboard_scan.h"
-#include "timer.h"
-
-/* Keyboard scan setting */
-__override struct keyboard_scan_config keyscan_config = {
- /* Increase from 50 us, because KSO_02 passes through the H1. */
- .output_settle_us = 80,
- /* Other values should be the same as the default configuration. */
- .debounce_down_us = 9 * MSEC,
- .debounce_up_us = 30 * MSEC,
- .scan_period_us = 3 * MSEC,
- .min_post_scan_delay_us = 1000,
- .poll_timeout_us = 100 * MSEC,
- .actual_key_mask = {
- 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x86, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0xff, /* full set */
- },
-};
-
-static const struct ec_response_keybd_config frostflow_kb = {
- .num_top_row_keys = 10,
- .action_keys = {
- TK_BACK, /* T1 */
- TK_REFRESH, /* T2 */
- TK_FULLSCREEN, /* T3 */
- TK_OVERVIEW, /* T4 */
- TK_SNAPSHOT, /* T5 */
- TK_BRIGHTNESS_DOWN, /* T6 */
- TK_BRIGHTNESS_UP, /* T7 */
- TK_VOL_MUTE, /* T8 */
- TK_VOL_DOWN, /* T9 */
- TK_VOL_UP, /* T10 */
- },
- .capabilities = KEYBD_CAP_SCRNLOCK_KEY,
-};
-
-__override const struct ec_response_keybd_config *
-board_vivaldi_keybd_config(void)
-{
- return &frostflow_kb;
-}
-
-/*
- * Row Column info for Top row keys T1 - T15.
- * on frostflow_kb keyboard Row Column is customization
- * need define row col to mapping matrix layout.
- */
-__override const struct key {
- uint8_t row;
- uint8_t col;
-} vivaldi_keys[] = {
- { .row = 4, .col = 2 }, /* T1 */
- { .row = 3, .col = 2 }, /* T2 */
- { .row = 2, .col = 2 }, /* T3 */
- { .row = 1, .col = 2 }, /* T4 */
- { .row = 4, .col = 4 }, /* T5 */
- { .row = 3, .col = 4 }, /* T6 */
- { .row = 2, .col = 4 }, /* T7 */
- { .row = 2, .col = 9 }, /* T8 */
- { .row = 1, .col = 9 }, /* T9 */
- { .row = 1, .col = 4 }, /* T10 */
- { .row = 0, .col = 4 }, /* T11 */
- { .row = 1, .col = 5 }, /* T12 */
- { .row = 3, .col = 5 }, /* T13 */
- { .row = 2, .col = 1 }, /* T14 */
- { .row = 0, .col = 1 }, /* T15 */
-};
-BUILD_ASSERT(ARRAY_SIZE(vivaldi_keys) == MAX_TOP_ROW_KEYS);
diff --git a/zephyr/program/skyrim/frostflow/src/keyboard_customization.c b/zephyr/program/skyrim/frostflow/src/keyboard_customization.c
deleted file mode 100644
index bd02940e03..0000000000
--- a/zephyr/program/skyrim/frostflow/src/keyboard_customization.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "common.h"
-#include "gpio.h"
-#include "keyboard_customization.h"
-#include "keyboard_protocol.h"
-#include "keyboard_raw.h"
-
-#include <zephyr/drivers/gpio.h>
-
-static uint16_t scancode_set2[KEYBOARD_COLS_MAX][KEYBOARD_ROWS] = {
- { 0x0000, 0x0000, 0x0014, 0xe01f, 0xe014, 0x0000, 0x0000, 0x0000 },
- { 0x001f, 0x0076, 0x0017, 0x000e, 0x001c, 0x003a, 0x000d, 0x0016 },
- { 0x006c, 0xe024, 0xe01d, 0xe020, 0xe038, 0xe071, 0x0026, 0x002a },
- { 0x0032, 0x0034, 0x002c, 0x002e, 0x002b, 0x0029, 0x0025, 0x002d },
- { 0x0078, 0xe032, 0xe035, 0xe02c, 0xe02d, 0x0041, 0x001e, 0x001d },
- { 0x0051, 0x0007, 0x005b, 0x000f, 0x0042, 0x0022, 0x003e, 0x0043 },
- { 0x0031, 0x0033, 0x0035, 0x0036, 0x003b, 0x001b, 0x003d, 0x003c },
- { 0x0000, 0x0012, 0x0061, 0x0000, 0x0000, 0x0000, 0x0000, 0x0059 },
- { 0x0055, 0x0052, 0x0054, 0x004e, 0x004c, 0x0024, 0x0044, 0x004d },
- { 0x0045, 0xe021, 0xe023, 0x002f, 0x004b, 0x0049, 0x0046, 0x001a },
- { 0xe011, 0x0000, 0x006a, 0x0000, 0x005d, 0x0000, 0x0011, 0x0000 },
- { 0xe07a, 0x005d, 0xe075, 0x006b, 0x005a, 0xe072, 0x004a, 0x0066 },
- { 0xe06b, 0xe074, 0xe069, 0x0067, 0xe06c, 0x0064, 0x0015, 0xe07d },
- { 0x0073, 0x007c, 0x007b, 0x0074, 0x0071, 0xe04a, 0x0070, 0x0021 },
- { 0x0023, 0xe05a, 0x0075, 0x0079, 0x007a, 0x0072, 0x007d, 0x0069 },
-};
-
-uint16_t get_scancode_set2(uint8_t row, uint8_t col)
-{
- if (col < KEYBOARD_COLS_MAX && row < KEYBOARD_ROWS)
- return scancode_set2[col][row];
- return 0;
-}
-
-void set_scancode_set2(uint8_t row, uint8_t col, uint16_t val)
-{
- if (col < KEYBOARD_COLS_MAX && row < KEYBOARD_ROWS)
- scancode_set2[col][row] = val;
-}
-
-#ifdef CONFIG_KEYBOARD_DEBUG
-static char keycap_label[KEYBOARD_COLS_MAX][KEYBOARD_ROWS] = {
- { 'c', KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_UNKNO, KLLI_UNKNO },
- { KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO },
- { 'q', KLLI_UNKNO, KLLI_UNKNO, KLLI_TAB, '`', '1', KLLI_UNKNO, 'a' },
- { KLLI_R_ALT, KLLI_L_ALT, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO },
- { KLLI_UNKNO, KLLI_SPACE, 'e', KLLI_F4, KLLI_SEARC, '3', KLLI_F3,
- KLLI_UNKNO },
- { 'x', 'z', KLLI_F2, KLLI_F1, 's', '2', 'w', KLLI_ESC },
- { 'v', 'b', 'g', 't', '5', '4', 'r', 'f' },
- { 'm', 'n', 'h', 'y', '6', '7', 'u', 'j' },
- { '.', KLLI_DOWN, '\\', 'o', KLLI_F10, '9', KLLI_UNKNO, 'l' },
- { KLLI_R_SHT, KLLI_L_SHT, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO },
- { ',', KLLI_UNKNO, KLLI_F7, KLLI_F6, KLLI_F5, '8', 'i', 'k' },
- { KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO, KLLI_F9, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_LEFT, KLLI_UNKNO },
- { KLLI_R_CTR, KLLI_L_CTR, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO },
- { '/', KLLI_UP, '-', KLLI_UNKNO, '0', 'p', '[', ';' },
- { '\'', KLLI_ENTER, KLLI_UNKNO, KLLI_UNKNO, '=', KLLI_B_SPC, ']', 'd' },
- { KLLI_UNKNO, KLLI_F8, KLLI_RIGHT, KLLI_UNKNO, KLLI_UNKNO, KLLI_UNKNO,
- KLLI_UNKNO, KLLI_UNKNO },
-};
-
-char get_keycap_label(uint8_t row, uint8_t col)
-{
- if (col < KEYBOARD_COLS_MAX && row < KEYBOARD_ROWS)
- return keycap_label[col][row];
- return KLLI_UNKNO;
-}
-
-void set_keycap_label(uint8_t row, uint8_t col, char val)
-{
- if (col < KEYBOARD_COLS_MAX && row < KEYBOARD_ROWS)
- keycap_label[col][row] = val;
-}
-#endif
diff --git a/zephyr/program/skyrim/frostflow/src/ppc_config.c b/zephyr/program/skyrim/frostflow/src/ppc_config.c
deleted file mode 100644
index 513c025dec..0000000000
--- a/zephyr/program/skyrim/frostflow/src/ppc_config.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* Frostflow board-specific PPC code */
-
-#include "driver/ppc/aoz1380_public.h"
-#include "driver/ppc/nx20p348x.h"
-#include "usbc_ppc.h"
-
-#include <zephyr/drivers/gpio.h>
-
-#define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args)
-#define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args)
-
-/*
- * In the AOZ1380 PPC, there are no programmable features. We use
- * the attached NCT3807 to control a GPIO to indicate 1A5 or 3A0
- * current limits.
- */
-int board_aoz1380_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp)
-{
- int rv = EC_SUCCESS;
-
- rv = gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(ioex_usb_c0_ilim_3a_en),
- (rp == TYPEC_RP_3A0) ? 1 : 0);
-
- return rv;
-}
-
-void ppc_interrupt(enum gpio_signal signal)
-{
- switch (signal) {
- case GPIO_USB_C0_PPC_INT_ODL:
- aoz1380_interrupt(0);
- break;
-
- case GPIO_USB_C1_PPC_INT_ODL:
- nx20p348x_interrupt(1);
- break;
-
- default:
- break;
- }
-}
diff --git a/zephyr/program/skyrim/frostflow/src/thermal.c b/zephyr/program/skyrim/frostflow/src/thermal.c
deleted file mode 100644
index eae8aac25d..0000000000
--- a/zephyr/program/skyrim/frostflow/src/thermal.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "common.h"
-#include "chipset.h"
-#include "fan.h"
-#include "tablet_mode.h"
-#include "temp_sensor/temp_sensor.h"
-#include "thermal.h"
-#include "util.h"
-#include "console.h"
-
-#define TEMP_AMB TEMP_SENSOR_ID(DT_NODELABEL(temp_amb))
-
-struct fan_step {
- /*
- * Sensor 0~4 trigger point, set -1 if we're not using this
- * sensor to determine fan speed.
- */
- int on[TEMP_SENSOR_COUNT];
- /*
- * Sensor 0~4 release point, set -1 if we're not using this
- * sensor to determine fan speed.
- */
- int off[TEMP_SENSOR_COUNT];
- /* Fan rpm */
- uint16_t rpm[FAN_CH_COUNT];
-};
-
-#define FAN_TABLE_ENTRY(nd) \
- { \
- .on = DT_PROP(nd, temp_on), \
- .off = DT_PROP(nd, temp_off), \
- .rpm = DT_PROP(nd, rpm_target), \
- },
-
-static const struct fan_step fan_table_clamshell[] = { DT_FOREACH_CHILD(
- DT_NODELABEL(fan_steps_clamshell), FAN_TABLE_ENTRY) };
-
-static const struct fan_step fan_table_tablet[] = { DT_FOREACH_CHILD(
- DT_NODELABEL(fan_steps_tablet), FAN_TABLE_ENTRY) };
-
-static const struct fan_step *fan_step_table;
-#define NUM_FAN_LEVELS ARRAY_SIZE(fan_table_clamshell)
-
-BUILD_ASSERT(ARRAY_SIZE(fan_table_clamshell) == ARRAY_SIZE(fan_table_tablet));
-
-int fan_table_to_rpm(int fan, int *temp)
-{
- /* current fan level */
- static int current_level;
- /* previous sensor temperature */
- static int prev_tmp[TEMP_SENSOR_COUNT];
- int i;
-
- if (tablet_get_mode())
- fan_step_table = fan_table_tablet;
- else
- fan_step_table = fan_table_clamshell;
-
- /*
- * Compare the current and previous temperature, we have
- * the three paths :
- * 1. decreasing path. (check the release point)
- * 2. increasing path. (check the trigger point)
- * 3. invariant path. (return the current RPM)
- */
-
- if (temp[TEMP_AMB] < prev_tmp[TEMP_AMB]) {
- for (i = current_level; i > 0; i--) {
- if (temp[TEMP_AMB] < fan_step_table[i].off[TEMP_AMB])
- current_level = i - 1;
- else
- break;
- }
- } else if (temp[TEMP_AMB] > prev_tmp[TEMP_AMB]) {
- for (i = current_level; i < NUM_FAN_LEVELS; i++) {
- if (temp[TEMP_AMB] > fan_step_table[i].on[TEMP_AMB])
- current_level = i + 1;
- else
- break;
- }
- }
-
- if (current_level < 0)
- current_level = 0;
-
- if (current_level >= NUM_FAN_LEVELS)
- current_level = NUM_FAN_LEVELS - 1;
-
- for (i = 0; i < TEMP_SENSOR_COUNT; ++i)
- prev_tmp[i] = temp[i];
-
- return fan_step_table[current_level].rpm[fan];
-}
-
-void board_override_fan_control(int fan, int *temp)
-{
- /*
- * In common/fan.c pwm_fan_stop() will turn off fan
- * when chipset suspend or shutdown.
- */
- if (chipset_in_state(CHIPSET_STATE_ON)) {
- fan_set_rpm_mode(fan, 1);
- fan_set_rpm_target(fan, fan_table_to_rpm(fan, temp));
- }
-}
diff --git a/zephyr/program/skyrim/frostflow/src/usb_mux_config.c b/zephyr/program/skyrim/frostflow/src/usb_mux_config.c
deleted file mode 100644
index 2ec1dda0be..0000000000
--- a/zephyr/program/skyrim/frostflow/src/usb_mux_config.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* Frostflow board-specific USB-C mux configuration */
-
-#include "ioexpander.h"
-#include "usbc/usb_muxes.h"
-
-#define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args)
-#define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args)
-
-/*
- * USB C0 (general) and C1 (just ps8815 DB) use IOEX pins to
- * indicate flipped polarity to a protection switch.
- */
-static int ioex_set_flip(int port, mux_state_t mux_state)
-{
- if (port == 0) {
- if (mux_state & USB_PD_MUX_POLARITY_INVERTED)
- gpio_pin_set_dt(
- GPIO_DT_FROM_NODELABEL(ioex_usb_c0_sbu_flip),
- 1);
- else
- gpio_pin_set_dt(
- GPIO_DT_FROM_NODELABEL(ioex_usb_c0_sbu_flip),
- 0);
- } else {
- if (mux_state & USB_PD_MUX_POLARITY_INVERTED)
- gpio_pin_set_dt(
- GPIO_DT_FROM_NODELABEL(ioex_usb_c1_sbu_flip),
- 1);
- else
- gpio_pin_set_dt(
- GPIO_DT_FROM_NODELABEL(ioex_usb_c1_sbu_flip),
- 0);
- }
-
- return EC_SUCCESS;
-}
-
-int board_c0_amd_fp6_mux_set(const struct usb_mux *me, mux_state_t mux_state)
-{
- /* Set the SBU polarity mux */
- RETURN_ERROR(ioex_set_flip(me->usb_port, mux_state));
-
- return EC_SUCCESS;
-}
-
-int board_c1_ps8818_mux_set(const struct usb_mux *me, mux_state_t mux_state)
-{
- CPRINTSUSB("C1: PS8818 mux using default tuning");
-
- /* Once a DP connection is established, we need to set IN_HPD */
- if (mux_state & USB_PD_MUX_DP_ENABLED)
- ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 1);
- else
- ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 0);
-
- return 0;
-}