Properly set the comparator output when using CC2.
Also add some basic LED color to display the current power contract when
we are a sink :
- green : 5V
- red : 20V
- blue : other voltage
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=plug to Zinger in each plug direction and see green then red LED.
type "pd 0 dev 12" and see the blue LED.
Change-Id: I4eb4339568eda5871c7f3df75bedebd97238e941
Reviewed-on: https://chromium-review.googlesource.com/226385
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Get type-c port power info including power role, charger type,
and charging info. Also added host command to get number of type-c
ports.
Also adds new charging suppliers for pericom identified chargers
including DCP, CDP, SDP, proprietary, and other chargers. Priority
of these for charging is set in samus board file.
BUG=chrome-os-partner:32650
BRANCH=samus
TEST=run 'ectool --name=cros_pd usbpdpower' and verify correct
status with minimuffin, zinger, and type-C to type-A adapter.
Change-Id: I1dabbe7de4185a23df5684a5ea9a2d944f1f6ff5
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223523
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Now that the problem with UART in STOP mode is fixed, let's enable low
power idle for Ryu P2 boards.
BRANCH=None
BUG=chrome-os-partner:33219
TEST=Shut down the AP and unplug AC power. Check the EC goes into
deep-sleep by 'idlestat'.
TEST=Power up the AP and check the EC stays awake.
Change-Id: Ib8ad3763407315ec0f95551fa0fdd258a060e113
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/226312
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Split motion_sense.c.
Translate the accel data in the Android coordinate right away.
BUG=chrome-os-partner:32002
BRANCH=ToT
TEST=On samus, check lid angle are still correct.
Change-Id: If743e25245dc1ce4cdacb8a4d5af22616c4a79e4
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225486
Reviewed-by: Sheng-liang Song <ssl@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Move gesture to common directory, 1st step to be reused by
other board.
Cleanup motion_sense shutdown path.
BUG=chrome-os-partner:33102
TEST=Double tap still works on Samus
BRANCH=ToT
Change-Id: I0a3b38c4a7dbe95c27dcdebff04c1176aaf932d1
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225235
Reviewed-by: Sheng-liang Song <ssl@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
This is a simple kernel module and Makefile for
building it out of tree. This module just uses
the existing kernel usb serial driver and probes
for the Google VID/Class/SubClass/Protocol that
identifies a valid simple serial interface.
This code should be rolled into the existing kernel
driver at: drivers/usb/serial/usb-serial-simple.c
While that happens, this module is still useful to
developers.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=cd extra/usb_serial; make; sudo insmod raiden.ko
Connect the discovery-stm32f072 over USB and see
that its console is discovered and works.
Change-Id: I83661b816643c43b3e2dc9fdc825bc3a796af2f4
Reviewed-on: https://chromium-review.googlesource.com/225923
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
These names can be used to uniquely identify an interface
as being a console forwarded from the AP, or the EC's
console or some other console. This makes it possible to
connect to the correct console from servo without knowing
what board is attached. These strings could also be used
by udev rules to create appropriate symlinks.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Change-Id: I1abd36f952782a03606b09485917be8e154534ce
Reviewed-on: https://chromium-review.googlesource.com/225950
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
This uses the newly allocated simple serial SubClass
and Protocol identifiers to make enumeration of serial
consoles over USB easier. The simple usb serial kernel
driver can select based on vid/class/subclass/protocol,
making it trivial to attach to serial consoles.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Enable USB console on discovery-stm32f072 and verify
that a new ttyUSB? device is discovered.
Change-Id: I6d3e414a20753573c2ee90a48fb1d5dce2c3972d
Reviewed-on: https://chromium-review.googlesource.com/225869
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
Previously the USB console code used two separate
bidirectional endpoints. Using the STM32 USB perihperals
endpoints in this manner means that there are only 8 total
endpoints available. But the STM32 USB peripheral allows
for a single endpoint number to be used for both IN and
OUT transactions, and while this (re-using an endpoint
number for both IN and OUT endpoints) appears to be not
compliant with the letter of the law with respect to the
USB spec, it is supported by USB stacks, and is used in a
number of USB devices.
So this change makes the USB console driver share a single
endpoint number between the IN and OUT bulk endpoints used
to implement the console.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Enable USB console on discovery board and manually test.
Change-Id: I511e56de2162a6c04ddba80d26b37b4f0cd993fd
Reviewed-on: https://chromium-review.googlesource.com/225868
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
When calling the ep_undefined function, the linker was not considering
it as a Thumb function and not setting the LSB in the address pointer.
This was causing an exception at runtime.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=all
BUG=none
TEST=inspect assembly
Change-Id: I8f4d1e351081032e138f593f0b61294031fc09b1
Reviewed-on: https://chromium-review.googlesource.com/226093
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=master
BUG=chrome-os-partner:29139
TEST=Buiid an EC FW image and run on Rambi to test if key loss is
improved and any side effect somes with this change. Need more test
units to confirm this.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I2399e33d2ca3defe8cd9b1f94ab0af1db7f84635
Reviewed-on: https://chromium-review.googlesource.com/225557
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Mohammed Habibulla <moch@chromium.org>
Previously the USB console code would wait for up to
30 ms for the USB packet buffer to become available
for transmission, even if it was called from an interrupt
context. This doesn't work because, even if we were OK
with waiting this long in interrupt contexts, which we are
not, we rightly assert that we are not in an interrupt
context in task_wait_event, which usleep calls.
This solution is a quick fix to only wait when not called
from within an interrupt context. The correct solution
is likely to decouple the printf code from directly calling
the console driver code, instead we should place a queue
between the driver and printf logic.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Enable USB console on discovery board and manually test.
Change-Id: I5b6f7bbb77f75132c75935f8fda01e652a236ae0
Reviewed-on: https://chromium-review.googlesource.com/225867
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
Update the sniffer code to sample both CC lines at the same time.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:28337
TEST=make BOARD=twinkie
do an on a sample pattern from the function generator on both channels
and verify that the waveform looks good.
Change-Id: I30c607591775531e432e757f61209733804b55e5
Reviewed-on: https://chromium-review.googlesource.com/224583
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@google.com>
Tested-by: Vincent Palatin <vpalatin@google.com>
By default, UART wakes the chip up on RXNE interrupt. This means when
the chip wakes up, RDR is full and only the shift register is empty, and
this leaves us only the time of a single character to process the
character in RDR. On some system, this is not enough and the first (or
even the second) character is overrun, and thus any multi-character keys
(e.g. arrow keys) break.
To avoid this problem, let's change the wake source to wake on start bit
detection. This gives us the time for one more character to wake up and
process the console input.
BRANCH=None
BUG=chrome-os-partner:33219
TEST=Enable low power mode on Ryu P2. In STOP mode, hit up arrow key and
see the last command show up.
Change-Id: Idce4c0bdfcf3e04ad84152ba525f704a0909f115
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225771
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@google.com>
Send the current limit chosen by charge manager to the EC so
that it can set the current limit appropriately. Note, before
this change, only the PD negotiated current limit was sent to
EC.
BUG=none
BRANCH=samus
TEST=use a non-PD type-C charger and verify current limit gets
set appropriately on EC.
Change-Id: Ic4bfce052ec8150cad07d35e2cb2fcbfd3d3e6c8
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225667
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Wait until we have a confirmed PD charger before setting the PD charge
limit to non-zero.
BUG=None
TEST=Manual on samus_pd. Insert type C non-PD charger, verify that
current limit is correctly set to to 3000 mA.
BRANCH=Samus
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ib4ec663d926e6ed955427e4a77123caac0e20252
Reviewed-on: https://chromium-review.googlesource.com/225691
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Allow the list of charge suppliers and port selection priority to be
specified at the board level.
BUG=chrome-os-partner:32650
TEST=Manual on samus_pd. Plug + unplug PD and BC1.2 chargers, verify
that PD is always preferred and higher power port / supplier is always
selected.
BRANCH=Samus
Change-Id: Ic867a40120c809111bf76bf290ed6f204eab1168
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225292
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Added return parameter to enter mode functions. For DP mode on
samus and fruitpie, only send enter mode if device is a DP
sink (DFP_U).
BUG=none
BRANCH=samus
TEST=make buildall. tested a simpler version of this with a
third-party DFP_D capable device and verified we don't send
enter mode.
Change-Id: I5caf008b7b3711232aeb1a1012cde2022584109b
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225288
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Shorten the hard reset timeout so that we transition out of hard
reset state faster.
BUG=none
BRANCH=samus
TEST=test on third-party product that sends source cap very soon
after we send hard reset. without this patch we weren't responding
to the first few source caps, with this change we respond right
away.
Change-Id: I285aaf0296604da22438e31bc962629701694b7b
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225247
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Once alternate mode is entered the DFP will make an initial status
request to the UFP. Future status changes on the UFP are then sent to
the DFP via the attention command. This VDM consists of the VDM
header plus another VDO containing mode specific information.
CL adds ability of DFP to consume the attention VDMs status message
and in the case of DisplayPort SID toggle the necessary HPD gpio
accordingly.
BRANCH=samus
BUG=chrome-os-partner:30645
TEST=manual, for DFP w/ HPD over CC see HPD toggle correctly without
manually driving it providing cable connected when AMA is inserted.
Change-Id: Ifef60b5d0170cbcc1b518e3b13e84bac99a17e32
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224769
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Before entering STOP mode, we need to ensure UART Tx has completed.
Otherwise, we may lose some characters or some bits within a character.
For Tx DMA mode, this is already done as we wait until TC (Tx complete)
is set before disabling Tx. However, when not using DMA, we enable sleep
when TXE is set. At this moment, the last character is still in the
shift register and going into sleep causes loss of the whole or part of
the last character.
To avoid this, let's enable TC interrupt and enable sleep only if we
have no more characters to send and TC is set.
BRANCH=None
BUG=chrome-os-partner:33219
TEST=Enable low power mode on Ryu P2. Type when the EC is in STOP mode
and check there is no broken character.
Change-Id: Ife42671882b7f1d1d17734d7d20fb4ba7dffb371
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225283
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This adds the option to use one 16-bit timer for watchdog helper when
using 32-bit hwtimer. With this, a debug message is dumped before
watchdog fires and we can easily see the task hogging the processor.
BRANCH=None
BUG=None
TEST=On Ryu P2, 'waitms 3000' and see debug message before the EC
reboots.
Change-Id: I498f63a105a0ba1ab7ec7d274dc8b1f16a44140f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225253
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
When we are a UFP with a plug, for the supported DisplayPort pinout,
we need to state which DFP pin configuration we support.
Update the field used for declaring pin configuration in our display
dongles.
HoHo is a protocol converter : update the pin assignment to C.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:30645
TEST=none
Change-Id: Ie5484f228bd39666c6b01055bd11f68eb9acad88
Reviewed-on: https://chromium-review.googlesource.com/225231
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
A USB type-C to DisplayPort dongle can support either DPv1.3 or
USB Gen 2 signaling.
Our dongles need to advertise that they support DPv1.3 and only this.
Our DFP needs to request DPv1.3 signaling.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:30645
TEST=Plug a type-C to DP dongle from another vendor to Samus and see a
display output.
Change-Id: Ie0ac16b675e86f635220a954a2c03442777cc527
Reviewed-on: https://chromium-review.googlesource.com/225250
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
We defined the DMA channel for UART Rx DMA to use, but we didn't
actually enable it.
BRANCH=None
BUG=chrome-os-partner:32660
TEST=Check the console is still responsive
Change-Id: I0dcbeeccb3a4213305c84ec5238e6e9dbee09b33
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225280
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This modifies the stray hard-coded DMA channel for UART Rx to the
correct config flag.
BRANCH=None
BUG=chrome-os-partner:32660
TEST=On Ryu, enable UART Rx DMA and check console is still responsive
Change-Id: Icec2de6ad4d34c6e0f8df2a1d51d9fefd982c9f4
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225239
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This implements a new API for EC modules to define MKBP event sources
and send MKBP event to the AP. Also, a new host command
EC_CMD_GET_NEXT_EVENT is added for the AP to query the pending MKBP
events. Each event type may have custom event data sent along with the
event.
BRANCH=None
BUG=chrome-os-partner:33194
TEST=Enable MKBP event on Ryu. Set a host event from EC console, run
'ectool nextevent', and see MKBP event 0x01 (HOST_EVENT) and the set
host event.
Signed-off-by: Vic Yang <victoryang@chromium.org>
Change-Id: I28a1b7e826bcc102bbe39016c9bb3e37d125664c
Reviewed-on: https://chromium-review.googlesource.com/224905
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Udelay function might get delay less than the time indicated by the
input parameter. udelay(4) sometimes get the tick like, 6->7->7->
8->8->9->A and then the udelay return. But, the sampling point of 6
could be at the end of 6(close to 7) and the point of A could be
right at the beginning of A(close to A). This function could get
delay from (us - 1) to (us + 1). This change is to ensure the delay
at least over the parameter, us.
BRANCH=master
BUG=None
TEST=Build an EC FW iamge and run on Rambi to ensure at the time
duration indicated by the parameter is elaspsed and satisfied.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I797f80c577d7e29e75a304aec1e02d2c750f8a23
Reviewed-on: https://chromium-review.googlesource.com/224660
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Mohammed Habibulla <moch@chromium.org>
There is no external pull-up on UART signals and this could lead to
garbage characters received. Let's enable the internal pull-up to avoid
this.
BRANCH=None
BUG=None
TEST=On a Ryu board with which UART Rx gets garbage when servo is not
connected, check that we don't get garbage characters anymore.
Change-Id: I014b399dfecc1b8495cce7c80c481c3668976084
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225095
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
We updated the source PDO indices and we also need to update the output
voltage selection function.
BRANCH=None
BUG=chrome-os-partner:33133
TEST=On Plankton, output 5V and measure with INA.
Change-Id: I771c04cf929a8e473cf09ae3eb222518f042600a
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225154
Reviewed-by: Pin-chih Lin <johnylin@chromium.org>
On STM32F0, a single IRQ is used for all RTC events, including RTC_ALARM
and RTC_WAKEUP, and this IRQ is named RTC_WAKEUP. We use RTC_WAKEUP IRQ
in our code while we actually meant to capture RTC alarm event. On
STM32F3, RTC_WAKEUP and RTC_ALARM are separate IRQs and thus we're
having problem. Let's make it explicit which RTC IRQ we want to use and
fix our code to use RTC_ALARM.
BRANCH=None
BUG=chrome-os-partner:33219
TEST=Run 'rtc_alarm' on Ryu and verify the EC gets interrupted after a
second.
Change-Id: Ib1a14a5da49d709a4d071d44fbfa46544cc5929b
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224998
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
The battery cut-off is achieved by putting BQ27742 in SHUTDOWN mode.
BRANCH=None
BUG=None
TEST=Unplug AC and do 'cutoff' in EC console. The EC console goes
unresponsive.
Change-Id: I4a1aa359d79333d47aaf53b685a52960e5dfd652
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225007
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This updates the lightbar params with the values determined in
the optic lab. The full-on primary colors are of uniform
intensity at the brightness level used by Link. The Google colors
provide the closest match to the official color palette (at full
brightness) described at
https://sites.google.com/a/google.com/brandsite/the-colours
BUG=chrome-os-partner:33017
BRANCH=ToT,samus,ryu
TEST=manual
The calibration and testing was done in the optic lab.
You can see the result just by looking at the lightbar. For best
results, set the brightness to the max with
ectool lightbar brightness ff
Change-Id: I1cb64e3c547844adf733cd46bff1256319b4f612
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224992
On an interrupt from the Pericom charger detection IC, check the current
limit of the attached charger. Charge manager is informed of available
charge from BC1.2 source and PD sources and selects the proper port + charge
limit in each case.
BUG=chrome-os-partner:32003
TEST=Manual on samus. Insert Apple charger, verify charge limit is
selected appropriately. Insert PD charger, verify that charge port
switches to PD port. Remove + reinsert chargers, verify that port /
limit is selected appropriately.
BRANCH=samus
Change-Id: I47e1e3be1c522f1e11529a0b4ac665e695f33e14
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221791
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Simple control of SPI for flashing over USB.
This driver is working, and using the discovery board
with a W25Q16 flash chip attached flashrom can read,
erase, write, and verify the whole chip in 45 seconds.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Change-Id: I224f1f87cd6adc8b64c17de1df98dae0a9cfa6a5
Reviewed-on: https://chromium-review.googlesource.com/218740
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
This is needed for inductive charging to work.
BRANCH=None
BUG=chrome-os-partner:31392
TEST=On Ryu, close the lid and check BASE_CHARGE_VDD_EN is toggled.
TEST=Open the lid and see the AP booting.
Change-Id: Ib153c08a803088b832c7d65261c71605c3378d5f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224804
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Updating the fan speeds according to the manufacturer's specs.
The fan vendor recommends that the minimum fan speed be a 20%
duty cycle. Since the built-in fan controller has a tach-based
feedback loop, I'm using the RPM value instead of the duty cycle
(20% is 2286 RPM, according to the vendor).
The vendor also wants a 30% duty cycle to start turning, but the
built-in fan controller provides support for fast-start too. The
controller's minimum fast-start duty cycle is 50%, but it also
has a programmable number of revolutions that it will wait before
backing off.
Holding my ear down close to the fans while they start and stop,
it seems that the minimum 2 revolution start period is sufficient
and provides the least noise. Of course, since I've never had any
problems starting the fans directly at 1000 RPM this noise is a
little more noticeable than that. It's quite possible that the
built-in controller is smart enough to make 1000 RPM work by
bumping the duty cycle up until the fans turn even if the fans
don't like it.
BUG=chrome-os-partner:32892
BRANCH=ToT,samus
TEST=manual
Listen closely and run the EC console "faninfo" command to see
the fans start and stop as the system boots and idles.
Change-Id: I47c9e7cef3f9f4bd815a13032fe10234decd62ed
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224830
Reviewed-by: Randall Spangler <rspangler@chromium.org>