Commit Graph

7 Commits

Author SHA1 Message Date
Gwendal Grignou
484ef12119 motion: Add opt3001 as a motion sensor
Use the motion sensor to manage ALS as well.
The current interface (via memmap) is preserved, but
we can also access the sensor via cros ec sensor stack and
send the ALS information to ARC++.

BUG=chrome-os-partner:59423
BRANCH=reef
CQ-DEPEND=CL:424217
TEST=Check the sensor is working via ACPI sensor and
cros ec sensor. Check ARC++ sees the sensors.

Change-Id: Iaf608370454ad582691b72b471ea87b511863a78
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/424323
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-02-16 18:03:59 -08:00
Daisuke Nojiri
e4609af63c Reef: Enable interrupt for BMI160
This patch enables an interrupt handler for BMI160. This will improve
response time of the motion sense task.

BUG=None
BRANCH=none
TEST=Install and run AIDA64 from Playstore. Wiggle Reef DVT. Verify
'CrosEC Gyroscope' readings change.

Change-Id: Ie8dacb51795fa194840817d833cc6356beb01c8f
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/413079
2016-11-22 23:35:13 -08:00
Gwendal Grignou
b7cc2a20ff reef: More sensor fix.
- Fix magnetometer matrix to match BMM150 physical position
- Increase HOSTCMD stack size, EC crash when calibrating gyroscope.

BUG=none
BRANCH=reef
TEST=No crash when calibrating from AP (echo 1 >
/sys/.../iio:deviceX/calibrate).

Change-Id: I2d7b73c295a71649f54ffa61ec8cafa1230c8a7d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/386442
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2016-09-16 17:43:27 -07:00
Vijay Hiremath
d684e2a678 Amenia/Reef: Add software charge ramp for BC1.2 & nonstandard BC1.2
Setting the higher limit of input current for BC1.2 & nonstandard
BC1.2 devices than their maximum current rating results in an
anti-collapse. BD99955 does not have a way to do hardware charge
ramp or to detect the anti-collapse for these chargers. Hence added
code to support software charge ramp for BC1.2 & nonstandard BC1.2
so that the input current is set to maximum of the respective
charger.

BUG=chrome-os-partner:54990, chrome-os-partner:55517
BRANCH=none
TEST=Manually tested on Amenia & Reef. BC1.2 & nonstandard BC12
     devices can negotiate their respective maximum current rating.

Change-Id: I0033b3662362bd7822ad01cf4360d18caabd5249
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/358106
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
2016-08-29 17:12:39 -07:00
Vijay Hiremath
4e3f5aa4a8 BD99955: Use only one USB charger task for both the ports
There is only one charger IC and one interrupt PIN for both the ports
and also from the ISR it's not possible to decode from which port the
interrupt is triggered hence a deferred function is used to trigger
the wake event for the ports. As there is no additional benefit of
having an extra task, added code to use only one USB charger task for
both the ports.

BUG=chrome-os-partner:54272
BRANCH=none
TEST=Manually tested on Amenia. BC1.2 detection is success
     and the battery can charge on both the ports (VBUS/VCC).

Change-Id: I2745a5a179662aaeef8d48c8c1763919e8853fd0
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/351752
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
2016-06-14 14:12:03 -07:00
Vijay Hiremath
2225fbac6c reef: Enable BC1.2 support
BUG=chrome-os-partner:53688, chrome-os-partner:53721
BRANCH=none
TEST=Type-C, DCP & SDP chargers can negotiate to desired current
     & voltage. Battery can charge. USB3.0 & USB2.0 sync devices
     are detected by the Kernel.

Change-Id: I37890518c151ef94da2b2ade67a023f72d48fce6
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/346784
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2016-06-08 19:17:56 -07:00
David Hendricks
b14f89cfdb reef: Initial commit
This adds the basic framework for Reef including full GPIO listing,
board config file, and rudimentary functionality. It has not been
fully tested and still has several TODOs/FIXMEs. For now we just need
something that will build and can be incrementally improved.

BUG=chrome-os-partner:53035
BRANCH=none
TEST=EC and AP both boot, seems reasonably stable for now

Change-Id: I4934ad00917e251dd1d7eb759207a92c45a36136
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/339292
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-20 17:08:34 -07:00