diff options
author | Andrew McRae <amcrae@google.com> | 2022-02-02 15:54:00 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-02 15:48:20 +0000 |
commit | 5bff631a9d22a0cee449b7f872bbfacb6d09a5c4 (patch) | |
tree | a624d9dc9349278886d165f5b051a57adb769af5 /zephyr/projects/trogdor | |
parent | db897e2f88124f8ba840372518635dc58e3595f7 (diff) | |
download | chrome-ec-5bff631a9d22a0cee449b7f872bbfacb6d09a5c4.tar.gz |
trogdor: Remove trogdor from Zephyr projects
Clean up old unsupported Zephyr projects (trogdor/trogdor)
BUG=b:217456306
TEST=zmake testall
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Id90a9ab9e57c3c5c4b34dc4c72c80eb04c072f94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3430643
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/projects/trogdor')
-rw-r--r-- | zephyr/projects/trogdor/trogdor/BUILD.py | 14 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/CMakeLists.txt | 32 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/battery.dts | 12 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/gpio.dts | 305 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/include/gpio_map.h | 9 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/interrupts.dts | 121 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/motionsense.dts | 157 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/prj.conf | 147 | ||||
-rw-r--r-- | zephyr/projects/trogdor/trogdor/src/i2c.c | 17 |
9 files changed, 0 insertions, 814 deletions
diff --git a/zephyr/projects/trogdor/trogdor/BUILD.py b/zephyr/projects/trogdor/trogdor/BUILD.py deleted file mode 100644 index 24e3bc5f4a..0000000000 --- a/zephyr/projects/trogdor/trogdor/BUILD.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. - -register_npcx_project( - project_name="trogdor", - zephyr_board="trogdor", - dts_overlays=[ - "gpio.dts", - "battery.dts", - "interrupts.dts", - "motionsense.dts", - ], -) diff --git a/zephyr/projects/trogdor/trogdor/CMakeLists.txt b/zephyr/projects/trogdor/trogdor/CMakeLists.txt deleted file mode 100644 index fc85da38a1..0000000000 --- a/zephyr/projects/trogdor/trogdor/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# 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. - -cmake_minimum_required(VERSION 3.13.1) - -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(trogdor) - -zephyr_library_include_directories(include) - -set(PLATFORM_EC_BASEBOARD "${PLATFORM_EC}/baseboard/trogdor" CACHE PATH - "Path to the platform/ec baseboard directory") -set(PLATFORM_EC_BOARD "${PLATFORM_EC}/board/trogdor" CACHE PATH - "Path to the platform/ec board directory") - -zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC - "${PLATFORM_EC_BASEBOARD}/hibernate.c" - "${PLATFORM_EC_BASEBOARD}/usb_pd_policy.c" - "${PLATFORM_EC_BOARD}/usbc_config.c") - -zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_LED_COMMON - "${PLATFORM_EC_BOARD}/led.c") - -zephyr_library_sources( - "${PLATFORM_EC_BOARD}/hibernate.c" - "${PLATFORM_EC_BOARD}/switchcap.c" - "${PLATFORM_EC_BOARD}/usbc_config.c") - -# Board specific implementation -zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_I2C - "src/i2c.c") diff --git a/zephyr/projects/trogdor/trogdor/battery.dts b/zephyr/projects/trogdor/trogdor/battery.dts deleted file mode 100644 index ab4b28999a..0000000000 --- a/zephyr/projects/trogdor/trogdor/battery.dts +++ /dev/null @@ -1,12 +0,0 @@ -/* 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. - */ - -/ { - batteries { - default_battery: ap16l5j { - compatible = "panasonic,ap16l5j"; - }; - }; -}; diff --git a/zephyr/projects/trogdor/trogdor/gpio.dts b/zephyr/projects/trogdor/trogdor/gpio.dts deleted file mode 100644 index 0610105f80..0000000000 --- a/zephyr/projects/trogdor/trogdor/gpio.dts +++ /dev/null @@ -1,305 +0,0 @@ -/* 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. - */ - -/ { - named-gpios { - compatible = "named-gpios"; - - gpio_usb_c0_pd_int_odl: usb_c0_pd_int_odl { - gpios = <&gpioe 0 GPIO_INPUT>; - enum-name = "GPIO_USB_C0_PD_INT_ODL"; - }; - gpio_usb_c1_pd_int_odl: usb_c1_pd_int_odl { - gpios = <&gpiof 5 GPIO_INPUT>; - enum-name = "GPIO_USB_C1_PD_INT_ODL"; - }; - gpio_usb_c0_swctl_int_odl: usb_c0_swctl_int_odl { - gpios = <&gpio0 3 GPIO_INPUT>; - enum-name = "GPIO_USB_C0_SWCTL_INT_ODL"; - }; - gpio_usb_c1_swctl_int_odl: usb_c1_swctl_int_odl { - gpios = <&gpio4 0 GPIO_INPUT>; - enum-name = "GPIO_USB_C1_SWCTL_INT_ODL"; - }; - gpio_usb_c0_bc12_int_l: usb_c0_bc12_int_l { - gpios = <&gpio6 1 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_USB_C0_BC12_INT_L"; - }; - gpio_usb_c1_bc12_int_l: usb_c1_bc12_int_l { - gpios = <&gpio8 2 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_USB_C1_BC12_INT_L"; - }; - gpio_usb_a0_oc_odl: usb_a0_oc_odl { - gpios = <&gpiod 1 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_USB_A0_OC_ODL"; - }; - gpio_chg_acok_od: chg_acok_od { - gpios = <&gpio0 0 GPIO_INPUT>; - enum-name = "GPIO_AC_PRESENT"; - }; - gpio_ec_pwr_btn_odl: ec_pwr_btn_odl { - gpios = <&gpio0 1 GPIO_INPUT>; - enum-name = "GPIO_POWER_BUTTON_L"; - }; - gpio_ec_voldn_btn_odl: ec_voldn_btn_odl { - gpios = <&gpio7 0 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_VOLUME_DOWN_L"; - }; - gpio_ec_volup_btn_odl: ec_volup_btn_odl { - gpios = <&gpiof 2 GPIO_INPUT_PULL_UP>; - enum-name = "GPIO_VOLUME_UP_L"; - }; - gpio_ec_wp_odl: ec_wp_odl { - gpios = <&gpioa 1 GPIO_INPUT>; - enum-name = "GPIO_WP_L"; - }; - gpio_lid_open_ec: lid_open_ec { - gpios = <&gpiod 2 GPIO_INPUT>; - enum-name = "GPIO_LID_OPEN"; - }; - gpio_ap_rst_l: ap_rst_l { - gpios = <&gpioc 1 GPIO_INPUT>; - enum-name = "GPIO_AP_RST_L"; - }; - gpio_ps_hold: ps_hold { - gpios = <&gpioa 4 GPIO_INPUT_PULL_DOWN>; - enum-name = "GPIO_PS_HOLD"; - }; - gpio_ap_suspend: ap_suspend { - gpios = <&gpio5 7 GPIO_INPUT>; - enum-name = "GPIO_AP_SUSPEND"; - }; - gpio_deprecated_ap_rst_req: deprecated_ap_rst_req { - gpios = <&gpioc 2 GPIO_INPUT_PULL_DOWN>; - enum-name = "GPIO_DEPRECATED_AP_RST_REQ"; - }; - gpio_power_good: power_good { - gpios = <&gpio5 4 GPIO_INPUT_PULL_DOWN>; - enum-name = "GPIO_POWER_GOOD"; - }; - gpio_warm_reset_l: warm_reset_l { - gpios = <&gpiof 4 GPIO_INPUT>; - enum-name = "GPIO_WARM_RESET_L"; - }; - ap_ec_spi_cs_l { - gpios = <&gpio5 3 GPIO_INPUT_PULL_DOWN>; - }; - gpio_tablet_mode_l: tablet_mode_l { - gpios = <&gpioc 6 GPIO_INPUT>; - enum-name = "GPIO_TABLET_MODE_L"; - }; - gpio_accel_gyro_int_l: accel_gyro_int_l { - gpios = <&gpioa 0 GPIO_INPUT>; - enum-name = "GPIO_ACCEL_GYRO_INT_L"; - }; - gpio_ec_rst_odl: ec_rst_odl { - gpios = <&gpio0 2 GPIO_INPUT>; - enum-name = "GPIO_EC_RST_ODL"; - }; - ec_entering_rw { - gpios = <&gpioe 1 GPIO_OUT_LOW>; - enum-name = "GPIO_ENTERING_RW"; - }; - ccd_mode_odl { - gpios = <&gpioe 3 GPIO_INPUT>; - enum-name = "GPIO_CCD_MODE_ODL"; - }; - ec_batt_pres_odl { - gpios = <&gpioe 5 GPIO_INPUT>; - enum-name = "GPIO_BATT_PRES_ODL"; - }; - pmic_resin_l { - gpios = <&gpio3 2 GPIO_ODR_HIGH>; - enum-name = "GPIO_PMIC_RESIN_L"; - }; - pmic_kpd_pwr_odl { - gpios = <&gpiod 6 GPIO_ODR_HIGH>; - enum-name = "GPIO_PMIC_KPD_PWR_ODL"; - }; - ec_int_l { - gpios = <&gpioa 2 GPIO_ODR_HIGH>; - enum-name = "GPIO_EC_INT_L"; - }; - hibernate_l { - gpios = <&gpio5 2 GPIO_ODR_HIGH>; - enum-name = "GPIO_HIBERNATE_L"; - }; - switchcap_on { - gpios = <&gpiod 5 GPIO_OUT_LOW>; - enum-name = "GPIO_SWITCHCAP_ON"; - }; - en_pp3300_a { - gpios = <&gpioa 6 GPIO_OUT_LOW>; - enum-name = "GPIO_EN_PP3300_A"; - }; - en_pp5000_a { - gpios = <&gpio6 7 GPIO_OUT_LOW>; - enum-name = "GPIO_EN_PP5000"; - }; - ec_bl_disable_l { - gpios = <&gpiob 6 GPIO_OUT_LOW>; - enum-name = "GPIO_ENABLE_BACKLIGHT"; - }; - lid_accel_int_l { - gpios = <&gpio5 6 GPIO_INPUT>; - enum-name = "GPIO_LID_ACCEL_INT_L"; - }; - trackpad_int_gate { - gpios = <&gpio7 4 GPIO_OUT_LOW>; - }; - usb_c0_pd_rst_l { - gpios = <&gpiof 1 GPIO_OUT_HIGH>; - enum-name = "GPIO_USB_C0_PD_RST_L"; - }; - usb_c1_pd_rst_l { - gpios = <&gpioe 4 GPIO_OUT_HIGH>; - enum-name = "GPIO_USB_C1_PD_RST_L"; - }; - dp_mux_oe_l { - gpios = <&gpio9 6 GPIO_ODR_HIGH>; - enum-name = "GPIO_DP_MUX_OE_L"; - }; - dp_mux_sel { - gpios = <&gpio4 5 GPIO_OUT_LOW>; - enum-name = "GPIO_DP_MUX_SEL"; - }; - dp_hot_plug_det { - gpios = <&gpio9 5 GPIO_OUT_LOW>; - enum-name = "GPIO_DP_HOT_PLUG_DET"; - }; - en_usb_a_5v { - gpios = <&gpio8 6 GPIO_OUT_LOW>; - enum-name = "GPIO_EN_USB_A_5V"; - }; - usb_a_cdp_ilim_en_l { - gpios = <&gpio7 5 GPIO_OUT_HIGH>; - }; - ec_chg_led_y_c0 { - gpios = <&gpio6 0 GPIO_OUT_LOW>; - enum-name = "GPIO_EC_CHG_LED_Y_C0"; - }; - ec_chg_led_w_c0 { - gpios = <&gpioc 0 GPIO_OUT_LOW>; - enum-name = "GPIO_EC_CHG_LED_W_C0"; - }; - ec_chg_led_y_c1 { - gpios = <&gpioc 3 GPIO_OUT_LOW>; - enum-name = "GPIO_EC_CHG_LED_Y_C1"; - }; - ec_chg_led_w_c1 { - gpios = <&gpioc 4 GPIO_OUT_LOW>; - enum-name = "GPIO_EC_CHG_LED_W_C1"; - }; - ap_ec_spi_mosi { - gpios = <&gpio4 6 GPIO_INPUT_PULL_DOWN>; - }; - ap_ec_spi_miso { - gpios = <&gpio4 7 GPIO_INPUT_PULL_DOWN>; - }; - ap_ec_spi_clk { - gpios = <&gpio5 5 GPIO_INPUT_PULL_DOWN>; - }; - kb_bl_pwm { - gpios = <&gpio8 0 GPIO_INPUT>; - }; - edp_bkltctl { - gpios = <&gpiob 7 GPIO_INPUT>; - }; - ppvar_boostin_sense { - gpios = <&gpio4 4 GPIO_INPUT>; - }; - charger_iadp { - gpios = <&gpio4 3 GPIO_INPUT>; - }; - charger_pmon { - gpios = <&gpio4 2 GPIO_INPUT>; - }; - brd_id0 { - gpios = <&gpioc 7 GPIO_INPUT>; - enum-name = "GPIO_BOARD_VERSION1"; - }; - brd_id1 { - gpios = <&gpio9 3 GPIO_INPUT>; - enum-name = "GPIO_BOARD_VERSION2"; - }; - brd_id2 { - gpios = <&gpio6 3 GPIO_INPUT>; - enum-name = "GPIO_BOARD_VERSION3"; - }; - sku_id0 { - gpios = <&gpiof 0 GPIO_INPUT>; - enum-name = "GPIO_SKU_ID0"; - }; - sku_id1 { - gpios = <&gpio4 1 GPIO_INPUT>; - enum-name = "GPIO_SKU_ID1"; - }; - sku_id2 { - gpios = <&gpiod 4 GPIO_INPUT>; - enum-name = "GPIO_SKU_ID2"; - }; - switchcap_gpio_1 { - gpios = <&gpioe 2 GPIO_INPUT_PULL_DOWN>; - enum-name = "GPIO_SWITCHCAP_PG"; - }; - arm_x86 { - gpios = <&gpio6 6 GPIO_OUT_LOW>; - }; - ec_kso_02_inv { - gpios = <&gpio1 7 GPIO_OUT_LOW>; - enum-name = "GPIO_KBD_KSO2"; - }; - }; - - def-lvol-io-list { - compatible = "nuvoton,npcx-lvolctrl-def"; - lvol-io-pads = < - &lvol_ioc1 /* AP_RST_L */ - &lvol_ioc2 /* DEPRECATED_AP_RST_REQ */ - &lvol_iof4 /* WARM_RESET_L */ - &lvol_iob3 /* EC_I2C_SENSOR_SCL */ - &lvol_iob2 /* EC_I2C_SENSOR_SDA */ - >; - }; - - hibernate-wake-pins { - compatible = "cros-ec,hibernate-wake-pins"; - wakeup-irqs = < - &int_ac_present - &int_power_button - &int_lid_open - &int_ec_rst - >; - }; - - unused-pins { - compatible = "unused-gpios"; - unused-gpios = - <&gpio5 1 0>, - <&gpiod 0 0>, - <&gpiof 3 0>, - <&gpio9 4 0>, - <&gpio9 7 0>, - <&gpioa 7 0>, - <&gpiob 0 0>, - <&gpioa 5 0>, - <&gpio3 5 0>, - <&gpio7 2 0>, - <&gpio8 1 0>, - <&gpio3 7 0>, - <&gpio7 6 0>, - <&gpio3 4 0>, - <&gpioc 5 0>, - <&gpio7 3 0>, - <&gpiod 7 0>, - <&gpioa 3 0>, - <&gpio6 2 0>, - <&gpio0 4 0>, - <&gpio8 3 0>, - <&gpiob 1 0>, - <&gpio5 0 0>, - <&gpiod 3 0>; - }; -}; diff --git a/zephyr/projects/trogdor/trogdor/include/gpio_map.h b/zephyr/projects/trogdor/trogdor/include/gpio_map.h deleted file mode 100644 index c2b81fe5c6..0000000000 --- a/zephyr/projects/trogdor/trogdor/include/gpio_map.h +++ /dev/null @@ -1,9 +0,0 @@ -/* 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. - */ - -#ifndef __ZEPHYR_GPIO_MAP_H -#define __ZEPHYR_GPIO_MAP_H - -#endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/trogdor/trogdor/interrupts.dts b/zephyr/projects/trogdor/trogdor/interrupts.dts deleted file mode 100644 index 06f293101f..0000000000 --- a/zephyr/projects/trogdor/trogdor/interrupts.dts +++ /dev/null @@ -1,121 +0,0 @@ -/* 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. - */ - -/ { - gpio-interrupts { - compatible = "cros-ec,gpio-interrupts"; - - int_ac_present: ac_present { - irq-pin = <&gpio_chg_acok_od>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "extpower_interrupt"; - }; - int_lid_open: lid_open { - irq-pin = <&gpio_lid_open_ec>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "lid_interrupt"; - }; - int_wp: wp { - irq-pin = <&gpio_ec_wp_odl>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "switch_interrupt"; - }; - int_power_button: power_button { - irq-pin = <&gpio_ec_pwr_btn_odl>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "power_button_interrupt"; - }; - int_volume_up: volume_up { - irq-pin = <&gpio_ec_volup_btn_odl>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "button_interrupt"; - }; - int_volume_down: volume_down { - irq-pin = <&gpio_ec_voldn_btn_odl>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "button_interrupt"; - }; - int_ap_rst: ap_rst { - irq-pin = <&gpio_ap_rst_l>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "chipset_ap_rst_interrupt"; - }; - int_ap_suspend: ap_suspend { - irq-pin = <&gpio_ap_suspend>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "power_signal_interrupt"; - }; - int_deprecated_ap_rst_req: deprecated_ap_rst_req { - irq-pin = <&gpio_deprecated_ap_rst_req>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "power_signal_interrupt"; - }; - int_power_good: power_good { - irq-pin = <&gpio_power_good>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "chipset_power_good_interrupt"; - }; - int_ps_hold: ps_hold { - irq-pin = <&gpio_ps_hold>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "power_signal_interrupt"; - }; - int_warm_reset: warm_reset { - irq-pin = <&gpio_warm_reset_l>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "chipset_warm_reset_interrupt"; - }; - int_usb_c0_tcpc: usb_c0_tcpc { - irq-pin = <&gpio_usb_c0_pd_int_odl>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "tcpc_alert_event"; - }; - int_usb_c1_tcpc: usb_c1_tcpc { - irq-pin = <&gpio_usb_c1_pd_int_odl>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "tcpc_alert_event"; - }; - int_usb_c0_swctl: usb_c0_swctl { - irq-pin = <&gpio_usb_c0_swctl_int_odl>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "ppc_interrupt"; - }; - int_usb_c1_swctl: usb_c1_swctl { - irq-pin = <&gpio_usb_c1_swctl_int_odl>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "ppc_interrupt"; - }; - int_usb_c0_bc12: usb_c0_bc12 { - irq-pin = <&gpio_usb_c0_bc12_int_l>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "usb0_evt"; - }; - int_usb_c1_bc12: usb_c1_bc12 { - irq-pin = <&gpio_usb_c1_bc12_int_l>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "usb1_evt"; - }; - int_usb_a0_oc: usb_a0_oc { - irq-pin = <&gpio_usb_a0_oc_odl>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "usba_oc_interrupt"; - }; - int_accel: accel { - irq-pin = <&gpio_accel_gyro_int_l>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "bmi160_interrupt"; - }; - int_tablet_mode: tablet_mode { - irq-pin = <&gpio_tablet_mode_l>; - flags = <GPIO_INT_EDGE_BOTH>; - handler = "gmr_tablet_switch_isr"; - }; - int_ec_rst: ec_rst { - irq-pin = <&gpio_ec_rst_odl>; - flags = <GPIO_INT_EDGE_FALLING>; - handler = "wake_isr"; - }; - }; -}; diff --git a/zephyr/projects/trogdor/trogdor/motionsense.dts b/zephyr/projects/trogdor/trogdor/motionsense.dts deleted file mode 100644 index cd8ee4b185..0000000000 --- a/zephyr/projects/trogdor/trogdor/motionsense.dts +++ /dev/null @@ -1,157 +0,0 @@ -/* 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 <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. - */ - bmi160-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 { - label = "LID_MUTEX"; - }; - - mutex_bmi160: bmi160-mutex { - label = "BMI160_MUTEX"; - }; - }; - - /* Rotation matrix used by drivers. */ - motionsense-rotation-ref { - compatible = "cros-ec,motionsense-rotation-ref"; - lid_rot_ref: lid-rotation-ref { - mat33 = <0 1 0 - (-1) 0 0 - 0 0 1>; - }; - - base_rot_ref: base-rotation-ref { - mat33 = <1 0 0 - 0 (-1) 0 - 0 0 (-1)>; - }; - }; - - /* - * 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 { - bma255_data: bma255-drv-data { - compatible = "cros-ec,drvdata-bma255"; - status = "okay"; - }; - - bmi160_data: bmi160-drv-data { - compatible = "cros-ec,drvdata-bmi160"; - status = "okay"; - }; - }; - - /* - * List of motion sensors that creates motion_sensors array. - * The label "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,bma255"; - status = "okay"; - - label = "Lid Accel"; - active-mask = "SENSOR_ACTIVE_S0_S3"; - location = "MOTIONSENSE_LOC_LID"; - mutex = <&lid_mutex>; - port = <&i2c_sensor>; - rot-standard-ref = <&lid_rot_ref>; - default-range = <2>; - drv-data = <&bma255_data>; - i2c-spi-addr-flags = "BMA2x2_I2C_ADDR1_FLAGS"; - configs { - compatible = - "cros-ec,motionsense-sensor-config"; - ec-s0 { - label = "SENSOR_CONFIG_EC_S0"; - odr = <(10000 | ROUND_UP_FLAG)>; - }; - ec-s3 { - label = "SENSOR_CONFIG_EC_S3"; - odr = <(10000 | ROUND_UP_FLAG)>; - }; - }; - }; - - base_accel: base-accel { - compatible = "cros-ec,bmi160-accel"; - status = "okay"; - - label = "Base Accel"; - active-mask = "SENSOR_ACTIVE_S0_S3"; - location = "MOTIONSENSE_LOC_BASE"; - mutex = <&mutex_bmi160>; - port = <&i2c_sensor>; - rot-standard-ref = <&base_rot_ref>; - drv-data = <&bmi160_data>; - configs { - compatible = - "cros-ec,motionsense-sensor-config"; - ec-s0 { - label = "SENSOR_CONFIG_EC_S0"; - odr = <(10000 | ROUND_UP_FLAG)>; - }; - ec-s3 { - label = "SENSOR_CONFIG_EC_S3"; - odr = <(10000 | ROUND_UP_FLAG)>; - }; - }; - }; - - base-gyro { - compatible = "cros-ec,bmi160-gyro"; - status = "okay"; - - label = "Base Gyro"; - active-mask = "SENSOR_ACTIVE_S0_S3"; - location = "MOTIONSENSE_LOC_BASE"; - mutex = <&mutex_bmi160>; - port = <&i2c_sensor>; - rot-standard-ref = <&base_rot_ref>; - drv-data = <&bmi160_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>; - /* list of sensors in force mode */ - accel-force-mode-sensors = <&lid_accel>; - }; -}; diff --git a/zephyr/projects/trogdor/trogdor/prj.conf b/zephyr/projects/trogdor/trogdor/prj.conf deleted file mode 100644 index a0bbc76b01..0000000000 --- a/zephyr/projects/trogdor/trogdor/prj.conf +++ /dev/null @@ -1,147 +0,0 @@ -# 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. - -CONFIG_CROS_EC=y -CONFIG_SHIMMED_TASKS=y -CONFIG_PLATFORM_EC=y -CONFIG_PLATFORM_EC_BRINGUP=y -CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y -CONFIG_PLATFORM_EC_SWITCH=y -CONFIG_PLATFORM_EC_LID_SWITCH=y -CONFIG_PLATFORM_EC_BACKLIGHT_LID=y -CONFIG_PLATFORM_EC_POWER_BUTTON=y -CONFIG_I2C=y - -# LED -CONFIG_PLATFORM_EC_LED_COMMON=y - -# PWM -CONFIG_PWM=y -CONFIG_PWM_SHELL=n -CONFIG_PLATFORM_EC_PWM=y -CONFIG_PLATFORM_EC_PWM_DISPLIGHT=y -CONFIG_PLATFORM_EC_PWM_KBLIGHT=y - -# Application Processor is Qualcomm SC7180 -CONFIG_AP_ARM_QUALCOMM_SC7180=y - -# Board version is selected over GPIO board ID pins. -CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=y - -# Power Sequencing -CONFIG_PLATFORM_EC_POWERSEQ=y -CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP=y -CONFIG_PLATFORM_EC_POWER_SLEEP_FAILURE_DETECTION=y -CONFIG_PLATFORM_EC_CHIPSET_RESET_HOOK=y -CONFIG_PLATFORM_EC_CHIPSET_RESUME_INIT_HOOK=y - -# Trogdor family does not use EFS2. -CONFIG_PLATFORM_EC_VBOOT_EFS2=n - -# MKBP event mask -CONFIG_PLATFORM_EC_MKBP_EVENT_WAKEUP_MASK=y -CONFIG_PLATFORM_EC_MKBP_HOST_EVENT_WAKEUP_MASK=y - -# MKBP event -CONFIG_PLATFORM_EC_MKBP_EVENT=y -CONFIG_PLATFORM_EC_MKBP_USE_GPIO=y - -# Keyboard -CONFIG_PLATFORM_EC_KEYBOARD=y -CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP=y -CONFIG_PLATFORM_EC_MKBP_INPUT_DEVICES=y -CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED=y -CONFIG_PLATFORM_EC_VOLUME_BUTTONS=y -CONFIG_PLATFORM_EC_CMD_BUTTON=y -CONFIG_CROS_KB_RAW_NPCX=y - -# ADC -CONFIG_PLATFORM_EC_ADC=y -CONFIG_ADC=y -CONFIG_ADC_SHELL=n - -# Battery -CONFIG_PLATFORM_EC_BATTERY=y -CONFIG_PLATFORM_EC_BATTERY_SMART=y -CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY=y -CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED=y -CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y -CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y -CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y -CONFIG_PLATFORM_EC_CHARGER_ISL9238=y -CONFIG_PLATFORM_EC_CHARGE_RAMP_HW=y -CONFIG_PLATFORM_EC_USE_BATTERY_DEVICE_CHEMISTRY=y -CONFIG_PLATFORM_EC_BATTERY_DEVICE_CHEMISTRY="LION" -CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y -CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC=y -CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC_CHARGER=y -CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON=2 -CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON=10000 -CONFIG_PLATFORM_EC_CHARGER_PROFILE_OVERRIDE=y -CONFIG_PLATFORM_EC_CHARGER_PSYS=y -CONFIG_PLATFORM_EC_CHARGER_PSYS_READ=y -CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR=10 -CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC=20 -CONFIG_PLATFORM_EC_CONSOLE_CMD_CHARGER_ADC_AMON_BMON=y - -# USB-A -CONFIG_PLATFORM_EC_USB_A_PORT_COUNT=1 - -# USB-C -CONFIG_PLATFORM_EC_BC12_DETECT_PI3USB9201=y -CONFIG_PLATFORM_EC_USB_PD_USB32_DRD=n -CONFIG_PLATFORM_EC_USBC_PPC_SN5S330=y -CONFIG_PLATFORM_EC_USBC_RETIMER_FW_UPDATE=n -CONFIG_PLATFORM_EC_USBC_SS_MUX_DFP_ONLY=y -CONFIG_PLATFORM_EC_USB_DRP_ACC_TRYSRC=y -CONFIG_PLATFORM_EC_USB_PD_5V_EN_CUSTOM=y -CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_TCPC=y -CONFIG_PLATFORM_EC_USB_PD_DISCHARGE_PPC=y -CONFIG_PLATFORM_EC_USB_PD_PORT_MAX_COUNT=2 -CONFIG_PLATFORM_EC_USB_PD_REV30=n -CONFIG_PLATFORM_EC_USB_PD_TCPC_LOW_POWER=y -CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805=y -CONFIG_PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG=n -CONFIG_PLATFORM_EC_USB_MUX_RUNTIME_CONFIG=n -CONFIG_PLATFORM_EC_USB_PD_LOGGING=y -CONFIG_PLATFORM_EC_USB_PORT_POWER_DUMB=y - -# USB ID -# This is allocated specifically for Trogdor -# http://google3/hardware/standards/usb/ -# TODO(b/183608112): Move to device tree -CONFIG_PLATFORM_EC_USB_PID=0x5043 - -# RTC -CONFIG_PLATFORM_EC_RTC=y -CONFIG_CROS_RTC_NPCX=y -CONFIG_PLATFORM_EC_HOSTCMD_RTC=y -CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC=y - -# EC software sync -CONFIG_PLATFORM_EC_VBOOT_HASH=y - -# Sensors -CONFIG_PLATFORM_EC_MOTIONSENSE=y -CONFIG_PLATFORM_EC_ACCEL_FIFO=y -CONFIG_PLATFORM_EC_ACCEL_INTERRUPTS=y -CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCELS=y -CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCEL_INFO=y -CONFIG_PLATFORM_EC_GMR_TABLET_MODE=y -CONFIG_PLATFORM_EC_LID_ANGLE=y -CONFIG_PLATFORM_EC_LID_ANGLE_UPDATE=y -CONFIG_PLATFORM_EC_SENSOR_TIGHT_TIMESTAMPS=y -CONFIG_PLATFORM_EC_TABLET_MODE=y -CONFIG_PLATFORM_EC_TABLET_MODE_SWITCH=y - -# Sensor Drivers -CONFIG_PLATFORM_EC_ACCEL_BMA255=y -CONFIG_PLATFORM_EC_ACCELGYRO_BMI160=y -CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_I2C=y - -CONFIG_SYSCON=y - -# Features should be enabled. But the code RAM is not enough, disable them. -#CONFIG_PLATFORM_EC_ACCEL_SPOOF_MODE=y -#CONFIG_PLATFORM_EC_EMULATED_SYSRQ=y diff --git a/zephyr/projects/trogdor/trogdor/src/i2c.c b/zephyr/projects/trogdor/trogdor/src/i2c.c deleted file mode 100644 index bd5fe82473..0000000000 --- a/zephyr/projects/trogdor/trogdor/src/i2c.c +++ /dev/null @@ -1,17 +0,0 @@ -/* 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 "i2c/i2c.h" -#include "i2c.h" - -/* Trogdor board specific i2c implementation */ - -#ifdef CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED -int board_allow_i2c_passthru(int port) -{ - return (i2c_get_device_for_port(port) == - i2c_get_device_for_port(I2C_PORT_VIRTUAL_BATTERY)); -} -#endif |