| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The string USB_STR_SPI_NAME clearly was meant for defining the ASCII
label on the USB endpoint used for forwarding of SPI transactions by
servo micro and similar devices. However, it seems that it was
accidentally left unused.
This CL will add an ASCII label to the SPI endpoint (similar to how
UART and I2C forwarding endpoint have textual labels.)
Also, this CL adds a new CONFIG_USB_SPI_BUFFER_SIZE which can be used
by particular boards to override the default amount of memory reserved
for forwarding between USB and SPI. That is, the maximum size of a
single SPI transaction that can be forwarded. (The default of 298 is
too small for the future HyperDebug board, which will serve as similar
purpose to the Google's servo for OpenTitan development.)
Signed-off-by: Jes B. Klinke <jbk@chromium.org>
BUG=b:192262089
TEST=Watch forwarding of 2048 byte transactions on HyperDebug
BRANCH=None
Change-Id: Ic060194c19b0c2f33f6e861252d5fb5e993349b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3309365
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Commit-Queue: Jes Klinke <jbk@chromium.org>
Tested-by: Jes Klinke <jbk@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all instances of i2c_ports[] to use declared initializers. This
allows the fields to be reordered without breaking code.
BUG=none
BRANCH=none
TEST=compare_build.sh
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I7eb605c0a87fad9b803955fa6ae34d39d71ad27a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300660
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update SPI references to controller/peripheral for inclusivity.
BUG=b:163885307
BRANCH=none
TEST=compare_build.sh
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I19b02fb949aad9ade569c4658a904e9ce59e27c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3066272
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
find . -name '*.md' | xargs sed -i 's#refs/heads/master#HEAD#g'
find . -name '*.md' | xargs sed -i 's#+/master#+/HEAD#g'
BRANCH=none
BUG=none
TEST=view in gitiles
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Iaac99ddc3463c8c7bb08038214e3eb22951db6a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3188552
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the CONFIG_SPI_MASTERR config option with
CONFIG_SPI_CONTROLLER.
BRANCH=none
BUG=b:181607131
TEST=make buildall passes;
"compare_build.sh -b all" shows no difference
Change-Id: I3c921085179294765baadf7074652978fe04a4ed
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932465
Reviewed-by: Craig Hesling <hesling@chromium.org>
Commit-Queue: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:178648877
TEST=view in gitiles
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I0ac5581ba7bc512234d40dbf34222422afa9c725
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2650551
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than passing in the port and iterating over the global
spi_devices variable, pass in the specific spi_device that is being
enabled/disabled. The spi_device_t struct has the port.
This change makes the functions in spi.h more consistent since they now
all take a spi_device_t*. This change is the first step in making the
SPI configuration more dynamic.
BRANCH=none
BUG=b:177908650
TEST=git grep 'spi_enable(CONFIG' => no results
TEST=make buildall
TEST=Flash dragonclaw v0.2 and view console to verify FP sensor ID
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I64124e0ebcf898e88496acb77703b5f59ae931c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2654081
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL extends CONFIG_I2C_XFER_LARGE_READ to also support large
(greater than 255 bytes) write.
Related config name is also updated to reflect the behavior change,
BUG=b:169651794
TEST=flash fw successfully on Zed.
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: Icb889013da01f48708cd0227207561b8186bac63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2537412
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename CONFIG_I2C_CONTROLLER and related comments.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ied6a1829bf54a5c9a32e6772982a4b8aa31aaf23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518659
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When servo_micro is forwarded to a remote machine with usbip
(go/chromeos-wfh-tools#usbip) and the FPMCU console is on USART2, I see
dropped characters:
> help
Known commands:
chan flashwrite gpioset reboot sysinfo
crash fpcapture hc history rw taskinfo
flashinfo e info; HELP CMD = help on CMD.
This doesn't happen when using the same setup with servo_micro's USART3,
which has a larger queue size of 1024, so increase USART2 queue size to
match.
BRANCH=none
BUG=b:147849609
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I5badc239dad866eba0571b3626961b1008979273
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2229296
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Single source the VDD rail sagging reset interrupt
Add VDD detection to C2D2 as well.
BRANCH=servo
BUG=none
TEST=builds
Change-Id: Iceac7d9fa7a9bde5a3c23c36e63b6d635d8812a3
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2064593
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for servo_micro and c2d2 to sharing the ite, i2c flashing
code, move it to a stm specify common file. It is STM specific because
it explicitly uses STM registers to accomplish the non-compliant i2c
waveforms needed to put the ITE EC into flash mode.
BRANCH=servo
BUG=b:148610186,b:79684405
TEST=flash ampton with servo_micro using this code
Change-Id: Ia0f3f944df2f8a8ad47ea5a62c5f0edae2c71943
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2064592
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add flags field to stm and g chip usb spi configuration. This is unused
for g chip, but added for consistency.
BRANCH=none
BUG=b:147353903
TEST=builds
Change-Id: Ie2aa88ae09e8f6f4049ba13fe4565901c604b92c
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1995603
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-by: Brian Nemec <bnemec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enables the programmable voltage detector (PVD) interrupt in
ServoMicro. This interrupt fires when the supply voltage drops
from the expected 3.3V to under 2.3V after power on. This gives
several hundred microseconds of time for the device to respond
to the power reduction.
In order to ensure that the ServoMicro does not enter a
non-responsive state, it triggers a reboot of the system to
restore it to a good configuration.
BRANCH=servo
BUG=chromium:1023715
TEST=Configured GPIO output to trigger on pvd_interrupt()
and verified the interrupt fires during the following
situations using Saleae analyzer:
* USB Power removed from working device
* Ramping supply voltage from 1.5V to 5V with a DC supply
* Repoducing failure condition from crbug/1016051
1 Connect ServoMicro to Cyan board
2 dut-control power_state:on
3 dut-control fw_wp_vref:pp3300
4 dut-control power_state:off
5 GPIO toggles and system reset occurs
Change-Id: I721f48ab84b01d52a5f98747cc9d879ff2876a07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911759
Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Brian Nemec <bnemec@chromium.org>
Commit-Queue: Brian Nemec <bnemec@chromium.org>
Auto-Submit: Brian Nemec <bnemec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do not need to shutdown the UART to take control of the RX pin, we
can simply de-mux the pin from UART and make it a GPIO temporarily.
BRANCH=none
BUG=none
TEST=builds and tested same code on c2d2 implementation. My reworked
servo micro is no longer working for the EC console (without this
change)
Change-Id: Ie0aeb73e58aea08d42a32d47431ac36cd977b8ba
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2001124
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enables LTO (Link Time Optimization) in order to improve
flash space on ServoV4. Current builds have 48B remaining,
the link time optimization frees up 6kB of space in the flash.
Feature was enabled on ServoMicro and sweetberry.
BRANCH=servo
BUG=b:145512023
TEST=Manually tested flashing process to ensure they updated
both regions, basic communication, and functionality on the
following platforms: ServoV4, ServoMicro, and Sweetberry.
Change-Id: I8f7a0d23478581c54a7379241a0290b897a635ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1961149
Tested-by: Brian Nemec <bnemec@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some servo micros will fail to jump to RW if we leave the USART hardware
modules active during the RW jump and the RW jump tries to change the
gpio flags to anything other than alternate in gpio.inc.
We would like the state transition from RO to RW to be as clean as
possible, so shutdown the hardware modules that RW will reinitialize in
board_init right after the jump
BRANCH=servo
BUG=b:144356961
TEST=flash this image on a bad servo micro, the remove then change
GPIO_ALTERNATE to GPIO_INPUT and reflash and see that it sauce's fully
flashes from then on
Change-Id: I81fcbbcda9f63761a719f6e0cb6bb4cf6962f18f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1922240
Tested-by: Brian Nemec <bnemec@chromium.org>
Reviewed-by: Brian Nemec <bnemec@chromium.org>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To enabled UART (UUT) programming mode for some ECs, we need to
drive the EC_TX_SERVO_RX line low while the EC is rebooting.
Add a console command that is controllable by dut-control that will
drive the UART pins low while the UART is disabled, until the command to
re-enable the UART is sent on the console.
Also, remove unnecessary alternate mode initialization for USART4
(UART3).
BRANCH=firmware-servo-11011.B
BUG=b:143163043
TEST=flashed phaser with reworked servo_micro
Change-Id: I1af1af7b48bf446936211740e16008a80ab2a39f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1884190
Reviewed-by: Keith Short <keithshort@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's simply a bad idea to describe a macro in multiple locations.
It'll make it hard to change. It'll be difficult to keep all
locations in sync.
This patch replaces the comment duplicated in all ec.tasklist with
a pointer to the CONFIG_TASK_LIST definition. The macro will be
described in a single place (just like all/most other macros).
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=buildall
Change-Id: Id658b9d68e742e4334c692b804d9c98c8de21313
Reviewed-on: https://chromium-review.googlesource.com/1551579
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>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Requested for linux integration, use BIT instead of 1 <<
First step replace bit operation with operand containing only digits.
Fix an error in motion_lid try to set bit 31 of a signed integer.
BUG=None
BRANCH=None
TEST=compile
Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1518659
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:79684405
TEST=This makes block_write_size up to 254B in iteflash work,
and makes 256B verification reads work.
Change-Id: I887f0eaacc87428a4646007520f27bdf5aaa231a
Signed-off-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1351517
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bigger packets help increase the bandwidth a little bit.
BRANCH=servo
BUG=chromium:876651
TEST=With the servod patch to increase read sizes to 256 bytes
(CL:1202090), usart_test usart3 shows an improved time to
transfer 64kb from 0.671 seconds to 0.611.
Change-Id: I849c9cea70b25b5b2d6cd7ab15f56b81cdb297d9
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1202545
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We set the baud rate in increments of 100 baud, to avoid
overflowing the 16-bit wValue integer (921600 is the highest we
are likely to use).
Also, increment the buffer size for USART3 to 1024 bytes. That
helps a bit to avoid losing characters, but we still can't keep
up if the host is printing at maximum speed.
BRANCH=servo
BUG=chromium:876651
TEST=baud usart2/3/4 115200 in servo_micro console
TEST=dut-control cpu_uart_baudrate:921600
seq 1 1000 shows numbers 1 to 226 before buffer overflows
Change-Id: Ifca266189f93def493f207dd29d2cceca4d8d68f
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1189782
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UART3 and 4 had DMA collisions. Remove DMA from UART4.
BRANCH=servo-9040
BUG=b:112701646,chromium:865478
TEST=reboot EC, no crashy
Change-Id: Ic44b363dafe938d6420b350eb1c5ab796da81f3c
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1188514
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename i2c_xfer to i2c_xfer_unlocked. Audit all users of i2c_xfer to
see if they can use simple locking semantics or require their own
locking. Since locked accesses are only safe for I2C_XFER_SINGLE
transactions, remove the flags parameter from i2c_xfer. This also makes
the audit a bit easier.
Some remaining applications hold the bus locked across several
transactions that would otherwise be atomic, and a few others implement
complex I2C transactions in multiple commands.
Add a (nondeterministic) verification on the I2C port locking
correctness. This will catch all statically incorrect locking patterns,
although dynamically incorrect locking patterns may not be caught.
Related: Revise the i2c_port_active_count to be a bitmap of the active
ports instead of a count of the active ports. The EC's mutex does not
provide an is_locked() primitive, and we would prefer not to have one.
- board/glados: Custom locking for battery reset
- board/mchpevb1: Custom locking for battery reset
- board/oak: Custom locking for battery reset
- board/samus: Custom locking for lightbar reset
- board/sweetberry: simple locking
- board/servo_micro: Custom locking for funky i2c transfers
- capsense: simple locking
- host_command_master: multi-command transactions
- lb_common: manual locking to support samus power sequence
- smbus: multi-command transactions
- usb_i2c: simple locking
- driver/tcpm/fusb302: simple locking and multi-command transactions
- driver/tcpm/tcpi: Forward _unlocked and implicitly locked interface to
fusb302
- driver/touchpad_elan: simple locking
BUG=chromium:871851
BRANCH=none
TEST=buildall; very careful audit
TEST=grunt clamshell and Coral clamshell, test boot, battery charging,
PD communication, and TCPC port low-power mode.
Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Change-Id: Ieabf22bcab42780bdb994fca3ced5d8c62519d56
Reviewed-on: https://chromium-review.googlesource.com/1169913
Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
servo_micro can drop incoming UART chars is there are
unfortunately timed interrupts. We'll add DMA RX and
extra queueing.
BRANCH=servo
BUG=b:80540170,chromium:865478
TEST=stress servo_micro console and ec console. No chars dropped anymore.
Change-Id: I939bec0862c318686a0215ec8081823aa8c35fec
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1175321
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enable_ite_dfu: Enable direct firmware update (DFU) over I2C mode on
ITE IT8320 EC chip by sending special non-I2C waveforms over the
I2C bus wires.
get_ite_chipid: Verify that DFU mode is enabled by querying the EC over I2C
for its CHIPID1 and CHIPID2 registers. It will only respond over I2C when
in DFU mode.
BRANCH=none
BUG=b:79684405
TEST=get_ite_chipid succeeds after enable_ite_dfu
Change-Id: Ief2c12ebd902285ea3d285767deb8d35c0017592
Signed-off-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1152565
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This resolves occasional stack overflows.
BRANCH=none
BUG=b:79684405
TEST=No longer getting stack overflows.
Change-Id: Ib9188b4e4e0c5c87f34c87f490ae8bc26e34e041
Signed-off-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1152564
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add markdown documentation (from reviewed doc) for the Servo Micro as
an example of CCD.
Tested with emacs markdown preview (markdown package) which is almost
the same as gitiles.
BUG=none
BRANCH=none
TEST=emacs markdown preview
Signed-off-by: Mark Hayter <mdhayter@chromium.org>
Change-Id: Ic5877a3b80313089ab9c79e376b4ee1f58e573eb
Reviewed-on: https://chromium-review.googlesource.com/996893
Commit-Ready: Mark Hayter <mdhayter@chromium.org>
Tested-by: Mark Hayter <mdhayter@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This sets power on defaults for UART3 to be routed to
the glados style uart-on-jtag pinout. This is pretty
standardized going forward.
BUG=None
BRANCH=servo-9040.b
TEST=miniterm.py /dev/google/Servo_Micro-2-1.2/serial/Servo_UART3
Change-Id: I397df8fc09da681eba28cae489e2f6eaef8a87d0
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/813180
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows ec and cpu uart to start enabled,
so console or google serial can be used to log
output without servod.
Rename endpoints to be clearer in the non-servod
usecase. UART1 -> EC, UART2 -> CPU.
BUG=None
BRANCH=servo
TEST:miniterm.py -d /dev/google/Servo_Micro-2-1.2/serial/EC
Change-Id: Ifd3b753a459fdd9b80d84cc6e4ec9cde1ccb74e0
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/804899
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are not used by usb_i2c.c on chip/stm32, let's
move them to board/cr50 which is the only place where they are
used.
BRANCH=none
BUG=None
TEST=make buildall -j
Change-Id: I8c1b292838b8dbee9a9001add9332e0add80c342
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/778749
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows setting TXINV/RXINV bits.
BRANCH=none
BUG=b:65697962
TEST=make BOARD=wand -j
Change-Id: Ib1bb290cd9758c53b98c8fc1ca1a9369c8cff39e
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/694561
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Stefan Reinauer <reinauer@google.com>
BRANCH=none
BUG=none
TEST=The following sequence passes
sudo emerge coreboot-sdk
export CROSS_COMPILE_arm=/opt/coreboot-sdk/bin/arm-eabi-
export CROSS_COMPILE_i386=/opt/coreboot-sdk/bin/i386-elf-
export CROSS_COMPILE_nds=/opt/coreboot-sdk/bin/nds32le-elf-
make buildall -j
Change-Id: I4cafbcd70efd6bdf102f848f1cca4772b4ccd10e
Reviewed-on: https://chromium-review.googlesource.com/595207
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add usb_i2c_board_is_enabled().
On Cr50, this is now also connected to the I2C CCD capability. The
USB-I2C bridge can only be used when the capability is available.
On other platforms (Servo V4, etc.) where usb_i2c_board_enable() is
a no-op, add a dummy implementation which always returns true.
See go/cr50-ccd-wp for more information.
BUG=b:62537474
BRANCH=cr50
TEST=manual with CR50_DEV=1
Connect host PC to dev board USB port
On host PC:
sudo servod -c ccd_cr50.xml -c reef_r1_inas.xml
dut-control pp3300_ec_shv_reg --> fail, error 0x8001
ccdoops --> reset I2C config
ccd i2c disable --> I2C disabled
On host PC:
sudo servod -c ccd_cr50.xml -c reef_r1_inas.xml
dut-control pp3300_ec_shv_reg --> fail, error 0x0006
ccd i2c enable --> I2C enabled
ccdunlock --> I2C disabled
ccdoops --> I2C enabled
ccdset i2c unlesslocked
ccdlock --> I2C disabled
ccdunlock --> I2C enabled
Change-Id: Ia3df32e239a5f7c5915bc6c7e408ce0dc8b26c89
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/590577
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a control interface to set parity
for USB-UART bridge.
BRANCH=None
BUG=b:37513705
TEST=parity settable on command line or by servod
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: Ib859a70981162be58edfa79c7cb267e0084e05e6
Reviewed-on: https://chromium-review.googlesource.com/564150
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rw_sections is defined in the exact same way on all common code
boards, let's remove it, and hard-code the values in update_fw.c
instead.
Take this as an opportunity to fold set_valid_section in
fw_update_start (this will be useful later on, as we also
want to return the inactive region version).
BRANCH=none
BUG=b:35587171
TEST=make buildall -j
TEST=Can update hammer over USB using usb_updater2
Change-Id: I4dd3224f17f89c1851c379255f1195dc54528b3d
Reviewed-on: https://chromium-review.googlesource.com/476451
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's split the usb headers in 3 different parts, instead of having
usb_descriptor.h pull in usb_hw.h and usb_api.h.
- usb_api.h: EC functions related to usb (e.g. connect/disconnect)
- usb_descriptor.h: common USB names and structures
- usb_hw.h: Functions required for interactive with EC's USB HW
BRANCH=none
BUG=b:35587171
TEST=make buildall -j
Change-Id: I37ead61e3be5e7ae464f1c9137cf02eaab0ff92e
Reviewed-on: https://chromium-review.googlesource.com/454861
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The INAs are only used for development and testing
purposes. Therefore, the 3.3V rail to the INAs is off by default and
the I2Cm module is not enabled. Enabling INA power and connecting the
I2Cm module was done at the beginning of each USB to I2C request. The
problem with this approach is that INA measurments didn't always
succeed due to not enough time for the INAs to initialize.
Rather than add some arbitrary delay, it is better to tie the INAs to
when rdd is attached/detached. It is only when rdd is attached that
the INAs will be accessed, so there is no need to enable/disable for
each individual I2C transaction.
This CL ties the enabling/disabling of the INA and I2Cm module to the
rdd state. This change makes the previous use of
usb_i2c_board_enable() and usb_i2c_board_disable() obslete.
BRANCH=none
BUG=chrome-os-partner:62375
TEST=manual
Connect servo with suzyq connected:
sudo servod -p 0x5014 -b eve -c eve_r0_inas.xml
Then execute single INA reads dut-control pp3300_dx_edp_mv and verify
that it returns meaningful numbers. Without this CL single reads via
dut-control would always return 0.
Change-Id: I799552bfd0701efd1828a0d720ac2a6cedee5ca1
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/436864
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This combines stm32 and chip/g usb_i2c interfaces so they
will not diverge. Note that this fixes the chip/g implementation
to use 8-bit i2c addresses.
BUG=chrome-os-partner:57059
BRANCH=none
TEST=servod interacts with servo_micro and servo_v4
Change-Id: Ibff217d84b132556202c8a71e3d42c07d546c634
Reviewed-on: https://chromium-review.googlesource.com/405108
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While SPI routing on servo is not great, this is still fine
and asn't as painfully slow.
BUG=chromium:571477
TEST=flash some firmware
BRANCH=None
Change-Id: I26d67ed6cd1ba62a892388e96a21acc708265fc4
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/366670
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Servo_micro sets usb config maxpower to 100mA.
Servo_v4 is set to self powered as it's powered by a
shared vbus and not be the bub it's connected to.
cr50 is self powered as no power is transmitted as part of CCD.
* Add CONFIG_USB_MAXPOWER_MA to define USB maximum power draw requested
per board.
* Add CONFIG_USB_SELF_POWERED to indicate that a device is not
powered by allocated USB power.
BUG=chromium:631302
TEST=lsusb reports 100mA bMaxPower (micro), Self powered (v4)
BRANCH=None
Change-Id: I79b8ce46f32d94f16104a4a8080104e30dce7f2c
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/363153
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a Google FW update endpoint to
servo micro in place of a GPIO enpoint.
BUG=chromium:571477
TEST=successfully update servo micro via usb
BRANCH=None
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: I3d6c501d515b3f1db6e8259fbb829abe18f72e00
Reviewed-on: https://chromium-review.googlesource.com/361834
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove GPIO USB endpoint to make room for update endpoint.
* Change GPIO mapping slightly to support servo micro v2.
BUG=chromium:571477
BRANCH=None
TEST=run servod, see new controls.
Change-Id: Id3b85b4c77b8f21afd9636b2ee459ace6f42f68e
Reviewed-on: https://chromium-review.googlesource.com/361383
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature is inconsistent. Not all boards have such a symlink
(for a obvious reason).
This feature is fragile. It's most likely not tested and going to be
broken if not already. Developers won't like it if they have to test
two different ways to build boards before submitting patches.
This feature is not necessary. If you build EC in the standard way
(e.g. make BOARD=samus), these symlinks are not needed.
This feature is wasteful. Extra disk spaces are used and extra lines
are added to Makefile (increasing code complexity slightly).
BUG=chromium:626776
BRANCH=none
TEST=make buildall
Change-Id: Id5444284d773cb0e9225f39abd877441b8f61440
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359321
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change provides a console command for setting,
and loading a usb serial number from flash. This
feature adds CONFIG_USB_SERIALNO, and currently only
has a useful implementation when PSTATE is present.
BUG=chromium:571477
TEST=serialno set abcdef; serialno load; reboot
BRANCH=none
Change-Id: I3b24cfa2d52d54118bc3fd54b276e3d95412d245
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/337359
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GPIO console commands currently only show input voltage level,
and can only set level on predefined outputs.
This change allows GPIOs to be cycled between output, input,
and alternate function, as well as displaying the mode and
asserted level (if any) in gpioget.
This change creates CONFIG_CMD_GPIO_EXTENDED
as the internal gpio interface needs to be changed to support
this, and I can't test the other architectures. It may be
worthwhile to add this for all, or not.
This change is also necessary also for servo micro JTAG and PD
UART support, as several pins are tied together on the flex
and stm32 outputs need to be variously active or in high-z
depending on mode.
BUG=chromium:571477
TEST=gpioget <0|1|IN|A|ALT>; gpioget;
BRANCH=None
Change-Id: Iba32992db6244ee1e654db840d1c9c11dd2a0993
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/338885
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
* Update flash_ec to allow flashing servo_micro
* Add servo_micro build
BUG=chromium:571477
BRANCH=None
TEST=updated servod is able to control gpio, gpio extender,
SPI flash, ec uart, ap uart on test yoshi
Signed-off-by: Nick Sanders <nsanders@google.com>
Change-Id: I4d69c83ae581cb41da928a27c39b7152475d7ca8
Reviewed-on: https://chromium-review.googlesource.com/327214
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|