summaryrefslogtreecommitdiff
path: root/board/coachz/board.h
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>
* Coachz: board rev 2+ changed the TCPC part from PS8805 to PS8755gaochao2021-01-131-0/+2
| | | | | | | | | | | | | | | | | EC firmware picks the correct driver based on the board ID BRANCH=Trogdor BUG=b:172952070 TEST=make BOARD=coachz -j flash ec and check TYPE-C base function Signed-off-by: gaochao <gaochao@huaqin.corp-partner.google.com> Change-Id: Iefedb6cfcff99f406bd1bb1e136433a1e4cd28d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540068 Reviewed-by: Gang He <hegang5@huaqin.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Tested-by: Gang He <hegang5@huaqin.corp-partner.google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* coachz: add battery informationhegang52021-01-111-0/+1
| | | | | | | | | | | | | add battery information for coachz BUG=b:176260625 BRANCH=Trogdor TEST=make BOARD=coachz Signed-off-by: hegang5 <hegang5@huaqin.corp-partner.google.com> Change-Id: Ia87062417db1a5a8a53088d4da96948d10b0d129 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612239 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* coachz:support for recovery modeganghe2020-12-181-0/+2
| | | | | | | | | | | | | coachz support enters recovery mode by pressing volume up+down keys BRANCH=none BUG=none TEST=make BOARD=coachz -j Signed-off-by: ganghe <hegang5@huaqin.corp-partner.google.com> Change-Id: I36c405de66a7f4ce8fd24da4dec6525518c148e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2592301 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* coachz: config: Add on-body detection configChing-Kang Yen2020-12-171-0/+8
| | | | | | | | | | | | | Add on-body detection configuration on CoachZ devices BRANCH=None BUG=b:169374265 TEST=make buildall Signed-off-by: Ching-Kang Yen <chingkang@chromium.org> Change-Id: I9f3ad1b968ec9a03a49ac3fc4b32efc001599e39 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2570890 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* PCHG: Send device event to hostDaisuke Nojiri2020-12-101-0/+1
| | | | | | | | | | | | | | | | | This patch makes PCHG send EC_HOST_EVENT_DEVICE on every state machine cycle. The host is expected to retrieve the device event mask through EC_CMD_DEVICE_EVENT and updates port status if the mask has EC_DEVICE_EVENT_WLC. BUG=b:173235954 BRANCH=Trogdor TEST=Enabled and disabled EC_DEVICE_EVENT_WLC via deviceevent command and verified the sysfs node is updated. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I9dece6bc35599db3d6ae30452fd8e97bbaeab9af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2579722 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Coachz: Add ectool battery param CMDgaochao2020-11-301-0/+1
| | | | | | | | | | | | | | | | | Add ectool battery param CMD to get battery CT code BRANCH=master BUG=b:172410020 TEST=make BOARD=coachz -j flash ec and check ectool battery param cmd Signed-off-by: gaochao <gaochao@huaqin.corp-partner.google.com> Change-Id: Id65ef594028096a29da4b7fe44151b232d333994 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540067 Reviewed-by: Dolan Liu <liuyong5@huaqin.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Tested-by: Dolan Liu <liuyong5@huaqin.corp-partner.google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* coachz: Enable stylus chargingDaisuke Nojiri2020-11-241-0/+5
| | | | | | | | | | | | | This patch enables stylus charging. BUG=b:173235954 BRANCH=Trogdor TEST=See the description of CL:2538536. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ia28214cc963168df7b229a6fbf530fc357e85740 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2538540 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Coachz: Detect kickstand position and notify body proximityWai-Hong Tam2020-11-181-0/+3
| | | | | | | | | | | | | | | | | Implement the kickstand hall sensor interrupts and the signal debouncing. Use the kickstand position to approach the human body proximity and update the EC_MKBP_FRONT_PROXIMITY event to kernel. BRANCH=Trogdor BUG=b:168714440 TEST=Built the image correctly. Faked the signals and checked the interrupts triggered and the proximity event updated. Change-Id: I493b87ba5d6d8a801cc9aa6e181f72bf26bcafd6 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2543112 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: Update the hall sensor GPIOs and interruptsWai-Hong Tam2020-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | Reflect the hall sensor change on the next hardware revision: * Wire GPIOD2, i.e. LID_OPEN_EC, to the lid hall sensor * Use GPIO73 as lid 360 detection * Different netnames * No reserse dock detection Add an empty interrupt for the kickstand hall sensors. Enable CONFIG_GMR_TABLET_MODE to handle lid 360. BRANCH=Trogdor BUG=b:168714440 TEST=Built the image correctly. Change-Id: I1eb35f6190c696e5a2598ef3ed7614c585c1173d Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2543110 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Trogdor: Move CONFIG_CMD_AP_RESET_LOG out of bringup listWai-Hong Tam2020-11-161-1/+0
| | | | | | | | | | | | | Move this CONFIG from bringup to production. BRANCH=None BUG=b:169736149 TEST=Built the image. Change-Id: I490499f3a85f91c6f07a0e099b8c0738bf0eb787 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2538262 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: support battery GH02047XLSimon Zhou2020-11-111-0/+2
| | | | | | | | | | | | | | support battery GH02047XL BRANCH=master BUG=b:172613247 TEST=make BOARD=coachz -j flash ec and check battery info Change-Id: I6bdb0b18a88272e56b2aba1f82c99620243a70be Signed-off-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2529269 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Coachz: Change TCPC to PS8805Wai-Hong Tam2020-09-241-1/+1
| | | | | | | | | | | | | | | | | I was misled by the Block Diagram page in the schematic file, which shows PS8751 is used. But in the content, actually PS8805 is used. Updated the CONFIG to reflect the change. BRANCH=None BUG=b:167884598 TEST=Built the Coachz board image. Change-Id: Id0d79b8719e403ddb6f097cfd7e361160828f2e2 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427433 Commit-Queue: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Coachz: Implement the base detectionWai-Hong Tam2020-09-231-0/+6
| | | | | | | | | | | | | | | | | The implementation is based on the poppy reference, with the following changes: * Use proper GPIOs and ADC channel * Not notify ACPI, which is invalid on ARM boards * Update comments BRANCH=None BUG=b:168712053 TEST=Built the Coachz image. Change-Id: Ie0b0eaf81cdcbd2b2219eef0c895fbd41971d1e4 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2416998 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Coachz: Add battery for Coachzstabilize-13482.B-masterSimon Zhou2020-09-191-3/+1
| | | | | | | | | | | | | | | Add DS02032XL battery information for Coachz BUG=b:168734684 BRANCH=master TEST=make -j BOARD=coachz Change-Id: I6f5ef136afe157b653ca53b374668195212bfe68 Signed-off-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2416469 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
* Coachz: Reflect the GPIO changeWai-Hong Tam2020-09-171-2/+2
| | | | | | | | | | | | | | | | | Rename the GPIOs to reflect the netnames. Add the GPIOs for the hall sensors, not implemented yet. Add the GPIOs for the base detection, not implemented yet. Add the GPIOs and I2C bus for the stylus, not implemented yet. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: If30e00d8ede0b6ca2e9a4f9efe474c22a8a16933 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2411507 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: Remove USB-A portWai-Hong Tam2020-09-171-4/+0
| | | | | | | | | | | | | | Coachz doesn't have any USB-A port. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: I84bd2c7c04b810071cd904df26b05211a2fd88f8 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410856 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: Remove the keyboard backlight supportWai-Hong Tam2020-09-171-2/+1
| | | | | | | | | | | | | | | | Coachz doesn't has an internal keyboard. Move the CONFIG from baseboard to board, as the keyboard backlight is not a common feature. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: Idd5937da9ad6a3ab1be277e537bbd2e70e2b1d9a Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410855 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: Relocate the sensors and remove the base oneWai-Hong Tam2020-09-171-21/+3
| | | | | | | | | | | | | | | The main board is inside the lid, instead of the base. So relocate the sensors, remove the base sensor, and remove the logic of calculating the lid angle. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: Ib3cf3c871c541cddaf3fda7df4bf478615b829a7 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410853 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Coachz: Simplify switchcap logic to support DA9313 onlyWai-Hong Tam2020-09-161-6/+0
| | | | | | | | | | | | | | Coachz only uses the switchcap DA9313. Remove the other switchcap support to simplify the logic. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: Idd1de592836a29d2ef6105650882517d58ec1f9d Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410852 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Trogdor: Move GPIO aliases from baseboard to boardWai-Hong Tam2020-09-161-0/+2
| | | | | | | | | | | | | | Move some GPIO aliases from baseboard to board such that they can be customized to use different names. BRANCH=None BUG=b:167884598 TEST=Built the affect Trogdor boards. Change-Id: Id8d68d9b03d43010a81565f7625b8033aab14594 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410850 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* strongbad / coachz : Add Initial SupportBob Moragues2020-09-151-0/+123
BUG=b:162409909 BUG=b:164196066 TEST=Verify build of strongbad target BRANCH=none Signed-off-by: Bob Moragues <moragues@chromium.org> Change-Id: I763d3be6852dfdbcf52a3db5b3bfa82fd654d459 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2396537