| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of ac4f512e60af42efe693e6955c110a7908090e56
Original change's description:
> zephyr: Add battery and smart battery options
>
> Shim in battery and smart battery support.
>
> BUG=b:175248556
> BRANCH=none
> TEST=boot on volteer, run 'battery' command.
> TEST=run 'ninja menuconfig' and check KConfig help text.
> 20-12-10 20:08:12.778 battery
> 20-12-10 20:08:13.509 Status: 0x02c0 DCHG INIT RC
> 20-12-10 20:08:13.529 Param flags:00000003
> 20-12-10 20:08:13.541 Temp: 0x0b63 = %.1d K (%.1d C)
> 20-12-10 20:08:13.541 V: 0x2a1e = 10782 mV
> 20-12-10 20:08:13.541 V-desired: 0x3390 = 13200 mV
> 20-12-10 20:08:13.541 I: 0x0000 = 0 mA
> 20-12-10 20:08:13.550 I-desired: 0x0a19 = 2585 mA
> 20-12-10 20:08:13.550 Charging: Allowed
> 20-12-10 20:08:13.550 Charge: 0 %
> 20-12-10 20:08:13.550 Manuf: LG
> 20-12-10 20:08:13.555 Device: AC17A8
> 20-12-10 20:08:13.573 Chem: LIO
> 20-12-10 20:08:13.573 Serial: 0xb754
> 20-12-10 20:08:13.573 V-design: 0x2d1e = 11550 mV
> 20-12-10 20:08:13.573 Mode: 0x6001
> 20-12-10 20:08:13.573 Abs charge:0 %
> 20-12-10 20:08:13.573 Remaining: 0 mAh
> 20-12-10 20:08:13.577 Cap-full: 4932 mAh (4833 mAh with 98 % compensation)
> 20-12-10 20:08:13.585 Design: 5360 mAh
> 20-12-10 20:08:13.594 Time-full: 0h:0
> 20-12-10 20:08:13.594 Empty: 0h:0
>
> Change-Id: Ie782e75ee4027ab2a5c6a0ae7f4ad81e9c360711
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575199
Bug: b:175248556
TEST=make buildall, which fails with:
/opt/coreboot-sdk/lib/gcc/nds32le-elf/8.3.0/../../../../nds32le-elf/bin/ld: __flash_dma_size < IT83XX_ILM_BLOCK_SIZE
BRANCH=none
Change-Id: I318fb13ba91485cd7d876b2294f20d748f47e0fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2585931
Tested-by: Simon Glass <sjg@chromium.org>
Auto-Submit: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is an option in the task_set_event function which force
the calling task to wait for an event. However, the option is never
used thus remove it.
This also will help in the Zephyr migration process.
BUG=b:172360521
BRANCH=none
TEST=make buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ac4f512e60af42efe693e6955c110a7908090e56.
Reason for revert: This CL stops chipset_task forever, revert this to boot AP.
Original change's description:
> zephyr: Add battery and smart battery options
>
> Shim in battery and smart battery support.
>
> BUG=b:175248556
> BRANCH=none
> TEST=boot on volteer, run 'battery' command.
> TEST=run 'ninja menuconfig' and check KConfig help text.
> 20-12-10 20:08:12.778 battery
> 20-12-10 20:08:13.509 Status: 0x02c0 DCHG INIT RC
> 20-12-10 20:08:13.529 Param flags:00000003
> 20-12-10 20:08:13.541 Temp: 0x0b63 = %.1d K (%.1d C)
> 20-12-10 20:08:13.541 V: 0x2a1e = 10782 mV
> 20-12-10 20:08:13.541 V-desired: 0x3390 = 13200 mV
> 20-12-10 20:08:13.541 I: 0x0000 = 0 mA
> 20-12-10 20:08:13.550 I-desired: 0x0a19 = 2585 mA
> 20-12-10 20:08:13.550 Charging: Allowed
> 20-12-10 20:08:13.550 Charge: 0 %
> 20-12-10 20:08:13.550 Manuf: LG
> 20-12-10 20:08:13.555 Device: AC17A8
> 20-12-10 20:08:13.573 Chem: LIO
> 20-12-10 20:08:13.573 Serial: 0xb754
> 20-12-10 20:08:13.573 V-design: 0x2d1e = 11550 mV
> 20-12-10 20:08:13.573 Mode: 0x6001
> 20-12-10 20:08:13.573 Abs charge:0 %
> 20-12-10 20:08:13.573 Remaining: 0 mAh
> 20-12-10 20:08:13.577 Cap-full: 4932 mAh (4833 mAh with 98 % compensation)
> 20-12-10 20:08:13.585 Design: 5360 mAh
> 20-12-10 20:08:13.594 Time-full: 0h:0
> 20-12-10 20:08:13.594 Empty: 0h:0
>
> Change-Id: Ie782e75ee4027ab2a5c6a0ae7f4ad81e9c360711
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575199
Bug: b:175248556
Change-Id: I66086d8fee46d5fd02d26938468a7d76dab71c6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2589140
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@chromium.org>
Tested-by: Eric Yilun Lin <yllin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Something has happened since this code was written and now it doesn't
work. The current code checks the status of each of the named-i2c-ports
nodes, which always seems to return 0, then ends up searching for a
device called "".
Obviously this code did work and should work, but I'm uploading this
just because it makes the battery command work for me:
On the other hand, I don't think we need to check the status. After
all, we are searching for a device by its node label and if the node
is disabled it will not have a device anyway.
BUG=b:175248556
BRANCH=none
TEST=verify with debugging that the i2c_devices[] array is now inited
correctly
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I709421be86027e0e6166a7658fe59ba68783cbe7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2586614
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in battery and smart battery support.
BUG=b:175248556
BRANCH=none
TEST=boot on volteer, run 'battery' command.
TEST=run 'ninja menuconfig' and check KConfig help text.
20-12-10 20:08:12.778 battery
20-12-10 20:08:13.509 Status: 0x02c0 DCHG INIT RC
20-12-10 20:08:13.529 Param flags:00000003
20-12-10 20:08:13.541 Temp: 0x0b63 = %.1d K (%.1d C)
20-12-10 20:08:13.541 V: 0x2a1e = 10782 mV
20-12-10 20:08:13.541 V-desired: 0x3390 = 13200 mV
20-12-10 20:08:13.541 I: 0x0000 = 0 mA
20-12-10 20:08:13.550 I-desired: 0x0a19 = 2585 mA
20-12-10 20:08:13.550 Charging: Allowed
20-12-10 20:08:13.550 Charge: 0 %
20-12-10 20:08:13.550 Manuf: LG
20-12-10 20:08:13.555 Device: AC17A8
20-12-10 20:08:13.573 Chem: LIO
20-12-10 20:08:13.573 Serial: 0xb754
20-12-10 20:08:13.573 V-design: 0x2d1e = 11550 mV
20-12-10 20:08:13.573 Mode: 0x6001
20-12-10 20:08:13.573 Abs charge:0 %
20-12-10 20:08:13.573 Remaining: 0 mAh
20-12-10 20:08:13.577 Cap-full: 4932 mAh (4833 mAh with 98 % compensation)
20-12-10 20:08:13.585 Design: 5360 mAh
20-12-10 20:08:13.594 Time-full: 0h:0
20-12-10 20:08:13.594 Empty: 0h:0
Change-Id: Ie782e75ee4027ab2a5c6a0ae7f4ad81e9c360711
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575199
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a typo that crept into the Kconfig.
BRANCH=none
BUG=none
TEST=build for volteer
Change-Id: I57634da26ca94aba3b80d5f4c10d75b250a9ea2c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2585064
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sort the cmake file list by the config option name.
BRANCH=none
BUG=none
TEST=build and boot on volteer
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I0c66524b990bcc24ac3d19b260daf7ff070861cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582279
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:175249000
TEST=zmake testall
Cq-Depend: chromium:2583272
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ie50e56df60e060c3741013912ab46d807fc5e417
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582819
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables CONFIG_HOSTCMD_ESPI when we have ESPI and host commands
enabled (the case with volteer).
There were two functions stubbed out that we will leave to Nuvoton to
implement.
BUG=b:175217186,b:172678200
BRANCH=none
TEST=boot volteer
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I9b6a8c7c60d1a1018292a207a61c583fd171e546
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582445
Commit-Queue: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See platform/ec/common/build.mk for reference. The use of
keyboard_scan.c should only be allowed when HAS_TASK_KEYSCAN
is defined. As such, we should always set HAS_TASK_KEYSCAN to
1 if CONFIG_PLATFORM_EC_KEYBOARD is defined. Further,
CROS_EC_TASK_LIST was defined per project and it doesn't need
to be, we can instead define it once for all boards depending
on which tasks are set to 1 in shimmed_tasks.h
Note that shimmed_tasks.h can still be used in tests.
BRANCH=none
BUG=none
TEST=zmake testall
Cq-Depend: chromium:2566421
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Id0ed49dd49e3c4eb2ac23184cf943c91dcd261eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567560
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have quite a few options already and plan to add more. Sort them to
make it easier to see what is there.
The I2C enum isn't really connected with the basic CONFIG munging done
in config_chip.h so move it to i2c.h instead.
Fix the 'keybaord' typo while we are here.
BRANCH=none
BUG=none
TEST=build and boot on volteer
Change-Id: Id03fe44ff859736f1e2f86231ca1e8d9dc4c50af
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575198
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in CBI module and necessary dependencies.
BRANCH=none
BUG=b:168032342,b:168032589
TEST=type `cbi` on volteer
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ic08f472f8d52cd4521b78f819ea22e337cccc6f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2572736
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change will make the firmware builder auto-detect new tests.
BRANCH=none
BUG=none
TEST=Ran zephyr's firmware_builder.py
Cq-Depend: chromium:2551964
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I70ba1b32b67e2cb4e3676d228b299294028597a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552848
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After COIL rename, we need to update the CMakeLists.txt for the i2c test
BRANCH=none
BUG=b:174572350
TEST=builds and passes test
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I33b712876c11dc77e7835c2505749d449e11ffa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2572398
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gives us the "apreset" and "apshutdown" console commands.
BUG=b:171312361
BRANCH=none
TEST=try "apreset" and "apshutdown" commands on volteer
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ib71afa66cfb5d0044c4cf98839b263ee2e2da338
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567343
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2558905 broke our build as it renamed this file. Update the name
here too.
BUG=b:174572350
BRANCH=none
TEST=build for volteer
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I96c0922a988df05b8935b169781b809bd4425b7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567586
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were casting the int to a pointer. Needed '&'.
BRANCH=none
BUG=none
TEST=zmake testall (but it still fails on missing cros_kb_raw.h
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I9d61fb27826c581214d5557364a97e6ea9d215e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567583
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in the port80 module.
BUG=b:172471337
BRANCH=none
TEST=boot volteer, watch the port80 writes
test port80 command
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I35e3254bb95fec92e4b69ca65f1d8eebbc6d14f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567033
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It shims the keyboard_scan task by introducing another keyboard_raw.c
which calls down to the zephyr-chrome cros_kb_raw driver.
BRANCH=none
BUG=b:167405015
TEST=Build pass by zmake configure -B ./build projects/experimental/volteer.
TEST=Check all the keys on volteer platform by "ksstate".
Change-Id: Ic87f67c28779f7feafa350020a07ba87e3600ecd
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523839
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shim the system_jumped_late() and system_enter_hibernate() that needed
by keyboard scan.
BRANCH=none
BUG=b:167405015
TEST=compile with keyboard scan
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I4f79dd3b0313f4ed19550b1896ed0e439407caf6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552321
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable shimming of power sequencing code.
BUG=b:171312361
BRANCH=none
TEST=With zephyr-chrome CL...
https://screenshot.googleplex.com/4m6N6vd2Nx5FpiD.png
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I8fb96019c8c636010d2cd136c0116df41fc9f148
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548308
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some basic functionality to get and set virtual wires.
BUG=b:171815541
BRANCH=none
TEST=volteer power sequencing to S0 (requires follow-up CLs)
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I07655fd3a768aca962112a98d6f1f593633eb605
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548307
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Needed by power sequencing. Doing nothing will work fine for now.
BUG=b:173787365
BRANCH=none
TEST=compile with power sequencing
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia4e48d92ebbee7a788e4515f6583095349aea0f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548306
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are required by power sequencing.
Also, handle conversion of more bits while I'm here.
BUG=b:171312361,b:173789980
BRANCH=none
TEST=compile with power sequencing code for volteer
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I3064e6851c64a7f43612524000289ac7d7f04766
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548305
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds an i2c_ports enum based on the devicetree
phandle list 'named-i2c-ports'. Modeled after named-gpios.
Currently, this is only enabled for ztests as it conflicts
with the definitions in config_chip-npcx7.h. But once that
dependency is removed, this enum will become publicly
available.
BUG=b:171302975
BRANCH=none
TEST=../zephyr-chrome/firmware_builder.py test
Cq-Depend: chromium:2546328
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I8e763da0c867fed383eb333092f191079fb792ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546997
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Required by power sequencing. Should always be false for now as
sysjump is not implemented.
BUG=b:171312361
BRANCH=none
TEST=compiles with power sequencing
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I1dc6e553211734307ce5a28ed3b5b9feeff002a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548304
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per go/zephyr-shim-how-to, the headers under zephyr/shim/include/ need
to be distinct names from those under include/, as the C compiler has
no defined ordering to searching the include paths. (i.e., there is
no such thing as a "header override").
Make include/gpio_shim.h include zephyr_gpio_shim.h instead, and
rename the zephyr header accordingly.
Without this, occasionally you can get this:
In file included from include/gpio_signal.h:26,
from include/espi.h:11,
from zephyr/shim/src/espi.c:14:
include/gpio.wrap:36:2: error: #error "Your architecture must ...
36 | #error "Your architecture must define GPIO_PIN and it did not."
| ^~~~~
include/gpio.wrap:40:2: error: #error "Your architecture must ...
40 | #error "Your architecture must define GPIO_PIN_MASK and it did not."
| ^~~~~
include/gpio.wrap:246:10: fatal error: gpio.inc: No such file or directory
246 | #include "gpio.inc"
| ^~~~~~~~~~
compilation terminated.
BUG=b:173031377
BRANCH=none
TEST=compile for volteer and posix-ec
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I0eb23c41ee5c2be4f0405d3fadb71d6422d0ff40
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548303
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Multiple headers and platform/ec files need some of the IOEX_*
constants defined, even if we don't support IO expanders (yet). Add
this as a stopgap.
BUG=b:171312361
BRANCH=none
TEST=compile for volteer
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I78fa80047683eff9dca318a1656c21448a76579f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548301
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent a mess of includes inside of gpio_map.h (and to help cut
back on people forgetting to include headers, since gpio_map.h is used
quite universally), have gpio.c declare all the interrupt handlers
before using them.
BUG=b:169935802
BRANCH=none
TEST=compile with powerseq CLs
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Iaead04b29ea68eb0b77f3a3b9c65938b629d2ab9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548300
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:171302975
TEST=zmake build for volteer and zmake test for ec and i2c
Change-Id: Ic5be445ac7cc2216114379f7fad59de03251c1de
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2541622
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The zmake file allows us to use the zmake program to easily build this
test
BRANCH=none
BUG=none
TEST=use `zmake configure -b -B /tmp/build zephyr/test/crc`
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: If1928c8c6705b4e8905e2f84eee896158a7510e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540732
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change simply moves the i2c.c shim to i2c-npcx7.c.
BRANCH=none
BUG=none
TEST=builds with zmake for volteer
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ic410787dcf2693dda71681f739c0b74cd47770da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532964
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize the kernel objects before application code as a chance to run.
This ensures that any event that is set before tasks start will get
delivered (and won't crash the kernel).
BRANCH=none
BUG=none
TEST=included unit test
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I84ecfddbe706e7e1860f310571851ee8dedd07d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2535984
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in support for crc8 used in CBI, I2C, and other
applications within platform/ec
BRANCH=none
BUG=b:168032589
TEST=add unit test for platform/ec and zephyr based
CRC8 approaches and verify they both pass.
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I9b6112cb83dab81a44a1ac020d4efb1b7bb1df5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532692
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we add more shim code and configs, we don't want to remove the
functionality in all of the tests. Convert this test to only
include the files it needs to link to perform the shim test.
BRANCH=none
BUG=b:172512307
TEST=base32 test builds and passes
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I4a7232c98397600d578e18b67935924b088f377b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532687
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we add more shim code and configs, we don't want to remove the
functionality in all of the tests. Convert this hooks test to only
include the two files it needs to link to perform the shim test.
BRANCH=none
BUG=b:172512307
TEST=hooks test builds and passes
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I0613670fe3cc056e33035ccc5ad1418e5e3d6db0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532686
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Something slipped through CQ coverage. Need to figure out, but in the
mean time, revert the 3 CLs that seemed to have caused the issue.
BRANCH=none
BUG=chromium:1147953
TEST=none
This reverts commit 22ee9a346718a9a07955fd81b0d03c4dde5b2ec8.
Change-Id: I5617e39204a7c05001363d5780fa2f52e3e1ea05
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2533355
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I missed a few bound checks in the gpio shim. Add a bound check to all
remaining gpio shim functions that need it.
BRANCH=none
BUG=b:172512307
TEST=volteer, posix-ec, and test/app/ec all build without warnings
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Id915532b83e1621c86253fe86137034751a4da6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532683
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do need a true 64-bit input function for common platform/ec code, and
zephyr doesn't have this. Add the support to the shim
BRANCH=none
BUG=b:172592963,b:172512307
TEST=build EC and volteer and posix_ec
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I81f69fdbe03916f3a54091ce6c077db32ed3a73c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532679
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PLATFORM_EC_KEYBOARD_PROTOCOL_8042 should be guarded
by the PLATFORM_EC_KEYBOARD option.
BRANCH=none
BUG=b:172512307
TEST=build posix-ec with CL stack
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Idd070454a11ed65cab763ff7788dec4b907f610d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530152
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The static check for zephyr will generate warnings if we
do not bounds check the incoming gpio_signal enum. We should
bounds check anyway.
BRANCH=none
BUG=b:172512307
TEST=build posix-ec with CL stack
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I1b2014c02e02d7271eeabd3cc041b3c452b1c43f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530151
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling posix-ec, there are issues with strncasecmp. If we
include the correct zephyr headers and hide the EC's version of stdlib,
we can make everything work
BRANCH=none
BUG=b:172512307
TEST=build posix-ec with CL stack
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ia4d412a45e15b91b36b94ca58ecc9cbe41b2b082
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530150
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in support for crc8 used in CBI, I2C, and other
applications within platform/ec
BRANCH=none
BUG=b:168032589
TEST=add unit test for platform/ec and zephyr based
CRC8 approaches and verify they both pass.
Change-Id: Ib609f98596c4edc6e6f0d01b6242e62a1f95ad72
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527811
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This brings over the extpower_common.c and extpower_gpio.c files to
the Zephyr build. This is needed as a dependency of power sequencing.
BUG=b:172720290
BRANCH=none
TEST=on volteer, observe "hostevents" command output to see AC_PRESENT
event set when charger connected. (requires the zephyr-chrome CL
as well)
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I28ad442180762d542cc6031ab1f33284b08a4572
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527703
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At present a build error is produced when building keyboard_scan.c
due to a redefinition of this symbol. Undef it first.
BUG=b:167405015
BRANCH=none
TEST=make BOARD=volteer
zmake configure .../zephyr-chrome/projects/experimental/volteer \
-B /tmp/z/cos
zmake build /tmp/z/cos
see there are no errors
Change-Id: I9b13d1737d6ce6f7ab35b0d6457c2db49cea8dbc
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523838
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Tested-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add build assert to ensure that deferred task is lower than all of the
other shimmed tasks.
Also make priority of tasks from 0 to COUNT - 1 instead of 1 to COUNT
BRANCH=none
BUG=none
TEST=volteer still builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Iabe9f1117850975ec9bf3df1dcfc690b4725a7e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523389
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to align with go/zephyr-shim-how-to, update all of the
platform/ec header files to use "quotes" and only use <brackets> for
zephyr header files. Also include an empty line between the two.
BRANCH=none
BUG=none
TEST=all zephyr tests build and pass; build volteer
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I27c275c24aa4f8eb40e100b07517b60f548f06cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521594
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are going to need to perform initialization in Zephyr's main before
we start the EC tasks or call the INIT hooks. If we rely on SYS_INIT,
all of that happens before main is called.
BRANCH=none
BUG=none
TEST=pass tasks unit tests and run on volteer
Cq-Depend: chromium:2523462
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Icd035695b86fc9690cea88887902be61d9b37a18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523380
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an option to shim the power button module.
BUG=b:172471187
BRANCH=none
TEST=volteer: press power button, observe UART output
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I7dbc705b19bfc312e2707080f22e411ebd7e2c1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include host_command.c and host_event_commands.c so that we get some
basic definitions to get things compiling. Since we don't have
CONFIG_HOSTCMD_ESPI enabled yet, this is really just pulling in stub
definitions.
BUG=b:172678200
BRANCH=none
TEST=compiles for volteer
Cq-Depend: chromium:2523466
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ic293f80d30ecf9534ff935b73aa4ca42614a77be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523381
|