summaryrefslogtreecommitdiff
path: root/board/hoho/board.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: Remove special case for iVersion string descriptorAnton Staaf2014-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the version string was special cased in the USB stack because the build system prevented the inclusion of ec_version.h in any file other than common/version.c. This lead to common/version.c being the only place that the USB version string could be computed and thus the special case of filling in the version string descriptor at run time. This made the USB stack more complex, and lead to the common/version.c file including usb.h, which is actually STM32 specific. Now, the portion of ec_version.h that is deterministic is only updated when something in the tree actually changes (by way of a conditional in the makefile), and ec_version.h no longer has to depend on all object files (other than the special version.o). This allows anyone to include ec_version.h as needed. In particular, each board that wants to define a USB version string can directly include ec_version.h and do so. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j touch files and verify rebuilds happen correctly Change-Id: Ic84d0b9da90f82ebb4630fb550ec841071e25a49 Reviewed-on: https://chromium-review.googlesource.com/227211 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
* pd: dingdong/hoho: HPD over USB PD.Todd Broch2014-10-301-2/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HPD needs to be transported of USB PD as both SBU lines are consumed for differential AUX signalling. This CL does the following: 1. Enables GPIO DP_HPD as interrupt 2. Sends debounced HPD across CC via the SVDM DP status message BRANCH=none BUG=chrome-os-partner:31192,chrome-os-partner:31193 TEST=manual, From servo w/ GPIO attached to HPD drove the following transactions after inserting with HPD low initially: # e1: hpd_high # e2: hpd_low # non-registered glitch # e3: hpd_high followed by hpd_low # e4: hpd high # non-registered glitch # e5: hpd_irq # e6: hpd_irq # e7: hpd_irq # e8: hpd_low followed by hpd_high From fruitpie console (marked up to show result of above) ----> enter-mode, dp status, dp config [6.774108 DONE] SVDM/1 [4] ff018144 [6.777467 DONE] SVDM/2 [16] ff018150 00000002 [6.780637 DONE] SVDM/1 [17] ff018051 ----> attentions start arriving ----> e1 [18.966741 DONE] SVDM/2 [6] ff018106 0000008a ----> e2 [33.724367 DONE] SVDM/2 [6] ff018106 0000000a ----> e3 [64.550398 DONE] SVDM/2 [6] ff018106 0000008a ----> e3 [64.752452 DONE] SVDM/2 [6] ff018106 0000000a ----> e4 [74.247127 DONE] SVDM/2 [6] ff018106 0000008a ----> e5 [88.906254 DONE] SVDM/2 [6] ff018106 0000010a ----> e6 [100.938738 DONE] SVDM/2 [6] ff018106 0000010a ----> e7 [123.693414 DONE] SVDM/2 [6] ff018106 0000010a ----> e8 [130.050074 DONE] SVDM/2 [6] ff018106 0000000a ----> e8 [130.254087 DONE] SVDM/2 [6] ff018106 0000008a Change-Id: I976c268467ece84cedab7ba4943fb59d1e48c113 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223262 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* usb: export firmware versionVincent Palatin2014-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Remove the meaningless version string in iSerialNumber, which was incorrect since this string should be unique to a device if it exists. Export the firmware version string as the configuration string, so it's traceable to a given firmware build/sources. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=samus BUG=none TEST=make buildall from a workstation, do "sudo lsusb -v" and see the full version string exported as the configuration name. Change-Id: I557df2936421e2926ac0fc0003888370cec3e201 Reviewed-on: https://chromium-review.googlesource.com/222877 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
* hoho: Add USB Billboard class device.Todd Broch2014-10-111-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=chrome-os-partner:31192 TEST=manual Plug hoho into samus and see: # lsusb -d 18d1:5010 -v Bus 001 Device 007: ID 18d1:5010 Google Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 17 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x18d1 Google Inc. idProduct 0x5010 bcdDevice 2.00 iManufacturer 1 Google Inc. iProduct 2 Hoho iSerial 3 v0.001 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 10 bNumInterfaces 0 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 73 bNumDeviceCaps 2 FIXME: alloc bigger buffer for device capability descriptors Device Status: 0x0000 (Bus Powered) Change-Id: I1431829f926eaf86477b49591e9b0adf2b4cb3a6 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/221571 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* dingdong: Initial board and USB PD support.Todd Broch2014-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows dingdong to receive initial USB PD communication (source capabilities payload) and with some manual manipulation (see 'TEST=') drive DPout. CL is based heavily off hoho dongle where all files were copied from board/hoho: 7b1e58c ectool: Add host command support to set fan RPM for each fan separately Files gpio.inc, board.h & board.c were modified but others should be identical. BRANCH=none BUG=chrome-os-partner:31193 TEST=manual, When attaching dingdong to samus_pd and configured via 'pd dualrole source' I see following on samus_pd console: C1 st9 Switch to 5000 V 900 mA (for 900/900 mA) C1 st10 C1 st11 C1 st12 showing power constract and transition to SRC_RDY: > pd 1 state Port C1, Enabled - Role: SRC Polarity: CC1 State: SRC_READY > typec 1 dp Also if I connect in CC1 configuration and get access to dingdong console I can > gpioset PD_SBU_ENABLE 1 And see dingdong drive external monitor Change-Id: I30ef6f8503a3fb015cfb8806bc36fb98f5150e40 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/221913 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
* hoho: Enable spi2 master for comm with external flash.Todd Broch2014-09-121-0/+40
| | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=chrome-os-partner:31192 TEST=manual, from console, > spi_flashinfo Manufacturer ID: ef Device ID: 40 14 Unique ID: dc 63 a0 00 db 57 56 28 Capacity: 1024 MB > spi_flashread 0 64 Reading 64 bytes from 0x0... 00: 00 b8 00 00 8e d0 8e d8 8e c0 bc 00 80 b8 94 41 10: 8e d8 be 00 00 bf 00 1a b9 ee 1a 2b cf d1 e9 f3 20: a5 b8 00 00 8e d8 fd b8 55 55 bf fe 7f b9 00 04 30: f3 ab fc bd 00 00 ea e0 00 02 40 c3 56 96 92 85 Change-Id: I9d8aade3fb99f4a9d85afceb153a350750382a81 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/217531 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* hoho: Initial board configuration.Todd Broch2014-08-161-0/+40
Create necessary boiler plate files for USB type-C to HDMI dongle. BRANCH=none BUG=chrome-os-partner:31192 TEST=manual 1. Compiles & can program via fruitpie. 2. Can access uart (w/ rework for tx/rx). 3. Can drive HDMI capable monitor. test details ... Programming: ------------ # connect fruitpie + fruitpie std-adapter(red) with u-USB (CN3) & type-A # (CN1) both to host that will run servod. FPIE_PORT=9993 sudo servod -p 0x5009 --port $FPIE_PORT dut-control --port $FPIE_PORT "ec_uart_cmd:gpioset USB_C_5V_EN 1" dut-control --port $FPIE_PORT "ec_uart_cmd:usbmux usb" util/flash_ec --board=hoho Configuring samus for DPout on both ports: ------------------------------------------ sudo servod -b samus for port 0 1; do dut-control "usbpd_uart_cmd:pd ${PORT} dualrole off" dut-control "usbpd_uart_cmd:gpioset USB_C${PORT}_CHARGE_EN_L 1" dut-control "usbpd_uart_cmd:typec ${PORT} dp" dut-control "usbpd_uart_cmd:gpioset USB_C${PORT}_5V_EN 1" dut-control "usbpd_uart_cmd:typec ${PORT}" done Change-Id: I39bbe1e347d1cfd777b68f3fdac6c5c6dd22800d Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/212523 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>