summaryrefslogtreecommitdiff
path: root/board/servo_micro
Commit message (Collapse)AuthorAgeFilesLines
* servo_micro: add parity settingNick Sanders2017-07-131-6/+50
| | | | | | | | | | | | | | 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>
* common/update_fw: Remove board-specific rw_sectionsNicolas Boichat2017-04-151-21/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* usb: Cleanup headersNicolas Boichat2017-03-161-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* cr50: Have INAs and I2Cm enabled when rdd is attachedScott2017-02-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* usb_i2c: refactor into commonNick Sanders2016-11-022-1/+4
| | | | | | | | | | | | | | | | 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>
* servo_micro: increase SPI clockNick Sanders2016-08-081-2/+1
| | | | | | | | | | | | | | 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_v4: servo_micro: cr50: fix usb power declarationNick Sanders2016-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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>
* servo_micro: add USB updaterNick Sanders2016-07-213-21/+45
| | | | | | | | | | | | | | | | | 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>
* servo_micro: support servo micro v2, console gpioNick Sanders2016-07-203-67/+34
| | | | | | | | | | | | | | | * 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>
* Remove Makefile symlinks under board directoryDaisuke Nojiri2016-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* servo_micro: add programmable serial numberNick Sanders2016-05-262-3/+4
| | | | | | | | | | | | | | | | 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>
* servo_micro: add gpio mode get and setNick Sanders2016-04-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* servo_micro: add initial servo_micro buildNick Sanders2016-03-166-0/+459
* 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>