├── .checkpatch.conf ├── .clang-format ├── .gitignore ├── COMMIT-QUEUE.ini ├── LICENSE ├── Makefile ├── Makefile.rules ├── Makefile.toolchain ├── OWNERS ├── PRESUBMIT.cfg ├── README ├── README.fmap ├── baseboard ├── dragonegg │ ├── baseboard.c │ ├── baseboard.h │ ├── battery.c │ ├── build.mk │ └── usb_pd_policy.c ├── grunt │ ├── analyzestack.yaml │ ├── baseboard.c │ ├── baseboard.h │ ├── build.mk │ └── usb_pd_policy.c ├── hatch │ ├── baseboard.c │ ├── baseboard.h │ ├── battery.c │ ├── build.mk │ ├── led_states.c │ ├── led_states.h │ └── usb_pd_policy.c ├── kalista │ ├── baseboard.c │ ├── baseboard.h │ ├── build.mk │ ├── led.c │ └── usb_pd_policy.c └── octopus │ ├── baseboard.c │ ├── baseboard.h │ ├── build.mk │ ├── led_states.c │ ├── led_states.h │ ├── usb_pd_policy.c │ ├── variant_ec_ite8320.c │ ├── variant_ec_npcx796fb.c │ ├── variant_usbc_ec_tcpcs.c │ └── variant_usbc_standalone_tcpcs.c ├── board ├── OWNERS ├── aleena │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── ampton │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── arcada_ish │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── atlas │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── atlas_ish │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── bds │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── bip │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── bobba │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── careena │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── casta │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── chell │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ ├── lfw │ │ └── gpio.inc │ └── usb_pd_policy.c ├── chell_pd ├── cheza │ ├── base_detect.c │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── coffeecake │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── gpio.inc │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── coral │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ ├── sku.h │ └── usb_pd_policy.c ├── cr50 │ ├── ap_state.c │ ├── ap_uart_state.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── closed_source_set1.c │ ├── closed_source_set1.h │ ├── ec.tasklist │ ├── ec_state.c │ ├── factory_mode.c │ ├── gpio.inc │ ├── pinweaver_tpm_imports.c │ ├── power_button.c │ ├── rdd.c │ ├── recovery_button.c │ ├── recovery_button.h │ ├── rma_key_blob.README.md │ ├── rma_key_blob.p256.prod │ ├── rma_key_blob.p256.test │ ├── rma_key_blob.x25519.prod │ ├── rma_key_blob.x25519.test │ ├── scratch_reg1.h │ ├── servo_state.c │ ├── tpm2 │ │ ├── NVMem.c │ │ ├── aes.c │ │ ├── ecc.c │ │ ├── ecies.c │ │ ├── endian.h │ │ ├── endorsement.c │ │ ├── hash.c │ │ ├── hash_data.c │ │ ├── hkdf.c │ │ ├── manufacture.c │ │ ├── mfg_nvmem_allocations.txt │ │ ├── nvmem_ops.c │ │ ├── platform.c │ │ ├── rsa.c │ │ ├── stubs.c │ │ ├── tpm_mode.c │ │ ├── tpm_state.c │ │ ├── trng.c │ │ ├── virtual_nvmem.c │ │ └── virtual_nvmem.h │ ├── tpm_nvmem_ops.c │ ├── tpm_nvmem_ops.h │ ├── u2f.c │ ├── usb_i2c.c │ ├── usb_spi.c │ ├── wp.c │ └── wp.h ├── delan │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── dingdong │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── gpio.inc │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── discovery-stm32f072 │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── openocd-flash.cfg ├── discovery │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── openocd-flash.cfg ├── dragonegg │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── elm │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── eve │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── fizz │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── flapjack │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── emmc.c │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── fleex │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── glados │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ ├── lfw │ │ └── gpio.inc │ └── usb_pd_policy.c ├── glados_pd │ ├── block.png │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dualtcpc.md │ ├── ec.tasklist │ ├── glados_pd.pdf │ ├── glados_pd.png │ ├── gpio.inc │ └── usb_pd_config.h ├── glkrvp │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── chg_usb_pd.c │ ├── ec.tasklist │ ├── gpio.inc │ └── usb_pd_policy.c ├── glkrvp_ite │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── chg_usb_pd.c │ ├── ec.tasklist │ ├── gpio.inc │ └── usb_pd_policy.c ├── gru ├── grunt │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── hadoken │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── hammer │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ └── gpio.inc ├── hatch │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── hoho │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── gpio.inc │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── host │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── charger.c │ ├── chipset.c │ ├── dcrypto.h │ ├── ec.tasklist │ ├── fan.c │ ├── gpio.inc │ ├── usb_pd_config.c │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── it83xx_evb │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── usb_pd_policy.c ├── jerry │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── karma │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ └── gpio.inc ├── kevin │ ├── board.c │ ├── board.h │ ├── build.mk │ └── ec.tasklist ├── kukui │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── emmc.c │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── kukui_scp │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── liara │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── lux ├── mchpevb1 │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ ├── lfw │ │ └── gpio.inc │ └── usb_pd_policy.c ├── meep │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── minimuffin ├── nami │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── nami_fp │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── flash_fp_mcu │ └── gpio.inc ├── nautilus │ ├── analyzestack.yaml │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── nocturne │ ├── base_detect.c │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── nocturne_fp │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.tasklist │ ├── flash_fp_mcu │ └── gpio.inc ├── npcx7_evb │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── npcx_evb │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── npcx_evb_arm │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── nucleo-f072rb │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── openocd-flash.cfg ├── nucleo-f411re │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── openocd-flash.cfg ├── oak │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── board_revs.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── oak_pd ├── pdeval-stm32f072 │ ├── PD_evaluation.md │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── openocd-flash.cfg │ └── usb_pd_policy.c ├── phaser │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c ├── plankton │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── polyberry │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── poppy │ ├── analyzestack.yaml │ ├── base_detect_lux.c │ ├── base_detect_poppy.c │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── rainier │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── usb_pd_policy.c ├── rammus │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── reef │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── reef_it8320 │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── reef_mchp │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ ├── lfw │ │ └── gpio.inc │ └── usb_pd_policy.c ├── rowan │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── samus │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── extpower.c │ ├── gpio.inc │ ├── panel.c │ └── power_sequence.c ├── samus_pd │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── usb_mux.c │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── scarlet │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ └── usb_pd_policy.c ├── servo_micro │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ccd.md │ ├── ec.tasklist │ ├── gpio.inc │ ├── servo_micro.png │ └── servo_micro_sch_20180404.pdf ├── servo_v4 │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── soraka ├── staff ├── stm32f446e-eval │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── stm32l476g-eval │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── openocd-flash.cfg ├── strago │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── led.c │ ├── lfw │ │ └── gpio.inc │ └── usb_pd_policy.c ├── sweetberry │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── tigertail │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ └── gpio.inc ├── twinkie │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ ├── injector.c │ ├── injector.h │ ├── simpletrace.c │ ├── sniffer.c │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── wand ├── whiskers ├── yorp │ ├── battery.c │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── ec.tasklist │ ├── gpio.inc │ └── led.c └── zinger │ ├── board.c │ ├── board.h │ ├── build.mk │ ├── dev_key.pem │ ├── ec.irqlist │ ├── ec.tasklist │ ├── hardware.c │ ├── runtime.c │ ├── usb_pd_config.h │ └── usb_pd_policy.c ├── builtin ├── assert.h ├── endian.h ├── stdarg.h ├── stdbool.h ├── stddef.h ├── stdint.h ├── string.h └── time.h ├── chip ├── g │ ├── alerts.c │ ├── blob.c │ ├── board_id.c │ ├── board_id.h │ ├── board_space.h │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── crypto_api.c │ ├── dcrypto │ │ ├── aes.c │ │ ├── aes_cmac.c │ │ ├── app_cipher.c │ │ ├── app_key.c │ │ ├── bn.c │ │ ├── compare.c │ │ ├── dcrypto.h │ │ ├── dcrypto_bn.c │ │ ├── dcrypto_p256.c │ │ ├── dcrypto_runtime.c │ │ ├── dcrypto_sha512.c │ │ ├── gcm.c │ │ ├── hkdf.c │ │ ├── hmac.c │ │ ├── hmac_drbg.c │ │ ├── internal.h │ │ ├── key_ladder.c │ │ ├── p256.c │ │ ├── p256_ec.c │ │ ├── p256_ecies.c │ │ ├── proofs_p256.md │ │ ├── rsa.c │ │ ├── sha1.c │ │ ├── sha256.c │ │ ├── sha384.c │ │ ├── sha512.c │ │ └── x509.c │ ├── flash.c │ ├── flash_config.h │ ├── flash_info.h │ ├── gpio.c │ ├── hw_regdefs.h │ ├── hwtimer.c │ ├── i2cm.c │ ├── i2cs.c │ ├── i2cs.h │ ├── idle.c │ ├── init_chip.h │ ├── ite_flash.c │ ├── ite_sync.S │ ├── ite_sync.h │ ├── jitter.c │ ├── loader │ │ ├── debug_printf.c │ │ ├── debug_printf.h │ │ ├── key_ladder.c │ │ ├── key_ladder.h │ │ ├── launch.c │ │ ├── main.c │ │ ├── rom_flash.c │ │ ├── rom_flash.h │ │ ├── setup.c │ │ ├── setup.h │ │ ├── verify.c │ │ └── verify.h │ ├── pmu.c │ ├── pmu.h │ ├── polling_uart.c │ ├── post_reset.c │ ├── pre_init.c │ ├── rbox.c │ ├── rbox.h │ ├── rdd.c │ ├── rdd.h │ ├── registers.h │ ├── runlevel.c │ ├── signed_header.h │ ├── sn_bits.c │ ├── sn_bits.h │ ├── spi_master.c │ ├── spi_master.h │ ├── sps.c │ ├── sps.h │ ├── sps_tpm.c │ ├── system.c │ ├── system_chip.h │ ├── trng.c │ ├── uart.c │ ├── uart_bitbang.c │ ├── uart_bitbang.h │ ├── uartn.c │ ├── uartn.h │ ├── upgrade.c │ ├── upgrade_fw.c │ ├── upgrade_fw.h │ ├── usart.c │ ├── usart.h │ ├── usb-stream.c │ ├── usb-stream.h │ ├── usb.c │ ├── usb_console.c │ ├── usb_endpoints.c │ ├── usb_hid_keyboard.c │ ├── usb_hw.h │ ├── usb_spi.c │ ├── usb_spi.h │ ├── usb_upgrade.c │ └── watchdog.c ├── host │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── dcrypto │ │ ├── README.md │ │ ├── aes.c │ │ ├── app_cipher.c │ │ ├── app_key.c │ │ └── sha256.c │ ├── flash.c │ ├── gpio.c │ ├── host_test.h │ ├── i2c.c │ ├── keyboard_raw.c │ ├── lpc.c │ ├── persistence.c │ ├── persistence.h │ ├── reboot.c │ ├── reboot.h │ ├── registers.h │ ├── system.c │ ├── uart.c │ └── usb_pd_phy.c ├── ish │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── config_flash_layout.h │ ├── flash.c │ ├── gpio.c │ ├── hbm.h │ ├── heci.c │ ├── heci_client.h │ ├── hid_device.h │ ├── hid_subsys.c │ ├── hpet.h │ ├── hwtimer.c │ ├── i2c.c │ ├── ipc.c │ ├── ipc.h │ ├── ipc_heci.c │ ├── ipc_heci.h │ ├── ish_fwst.h │ ├── ish_i2c.h │ ├── registers.h │ ├── system.c │ ├── system_state.h │ ├── system_state_subsys.c │ ├── uart.c │ └── uart_defs.h ├── it83xx │ ├── adc.c │ ├── adc_chip.h │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── ec2i.c │ ├── ec2i_chip.h │ ├── espi.c │ ├── fan.c │ ├── flash.c │ ├── flash_chip.h │ ├── gpio.c │ ├── hwtimer.c │ ├── hwtimer_chip.h │ ├── i2c.c │ ├── intc.c │ ├── intc.h │ ├── irq.c │ ├── it83xx_fpu.S │ ├── keyboard_raw.c │ ├── kmsc_chip.h │ ├── lpc.c │ ├── peci.c │ ├── pwm.c │ ├── pwm_chip.h │ ├── registers.h │ ├── spi_master.c │ ├── system.c │ ├── uart.c │ └── watchdog.c ├── lm4 │ ├── adc.c │ ├── adc_chip.h │ ├── build.mk │ ├── chip_temp_sensor.c │ ├── clock.c │ ├── config_chip.h │ ├── eeprom.c │ ├── fan.c │ ├── flash.c │ ├── gpio.c │ ├── hwtimer.c │ ├── i2c.c │ ├── keyboard_raw.c │ ├── lpc.c │ ├── peci.c │ ├── pwm.c │ ├── pwm_chip.h │ ├── registers.h │ ├── spi.c │ ├── system.c │ ├── uart.c │ └── watchdog.c ├── mchp │ ├── adc.c │ ├── adc_chip.h │ ├── build.mk │ ├── clock.c │ ├── clock_chip.h │ ├── config_chip.h │ ├── config_flash_layout.h │ ├── dma.c │ ├── dma_chip.h │ ├── espi.c │ ├── fan.c │ ├── flash.c │ ├── gpio.c │ ├── gpio_chip.h │ ├── gpio_cmds.c │ ├── gpspi.c │ ├── gpspi_chip.h │ ├── hwtimer.c │ ├── i2c.c │ ├── keyboard_raw.c │ ├── lfw │ │ ├── ec_lfw.c │ │ ├── ec_lfw.h │ │ └── ec_lfw.ld │ ├── lpc.c │ ├── lpc_chip.h │ ├── port80.c │ ├── pwm.c │ ├── pwm_chip.h │ ├── qmspi.c │ ├── qmspi_chip.h │ ├── registers.h │ ├── spi.c │ ├── spi_chip.h │ ├── system.c │ ├── tfdp.c │ ├── tfdp_chip.h │ ├── uart.c │ ├── util │ │ └── pack_ec.py │ └── watchdog.c ├── mec1322 │ ├── adc.c │ ├── adc_chip.h │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── config_flash_layout.h │ ├── dma.c │ ├── fan.c │ ├── flash.c │ ├── gpio.c │ ├── hwtimer.c │ ├── i2c.c │ ├── keyboard_raw.c │ ├── lfw │ │ ├── ec_lfw.c │ │ ├── ec_lfw.h │ │ └── ec_lfw.ld │ ├── lpc.c │ ├── port80.c │ ├── pwm.c │ ├── pwm_chip.h │ ├── registers.h │ ├── spi.c │ ├── system.c │ ├── uart.c │ ├── util │ │ ├── pack_ec.py │ │ ├── rsakey_sign_header.pem │ │ └── rsakey_sign_payload.pem │ └── watchdog.c ├── mt_scp │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── gpio.c │ ├── hrtimer.c │ ├── ipi.c │ ├── ipi_chip.h │ ├── ipi_table.c │ ├── memmap.c │ ├── memmap.h │ ├── memory_regions.inc │ ├── registers.h │ ├── serial_reg.h │ ├── stepping_stone.c │ ├── system.c │ ├── uart.c │ └── watchdog.c ├── npcx │ ├── adc.c │ ├── adc_chip.h │ ├── apm.c │ ├── apm_chip.h │ ├── build.mk │ ├── cec.c │ ├── clock.c │ ├── clock_chip.h │ ├── config_chip-npcx5.h │ ├── config_chip-npcx7.h │ ├── config_chip.h │ ├── config_flash_layout.h │ ├── espi.c │ ├── fan.c │ ├── fan_chip.h │ ├── flash.c │ ├── gpio.c │ ├── gpio_chip-npcx5.h │ ├── gpio_chip-npcx7.h │ ├── gpio_chip.h │ ├── header.c │ ├── hwtimer.c │ ├── hwtimer_chip.h │ ├── i2c-npcx5.c │ ├── i2c-npcx7.c │ ├── i2c.c │ ├── i2c_chip.h │ ├── keyboard_raw.c │ ├── lfw │ │ └── ec_lfw.h │ ├── lpc.c │ ├── lpc_chip.h │ ├── peci.c │ ├── pwm.c │ ├── pwm_chip.h │ ├── registers.h │ ├── rom_chip.h │ ├── shi.c │ ├── shi_chip.h │ ├── spi.c │ ├── spiflashfw │ │ ├── monitor_hdr.c │ │ ├── npcx_monitor.c │ │ ├── npcx_monitor.h │ │ └── npcx_monitor.ld │ ├── system-npcx5.c │ ├── system-npcx7.c │ ├── system.c │ ├── system_chip.h │ ├── uart.c │ ├── uartn.c │ ├── uartn.h │ ├── watchdog.c │ ├── wov.c │ └── wov_chip.h ├── nrf51 │ ├── bluetooth_le.c │ ├── bluetooth_le.h │ ├── build.mk │ ├── clock.c │ ├── config_chip.h │ ├── gpio.c │ ├── hwtimer.c │ ├── i2c.c │ ├── keyboard_raw.c │ ├── ppi.c │ ├── ppi.h │ ├── radio.c │ ├── radio.h │ ├── radio_test.c │ ├── radio_test.h │ ├── registers.h │ ├── system.c │ ├── uart.c │ └── watchdog.c └── stm32 │ ├── adc-stm32f0.c │ ├── adc-stm32f3.c │ ├── adc-stm32f4.c │ ├── adc-stm32l.c │ ├── adc_chip.h │ ├── build.mk │ ├── charger_detect.c │ ├── clock-f.c │ ├── clock-f.h │ ├── clock-stm32f0.c │ ├── clock-stm32f3.c │ ├── clock-stm32f4.c │ ├── clock-stm32h7.c │ ├── clock-stm32l.c │ ├── clock-stm32l4.c │ ├── config-stm32f03x.h │ ├── config-stm32f05x.h │ ├── config-stm32f07x.h │ ├── config-stm32f09x.h │ ├── config-stm32f373.h │ ├── config-stm32f446.h │ ├── config-stm32f76x.h │ ├── config-stm32h7x3.h │ ├── config-stm32l100.h │ ├── config-stm32l15x.h │ ├── config-stm32l442.h │ ├── config-stm32l476.h │ ├── config_chip.h │ ├── crc_hw.h │ ├── debug_printf.c │ ├── debug_printf.h │ ├── dma-stm32f4.c │ ├── dma.c │ ├── flash-f.c │ ├── flash-stm32f0.c │ ├── flash-stm32f3.c │ ├── flash-stm32f4.c │ ├── flash-stm32h7.c │ ├── flash-stm32l.c │ ├── flash-stm32l4.c │ ├── gpio-f0-l.c │ ├── gpio-stm32f0.c │ ├── gpio-stm32f3.c │ ├── gpio-stm32f4.c │ ├── gpio-stm32h7.c │ ├── gpio-stm32l.c │ ├── gpio-stm32l4.c │ ├── gpio.c │ ├── gpio_chip.h │ ├── hwtimer.c │ ├── hwtimer32.c │ ├── i2c-stm32f0.c │ ├── i2c-stm32f3.c │ ├── i2c-stm32f4.c │ ├── i2c-stm32l.c │ ├── i2c-stm32l4.c │ ├── keyboard_raw.c │ ├── memory_regions.inc │ ├── otp-stm32f4.c │ ├── power_led.c │ ├── pwm.c │ ├── pwm_chip.h │ ├── registers.h │ ├── spi.c │ ├── spi_master-stm32h7.c │ ├── spi_master.c │ ├── stm32-dma.h │ ├── system.c │ ├── trng.c │ ├── uart.c │ ├── usart-stm32f0.c │ ├── usart-stm32f0.h │ ├── usart-stm32f3.c │ ├── usart-stm32f3.h │ ├── usart-stm32l.c │ ├── usart-stm32l.h │ ├── usart.c │ ├── usart.h │ ├── usart_info_command.c │ ├── usart_rx_dma.c │ ├── usart_rx_dma.h │ ├── usart_rx_interrupt-stm32f0.c │ ├── usart_rx_interrupt-stm32f3.c │ ├── usart_rx_interrupt-stm32l.c │ ├── usart_rx_interrupt.c │ ├── usart_tx_dma.c │ ├── usart_tx_dma.h │ ├── usart_tx_interrupt.c │ ├── usb-stm32f0.c │ ├── usb-stm32f3.c │ ├── usb-stm32f3.h │ ├── usb-stm32l.c │ ├── usb-stream.c │ ├── usb-stream.h │ ├── usb.c │ ├── usb_console.c │ ├── usb_dwc.c │ ├── usb_dwc_console.c │ ├── usb_dwc_console.h │ ├── usb_dwc_hw.h │ ├── usb_dwc_i2c.h │ ├── usb_dwc_registers.h │ ├── usb_dwc_stream.c │ ├── usb_dwc_stream.h │ ├── usb_dwc_update.h │ ├── usb_endpoints.c │ ├── usb_gpio.c │ ├── usb_gpio.h │ ├── usb_hid.c │ ├── usb_hid_hw.h │ ├── usb_hid_keyboard.c │ ├── usb_hid_touchpad.c │ ├── usb_hw.h │ ├── usb_isochronous.c │ ├── usb_isochronous.h │ ├── usb_pd_phy.c │ ├── usb_power.c │ ├── usb_power.h │ ├── usb_spi.c │ ├── usb_spi.h │ └── watchdog.c ├── common ├── acpi.c ├── adc.c ├── aes-gcm.c ├── aes.c ├── als.c ├── ap_hang_detect.c ├── backlight_lid.c ├── base32.c ├── base_state.c ├── battery.c ├── battery_fuel_gauge.c ├── bluetooth_le.c ├── btle_hci_controller.c ├── btle_ll.c ├── build.mk ├── button.c ├── capsense.c ├── cbi.c ├── ccd_config.c ├── cec.c ├── charge_manager.c ├── charge_ramp.c ├── charge_ramp_sw.c ├── charge_state_v2.c ├── charger.c ├── charger_profile_override.c ├── chipset.c ├── clz.c ├── console.c ├── console_output.c ├── crc.c ├── crc8.c ├── ctz.c ├── curve25519-generic.c ├── curve25519.c ├── device_event.c ├── device_state.c ├── dptf.c ├── ec.libsharedobjs.ld ├── ec_ec_comm_master.c ├── ec_ec_comm_slave.c ├── ec_features.c ├── espi.c ├── event_log.c ├── extension.c ├── extpower_gpio.c ├── factory_mode.c ├── fan.c ├── firmware_image.S ├── firmware_image.lds.S ├── flash.c ├── fmap.c ├── fpsensor.c ├── gesture.c ├── gpio.c ├── gpio_commands.c ├── hooks.c ├── host_command.c ├── host_command_master.c ├── host_command_pd.c ├── host_event_commands.c ├── i2c_master.c ├── i2c_slave.c ├── i2c_wedge.c ├── i2cs_tpm.c ├── inductive_charging.c ├── keyboard_8042.c ├── keyboard_8042_sharedlib.c ├── keyboard_backlight.c ├── keyboard_mkbp.c ├── keyboard_scan.c ├── keyboard_test.c ├── lb_common.c ├── led_common.c ├── led_onoff_states.c ├── led_policy_std.c ├── led_pwm.c ├── lid_angle.c ├── lid_switch.c ├── lightbar.c ├── mag_cal.c ├── main.c ├── mat33.c ├── mat44.c ├── math_util.c ├── memory_commands.c ├── mkbp_event.c ├── motion_lid.c ├── motion_sense.c ├── nvcounter.c ├── nvmem.c ├── nvmem_vars.c ├── onewire.c ├── panic_output.c ├── pd_log.c ├── physical_presence.c ├── pinweaver.c ├── port80.c ├── power_button.c ├── power_button_x86.c ├── printf.c ├── pstore_commands.c ├── pwm.c ├── pwm_kblight.c ├── queue.c ├── queue_policies.c ├── rma_auth.c ├── rollback.c ├── rsa.c ├── rtc.c ├── rwsig.c ├── sha1.c ├── sha256.c ├── shared_mem.c ├── shmalloc.c ├── smbus.c ├── spi_commands.c ├── spi_flash.c ├── spi_flash_reg.c ├── spi_nor.c ├── switch.c ├── system.c ├── tablet_mode.c ├── temp_sensor.c ├── test_util.c ├── thermal.c ├── throttle_ap.c ├── timer.c ├── tpm_log.c ├── tpm_registers.c ├── u2f.c ├── uart_buffering.c ├── update_fw.c ├── usb_charger.c ├── usb_i2c.c ├── usb_pd_policy.c ├── usb_pd_protocol.c ├── usb_pd_tcpc.c ├── usb_port_power_dumb.c ├── usb_port_power_smart.c ├── usb_update.c ├── usbc_ppc.c ├── util.c ├── vboot │ ├── common.c │ ├── vb21_lib.c │ └── vboot.c ├── vboot_hash.c ├── vec3.c ├── version.c ├── virtual_battery.c ├── vstore.c ├── webusb_desc.c └── wireless.c ├── core ├── cortex-m │ ├── aes.S │ ├── atomic.h │ ├── build.mk │ ├── cache.S │ ├── config_core.h │ ├── cpu.c │ ├── cpu.h │ ├── ec.lds.S │ ├── ghash.S │ ├── include │ │ ├── math.h │ │ └── mpu.h │ ├── init.S │ ├── irq_handler.h │ ├── ldivmod.S │ ├── llsr.c │ ├── mpu.c │ ├── panic-internal.h │ ├── panic.c │ ├── switch.S │ ├── task.c │ ├── uldivmod.S │ ├── vecttable.c │ └── watchdog.c ├── cortex-m0 │ ├── atomic.h │ ├── build.mk │ ├── config_core.h │ ├── cpu.c │ ├── cpu.h │ ├── curve25519 │ │ ├── cc0_1.0 │ │ ├── mpy121666.S │ │ ├── mul.S │ │ ├── reduce25519.S │ │ ├── scalarmult.c │ │ └── sqr.S │ ├── div.S │ ├── ec.lds.S │ ├── include │ │ └── math.h │ ├── init.S │ ├── irq_handler.h │ ├── ldivmod.S │ ├── lmul.S │ ├── mula.S │ ├── panic-internal.h │ ├── panic.c │ ├── switch.S │ ├── task.c │ ├── thumb_case.S │ ├── uldivmod.S │ ├── vecttable.c │ └── watchdog.c ├── host │ ├── atomic.h │ ├── build.mk │ ├── cpu.h │ ├── disabled.c │ ├── host_exe.lds │ ├── host_task.h │ ├── irq_handler.h │ ├── main.c │ ├── panic.c │ ├── stack_trace.c │ ├── task.c │ └── timer.c ├── minute-ia │ ├── atomic.h │ ├── build.mk │ ├── config_core.h │ ├── cpu.c │ ├── cpu.h │ ├── ec.lds.S │ ├── include │ │ └── math.h │ ├── init.S │ ├── interrupts.c │ ├── interrupts.h │ ├── irq_handler.h │ ├── mpu.c │ ├── panic.c │ ├── switch.S │ ├── task.c │ └── task_defs.h └── nds32 │ ├── __builtin.c │ ├── __divdi3.S │ ├── __libsoftfpu.S │ ├── __muldi3.S │ ├── __udivdi3.S │ ├── atomic.h │ ├── build.mk │ ├── config_core.h │ ├── cpu.c │ ├── cpu.h │ ├── ec.lds.S │ ├── include │ └── math.h │ ├── init.S │ ├── irq_chip.h │ ├── irq_handler.h │ ├── math.c │ ├── panic.c │ ├── switch.S │ └── task.c ├── cts ├── README ├── build.mk ├── common │ ├── __init__.py │ ├── board.py │ ├── cts.rc │ ├── cts_common.c │ ├── cts_common.h │ ├── cts_testlist.h │ ├── dut_common.c │ └── th_common.c ├── cts.py ├── cts.tasklist ├── gpio │ ├── cts.testlist │ ├── dut.c │ └── th.c ├── hook │ ├── cts.testlist │ ├── dut.c │ └── th.c ├── i2c │ ├── cts.testlist │ ├── cts_i2c.h │ ├── dut.c │ └── th.c ├── interrupt │ ├── cts.testlist │ ├── dut.c │ └── th.c ├── meta │ ├── cts.testlist │ ├── dut.c │ └── th.c ├── mutex │ ├── cts.tasklist │ ├── cts.testlist │ ├── dut.c │ └── th.c ├── task │ ├── cts.tasklist │ ├── cts.testlist │ ├── dut.c │ └── th.c └── timer │ ├── cts.testlist │ ├── dut.c │ └── th.c ├── docs ├── case_closed_debugging.md ├── case_closed_debugging_cr50.md ├── low_battery_startup.md └── usb_updater.md ├── driver ├── accel_bma2x2.c ├── accel_bma2x2.h ├── accel_kionix.c ├── accel_kionix.h ├── accel_kx022.h ├── accel_kxcj9.h ├── accel_lis2dh.c ├── accel_lis2dh.h ├── accelgyro_bmi160.c ├── accelgyro_bmi160.h ├── accelgyro_lsm6ds0.c ├── accelgyro_lsm6ds0.h ├── accelgyro_lsm6dsm.c ├── accelgyro_lsm6dsm.h ├── als_al3010.c ├── als_al3010.h ├── als_bh1730.c ├── als_bh1730.h ├── als_isl29035.c ├── als_isl29035.h ├── als_opt3001.c ├── als_opt3001.h ├── als_si114x.c ├── als_si114x.h ├── baro_bmp280.c ├── baro_bmp280.h ├── battery │ ├── bq20z453.c │ ├── bq27541.c │ ├── bq27621_g1.c │ ├── bq4050.c │ ├── max17055.c │ ├── max17055.h │ └── smart.c ├── bc12 │ ├── max14637.c │ ├── max14637.h │ └── pi3usb9281.c ├── build.mk ├── charger │ ├── bd9995x.c │ ├── bd9995x.h │ ├── bq24192.c │ ├── bq24192.h │ ├── bq24707a.c │ ├── bq24707a.h │ ├── bq24715.c │ ├── bq24715.h │ ├── bq24725.c │ ├── bq24725.h │ ├── bq24735.c │ ├── bq24735.h │ ├── bq24738.c │ ├── bq24738.h │ ├── bq24773.c │ ├── bq24773.h │ ├── bq25703.c │ ├── bq25703.h │ ├── bq25710.c │ ├── bq25710.h │ ├── bq2589x.c │ ├── bq2589x.h │ ├── isl923x.c │ ├── isl923x.h │ ├── rt946x.c │ ├── rt946x.h │ ├── sy21612.c │ └── sy21612.h ├── gyro_l3gd20h.c ├── gyro_l3gd20h.h ├── ina2xx.c ├── ina2xx.h ├── ioexpander_it8300.h ├── ioexpander_pca9534.c ├── ioexpander_pca9534.h ├── ioexpander_pca9555.h ├── led │ ├── ds2413.c │ ├── lm3509.c │ ├── lm3509.h │ ├── lm3630a.c │ ├── lm3630a.h │ ├── lp5562.c │ ├── lp5562.h │ ├── oz554.c │ └── oz554.h ├── mag_bmm150.c ├── mag_bmm150.h ├── mag_lis2mdl.c ├── mag_lis2mdl.h ├── mcdp28x0.c ├── mcdp28x0.h ├── pi3usb30532.h ├── pi3usb9281.h ├── pmic_bd99992gw.h ├── pmic_tps650x30.h ├── ppc │ ├── nx20p348x.c │ ├── nx20p348x.h │ ├── sn5s330.c │ ├── sn5s330.h │ ├── syv682x.c │ └── syv682x.h ├── regulator_ir357x.c ├── sensorhub_lsm6dsm.c ├── sensorhub_lsm6dsm.h ├── stm_mems_common.c ├── stm_mems_common.h ├── sync.c ├── sync.h ├── tcpm │ ├── anx7447.c │ ├── anx7447.h │ ├── anx74xx.c │ ├── anx74xx.h │ ├── anx7688.c │ ├── anx7688.h │ ├── fusb302.c │ ├── fusb302.h │ ├── it83xx.c │ ├── it83xx_pd.h │ ├── mt6370.c │ ├── mt6370.h │ ├── ps8xxx.c │ ├── ps8xxx.h │ ├── stub.c │ ├── tcpci.c │ ├── tcpci.h │ ├── tcpm.h │ ├── tusb422.c │ └── tusb422.h ├── temp_sensor │ ├── adt7481.c │ ├── adt7481.h │ ├── bd99992gw.c │ ├── bd99992gw.h │ ├── ec_adc.c │ ├── ec_adc.h │ ├── f75303.c │ ├── f75303.h │ ├── g78x.c │ ├── g78x.h │ ├── sb_tsi.c │ ├── sb_tsi.h │ ├── thermistor.c │ ├── thermistor.h │ ├── thermistor_ncp15wb.c │ ├── tmp006.c │ ├── tmp006.h │ ├── tmp112.c │ ├── tmp112.h │ ├── tmp411.c │ ├── tmp411.h │ ├── tmp432.c │ ├── tmp432.h │ ├── tmp468.c │ └── tmp468.h ├── touchpad_elan.c ├── touchpad_st.c ├── touchpad_st.h ├── usb_mux.c ├── usb_mux_it5205.c ├── usb_mux_it5205.h ├── usb_mux_pi3usb30532.c ├── usb_mux_ps874x.c ├── usb_mux_ps874x.h └── usb_mux_virtual.c ├── extra ├── README ├── cr50_rma_open │ └── cr50_rma_open.py ├── ftdi_hostcmd │ ├── .gitignore │ ├── Makefile │ ├── README │ └── test_cmds.c ├── lightbar │ ├── .gitignore │ ├── Makefile │ ├── README │ ├── input.c │ ├── main.c │ ├── programs │ │ ├── bad-decode-32.bin │ │ ├── bad-decode-8.bin │ │ ├── bad-jump.bin │ │ ├── bad-opcode.bin │ │ ├── green-pulse.bin │ │ ├── green-pulse.lbs │ │ ├── infinite-jump.bin │ │ ├── infinite-jump.lbs │ │ ├── konami.bin │ │ ├── konami.lbs │ │ ├── rainbow-shift.bin │ │ ├── rainbow-shift.lbs │ │ ├── red-green-blink.bin │ │ ├── red-green-blink.lbs │ │ ├── s0.bin │ │ ├── s0.lbs │ │ ├── s0s3.bin │ │ ├── s0s3.lbs │ │ ├── s3.bin │ │ ├── s3.lbs │ │ ├── s3s0.bin │ │ └── s3s0.lbs │ ├── simulation.h │ └── windows.c ├── rma_reset │ ├── .gitignore │ ├── Makefile │ ├── board.h │ └── rma_reset.c ├── sps_errs │ ├── .gitignore │ ├── Makefile │ ├── README │ └── prog.c ├── stack_analyzer │ ├── README.md │ ├── example_annotation.yaml │ ├── run_tests.sh │ ├── stack_analyzer.py │ └── stack_analyzer_unittest.py ├── tigertool │ ├── README.md │ ├── ecusb │ │ ├── __init__.py │ │ ├── pty_driver.py │ │ ├── stm32uart.py │ │ ├── stm32usb.py │ │ └── tiny_servo_common.py │ ├── flash_dfu.sh │ ├── make_pkg.sh │ └── tigertool.py ├── touchpad_updater │ ├── Makefile │ └── touchpad_updater.c ├── usb_console │ ├── .gitignore │ ├── Makefile │ └── usb_console.c ├── usb_gpio │ ├── .gitignore │ ├── Makefile │ └── usb_gpio.c ├── usb_power │ ├── __init__.py │ ├── board │ │ ├── kevin │ │ │ ├── kevin.board │ │ │ └── kevin_all.scenario │ │ └── marlin │ │ │ ├── marlin.board │ │ │ ├── marlin_all_A.scenario │ │ │ ├── marlin_all_B.scenario │ │ │ ├── marlin_common.scenario │ │ │ ├── marlin_pvc.scenario │ │ │ ├── marlin_short.scenario │ │ │ └── marlin_vbat.scenario │ ├── convert_power_log_board.py │ ├── convert_servo_ina.py │ ├── marlin_v.scenario │ ├── powerlog.README.md │ ├── powerlog.py │ ├── powerlog_unittest.py │ ├── stats_manager.py │ └── stats_manager_unittest.py ├── usb_serial │ ├── .gitignore │ ├── 51-google-serial-fallback.rules │ ├── 51-google-serial.rules │ ├── Makefile │ ├── README.md │ ├── add_usb_serial_id │ ├── console.py │ ├── install │ └── raiden.c ├── usb_spi │ └── stm32spi.py └── usb_updater │ ├── .gitignore │ ├── Makefile │ ├── desc_parser.c │ ├── desc_parser.h │ ├── ecusb │ ├── fw_update.py │ ├── gsctool.c │ ├── gsctool.h │ ├── sample_descriptor │ ├── servo_micro.json │ ├── servo_updater.py │ ├── servo_v4.json │ ├── sweetberry.json │ ├── usb_updater2.c │ ├── verify_ro.c │ └── verify_ro.h ├── fuzz ├── build.mk ├── cr50_fuzz.cc ├── cr50_fuzz.owners ├── cr50_fuzz.proto ├── cr50_fuzz.tasklist ├── fuzz_config.h ├── host_command_fuzz.c ├── host_command_fuzz.tasklist ├── mem_hash_tree.cc ├── mem_hash_tree.h ├── pinweaver │ └── pinweaver.proto ├── pinweaver_model.cc ├── pinweaver_model.h ├── span.h ├── usb_pd_fuzz.c └── usb_pd_fuzz.tasklist ├── include ├── 2id.h ├── accelgyro.h ├── acpi.h ├── adc.h ├── aes-gcm.h ├── aes.h ├── als.h ├── ap_hang_detect.h ├── backlight.h ├── base32.h ├── base_state.h ├── battery.h ├── battery_bq27621_g1.h ├── battery_fuel_gauge.h ├── battery_smart.h ├── bluetooth_le.h ├── bluetooth_le_ll.h ├── board_config.h ├── btle_hci2.h ├── btle_hci_int.h ├── button.h ├── byteorder.h ├── capsense.h ├── case_closed_debug.h ├── ccd_config.h ├── cec.h ├── charge_manager.h ├── charge_ramp.h ├── charge_state.h ├── charge_state_v1.h ├── charge_state_v2.h ├── charger.h ├── charger_detect.h ├── charger_profile_override.h ├── chipset.h ├── clock.h ├── common.h ├── compile_time_macros.h ├── config.h ├── config_std_internal_flash.h ├── console.h ├── console_channel.inc ├── consumer.h ├── crc.h ├── crc8.h ├── cros_board_info.h ├── crypto_api.h ├── curve25519.h ├── device_event.h ├── device_state.h ├── dma.h ├── dptf.h ├── ec_commands.h ├── ec_ec_comm_master.h ├── ec_ec_comm_slave.h ├── eeprom.h ├── espi.h ├── event_log.h ├── extension.h ├── extpower.h ├── fan.h ├── flash.h ├── fpsensor.h ├── gesture.h ├── gpio.h ├── gpio.wrap ├── gpio_list.h ├── gpio_signal.h ├── hooks.h ├── host_command.h ├── hwtimer.h ├── i2c.h ├── i8042_protocol.h ├── inductive_charging.h ├── keyboard_8042.h ├── keyboard_8042_sharedlib.h ├── keyboard_backlight.h ├── keyboard_config.h ├── keyboard_mkbp.h ├── keyboard_protocol.h ├── keyboard_raw.h ├── keyboard_scan.h ├── keyboard_test.h ├── lb_common.h ├── led_common.h ├── led_onoff_states.h ├── led_pwm.h ├── libsharedobjs.h ├── lid_angle.h ├── lid_switch.h ├── lightbar.h ├── lightbar_msg_list.h ├── lightbar_opcode_list.h ├── link_defs.h ├── lpc.h ├── mag_cal.h ├── mat33.h ├── mat44.h ├── math_util.h ├── memory_commands.h ├── mkbp_event.h ├── module_id.h ├── motion_lid.h ├── motion_sense.h ├── nvcounter.h ├── nvmem.h ├── nvmem_vars.h ├── onewire.h ├── otp.h ├── panic.h ├── peci.h ├── physical_presence.h ├── pinweaver.h ├── pinweaver_tpm_imports.h ├── pinweaver_types.h ├── port80.h ├── power.h ├── power_button.h ├── power_led.h ├── printf.h ├── producer.h ├── pwm.h ├── queue.h ├── queue_policies.h ├── rma_auth.h ├── rollback.h ├── rsa.h ├── rtc.h ├── rwsig.h ├── sfdp.h ├── sha1.h ├── sha256.h ├── shared_mem.h ├── smbus.h ├── software_panic.h ├── spi.h ├── spi_flash.h ├── spi_flash_reg.h ├── spi_nor.h ├── stack_trace.h ├── switch.h ├── system.h ├── tablet_mode.h ├── task.h ├── task_filter.h ├── task_id.h ├── temp_sensor.h ├── temp_sensor_chip.h ├── test_util.h ├── thermal.h ├── throttle_ap.h ├── timer.h ├── touchpad.h ├── tpm_log.h ├── tpm_manufacture.h ├── tpm_nvmem.h ├── tpm_registers.h ├── tpm_vendor_cmds.h ├── trng.h ├── u2f.h ├── u2f_impl.h ├── uart.h ├── update_fw.h ├── usb_api.h ├── usb_bb.h ├── usb_charge.h ├── usb_console.h ├── usb_descriptor.h ├── usb_hid.h ├── usb_hid_touchpad.h ├── usb_i2c.h ├── usb_mux.h ├── usb_pd.h ├── usb_pd_tcpc.h ├── usb_pd_tcpm.h ├── usbc_ppc.h ├── util.h ├── vb21_struct.h ├── vboot.h ├── vboot_hash.h ├── vec3.h ├── vec4.h ├── version.h ├── virtual_battery.h ├── watchdog.h └── wireless.h ├── power ├── apollolake.c ├── apollolake.h ├── braswell.c ├── build.mk ├── cannonlake.c ├── cannonlake.h ├── cometlake.c ├── cometlake.h ├── common.c ├── ec_driven.c ├── icelake.c ├── icelake.h ├── intel_x86.c ├── intel_x86.h ├── mt817x.c ├── mt8183.c ├── rk3288.c ├── rk3399.c ├── sdm845.c ├── skylake.c ├── skylake.h └── stoney.c ├── setup.py ├── test ├── aes.c ├── aes.tasklist ├── base32.c ├── base32.tasklist ├── battery_get_params_smart.c ├── battery_get_params_smart.tasklist ├── bklight_lid.c ├── bklight_lid.tasklist ├── bklight_passthru.c ├── bklight_passthru.tasklist ├── build.mk ├── button.c ├── button.tasklist ├── cec.c ├── cec.tasklist ├── charge_manager.c ├── charge_manager.tasklist ├── charge_manager_drp_charging.tasklist ├── charge_ramp.c ├── charge_ramp.tasklist ├── console_edit.c ├── console_edit.tasklist ├── crc32.c ├── crc32.tasklist ├── entropy.c ├── entropy.tasklist ├── extpwr_gpio.c ├── extpwr_gpio.tasklist ├── fan.c ├── fan.tasklist ├── flash.c ├── flash.tasklist ├── float.tasklist ├── fp.c ├── fp.tasklist ├── hooks.c ├── hooks.tasklist ├── host_command.c ├── host_command.tasklist ├── inductive_charging.c ├── inductive_charging.tasklist ├── interrupt.c ├── interrupt.tasklist ├── kb_8042.c ├── kb_8042.tasklist ├── kb_mkbp.c ├── kb_mkbp.tasklist ├── kb_scan.c ├── kb_scan.tasklist ├── key_sequence.txt ├── lid_sw.c ├── lid_sw.tasklist ├── lightbar.c ├── lightbar.tasklist ├── math_util.c ├── math_util.tasklist ├── motion_lid.c ├── motion_lid.tasklist ├── mutex.c ├── mutex.tasklist ├── nvmem.c ├── nvmem.tasklist ├── nvmem_vars.c ├── nvmem_vars.tasklist ├── pingpong.c ├── pingpong.tasklist ├── pinweaver.c ├── pinweaver.tasklist ├── power_button.c ├── power_button.tasklist ├── powerdemo.c ├── powerdemo.h ├── powerdemo.tasklist ├── queue.c ├── queue.tasklist ├── rma_auth.c ├── rma_auth.tasklist ├── rsa.c ├── rsa.tasklist ├── rsa2048-3.h ├── rsa2048-3.pem ├── rsa2048-F4.h ├── rsa2048-F4.pem ├── rsa3.tasklist ├── rtc.c ├── rtc.tasklist ├── sbs_charging_v2.c ├── sbs_charging_v2.tasklist ├── sha256.c ├── sha256.tasklist ├── sha256_unrolled.tasklist ├── shmalloc.c ├── shmalloc.tasklist ├── stress.c ├── stress.tasklist ├── system.c ├── system.tasklist ├── test-matrix.bin ├── test_config.h ├── thermal.c ├── thermal.tasklist ├── timer_calib.c ├── timer_calib.py ├── timer_calib.tasklist ├── timer_dos.c ├── timer_dos.tasklist ├── timer_jump.py ├── timer_jump.tasklist ├── tpm_test │ ├── Makefile │ ├── bn_test.c │ ├── crypto_test.py │ ├── crypto_test.xml │ ├── ecc_test.py │ ├── ecies_test.py │ ├── ftdi_spi_tpm.c │ ├── ftdi_spi_tpm.h │ ├── ftdi_spi_tpm.i │ ├── genvectors.py │ ├── hash_test.py │ ├── hkdf_test.py │ ├── mpsse.c │ ├── mpsse.h │ ├── rsa1024.pem │ ├── rsa2048.pem │ ├── rsa4096.pem │ ├── rsa768.pem │ ├── rsa_test.py │ ├── subcmd.py │ ├── support.c │ ├── support.h │ ├── testlib │ │ ├── common.c │ │ ├── common.h │ │ ├── trng.h │ │ └── util.h │ ├── tpmtest.py │ ├── upgrade_test.py │ └── utils.py ├── usb_pd.c ├── usb_pd.tasklist ├── usb_pd_giveback.tasklist ├── usb_pd_rev30.tasklist ├── usb_pd_test_util.h ├── usb_test │ ├── Makefile │ ├── README │ └── device_configuration.c ├── utils.c ├── utils.tasklist ├── utils_str.c ├── utils_str.tasklist ├── vboot.c ├── vboot.tasklist ├── x25519.c └── x25519.tasklist ├── third_party └── boringssl │ ├── LICENSE │ ├── METADATA │ ├── common │ ├── aes-gcm.c │ └── aes.c │ ├── core │ └── cortex-m │ │ ├── aes.S │ │ └── ghash.S │ └── include │ ├── aes-gcm.h │ └── aes.h └── util ├── battery_temp ├── bin2h.sh ├── build.mk ├── cbi-util.c ├── comm-dev.c ├── comm-host.c ├── comm-host.h ├── comm-i2c.c ├── comm-lpc.c ├── comm-servo-spi.c ├── config_option_check.py ├── cros_ec_dev.h ├── ec3po ├── __init__.py ├── console.py ├── console_unittest.py ├── interpreter.py ├── interpreter_unittest.py ├── run_tests.sh └── threadproc_shim.py ├── ec_flash.c ├── ec_flash.h ├── ec_panicinfo.c ├── ec_panicinfo.h ├── ec_parse_panicinfo.c ├── ec_sb_firmware_update.c ├── ec_sb_firmware_update.h ├── ec_uartd.c ├── ecst.c ├── ecst.h ├── ectool.c ├── ectool.h ├── ectool_keyscan.c ├── export_taskinfo.c ├── flash_ec ├── flash_fp_mcu_common.sh ├── flash_pd.py ├── g_regs ├── gen_emmc_transfer_data.c ├── gen_touchpad_hash.c ├── genvif.c ├── getversion.sh ├── host_command_check.sh ├── inject-keys.py ├── iteflash.c ├── lbcc.c ├── lbplay.c ├── lock ├── android.c ├── android.h ├── build.mk ├── file_lock.c ├── gec_lock.c ├── gec_lock.h ├── ipc_lock.h └── locks.h ├── misc_util.c ├── misc_util.h ├── openocd ├── lm4_chip.cfg ├── lm4x_cmds.tcl ├── npcx.cfg ├── npcx_chip.cfg ├── npcx_cmds.tcl ├── nrf51_chip.cfg ├── nrf51_cmds.tcl └── servo.cfg ├── powerd_lock.c ├── powerd_lock.h ├── presubmit_check.sh ├── run_ects.py ├── run_host_test ├── signer ├── bs ├── cr50_RW-prod.pem.pub ├── cr50_rom0-dev-blsign.pem.pub ├── create_released_image.sh ├── ec_RW-manifest-dev.json ├── ec_RW-manifest-prod.json ├── fuses.xml ├── loader-testkey-A.pem └── rom-testkey-A.pem ├── stm32mon.c ├── tagbranch.sh ├── temp_metrics.conf ├── test-inject-keys.sh ├── unpack_ftb.py ├── usb_if.c ├── usb_if.h └── uut ├── cmd.c ├── cmd.h ├── com_port.h ├── l_com_port.c ├── lib_crc.c ├── lib_crc.h ├── main.c ├── main.h ├── opr.c └── opr.h /.checkpatch.conf: -------------------------------------------------------------------------------- 1 | # Not Linux, so don't expect a Linux tree. 2 | --no-tree 3 | 4 | # Ignore aspects we don't follow here. 5 | --ignore SPLIT_STRING 6 | 7 | --ignore GIT_COMMIT_ID 8 | 9 | --ignore C99_COMMENT_TOLERANCE 10 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | Language: Cpp 3 | IndentWidth: 8 4 | UseTab: Always 5 | BreakBeforeBraces: Linux 6 | AllowShortIfStatementsOnASingleLine: false 7 | IndentCaseLabels: false 8 | SortIncludes: false 9 | ContinuationIndentWidth: 8 10 | ColumnLimit: 80 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | private*/ 3 | *.swp 4 | *.pyc 5 | tags 6 | TAGS 7 | cscope.* 8 | .tests-passed 9 | .failedboards/ 10 | .sizes.txt 11 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | # Chromium EC owners 2 | rspangler@chromium.org 3 | victoryang@chromium.org 4 | vpalatin@chromium.org 5 | wfrichar@chromium.org 6 | 7 | # Don't inherit owners from elsewhere in the manifest 8 | set noparent 9 | -------------------------------------------------------------------------------- /PRESUBMIT.cfg: -------------------------------------------------------------------------------- 1 | [Hook Overrides] 2 | branch_check: true 3 | checkpatch_check: true 4 | kerneldoc_check: true 5 | 6 | # We are using Linux style indentation with tabs 7 | # The indentation is checked by checkpatch not the python script 8 | tab_check: false 9 | 10 | [Hook Overrides Options] 11 | checkpatch_check: --no-tree --ignore=MSLEEP,VOLATILE,SPDX_LICENSE_TAG 12 | kerneldoc_check: --include_regex=\bec_commands\.h$ 13 | 14 | [Hook Scripts] 15 | presubmit_check = util/presubmit_check.sh 2>&1 16 | config_option_check = util/config_option_check.py 2>&1 17 | host_command_check = util/host_command_check.sh 2>&1 18 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | For an overview of the Embedded Controller firmware, refer to 2 | 3 | http://www.chromium.org/chromium-os/2014-firmware-summit 4 | 5 | For instructions on building from source, refer to 6 | 7 | http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly 8 | -------------------------------------------------------------------------------- /baseboard/dragonegg/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # DragonEgg baseboard specific files build 7 | # 8 | 9 | baseboard-y=baseboard.o 10 | baseboard-$(CONFIG_BATTERY_SMART)+=battery.o 11 | baseboard-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 12 | -------------------------------------------------------------------------------- /baseboard/grunt/analyzestack.yaml: -------------------------------------------------------------------------------- 1 | remove: 2 | - panic_assert_fail 3 | -------------------------------------------------------------------------------- /baseboard/grunt/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Baseboard specific files build 7 | # 8 | 9 | baseboard-y=baseboard.o 10 | baseboard-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 11 | -------------------------------------------------------------------------------- /baseboard/hatch/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2019 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Hatch baseboard specific files build 7 | # 8 | 9 | baseboard-y=baseboard.o 10 | baseboard-$(CONFIG_BATTERY_SMART)+=battery.o 11 | baseboard-$(CONFIG_LED_COMMON)+=led_states.o 12 | baseboard-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 13 | -------------------------------------------------------------------------------- /baseboard/kalista/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Baseboard specific files build 7 | # 8 | 9 | baseboard-y=baseboard.o 10 | baseboard-y+=led.o 11 | baseboard-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o -------------------------------------------------------------------------------- /baseboard/octopus/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Baseboard specific files build 7 | # 8 | 9 | baseboard-y=baseboard.o 10 | baseboard-$(CONFIG_LED_COMMON)+=led_states.o 11 | baseboard-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 12 | baseboard-$(VARIANT_OCTOPUS_EC_NPCX796FB)+=variant_ec_npcx796fb.o 13 | baseboard-$(VARIANT_OCTOPUS_EC_ITE8320)+=variant_ec_ite8320.o 14 | baseboard-$(VARIANT_OCTOPUS_USBC_STANDALONE_TCPCS)+= \ 15 | variant_usbc_standalone_tcpcs.o 16 | baseboard-$(VARIANT_OCTOPUS_USBC_ITE_EC_TCPCS)+=variant_usbc_ec_tcpcs.o 17 | -------------------------------------------------------------------------------- /board/OWNERS: -------------------------------------------------------------------------------- 1 | # Additional owners for board directory 2 | dparker@chromium.org 3 | -------------------------------------------------------------------------------- /board/aleena/analyzestack.yaml: -------------------------------------------------------------------------------- 1 | ../../baseboard/grunt/analyzestack.yaml -------------------------------------------------------------------------------- /board/aleena/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6f 12 | BASEBOARD:=grunt 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/ampton/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=it83xx 10 | CHIP_FAMILY:=it8320 11 | CHIP_VARIANT:=it8320dx 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/arcada_ish/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=ish 10 | CHIP_FAMILY:=ish5 11 | CHIP_VARIANT:=ish5p0 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/arcada_ish/gpio.inc: -------------------------------------------------------------------------------- 1 | /* -*- mode:c -*- 2 | * 3 | * Copyright 2018 The Chromium OS Authors. All rights reserved. 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | GPIO(NB_MODE_L, PIN(4), GPIO_OUT_HIGH) 9 | GPIO(LID_CL_NB_L, PIN(5), GPIO_INPUT) 10 | GPIO(LID_CL_TAB_L, PIN(6), GPIO_INPUT) 11 | 12 | /* 13 | * We don't have a ENTERING_RW signal wired to the cr50 but common code needs 14 | * it to be defined. 15 | */ 16 | UNIMPLEMENTED(ENTERING_RW) 17 | -------------------------------------------------------------------------------- /board/atlas/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | 13 | board-y=board.o 14 | board-$(CONFIG_BATTERY_SMART)+=battery.o 15 | board-$(CONFIG_LED_COMMON)+=led.o 16 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 17 | -------------------------------------------------------------------------------- /board/atlas_ish/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=ish 10 | CHIP_FAMILY:=ish3 11 | CHIP_VARIANT:=ish3p0 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/atlas_ish/gpio.inc: -------------------------------------------------------------------------------- 1 | /* -*- mode:c -*- 2 | * 3 | * Copyright 2018 The Chromium OS Authors. All rights reserved. 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | /* Trackpad interrupt pin */ 9 | /*TODO: touchpad driver is not in gerrit yet, so comment out this for now */ 10 | /*GPIO_INT(TOUCHPAD_INT, PIN(1), GPIO_INT_F_FALLING, touchpad_event)*/ 11 | 12 | /* Those are used by common code, don't change*/ 13 | UNIMPLEMENTED(ENTERING_RW) 14 | UNIMPLEMENTED(ISH_I2C0_SDA) 15 | UNIMPLEMENTED(ISH_I2C0_SCL) 16 | -------------------------------------------------------------------------------- /board/bds/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is TI Stellaris LM4 10 | CHIP:=lm4 11 | 12 | board-y=board.o 13 | -------------------------------------------------------------------------------- /board/bip/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=it83xx 10 | CHIP_FAMILY:=it8320 11 | CHIP_VARIANT:=it8320bx 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o -------------------------------------------------------------------------------- /board/bobba/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/careena/analyzestack.yaml: -------------------------------------------------------------------------------- 1 | ../../baseboard/grunt/analyzestack.yaml -------------------------------------------------------------------------------- /board/careena/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6f 12 | BASEBOARD:=grunt 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/casta/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/chell/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is SMSC MEC1322 / external SPI is 512KB / external clock is crystal 10 | CHIP:=mec1322 11 | CHIP_SPI_SIZE_KB:=512 12 | 13 | board-y=board.o led.o 14 | board-$(CONFIG_BATTERY_SMART)+=battery.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/chell_pd: -------------------------------------------------------------------------------- 1 | glados_pd/ -------------------------------------------------------------------------------- /board/cheza/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m7wb 12 | 13 | board-y=battery.o board.o led.o usb_pd_policy.o base_detect.o 14 | -------------------------------------------------------------------------------- /board/coffeecake/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072B 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | # Not enough SRAM: Disable all tests 14 | test-list-y= 15 | 16 | board-y=board.o 17 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 18 | -------------------------------------------------------------------------------- /board/coral/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o led.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/cr50/recovery_button.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium OS Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #ifndef __EC_BOARD_CR50_RECOVERY_BUTTON_H 8 | #define __EC_BOARD_CR50_RECOVERY_BUTTON_H 9 | 10 | /** 11 | * Latch a recovery button sequence. This state is latched for 12 | * RECOVERY_BUTTON_TIMEOUT or until the AP requests the recovery button 13 | * state. 14 | */ 15 | void recovery_button_record(void); 16 | 17 | #endif /* ! __EC_BOARD_CR50_RECOVERY_BUTTON_H */ 18 | -------------------------------------------------------------------------------- /board/cr50/rma_key_blob.README.md: -------------------------------------------------------------------------------- 1 | The rma_key_blob.{p256,x25519}.{prod,test} files in this directory are binary 2 | blobs concatenating the respective public key used by prod or test RMA server 3 | and single byte of the key ID. The key size for p256 is 65 bytes, for x25519 - 4 | 32 bytes. 5 | 6 | The util/bin2h.sh script is used to convert these binary blobs into .h 7 | file containing a #define statement which is suitable for use in C. 8 | -------------------------------------------------------------------------------- /board/cr50/rma_key_blob.p256.prod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/cr50/rma_key_blob.p256.prod -------------------------------------------------------------------------------- /board/cr50/rma_key_blob.p256.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/cr50/rma_key_blob.p256.test -------------------------------------------------------------------------------- /board/cr50/rma_key_blob.x25519.prod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/cr50/rma_key_blob.x25519.prod -------------------------------------------------------------------------------- /board/cr50/rma_key_blob.x25519.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/cr50/rma_key_blob.x25519.test -------------------------------------------------------------------------------- /board/cr50/tpm2/endian.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_BOARD_CR50_TPM2_ENDIAN_H 7 | #define __EC_BOARD_CR50_TPM2_ENDIAN_H 8 | 9 | #include "byteorder.h" 10 | 11 | #endif /* __EC_BOARD_CR50_TPM2_ENDIAN_H */ 12 | -------------------------------------------------------------------------------- /board/cr50/tpm2/hash_data.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #include "CryptoEngine.h" 6 | 7 | /* 8 | * This is unfortunate, but this is the only way to bring in necessary data 9 | * from the TPM2 library, as this file is not compiled in embedded mode. 10 | */ 11 | #include "CpriHashData.c" 12 | -------------------------------------------------------------------------------- /board/cr50/tpm2/trng.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "CryptoEngine.h" 7 | 8 | CRYPT_RESULT _cpri__StirRandom(int32_t num, uint8_t *entropy) 9 | { 10 | return CRYPT_SUCCESS; /* NO-OP on CR50. */ 11 | } 12 | -------------------------------------------------------------------------------- /board/delan/analyzestack.yaml: -------------------------------------------------------------------------------- 1 | ../../baseboard/grunt/analyzestack.yaml -------------------------------------------------------------------------------- /board/delan/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6f 12 | BASEBOARD:=grunt 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/dingdong/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072B 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/discovery-stm32f072/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072RBT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/discovery-stm32f072/openocd-flash.cfg: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source [find board/stm32f0discovery.cfg] 6 | 7 | # For flashing, force the board into reset on connect, this ensures that 8 | # code running on the core can't interfere with programming. 9 | reset_config connect_assert_srst 10 | 11 | gdb_port 0 12 | tcl_port 0 13 | telnet_port 0 14 | init 15 | reset init 16 | flash write_image erase $BUILD_DIR/ec.bin 0x08000000 17 | reset halt 18 | resume 19 | shutdown 20 | -------------------------------------------------------------------------------- /board/discovery/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32L152RCT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32l 11 | CHIP_VARIANT:=stm32l15x 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/discovery/openocd-flash.cfg: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source [find board/stm32ldiscovery.cfg] 6 | 7 | # For flashing, force the board into reset on connect, this ensures that 8 | # code running on the core can't interfere with programming. 9 | reset_config connect_assert_srst 10 | 11 | gdb_port 0 12 | tcl_port 0 13 | telnet_port 0 14 | init 15 | reset init 16 | flash write_image erase $BUILD_DIR/ec.bin 0x08000000 17 | reset halt 18 | resume 19 | shutdown 20 | -------------------------------------------------------------------------------- /board/dragonegg/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=it83xx 10 | CHIP_FAMILY:=it8320 11 | CHIP_VARIANT:=it8320dx 12 | BASEBOARD:=dragonegg 13 | 14 | board-y=board.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | board-$(CONFIG_LED_COMMON)+=led.o 17 | -------------------------------------------------------------------------------- /board/elm/build.mk: -------------------------------------------------------------------------------- 1 | #-*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # STmicro STM32F091VC 9 | CHIP := stm32 10 | CHIP_FAMILY := stm32f0 11 | CHIP_VARIANT:= stm32f09x 12 | 13 | board-y = board.o battery.o led.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/eve/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o led.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/fizz/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o 13 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 14 | board-y+=led.o 15 | -------------------------------------------------------------------------------- /board/flapjack/battery.c: -------------------------------------------------------------------------------- 1 | ../kukui/battery.c -------------------------------------------------------------------------------- /board/flapjack/build.mk: -------------------------------------------------------------------------------- 1 | ../kukui/build.mk -------------------------------------------------------------------------------- /board/flapjack/ec.tasklist: -------------------------------------------------------------------------------- 1 | ../kukui/ec.tasklist -------------------------------------------------------------------------------- /board/flapjack/emmc.c: -------------------------------------------------------------------------------- 1 | ../kukui/emmc.c -------------------------------------------------------------------------------- /board/fleex/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 17 | -------------------------------------------------------------------------------- /board/fleex/usb_pd_policy.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "common.h" 7 | 8 | /* TODO(b/78638238): Remove file if still unused after DVT */ 9 | -------------------------------------------------------------------------------- /board/glados/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is SMSC MEC1322 / external SPI is 512KB / external clock is crystal 10 | CHIP:=mec1322 11 | CHIP_SPI_SIZE_KB:=512 12 | 13 | board-y=board.o led.o 14 | board-$(CONFIG_BATTERY_SMART)+=battery.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/glados_pd/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/glados_pd/block.png -------------------------------------------------------------------------------- /board/glados_pd/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F051C8T 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f05x 12 | 13 | # Not enough SRAM: Disable all tests 14 | test-list-y= 15 | 16 | board-y=board.o 17 | 18 | # This target builds RW only. Therefore, remove RO from dependencies. 19 | all_deps=$(patsubst ro,,$(def_all_deps)) 20 | -------------------------------------------------------------------------------- /board/glados_pd/glados_pd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/glados_pd/glados_pd.pdf -------------------------------------------------------------------------------- /board/glados_pd/glados_pd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/glados_pd/glados_pd.png -------------------------------------------------------------------------------- /board/glkrvp/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6g 12 | 13 | board-y=board.o 14 | board-$(CONFIG_BATTERY_SMART)+=battery.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=chg_usb_pd.o usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/glkrvp_ite/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | #it8320 10 | CHIP:=it83xx 11 | CHIP_FAMILY:=it8320 12 | CHIP_VARIANT:=it8320bx 13 | 14 | board-y=board.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | board-$(CONFIG_USB_POWER_DELIVERY)+=chg_usb_pd.o usb_pd_policy.o 17 | -------------------------------------------------------------------------------- /board/gru: -------------------------------------------------------------------------------- 1 | kevin -------------------------------------------------------------------------------- /board/grunt/analyzestack.yaml: -------------------------------------------------------------------------------- 1 | ../../baseboard/grunt/analyzestack.yaml -------------------------------------------------------------------------------- /board/grunt/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6f 12 | BASEBOARD:=grunt 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/hadoken/board.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #include "gpio.h" 6 | #include "registers.h" 7 | #include "util.h" 8 | 9 | 10 | /* To define the gpio_list[] instance. */ 11 | #include "gpio_list.h" 12 | 13 | -------------------------------------------------------------------------------- /board/hadoken/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is Nordic nRF51822 9 | CHIP:=nrf51 10 | CHIP_FAMILY:=nrf51x22 11 | CHIP_VARIANT:=nrf51822 12 | 13 | # Hadoken does not support scratchpad 14 | test-list-y= 15 | 16 | board-y=board.o 17 | -------------------------------------------------------------------------------- /board/hammer/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072RBT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | # Build tests that we care about for hammer 14 | test-list-y=entropy rsa3 sha256 sha256_unrolled x25519 15 | 16 | board-y=board.o 17 | board-$(CONFIG_BATTERY_SMART)+=battery.o 18 | -------------------------------------------------------------------------------- /board/hatch/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2019 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fc 12 | BASEBOARD:=hatch 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/hoho/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072B 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/host/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=host 10 | 11 | board-y=board.o 12 | board-$(HAS_TASK_CHIPSET)+=chipset.o 13 | board-$(CONFIG_BATTERY_MOCK)+=battery.o charger.o 14 | board-$(CONFIG_FANS)+=fan.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o usb_pd_config.o 16 | -------------------------------------------------------------------------------- /board/host/usb_pd_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* USB Power delivery board configuration */ 7 | 8 | #ifndef __CROS_EC_USB_PD_CONFIG_H 9 | #define __CROS_EC_USB_PD_CONFIG_H 10 | 11 | /* Use software CRC */ 12 | #define CONFIG_SW_CRC 13 | 14 | void pd_select_polarity(int port, int polarity); 15 | 16 | void pd_tx_init(void); 17 | 18 | void pd_set_host_mode(int port, int enable); 19 | 20 | void pd_config_init(int port, uint8_t power_role); 21 | 22 | int pd_adc_read(int port, int cc); 23 | 24 | #endif /* __CROS_EC_USB_PD_CONFIG_H */ 25 | -------------------------------------------------------------------------------- /board/it83xx_evb/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is ITE IT8390/IT8320 9 | CHIP:=it83xx 10 | CHIP_FAMILY:=it8320 11 | CHIP_VARIANT:=it8320dx 12 | 13 | board-y=board.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/jerry/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F071RB 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o battery.o 14 | -------------------------------------------------------------------------------- /board/karma/board.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Karma board configuration */ 7 | 8 | #ifndef __CROS_EC_BOARD_H 9 | #define __CROS_EC_BOARD_H 10 | 11 | #include "baseboard.h" 12 | 13 | #endif /* __CROS_EC_BOARD_H */ 14 | -------------------------------------------------------------------------------- /board/karma/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | BASEBOARD:=kalista 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/kevin/board.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Board is only valid for host tools */ 7 | #ifndef HOST_TOOLS_BUILD 8 | #error "Can only build for host tools" 9 | #endif 10 | -------------------------------------------------------------------------------- /board/kevin/board.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Board is only valid for host tools */ 7 | -------------------------------------------------------------------------------- /board/kevin/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # Board is only valid for host tools 10 | CHIP:=npcx 11 | CHIP_VARIANT:=npcx5m5g 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/kevin/ec.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Board is only valid for host tools */ 7 | #define CONFIG_TASK_LIST 8 | -------------------------------------------------------------------------------- /board/kukui/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | # 9 | # STmicro STM32F098VC 10 | CHIP:=stm32 11 | CHIP_FAMILY:=stm32f0 12 | CHIP_VARIANT:=stm32f09x 13 | 14 | # Use coreboot-sdk 15 | $(call set-option,CROSS_COMPILE_arm,\ 16 | $(CROSS_COMPILE_coreboot_sdk_arm),\ 17 | /opt/coreboot-sdk/bin/arm-eabi-) 18 | 19 | board-y=battery.o board.o usb_pd_policy.o led.o 20 | board-$(CONFIG_BOOTBLOCK)+=emmc.o 21 | 22 | $(out)/RO/board/$(BOARD)/emmc.o: $(out)/bootblock_data.h 23 | -------------------------------------------------------------------------------- /board/kukui_scp/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | CHIP:=mt_scp 9 | CHIP_VARIANT:=mt8183 10 | 11 | board-y=board.o 12 | -------------------------------------------------------------------------------- /board/liara/analyzestack.yaml: -------------------------------------------------------------------------------- 1 | ../../baseboard/grunt/analyzestack.yaml -------------------------------------------------------------------------------- /board/liara/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6f 12 | BASEBOARD:=grunt 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/lux: -------------------------------------------------------------------------------- 1 | poppy -------------------------------------------------------------------------------- /board/mchpevb1/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is Microchip MEC1701 10 | # external SPI is 512KB 11 | # external clock is crystal 12 | CHIP:=mchp 13 | CHIP_FAMILY:=mec17xx 14 | CHIP_VARIANT:=mec17xx_2E00 15 | CHIP_SPI_SIZE_KB:=512 16 | 17 | board-y=board.o led.o 18 | board-$(CONFIG_BATTERY_SMART)+=battery.o 19 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 20 | -------------------------------------------------------------------------------- /board/meep/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/minimuffin: -------------------------------------------------------------------------------- 1 | zinger/ -------------------------------------------------------------------------------- /board/nami/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_LED_COMMON)+=led.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/nami_fp/board.c: -------------------------------------------------------------------------------- 1 | ../nocturne_fp/board.c -------------------------------------------------------------------------------- /board/nami_fp/board.h: -------------------------------------------------------------------------------- 1 | ../nocturne_fp/board.h -------------------------------------------------------------------------------- /board/nami_fp/build.mk: -------------------------------------------------------------------------------- 1 | ../nocturne_fp/build.mk -------------------------------------------------------------------------------- /board/nami_fp/dev_key.pem: -------------------------------------------------------------------------------- 1 | ../nocturne_fp/dev_key.pem -------------------------------------------------------------------------------- /board/nami_fp/ec.tasklist: -------------------------------------------------------------------------------- 1 | ../nocturne_fp/ec.tasklist -------------------------------------------------------------------------------- /board/nami_fp/gpio.inc: -------------------------------------------------------------------------------- 1 | ../nocturne_fp/gpio.inc -------------------------------------------------------------------------------- /board/nautilus/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_LED_COMMON)+=led.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/nocturne/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6f 12 | 13 | board-y=base_detect.o battery.o board.o led.o usb_pd_policy.o 14 | -------------------------------------------------------------------------------- /board/nocturne_fp/build.mk: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | # 5 | # Board specific files build 6 | 7 | # the IC is STmicro STM32H743 8 | CHIP:=stm32 9 | CHIP_FAMILY:=stm32h7 10 | CHIP_VARIANT:=stm32h7x3 11 | 12 | board-y=board.o 13 | 14 | test-list-y=aes sha256 sha256_unrolled 15 | -------------------------------------------------------------------------------- /board/npcx_evb/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is Nuvoton NPCX5 M-Series EC (npcx5m5g, npcx5m6g) 10 | 11 | CHIP:=npcx 12 | CHIP_FAMILY:=npcx5 13 | CHIP_VARIANT:=npcx5m5g 14 | 15 | board-y=board.o 16 | -------------------------------------------------------------------------------- /board/npcx_evb_arm/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is Nuvoton NPCX5 M-Series EC (npcx5m5g, npcx5m6g) 10 | 11 | CHIP:=npcx 12 | CHIP_FAMILY:=npcx5 13 | CHIP_VARIANT:=npcx5m5g 14 | 15 | board-y=board.o 16 | -------------------------------------------------------------------------------- /board/nucleo-f072rb/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072RBT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/nucleo-f072rb/openocd-flash.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source [find board/st_nucleo_f0.cfg] 6 | 7 | # For flashing, force the board into reset on connect, this ensures that 8 | # code running on the core can't interfere with programming. 9 | reset_config connect_assert_srst 10 | 11 | gdb_port 0 12 | tcl_port 0 13 | telnet_port 0 14 | init 15 | reset init 16 | flash write_image erase $BUILD_DIR/ec.bin 0x08000000 17 | reset halt 18 | resume 19 | shutdown 20 | -------------------------------------------------------------------------------- /board/nucleo-f411re/build.mk: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | # 5 | # Board specific files build 6 | 7 | # the IC is STmicro STM32F411RE 8 | CHIP:=stm32 9 | CHIP_FAMILY:=stm32f4 10 | CHIP_VARIANT:=stm32f411 11 | 12 | board-y=board.o 13 | -------------------------------------------------------------------------------- /board/nucleo-f411re/openocd-flash.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source [find board/st_nucleo_f4.cfg] 6 | 7 | # For flashing, force the board into reset on connect, this ensures that 8 | # code running on the core can't interfere with programming. 9 | reset_config connect_assert_srst 10 | 11 | gdb_port 0 12 | tcl_port 0 13 | telnet_port 0 14 | init 15 | reset init 16 | flash write_image erase unlock $BUILD_DIR/ec.bin 0x08000000 17 | reset halt 18 | resume 19 | shutdown 20 | -------------------------------------------------------------------------------- /board/oak/board_revs.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_BOARD_REVS_H 7 | #define __CROS_EC_BOARD_REVS_H 8 | 9 | #define OAK_REV0 0 10 | #define OAK_REV1 1 11 | #define OAK_REV2 2 12 | #define OAK_REV3 3 13 | #define OAK_REV4 4 14 | #define OAK_REV5 5 15 | #define OAK_REV_LAST OAK_REV5 16 | #define OAK_REV_DEFAULT OAK_REV5 17 | 18 | #if !defined(BOARD_REV) 19 | #define BOARD_REV OAK_REV_DEFAULT 20 | #endif 21 | 22 | #if BOARD_REV < OAK_REV1 || BOARD_REV > OAK_REV_LAST 23 | #error "Board revision out of range" 24 | #endif 25 | 26 | #endif /* __CROS_EC_BOARD_REVS_H */ 27 | -------------------------------------------------------------------------------- /board/oak/build.mk: -------------------------------------------------------------------------------- 1 | #-*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # STmicro STM32F091VC 9 | CHIP := stm32 10 | CHIP_FAMILY := stm32f0 11 | CHIP_VARIANT:= stm32f09x 12 | 13 | board-y = board.o battery.o led.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/oak_pd: -------------------------------------------------------------------------------- 1 | glados_pd -------------------------------------------------------------------------------- /board/pdeval-stm32f072/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072RBT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o usb_pd_policy.o 14 | -------------------------------------------------------------------------------- /board/pdeval-stm32f072/openocd-flash.cfg: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source [find board/stm32f0discovery.cfg] 6 | 7 | # For flashing, force the board into reset on connect, this ensures that 8 | # code running on the core can't interfere with programming. 9 | reset_config connect_assert_srst 10 | 11 | gdb_port 0 12 | tcl_port 0 13 | telnet_port 0 14 | init 15 | reset init 16 | flash write_image erase $BUILD_DIR/ec.bin 0x08000000 17 | reset halt 18 | resume 19 | shutdown 20 | -------------------------------------------------------------------------------- /board/phaser/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/plankton/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072CBU6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/polyberry/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | CHIP:=stm32 9 | CHIP_FAMILY:=stm32f4 10 | CHIP_VARIANT:=stm32f446 11 | 12 | board-y=board.o 13 | -------------------------------------------------------------------------------- /board/poppy/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_LED_COMMON)+=led.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | board-$(BOARD_LUX)+=base_detect_lux.o 17 | board-$(BOARD_POPPY)+=base_detect_poppy.o 18 | board-$(BOARD_SORAKA)+=base_detect_poppy.o 19 | -------------------------------------------------------------------------------- /board/rainier/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | # 9 | # STmicro STM32F098VC 10 | CHIP:=stm32 11 | CHIP_FAMILY:=stm32f0 12 | CHIP_VARIANT:=stm32f09x 13 | 14 | board-y=board.o usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/rammus/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_LED_COMMON)+=led.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/reef/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_VARIANT:=npcx5m6g 11 | 12 | board-y=board.o led.o 13 | board-$(CONFIG_BATTERY_SMART)+=battery.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/reef_it8320/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | # the IC is ITE IT8320 9 | CHIP:=it83xx 10 | CHIP_FAMILY:=it8320 11 | CHIP_VARIANT:=it8320bx 12 | 13 | board-y=board.o led.o 14 | board-$(CONFIG_BATTERY_SMART)+=battery.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/reef_mchp/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=mchp 10 | CHIP_FAMILY:=mec17xx 11 | CHIP_VARIANT:=mec1701h 12 | CHIP_SPI_SIZE_KB:=512 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 17 | -------------------------------------------------------------------------------- /board/rowan/build.mk: -------------------------------------------------------------------------------- 1 | #-*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # STmicro STM32F091VC 9 | CHIP := stm32 10 | CHIP_FAMILY := stm32f0 11 | CHIP_VARIANT:= stm32f09x 12 | 13 | board-y = board.o battery.o led.o 14 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 15 | -------------------------------------------------------------------------------- /board/samus/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is TI Stellaris LM4 10 | CHIP:=lm4 11 | 12 | # Samus has board-specific chipset code, and the tests don't 13 | # compile with it. Disable them for now. 14 | test-list-y= 15 | 16 | board-y=battery.o board.o power_sequence.o panel.o extpower.o 17 | -------------------------------------------------------------------------------- /board/samus_pd/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072VBH6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | # Not enough SRAM: Disable all tests 14 | test-list-y= 15 | 16 | board-y=board.o 17 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_mux.o usb_pd_policy.o 18 | -------------------------------------------------------------------------------- /board/scarlet/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | # 9 | # STmicro STM32F098VC 10 | CHIP:=stm32 11 | CHIP_FAMILY:=stm32f0 12 | CHIP_VARIANT:=stm32f09x 13 | 14 | board-y=battery.o board.o usb_pd_policy.o led.o 15 | -------------------------------------------------------------------------------- /board/servo_micro/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072RBT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/servo_micro/servo_micro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/servo_micro/servo_micro.png -------------------------------------------------------------------------------- /board/servo_micro/servo_micro_sch_20180404.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/board/servo_micro/servo_micro_sch_20180404.pdf -------------------------------------------------------------------------------- /board/servo_v4/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072RBT6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | # Use coreboot-sdk 14 | $(call set-option,CROSS_COMPILE_arm,\ 15 | $(CROSS_COMPILE_coreboot_sdk_arm),\ 16 | /opt/coreboot-sdk/bin/arm-eabi-) 17 | 18 | # Not enough SRAM: Disable all tests 19 | test-list-y= 20 | 21 | board-y=board.o 22 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 23 | 24 | all_deps=$(patsubst ro,,$(def_all_deps)) 25 | -------------------------------------------------------------------------------- /board/soraka: -------------------------------------------------------------------------------- 1 | poppy -------------------------------------------------------------------------------- /board/staff: -------------------------------------------------------------------------------- 1 | hammer -------------------------------------------------------------------------------- /board/stm32f446e-eval/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | CHIP:=stm32 9 | CHIP_FAMILY:=stm32f4 10 | CHIP_VARIANT:=stm32f446 11 | 12 | board-y=board.o 13 | -------------------------------------------------------------------------------- /board/stm32l476g-eval/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | CHIP:=stm32 9 | CHIP_FAMILY:=stm32l4 10 | CHIP_VARIANT:=stm32l476 11 | 12 | board-y=board.o 13 | -------------------------------------------------------------------------------- /board/stm32l476g-eval/openocd-flash.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | source [find board/stm32l4discovery.cfg] 6 | 7 | # For flashing, force the board into reset on connect, this ensures that 8 | # code running on the core can't interfere with programming. 9 | reset_config connect_assert_srst 10 | 11 | gdb_port 0 12 | tcl_port 0 13 | telnet_port 0 14 | init 15 | reset init 16 | flash write_image erase $BUILD_DIR/ec.bin 0x08000000 17 | reset halt 18 | resume 19 | shutdown 20 | -------------------------------------------------------------------------------- /board/strago/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | # the IC is SMSC MEC1322 / external SPI is 512KB / external clock is crystal 10 | CHIP:=mec1322 11 | CHIP_SPI_SIZE_KB:=512 12 | 13 | board-y=board.o led.o 14 | board-$(CONFIG_BATTERY_SMART)+=battery.o 15 | board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o 16 | -------------------------------------------------------------------------------- /board/sweetberry/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | CHIP:=stm32 9 | CHIP_FAMILY:=stm32f4 10 | CHIP_VARIANT:=stm32f446 11 | 12 | board-y=board.o 13 | -------------------------------------------------------------------------------- /board/tigertail/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072CBU6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o 14 | -------------------------------------------------------------------------------- /board/twinkie/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F072B 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f07x 12 | 13 | board-y=board.o usb_pd_policy.o injector.o simpletrace.o 14 | board-$(HAS_TASK_SNIFFER)+=sniffer.o 15 | -------------------------------------------------------------------------------- /board/wand: -------------------------------------------------------------------------------- 1 | hammer -------------------------------------------------------------------------------- /board/whiskers: -------------------------------------------------------------------------------- 1 | hammer -------------------------------------------------------------------------------- /board/yorp/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | # 8 | 9 | CHIP:=npcx 10 | CHIP_FAMILY:=npcx7 11 | CHIP_VARIANT:=npcx7m6fb 12 | BASEBOARD:=octopus 13 | 14 | board-y=board.o led.o 15 | board-$(CONFIG_BATTERY_SMART)+=battery.o 16 | -------------------------------------------------------------------------------- /board/zinger/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Board specific files build 7 | 8 | # the IC is STmicro STM32F031F6 9 | CHIP:=stm32 10 | CHIP_FAMILY:=stm32f0 11 | CHIP_VARIANT:=stm32f03x 12 | 13 | board-y=board.o hardware.o runtime.o usb_pd_policy.o 14 | -------------------------------------------------------------------------------- /board/zinger/ec.irqlist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled IRQ. To enable an IRQ, use ENABLE_IRQ(irq_num). Any 8 | * IRQ that is not listed here is disabled. 9 | */ 10 | 11 | ENABLE_IRQ(STM32_IRQ_EXTI4_15) 12 | ENABLE_IRQ(STM32_IRQ_ADC_COMP) 13 | ENABLE_IRQ(STM32_IRQ_TIM2) 14 | ENABLE_IRQ(STM32_IRQ_RTC_WAKEUP) 15 | -------------------------------------------------------------------------------- /board/zinger/ec.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and 12 | * TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries, 13 | * where : 14 | * 'n' in the name of the task 15 | * 'r' in the main routine of the task 16 | * 'd' in an opaque parameter passed to the routine at startup 17 | * 's' is the stack size in bytes; must be a multiple of 8 18 | */ 19 | #define CONFIG_TASK_LIST 20 | -------------------------------------------------------------------------------- /builtin/stdbool.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_STDBOOL_H__ 7 | #define __CROS_EC_STDBOOL_H__ 8 | 9 | #define bool _Bool 10 | #define true 1 11 | #define false 0 12 | 13 | #endif /* __CROS_EC_STDBOOL_H__ */ 14 | -------------------------------------------------------------------------------- /builtin/time.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* This header is only needed for CR50 compatibility */ 7 | 8 | #ifndef __CROS_EC_TIME_H__ 9 | #define __CROS_EC_TIME_H__ 10 | 11 | #include 12 | 13 | #endif /* __CROS_EC_TIME_H__ */ 14 | -------------------------------------------------------------------------------- /chip/g/dcrypto/compare.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "dcrypto.h" 7 | 8 | /* Constant time comparator. */ 9 | int DCRYPTO_equals(const void *a, const void *b, size_t len) 10 | { 11 | size_t i; 12 | const uint8_t *pa = a; 13 | const uint8_t *pb = b; 14 | uint8_t diff = 0; 15 | 16 | for (i = 0; i < len; i++) 17 | diff |= pa[i] ^ pb[i]; 18 | 19 | return !diff; 20 | } 21 | -------------------------------------------------------------------------------- /chip/g/dcrypto/sha384.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "dcrypto.h" 7 | #include "internal.h" 8 | 9 | #include "cryptoc/sha384.h" 10 | 11 | void DCRYPTO_SHA384_init(LITE_SHA512_CTX *ctx) 12 | { 13 | SHA384_init(ctx); 14 | } 15 | 16 | const uint8_t *DCRYPTO_SHA384_hash(const void *data, uint32_t n, 17 | uint8_t *digest) 18 | { 19 | return SHA384_hash(data, n, digest); 20 | } 21 | -------------------------------------------------------------------------------- /chip/g/dcrypto/sha512.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "dcrypto.h" 7 | #include "internal.h" 8 | 9 | #include "cryptoc/sha512.h" 10 | 11 | void DCRYPTO_SHA512_init(LITE_SHA512_CTX *ctx) 12 | { 13 | SHA512_init(ctx); 14 | } 15 | 16 | const uint8_t *DCRYPTO_SHA512_hash(const void *data, uint32_t n, 17 | uint8_t *digest) 18 | { 19 | return SHA512_hash(data, n, digest); 20 | } 21 | -------------------------------------------------------------------------------- /chip/g/loader/debug_printf.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #include "debug_printf.h" 6 | 7 | #include "printf.h" 8 | #include "uart.h" 9 | 10 | #include "stddef.h" 11 | 12 | static int printchar(void *context, int c) 13 | { 14 | if (c == '\n') 15 | uart_write_char('\r'); 16 | uart_write_char(c); 17 | 18 | return 0; 19 | } 20 | 21 | void debug_printf(const char *format, ...) 22 | { 23 | va_list args; 24 | 25 | va_start(args, format); 26 | vfnprintf(printchar, NULL, format, args); 27 | va_end(args); 28 | } 29 | -------------------------------------------------------------------------------- /chip/g/loader/debug_printf.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #ifndef __EC_CHIP_G_LOADER_DEBUG_PRINTF_H 6 | #define __EC_CHIP_G_LOADER_DEBUG_PRINTF_H 7 | 8 | void debug_printf(const char *format, ...); 9 | 10 | #ifdef DEBUG 11 | #define VERBOSE debug_printf 12 | #else 13 | #define VERBOSE(...) 14 | #endif 15 | 16 | #endif /* __EC_CHIP_G_LOADER_DEBUG_PRINTF_H */ 17 | -------------------------------------------------------------------------------- /chip/g/loader/key_ladder.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_CHIP_G_LOADER_KEY_LADDER_H 7 | #define __EC_CHIP_G_LOADER_KEY_LADDER_H 8 | 9 | #include 10 | #include 11 | 12 | void key_ladder_step(uint32_t certificate, const uint32_t *input); 13 | 14 | #endif /* ! __EC_CHIP_G_LOADER_KEY_LADDER_H */ 15 | -------------------------------------------------------------------------------- /chip/g/loader/setup.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_CHIP_G_LOADER_SETUP_H 7 | #define __EC_CHIP_G_LOADER_SETUP_H 8 | 9 | #include 10 | #include 11 | 12 | void checkBuildVersion(void); 13 | void disarmRAMGuards(void); 14 | void halt(void); 15 | void tryLaunch(uint32_t adr, size_t max_size); 16 | void unlockFlashForRW(void); 17 | 18 | #endif /* __EC_CHIP_G_LOADER_SETUP_H */ 19 | -------------------------------------------------------------------------------- /chip/g/loader/verify.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_CHIP_G_LOADER_VERIFY_H 7 | #define __EC_CHIP_G_LOADER_VERIFY_H 8 | 9 | /* 10 | * Verify a RSA PKCS1.5 signature against an expected sha256. Unlocks for 11 | * execution upon success. 12 | */ 13 | void LOADERKEY_verify(const uint32_t *key, 14 | const uint32_t *signature, const uint32_t *sha256); 15 | 16 | #endif /* __EC_CHIP_G_LOADER_VERIFY_H */ 17 | -------------------------------------------------------------------------------- /chip/g/rbox.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_RBOX_H 7 | #define __CROS_RBOX_H 8 | 9 | /** 10 | * Return true if the power button output shows it is pressed 11 | */ 12 | int rbox_powerbtn_is_pressed(void); 13 | 14 | /** 15 | * Clear the wakeup interrupts 16 | */ 17 | void rbox_clear_wakeup(void); 18 | #endif /* __CROS_RBOX_H */ 19 | -------------------------------------------------------------------------------- /chip/g/rdd.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_RDD_H 7 | #define __CROS_RDD_H 8 | 9 | /** 10 | * Initialize RDD module 11 | */ 12 | void init_rdd_state(void); 13 | 14 | /** 15 | * Print debug accessory detect state 16 | */ 17 | void print_rdd_state(void); 18 | 19 | /** 20 | * Get instantaneous cable detect state 21 | * 22 | * @return 1 if debug accessory is detected, 0 if not detected. 23 | */ 24 | uint8_t rdd_is_detected(void); 25 | 26 | #endif /* __CROS_RDD_H */ 27 | -------------------------------------------------------------------------------- /chip/g/sn_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #ifndef __EC_CHIP_G_SN_BITS_H 8 | #define __EC_CHIP_G_SN_BITS_H 9 | 10 | #include "board_space.h" 11 | 12 | /** 13 | * Reads the SN data from the flash INFO1 space. 14 | * 15 | * @param id Pointer to a sn_data structure to fill 16 | * 17 | * @return EC_SUCCESS or an error code in case of failure. 18 | */ 19 | int read_sn_data(struct sn_data *sn); 20 | 21 | #endif /* ! __EC_CHIP_G_SN_BITS_H */ 22 | -------------------------------------------------------------------------------- /chip/g/spi_master.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #ifndef __CROS_EC_INCLUDE_SPI_MASTER_H 8 | #define __CROS_EC_INCLUDE_SPI_MASTER_H 9 | 10 | #include "spi.h" 11 | 12 | void configure_spi0_passthrough(int enable); 13 | void set_spi_clock_mode(int port, enum spi_clock_mode mode); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /chip/host/clock.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Dummy clock driver for unit test. 6 | */ 7 | 8 | #include "clock.h" 9 | 10 | int clock_get_freq(void) 11 | { 12 | return 16000000; 13 | } 14 | -------------------------------------------------------------------------------- /chip/host/dcrypto/README.md: -------------------------------------------------------------------------------- 1 | # Rough Dcrypto Implementation on Host for Fuzzing Targets. 2 | 3 | This implementation of the dcrypto API is not complete, but provides the needed 4 | function definitions to fuzz Cr50 code. 5 | The the following should be noted: 6 | * A complete implementation of dcrypto does not add any extra coverage since the 7 | dcrypto code here doesn't match the Cr50 implementation that depends on 8 | a specific hardware accelerator. 9 | * The input data comes from a fuzzer so storage encryption isn't necessary—no 10 | user data is handled. 11 | * For fuzzing fully implementing the crypto functionality isn't useful for the 12 | purpose of finding bugs--it makes the fuzzer take longer to execute without 13 | providing any benefit for the extra cycles. 14 | -------------------------------------------------------------------------------- /chip/host/dcrypto/sha256.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "dcrypto.h" 7 | 8 | void DCRYPTO_SHA256_init(LITE_SHA256_CTX *ctx, uint32_t sw_required) 9 | { 10 | SHA256_init(ctx); 11 | } 12 | 13 | const uint8_t *DCRYPTO_SHA256_hash(const void *data, uint32_t n, 14 | uint8_t *digest) 15 | { 16 | SHA256_hash(data, n, digest); 17 | return digest; 18 | } 19 | -------------------------------------------------------------------------------- /chip/host/host_test.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Unit testing for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_HOST_TEST_H 9 | #define __CROS_EC_HOST_TEST_H 10 | 11 | /* Emulator exit codes */ 12 | #define EXIT_CODE_HIBERNATE (1 << 7) 13 | 14 | /* Get emulator executable name */ 15 | const char *__get_prog_name(void); 16 | 17 | #endif /* __CROS_EC_HOST_TEST_H */ 18 | -------------------------------------------------------------------------------- /chip/host/lpc.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* LPC module for Chrome EC emulator */ 7 | 8 | #include "lpc.h" 9 | 10 | test_mockable int lpc_keyboard_has_char(void) 11 | { 12 | return 0; 13 | } 14 | 15 | test_mockable int lpc_keyboard_input_pending(void) 16 | { 17 | return 0; 18 | } 19 | 20 | test_mockable void lpc_keyboard_put_char(uint8_t chr, int send_irq) 21 | { 22 | /* Do nothing */ 23 | } 24 | 25 | test_mockable void lpc_keyboard_clear_buffer(void) 26 | { 27 | /* Do nothing */ 28 | } 29 | 30 | test_mockable void lpc_keyboard_resume_irq(void) 31 | { 32 | /* Do nothing */ 33 | } 34 | -------------------------------------------------------------------------------- /chip/host/persistence.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Persistence module for emulator */ 7 | 8 | #ifndef __CROS_EC_PERSISTENCE_H 9 | #define __CROS_EC_PERSISTENCE_H 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | FILE *get_persistent_storage(const char *tag, const char *mode); 18 | 19 | void release_persistent_storage(FILE *ps); 20 | 21 | void remove_persistent_storage(const char *tag); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif /* __CROS_EC_PERSISTENCE_H */ 28 | -------------------------------------------------------------------------------- /chip/host/reboot.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Emulator self-reboot procedure */ 7 | 8 | #ifndef __CROS_EC_REBOOT_H 9 | #define __CROS_EC_REBOOT_H 10 | 11 | #ifndef TEST_FUZZ 12 | __attribute__((noreturn)) 13 | #endif 14 | void emulator_reboot(void); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /chip/host/registers.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Empty registers header for emulator */ 7 | 8 | /* 9 | * There is no register for emulator, but this file exists to prevent 10 | * compilation failure if any file includes registers.h 11 | */ 12 | -------------------------------------------------------------------------------- /chip/ish/clock.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Clocks and power management settings */ 7 | 8 | #include "clock.h" 9 | #include "common.h" 10 | #include "util.h" 11 | 12 | /* Console output macros */ 13 | #define CPUTS(outstr) cputs(CC_CLOCK, outstr) 14 | #define CPRINTS(format, args...) cprints(CC_CLOCK, format, ## args) 15 | 16 | 17 | void clock_init(void) 18 | { 19 | /* No initialization for ISH clock since D0ix is not enabled yet */ 20 | } 21 | -------------------------------------------------------------------------------- /chip/ish/flash.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "common.h" 7 | #include "flash.h" 8 | 9 | 10 | /** 11 | * Initialize the module. 12 | * 13 | * Applies at-boot protection settings if necessary. 14 | */ 15 | int flash_pre_init(void) 16 | { 17 | return EC_SUCCESS; 18 | } 19 | -------------------------------------------------------------------------------- /chip/it83xx/flash_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_FLASH_CHIP_H 7 | #define __CROS_EC_FLASH_CHIP_H 8 | 9 | /* 10 | * This symbol is defined in linker script and used to provide the begin 11 | * address of the ram code section. With this address, we can enable a ILM 12 | * (4K bytes static code cache) for ram code section. 13 | */ 14 | extern const char __flash_dma_start; 15 | 16 | /* This symbol is the begin address of the text section. */ 17 | extern const char __flash_text_start; 18 | 19 | #endif /* __CROS_EC_FLASH_CHIP_H */ 20 | -------------------------------------------------------------------------------- /chip/it83xx/kmsc_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Keyboard matrix scan control module for IT83xx. */ 7 | 8 | #ifndef __CROS_EC_KMSC_CHIP_H 9 | #define __CROS_EC_KMSC_CHIP_H 10 | 11 | void keyboard_raw_interrupt(void); 12 | 13 | #endif /* __CROS_EC_KMSC_CHIP_H */ 14 | -------------------------------------------------------------------------------- /chip/lm4/pwm_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* LM4-specific PWM module for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_PWM_CHIP_H 9 | #define __CROS_EC_PWM_CHIP_H 10 | 11 | /* Data structure to define PWM channels. */ 12 | struct pwm_t { 13 | /* PWM channel ID */ 14 | int channel; 15 | /* PWM channel flags. See include/pwm.h */ 16 | uint32_t flags; 17 | }; 18 | 19 | extern const struct pwm_t pwm_channels[]; 20 | 21 | #endif /* __CROS_EC_PWM_CHIP_H */ 22 | -------------------------------------------------------------------------------- /chip/mchp/clock_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Microchip MEC1701 specific module for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_CLOCK_CHIP_H 9 | #define __CROS_EC_CLOCK_CHIP_H 10 | 11 | #include 12 | 13 | void htimer_init(void); 14 | void system_set_htimer_alarm(uint32_t seconds, 15 | uint32_t microseconds); 16 | 17 | #endif /* __CROS_EC_I2C_CLOCK_H */ 18 | -------------------------------------------------------------------------------- /chip/mchp/pwm_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* MEC1701H-specific PWM module for Chrome EC */ 7 | #ifndef __CROS_EC_PWM_CHIP_H 8 | #define __CROS_EC_PWM_CHIP_H 9 | 10 | /* Data structure to define PWM channels. */ 11 | struct pwm_t { 12 | /* PWM Channel ID */ 13 | int channel; 14 | 15 | /* PWM channel flags. See include/pwm.h */ 16 | uint32_t flags; 17 | }; 18 | 19 | extern const struct pwm_t pwm_channels[]; 20 | 21 | void pwm_keep_awake(void); 22 | 23 | #endif /* __CROS_EC_PWM_CHIP_H */ 24 | -------------------------------------------------------------------------------- /chip/mec1322/lfw/ec_lfw.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * MEC1322 SoC little FW 6 | * 7 | */ 8 | 9 | void lfw_main(void) __attribute__ ((noreturn, naked)); 10 | void fault_handler(void) __attribute__((naked)); 11 | 12 | struct int_vector_t { 13 | void *stack_ptr; 14 | void *reset_vector; 15 | void *nmi; 16 | void *hard_fault; 17 | void *bus_fault; 18 | void *usage_fault; 19 | }; 20 | 21 | #define SPI_CHUNK_SIZE 1024 22 | -------------------------------------------------------------------------------- /chip/mec1322/pwm_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* MEC1322-specific PWM module for Chrome EC */ 7 | #ifndef __CROS_EC_PWM_CHIP_H 8 | #define __CROS_EC_PWM_CHIP_H 9 | 10 | /* Data structure to define PWM channels. */ 11 | struct pwm_t { 12 | /* PWM Channel ID */ 13 | int channel; 14 | 15 | /* PWM channel flags. See include/pwm.h */ 16 | uint32_t flags; 17 | }; 18 | 19 | extern const struct pwm_t pwm_channels[]; 20 | 21 | /* 22 | * Returns PWMs that must remain active in low-power idle - 23 | * MEC1322_PCR_EC_SLP_EN bit mask. 24 | */ 25 | uint32_t pwm_get_keep_awake_mask(void); 26 | #endif /* __CROS_EC_PWM_CHIP_H */ 27 | -------------------------------------------------------------------------------- /chip/mt_scp/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2018 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # SCP specific files build 7 | # 8 | 9 | CORE:=cortex-m 10 | CFLAGS_CPU+=-march=armv7e-m -mcpu=cortex-m4 11 | 12 | # Required chip modules 13 | chip-y=clock.o gpio.o memmap.o stepping_stone.o system.o uart.o 14 | 15 | # Optional chip modules 16 | chip-$(CONFIG_COMMON_TIMER)+=hrtimer.o 17 | chip-$(CONFIG_I2C)+=i2c.o 18 | chip-$(CONFIG_IPI)+=ipi.o ipi_table.o 19 | chip-$(CONFIG_SPI)+=spi.o 20 | chip-$(CONFIG_WATCHDOG)+=watchdog.o 21 | -------------------------------------------------------------------------------- /chip/mt_scp/memory_regions.inc: -------------------------------------------------------------------------------- 1 | REGION_LOAD(stepping_stone, rwx, 0x00000, 0x8) 2 | -------------------------------------------------------------------------------- /chip/mt_scp/stepping_stone.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * mt_scp Stepping Stone functions on CPU reset. 6 | * 7 | * SCP assumes vector table at CONFIG_RAM_BASE. However, on cortex-m resetting, 8 | * it would load 0x0 to SP(r13) and load 0x04 to PC(r15). Stepping stones copy 9 | * these two very special values from CONFIG_RAM_BASE, CONFIG_RAM_BASE + 0x04 10 | * to 0x0, 0x4 resepctively. 11 | */ 12 | 13 | #include "common.h" 14 | #include "link_defs.h" 15 | 16 | extern void *stack_end; 17 | extern void reset(void); 18 | 19 | __SECTION_KEEP(stepping_stone) const void *ss_header[2] = { 20 | &stack_end, 21 | &reset 22 | }; 23 | -------------------------------------------------------------------------------- /chip/npcx/lfw/ec_lfw.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * NPCX5M5G SoC little FW used by booter 6 | */ 7 | 8 | #ifndef __CROS_EC_EC_LFW_H 9 | #define __CROS_EC_EC_LFW_H 10 | 11 | /* Begin address for the .iram section; defined in linker script */ 12 | extern unsigned int __iram_fw_start; 13 | /* End address for the .iram section; defined in linker script */ 14 | extern unsigned int __iram_fw_end; 15 | /* Begin address for the iram codes; defined in linker script */ 16 | extern unsigned int __flash_fw_start; 17 | 18 | #endif /* __CROS_EC_EC_LFW_H */ 19 | -------------------------------------------------------------------------------- /chip/npcx/lpc_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* NPCX-specific hwtimer module for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_LPC_CHIP_H 9 | #define __CROS_EC_LPC_CHIP_H 10 | 11 | /* For host registers initialization via SIB module */ 12 | void host_register_init(void); 13 | 14 | #ifdef CONFIG_HOSTCMD_ESPI 15 | /* eSPI Initialization functions */ 16 | void espi_init(void); 17 | /* eSPI reset assert/de-assert interrupt */ 18 | void espi_espirst_handler(void); 19 | #else 20 | /* LPC PLTRST assert/de-assert interrupt */ 21 | void lpc_lreset_pltrst_handler(void); 22 | #endif 23 | #endif /* __CROS_EC_LPC_CHIP_H */ 24 | -------------------------------------------------------------------------------- /chip/npcx/pwm_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* NPCX-specific PWM module for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_PWM_CHIP_H 9 | #define __CROS_EC_PWM_CHIP_H 10 | 11 | /* Data structure to define PWM channels. */ 12 | struct pwm_t { 13 | /* PWM channel ID */ 14 | int channel; 15 | /* PWM channel flags. See include/pwm.h */ 16 | uint32_t flags; 17 | /* PWM freq. */ 18 | uint32_t freq; 19 | }; 20 | 21 | extern const struct pwm_t pwm_channels[]; 22 | void pwm_config(enum pwm_channel ch); 23 | 24 | #endif /* __CROS_EC_PWM_CHIP_H */ 25 | -------------------------------------------------------------------------------- /chip/npcx/shi_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* NPCX-specific SHI module for Chrome EC */ 7 | 8 | #ifndef SHI_CHIP_H_ 9 | #define SHI_CHIP_H_ 10 | 11 | #ifdef CONFIG_HOSTCMD_SPS 12 | /** 13 | * Called when the NSS level changes, signalling the start of a SHI 14 | * transaction. 15 | * 16 | * @param signal GPIO signal that changed 17 | */ 18 | void shi_cs_event(enum gpio_signal signal); 19 | #ifdef NPCX_SHI_V2 20 | void shi_cs_gpio_int(enum gpio_signal signal); 21 | #endif 22 | #endif 23 | 24 | #endif /* SHI_CHIP_H_ */ 25 | -------------------------------------------------------------------------------- /chip/nrf51/clock.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Clocks and power management settings */ 7 | 8 | void clock_init(void) 9 | { 10 | } 11 | 12 | int clock_get_freq(void) 13 | { 14 | /* constant 16 MHz clock */ 15 | return 16000000; 16 | } 17 | -------------------------------------------------------------------------------- /chip/nrf51/watchdog.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Watchdog driver */ 7 | 8 | #include "common.h" 9 | #include "console.h" 10 | 11 | /* Console output macros */ 12 | #define CPUTS(outstr) cputs(CC_SYSTEM, outstr) 13 | #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args) 14 | 15 | 16 | int watchdog_init(void) 17 | { 18 | CPRINTS("TODO: implement %s()", __func__); 19 | return EC_ERROR_UNIMPLEMENTED; 20 | } 21 | -------------------------------------------------------------------------------- /chip/stm32/adc-stm32f4.c: -------------------------------------------------------------------------------- 1 | adc-stm32f3.c -------------------------------------------------------------------------------- /chip/stm32/clock-stm32f3.c: -------------------------------------------------------------------------------- 1 | clock-stm32f0.c -------------------------------------------------------------------------------- /chip/stm32/debug_printf.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | /* Synchronous UART debug printf */ 6 | 7 | #ifndef __CROS_EC_DEBUG_H 8 | #define __CROS_EC_DEBUG_H 9 | 10 | #ifdef CONFIG_DEBUG_PRINTF 11 | void debug_printf(const char *format, ...); 12 | #else 13 | #define debug_printf(...) 14 | #endif 15 | 16 | #endif /* __CROS_EC_DEBUG_H */ 17 | -------------------------------------------------------------------------------- /chip/stm32/flash-stm32f4.c: -------------------------------------------------------------------------------- 1 | flash-stm32f3.c -------------------------------------------------------------------------------- /chip/stm32/gpio_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_CHIP_STM32_GPIO_CHIP_H 7 | #define __CROS_EC_CHIP_STM32_GPIO_CHIP_H 8 | 9 | #include "include/gpio.h" 10 | 11 | /** 12 | * Enable GPIO peripheral clocks. 13 | */ 14 | void gpio_enable_clocks(void); 15 | 16 | #endif /* __CROS_EC_CHIP_STM32_GPIO_CHIP_H */ 17 | -------------------------------------------------------------------------------- /chip/stm32/i2c-stm32f3.c: -------------------------------------------------------------------------------- 1 | i2c-stm32f0.c -------------------------------------------------------------------------------- /chip/stm32/stm32-dma.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * Select DMA stream-channel mapping 8 | * 9 | * This selects which stream (peripheral) to be used on a specific channel. 10 | * Some STM32 chips simply logically OR requests, thus do not require this 11 | * selection. 12 | * 13 | * @param channel: (Global) channel # base 0 (Note some STM32s use base 1) 14 | * @param peripheral: Refer to the TRM for 'peripheral request signals' 15 | */ 16 | void dma_select_channel(enum dma_channel channel, unsigned char stream); 17 | -------------------------------------------------------------------------------- /chip/stm32/usart-stm32f0.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #ifndef __CROS_EC_USART_STM32F0_H 6 | #define __CROS_EC_USART_STM32F0_H 7 | 8 | #include "usart.h" 9 | 10 | /* 11 | * The STM32F0 series can have as many as four UARTS. These are the HW configs 12 | * for those UARTS. They can be used to initialize STM32 generic UART configs. 13 | */ 14 | extern struct usart_hw_config const usart1_hw; 15 | extern struct usart_hw_config const usart2_hw; 16 | extern struct usart_hw_config const usart3_hw; 17 | extern struct usart_hw_config const usart4_hw; 18 | 19 | #endif /* __CROS_EC_USART_STM32F0_H */ 20 | -------------------------------------------------------------------------------- /chip/stm32/usart-stm32f3.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #ifndef __CROS_EC_USART_STM32F3_H 6 | #define __CROS_EC_USART_STM32F3_H 7 | 8 | #include "usart.h" 9 | 10 | /* 11 | * The STM32F3 series can have as many as three UARTS. These are the HW configs 12 | * for those UARTS. They can be used to initialize STM32 generic UART configs. 13 | */ 14 | extern struct usart_hw_config const usart1_hw; 15 | extern struct usart_hw_config const usart2_hw; 16 | extern struct usart_hw_config const usart3_hw; 17 | 18 | #endif /* __CROS_EC_USART_STM32F3_H */ 19 | -------------------------------------------------------------------------------- /chip/stm32/usart-stm32l.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #ifndef __CROS_EC_USART_STM32L_H 6 | #define __CROS_EC_USART_STM32L_H 7 | 8 | #include "usart.h" 9 | 10 | /* 11 | * The STM32L series can have as many as three UARTS. These are the HW configs 12 | * for those UARTS. They can be used to initialize STM32 generic UART configs. 13 | */ 14 | extern struct usart_hw_config const usart1_hw; 15 | extern struct usart_hw_config const usart2_hw; 16 | extern struct usart_hw_config const usart3_hw; 17 | 18 | #endif /* __CROS_EC_USART_STM32L_H */ 19 | -------------------------------------------------------------------------------- /chip/stm32/usart_rx_interrupt-stm32f0.c: -------------------------------------------------------------------------------- 1 | usart_rx_interrupt.c -------------------------------------------------------------------------------- /chip/stm32/usart_rx_interrupt-stm32f3.c: -------------------------------------------------------------------------------- 1 | usart_rx_interrupt.c -------------------------------------------------------------------------------- /chip/stm32/usb-stm32f0.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * STM32F0 Family specific USB functionality 6 | */ 7 | 8 | #include "registers.h" 9 | #include "system.h" 10 | #include "usb_api.h" 11 | 12 | void usb_connect(void) 13 | { 14 | /* USB is in use */ 15 | disable_sleep(SLEEP_MASK_USB_DEVICE); 16 | 17 | STM32_USB_BCDR |= (1 << 15) /* DPPU */; 18 | } 19 | 20 | void usb_disconnect(void) 21 | { 22 | /* disable pull-up on DP to disconnect */ 23 | STM32_USB_BCDR &= ~(1 << 15) /* DPPU */; 24 | 25 | /* USB is off, so sleep whenever */ 26 | enable_sleep(SLEEP_MASK_USB_DEVICE); 27 | } 28 | -------------------------------------------------------------------------------- /chip/stm32/usb-stm32f3.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * STM32F3 Family specific USB functionality 6 | */ 7 | 8 | #include "usb-stm32f3.h" 9 | 10 | #include "system.h" 11 | #include "usb_api.h" 12 | 13 | void usb_connect(void) 14 | { 15 | /* USB is in use */ 16 | disable_sleep(SLEEP_MASK_USB_DEVICE); 17 | 18 | usb_board_connect(); 19 | } 20 | 21 | void usb_disconnect(void) 22 | { 23 | usb_board_disconnect(); 24 | 25 | /* USB is off, so sleep whenever */ 26 | enable_sleep(SLEEP_MASK_USB_DEVICE); 27 | } 28 | -------------------------------------------------------------------------------- /chip/stm32/usb-stm32l.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * STM32L Family specific USB functionality 6 | */ 7 | 8 | #include "registers.h" 9 | #include "system.h" 10 | #include "usb_api.h" 11 | 12 | void usb_connect(void) 13 | { 14 | /* USB is in use */ 15 | disable_sleep(SLEEP_MASK_USB_DEVICE); 16 | 17 | STM32_SYSCFG_PMC |= 1; 18 | } 19 | 20 | void usb_disconnect(void) 21 | { 22 | /* disable pull-up on DP to disconnect */ 23 | STM32_SYSCFG_PMC &= ~1; 24 | 25 | /* USB is off, so sleep whenever */ 26 | enable_sleep(SLEEP_MASK_USB_DEVICE); 27 | } 28 | -------------------------------------------------------------------------------- /chip/stm32/usb_dwc_console.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CHIP_STM32_USB_DWC_CONSOLE_H 7 | #define __CHIP_STM32_USB_DWC_CONSOLE_H 8 | 9 | #include "usb_hw.h" 10 | 11 | extern struct dwc_usb_ep ep_console_ctl; 12 | 13 | #endif /* __CHIP_STM32_USB_DWC_CONSOLE_H */ 14 | -------------------------------------------------------------------------------- /chip/stm32/usb_dwc_i2c.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_USB_DWC_I2C_H 7 | #define __CROS_EC_USB_DWC_I2C_H 8 | #include "usb_i2c.h" 9 | 10 | /* I2C over USB interface. This gets declared in usb_i2c.c */ 11 | extern struct dwc_usb_ep i2c_usb__ep_ctl; 12 | 13 | #endif /* __CROS_EC_USB_DWC_I2C_H */ 14 | -------------------------------------------------------------------------------- /chip/stm32/usb_dwc_update.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #ifndef __CROS_EC_STM32_USB_DWC_UPDATE_H 6 | #define __CROS_EC_STM32_USB_DWC_UPDATE_H 7 | 8 | extern struct dwc_usb_ep usb_update_ep_ctl; 9 | 10 | #endif /* __CROS_EC_STM32_USB_DWC_UPDATE_H */ 11 | -------------------------------------------------------------------------------- /common/aes-gcm.c: -------------------------------------------------------------------------------- 1 | ../third_party/boringssl/common/aes-gcm.c -------------------------------------------------------------------------------- /common/aes.c: -------------------------------------------------------------------------------- 1 | ../third_party/boringssl/common/aes.c -------------------------------------------------------------------------------- /common/crc8.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | #include "common.h" 6 | #include "crc8.h" 7 | 8 | inline uint8_t crc8(const uint8_t *data, int len) 9 | { 10 | return crc8_arg(data, len, 0); 11 | } 12 | 13 | uint8_t crc8_arg(const uint8_t *data, int len, uint8_t previous_crc) 14 | { 15 | unsigned crc = previous_crc << 8; 16 | int i, j; 17 | 18 | for (j = len; j; j--, data++) { 19 | crc ^= (*data << 8); 20 | for (i = 8; i; i--) { 21 | if (crc & 0x8000) 22 | crc ^= (0x1070 << 3); 23 | crc <<= 1; 24 | } 25 | } 26 | 27 | return (uint8_t)(crc >> 8); 28 | } 29 | -------------------------------------------------------------------------------- /common/ec.libsharedobjs.ld: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | SECTIONS 7 | { 8 | .roshared : { KEEP(*(.roshared*)) } 9 | /* 10 | * Save the .ARM.atrributes section to make the linker not complain 11 | * about conflicting CPU architectures when linking with the RW objs. 12 | * This section will be discarded by the main EC linker script. 13 | */ 14 | .ARM.attributes : { KEEP(*(.ARM.*)) } 15 | } 16 | -------------------------------------------------------------------------------- /core/cortex-m/aes.S: -------------------------------------------------------------------------------- 1 | ../../third_party/boringssl/core/cortex-m/aes.S -------------------------------------------------------------------------------- /core/cortex-m/config_core.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_CONFIG_CORE_H 7 | #define __CROS_EC_CONFIG_CORE_H 8 | 9 | /* Linker binary architecture and format */ 10 | #define BFD_ARCH arm 11 | #define BFD_FORMAT "elf32-littlearm" 12 | 13 | #define CONFIG_SOFTWARE_PANIC 14 | 15 | #endif /* __CROS_EC_CONFIG_CORE_H */ 16 | -------------------------------------------------------------------------------- /core/cortex-m/ghash.S: -------------------------------------------------------------------------------- 1 | ../../third_party/boringssl/core/cortex-m/ghash.S -------------------------------------------------------------------------------- /core/cortex-m/include/math.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Math utility functions for ARMv7 */ 7 | 8 | #ifndef __CROS_EC_MATH_H 9 | #define __CROS_EC_MATH_H 10 | 11 | #ifdef CONFIG_FPU 12 | static inline float sqrtf(float v) 13 | { 14 | float root; 15 | asm volatile( 16 | "fsqrts %0, %1" 17 | : "=w" (root) 18 | : "w" (v) 19 | ); 20 | return root; 21 | } 22 | 23 | static inline float fabsf(float v) 24 | { 25 | float root; 26 | asm volatile( 27 | "fabss %0, %1" 28 | : "=w" (root) 29 | : "w" (v) 30 | ); 31 | return root; 32 | } 33 | #endif /* CONFIG_FPU */ 34 | 35 | #endif /* __CROS_EC_MATH_H */ 36 | -------------------------------------------------------------------------------- /core/cortex-m/panic-internal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_PANIC_INTERNAL_H 7 | #define __CROS_EC_PANIC_INTERNAL_H 8 | 9 | void exception_panic(void) __attribute__((naked)); 10 | 11 | #endif /* __CROS_EC_PANIC_INTERNAL_H */ 12 | -------------------------------------------------------------------------------- /core/cortex-m0/config_core.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_CONFIG_CORE_H 7 | #define __CROS_EC_CONFIG_CORE_H 8 | 9 | /* Linker binary architecture and format */ 10 | #define BFD_ARCH arm 11 | #define BFD_FORMAT "elf32-littlearm" 12 | 13 | /* Emulate the CLZ/CTZ instructions since the CPU core is lacking support */ 14 | #define CONFIG_SOFTWARE_CLZ 15 | #define CONFIG_SOFTWARE_CTZ 16 | #define CONFIG_SOFTWARE_PANIC 17 | 18 | #define CONFIG_ASSEMBLY_MULA32 19 | 20 | #endif /* __CROS_EC_CONFIG_CORE_H */ 21 | -------------------------------------------------------------------------------- /core/cortex-m0/cpu.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Set up the Cortex-M0 core 6 | */ 7 | 8 | #include "cpu.h" 9 | 10 | void cpu_init(void) 11 | { 12 | /* Catch unaligned access */ 13 | CPU_NVIC_CCR |= CPU_NVIC_CCR_UNALIGN_TRAP; 14 | 15 | /* Set supervisor call (SVC) to priority 0 */ 16 | CPU_NVIC_SHCSR2 = 0; 17 | 18 | /* Set lowest priority for PendSV */ 19 | CPU_NVIC_SHCSR3 = (0xff << 16); 20 | } 21 | -------------------------------------------------------------------------------- /core/cortex-m0/include/math.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Math utility functions for ARMv6-M */ 7 | 8 | #ifndef __CROS_EC_MATH_H 9 | #define __CROS_EC_MATH_H 10 | 11 | #endif /* __CROS_EC_MATH_H */ 12 | -------------------------------------------------------------------------------- /core/cortex-m0/panic-internal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_PANIC_INTERNAL_H 7 | #define __CROS_EC_PANIC_INTERNAL_H 8 | 9 | void exception_panic(void) __attribute__((noreturn, naked)); 10 | 11 | #endif /* __CROS_EC_PANIC_INTERNAL_H */ 12 | -------------------------------------------------------------------------------- /core/host/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # emulator specific files build 7 | # 8 | 9 | CFLAGS_CPU=-fno-builtin 10 | 11 | core-y=main.o task.o timer.o panic.o disabled.o stack_trace.o 12 | -------------------------------------------------------------------------------- /core/host/cpu.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* CPU specific header file */ 7 | 8 | #ifndef __CROS_EC_CPU_H 9 | #define __CROS_EC_CPU_H 10 | 11 | static inline void cpu_init(void) { } 12 | 13 | #endif /* __CROS_EC_CPU_H */ 14 | -------------------------------------------------------------------------------- /core/host/disabled.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Disabled functions */ 7 | 8 | #define DISABLED(proto) proto { } 9 | 10 | DISABLED(void clock_init(void)); 11 | -------------------------------------------------------------------------------- /core/host/panic.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | #include "stack_trace.h" 10 | 11 | void panic_assert_fail(const char *msg, const char *func, const char *fname, 12 | int linenum) 13 | { 14 | fprintf(stderr, "ASSERTION FAIL: %s:%d:%s - %s\n", 15 | fname, linenum, func, msg); 16 | task_dump_trace(); 17 | 18 | puts("Fail!"); /* Inform test runner */ 19 | fflush(stdout); 20 | 21 | exit(1); 22 | } 23 | -------------------------------------------------------------------------------- /core/minute-ia/cpu.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Set up the LM2 mIA core 6 | */ 7 | 8 | #include 9 | 10 | 11 | void cpu_init(void) 12 | { 13 | /* Nothing to do now */ 14 | return; 15 | } 16 | -------------------------------------------------------------------------------- /core/minute-ia/cpu.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Registers map and definitions for mIA LM2 processor 6 | */ 7 | 8 | #ifndef __CROS_EC_CPU_H 9 | #define __CROS_EC_CPU_H 10 | 11 | 12 | void cpu_init(void); 13 | #endif /* __CROS_EC_CPU_H */ 14 | -------------------------------------------------------------------------------- /core/minute-ia/mpu.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* MPU module for ISH */ 7 | 8 | #include "mpu.h" 9 | #include "console.h" 10 | #include "registers.h" 11 | #include "task.h" 12 | #include "util.h" 13 | 14 | int mpu_pre_init(void) 15 | { 16 | return EC_SUCCESS; 17 | } 18 | -------------------------------------------------------------------------------- /core/nds32/__builtin.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "common.h" 7 | 8 | /* 9 | * __builtin_ffs: 10 | * Returns one plus the index of the least significant 1-bit of x, 11 | * or if x is zero, returns zero. 12 | */ 13 | int __keep __ffssi2(int x) 14 | { 15 | return 32 - __builtin_clz(x & -x); 16 | } 17 | -------------------------------------------------------------------------------- /core/nds32/__udivdi3.S: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * __udivdi3.S: unsigned 64 bit division 6 | */ 7 | 8 | .text 9 | .align 2 10 | .globl __udivdi3 11 | .type __udivdi3, @function 12 | __udivdi3: 13 | movi $r4, 0 ! ignore remainder 14 | b __udivmoddi4 15 | .size __udivdi3, .-__udivdi3 16 | -------------------------------------------------------------------------------- /core/nds32/config_core.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_CONFIG_CORE_H 7 | #define __CROS_EC_CONFIG_CORE_H 8 | 9 | /* Linker binary architecture and format */ 10 | #define BFD_ARCH nds32 11 | #define BFD_FORMAT "elf32-nds32le" 12 | 13 | #define CONFIG_SOFTWARE_PANIC 14 | 15 | /* 16 | * The Andestar v3m architecture has no CLZ/CTZ instructions (contrary to v3), 17 | * so let's use the software implementation. 18 | */ 19 | #define CONFIG_SOFTWARE_CLZ 20 | #define CONFIG_SOFTWARE_CTZ 21 | 22 | #endif /* __CROS_EC_CONFIG_CORE_H */ 23 | -------------------------------------------------------------------------------- /core/nds32/cpu.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Set up the N8 core 6 | */ 7 | 8 | #include "cpu.h" 9 | #include "registers.h" 10 | 11 | void cpu_init(void) 12 | { 13 | /* DLM initialization is done in init.S */ 14 | /* Global interrupt enable */ 15 | asm volatile ("setgie.e"); 16 | } 17 | -------------------------------------------------------------------------------- /core/nds32/include/math.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Math utility functions for N8 */ 7 | 8 | #ifndef __CROS_EC_MATH_H 9 | #define __CROS_EC_MATH_H 10 | 11 | float sqrtf(float x); 12 | float fabsf(float x); 13 | 14 | #endif /* __CROS_EC_MATH_H */ 15 | -------------------------------------------------------------------------------- /cts/README: -------------------------------------------------------------------------------- 1 | The first time you use this with a particular th, 2 | connect only th and run ./cts/cts.py --th from 3 | the ec directory. 4 | 5 | Then connect both boards and you can run 6 | ./cts/cts to flash both boards. -------------------------------------------------------------------------------- /cts/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | CFLAGS_CTS=-DCTS_MODULE -DCTS_TASKFILE=cts.tasklist 7 | 8 | ifeq "$(CTS_MODULE)" "gpio" 9 | CFLAGS_CTS+=-DCTS_MODULE_GPIO 10 | endif 11 | 12 | ifeq "$(CTS_MODULE)" "i2c" 13 | CFLAGS_CTS+=-DCTS_MODULE_I2C 14 | CONFIG_I2C=y 15 | ifneq ($(BOARD),stm32l476g-eval) 16 | CONFIG_I2C_MASTER=y 17 | endif 18 | endif 19 | 20 | cts-y+=common/cts_common.o 21 | 22 | ifeq ($(BOARD),stm32l476g-eval) 23 | cts-y+=$(CTS_MODULE)/th.o 24 | cts-y+=common/th_common.o 25 | else 26 | cts-y+=$(CTS_MODULE)/dut.o 27 | cts-y+=common/dut_common.o 28 | endif -------------------------------------------------------------------------------- /cts/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/cts/common/__init__.py -------------------------------------------------------------------------------- /cts/common/dut_common.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "cts_common.h" 7 | #include "gpio.h" 8 | #include "watchdog.h" 9 | 10 | enum cts_rc sync(void) 11 | { 12 | int input_level; 13 | 14 | gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 0); 15 | do { 16 | watchdog_reload(); 17 | input_level = gpio_get_level(GPIO_HANDSHAKE_INPUT); 18 | } while (!input_level); 19 | gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 1); 20 | do { 21 | watchdog_reload(); 22 | input_level = gpio_get_level(GPIO_HANDSHAKE_INPUT); 23 | } while (input_level); 24 | gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 0); 25 | 26 | return CTS_RC_SUCCESS; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /cts/hook/cts.testlist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* 7 | * Test HOOK_INIT 8 | */ 9 | CTS_TEST(test_init_hook,,,,) 10 | 11 | /* 12 | * Test HOOK_TICK and HOOK_SECOND 13 | */ 14 | CTS_TEST(test_ticks,,,,) 15 | 16 | /* 17 | * Test hook priority 18 | */ 19 | CTS_TEST(test_priority,,,,) 20 | 21 | /* 22 | * Test deferred calls 23 | */ 24 | CTS_TEST(test_deferred,,,,) -------------------------------------------------------------------------------- /cts/hook/th.c: -------------------------------------------------------------------------------- 1 | dut.c -------------------------------------------------------------------------------- /cts/i2c/cts.testlist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* 7 | * Test i2c write for 8, 16, and 32 bits. DUT runs as a master and TH 8 | * runs as a slave. 9 | */ 10 | CTS_TEST(write8_test,,,,) 11 | CTS_TEST(write16_test,,,,) 12 | CTS_TEST(write32_test,,,,) 13 | 14 | /* 15 | * Test i2c read for 8, 16, and 32 bits. DUT runs as a master and TH 16 | * runs as a slave. You need external pull-ups (10 kohms) on SDL and SDA 17 | * to make read16_test and read32_test pass. 18 | */ 19 | CTS_TEST(read8_test,,,,) 20 | CTS_TEST(read16_test,,,,) 21 | CTS_TEST(read32_test,,,,) -------------------------------------------------------------------------------- /cts/i2c/cts_i2c.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | enum cts_i2c_packets { 7 | WRITE8_OFF, 8 | WRITE16_OFF, 9 | WRITE32_OFF, 10 | READ8_OFF, 11 | READ16_OFF, 12 | READ32_OFF, 13 | }; 14 | 15 | #define WRITE8_DATA 0x42 16 | #define WRITE16_DATA 0x1234 17 | #define WRITE32_DATA 0xDEADBEEF 18 | #define READ8_DATA 0x23 19 | #define READ16_DATA 0xACED 20 | #define READ32_DATA 0x01ABCDEF 21 | -------------------------------------------------------------------------------- /cts/mutex/cts.testlist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* 7 | * Test mutex lock and unlock 8 | */ 9 | CTS_TEST(lock_unlock_test,,,,) -------------------------------------------------------------------------------- /cts/task/th.c: -------------------------------------------------------------------------------- 1 | dut.c -------------------------------------------------------------------------------- /cts/timer/cts.testlist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* 7 | * Test timer accuracy 8 | * 9 | * After sync, DUT and TH start counting down one second. After one second, 10 | * DUT raises GPIO level, which triggers an interrupt on TH. TH determines 11 | * whether the test passes or not based on how much more or less time elapsed 12 | * than one second. 13 | * 14 | * Requirements: 15 | * - Sync connection 16 | * - GPIO_OUTPUT connection for sending notification from DUT 17 | * - Calibrated TH timer 18 | */ 19 | CTS_TEST(timer_calibration_test,,,,) 20 | -------------------------------------------------------------------------------- /cts/timer/dut.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "common.h" 7 | #include "cts_common.h" 8 | #include "gpio.h" 9 | #include "task.h" 10 | #include "timer.h" 11 | #include "watchdog.h" 12 | 13 | static enum cts_rc timer_calibration_test(void) 14 | { 15 | gpio_set_flags(GPIO_OUTPUT_TEST, GPIO_ODR_HIGH); 16 | 17 | sync(); 18 | sleep(1); 19 | gpio_set_level(GPIO_OUTPUT_TEST, 0); 20 | 21 | return CTS_RC_SUCCESS; 22 | } 23 | 24 | #include "cts_testlist.h" 25 | 26 | void cts_task(void) 27 | { 28 | cts_main_loop(tests, "Timer"); 29 | task_wait_event(-1); 30 | } 31 | -------------------------------------------------------------------------------- /driver/als_isl29035.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Intersil ILS29035 light sensor driver 6 | */ 7 | 8 | #ifndef __CROS_EC_ALS_ISL29035_H 9 | #define __CROS_EC_ALS_ISL29035_H 10 | 11 | int isl29035_init(void); 12 | int isl29035_read_lux(int *lux, int af); 13 | 14 | #endif /* __CROS_EC_ALS_ISL29035_H */ 15 | -------------------------------------------------------------------------------- /driver/led/oz554.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * O2 Micro OZ554 LED driver. 6 | */ 7 | 8 | #ifndef __CROS_EC_OZ554_H 9 | #define __CROS_EC_OZ554_H 10 | 11 | #include "gpio.h" 12 | 13 | void oz554_board_init(void) __attribute__((weak)); 14 | 15 | /** 16 | * Update oz554 configuration array (oz554_conf). 17 | * 18 | * @param offset: Offset of the register to be set. 19 | * @param data: Value to be set. 20 | * @return EC_SUCCESS or EC_ERROR_* for errors. 21 | */ 22 | int oz554_set_config(int offset, int data); 23 | 24 | void backlight_enable_interrupt(enum gpio_signal signal); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /driver/sync.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Sync event driver. 6 | * Useful for recording the exact time a gpio interrupt happened in the 7 | * context of sensors. Originally created for a camera vsync signal. 8 | */ 9 | 10 | #ifndef __CROS_EC_VSYNC_H 11 | #define __CROS_EC_VSYNC_H 12 | 13 | extern const struct accelgyro_drv sync_drv; 14 | 15 | void sync_interrupt(enum gpio_signal signal); 16 | 17 | #endif /* __CROS_EC_VSYNC_H */ 18 | 19 | -------------------------------------------------------------------------------- /driver/tcpm/tusb422.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* TI TUSB422 Type-C port controller */ 7 | 8 | #ifndef __CROS_EC_USB_PD_TCPM_TUSB422_H 9 | #define __CROS_EC_USB_PD_TCPM_TUSB422_H 10 | 11 | /* I2C interface */ 12 | #define TUSB422_I2C_ADDR 0x40 13 | 14 | extern const struct tcpm_drv tusb422_tcpm_drv; 15 | 16 | #endif /* defined(__CROS_EC_USB_PD_TCPM_TUSB422_H) */ 17 | -------------------------------------------------------------------------------- /extra/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is for experiments only. It is not built automatically, 3 | required, supported, guaranteed to work, or necessarily well-documented. 4 | 5 | The contents may change without warning at any time. 6 | -------------------------------------------------------------------------------- /extra/ftdi_hostcmd/.gitignore: -------------------------------------------------------------------------------- 1 | test_cmds 2 | -------------------------------------------------------------------------------- /extra/ftdi_hostcmd/README: -------------------------------------------------------------------------------- 1 | 2 | Ubuntu Trusty uses an ancient version of libftdi. 3 | 4 | You'll probably want to grab the latest libftdi1-1.2.tar.bz2 from 5 | http://www.intra2net.com/en/developer/libftdi/ and install it into /usr 6 | instead. 7 | -------------------------------------------------------------------------------- /extra/lightbar/.gitignore: -------------------------------------------------------------------------------- 1 | lightbar 2 | -------------------------------------------------------------------------------- /extra/lightbar/programs/bad-decode-32.bin: -------------------------------------------------------------------------------- 1 | UUU -------------------------------------------------------------------------------- /extra/lightbar/programs/bad-decode-8.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /extra/lightbar/programs/bad-jump.bin: -------------------------------------------------------------------------------- 1 | ? -------------------------------------------------------------------------------- /extra/lightbar/programs/bad-opcode.bin: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /extra/lightbar/programs/green-pulse.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/green-pulse.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/green-pulse.lbs: -------------------------------------------------------------------------------- 1 | set.1 {0,1,2,3}.end.g 0xff 2 | delay.r 7813 3 | delay.w 2000000 4 | L0001: on 5 | cycle.1 6 | off 7 | wait 8 | jump L0001 9 | -------------------------------------------------------------------------------- /extra/lightbar/programs/infinite-jump.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /extra/lightbar/programs/infinite-jump.lbs: -------------------------------------------------------------------------------- 1 | L0001: jump L0001 2 | -------------------------------------------------------------------------------- /extra/lightbar/programs/konami.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/konami.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/rainbow-shift.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/rainbow-shift.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/rainbow-shift.lbs: -------------------------------------------------------------------------------- 1 | # The rainbow cycle program. 2 | set.rgb {0,1,2,3}.end 0xff 0xff 0xff 3 | set.rgb {0}.phase 0x00 0x55 0xaa 4 | set.rgb {1}.phase 0x40 0x95 0xea 5 | set.rgb {2}.phase 0x80 0xd5 0x2a 6 | set.rgb {3}.phase 0xc0 0x15 0x6a 7 | delay.r 7813 8 | cycle 9 | -------------------------------------------------------------------------------- /extra/lightbar/programs/red-green-blink.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/red-green-blink.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/red-green-blink.lbs: -------------------------------------------------------------------------------- 1 | # Blinks red and green with 1 second pauses. 2 | set.rgb {0,1,2,3}.beg 0xff 0x00 0x00 3 | set.rgb {0,1,2,3}.end 0x00 0xff 0x00 4 | delay.w 250000 5 | delay.r 0 6 | cycle.1 7 | wait 8 | ramp.1 9 | wait 10 | cycle.1 11 | wait 12 | ramp.1 13 | wait 14 | halt 15 | -------------------------------------------------------------------------------- /extra/lightbar/programs/s0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/s0.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/s0.lbs: -------------------------------------------------------------------------------- 1 | # S0 sequence: Google colors, unless battery is low. 2 | set.rgb {0}.end 0x33 0x69 0xe8 3 | set.rgb {1}.end 0xd5 0x0f 0x25 4 | set.rgb {2}.end 0xee 0xb2 0x11 5 | set.rgb {3}.end 0x00 0x99 0x25 6 | delay.r 1250 7 | ramp.1 8 | set.1 {0,1,2,3}.beg.r 0xff 9 | delay.r 2500 10 | delay.w 1000000 11 | wait 12 | jump L0003 13 | L0001: swap 14 | ramp.1 15 | L0002: wait 16 | L0003: jbat L0004 L0002 17 | jump L0002 18 | L0004: swap 19 | ramp.1 20 | L0005: wait 21 | jbat L0005 L0001 22 | jump L0001 23 | -------------------------------------------------------------------------------- /extra/lightbar/programs/s0s3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/s0s3.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/s0s3.lbs: -------------------------------------------------------------------------------- 1 | # S0S3 sequence: Fade out, Google color ramp up/down. 2 | get 3 | delay.r 2000 4 | ramp.1 5 | swap 6 | set.rgb {0}.end 0x33 0x69 0xe8 7 | set.rgb {1}.end 0xd5 0x0f 0x25 8 | set.rgb {2}.end 0xee 0xb2 0x11 9 | set.rgb {3}.end 0x00 0x99 0x25 10 | delay.r 1250 11 | ramp.1 12 | swap 13 | delay.r 10000 14 | ramp.1 15 | off 16 | halt 17 | -------------------------------------------------------------------------------- /extra/lightbar/programs/s3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/s3.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/s3.lbs: -------------------------------------------------------------------------------- 1 | # S3 sequence: Pulse red on low battery. 2 | set.rgb {0,1,2,3}.end 0xff 0x00 0x00 3 | cycle.1 4 | delay.w 5000000 5 | L0001: off 6 | wait 7 | jcharge L0001 8 | jbat L0002 L0001 9 | jump L0001 10 | L0002: on 11 | delay.r 1250 12 | ramp.1 13 | swap 14 | delay.r 10000 15 | ramp.1 16 | swap 17 | jump L0001 18 | -------------------------------------------------------------------------------- /extra/lightbar/programs/s3s0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/lightbar/programs/s3s0.bin -------------------------------------------------------------------------------- /extra/lightbar/programs/s3s0.lbs: -------------------------------------------------------------------------------- 1 | # S3S0 sequence: Google color ramp up/down. 2 | set.rgb {0}.end 0x33 0x69 0xe8 3 | set.rgb {1}.end 0xd5 0x0f 0x25 4 | set.rgb {2}.end 0xee 0xb2 0x11 5 | set.rgb {3}.end 0x00 0x99 0x25 6 | delay.r 1250 7 | ramp.1 8 | swap 9 | delay.r 10000 10 | ramp.1 11 | halt 12 | -------------------------------------------------------------------------------- /extra/rma_reset/.gitignore: -------------------------------------------------------------------------------- 1 | base32.o 2 | curve25519-generic.o 3 | curve25519.o 4 | rma_reset 5 | sha256.o 6 | -------------------------------------------------------------------------------- /extra/rma_reset/board.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_BOARD_H 7 | #define __CROS_EC_BOARD_H 8 | 9 | #define CONFIG_RNG 10 | 11 | #endif /* __CROS_EC_BOARD_H */ 12 | -------------------------------------------------------------------------------- /extra/sps_errs/.gitignore: -------------------------------------------------------------------------------- 1 | prog 2 | -------------------------------------------------------------------------------- /extra/sps_errs/README: -------------------------------------------------------------------------------- 1 | SETUP: 2 | 3 | Attach an EC to the build host using an FTDI USB-to-SPI adapter. 4 | 5 | BUILD: 6 | 7 | make 8 | ./prog 9 | 10 | 11 | USAGE: 12 | 13 | Usage: ./prog [-v] [-c BYTES] 14 | 15 | This sends a EC_CMD_HELLO host command. The -c option can 16 | be used to truncate the exchange early, to see how the EC 17 | deals with the interruption. 18 | 19 | NOTE: 20 | 21 | Ubuntu Trusty uses an ancient version of libftdi. 22 | 23 | If building outside of the Chromium chroot, you'll probably want to grab the 24 | latest libftdi1-1.2.tar.bz2 from 25 | 26 | http://www.intra2net.com/en/developer/libftdi/ 27 | 28 | and install it into /usr instead. 29 | -------------------------------------------------------------------------------- /extra/stack_analyzer/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | # Discover all the unit tests in extra/stack_analyzer directory and run them. 8 | python2 -m unittest discover -b -s extra/stack_analyzer -p *_unittest.py \ 9 | && touch extra/stack_analyzer/.tests-passed 10 | -------------------------------------------------------------------------------- /extra/tigertool/README.md: -------------------------------------------------------------------------------- 1 | # tigertool 2 | 3 | tigertool.py is a commandline utility to control the tigertail USB-C mux. 4 | It supports changing the mux status to port A, B, or off. 5 | You can set a serial number to use multiple tigertails at once. 6 | 7 | ## Usage 8 | Typical usage to set the mux port
9 | ```./tigertail.py -m [A|B|off] -s [serialno]```
10 | 11 | Reboot the tigertail
12 | ```./tigertail.py --reboot```
13 | 14 | Set the serial number, when only one tigertail is plugged
15 | ```./tigertail.py --setserialno=[serialno]```
16 | 17 | Tigertail can support up to 20V 3A on the mux and passes through all 18 | USB-C lines except SBU. 19 | -------------------------------------------------------------------------------- /extra/tigertool/ecusb/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | __all__ = ['tiny_servo_common', 'stm32usb', 'stm32uart', 'pty_driver'] 6 | -------------------------------------------------------------------------------- /extra/usb_console/.gitignore: -------------------------------------------------------------------------------- 1 | usb_console 2 | -------------------------------------------------------------------------------- /extra/usb_gpio/.gitignore: -------------------------------------------------------------------------------- 1 | usb_gpio 2 | -------------------------------------------------------------------------------- /extra/usb_power/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EttusResearch/usrp-firmware/cde203544515d0d1fd10409431f53a28e10f39a7/extra/usb_power/__init__.py -------------------------------------------------------------------------------- /extra/usb_power/board/kevin/kevin_all.scenario: -------------------------------------------------------------------------------- 1 | [ 2 | "pp5000", 3 | "ppvar_gpu", 4 | "pp3300_wifi_bt", 5 | "pp1500_ap_io", 6 | "pp3300_alw", 7 | "ppvar_litcpu", 8 | "pp1800_s0", 9 | "pp3300_haven", 10 | "ppvar_bigcpu", 11 | "pp900_ap", 12 | "pp1800_ec", 13 | "pp1800_sensor", 14 | "pp1800_alw", 15 | "pp1200_lpddr", 16 | "pp3300_ec", 17 | "pp3300_s0" 18 | ] 19 | -------------------------------------------------------------------------------- /extra/usb_power/board/marlin/marlin_all_A.scenario: -------------------------------------------------------------------------------- 1 | [ "VBAT", 2 | "VDD_MEM", 3 | "VDD_EBI_PHY", 4 | "VDD_PCIE_1P8", 5 | "VDD_PCIE_CORE", 6 | "VDD_MIPI_CSI", 7 | "VDD_A1", 8 | "VDD_A2", 9 | "VDD_P2", 10 | "VDD_P5", 11 | "VDD_P6", 12 | "VDD_P10", 13 | "VDD_P12", 14 | "VDD_USB_HS_3P1", 15 | "VDD_CORE", 16 | "VDD_GFX", 17 | "VDD_MODEM", 18 | "VDD_APC", 19 | "VDD_P1", 20 | "VDD_SSC_CORE", 21 | "VDD_SSC_MEM", 22 | "V_EMMC_2V95", 23 | "V_LED_3V3", 24 | "V_SR_2V85", 25 | "V_USBSS_SW_1V8", 26 | "V_RF_2V7", 27 | "V_TP_3V3", 28 | "VCI_3V", 29 | "VDD_1V8_PANEL", 30 | "V_TP_1V8", 31 | "V_CAM2_D1V2", 32 | "V_CAMIO_1V8", 33 | "V_CAM1_D1V0", 34 | "VBAT_ADC_IN", 35 | "VDD_MIC_BIAS", 36 | "PVDD/VDD", 37 | "V_DCIN", 38 | "V_AUDIO_2V15", 39 | "V_AUDIO_1V3", 40 | "VDD_RF1_TVCO", 41 | "V_GPS_1V8", 42 | "VDD_FEM"] 43 | -------------------------------------------------------------------------------- /extra/usb_power/board/marlin/marlin_all_B.scenario: -------------------------------------------------------------------------------- 1 | [ "VBAT_", 2 | "VDD_P3", 3 | "VDD_DDR_CORE_1P8", 4 | "VCCQ2", 5 | "VDD/VDDIO", 6 | "VDD/VIO", 7 | "V_SRIO_1V8", 8 | "V_SRIO_1V8_", 9 | "VBAT/VDD/VDDA", 10 | "V_SRIO_1V8__", 11 | "", 12 | "V_ELVDD", 13 | "V_AVDD", 14 | "V_CAM1_VCM2V85", 15 | "V_CAM1_A2V85", 16 | "V_CAMIO_1V8_", 17 | "VDD_RX", 18 | "VBATT", 19 | "VCC_GSM", 20 | "VCC1_3G", 21 | "VAPT", 22 | "VCC1", 23 | "VPA_BATT", 24 | "VDD33", 25 | "DVDD11", 26 | "VDD(PAD)", 27 | "VBAT/VBAT2/VDD(UP)", 28 | "NFC_5V_BOOST" ] 29 | -------------------------------------------------------------------------------- /extra/usb_power/board/marlin/marlin_common.scenario: -------------------------------------------------------------------------------- 1 | ["VBAT", "VDD_MEM", "VDD_EBI_PHY", "VDD_PCIE_1P8", "VDD_PCIE_CORE", "VDD_MIPI_CSI", "VDD_A1", "VDD_CORE", "VDD_GFX", "VDD_MODEM", "VDD_APC", "VDD_P1", "VDD_SSC_CORE", "VDD_SSC_MEM", "VDD_1V8_PANEL", "V_CAM2_D1V2", "VBAT_ADC_IN", "VDD_FEM"] 2 | -------------------------------------------------------------------------------- /extra/usb_power/board/marlin/marlin_pvc.scenario: -------------------------------------------------------------------------------- 1 | ["VBAT", ["VBAT", "BUSV"], ["VBAT", "CURRENT"], ["VBAT", "SHUNTV"]] 2 | -------------------------------------------------------------------------------- /extra/usb_power/board/marlin/marlin_short.scenario: -------------------------------------------------------------------------------- 1 | ["VBAT", "VDD_MEM", "VDD_CORE", "VDD_GFX", "VDD_1V8_PANEL"] 2 | -------------------------------------------------------------------------------- /extra/usb_power/board/marlin/marlin_vbat.scenario: -------------------------------------------------------------------------------- 1 | ["VBAT"] 2 | -------------------------------------------------------------------------------- /extra/usb_power/marlin_v.scenario: -------------------------------------------------------------------------------- 1 | [["VBAT", "BUSV"], ["VDD_1V8_PANEL", "BUSV"], ["V_EMMC_2V95", "BUSV"], ["V_SR_2V85", "BUSV"], ["V_USBSS_SW_1V8", "BUSV"], ["V_AUDIO_2V15", "BUSV"]] 2 | -------------------------------------------------------------------------------- /extra/usb_serial/.gitignore: -------------------------------------------------------------------------------- 1 | .built-in.o.cmd 2 | .raiden.ko.cmd 3 | .raiden.mod.o.cmd 4 | .raiden.o.cmd 5 | .tmp_versions/ 6 | Module.symvers 7 | built-in.o 8 | modules.order 9 | raiden.ko 10 | raiden.mod.c 11 | raiden.mod.o 12 | raiden.o 13 | -------------------------------------------------------------------------------- /extra/usb_serial/51-google-serial-fallback.rules: -------------------------------------------------------------------------------- 1 | # 2 | # Add USB VID/PID for usb-serial compatible CCD devices. This is a fallback 3 | # rule that can be used if the raiden module can't be built, or used for some 4 | # reason. 5 | # 6 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="18d1", ENV{ID_USB_INTERFACES}=="*:ff5001:*", RUN+="add_usb_serial_id $attr{idVendor} $attr{idProduct}" 7 | -------------------------------------------------------------------------------- /extra/usb_serial/Makefile: -------------------------------------------------------------------------------- 1 | obj-m := raiden.o 2 | 3 | .PHONY: all 4 | 5 | all: modules 6 | 7 | .DEFAULT: 8 | $(MAKE) -C /lib/modules/$(shell uname -r)/build \ 9 | M=$(shell pwd) \ 10 | $(MAKECMDGOALS) 11 | -------------------------------------------------------------------------------- /extra/usb_serial/README.md: -------------------------------------------------------------------------------- 1 | Case Closed Debugging Serial Consoles over USB 2 | ============================================== 3 | 4 | Please see the documentation in `../../docs/case_closed_debugging.md`. 5 | -------------------------------------------------------------------------------- /extra/usb_updater/.gitignore: -------------------------------------------------------------------------------- 1 | generated_version.h 2 | gsctool 3 | usb_updater2 4 | *.d 5 | *.o 6 | dp -------------------------------------------------------------------------------- /extra/usb_updater/ecusb: -------------------------------------------------------------------------------- 1 | ../tigertool/ecusb/ -------------------------------------------------------------------------------- /extra/usb_updater/servo_micro.json: -------------------------------------------------------------------------------- 1 | { 2 | "Comment": "This file describes the updateable sections of the flash.", 3 | "board": "servo_micro", 4 | "vid": "0x18d1", 5 | "pid": "0x501a", 6 | "console": "3", 7 | "Comment on flash": "This is the base address of writeable flash", 8 | "flash": "0x8000000", 9 | "Comment on region format": "name: [baseoffset, length]", 10 | "regions": { 11 | "RW": ["0x10000", "0x10000"], 12 | "PSTATE": ["0xf000", "0x1000"], 13 | "RO": ["0x0000", "0xf000"] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /extra/usb_updater/servo_v4.json: -------------------------------------------------------------------------------- 1 | { 2 | "Comment": "This file describes the updateable sections of the flash.", 3 | "board": "servo_v4", 4 | "vid": "0x18d1", 5 | "pid": "0x501b", 6 | "console": "0", 7 | "Comment on flash": "This is the base address of writeable flash", 8 | "flash": "0x8000000", 9 | "Comment on region format": "name: [baseoffset, length]", 10 | "regions": { 11 | "RW": ["0x10000", "0x10000"], 12 | "PSTATE": ["0xf000", "0x1000"], 13 | "RO": ["0x0000", "0xf000"] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /extra/usb_updater/sweetberry.json: -------------------------------------------------------------------------------- 1 | { 2 | "Comment": "This file describes the updateable sections of the flash.", 3 | "board": "sweetberry", 4 | "vid": "0x18d1", 5 | "pid": "0x5020", 6 | "console": "0", 7 | "Comment on flash": "This is the base address of writeable flash", 8 | "flash": "0x8000000", 9 | "Comment on region format": "name: [baseoffset, length]", 10 | "regions": { 11 | "RW": ["0x40000", "0x40000"], 12 | "RO": ["0x0000", "0x40000"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fuzz/cr50_fuzz.owners: -------------------------------------------------------------------------------- 1 | # Emails to CC on clusterfuzz bugs for this target: 2 | allenwebb@google.com 3 | mnissler@google.com 4 | rspangler@chromium.org 5 | vbendeb@chromium.org 6 | -------------------------------------------------------------------------------- /fuzz/cr50_fuzz.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /fuzz/host_command_fuzz.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /fuzz/usb_pd_fuzz.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \ 19 | TASK_TEST(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE) 20 | -------------------------------------------------------------------------------- /include/aes-gcm.h: -------------------------------------------------------------------------------- 1 | ../third_party/boringssl/include/aes-gcm.h -------------------------------------------------------------------------------- /include/aes.h: -------------------------------------------------------------------------------- 1 | ../third_party/boringssl/include/aes.h -------------------------------------------------------------------------------- /include/ap_hang_detect.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Power button API for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_AP_HANG_DETECT_H 9 | #define __CROS_EC_AP_HANG_DETECT_H 10 | 11 | #include "common.h" 12 | 13 | /** 14 | * If the hang detect timers were started and can be stopped by any host 15 | * command, stop them. This is intended to be called by the the host command 16 | * module. 17 | */ 18 | void hang_detect_stop_on_host_command(void); 19 | 20 | #endif /* __CROS_EC_AP_HANG_DETECT_H */ 21 | -------------------------------------------------------------------------------- /include/base_state.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * Return 1 if base attached, 0 otherwise. 8 | */ 9 | int base_get_state(void); 10 | 11 | /** 12 | * Sets the current state of the base, with 0 meaning detached, 13 | * and non-zero meaning attached. 14 | */ 15 | void base_set_state(int state); 16 | 17 | /** 18 | * Call board specific base_force_state function. 19 | * Force the current state of the base, with 0 meaning detached, 20 | * 1 meaning attached and 2 meaning reset to the original state. 21 | */ 22 | void base_force_state(int state); 23 | -------------------------------------------------------------------------------- /include/battery_bq27621_g1.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Battery driver for BQ27621-G1 6 | */ 7 | 8 | /* Sets percent to the battery life as a percentage (0-100) 9 | * 10 | * Returns EC_SUCCESS on success. 11 | */ 12 | int bq27621_state_of_charge(int *percent); 13 | 14 | /* Initializes the fuel gauge with the constants for the battery. 15 | * 16 | * Returns EC_SUCCESS on success. 17 | */ 18 | int bq27621_init(void); 19 | 20 | -------------------------------------------------------------------------------- /include/byteorder.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_INCLUDE_BYTEORDER_H 7 | #define __EC_INCLUDE_BYTEORDER_H 8 | 9 | #include 10 | 11 | #endif /* __EC_INCLUDE_BYTEORDER_H */ 12 | -------------------------------------------------------------------------------- /include/capsense.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_CAPSENSE_H 7 | #define __CROS_EC_CAPSENSE_H 8 | 9 | #include "common.h" 10 | #include "gpio.h" 11 | 12 | void capsense_interrupt(enum gpio_signal signal); 13 | 14 | #endif /* __CROS_EC_CAPSENSE_H */ 15 | -------------------------------------------------------------------------------- /include/case_closed_debug.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Case Closed Debug interface 6 | */ 7 | #ifndef __CROS_EC_CASE_CLOSED_DEBUG_H 8 | #define __CROS_EC_CASE_CLOSED_DEBUG_H 9 | 10 | /** 11 | * Return non-zero if the CCD external interface is enabled. 12 | */ 13 | int ccd_ext_is_enabled(void); 14 | 15 | #endif /* __CROS_EC_CASE_CLOSED_DEBUG_H */ 16 | -------------------------------------------------------------------------------- /include/charger_detect.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | /* Detect what adapter is connected */ 6 | 7 | #ifndef __CROS_CHARGER_DETECT_H 8 | #define __CROS_CHARGER_DETECT_H 9 | 10 | /* 11 | * Get attached device type. 12 | * 13 | * @return CHARGE_SUPPLIER_BC12_* or 0 if the device type was not detected 14 | */ 15 | int charger_detect_get_device_type(void); 16 | 17 | #endif /* __CROS_CHARGER_DETECT_H */ 18 | -------------------------------------------------------------------------------- /include/ec_ec_comm_slave.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * EC-EC communication, functions and definition for slave. 6 | */ 7 | 8 | #ifndef EC_EC_COMM_SLAVE_H_ 9 | #define EC_EC_COMM_SLAVE_H_ 10 | 11 | #include 12 | #include "consumer.h" 13 | #include "queue.h" 14 | 15 | extern struct queue const ec_ec_comm_slave_input; 16 | extern struct queue const ec_ec_comm_slave_output; 17 | 18 | void ec_ec_comm_slave_written(struct consumer const *consumer, size_t count); 19 | 20 | #endif /* EC_EC_COMM_SLAVE_H_ */ 21 | -------------------------------------------------------------------------------- /include/extpower.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* External power detection API for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_EXTPOWER_H 9 | #define __CROS_EC_EXTPOWER_H 10 | 11 | #include "common.h" 12 | 13 | /** 14 | * Return non-zero if external power is present. 15 | */ 16 | int extpower_is_present(void); 17 | 18 | /** 19 | * Interrupt handler for external power GPIOs. 20 | * 21 | * @param signal Signal which triggered the interrupt. 22 | */ 23 | void extpower_interrupt(enum gpio_signal signal); 24 | 25 | #endif /* __CROS_EC_EXTPOWER_H */ 26 | -------------------------------------------------------------------------------- /include/gpio_signal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_GPIO_SIGNAL_H 7 | #define __CROS_EC_GPIO_SIGNAL_H 8 | 9 | #define GPIO(name, pin, flags) GPIO_##name, 10 | #define UNIMPLEMENTED(name) GPIO_##name, 11 | #define GPIO_INT(name, pin, flags, signal) GPIO_##name, 12 | 13 | enum gpio_signal { 14 | #include "gpio.wrap" 15 | GPIO_COUNT 16 | }; 17 | 18 | #endif /* __CROS_EC_GPIO_SIGNAL_H */ 19 | -------------------------------------------------------------------------------- /include/inductive_charging.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Inductive charging control */ 7 | 8 | #include "gpio.h" 9 | 10 | #ifndef __CROS_EC_INDUCTIVE_CHARGING_H 11 | #define __CROS_EC_INDUCTIVE_CHARGING_H 12 | 13 | /* 14 | * Interrupt handler for inductive charging signal. 15 | * 16 | * @param signal Signal which triggered the interrupt. 17 | */ 18 | void inductive_charging_interrupt(enum gpio_signal); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/lid_switch.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Lid switch API for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_LID_SWITCH_H 9 | #define __CROS_EC_LID_SWITCH_H 10 | 11 | #include "common.h" 12 | 13 | /** 14 | * Return non-zero if lid is open. 15 | * 16 | * Uses the debounced lid state, not the raw signal from the GPIO. 17 | */ 18 | int lid_is_open(void); 19 | 20 | /** 21 | * Interrupt handler for lid switch. 22 | * 23 | * @param signal Signal which triggered the interrupt. 24 | */ 25 | void lid_interrupt(enum gpio_signal signal); 26 | 27 | #endif /* __CROS_EC_LID_SWITCH_H */ 28 | -------------------------------------------------------------------------------- /include/memory_commands.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Memory commands for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_MEMORY_COMMANDS_H 9 | #define __CROS_EC_MEMORY_COMMANDS_H 10 | 11 | #include "common.h" 12 | 13 | /* Initializes the module. */ 14 | int memory_commands_init(void); 15 | 16 | #endif /* __CROS_EC_MEMORY_COMMANDS_H */ 17 | -------------------------------------------------------------------------------- /include/nvcounter.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_INCLUDE_NVCOUNTER_H 7 | #define __EC_INCLUDE_NVCOUNTER_H 8 | 9 | /* 10 | * CONFIG_FLASH_NVCOUNTER provides a robust, non-volatile incrementing counter. 11 | * 12 | * It is currently uses 2 physical pages of flash for its underlying storage 13 | * which are configured by CONFIG_FLASH_NVCTR_BASE_A and 14 | * CONFIG_FLASH_NVCTR_BASE_B in board.h 15 | */ 16 | 17 | /* return the value of the counter after incrementing it */ 18 | uint32_t nvcounter_incr(void); 19 | 20 | #endif /* __EC_INCLUDE_NVCOUNTER_H */ 21 | -------------------------------------------------------------------------------- /include/stack_trace.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Trace dump module */ 7 | 8 | #ifndef __CROS_EC_STACK_TRACE_H 9 | #define __CROS_EC_STACK_TRACE_H 10 | 11 | #ifdef EMU_BUILD 12 | /* 13 | * Register trace dump handler for emulator. Trace dump is printed to stderr 14 | * when SIGUSR2 is received. 15 | */ 16 | void task_register_tracedump(void); 17 | 18 | /* Dump current stack trace */ 19 | void task_dump_trace(void); 20 | #else 21 | static inline void task_register_tracedump(void) { } 22 | static inline void task_dump_trace(void) { } 23 | #endif 24 | 25 | #endif /* __CROS_EC_STACK_TRACE_H */ 26 | -------------------------------------------------------------------------------- /include/switch.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Switch module for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_SWITCH_H 9 | #define __CROS_EC_SWITCH_H 10 | 11 | #include "common.h" 12 | #include "gpio.h" 13 | 14 | #ifdef CONFIG_SWITCH 15 | /** 16 | * Interrupt handler for switch inputs. 17 | * 18 | * @param signal Signal which triggered the interrupt. 19 | */ 20 | void switch_interrupt(enum gpio_signal signal); 21 | #else 22 | static inline void switch_interrupt(enum gpio_signal signal) { } 23 | #endif /* !CONFIG_SWITCH */ 24 | 25 | #endif /* __CROS_EC_SWITCH_H */ 26 | -------------------------------------------------------------------------------- /include/temp_sensor_chip.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Temperature sensor module for LM4 chip */ 7 | 8 | #ifndef __CROS_EC_TEMP_SENSOR_CHIP_H 9 | #define __CROS_EC_TEMP_SENSOR_CHIP_H 10 | 11 | /** 12 | * Get the last polled value of the sensor. 13 | * 14 | * @param idx Sensor index to read. 15 | * @param temp_ptr Destination for temperature in K. 16 | * 17 | * @return EC_SUCCESS if successful, non-zero if error. 18 | */ 19 | int chip_temp_sensor_get_val(int idx, int *temp_ptr); 20 | 21 | #endif /* __CROS_EC_TEMP_SENSOR_CHIP_H */ 22 | -------------------------------------------------------------------------------- /include/thermal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Thermal engine module for Chrome EC */ 7 | 8 | #ifndef __CROS_EC_THERMAL_H 9 | #define __CROS_EC_THERMAL_H 10 | 11 | /* The thermal configuration for a single temp sensor is defined here. */ 12 | #include "ec_commands.h" 13 | 14 | /* We need to to hold a config for each board's sensors. Not const, so we can 15 | * tweak it at run-time if we have to. 16 | */ 17 | extern struct ec_thermal_config thermal_params[]; 18 | 19 | /* Helper function to compute percent cooling */ 20 | int thermal_fan_percent(int low, int high, int cur); 21 | 22 | #endif /* __CROS_EC_THERMAL_H */ 23 | -------------------------------------------------------------------------------- /include/touchpad.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_TOUCHPAD_H 7 | #define __CROS_EC_TOUCHPAD_H 8 | 9 | void touchpad_interrupt(enum gpio_signal signal); 10 | 11 | /* Reset the touchpad, mainly used to recover it from malfunction. */ 12 | void board_touchpad_reset(void); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/tpm_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_TPM_LOG_H 7 | #define __CROS_EC_TPM_LOG_H 8 | 9 | #include "event_log.h" 10 | 11 | enum tpm_event { 12 | TPM_EVENT_INIT, 13 | TPM_I2C_RESET, 14 | }; 15 | 16 | /* Log TPM event of given type with data payload. */ 17 | void tpm_log_event(enum tpm_event type, uint16_t data); 18 | 19 | #endif /* __CROS_EC_TPM_LOG_H */ 20 | -------------------------------------------------------------------------------- /include/tpm_nvmem.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * TPM NVMEM definitions. 6 | */ 7 | #ifndef __CROS_EC_TPM_NVMEM_H 8 | #define __CROS_EC_TPM_NVMEM_H 9 | 10 | #define FIRMWARE_NV_INDEX 0x1007 11 | #define FWMP_NV_INDEX 0x100a 12 | 13 | #endif /* __CROS_EC_TPM_NVMEM_H */ 14 | -------------------------------------------------------------------------------- /include/vec3.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Header file for common math functions. */ 7 | #ifndef __CROS_EC_VEC_3_H 8 | #define __CROS_EC_VEC_3_H 9 | 10 | #include "math_util.h" 11 | 12 | typedef float floatv3_t[3]; 13 | typedef fp_t fpv3_t[3]; 14 | 15 | void fpv3_scalar_mul(fpv3_t v, fp_t c); 16 | fp_t fpv3_dot(const fpv3_t v, const fpv3_t w); 17 | fp_t fpv3_norm_squared(const fpv3_t v); 18 | fp_t fpv3_norm(const fpv3_t v); 19 | #endif /* __CROS_EC_VEC_3_H */ 20 | -------------------------------------------------------------------------------- /include/vec4.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __CROS_EC_VEC_4_H 7 | 8 | #define __CROS_EC_VEC_4_H 9 | 10 | #include "math_util.h" 11 | 12 | typedef float floatv4_t[4]; 13 | typedef fp_t fpv4_t[4]; 14 | 15 | #endif /* __CROS_EC_VEC_4_H */ 16 | 17 | -------------------------------------------------------------------------------- /test/aes.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/base32.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/battery_get_params_smart.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/bklight_lid.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/bklight_passthru.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/button.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/cec.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Test the buffer handling of HDMI CEC 6 | */ 7 | 8 | /** 9 | * List of enabled tasks in the priority order 10 | * 11 | * The first one has the lowest priority. 12 | * 13 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 14 | * 'n' in the name of the task 15 | * 'r' in the main routine of the task 16 | * 'd' in an opaque parameter passed to the routine at startup 17 | * 's' is the stack size in bytes; must be a multiple of 8 18 | */ 19 | #define CONFIG_TEST_TASK_LIST /* No test task */ 20 | -------------------------------------------------------------------------------- /test/charge_manager.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/charge_manager_drp_charging.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/charge_ramp.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(CHG_RAMP, chg_ramp_task, NULL, SMALLER_TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/console_edit.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/crc32.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/entropy.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/extpwr_gpio.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/fan.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/flash.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(TEST, task_test, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/float.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/fp.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/hooks.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/host_command.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/inductive_charging.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/interrupt.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/kb_mkbp.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(KEYSCAN, keyboard_scan_task, NULL, 256) \ 19 | TASK_TEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) 20 | -------------------------------------------------------------------------------- /test/lid_sw.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/lightbar.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(LIGHTBAR, lightbar_task, NULL, LARGER_TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/math_util.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/motion_lid.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/nvmem.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(NV_1, nvmem_first_task, NULL, 384) \ 19 | TASK_TEST(NV_2, nvmem_second_task, NULL, 384) 20 | -------------------------------------------------------------------------------- /test/nvmem_vars.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/pinweaver.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/power_button.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/powerdemo.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Power state machine demo module for Chrome EC */ 7 | 8 | #ifndef __TEST_POWERDEMO_H 9 | #define __TEST_POWERDEMO_H 10 | 11 | #include "common.h" 12 | 13 | /* Initializes the module. */ 14 | int power_demo_init(void); 15 | 16 | #endif /* __TEST_POWERDEMO_H */ 17 | -------------------------------------------------------------------------------- /test/powerdemo.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(POWERDEMO, power_demo_task, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/queue.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/rma_auth.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/rsa.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/rsa3.tasklist: -------------------------------------------------------------------------------- 1 | rsa.tasklist -------------------------------------------------------------------------------- /test/rtc.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/sbs_charging_v2.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ 19 | TASK_TEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) 20 | -------------------------------------------------------------------------------- /test/sha256.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /test/sha256_unrolled.tasklist: -------------------------------------------------------------------------------- 1 | sha256.tasklist -------------------------------------------------------------------------------- /test/shmalloc.tasklist: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium OS Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | /** 8 | * List of enabled tasks in the priority order 9 | * 10 | * The first one has the lowest priority. 11 | * 12 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 13 | * 'n' in the name of the task 14 | * 'r' in the main routine of the task 15 | * 'd' in an opaque parameter passed to the routine at startup 16 | * 's' is the stack size in bytes; must be a multiple of 8 17 | */ 18 | #define CONFIG_TEST_TASK_LIST 19 | 20 | -------------------------------------------------------------------------------- /test/stress.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/system.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/test-matrix.bin: -------------------------------------------------------------------------------- 1 | :;0D1 2 | d>"A#( C =@V B)<?  +a !%$' & ,./-32*5 4 9   3 |  4 | 8 l j6  g i -------------------------------------------------------------------------------- /test/thermal.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/timer_calib.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(TESTTMR, timer_calib_task, NULL, TASK_STACK_SIZE) 19 | -------------------------------------------------------------------------------- /test/timer_jump.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/tpm_test/ftdi_spi_tpm.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_TEST_TPM_TEST_FTDI_SPI_TPM_H 7 | #define __EC_TEST_TPM_TEST_FTDI_SPI_TPM_H 8 | 9 | #include "mpsse.h" 10 | 11 | /* 12 | * This structure allows to convert string representation between C and 13 | * Python. 14 | */ 15 | struct swig_string_data { 16 | int size; 17 | uint8_t *data; 18 | }; 19 | 20 | int FtdiSpiInit(uint32_t freq, int enable_debug); 21 | void FtdiStop(void); 22 | struct swig_string_data FtdiSendCommandAndWait(char *tpm_command, 23 | int command_size); 24 | 25 | #endif /* ! __EC_TEST_TPM_TEST_FTDI_SPI_TPM_H */ 26 | -------------------------------------------------------------------------------- /test/tpm_test/rsa768.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBywIBAAJhALDb7UbZMvB81CAj0jVahhfbJHI2MzvCZIukSW50/vrSggzEEjpI 3 | Z+EVzJTfRBtOwBi6RhtRLOIPwDJ37V+L5aMA5jwtpxCJU6grM3Q49zYA/d1bvXvB 4 | fOF1kCt4LTmFaQIDAQABAmEArq25UCWMG1yfQtM+dnXfRUarW6bOuXJJTmbIJDGn 5 | +WHbEvLBMhF7kCOwuUU/Bl2i1zUP3fwD342Ra4P5We5nHhognov49uKy9SlxTCJU 6 | z36XvHAk3W1S/hfZ1kF7dkABAjEA1glkyPNcAsfGR05/Q50xRnozhaCkFuoie81k 7 | m1Dspy9+z+tpKTSOt7Wzun+bAX1pAjEA04iSLdXGKfTwLmHwYK2pRhGpDGkUMQk2 8 | i3AbEZsmOTQ0/fGaiVFjCsZgC7oYjsgBAjA8oMSPt3+kufoMUMvz1x8SG6NkgrB4 9 | XTIPZ4rMBAxE/0sokkJjjaOvniSe+25o6aECMQCG3oedM7SSIbpVSFqTuYW4yB/J 10 | auHV1fLx+ns3wX0gcdnro3SNYtfMEelA8NkhiAECMGVIqAN9qpGW5qAyikDrmzod 11 | 7+wMrWHefpWKsih4+MIvAo7WOOoM+1UasRwVGhMxFQ== 12 | -----END RSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /test/tpm_test/subcmd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | """Subcommand codes that specify the crypto module.""" 7 | 8 | # Keep these codes in sync with include/extension.h. 9 | AES = 0 10 | HASH = 1 11 | RSA = 2 12 | ECC = 3 13 | FW_UPGRADE = 4 14 | HKDF = 5 15 | ECIES = 6 16 | 17 | # The same exception class used by all tpmtest modules. 18 | class TpmTestError(Exception): 19 | pass 20 | -------------------------------------------------------------------------------- /test/tpm_test/testlib/common.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "common.h" 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | void rand_bytes(void *buf, size_t num) 15 | { 16 | assert(RAND_bytes(buf, num) == 1); 17 | } 18 | -------------------------------------------------------------------------------- /test/tpm_test/testlib/common.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef __EC_TEST_TPM_TEST_TESTLIB_COMMON_H 7 | #define __EC_TEST_TPM_TEST_TESTLIB_COMMON_H 8 | 9 | #include "dcrypto.h" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | void rand_bytes(void *buf, size_t num); 16 | 17 | #endif /* ! __EC_TEST_TPM_TEST_TESTLIB_COMMON_H */ 18 | 19 | -------------------------------------------------------------------------------- /test/tpm_test/testlib/trng.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Dummy empty file, just to make test compilation work. */ 7 | -------------------------------------------------------------------------------- /test/tpm_test/testlib/util.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /* Dummy empty file, just to make test compilation work. */ 7 | -------------------------------------------------------------------------------- /test/usb_pd.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST \ 18 | TASK_TEST(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \ 19 | TASK_TEST(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE) 20 | -------------------------------------------------------------------------------- /test/usb_pd_giveback.tasklist: -------------------------------------------------------------------------------- 1 | usb_pd.tasklist -------------------------------------------------------------------------------- /test/usb_pd_rev30.tasklist: -------------------------------------------------------------------------------- 1 | usb_pd.tasklist -------------------------------------------------------------------------------- /test/usb_test/README: -------------------------------------------------------------------------------- 1 | These tests need to be built and run by hand, unless/until we set up a lab 2 | with known devices attached to a test host. 3 | -------------------------------------------------------------------------------- /test/utils.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/utils_str.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/vboot.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST /* No test task */ 18 | -------------------------------------------------------------------------------- /test/x25519.tasklist: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | /** 7 | * List of enabled tasks in the priority order 8 | * 9 | * The first one has the lowest priority. 10 | * 11 | * For each task, use the macro TASK_TEST(n, r, d, s) where : 12 | * 'n' in the name of the task 13 | * 'r' in the main routine of the task 14 | * 'd' in an opaque parameter passed to the routine at startup 15 | * 's' is the stack size in bytes; must be a multiple of 8 16 | */ 17 | #define CONFIG_TEST_TASK_LIST 18 | -------------------------------------------------------------------------------- /third_party/boringssl/METADATA: -------------------------------------------------------------------------------- 1 | name: "BoringSSL" 2 | description: 3 | "BoringSSL is a fork of OpenSSL that is designed to meet Google's needs." 4 | 5 | third_party { 6 | url { 7 | type: GIT 8 | value: "https://boringssl.googlesource.com/boringssl/" 9 | } 10 | version: "859679518d3433cdd0dd6cf534bd7bdb2a32dd60" 11 | last_upgrade_date { year: 2018 month: 07 day: 05 } 12 | license_type: NOTICE 13 | local_modifications: "Adapted code to work with EC codebase." 14 | } -------------------------------------------------------------------------------- /util/ec3po/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | # Discover all the unit tests in the ec3po directory and run them. 8 | python2 -m unittest discover -b -s util/ec3po/ -p *_unittest.py \ 9 | && touch util/ec3po/.tests-passed 10 | -------------------------------------------------------------------------------- /util/ec_panicinfo.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef EC_PANICINFO_H 7 | #define EC_PANICINFO_H 8 | 9 | #include "panic.h" 10 | 11 | /** 12 | * Prints panic information to stdout. 13 | * 14 | * @param pdata Panic information to print 15 | * @return 0 if success or non-zero error code if error. 16 | */ 17 | int parse_panic_info(const struct panic_data *pdata); 18 | 19 | #endif /* EC_PANICINFO_H */ 20 | -------------------------------------------------------------------------------- /util/ec_parse_panicinfo.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | * 5 | * Standalone utility to parse EC panicinfo. 6 | */ 7 | 8 | #include 9 | #include 10 | #include "ec_panicinfo.h" 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | struct panic_data pdata; 15 | 16 | if (fread(&pdata, sizeof(pdata), 1, stdin) != 1) { 17 | fprintf(stderr, "Error reading panicinfo from stdin.\n"); 18 | return 1; 19 | } 20 | 21 | return parse_panic_info(&pdata) ? 1 : 0; 22 | } 23 | -------------------------------------------------------------------------------- /util/lock/build.mk: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | # 6 | # Lock library 7 | # 8 | 9 | util-lock-objs=file_lock.o gec_lock.o 10 | util-lock-objs+=android.o 11 | -------------------------------------------------------------------------------- /util/openocd/lm4_chip.cfg: -------------------------------------------------------------------------------- 1 | 2 | ftdi_layout_init 0x0018 0x009b 3 | 4 | # open collector oe only 5 | ftdi_layout_signal nSRST -oe 0x0020 6 | 7 | reset_config trst_only 8 | 9 | source [find target/stellaris.cfg] 10 | source [find lm4x_cmds.tcl] 11 | 12 | -------------------------------------------------------------------------------- /util/openocd/npcx_chip.cfg: -------------------------------------------------------------------------------- 1 | 2 | source [find npcx.cfg] 3 | source [find npcx_cmds.tcl] 4 | 5 | ftdi_layout_init 0x0018 0x009b 6 | 7 | # open collector oe only 8 | ftdi_layout_signal nSRST -oe 0x0020 9 | 10 | reset_config trst_only 11 | 12 | -------------------------------------------------------------------------------- /util/openocd/nrf51_chip.cfg: -------------------------------------------------------------------------------- 1 | 2 | #nRF51 uses SWD 3 | transport select swd 4 | # Since nTRST is repurposed, we need a different layout_init setting 5 | ftdi_layout_init 0x0008 0x009b 6 | 7 | ftdi_layout_signal SWDIO_OE -nalias nTRST 8 | ftdi_layout_signal SWD_EN -alias TMS 9 | 10 | #Disable fast flashing, it only works with ST-Link and CMSIS-DAP 11 | set WORKAREASIZE 0 12 | source [find target/nrf51.cfg] 13 | source [find nrf51_cmds.tcl] 14 | 15 | -------------------------------------------------------------------------------- /util/openocd/nrf51_cmds.tcl: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The Chromium OS Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | # 5 | # Command automation for Nordic nRF51 chip 6 | 7 | proc flash_nrf51 {path offset} { 8 | reset halt; 9 | program $path $offset; 10 | } 11 | 12 | proc unprotect_nrf51 { } { 13 | reset halt; 14 | nrf51 mass_erase; 15 | } 16 | 17 | # enable reset by writing 1 to the RESET register 18 | # This will disconnect the debugger with the following message: 19 | # Polling target nrf51.cpu failed, trying to reexamine 20 | proc exit_debug_mode_nrf51 { } { 21 | mww 0x40000544 1; 22 | } 23 | -------------------------------------------------------------------------------- /util/openocd/servo.cfg: -------------------------------------------------------------------------------- 1 | telnet_port 4444 2 | gdb_port 3333 3 | gdb_memory_map enable 4 | gdb_flash_program enable 5 | 6 | interface ftdi 7 | # VID/PID for servo v2, servo v3 8 | ftdi_vid_pid 0x18d1 0x5002 0x18d1 0x5004 0x18d1 0x500d 9 | # Only initialize Port A 10 | ftdi_channel 0 11 | 12 | # unbuffered connection data == oe 13 | ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010 14 | 15 | -------------------------------------------------------------------------------- /util/signer/cr50_RW-prod.pem.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAthqml36PUHk5MgurodTG 3 | puEsqK9/28/gEiCZGgfKL2rZKzU7CSiD82nmMgMoaxNTcPZgln+WELXIZUv81Up3 4 | GT6dA2dSDSQgmdgI1/x3OkEf9BkmHajuvhZTDteI18X/9TsXwly9zoxEFRy/JW8X 5 | Cz9/eOE7xcgoIzji0WmnosMKyxiOv67hhH+JvJ01uQhcxOag2606uIBknovHZT7l 6 | kf3RsEquoZqGK2WFwin9gl4KXv8yQ2F0h9LnfezIURWuz4J6pNc8EI7jYeP5eBrJ 7 | AfE8HsnDD6I2OpoNNM0BnbPq7gbn5CJJn5bZ6dNM4YBH8saJgNVBYOV9XqHdtiLV 8 | uwIBAw== 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /util/signer/cr50_rom0-dev-blsign.pem.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEA4A43llHW4BJa/wOJ3gYF 3 | dZ2V8bLc+oh5+6vgzBcoCKQyA8Gn0ds1j91SDNcEodFkSi+1mPi1fyhd8oEBjKMT 4 | TUwbBQ8IkKCf7GEdDW8R2ruWeckVZQfrO0vU/po4Rs3F9ngbwV+HXFu9G9I6jdy5 5 | DjQCT8JWp2O9LiJPeo41IRdwp4d7jzDcauKoOc3tHKlKHqwc0JtHoYCIzE+2x7Jb 6 | jLR9GVFX/8GgdJwmxzMCrUhS8XglDxnGmxH5ovPuaYHctNXzwRT6PMY2YTypF+mj 7 | nhS5wJ5+D0Jg7zHnddLsEG/ZzOSbD8m7lI8Lg4mTHhWcdh9EjdQJUzfxLB/ExIQG 8 | 9wIBAw== 9 | -----END PUBLIC KEY----- 10 | --------------------------------------------------------------------------------