summaryrefslogtreecommitdiff
path: root/board/akemi/board.c
Commit message (Collapse)AuthorAgeFilesLines
* usb_mux: retimer: mux as chained mux and retimerDenis Brockus2020-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes retimers appear as generic muxes. By allowing a chain of muxes they can be stacked up to the new configurations that zork requires and will continue to work as they did before on configurations that only have a single mux. The code used to have two different arrays, 1) muxes and 2) retimers. On one of the zork configurations the processor MUX stopped being the primary mux and the retimer took its place. In a different configuration of that same platform it left the primary and secondary alone but the mux_set FLIP operation had to be ignored. Since the same interfaces needed to be available for both it stopped making sense to have two different structures and two different methods of handling them. This consolodates the two into one. The platforms that do not have retimers, this change will not make any difference. For platforms like zork, it will remove the retimers and make them chained muxes. So testing on trembyle makes sense to verify, BUG=b:147593660 BRANCH=none TEST=verify USB still works on trembyle Change-Id: I286cf1e302f9bd3dd7e81098ec08514a2a009fe3 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2066794 Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* hatch: Add check for convertible SKUs in lid_angle_peripheral_enableTim Wawrzynczak2020-02-181-0/+8
| | | | | | | | | | | | | | | | Check for a convertible SKU before turning off the keyboard in the switch to tablet mode. See go/hatch-skus for the list. BUG=b:125936966 BRANCH=firmware-hatch-12672.B TEST=On Kohaku, artificially force SKU to both convertible and non-convertible SKUs, switch to tablet mode, and then check whether Alt-Volup-R reboots the EC. Change-Id: Id29644c4e050705203b860324f14b1b87bc4ccf4 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2047630 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* Temp sensor: Remove action_delay_sec fieldDiana Z2020-02-141-6/+3
| | | | | | | | | | | | | | The action_delay_sec field hasn't actually been referenced by any code since 2013. Removing the corresponding struct field. BUG=None BRANCH=None TEST=builds Change-Id: Ia7334c26b85d0161ff61bb51fbdda61bb921595a Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2054945 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* akemi: enable quick charge when power offxiaoqiang.zhu2020-01-101-0/+43
| | | | | | | | | | | | | | | | | In order to meet the time requirements of charging when power off. Need enable battery fast charging when power off, and disable fast charging when power on. BUG=b:146540037 BRANCH=master TEST=Check the charging current of the three batteries, the maximum charging current is about 3325mA in S0 state and in power off states is about 6650mA. Change-Id: Ia3e2988c9b4ec83f7410746bb6a81e307025f0c6 Signed-off-by: xiaoqiang.zhu <xiaoqiang.zhu@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1982939 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* board: Set Accelerometer range to 4gGwendal Grignou2019-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* akemi: Remove CONFIG_EC_FEATURE_BOARD_OVERRIDEdnojiri2019-12-101-6/+1
| | | | | | | | | | | | | | | | | CONFIG_EC_FEATURE_BOARD_OVERRIDE is deprecated by CL:1951810. Signed-off-by: dnojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=buildall Change-Id: I2e8a66b47bb5a29184dae0d7ba56381f5b1f59e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1960490 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
* akemi: enable ec feature flag override functionxiaoqiang.zhu2019-12-101-0/+20
| | | | | | | | | | | | | | | | | | | | Akemi supports keyboard backlight by default, but the new SKU does not support keyboard backlight. We need to increase sku_id to distinguish whether keyboard backlight is supported. So, enable ec feature flag override to report keyboard backlight feature by sku_id. BUG=b:144815890 BRANCH=master TEST=Boot akemi boards, press Alt+Brightness-Up/Down to change keyboard backlight, it has no function on sku_id=1/2, and it works fine on sku_id=3/4. Change-Id: I081256be210fd004332f01771ad05d2f06f9f131 Signed-off-by: xiaoqiang.zhu <xiaoqiang.zhu@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1950007 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Tested-by: Cherish Wang <cherish.wang@bitland.corp-partner.google.com>
* 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>
* ec-fans: Make fans configuration const by default.Andrew McRae2019-11-021-1/+1
| | | | | | | | | | | | | | | | It was pointed out to me that the fans config list was non-const, but there is only 2 boards that require non-const configuration, so by default make it const, but allow an override. BRANCH=none BUG=None TEST=EC compiles, make tests, buildall Change-Id: I3ef8c72f6774e1a76584c47d89287f446199e0f2 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1893025 Reviewed-by: Andrew McRae <amcrae@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* Rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNTKarthikeyan Ramasubramanian2019-11-011-3/+3
| | | | | | | | | | | | | | | | | Certain SKUs of certain boards have lesser number of USB PD ports than defined by CONFIG_USB_PD_PORT_COUNT. Hence rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNT. BUG=b:140816510, b:143196487 BRANCH=octopus TEST=make -j buildall; Boot to ChromeOS Change-Id: I7c33b27150730a1a3b5813b7b4a72fd24ab73c6a Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879337 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* akemi: add temperature sensor supportLu Zhang2019-10-251-0/+6
| | | | | | | | | | | | | | | | Akemi board adds a g753 temp sensor on EC i2c port 4. BUG=b:138426009, b:143046086 BRANCH=none CQ-DEPEND=CL:1857978 TEST=use akemi board, add g753 as temp sensor, boot the board and make sure temperature can be read from g753 Change-Id: I2ae663b19e92d2f4d702818ed28004aae98fa045 Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1857979 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* akemi: fix rotation matrix of base sensorLu Zhang2019-10-221-7/+2
| | | | | | | | | | | | | | | | | | The rotation matrix needs be filled out into standard reference frame. BUG=b:143045241 BRANCH=none TEST=Using ec console 'accelinfo on' verified lid angle now goes from 0 to 360 and swtiches to tablet mode after crossing 180 threshold. Change-Id: I615ac3c582f7deec681c638a79b59324c9b69584 Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871276 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* Akemi: Remove the run-time selection for en_pp5000_aPhilip Chen2019-09-241-36/+0
| | | | | | | | | | | | | | | | | The run-time selection for en_pp5000_a is only needed for Hatch rev0. Akemi doesn't need it. BUG=b:141399038 BRANCH=none TEST=boot akemi Change-Id: Ibd26b85b69cbcd4e7c9c6b39fa453399246fcefc Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1817024 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* akemi: remove unsupported functionsPaul Ma2019-08-231-90/+0
| | | | | | | | | | | | | | | | | Akemi do not support ALS sensor and MST, this patch will remove what we do not need. BUG=b:139839740 BRANCH=none TEST=flash ec code to akemi board, the board boot successfully. Change-Id: I2811c26d5ecfcddc6cf906e445dd3c11069c93bc Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1763898 Reviewed-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
* akemi: enable motion sensor driversPaul Ma2019-08-211-31/+39
| | | | | | | | | | | | | | | | | Akemi use lis2dwl as lid sensor and lsm6ds3tr-c as base sensor. This patch enable both of them. lis2dwl works in forced mode. BUG=b:138978278 BRANCH=none TEST=boot Akemi board, use command 'accelinfo on' to see sensor output, make sure the data are correct. Cq-Depend: chromium:1741598 Change-Id: I6ff19e388c74d95b8287b9899a81d2a3f866939e Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741106 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
* tcs3400: update fields for als and rgb sensorNick Vaccaro2019-08-201-5/+18
| | | | | | | | | | | | | | | | Update board files for akemi, flapjack, hatch, kohaku, and kukui to use new field names in als_calibration_t and als_channel_scale_t. BUG=b:124512628 BRANCH=master TEST='make buildall' of the EC, verified builds succeed. Cq-Depend: chromium:1633269 Change-Id: I7ee324ce3de3377cd1538b631f4ec6294d2e9078 Signed-off-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1711958 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* akemi: add initial content for the buildPeichao Wang2019-08-081-0/+480
This initial content of akemi is taken after hatch. It will need to be revised later. BUG=b:138879565 BRANCH=none TEST=make -j BOARD=akemi Change-Id: Iae84e5b908e678165311147356f65f61270bfda9 Signed-off-by: peichao.wang <peichao.wang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679849 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com> Tested-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>