diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-09-21 14:10:01 -0700 |
---|---|---|
committer | Tom Hughes <tomhughes@chromium.org> | 2022-09-22 12:49:33 -0700 |
commit | 2bcf863b492fe7ed8105c853814dba6ed32ba719 (patch) | |
tree | fcf6ce5810f9ff9e3c8cce434812dd75492269ed /zephyr/test/drivers/boards/native_posix.overlay | |
parent | e5fb0b9ba488614b5684e640530f00821ab7b943 (diff) | |
parent | 28712dae9d7ed1e694f7622cc083afa71090d4d5 (diff) | |
download | chrome-ec-firmware-fpmcu-bloonchipper-release.tar.gz |
Merge remote-tracking branch cros/main into firmware-fpmcu-bloonchipper-releasefirmware-fpmcu-bloonchipper-release
Generated by: ./util/update_release_branch.py --board bloonchipper
--relevant_paths_file ./util/fingerprint-relevant-paths.txt firmware-
fpmcu-bloonchipper-release
Relevant changes:
git log --oneline e5fb0b9ba4..28712dae9d -- board/hatch_fp
board/bloonchipper common/fpsensor docs/fingerprint driver/fingerprint
util/getversion.sh
ded9307b79 util/getversion.sh: Fix version when not in a git repo
956055e692 board: change Google USB vendor info
71b2ef709d Update license boilerplate text in source code files
33e11afda0 Revert "fpsensor: Build fpsensor source file with C++"
c8d0360723 fpsensor: Build fpsensor source file with C++
bc113abd53 fpsensor: Fix g++ compiler error
150a58a0dc fpsensor: Fix fp_set_sensor_mode return type
b33b5ce85b fpsensor: Remove nested designators for C++ compatibility
2e864b2539 tree-wide: const-ify argv for console commands
56d8b360f9 test: Add test for get ikm failure when seed not set
3a3d6c3690 test: Add test for fpsensor trivial key failure
233e6bbd08 fpsensor_crypto: Abstract calls to hmac_SHA256
0a041b285b docs/fingerprint: Typo correction
c03fab67e2 docs/fingerprint: Fix the path of fputils.py
0b5d4baf5a util/getversion.sh: Fix empty file list handling
6e128fe760 FPMCU dev board environment with Satlab
3eb29b6aa5 builtin: Move ssize_t to sys/types.h
345d62ebd1 docs/fingerprint: Update power numbers for latest dartmonkey release
c25ffdb316 common: Conditionally support printf %l and %i modifiers
9a3c514b45 test: Add a test to check if the debugger is connected
54e603413f Move standard library tests to their own file
43fa6b4bf8 docs/fingerprint: Update power numbers for latest bloonchipper release
25536f9a84 driver/fingerprint/fpc/bep/fpc_sensor_spi.c: Format with clang-format
4face99efd driver/fingerprint/fpc/libfp/fpc_sensor_pal.h: Format with clang-format
738de2b575 trng: Rename rand to trng_rand
14b8270edd docs/fingerprint: Update dragonclaw power numbers
0b268f93d1 driver/fingerprint/fpc/libfp/fpc_private.c: Format with clang-format
f80da163f2 driver/fingerprint/fpc/libfp/fpc_private.h: Format with clang-format
5e9c85c9b1 driver/fingerprint/fpc/libfp/fpc_sensor_pal.c: Format with clang-format
c1f9dd3cf8 driver/fingerprint/fpc/libfp/fpc_bio_algorithm.h: Format with clang-format
eb1e1bed8d driver/fingerprint/fpc/libfp/fpc1145_private.h: Format with clang-format
6e7b611821 driver/fingerprint/fpc/bep/fpc_bio_algorithm.h: Format with clang-format
e0589cd5e2 driver/fingerprint/fpc/bep/fpc1035_private.h: Format with clang-format
7905e556a0 common/fpsensor/fpsensor_crypto.c: Format with clang-format
21289d170c driver/fingerprint/fpc/bep/fpc1025_private.h: Format with clang-format
98a20f937e common/fpsensor/fpsensor_state.c: Format with clang-format
a2d255d8af common/fpsensor/fpsensor.c: Format with clang-format
73055eeb3f driver/fingerprint/fpc/bep/fpc_private.c: Format with clang-format
0f7b5cb509 common/fpsensor/fpsensor_private.h: Format with clang-format
1ceade6e65 driver/fingerprint/fpc/bep/fpc_private.h: Format with clang-format
dc3e9008b8 board/hatch_fp/board.h: Format with clang-format
dca9d74321 Revert "trng: Rename rand to trng_rand"
a6b0b3554f trng: Rename rand to trng_rand
28d0b75b70 third_party/boringssl: Remove unused header
BRANCH=None
BUG=b:246424843 b:234181908 b:244781166 b:234181908 b:244387210
BUG=b:242720240 chromium:1098010 b:180945056 b:236025198 b:234181908
BUG=b:234181908 b:237344361 b:131913998 b:236386294 b:234143158
BUG=b:234781655 b:215613183 b:242720910
TEST=`make -j buildall`
TEST=./test/run_device_tests.py --board bloonchipper
Test "aes": PASSED
Test "cec": PASSED
Test "cortexm_fpu": PASSED
Test "crc": PASSED
Test "flash_physical": PASSED
Test "flash_write_protect": PASSED
Test "fpsensor_hw": PASSED
Test "fpsensor_spi_ro": PASSED
Test "fpsensor_spi_rw": PASSED
Test "fpsensor_uart_ro": PASSED
Test "fpsensor_uart_rw": PASSED
Test "mpu_ro": PASSED
Test "mpu_rw": PASSED
Test "mutex": PASSED
Test "pingpong": PASSED
Test "printf": PASSED
Test "queue": PASSED
Test "rollback_region0": PASSED
Test "rollback_region1": PASSED
Test "rollback_entropy": PASSED
Test "rtc": PASSED
Test "sha256": PASSED
Test "sha256_unrolled": PASSED
Test "static_if": PASSED
Test "stdlib": PASSED
Test "system_is_locked_wp_on": PASSED
Test "system_is_locked_wp_off": PASSED
Test "timer_dos": PASSED
Test "utils": PASSED
Test "utils_str": PASSED
Test "stm32f_rtc": PASSED
Test "panic_data_bloonchipper_v2.0.4277": PASSED
Test "panic_data_bloonchipper_v2.0.5938": PASSED
Force-Relevant-Builds: all
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I264ad0ffe7afcd507a1e483c6e934a9c4fea47c3
Diffstat (limited to 'zephyr/test/drivers/boards/native_posix.overlay')
-rw-r--r-- | zephyr/test/drivers/boards/native_posix.overlay | 1029 |
1 files changed, 1029 insertions, 0 deletions
diff --git a/zephyr/test/drivers/boards/native_posix.overlay b/zephyr/test/drivers/boards/native_posix.overlay new file mode 100644 index 0000000000..03b59c8ac7 --- /dev/null +++ b/zephyr/test/drivers/boards/native_posix.overlay @@ -0,0 +1,1029 @@ +/* Copyright 2021 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <board-overlays/native_posix.dts> +#include <cros/binman.dtsi> +#include <cros/thermistor/thermistor.dtsi> +#include <dt-bindings/gpio_defines.h> +#include <dt-bindings/pwm/pwm.h> +#include <freq.h> + +/ { + chosen { + cros-ec,espi = &espi0; + cros-ec,watchdog = &wdt_counter; + cros-ec,raw-kb = &cros_kb_raw; + cros-ec,flash = &flash0; + cros-ec,flash-controller = &cros_flash; + cros,rtc = &cros_rtc; + }; + + aliases { + bmi260-int = &ms_bmi260_accel; + bmi160-int = &ms_bmi160_accel; + tcs3400-int = &tcs3400_clear; + gpio-wp = &gpio_wp_l; + gpio-kbd-kso2 = &gpio_ec_kso_02_inv; + }; + + usbc { + #address-cells = <1>; + #size-cells = <0>; + + port0@0 { + compatible = "named-usbc-port"; + reg = <0>; + chg = <&isl923x_emul>; + tcpc = <&tcpci_emul>; + }; + + port1@1 { + compatible = "named-usbc-port"; + reg = <1>; + tcpc = <&ps8xxx_emul>; + }; + }; + + /* + * Keep these GPIOs in pin order. + * If you need to add one, make sure you increase + * ngpios in the gpio0 node further down. + */ + named-gpios { + compatible = "named-gpios"; + + gpio_acok_od: acok_od { + gpios = <&gpio0 0 GPIO_INPUT>; + enum-name = "GPIO_AC_PRESENT"; + }; + + /* <&gpio0 1 x> is reserved as 'entering-rw' in + * src/platform/ec/zephyr/dts/board-overlays/native_posix.dts + */ + + /* In test WP is output because CBI use it, but it is also + * input, because test_all_tags set it to enable write + * protection. + */ + gpio_wp_l: wp_l { + gpios = <&gpio0 2 (GPIO_INPUT | GPIO_OUTPUT | + GPIO_ACTIVE_LOW)>; + }; + gpio_ec_kso_02_inv: ec_kso_02_inv { + gpios = <&gpio0 3 (GPIO_INPUT | GPIO_OUTPUT_LOW)>; + }; + pg_ec_dsw_pwrok { + gpios = <&gpio0 4 GPIO_INPUT>; + enum-name = "GPIO_TEMP_SENSOR_POWER"; + }; + gpio_ec_pch_wake_odl: ec_pch_wake_odl { + gpios = <&gpio0 5 GPIO_OUTPUT_HIGH>; + }; + /* Setup USB C1 pin as output to check their state in test */ + usb_c1_ls_en: usb_c1_ls_en { + gpios = <&gpio0 6 (GPIO_INPUT_PULL_UP | + GPIO_OUTPUT)>; + }; + usb_c1_rt_rst_odl: usb_c1_rt_rst_odl { + gpios = <&gpio0 7 (GPIO_OUTPUT | GPIO_INPUT)>; + }; + gpio_usb_c1_frs_en: usb_c1_frs_en { + gpios = <&gpio0 8 (GPIO_OUTPUT_LOW)>; + }; + usb_c0_tcpc_int_odl: usb_c0_tcpc_int_odl { + gpios = <&gpio0 9 GPIO_INPUT>; + }; + usb_c1_tcpc_int_odl: usb_c1_tcpc_int_odl { + gpios = <&gpio0 10 GPIO_INPUT>; + }; + usb_c0_tcpc_rst_l: usb_c0_tcpc_rst_l { + gpios = <&gpio0 11 (GPIO_OUTPUT_HIGH | GPIO_INPUT)>; + }; + usb_c1_tcpc_rst_l: usb_c1_tcpc_rst_l { + gpios = <&gpio0 12 (GPIO_OUTPUT_HIGH | GPIO_INPUT)>; + }; + gpio_usb_c1_ppc_int: usb_c1_ppc_int { + gpios = <&gpio0 13 GPIO_INPUT>; + }; + gpio_usb_c0_ppc_int: usb_c0_ppc_int { + gpios = <&gpio0 14 GPIO_INPUT>; + }; + gpio_switchcap_pg_int_l: switchcap_pg_int_l { + gpios = <&gpio0 15 (GPIO_OUTPUT | GPIO_INPUT)>; + }; + gpio_ap_rst_l: ap_rst_l { + gpios = <&gpio0 16 GPIO_INPUT>; + enum-name = "GPIO_AP_RST_L"; + }; + gpio_ps_hold: ps_hold { + gpios = <&gpio0 17 (GPIO_INPUT | GPIO_PULL_DOWN)>; + enum-name = "GPIO_PS_HOLD"; + }; + gpio_mb_power_good: mb_power_good { + gpios = <&gpio0 18 (GPIO_OUTPUT | GPIO_INPUT | + GPIO_PULL_DOWN)>; + enum-name = "GPIO_POWER_GOOD"; + }; + gpio_ap_suspend: ap_suspend { + gpios = <&gpio0 19 GPIO_INPUT>; + enum-name = "GPIO_AP_SUSPEND"; + }; + gpio_pmic_kpd_pwr_odl: pmic_kpd_pwr_odl { + gpios = <&gpio0 20 GPIO_OUTPUT_HIGH>; + enum-name = "GPIO_PMIC_KPD_PWR_ODL"; + }; + gpio_pmic_resin_l: pmic_resin_l { + gpios = <&gpio0 21 GPIO_OUTPUT_HIGH>; + enum-name = "GPIO_PMIC_RESIN_L"; + }; + gpio_warm_reset_l: warm_reset_l { + gpios = <&gpio0 22 GPIO_INPUT>; + enum-name = "GPIO_WARM_RESET_L"; + }; + gpio_lid_open_ec: lid_open_ec { + /* GPIO_PULL_UP will cause this start asserted. */ + gpios = <&gpio0 23 (GPIO_INPUT | GPIO_PULL_UP)>; + enum-name = "GPIO_LID_OPEN"; + }; + gpio_switchcap_on: switchcap_on { + gpios = <&gpio0 24 (GPIO_INPUT | GPIO_OUTPUT_LOW)>; + }; + gpio_ec_pwr_btn_odl: ec_pwr_btn_odl { + /* GPIO_PULL_UP will cause this start asserted, + * i.e. not pressed. + */ + gpios = <&gpio0 25 (GPIO_INPUT | GPIO_PULL_UP)>; + enum-name = "GPIO_POWER_BUTTON_L"; + }; + gpio_src_vph_pwr_pg: src_vph_pwr_pg { + gpios = <&gpio0 26 (GPIO_INPUT | GPIO_OUTPUT | + GPIO_PULL_DOWN)>; + }; + gpio_test: test { + gpios = <&gpio0 27 (GPIO_INPUT | GPIO_OUTPUT)>; + }; + ec_batt_pres_odl { + gpios = <&gpio0 28 GPIO_INPUT>; + enum-name = "GPIO_BATT_PRES_ODL"; + }; + gpio_no_init: no_init { + gpios = <&gpio0 29 (GPIO_ACTIVE_LOW | GPIO_INPUT)>; + no-auto-init; + }; + gpio_ec_chg_led_y_c0: ec_chg_led_y_c0 { + #led-pin-cells = <1>; + gpios = <&gpio0 30 (GPIO_INPUT | GPIO_OUTPUT_LOW)>; + }; + gpio_ec_chg_led_w_c0: ec_chg_led_w_c0 { + #led-pin-cells = <1>; + gpios = <&gpio0 31 (GPIO_INPUT | GPIO_OUTPUT_LOW)>; + }; + /* gpio1 */ + gpio_ec_chg_led_y_c1: ec_chg_led_y_c1 { + #led-pin-cells = <1>; + gpios = <&gpio1 0 (GPIO_INPUT | GPIO_OUTPUT_LOW)>; + }; + gpio_ec_chg_led_w_c1: ec_chg_led_w_c1 { + #led-pin-cells = <1>; + gpios = <&gpio1 1 (GPIO_INPUT | GPIO_OUTPUT_LOW)>; + }; + gpio_ap_ec_int_l: ap_ec_int_l { + gpios = <&gpio1 2 GPIO_OUTPUT_HIGH>; + enum-name = "GPIO_EC_INT_L"; + }; + gpio_ec_voldn_btn_odl: ec_voldn_btn_odl { + gpios = <&gpio1 3 GPIO_INPUT_PULL_UP>; + enum-name = "GPIO_VOLUME_DOWN_L"; + }; + gpio_ec_volup_btn_odl: ec_volup_btn_odl { + gpios = <&gpio1 4 GPIO_INPUT_PULL_UP>; + enum-name = "GPIO_VOLUME_UP_L"; + }; + gpio_ec_pg_pin_temp: ec_pg_pin_temp { + gpios = <&gpio0 4 GPIO_INPUT>; + }; + }; + + gpio1: gpio@101 { + status = "okay"; + compatible = "zephyr,gpio-emul"; + reg = <0x101 0x4>; + rising-edge; + falling-edge; + high-level; + low-level; + gpio-controller; + #gpio-cells = <2>; + ngpios = <5>; + }; + + gpio-interrupts { + compatible = "cros-ec,gpio-interrupts"; + + int_ac_present: ac_present { + irq-pin = <&gpio_acok_od>; + flags = <GPIO_INT_EDGE_BOTH>; + handler = "extpower_interrupt"; + }; + int_usb_c0: usb_c0 { + irq-pin = <&usb_c0_tcpc_int_odl>; + flags = <GPIO_INT_EDGE_FALLING>; + handler = "tcpc_alert_event"; + }; + int_usb_c1: usb_c1 { + irq-pin = <&usb_c1_tcpc_int_odl>; + flags = <GPIO_INT_EDGE_FALLING>; + handler = "tcpc_alert_event"; + }; + int_usb_c0_ppc: usb_c0_ppc { + irq-pin = <&gpio_usb_c0_ppc_int>; + flags = <GPIO_INT_EDGE_FALLING>; + handler = "ppc_alert"; + }; + int_usb_c1_ppc: usb_c1_ppc { + irq-pin = <&gpio_usb_c1_ppc_int>; + flags = <GPIO_INT_EDGE_FALLING>; + handler = "ppc_alert"; + }; + int_switchcap_pg: switchcap_pg { + irq-pin = <&gpio_switchcap_pg_int_l>; + flags = <GPIO_INT_EDGE_FALLING>; + handler = "ln9310_interrupt"; + }; + int_gpio_test: test { + irq-pin = <&gpio_test>; + flags = <GPIO_INT_EDGE_BOTH>; + handler = "gpio_test_interrupt"; + }; + int_lid_open_ec: lid_open_ec { + irq-pin = <&gpio_lid_open_ec>; + flags = <GPIO_INT_EDGE_BOTH>; + handler = "lid_interrupt"; + }; + int_mb_power_good: mb_power_good { + irq-pin = <&gpio_mb_power_good>; + flags = <GPIO_INT_EDGE_BOTH>; + handler = "power_signal_interrupt"; + }; + }; + + named-i2c-ports { + compatible = "named-i2c-ports"; + + named_i2c0: i2c0 { + i2c-port = <&i2c0>; + enum-names = "I2C_PORT_BATTERY", + "I2C_PORT_POWER", + "I2C_PORT_CHARGER", + "I2C_PORT_EEPROM", + "I2C_PORT_ACCEL", + "I2C_PORT_VIRTUAL_BATTERY"; + }; + named_i2c1: i2c1 { + i2c-port = <&i2c1>; + enum-names = "I2C_PORT_SENSOR"; + }; + named_i2c2: i2c2 { + i2c-port = <&i2c2>; + dynamic-speed; + enum-names = "I2C_PORT_USB_C0"; + }; + named_i2c3: i2c3 { + i2c-port = <&i2c3>; + dynamic-speed; + enum-names = "I2C_PORT_USB_C1"; + }; + }; + + batteries { + default_battery: lgc_ac17a8m { + compatible = "lgc,ac17a8m", "battery-smart"; + }; + }; + + cbi-ssfc { + compatible = "named-cbi-ssfc"; + cbi_ssfc_base_sensor: base_sensor { + enum-name = "BASE_SENSOR"; + size = <2>; + base_sensor_0: base0 { + compatible = "named-cbi-ssfc-value"; + status = "okay"; + value = <1>; + default; + }; + base_sensor_1: base1 { + compatible = "named-cbi-ssfc-value"; + status = "okay"; + value = <2>; + }; + }; + }; + + cbi-fw-config { + compatible = "cros-ec,cbi-fw-config"; + field-1 { + enum-name = "FW_CONFIG_FIELD_1"; + start = <0>; + size = <2>; + val-0 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FIELD_1_A"; + value = <0>; + }; + val-1 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FIELD_1_B"; + value = <1>; + default; + }; + }; + field-2 { + enum-name = "FW_CONFIG_FIELD_2"; + start = <5>; + size = <1>; + val-1 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FIELD_2_X"; + value = <1>; + }; + }; + }; + + adc0: adc { + compatible = "zephyr,adc-emul"; + nchannels = <6>; + ref-internal-mv = <3300>; + #io-channel-cells = <1>; + status = "okay"; + }; + + named-adc-channels { + compatible = "named-adc-channels"; + + adc_charger: charger { + enum-name = "ADC_TEMP_SENSOR_CHARGER"; + io-channels = <&adc0 0>; + }; + adc_pp3300_regulator: pp3300-regulator { + enum-name = "ADC_TEMP_SENSOR_PP3300_REGULATOR"; + io-channels = <&adc0 1>; + }; + adc_ddr_soc: ddr-soc { + enum-name = "ADC_TEMP_SENSOR_DDR_SOC"; + io-channels = <&adc0 2>; + }; + adc_fan: fan { + enum-name = "ADC_TEMP_SENSOR_FAN"; + io-channels = <&adc0 3>; + }; + amon_bmon { + enum-name = "ADC_AMON_BMON"; + io-channels = <&adc0 4>; + mul = <1000>; + div = <20>; + }; + psys { + enum-name = "ADC_PSYS"; + io-channels = <&adc0 5>; + mul = <124000>; + }; + }; + + temp_charger: charger { + compatible = "cros-ec,temp-sensor-thermistor"; + thermistor = <&thermistor_3V3_13K7_47K_4050B>; + adc = <&adc_charger>; + }; + temp_pp3300_regulator: pp3300-regulator { + compatible = "cros-ec,temp-sensor-thermistor"; + thermistor = <&thermistor_3V3_30K9_47K_4050B>; + adc = <&adc_pp3300_regulator>; + }; + temp_ddr_soc: ddr-soc { + compatible = "cros-ec,temp-sensor-thermistor"; + thermistor = <&thermistor_3V3_51K1_47K_4050B>; + adc = <&adc_ddr_soc>; + }; + temp_fan: fan { + compatible = "cros-ec,temp-sensor-thermistor"; + thermistor = <&thermistor_3V0_22K6_47K_4050B>; + adc = <&adc_fan>; + }; + + named-temp-sensors { + compatible = "cros-ec,temp-sensors"; + named_temp_charger: charger { + status = "okay"; + temp_fan_off = <40>; + temp_fan_max = <55>; + temp_host_high = <75>; + temp_host_halt = <80>; + temp_host_release_high = <65>; + power-good-pin = <&gpio_ec_pg_pin_temp>; + sensor = <&temp_charger>; + }; + named_temp_pp3300_regulator: pp3300-regulator { + status = "okay"; + temp_fan_off = <40>; + temp_fan_max = <55>; + temp_host_high = <75>; + temp_host_halt = <80>; + temp_host_release_high = <65>; + power-good-pin = <&gpio_ec_pg_pin_temp>; + sensor = <&temp_pp3300_regulator>; + }; + named_temp_ddr_soc: ddr-soc { + status = "okay"; + temp_fan_off = <35>; + temp_fan_max = <50>; + temp_host_high = <70>; + temp_host_halt = <80>; + temp_host_release_high = <65>; + power-good-pin = <&gpio_ec_pg_pin_temp>; + sensor = <&temp_ddr_soc>; + }; + named_temp_fan: fan { + status = "okay"; + temp_fan_off = <35>; + temp_fan_max = <50>; + temp_host_high = <70>; + temp_host_halt = <80>; + temp_host_release_high = <65>; + power-good-pin = <&gpio_ec_pg_pin_temp>; + sensor = <&temp_fan>; + }; + }; + + /* + * 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"; + mutex_bma255: bma255-mutex { + }; + + mutex_bmi260: bmi260-mutex { + }; + + mutex_bmi160: bmi160-mutex { + }; + + mutex_lis2dw12: lis2dw12-mutex { + }; + }; + + /* + * Driver specific data. A driver-specific data can be shared with + * different motion sensors while they are using the same driver. + */ + motionsense-sensor-data { + bma255_data: bma255-drv-data { + compatible = "cros-ec,drvdata-bma255"; + status = "okay"; + }; + + bmi260_data: bmi260-drv-data { + compatible = "cros-ec,drvdata-bmi260"; + status = "okay"; + }; + + bmi160_data: bmi160-drv-data { + compatible = "cros-ec,drvdata-bmi160"; + status = "okay"; + }; + + lis2dw12_data: lis2dw12-drv-data { + compatible = "cros-ec,drvdata-lis2dw12"; + status = "okay"; + }; + + tcs_clear_data: tcs3400-clear-drv-data { + compatible = "cros-ec,drvdata-tcs3400-clear"; + status = "okay"; + + als-drv-data { + compatible = "cros-ec,accelgyro-als-drv-data"; + als-cal { + scale = <1>; + uscale = <0>; + offset = <0>; + als-channel-scale { + compatible = + "cros-ec,accelgyro-als-channel-scale"; + k-channel-scale = <1>; + cover-scale = <1>; + }; + }; + }; + }; + + tcs_rgb_data: tcs3400-rgb-drv-data { + compatible = "cros-ec,drvdata-tcs3400-rgb"; + status = "okay"; + + /* node for rgb_calibration_t defined in accelgyro.h */ + rgb_calibration { + compatible = + "cros-ec,accelgyro-rgb-calibration"; + + irt = <1>; + + rgb-cal-x { + offset = <0>; + coeff = <0 1 0 0>; + als-channel-scale { + compatible = + "cros-ec,accelgyro-als-channel-scale"; + k-channel-scale = <1>; + cover-scale = <1>; + }; + }; + rgb-cal-y { + offset = <0>; + coeff = <0 0 1 0>; + als-channel-scale { + compatible = + "cros-ec,accelgyro-als-channel-scale"; + k-channel-scale = <1>; + cover-scale = <1>; + }; + }; + rgb-cal-z { + offset = <0>; + coeff = <0 0 0 1>; + als-channel-scale { + compatible = + "cros-ec,accelgyro-als-channel-scale"; + k-channel-scale = <1>; + cover-scale = <1>; + }; + }; + }; + }; + }; + + /* + * 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 { + base_accel: ms_bma255: ms-bma255 { + compatible = "cros-ec,bma255"; + status = "okay"; + + active-mask = "SENSOR_ACTIVE_S0_S3_S5"; + location = "MOTIONSENSE_LOC_LID"; + mutex = <&mutex_bma255>; + port = <&named_i2c0>; + default-range = <2>; + drv-data = <&bma255_data>; + i2c-spi-addr-flags = "BMA2x2_I2C_ADDR1_FLAGS"; + configs { + compatible = + "cros-ec,motionsense-sensor-config"; + ec-s0 { + /* Run ALS sensor in S0 */ + odr = <1000>; + }; + ec-s3 { + odr = <10000>; + }; + ec-s5 { + odr = <10000>; + }; + }; + }; + lid_accel: ms_bmi260_accel: ms-bmi260-accel { + compatible = "cros-ec,bmi260-accel"; + status = "okay"; + + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi260>; + port = <&named_i2c0>; + drv-data = <&bmi260_data>; + default-range = <4>; + i2c-spi-addr-flags = "BMI260_ADDR0_FLAGS"; + }; + + ms_bmi260_gyro: ms-bmi260-gyro { + compatible = "cros-ec,bmi260-gyro"; + status = "okay"; + + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi260>; + port = <&named_i2c0>; + drv-data = <&bmi260_data>; + default-range = <1000>; /* dps */ + i2c-spi-addr-flags = "BMI260_ADDR0_FLAGS"; + }; + + ms_bmi160_accel: ms-bmi160-accel { + compatible = "cros-ec,bmi160-accel"; + status = "okay"; + + active-mask = "SENSOR_ACTIVE_S0_S3_S5"; + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi160>; + port = <&named_i2c1>; + drv-data = <&bmi160_data>; + default-range = <4>; + i2c-spi-addr-flags = "BMI160_ADDR0_FLAGS"; + }; + + ms_bmi160_gyro: ms-bmi160-gyro { + compatible = "cros-ec,bmi160-gyro"; + status = "okay"; + + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi160>; + port = <&named_i2c1>; + drv-data = <&bmi160_data>; + default-range = <1000>; /* dps */ + i2c-spi-addr-flags = "BMI160_ADDR0_FLAGS"; + }; + + ms_lis2dw12_accel: ms-lis2dw12-accel { + compatible = "cros-ec,lis2dw12"; + status = "okay"; + + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_lis2dw12>; + port = <&named_i2c0>; + drv-data = <&lis2dw12_data>; + default-range = <2>; + i2c-spi-addr-flags = "LIS2DWL_ADDR1_FLAGS"; + }; + + tcs3400_clear: tcs3400-clear { + compatible = "cros-ec,tcs3400-clear"; + status = "okay"; + + location = "MOTIONSENSE_LOC_BASE"; + port = <&named_i2c1>; + default-range = <0x10000>; + drv-data = <&tcs_clear_data>; + i2c-spi-addr-flags = "TCS3400_I2C_ADDR_FLAGS"; + configs { + compatible = + "cros-ec,motionsense-sensor-config"; + ec-s0 { + /* Run ALS sensor in S0 */ + odr = <1000>; + }; + }; + }; + + tcs3400_rgb: tcs3400-rgb { + compatible = "cros-ec,tcs3400-rgb"; + status = "okay"; + + location = "MOTIONSENSE_LOC_BASE"; + default-range = <0x10000>; /* scale = 1x, uscale = 0 */ + drv-data = <&tcs_rgb_data>; + }; + }; + + motionsense-sensor-info { + compatible = "cros-ec,motionsense-sensor-info"; + accel-force-mode-sensors = <&ms_bma255 &ms_lis2dw12_accel>; + }; + + /* + * Add extra i2c buses to test the I2C passthrough: 1 for sensor and + * 2 dedicated for TCPC. + */ + i2c1: i2c@400 { + status = "okay"; + compatible = "zephyr,i2c-emul-controller"; + clock-frequency = <I2C_BITRATE_STANDARD>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x400 4>; + + tcs_emul: tcs@39 { + compatible = "zephyr,tcs3400"; + reg = <0x39>; + error-on-ro-write; + error-on-reserved-bit-write; + error-on-msb-first-access; + }; + + accel_bmi160: bmi160@68 { + compatible = "zephyr,bmi"; + reg = <0x68>; + device-model = "BMI_EMUL_160"; + error-on-ro-write; + error-on-wo-read; + error-on-reserved-bit-write; + simulate-command-exec-time; + }; + }; + + i2c2: i2c@500 { + status = "okay"; + compatible = "zephyr,i2c-emul-controller"; + clock-frequency = <I2C_BITRATE_STANDARD>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x500 4>; + + pi3usb9201_emul: pi3usb9201@5f { + compatible = "zephyr,pi3usb9201-emul"; + reg = <0x5f>; + }; + + sn5s330_emul: sn5s330@40 { + compatible = "cros,sn5s330-emul"; + reg = <0x40>; + int-pin = <&gpio_usb_c0_ppc_int>; + }; + + tcpci_emul: tcpci_emul@82 { + compatible = "cros,tcpci-generic-emul"; + status = "okay"; + reg = <0x82>; + alert_gpio = <&usb_c0_tcpc_int_odl>; + }; + }; + + i2c3: i2c@600 { + status = "okay"; + compatible = "zephyr,i2c-emul-controller"; + clock-frequency = <I2C_BITRATE_STANDARD>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x600 4>; + + syv682x_emul: syv682x@41 { + compatible = "zephyr,syv682x-emul"; + reg = <0x41>; + frs_en_gpio = <&gpio_usb_c1_frs_en>; + alert_gpio = <&gpio_usb_c1_ppc_int>; + }; + + usb_c1_bb_retimer_emul: bbretimer@42 { + compatible = "cros,bb-retimer-emul"; + reg = <0x42>; + vendor = "BB_RETIMER_VENDOR_ID_1"; + error-on-ro-write; + error-on-reserved-bit-write; + }; + + ps8xxx_emul: ps8xxx_emul@b { + compatible = "cros,ps8xxx-emul"; + reg = <0xb>; + alert_gpio = <&usb_c1_tcpc_int_odl>; + p0-i2c-addr = <0x8>; + p1-i2c-addr = <0x9>; + gpio-i2c-addr = <0x1a>; + }; + }; + + clock: clock { + compatible = "cros,clock-control-emul"; + clock-frequency = <DT_FREQ_M(100)>; /* 100 MHz */ + }; + + wdt_counter: wdt-counter { + compatible = "zephyr,counter-watchdog"; + status = "okay"; + counter = <&counter0>; + }; + + cros_kb_raw: kb-raw-emul { + compatible = "cros-ec,kb-raw-emul"; + }; + + cros_flash: cros-flash { + compatible = "cros-ec,flash-emul"; + }; + + cros_rtc: cros-rtc { + compatible = "cros-ec,rtc-emul"; + }; + + pwms { + #address-cells = <1>; + #size-cells = <1>; + + pwm_blue_left: pwm@0 { + compatible = "cros,pwm-mock"; + reg = <0 1>; + #pwm-cells = <3>; + status = "okay"; + }; + pwm_white_left: pwm@1 { + compatible = "cros,pwm-mock"; + reg = <1 1>; + #pwm-cells = <3>; + status = "okay"; + }; + pwm_amber_right: pwm@2 { + compatible = "cros,pwm-mock"; + reg = <2 1>; + #pwm-cells = <3>; + status = "okay"; + }; + pwm_white_right: pwm@3 { + compatible = "cros,pwm-mock"; + reg = <3 1>; + #pwm-cells = <3>; + status = "okay"; + }; + pwm_kblight: pwm@4 { + compatible = "cros,pwm-mock"; + reg = <4 1>; + #pwm-cells = <3>; + status = "okay"; + }; + }; + + pwmleds { + compatible = "cros-ec,pwm-pin-config"; + + pwmled_blue_left: pwmled_b_left { + #led-pin-cells = <1>; + pwms = <&pwm_blue_left 0 1000000 PWM_POLARITY_NORMAL>; + }; + pwmled_white_left: pwmled_w_left { + #led-pin-cells = <1>; + pwms = <&pwm_white_left 0 1000000 PWM_POLARITY_NORMAL>; + }; + pwmled_amber_right: pwmled_y_right { + #led-pin-cells = <1>; + pwms = <&pwm_amber_right 0 1000000 PWM_POLARITY_NORMAL>; + }; + pwmled_white_right: pwmled_w_right { + #led-pin-cells = <1>; + pwms = <&pwm_white_right 0 1000000 PWM_POLARITY_NORMAL>; + }; + }; + + pwm-led-pins { + compatible = "cros-ec,pwm-led-pins"; + + color-off-left { + led-color = "LED_OFF"; + led-id = "EC_LED_ID_LEFT_LED"; + led-pins = <&pwmled_blue_left 0>, + <&pwmled_white_left 0>; + }; + color-off-right { + led-color = "LED_OFF"; + led-id = "EC_LED_ID_RIGHT_LED"; + led-pins = <&pwmled_amber_right 0>, + <&pwmled_white_right 0>; + }; + color-blue-left { + led-color = "LED_BLUE"; + led-id = "EC_LED_ID_LEFT_LED"; + br-color = "EC_LED_COLOR_BLUE"; + led-pins = <&pwmled_blue_left 100>, + <&pwmled_white_left 0>; + }; + color-amber-right { + led-color = "LED_AMBER"; + led-id = "EC_LED_ID_RIGHT_LED"; + br-color = "EC_LED_COLOR_AMBER"; + led-pins = <&pwmled_amber_right 100>, + <&pwmled_white_right 0>; + }; + color-white-left { + led-color = "LED_WHITE"; + led-id = "EC_LED_ID_LEFT_LED"; + br-color = "EC_LED_COLOR_WHITE"; + led-pins = <&pwmled_blue_left 0>, + <&pwmled_white_left 100>; + }; + color-white-right { + led-color = "LED_WHITE"; + led-id = "EC_LED_ID_RIGHT_LED"; + br-color = "EC_LED_COLOR_WHITE"; + led-pins = <&pwmled_amber_right 0>, + <&pwmled_white_right 100>; + }; + }; + + led-colors { + compatible = "cros-ec,led-policy"; + }; + + kblight { + compatible = "cros-ec,kblight-pwm"; + pwms = <&pwm_kblight 0 PWM_KHZ(10) PWM_POLARITY_NORMAL>; + generic-pwm-channel = <0>; + }; +}; + +&espi0 { + espi-host@0 { + status = "okay"; + compatible = "zephyr,espi-emul-espi-host"; + reg = <0x0>; + }; +}; + +&gpio0 { + ngpios = <32>; +}; + +&i2c0 { + cbi_eeprom: eeprom@56 { + compatible = "atmel,at24"; + reg = <0x56>; + size = <512>; + pagesize = <8>; + address-width = <8>; + timeout = <5>; + }; + + battery: sb@b { + compatible = "zephyr,smart-battery"; + reg = <0xb>; + cycle-count = <99>; + version = "BATTERY_SPEC_VER_1_1_WITH_PEC"; + /* Real battery voltages are multiples of 4.4V. */ + desired-charg-volt = <5000>; + desired-charg-cur = <1000>; + mf-name = "LGC"; + dev-name = "AC17A8M"; + }; + + bma_emul: bma@18 { + compatible = "zephyr,bma255"; + reg = <0x18>; + error-on-compensation-not-ready; + error-on-ro-write; + error-on-reserved-bit-write; + error-on-msb-first-access; + }; + + accel_bmi260: bmi260@68 { + compatible = "zephyr,bmi"; + reg = <0x68>; + device-model = "BMI_EMUL_260"; + error-on-ro-write; + error-on-wo-read; + error-on-reserved-bit-write; + simulate-command-exec-time; + }; + + ln9310: ln9310@72 { + compatible = "cros,ln9310-emul"; + status = "okay"; + reg = <0x72>; + pg-int-pin = <&gpio_switchcap_pg_int_l>; + }; + + lis2dw12_emul: lis2dw12@19 { + compatible = "cros,lis2dw12-emul"; + status = "okay"; + reg = <0x19>; + }; + + i2c_mock: i2c_mock@84 { + compatible = "cros,i2c-mock"; + status = "okay"; + reg = <0x84>; + }; + + isl923x_emul: isl923x@9 { + compatible = "cros,isl923x-emul"; + status = "okay"; + reg = <0x9>; + battery = <&battery>; + }; + + +}; + +/* Enable all thermistors for testing */ +&thermistor_3V3_30K9_47K_4050B { + status = "okay"; +}; + +&thermistor_3V0_22K6_47K_4050B { + status = "okay"; +}; + +&thermistor_3V3_13K7_47K_4050B { + status = "okay"; +}; + +&thermistor_3V3_51K1_47K_4050B { + status = "okay"; +}; + +&flash0 { + erase-block-size = <0x10000>; + write-block-size = <1>; + reg = <0x00000000 DT_SIZE_K(512)>; +}; |