| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thermistor drivers now query the device tree for configuration.
Thermistor tests have been updated to be parameterized
on all thermistors enabled in the device tree.
BRANCH=none
BUG=b:184374937
TEST= 1) zmake testall
2) make runhosttests
Cq-Depend: chromium:3161332
Signed-off-by: Aaron Massey <aaronmassey@chromium.org>
Change-Id: Ic5330cd5c33e79e192428ca857651de9a225856e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133812
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Aaron Massey <aaronmassey@google.com>
Commit-Queue: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with Zephyr v2.7, device-tree compatible string vendor
prefixes are checked, and warnings are generated if a vendor prefix is
unknown.
Zephyr's CMake build system can recognize custom vendor prefix
extensions at any ${DTS_ROOT} under the path
"dts/bindings/vendor-prefixes.txt".
We use the "cros-ec" vendor prefix widely in the Chromium EC, so add
this as a known prefix.
BUG=b:198824039
BRANCH=none
TEST=warnings clear up in v2.7
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia4be6349edd178507bf4d6e663aa16dfef13c05f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180266
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr IDT1337AG RTC driver
BRANCH=none
BUG=b:197743934
TEST=ectool rtcset 30000
ectool rtcget
Current time: 0x00007535 (30005)
ectool rtcsetalarm 10
after ~10 (measured with a timer) printed on
ec console: [160.248900 event set 0x0000000002000000]
I tested the alarm up to one hour.
Hibernation test:
rtc_alarm 10
hibernate
[339.906200 system hibernating]
*** Booting Zephyr OS build zephyr-v2.6.0-110-g862339fbeda5 ***
[Image: RO, herobrine_npcx9_v2.6.73690-ec:c87457
[Reset cause: power-on hibernate]
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: If5b936af2555915582ca38fee751f57bb2b8d10f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3173093
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a generic led_get_brightness_range function using static
values from the device tree. This is currently ignoring led_id, but no
pwm_led based device is using it right now anyway, so this could cover
all existing use cases.
BRANCH=none
BUG=b:177452529
TEST=called the function, verified the values in runtime
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I67dc7564eb6724e401961261ff5cc5892899ad5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170401
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a set of properties for color mapping in the device tree for
the pwm-leds device, and maps them to the internal "struct
pwm_led_color_map".
BRANCH=none
BUG=b:177452529
TEST=compared the structure on gdb
TEST=build and run on volteer
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ib3a704afccad40eab7115371dbf72c568f5602d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170400
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a complete example for the cros-ec,pwm-leds leds property, and mark
it as required since the whole LED functionality depends on it.
BRANCH=none
BUG=none
TEST=build and run
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I6d875b1a3a436baa77b6c15b8018e4b37102bb46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174051
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a simple mock with no state to test common i2c code.
BRANCH=none
BUG=b:200589041
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I99730361a298708278106deb58890a0ed2c9febf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3171694
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bringup power sequencing for AMD and enable for guybrush.
Note that at the moment we had to copy-paste the power signals and
related funcitons, the code was a bit too far from shimming without
extensive editing. We can try and merge together later.
BUG=b:195137794
BRANCH=none
TEST=power sequence to S0, nothing useful on ap console (yet!)
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I9a577e24d80fe0ff992af4b847e14695b82f871d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3169568
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:200046770
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: If425d9760b8db9024478fb9a664ffa71e7c25eb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3168034
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete the "physical-port" node from named-i2c-ports, and automatically
detected when multiple children point to the same I2C bus.
This ensures that the I2C bus locking always blocks all matching I2C
nodes, without the user needing to specify this relationship manually
in the devicetree.
BUG=none
BRANCH=none
TEST=Dump out i2c_physical_ports[] on herobrine.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I3d254684483a95af12e7940446f4cd8743684708
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154694
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an LN9310 emulator. The emulator is mostly a stub right now with
some limited functionality to update the battery cell type and chip
version number.
BRANCH=none
BUG=b:184856083
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I156393f4612bf69e31d4d28d88d74fa4dd1689fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3156846
Commit-Queue: Yuval Peress <peress@google.com>
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set up the pwm_leds data from the device tree, gets rid of most static
map defines and sets CONFIG_LED_PWM_COUNT automatically.
BRANCH=none
BUG=b:177452529
TEST=build and run on volteer
TEST=compared the built up pwm_leds structure with gdb
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ib41faf86ae018f5a1ed8a1c96c4b6ec081e175d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154256
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate the BBRAM driver to the upstream version.
BRANCH=none
BUG=b:195843756
TEST=zmake testall
Cq-Depend: chromium:3147080
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I441e58f94c4874e268aad36df2f036a88187801b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3147230
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix masks and values for charge and discharge FETs.
Add missing charge FETs properties.
BRANCH=main
BUG=b:183544739
TEST=Verify if charge and discharge FETs work correctly
Change-Id: I6e3abb9d8f03b9f6372e5bfb97a447b33ee4c7a9
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141599
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing Kconfigs for:
- PLATFORM_EC_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF
- PLATFORM_EC_BATTERY_CHECK_CHARGE_TEMP_LIMITS
- PLATFORM_EC_BATTERY_MEASURE_IMBALANCE
- PLATFORM_EC_BATTERY_MAX_IMBALANCE_MV
Change help text in battery yamls to use Kconfigs instead of
legacy CONFIGs
BRANCH=main
BUG=b:183544739
TEST=Define added configs to prj.conf file and verify that
compilation takes them into account.
Change-Id: I01716c1515350550c18bbfd4944638034a25c7b5
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141598
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds possibility to define board's batteries in device
tree. Default battery is defined by adding "default_battery" as node's
label.
It also adds common batteries definitions that can be used using
compatible string.
If no 'batteries' node is defined in device tree, custom board's
logic must be used and old "named-batteries" should be defined.
BRANCH=main
BUG=b:183544739
TEST=This commit shouldn't change behaviour of any build.
Compiling and flashing CrOS EC and Zephyr should
work without problems.
Change-Id: I94f0121f45eb061f1358fadbcd7d8006c08b0bea
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107385
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr PCF85063A RTC driver
BRANCH=none
BUG=b:194710429
TEST=ectool rtcset 30000
ectool rtcget
Current time: 0x0000753d (30013)
ectool rtcsetalarm 10
after ~10 (measured with a timer) printed on
ec console: [160.248900 event set 0x0000000002000000]
I tested the alarm up to one hour.
Hibernation test:
$ rtc
RTC: 0x00047624 (292388.00 s)
$ hibernate
Hibernating until wake pin asserted.
# Wait approx. 30s before pressing power button
[Reset cause: hibernate wake-pin]
$ rtc
RTC: 0x00047645 (292421.00 s)
# 292421s - 292388s = 33s
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I3d5eb7d209dd63df54049a02165076f393d53be1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115449
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add BB retimer emulator on i2c bus. Emulator properties can be defined
using device tree or runtime emulator API. Emulator checks if RO
registers and reserved bits are accessed correctly. API allows to set
custom read/write i2c messagess handlers to emulate complex behaviour.
BUG=b:184856919
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I4b641a90e6fb55e89aaee388c0ac04ab7bf367ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110085
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, functions for reading board version and sku id were defined
in board.c files which are not compiled in Zephyr builds.
Logic from board.c files should be moved to the DeviceTree files.
This commit adds support for defining board version and sku id
pins and numeral system used to decode them.
BRANCH=main
BUG=b:194136536
TEST=Call system_get_sku_id and system_get_board_version
on CrOS EC and Zephyr, values should be correct and
the same on both versions
Change-Id: I61b5e205cb2a2299ad86c5dff38c05a9659eb2d3
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3048102
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds support for switchcap definition in device tree.
It will allow to remove board specific files which implemented
the switchcap functionalities. This will unify the logic between
different board in zephyr.
BRANCH=main
BUG=b:194211207
TEST=Use linked TEST commits to see example of definitions for lazor
Use GPIO or LN9310 version, build and flash to lazor.
Board should be able to boot correctly.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Change-Id: Ib80a73dcb2db95e2dcf48e33f876a39246fd506a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3085670
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create devicetree node to specify the keyscan runtime parameters.
BUG=b:195945894
BRANCH=none
TEST=zmake testall
TEST=verify keyboard on Volteer with next CL
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I4dbf5e4f2205f31651d33b6ffc1ecd1dd6696795
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3083721
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL enables fan functionality for npcx7/9_evb
BUG=none
BRANCH=none
TEST='fanset', 'fanduty', 'faninfo' console command
```
uart:~$ fanset 50%
Fan rpm given as 50%
Setting fan 0 rpm target to 3078
uart:~$ faninfo
Actual: 2943 rpm
Target: 3078 rpm
Duty: 38%
Status: 2 (locked)
Mode: rpm
Auto: no
Enable: yes
Power: yes
```
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I836e1dd62a712bac887d4d12d34541c8c8043a83
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3063105
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create the pinmux phandle to the SHI driver node in the
devicetree. When the pinmux_pin_set function in
cros_shi_ite_init can refer to the setting of phandle.
It is more flexible to use.
BUG=b:187541831
BRANCH=none
TEST=host command is normal.
Cq-Depend: chromium:3041210
Cq-Depend: chromium:3056118
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Change-Id: I0c71333563eb7da04d29b82767b6a6660d867eed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045026
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL enables 5 ADC channels for npcx7/9_evb.
BUG=none
BRANCH=none
TEST='adc' console command
```
uart:~$ adc
ADC0 = 2813 mV
ADC1 = 2813 mV
ADC2 = 2813 mV
ADC3 = 2813 mV
ADC4 = 2813 mV
```
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I08d60dc732f7388642a54eec090ef7bf15760a2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3063103
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL enables I2C for npcx7/9_evb. Currently, zephyr-OS ec doesn't
use the GPIO for i2c unwedge functionality. Remove the GPIO setting for
i2c in gpio.dts.
BUG=none
BRANCH=none
TEST=Get sensor value by `i2c` shell command
```
uart:~$ i2c scan I2C_2_PORT_0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
1 devices found on I2C_2_PORT_0
uart:~$ i2c read I2C_2_PORT_0 0x48 0x00 2
00000000: 1f 80
```
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: If5029c41b7ba5400ee1492b408f7ab6975218c5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3060348
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add TCS3400 emulator which is emulated device on i2c bus. Emulator
properties can be defined using device tree or runtime TCS emulator API.
It allows to set custom handlers for write and read messages. Emulator
is able to convert internal values to register values that can be
obtained by driver through i2c interface. Conversion takes current state
set by driver into account (gain and data acquisition time).
BUG=b:184856080
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I16f25de43e047df39f84ce86044736d50c9a49c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3048094
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MKBP_HOST_EVENT_WAKEUP_MASK is right-shifted by 1 bit, so adjust
defining it in the dts.
The bug is impacting the waking up DUT with a host event, e.g.
EC_HOST_EVENT_RTC which is used during the firmware_EventLog test.
BUG=b:193495066
BRANCH=none
TEST=Suspend DUT with powerd_dbus_suspend, and make sure the EC command
"hostevent set 0x0000000002000000" wakes up the board.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I253d0dc36cf216fe50a6473c3640fe906ef565e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3031542
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If i2c devices are connected to the same port, they should
use the same mutex_lock() index. So the new transaction won't
break the ongoing transaction.
BRANCH=none
BUG=b:189855648
TEST=Enable CONFIG_SMBUS_PEC and voltage regulator function on asurada.
No i2c transaction is broken.
Change-Id: Ib848e3c2e60b99ce66ad5fd2fc7095f90820a15d
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3010920
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default range is a chip-specific property. The same motionsense chip
use the same setting and rarely changes. Add the value as the default
property. So the project dts can neglect this property. Easy to switch
chip without bothering to change this property.
BRANCH=None
BUG=b:194194887
TEST=Built the delbin and hayato images successfully.
Change-Id: I856f0b93af67974f29800551f7da779b43facc55
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042986
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the property consistent across different sensors:
* not required
* default to a common I2C address
BRANCH=None
BUG=b:194194887
TEST=Built the delbin and hayato images successfully.
Change-Id: I7784176e6d09e883b9ef957311aba610d3e69597
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042985
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a Zephyr-equivalent of CL:2993218.
Add the I2C bus for the RTC chip. The chip runs at 400KHz.
BRANCH=None
BUG=b:192253134
TEST=Built the herobrine_npcx9 image successfully.
Change-Id: I399485706c66070464fcd9fe53bec35b4c0454a6
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3039388
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add extension to support BMI260 model.
BUG=b:184856157
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Iaffebdb5279001d085fd56868e81318528380380
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2997364
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add BMI emulator which is emulated device on i2c bus. Emulated
accelerometer and gyroscope properties are defined through device tree,
but they can be changed in runtime through BMI emulator API. It allows
to set custom handlers for write and read messages to emulate more
complex scenarios or malfunctioning device.
BMI emulator is designed to implement support for different BMI models
as an extension to common emulator code.
BUG=b:184856157
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I63e9d3aca98c8923372437f7a66257a4c82817f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2977559
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trogdor is a reference design, which doesn't have Zephyr support yet.
Lazor is a shipping design of the Trogdor family, which already have
Zephyr support. This CL creates the Trogdor Zephyr image and modifies
the hardware difference.
The CL first copies the directory lazor/ to trogdor/.
And do the following changes:
* Rename all the board term lazor -> trogdor
* Update the GPIOs (recheck the result of gpios_to_zephyr_dts)
* Update the GPIO interrupts
* Update the battery info
* Update the sensor info
* Do not support multi-TCPM driver
* Do not include sku.c (trogdor doesn't have it yet)
BRANCH=None
BUG=b:184071830
TEST=Built the Zephyr image. Booted it on an existing Trogdor board.
Change-Id: I3b603284c719c119bb05460e7d4386d2c2eabda4
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994753
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove a duplicate enum from gpio-enum-name.yaml. Making this change
makes reading through the dts files a bit easier at the cost of having
to effectively create an alias. GPIO_EC_BATT_PRES_ODL could not be
removed from cros ec because it is currently used in many other boards
and baseboards.
When making this change, I also tried replacing all instances of the
GPIO_EC_BATT_PRES_ODL, but some of these are in generated files such
as brya's generated-gpio.inc which would get overridden when the tool
is run next.
BRANCH=none
BUG=b:190743662
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I0f1ce938495e1a7227f1a0283a7378faf02bd2b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3010483
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just test enabling VBUS for now.
BUG=b:190519131
TEST=zmake configure --test zephyr/test/drivers
BRANCH=none
Change-Id: I9759e709539ed041dd92c80ab1e49f896f8d6e65
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994648
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:184852906
BRANCH=none
TEST=zmake configure --test zephyr/test/drivers
Change-Id: Ie554b6957269c638357d82d6f5dcc2ceda08caab
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2961272
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add BMA255 emulator which is emulated device on i2c bus. Emulated
accelerometer properties are defined through device tree, but they can
be changed in runtime through BMA255 emulator API. It allows to set
custom handlers for write and read messages to emulate more complex
scenarios or malfunctioning device.
BUG=b:184855546
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I4def7fcc54edbf9cb346fda0f21f647a5ad5f8d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2933301
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support in the devicetree for masking mkbp events
to prevent said events from waking up a suspended
system.
BUG=b:190503252
BRANCH=none
TEST=make buildall
TEST=zmake testall
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: Ib53b8f96c2fb4704e25ce4fb62eb277a16d92cd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2985820
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This interrupt appears to be missing from the GPIO list. Add it.
Note: It is marked as open-drain so I am not sure how to describe it
in the gpio_map, but have made an attempt.
BUG=b:189855648
BRANCH=none
TEST=see that it builds OK with the new interrupt handler
Change-Id: Id6c23cc67a17fd221eb977faab18e6bdfa14f324
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957550
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:189857004
BRANCH=none
TEST=ap console 'ectool motionsense'
TEST=ap console 'ectool motionsense lid_angle'
TEST=verify lid angle will enable/disable tablet mode
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I81b0c7883fe7f968f8226d0101e27ee03676097c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2964956
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some code in EC OS will use this GPIO, i.e. CL:2943986. Make the Zephyr
CQ pass.
BRANCH=None
BUG=b:190250108
TEST=Build the Zephyr image.
Change-Id: Ib98c09916a2c7860653689a4c4d0d66bd4f64fdf
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957073
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the I2C ports used by USB-C, so we can support charging.
BUG=b:189855648
BRANCH=none
TEST=with other CLs, build asurada for Zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I59ce2ad3b9158cf01dac7d89ab56c46c668a07e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941813
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add battery information so we can support charging.
BUG=b:189855648
BRANCH=none
TEST=with other CLs, build asurada for Zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I638c5789a2a494bdf811c13f66d5b892f4ebded2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941812
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few of these are missing. Update them so we can use the full ADC
capabilities, needed for Zephyr.
BUG=b:189855648
BRANCH=none
TEST=with other CLs, build asurada for Zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I9d52404086b3aa8dda847a015a264d1fcfd805f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941811
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ZephyrEC uses different I2C port numbers than CrosEC does, so convert
the received remote port via I2C_PASSTHRU command into a proper one.
The conversion is done based on a new property remote-port, which tells
what port number is used by external components like kernel.
The change fixes an issue with unexpected entering OTG mode by the
charger.
BUG=b:188885798
BRANCH=none
TEST=Flash Lazor and make sure that no "charge problem" prints are
displayed.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Id00265a3abf286ca59cbecb38ff7933d75e0d361
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2933296
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:180980668,b:189857004
BRANCH=none
TEST=make buildall
TEST=zmake configure -b $PROJ_HAYATO
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ib743f0dbcc4a9731ccb575344413f161cd0dbba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2944617
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable (status = "okay") i2c ports for sensors, battery, and charger/
eeprom.
uart:~$ i2c scan I2C_7_PORT_0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- 09 -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on I2C_7_PORT_0
BRANCH=none
BUG=b:188605676
TEST=run i2c scan shell command
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Id841551a09aec86faa56d9bd0977f0aa1f6b24e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932460
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Smart Battery emulator which is emulated device on i2c bus. Emulated
battery properties are defined through device tree, but they can be
changed in runtime through Smart Battery emulator API. It allows to set
custom handlers for write and read messages to emulate more complex
scenarios or malfunctioning device.
BUG=b:184855975
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Ia94a0a122123e3259882dfdc80d067c61c98379b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2903206
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|