| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes retimers appear as generic muxes. By allowing a
chain of muxes they can be stacked up to the new configurations
that zork requires and will continue to work as they did before
on configurations that only have a single mux.
The code used to have two different arrays, 1) muxes and 2)
retimers. On one of the zork configurations the processor
MUX stopped being the primary mux and the retimer took its
place. In a different configuration of that same platform
it left the primary and secondary alone but the mux_set
FLIP operation had to be ignored. Since the same
interfaces needed to be available for both it stopped making
sense to have two different structures and two different
methods of handling them. This consolodates the two into
one.
The platforms that do not have retimers, this change will
not make any difference. For platforms like zork, it will
remove the retimers and make them chained muxes. So
testing on trembyle makes sense to verify,
BUG=b:147593660
BRANCH=none
TEST=verify USB still works on trembyle
Change-Id: I286cf1e302f9bd3dd7e81098ec08514a2a009fe3
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2066794
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current use of the PD Config Flags are a bit confusing and
has been changed to the following:
The CONFIG_USB_POWER_DELIVERY flag is used to enable and disable
the TCPMv1 and TCPMv2 stacks. And when CONFIG_USB_POWER_DELIVERY
is enabled, one of the following must be enabled:
CONFIG_USB_PD_TCPMV1 - legacy power delivery state machine
CONFIG_USB_PD_TCPMV2 - current power delivery state machine
BUG=b:149993808
BRANCH=none
TEST=make -j buildall
Change-Id: Ie3f8615a75b15b4f1c703f57f3db9e152a471238
Signed-off-by: Sam Hurst <shurst@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2068519
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the temporary common charger chip configuration and
instead puts the configuration in each board.
BRANCH=none
BUG=b:147672225
TEST=builds, runs on waddledoo and octopus
Change-Id: If81aef31e48c65999a87e202494f286716114bbb
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2031855
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:145796172
BRANCH=none
TEST=make buildall -j
Change-Id: Ie4ffaf208745764262931501f0dff77b525a4e59
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2017569
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some of the usages of this static variable were used in
overridable functions and they also had their own static
variable for this same purpose. Since it is not required
to override all of the functions, this left two variables
out of sync with one another. So made them the same variable.
BUG=b:147535104
BRANCH=none
TEST=make buildall -j
Change-Id: Ic560d3a2a2e129450e918e0cb6dfff75fd1222a2
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2002953
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a dummy bootblock to make sure size check is accurate during
`make buildall`.
The default size is picked from build 12769.0:
$ ls -al */coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:20 kodama/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:20 krane/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:20 kukui/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:33 damu/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:33 jacuzzi/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:33 juniper/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:33 kappa/coreboot/bootblock.bin
-rw-r--r-- 1 21504 Dec 19 02:21 flapjack/coreboot/bootblock.bin
BUG=chromium:1034518
TEST=1) make buildall # use dummy bootblock
2) make BOARD=kukui # same as above, ~1.7k bytes left
3) make BOARD=kukui BOOTBLOCK=/dev/null # empty bootblock,
23k bytes left
4) make BOARD=kukui BOOTBLOCK=a-large-file # fail early before
linking
BRANCH=kukui
Change-Id: I65c18f567dce0cb315e0cdc4f30ada5e83275d72
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1973550
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Required by Android CDD - Section 7.3.1 - Paragraph C.1.4
Modified mechanically with:
for i in $(grep -lr "\.default_range" board); do
sed -i '/.default_range =/s#\(.*\.default_range = \).* /\
\* g.*#\14, /* g, to meet CDD 7.3.1/C-1-4 reqs */#' $i
done
Manually reworked to only change the accelerometer that matters to
android:
The lid accelerometer or the base accelerometer if the base also hosts
the gyroscope.
This is only for future EC, no need to land the change on branches:
mems_setup will take care to set accelerometer ranges at 4g on startup.
BUG=b:144004449
BRANCH=none
TEST=compile
Change-Id: If8c14b2e928c9c70c0ce51451adcfcd674a9e73b
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957375
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new irt scaling factor was added to the tcs3400 driver to further
improve the sensor CCT accuracy, requiring a structure definition to
change. This change fixes existing boards that use the tcs3400 to
use this new structure definition.
Boards modified include flapjack, hatch, kohaku, kukui, and stryke.
BUG=b:143246741
BRANCH=master
TEST=execute "make -j BOARD=<boardname>" for kukui, kohaku, flapjack,
and hatch and make sure they build without error.
Cq-Depend: chromium:1879188
Change-Id: Icad96877b5cd9966e927e4dd150335c988725f0c
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879189
Tested-by: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a board specific usb_pd_policy.c file that contains a lot of
code for handling DisplayPort Alternate mode, Google Firmware Update
Alternate mode, as well as some PD policy functions such as deciding to
Accept or Reject a data role swap or a power role swap. Several boards
simply copy/paste this code from project to project as a lot of this
functionality is not actually board specific.
This commit tries to refactor this by pulling the functions that are not
mainly board specific into common code. The functions are made
overridable such that boards that truly do require a different
implementation may do so.
Additionally, this consolidation changes the policy behaviour for some
boards, but they should be for the better. Some examples include that
data swaps are always allowed if we are a UFP (no system image
requirement), power swaps are allowed to become a sink if we are no
longer dual role (e.g. - in suspend), and DisplayPort Alternate Mode is
not entered if the AP is off.
In order to facilitate this refactor, a couple CONFIG_* options were
introduced:
- CONFIG_USB_PD_DP_HPD_GPIO
/* HPD is sent to the GPU from the EC via a GPIO */
- CONFIG_USB_PD_CUSTOM_VDO
/*
* Define this if a board needs custom SNK and/or SRC PDOs.
*
* The default SRC PDO is a fixed 5V/1.5A with PDO_FIXED_FLAGS indicating
* Dual-Role power, USB Communication Capable, and Dual-Role data.
*
* The default SNK PDOs are:
* - Fixed 5V/500mA with the same PDO_FIXED_FLAGS
* - Variable (non-battery) min 4.75V, max PD_MAX_VOLTAGE_MV,
* operational current PD_MAX_CURRENT_MA,
* - Battery min 4.75V, max PD_MAX_VOLTAGE_MV, operational power
* PD_OPERATING_POWER_MW
*/
BUG=chromium:1021724,b:141458448
BRANCH=<as many as we can that are still supported>
TEST=`make -j buildall`
TEST=Flash a kohaku, verify that DP Alt Mode still works with a variety
of DP peripherals
TEST=Repeat above with a nocturne
TEST=Repeat above with an atlas
Change-Id: I18fd7e22dc77fe1dc6c21c38cd7f1bc53cae86cb
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1949052
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain SKUs of certain boards have lesser number of USB PD ports than
defined by CONFIG_USB_PD_PORT_COUNT. Hence rename
CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNT.
BUG=b:140816510, b:143196487
BRANCH=octopus
TEST=make -j buildall; Boot to ChromeOS
Change-Id: I7c33b27150730a1a3b5813b7b4a72fd24ab73c6a
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879337
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this changes the declaration and definitions of
typec_set_source_current_limit() to take an enum tcpc_rp_value instead
of int.
BRANCH=none
BUG=none
TEST=buildall passes
Change-Id: If633641a581eeb6085b94bc727e23fb57f7cd435
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1889117
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For all boards that defined CONFIG_CHARGER, CONFIG_CHARGER_V2 is also
defined. Remove references to CONFIG_CHARGER_V2 from board header files.
Replace CONFIG_CHARGER_V2 in common C modules with CONFIG_CHARGER when
appropriate.
BUG=b:139699769
BRANCH=none
TEST=make buildall -j
Change-Id: I6b54baf4ad2406bbed629b6b272dad9ea6a81280
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1789420
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows us to use the IS_ENABLED condition to replace
the various ifdef guards around the CONFIG_ACCEL_FIFO
BUG=b:137758297,chromium:981990
BRANCH=None
TEST=buildall and CTS tests on Arcada
Change-Id: I65d36bac19855e51c830a33e6f3812575e8d15d9
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704164
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is needed to allow better testing of the fifo
behavior. Additionally, motion_sense_fifo.c will only be compiled
if CONFIG_ACCEL_FIFO is defined. This behaviour requires a few
small changes to several boards and baseboards to make
sure that we only define CONFIG_ACCEL_FIFO when the MOTIONSENSE
task is present (some times that may be only in one section RW or
RO).
BUG=b:137758297
BRANCH=None
TEST=buildall and ran CTS on arcada
Change-Id: I2f7e4e436ba9568a35b7a0b2c8d53a73f198ba73
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704163
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Commit-Queue: Alexandru M Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- adds channel offsets
- adds channel coeefficients for use in xyz translation
- enables LUX table use in anti-saturation algorithm
These values are from the "Color Sensor Calibration to Compensate
Cover Window Induced Error" document.
BUG=b:124512628
BRANCH=master
TEST=Flash and boot flapjack, verify that ALS and RGB sensors
are still generating data. I used alslog patch and enabled
saturation logging in EC console via "alslog 8". Verified LUX
calculation had < 1% error (driver read 0.1% lower than a $3k LUX
meter read). Verify that under a constant light source, the
adjustment mechanism correctly drives the ALS values such that
they land in the sweet spot between 90 to <100% of saturation.
Cq-Depend: chromium:1633269
Change-Id: I88ec0e23f93aebb542823bccf27aade566074f2b
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1665210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update board files for akemi, flapjack, hatch, kohaku,
and kukui to use new field names in als_calibration_t and
als_channel_scale_t.
BUG=b:124512628
BRANCH=master
TEST='make buildall' of the EC, verified builds succeed.
Cq-Depend: chromium:1633269
Change-Id: I7ee324ce3de3377cd1538b631f4ec6294d2e9078
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1711958
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a baseboard to reduce the effort of forking and maintaining kukui
derivatives.
This CL is intended to just moving things around, with minimal changes
to make compiler happy, complex logic changes will implement in subsequent
CLs.
BUG=b:137172860
TEST=build and deploy on a Krane
BRANCH=master
Change-Id: Ifd3ad5c3b03dce101cd15cbcec304f5e3a1081ac
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1695562
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The extentions were added to make the compiler perform most
of the verification that the conversion was being done correctly
to remove 8bit addressing as the standard I2C/SPI address type.
Now that the compiler has verified the code, the extra
extentions are being removed
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
TEST=verify sensor functionality on arcada_ish
Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Opt for 7bit slave addresses in EC code. If 8bit is
expected by a driver, make it local and show this in
the naming.
Use __7b, __7bf and __8b as name extensions for i2c/spi
addresses used in the EC codebase. __7b indicates a
7bit address by itself. __7bf indicates a 7bit address
with optional flags attached. __8b indicates a 8bit
address by itself.
Allow space for 10bit addresses, even though this is
not currently being used by any of our attached
devices.
These extensions are for verification purposes only and
will be removed in the last pass of this ticket. I want
to make sure the variable names reflect the type to help
eliminate future 7/8/7-flags confusion.
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
Change-Id: I2fc3d1b52ce76184492b2aaff3060f486ca45f45
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699893
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_MKBP_WAKEUP_MASK is a bit confusing and is wrongly named. The
comment stated that "With this option, we can define the MKBP wakeup
events in this mask (as a white list) in board level, those evets allow
to interrupt AP during S3.". However, these events are NOT MKBP events
at all but are instead host events. This commit tries to clear things
up by renaming CONFIG_MKBP_WAKEUP_MASK to
CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK to better show that these events are
in fact host events.
BUG=b:136282898
BRANCH=None
TEST=`make -j buildall`
Change-Id: I42beadec8217435fd30e679ccf52d784a8ef99a0
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685784
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPRINTS already prints a new line, no need to add another one.
Spotted during boot on kukui, and then realized there are many
more instances:
""
[3.689239 Module 7 is not supported for clock disable
]
""
BRANCH=none
BUG=none
TEST=make buildall -j
TEST=`git grep CPRINTS | grep "\\\\n\""` shows nothing of
interest.
Change-Id: I4d2bbbc65a91fa56c6e6115aa5c353bfd2b384a1
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660519
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/129746223,b/127720872
BRANCH=none
TEST=buildall
Change-Id: Idb2940893598f87add54c378bbf6573bb19f2dc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663261
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New boards (>= 4) use A14 for GPIO_TCS3400_INT_ODL while older boards
use it for WPC_EN_L. We enable interrupt for new boards. Older boards
don't use WPC_EN_L.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=Verify wireless charging works.
Change-Id: Iebfd9f7ea7078d1119c40a58cbede7db40c0e089
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1652622
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:124512628
BRANCH=master
TEST=none
Change-Id: I7cb9f44313fc64cc95ab47628e854fce0a4362b3
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1639646
Tested-by: Nick Vaccaro <nvaccaro@chromium.org>
Commit-Queue: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, tcpc_config assumes TCPCs are on I2C bus. ITE's EC has an
embedded TCPC.
This patch adds bus_type field to struct tcpc_config_t so that a TCPC
location on other type of bus can be specified.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=buildall
Change-Id: Ieac733011700b351e6323f46070dcf46d9e1154b
Reviewed-on: https://chromium-review.googlesource.com/1640305
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when a BC12 charger is plugged while wireless charging is
taking place, rt946x does not trigger detection because VBUS is already
supplied. This makes charge_manger see a BC12 charger as a WPC supplier.
This patch makes EC manually trigger BC12 detection when an AC charger
is plugged.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/127228934
BRANCH=none
TEST=Start charging on WPC. Connect a BC12 charger. Verify the supplier
switches to DCP (1.5A @5V).
Change-Id: I8e3439682515bf2241f6756a5386a7ad3ab2e14c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1593742
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Older boards (< 5) use A14 for WPC_EN_L. EC does not use this pin but it
has to leave it high-z.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=Verify wireless charging works.
Change-Id: I3d07fb10af0c7d07c434ea0e989b0921e8fb6cd5
Reviewed-on: https://chromium-review.googlesource.com/1621075
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, BATT_ID and LCM_ID are pulled up to 1800 mV. This causes
inaccurate reading by ADC.
We change the pull-up to 3300 mV. This patch adjusts the thresholds
accordingly.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/131857403
BRANCH=none
TEST=Verify LCM_ID and BATT_ID are read as expected on board_version=3.
Change-Id: I8693211fc6b1a40fb1b788d9c19db3d594f4bdf2
Reviewed-on: https://chromium-review.googlesource.com/1610427
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch export board_version, oem, sku so that they can be used in
other files.
It also changes the board_version size to uint8_t.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=Verify CBI info is printed expectedly.
Change-Id: Iadc82ce86d19fc4c0bc6eaceb64433b4e25d5dcf
Reviewed-on: https://chromium-review.googlesource.com/1621074
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when soc is above 85%, the input voltage is limited to 5V.
With this patch, the VBUS limitation is applied when soc > 85% and the
battery input current is below 1A. When discharging, VBUS can be kept
high.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BRANCH=None
BUG=b/124370341
TEST=Verify Flapjack can charge with a PD charger above 85%.
TEST=Verify VBUS is reduced to 5V when charged through USB-C.
TEST=Verify VBUS is reduced to 5V when charged through WPC.
Change-Id: Ib47d4881e04c68e5e93a2a2292b37c1471b5e79b
Reviewed-on: https://chromium-review.googlesource.com/1573208
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rename tsc3400_drv_data_t to als_drv_data_t
- change tcs3400 driver to use common als_drv_data_t
- change flapjack config to use common als_drv_data_t
- rename TSC3400_SCALE() macro to ALS_CHANNEL_SCALE()
- create and use new I2C_PORT_ALS definition
- fix a couple nits
BUG=b:124512628
BRANCH=master
TEST=build and flash to flapjack, verify ALS and RGB still work.
Change-Id: I9a45d255ff77794ef34026406c9b702a04e09c11
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1601052
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables full model of MAX17055.
BUG=b:130804959
BRANCH=none
TEST=The simple test steps which we used are as follows:
1. using DCP charger to complete two charge cycles.
2. Connect the serial cable to machaine, and collecting data of
the ec-command "battery 20000 10000"
3. Convert #2 battery log to excel form, and analyze test results
Change-Id: If07d7919142b4fcfb1f69972de70efc3d213bae3
Signed-off-by: YH Lin <yueherngl@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1575558
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- configure flapjack to use the tcs3400 ALS and RGB drivers
- configure signal connections for the tcs3400
- remove opt3001 ALS sensor
BUG=b:124512628
BRANCH=master
CQ-DEPEND=CL:1541955,CL:1551748
TEST=Cherry-pick CLs to add the tcs3400 RGB driver and
the tcs3400 ALS driver, build and flash to flapjack board
with tcs3400 int line wired to PA14, and verify chip is
interrupting and packaging up data.
Change-Id: I98aaa6bf4985b45cede497a08625b37b0620b0aa
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1561904
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch cleans up charger_profile_override to improve readability.
There is no functionality change.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=make BOARD=flapjack
Change-Id: Ifa5d216026a480da1da66dbb0204dfac8f1efff1
Reviewed-on: https://chromium-review.googlesource.com/1593751
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds Sunwoda batteries.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:130804959
BRANCH=none
TEST=make BOARD=flapjack
Change-Id: Iada9b3248b34315c687ab64b3331ca596f0ef956
Reviewed-on: https://chromium-review.googlesource.com/1593750
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EOC should be set according to the battery specifications
of different projects.
BUG=b:128891165
BRANCH=none
TEST=Do a full charge test
Change-Id: I073a246e7694f277929f3159bb4d8692ac772b58
Reviewed-on: https://chromium-review.googlesource.com/1559096
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For C18
Dimension Panel Name IC LCM_ID
8 inch BOE TV080WUM-NG0 HI8279D 212 mV
8 inch AUO NT51021D NT51021D 1027 mV
For C19
Dimension Panel Name IC LCM_ID
10 inch BOE TV101WUM-NG0 HI8279D 74 mV
10 inch INX OTA7290D OTA7290D 1191 mV
BUG=b/130804956
TEST=Boots correctly on Flapjack
BRANCH=none
Change-Id: Ia79e6fa0dc08384e75a3dd88dc78d51c7e12831f
Reviewed-on: https://chromium-review.googlesource.com/1575040
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements get_battery_manufacturer_name to return a
manufacturer name of the detected battery.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/129599895
BRANCH=none
TEST=Verify battery command prints 'C19_ATL'.
Change-Id: I0ce63c0c62129fbc3b176b75ce2075c9cc649531
Reviewed-on: https://chromium-review.googlesource.com/1590040
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, if a charger shows Rp=USB on USB-C port, the charge manager
chooses it and sets the max current to 500 mA even if it can provide
higher power as a BC 1.2 charger.
This patch introduces CONFIG_USBC_DISABLE_CHARGE_FROM_RP_DEF. When it's
defined, a BC 1.2 charger won't be recognized as a USB-C charger.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/131353444
BRANCH=none
TEST=Charge Flapjack from BC 1.2 charger on USB-C port.
Change-Id: I50969973026185dd2aecdb768985cd116c1d32f7
Reviewed-on: https://chromium-review.googlesource.com/1586580
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when the brightness passed to led_set_brightness is zero,
the current is set to 4mA and the pwm duty is set to the brightness.
Since duty == 0 means 1/32 (instead of 0/32), this doesn't turn off
the LED.
This patch makes the current explicitly set to 0mA if the brightness
is zero.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/131205169
BRANCH=none
TEST=buildall
Change-Id: I7f581349713d30f10acb3797ab08b15aa2d50f00
Reviewed-on: https://chromium-review.googlesource.com/1584351
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LCM_ID's bit size is 4. Thus, PANEL_UNINITIALIZED should be 0xf.
This fixes 'bitwise comparison always evaluates to false' error.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Cq-Depend: chromium:1586582
BUG=none
BRANCH=none
TEST=make BOARD=flapjack
Change-Id: Ib9c43cb7b929f902cdced627e1d40669ae365775
Reviewed-on: https://chromium-review.googlesource.com/1585398
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b9bf62a7aea6e71e3faec26894e9f75c3d435afa.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "flapjack: do not carry LCM_ID with old board"
>
> This reverts commit 6549da39d519b4d07e8bca7bef0393549765412b.
>
> Reason for revert: this breaks building (run make buildall -j)
>
> Original change's description:
> > flapjack: do not carry LCM_ID with old board
> >
> > With older boards there is no need to carry LCM_ID in SKU_ID
> > since it's not available. In this way it can be compatible with
> > the sku_id defined for older boards.
> >
> > BUG=b:129569858
> > TEST=build and verify the sku_id on older board.
> > BRANCH=None
> >
> > Change-Id: I68d8c380660eed7633b9c38a21ccd5c6ca536587
> > Signed-off-by: YH Lin <yueherngl@chromium.org>
> > Reviewed-on: https://chromium-review.googlesource.com/1584381
> > Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
>
> Bug: b:129569858
> Change-Id: Iefd5df18f786dc4d3fb720c18545e9109cc54e0a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1586185
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
> Tested-by: Mathew King <mathewk@chromium.org>
Cq-Depend: chromium:1585398
Bug: b:129569858
Change-Id: Ic76e01ca07f32623c0de9f64f31e77cb331df5bf
Reviewed-on: https://chromium-review.googlesource.com/1586582
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6549da39d519b4d07e8bca7bef0393549765412b.
Reason for revert: this breaks building (run make buildall -j)
Original change's description:
> flapjack: do not carry LCM_ID with old board
>
> With older boards there is no need to carry LCM_ID in SKU_ID
> since it's not available. In this way it can be compatible with
> the sku_id defined for older boards.
>
> BUG=b:129569858
> TEST=build and verify the sku_id on older board.
> BRANCH=None
>
> Change-Id: I68d8c380660eed7633b9c38a21ccd5c6ca536587
> Signed-off-by: YH Lin <yueherngl@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/1584381
> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Bug: b:129569858
Change-Id: Iefd5df18f786dc4d3fb720c18545e9109cc54e0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1586185
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Mathew King <mathewk@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With older boards there is no need to carry LCM_ID in SKU_ID
since it's not available. In this way it can be compatible with
the sku_id defined for older boards.
BUG=b:129569858
TEST=build and verify the sku_id on older board.
BRANCH=None
Change-Id: I68d8c380660eed7633b9c38a21ccd5c6ca536587
Signed-off-by: YH Lin <yueherngl@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1584381
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds P9221 driver and enable it for Flapjack.
The driver originates from https://android.googlesource.com/kernel
/msm/+/android-msm-bluecross-4.9-pie-qpr1/drivers/power/supply/qcom
/p9221_charger.c
CQ-DEPEND=CL:1445133 CL:1551583
BRANCH=none
BUG=b:126162615
TEST=Verify charging from PD and WPC as follows:
1. Charge with PD charger. Place DUT on WPC charger.
-> PD charger continues to charge.
2. Unplug PD charger.
-> WPC starts charging as GPP.
3. Plug PD charger.
-> PD charger starts charging at 2A@9V
TEST=Verify OTG and WPC functionality as follows:
1. Plug fan to USB port:
-> Fan spins
2. Place DUT on WPC charger:
-> WPC starts charging as GPP. Fan continues to spin.
3. Remove DUT from WPC charger:
-> Fan continues to spin.
4. Do 1 and 2 then unplug USB fan:
-> WPC starts charging.
TEST=/sys/class/power_supply/CROS_USBPD_CHARGER0/usb_type is BrickID
/sys/class/power_supply/sbs-12-000b/status is ok
Change-Id: I5fbd0237cedd8095f98582c39973d432e733f2cd
Signed-off-by: Tony Zou <zoutao@huaqin.corp-partner.google.com>
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1448193
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes EC use the PWM mode of MT6370 to control the brightness
of the LEDs. This makes the colors match the requirements.
Current is fixed at 4mA. Brightness is controlled by PWM duty only.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/130197491
BRANCH=none
TEST=Verify the colors (amber, off, red, white) match the description.
Change-Id: Iacce4cc75af9b278ef77dcb2ececaf67a7631143
Reviewed-on: https://chromium-review.googlesource.com/1572452
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes EC embed LCM_ID read from ADC in SKU_ID.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/129569858
BRANCH=none
TEST=Read LCM_ID properly
Change-Id: Ia0edfec82d40f70f44ecf00dc18564863e8acc2f
Reviewed-on: https://chromium-review.googlesource.com/1573202
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when a battery is connected, the device boots immediately.
This makes assembly process unreliable.
This patch makes EC cut off a battery at start-up if USBC_THERM reads
about the pull-up voltage because that indicates a USB-C board isn't
connected, which means the devices is being assembled.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/124540674
BRANCH=none
TEST=Verify a battery is cut off when a USB-C board isn't connected.
Verify a battery isn't cut off when a USB-C board is connected.
TEST=Verify ADC reads 715 mV even when the thermistor is iced.
Change-Id: Iadc756f8705abe083a5d56b5d8ad080dbff15b6a
Reviewed-on: https://chromium-review.googlesource.com/1520950
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copy from kukui, update the mux info which would be used by AP.
TEST=1. Modify dts, and enable extcon-usbc-cros-ec kernel module
2. cat /sys/devices/platform/*/extcon/extcon0/state, and see
when DP plugged:
USB=0
USB-HOST=1
DP=1
when DP unplugged:
USB=0
USB-HOST=1
DP=0
BUG=b:130338464
BRANCH=None
Change-Id: I3ac00e47426d56bf926943d04b91f40391d98deb
Reviewed-on: https://chromium-review.googlesource.com/1564492
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Jessy Jiang <jiangchao5@huaqin.corp-partner.google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FAFT no longer needs a workaround to make a DUT detect a USB drive in
recovery mode. See chromium:779260 and CL:1545543 for more info.
This saves about 1.4 kB.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/129746223,b/127720872
BRANCH=none
TEST=buildall
Change-Id: If6d7348f97cef02e68e162c22d00a24db5459d69
Reviewed-on: https://chromium-review.googlesource.com/1560339
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|