summaryrefslogtreecommitdiff
path: root/board/arcada_ish
Commit message (Collapse)AuthorAgeFilesLines
* Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTESYuval Peress2021-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used throughout. The issue is that the units don't match. In Zephyr the value is in KiB instead of bytes. This refactor simply renames CONFIG_FLASH_SIZE in platform/ec to include the unit (via _BYTES). BRANCH=none BUG=b:174873770 TEST=make buildall be generated by the build instead of per board Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* COIL: Rename CONFIG_I2C_CONTROLLERDiana Z2020-11-051-1/+1
| | | | | | | | | | | | | 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>
* board: Set Accelerometer range to 4gGwendal Grignou2019-12-171-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Required by Android CDD - Section 7.3.1 - Paragraph C.1.4 Modified mechanically with: for i in $(grep -lr "\.default_range" board); do sed -i '/.default_range =/s#\(.*\.default_range = \).* /\ \* g.*#\14, /* g, to meet CDD 7.3.1/C-1-4 reqs */#' $i done Manually reworked to only change the accelerometer that matters to android: The lid accelerometer or the base accelerometer if the base also hosts the gyroscope. This is only for future EC, no need to land the change on branches: mems_setup will take care to set accelerometer ranges at 4g on startup. BUG=b:144004449 BRANCH=none TEST=compile Change-Id: If8c14b2e928c9c70c0ce51451adcfcd674a9e73b Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957375 Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* driver: lsm6dsm: Allow building without CONFIG_ACCEL_FIFOYuval Peress2019-11-211-1/+1
| | | | | | | | | | | | | | | | This change refactors the lsm6dsm to allow building without the use of the FIFO or sensor interrupts. BUG=None BRANCH=None TEST=make buildall Change-Id: I5b338d81061f25fd1c8209b4555f63ea4d8b2dbc Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1916679 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Auto-Submit: Leifu Zhao <leifu.zhao@intel.corp-partner.google.com> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* tablet_mode: Renaming for GMR sensorPhilip Chen2019-09-193-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GMR sensors can be used to (1) detect clamshell/tablet mode (2) detect lid open/closed But hall sensors can only do (2). Therefore the naming related to "hall sensor" for tablet mode application is incorrect. This patch performs the following renaming to better reflect the reality: config: CONFIG_HALL_SENSOR -> CONFIG_GMR_TABLET_MODE CONFIG_HALL_SENSOR_CUSTOM -> CONFIG_GMR_TABLET_MODE_CUSTOM CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR -> CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR GPIO: HALL_SENSOR_GPIO_L -> GMR_TABLET_MODE_GPIO_L functions: hall_sensor_disable() -> gmr_tablet_switch_disable() hall_sensor_isr() -> gmr_tablet_switch_isr() hall_sensor_int() -> gmr_tablet_switch_init() variable: hall_sensor_at_360 -> gmr_sensor_at_360 BUG=b:139378190 BRANCH=none TEST=make buildall Change-Id: I28393d056ddd128d8ffafc16a1f9fefee5455ccc Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1757275 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* config: Refactor CONFIG_ACCEL_FIFO to enable use of IS_ENABLEDYuval Peress2019-09-031-2/+6
| | | | | | | | | | | | | | | This change allows us to use the IS_ENABLED condition to replace the various ifdef guards around the CONFIG_ACCEL_FIFO BUG=b:137758297,chromium:981990 BRANCH=None TEST=buildall and CTS tests on Arcada Change-Id: I65d36bac19855e51c830a33e6f3812575e8d15d9 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704164 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* Remove __7b, __8b and __7bfDenis Brockus2019-07-201-4/+4
| | | | | | | | | | | | | | | | | | | 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>
* Use 7bit I2C/SPI slave addresses in ECDenis Brockus2019-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* arcada: lower i2c bus speed to 400kHzJett Rink2019-07-091-1/+1
| | | | | | | | | | | | | | | | The sensors on the i2c line do not operate reliably at 1Mhz i2c bus speed. Lower to 400kHz BRANCH=75,76 BUG=b:136676970 TEST=verify that i2c bus speed when from ~1Mhz to ~400kHz after this change with an oscilloscope. Change-Id: Ie970f76fe7408de17f92bfc9f22a951b635fd278 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1691309 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* arcada_ish: clean up old commentsJett Rink2019-06-181-7/+8
| | | | | | | | | | | | | | | | The temporary way of handling the power state is actually fine for ISH long term, so remove TODO comments. BRANCH=none BUG=none TEST=build Change-Id: I83bbafd0f135329140f39d7790dc8f3e1c8f6463 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660124 Tested-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* ish: remove conditional compilation where possibleDenis Brockus2019-06-171-2/+0
| | | | | | | | | | | | | | | Removed many of the #if conditions and replaced them with IS_ENABLED BUG=b:132178013 BRANCH=none TEST=make buildall -j TEST=verify basic ish ec functionality Change-Id: I39c1d2dfdb39baa06e53746789d0b6a648275ed9 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660021 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ish: cleanup ISH specific CONFIG_ definitions and usageDenis Brockus2019-06-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed some unneeded definitions and made sure those needed were undefined in include/config.h Removed some of the #ifdef and used IS_ENABLED instead 2019-06-13 07:36:00 > idlestats 2019-06-13 07:36:05 Aontask exists: Yes 2019-06-13 07:36:05 Total time on: 367.111999s 2019-06-13 07:36:05 Idle sleep: 2019-06-13 07:36:05 D0i0: 2019-06-13 07:36:05 counts: 13716 2019-06-13 07:36:05 time: 108.238220s 2019-06-13 07:36:05 Deep sleep: 2019-06-13 07:36:05 D0i1: 2019-06-13 07:36:05 counts: 6798 2019-06-13 07:36:05 time: 17.980105s 2019-06-13 07:36:05 D0i2: 2019-06-13 07:36:05 counts: 5852 2019-06-13 07:36:05 time: 236.773953s 2019-06-13 07:36:05 D0i3: 2019-06-13 07:36:05 counts: 16 2019-06-13 07:36:05 time: 1.092285s 2019-06-13 07:36:05 Aontask status: 2019-06-13 07:36:05 last error: 0 2019-06-13 07:36:05 error counts: 0 BUG=b:131749055,b:132178013 BRANCH=none TEST=make buildall -j TEST=verified basic operation on arcada_ish Change-Id: Ib2d96f35b9f4f92208cd05dfdf2580bb27e5df90 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1656152 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* arcada: use lid switch instead of gpioJett Rink2019-06-051-1/+1
| | | | | | | | | | | | | | | Use the debounced lid switch state for lid close instead of the raw gpio. BRANCH=none BUG=b:126861777 TEST=tablet mode state is cleaner around 0 degrees Change-Id: I46d7e2ed7fa0af7f276662e5136613caaed539f7 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1641434 Reviewed-by: Duncan Laurie <dlaurie@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* arcada_ish: hook up 360 hall sensor to ISRJett Rink2019-05-283-3/+17
| | | | | | | | | | | | | | | | | | Ensure that 360-degree-hall sensor is hooked up to the tablet mode ISR, which should in turn ignore any weird lid angle calculations when the hall sensor is active (i.e. lid is at 360 degrees) BRANCH=R75 BUG=b:131785573 TEST=arcada does not have spurious edges on the NB_MODE# signal when the lid is all the way open in 360 degree mode. Cq-Depend: chrome-internal:1329664 Change-Id: I1756bd909e5ecba7caa4565376f98f6d0dad6b06 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1597190 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* driver: lis2mdl: fix magnetometer range/resolutionGwendal Grignou2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change drv_data pointer to st_private_data, to make LIS2MDL driver compliant with other ST driver. In standalone mode we have: +--- lis2mdl_private_data ---+ | struct mag_cal_t cal; | <-------- LIS2MDL_CAL(s) | | | | struct stprivate_data data;| <-------- s->drv_data +----------------------------+ BRANCH=None BUG=b:132288982 TEST=Check scale returns 0.000625000 Checks figure-8 calibration is working Checks CTS verifier test "Magnetic Field Measurements Tests" pass. Change-Id: Iaba99b50cb0bf9bfc76f67cef0da8843a86f4838 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1616884 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* driver: lsm6dsm: Move the interrupt GPIO into sensor structYuval Peress2019-05-231-0/+4
| | | | | | | | | | | | | | | | | This changes allows each board to add a custom configuration for the sensors. In this case particularly setting the GPIO enum that is used for the interrupt signal in the lsm6dsm. BUG=b:129159505 BRANCH=arcada TEST=I ran `make buildall` since this change isn't used yet it doesn't affect run-time behavior. Change-Id: I4a2d5e097d5fd8a45af591a24c4e6e917865a093 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1621747 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* board: arcada: Fix magnetometer axis rotationYuval Peress2019-05-161-1/+1
| | | | | | | | | | | | | Fix the rotation of the magnetometer measurements. BRANCH=None BUG=b:128619310 TEST=Compare raw magnetometer data with pixel 3 Change-Id: I3fa407dd4dcc825cc521c8e49a63a635e45f9081 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1612256 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* ish: correct gpio voltage to 3.3Vstabilize-12202.BJett Rink2019-05-131-1/+1
| | | | | | | | | | | | | | The sensor interrupt signal is 3.3V not 1.8V and ISH GPIO does not support 3.3V away. This was benign but incorrect. BUG=none BRANCH=none TEST=sensor still work Change-Id: I0335c5c65f8d6a52f4c7df4018133b46d98bca39 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1602491 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* board: arcarda_ish: Fix gyro matrixGwendal Grignou2019-05-081-1/+1
| | | | | | | | | | | | | | IMU Accel and Gyro matrices should be identical. BUG=b:132110508 TEST=testing "CTS verifier Gyroscope Measurement Test" Test was still failing when done manually, but the deltas were due to user error not invalid axis. BRANCH=master Change-Id: I29f790385d4203f326bceb9a5320b0c833de7b65 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1597965
* arcada_ish: hook up lid open gpio interruptJett Rink2019-05-042-1/+2
| | | | | | | | | | | | | | | | | Hook up lid open interrupt correctly for arcada. This also ensures that we ignore lid angle when the lid is closed because lid angle can report 360 degrees and falsely enter tablet mode. BRANCH=none BUG=b:131785573 TEST=lid open/closed is reported correctly on console with this change. This also improves the tablet mode calculation, i.e. we do not go into tablet mode when the lid is closed. Change-Id: Idece81f3b03575941a22ab09485de7c3e7f85a8f Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1594110 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* board: arcada_ish: add lis2mdl magnetometerYuval Peress2019-04-242-5/+30
| | | | | | | | | | | | | | | | | | BRANCH=None BUG=b:128619310 TEST=Validated that iio:device4 is present TEST=Validate that cat **/iio:device4/in_magn_*_raw prints correct values TEST=Ran some CTS tests and verified magnetometer tests pass. TEST=Opened an android compass app and raw magnetometer reading app and verified that data is correct. Change-Id: I79ff5ba8de12686d61e7701ac83689924c4de6c4 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1535428 Commit-Ready: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
* arcada_ish: Tune D0ix idle target residencyRushikesh S Kadam2019-04-131-2/+2
| | | | | | | | | | | | | | | | | Set D0i2 and D0i3 latency values to reasonable safe values, so that we can start exercising D0ix & see power benefits. We shall fine tune further at later stage. BUG=b:130032204 TEST=Verify Power numbers in active & S0ix state BRANCH=none Change-Id: I1cf29dd71f81036894a58009d027fecc9288d037 Signed-off-by: Rushikesh S Kadam <rushikesh.s.kadam@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1558150 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* ec.tasklist: Consolidate duplicate commentsDaisuke Nojiri2019-04-081-13/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* ish/ish5: enable AON low power mode on arcada_ish boardHu, Hebo2019-04-081-0/+12
| | | | | | | | | | | | | | | | | enabled D0i-3 low power mode and reset_prep and D3 features BUG=b:122364080 BRANCH=none TEST=tested on arcada Change-Id: I6c3949a7ac229a3f33cd75bd103e343f8e9a26f9 Signed-off-by: Hu, Hebo <hebo.hu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1536487 Commit-Ready: Rushikesh S Kadam <rushikesh.s.kadam@intel.com> Commit-Ready: Hebo Hu <hebo.hu@intel.corp-partner.google.com> Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
* arcada_ish: remove unlocked config optionJett Rink2019-04-031-6/+0
| | | | | | | | | | | | | | The Unlocked config option doesn't really even apply to arcada, remove as we get further along. BRANCH=none BUG=none TEST=Flashed on to arcada without issue. Change-Id: I1de4508a7fa7ee51f562a8806e6a1bbf13f40135 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1548504 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* arcada_ish: ensure tests target buildsJett Rink2019-04-031-0/+2
| | | | | | | | | | | | | | | | Fix the test target for ish which is run during the test phase of chromeos-ish which is not run under buildall in EC codebase. BRANCH=none BUG=b:12237171 TEST=make BOARD=arcada_ish tests builds successfully. FEATURES=test emerge-sarien chromeos-ish now works Change-Id: I6eeaa7a15a5a026b189b67d54f28d994e6a56bb7 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1548503 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ish: add memory dma driver for ISH5Leifu Zhao2019-04-021-0/+3
| | | | | | | | | | | | | | | | | | | Arcada/ISH5 power management needs the support for dma between UMA and SRAM to do SRAM swap in and swap out. Add the dma driver and API which utilizes dma engine to perform dma transfer between UMA and SRAM. BUG=b:127723182 BRANCH=none TEST=tested on arcada Signed-off-by: Leifu Zhao <leifu.zhao@intel.com> Change-Id: I22172b176eed92d7f487641f9b5c79dfd04f602a Reviewed-on: https://chromium-review.googlesource.com/1507326 Commit-Ready: Leifu Zhao <leifu.zhao@intel.corp-partner.google.com> Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Leifu Zhao <leifu.zhao@intel.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* ish: Add watchdog timerJack Rosenthal2019-03-261-4/+0
| | | | | | | | | | | | | | | | | | | | | | This adds support for the watchdog timer (WDT) available on Intel Sensor Hub (ISH). The ISH will reset after T1 expires; see the comments at the top of watchdog.c for further information on this design decision. Originally, we had planned to implement a counter that would disable the WDT after N failures. This was abandoned, since the register used to store the counter was not able to maintain a value across reset on a reliable basis (see b:128679825). BUG=b:127980538,b:128679825 BRANCH=none TEST=Used waitms command on arcada to verify WDT triggered a warning IRQ after T1 and reset the system. Change-Id: I4bd16c253110d60c57eb24cda2abc0facee20748 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1526316 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* motion: Define macros for custom eventsGwendal Grignou2019-03-201-1/+2
| | | | | | | | | | | | | | Define macros to define custom events used by sensor interrupt handlers. Remove CONFIG_ for activity events. BUG=none BRANCH=none TEST=compile, sensors work on eve. Change-Id: I08ef6ed2a004466ebc5f7650d6952a150b9de713 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1272189 Reviewed-by: Jett Rink <jettrink@chromium.org>
* arcada_ish: set NB_MODE_L going to EC correctlyJett Rink2019-03-183-2/+16
| | | | | | | | | | | | | | | | The lid angle is being correctly calculated and compared against the AP-set lid angle and hysteresis (MOTIONSENSE_CMD_TABLET_MODE_LID_ANGLE) BRANCH=none BUG=b:122281217,b:122052438,b:122885025 TEST=verify that the gpio NB_MODE# signal from ISH to EC is getting set properly based on lid orientation (verified with gpio_set on ISH console) Change-Id: I1116bb28e4add970cfe08adb0eade66da1c05074 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1512137 Reviewed-by: Mathew King <mathewk@chromium.org>
* arcada_ish: add base lis2dh accel sensorJett Rink2019-03-182-5/+56
| | | | | | | | | | | | | | | | | | | Add base accelerometer to arcada_ish image. Lid angle detection using base and lid accel sensors in EC is still pending. With draft CLs, I successfully calibrated this sensor and calculated lid angle successfully using the AccelerometersLidAngleTest factory test in the AP. BRANCH=none BUG=b:122281217 TEST=sensors is calibratable with normal factory calibration process and usable for lid angle calculation using factory tests. Change-Id: I1c512cd4016d75c5bfece12475787189a99e6ee0 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1512133 Reviewed-by: Mathew King <mathewk@chromium.org>
* arcada_ish: Enable accel interrupts and accel fifoMathew King2019-03-133-2/+19
| | | | | | | | | | | | | BUG=b:123634700 TEST=Built and deployed to arcada device and tested fifo with "ectool --name cros_ish motionsense fifo_int_enable 1" BRANCH=none Change-Id: I9b8110b0114003b19e8fc1c2f42d8a6a0475dc6f Signed-off-by: Mathew King <mathewk@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1503800 Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* arcada_ish: Add the gyro to the motion sensor arrayMathew King2019-03-082-8/+28
| | | | | | | | | | | | | The gyro for the LSM6DS3 is needed to get the ACCEL_FIFO working BUG=b:123634700 TEST=built and deployed to arcada device BRANCH=none Change-Id: I164e39dec6e2b9c10e7864fbcdcae41b1bfb8eb2 Signed-off-by: Mathew King <mathewk@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1503799 Reviewed-by: Jett Rink <jettrink@chromium.org>
* ec: Cleanup ish config optionsMathew King2019-03-012-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all ISH related CONFIG_* options except for: CONFIG_HOSTCMD_HECI: This will be used to enable the host command interface using HECI. Similar to CONFIG_HOSTCMD_LPC or CONFIG_HOSTCMD_ESPI. arcada_ish uses this config. CONFIG_HID_HECI: This will be used to enable a HID interface using HECI. It is compatible with the intel-ish-hid kernel driver. atlas_ish uses this config. Also remove ipc.c the functionality it has been superceded by ipc_heci.c. BUG=b:123634700 TEST=Built and tested on a arcada device Verified that atlas_ish builds BRANCH=none Change-Id: I9d97693e2beca1c9fec8c4f17bd3706b0ea8e795 Signed-off-by: Mathew King <mathewk@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1490551 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* arcada_ish: add sensor and heci tasksJett Rink2019-02-263-8/+98
| | | | | | | | | | | | | | Add sensor configuration for LSM6DS3 and heci host command task to transfer sensor data to AP BRANCH=none BUG=b:122281217 TEST=arcada_ish can pass sensor data through iio sysfs interface using CL stack and under-development kernel driver Change-Id: Ic9250f6781b8501afe99e2999940020a2437e664 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1460085
* ish: save/restore FPU context only for the task uses FPUHyungwoo Yang2019-02-261-4/+6
| | | | | | | | | | | | | | | | | | | Currently we save/retore FPU H/W context for every task on every contxt switch. This hurts overall performance of ISH. This patch allows save and restore FPU H/W context only for a task that declares it uses FPU. BRANCH=none BUG=none TEST=verified in Atlas platform Change-Id: Ic2f0bbf59f655661e2dd788c688edc4e83068c1c Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1448818 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* arcada_ish: change GPIO_NB_MODE_L defaultJett Rink2019-02-191-1/+1
| | | | | | | | | | | | | | | | Today the EC interprets the NB_MODE# as meaning notebook mode when low, so we need to ensure that the default is low otherwise the EC will inhibit the keyboard. BRANCH=none BUG=b:124482032 TEST=When signal is low, internal keyboard works Change-Id: Ic677978b023ccc4a56e180027838c042a8dc7577 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1475772 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Duncan Laurie <dlaurie@google.com>
* arcada: add hall sensor input GPIO and NB_MODE outJett Rink2019-01-281-1/+6
| | | | | | | | | | | | | | | Hook up input gpio for both hall sensors and output gpio for NB_MODE# that goes from ISH to EC. BRANCH=none BUG=b:120295222 TEST=verified that LID_CL_NB_L toggles when moving a magnet over HALL2 sensor Change-Id: I17797bfda00470392d578d7427cd163653bf1a96 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1435481 Reviewed-by: Diana Z <dzigterman@chromium.org>
* arcada: remove gpio lines for I2CJett Rink2019-01-283-8/+6
| | | | | | | | | | | | | | The ISH does not support putting the i2c in manual GPIO mode, so we should leave SCL and SDA fields on i2c_port_t unset BRANCH=none BUG=none TEST=i2c communications still works Change-Id: I060d41f97f09e26ceb224249b26308e56abc0da4 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1435480 Reviewed-by: Diana Z <dzigterman@chromium.org>
* arcada: remove executable flag from all filesJett Rink2019-01-245-0/+0
| | | | | | | | | | | | Files in board/arcada_ish are all marked as executable. Fixing. BRANCH=none BUG=none TEST=presubmit passes Change-Id: I65da8acb83e55b91c2fca870b0b85648aa145451 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1432315
* ISH: Arcada ISH initial enablingShine Liu2019-01-115-0/+159
Add arcada_ish board support BRANCH=none BUG=b:120295222 TEST=Tested on Arcada EVT board, ISH firmware is running and UART console input/output is working. Change-Id: If1073287d45738689db9f1ac005e107a3445320a Signed-off-by: Shine Liu <shine.liu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1354302 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Jett Rink <jettrink@chromium.org>