summaryrefslogtreecommitdiff
path: root/board/cret/board.h
Commit message (Collapse)AuthorAgeFilesLines
* Cret: Increase the length of Battery Model stringjohnwc_yeh2021-08-041-0/+3
| | | | | | | | | | | | | | | | | | | | Some battery model names that differ only beyond the 7th character, which cannot be differentiated with the current limitation of 8 characters per battery string. Introduce a new hostcmd version that allows longer battery strings and enable it on Cret. BUG=b:191546149 BRANCH=dedede TEST=Test "ectool battery", "ectool batterycutoff" in VT2 and "battery" command ec console. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I2fca124742ac04e55364cd6603336eb000e412bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070942 Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Cret: Remove CONFIG_SYSTEM_UNLOCKEDjohnwc_yeh2021-08-031-6/+0
| | | | | | | | | | | | | | | Disable CONFIG_SYSTEM_UNLOCKED for faft_ec_fw_qual test. BUG=b:191390046 BRANCH=dedede TEST=make BOARD=cret,and test firmware_ECSystemLocked pass Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: If6d85094e4c044cb0c32583b976d27e7756d9d69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068482 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: remove unnecessary defineelmo_lan2021-07-121-2/+0
| | | | | | | | | | | | | | | Cret use LSM6DSO as base g-sensor. BRANCH=dedede BUG=b:193271141 TEST=check ectool motionsense normally. Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: Iaf01eb9ffe4d3ec437b79243ace971789bae3687 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3019618 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* keeby/dedede: Gate temp sensor access by GPIOAseda Aboagye2021-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | On dedede and keeby boards, the thermistors are powered by the EC's GPIO_EN_PP3300_A pin. If the thermistors are read before they are powered then the EC may force a thermal shutdown due to the bad reading. This commit simply defines CONFIG_TEMP_SENSOR_POWER_GPIO along with a CONFIG_TEMP_SENSOR_FIRST_READ_DELAY_MS to ensure we don't get any false positive thermal shutdowns. BUG=b:192053176 BRANCH=dedede TEST=Build and flash lalala. Unplug AC charger from DUT, press refresh+power button to reset DUT, verify that DUT boots up automatically. TEST=Repeat above test with madoo. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I2a49e2f896c4120a8f01f440ea22c9b3763c6589 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988364 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* Cret: Modified NPCX7_PWM1_SEL defination to 1Josh Tsai2021-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | In Cret board, GPIOC1 is the power button signal from EC to PCH, if NPCX7_PWM1_SEL set to 0, it will cause the power button signal can't be controlled by EC. So we need to change the NPCX7_PWM1_SEL to 1. BUG=b:191184363 BRANCH=dedede TEST=DUT can resume from S0ix by press power button, GPIOC1 can be asserted when press power button. Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: I64a600a02791fa73db28d4315eb287622d114675 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2965804 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Modify three battery parameterjohnwc_yeh2021-06-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Add three battery type for cret. And modify device name and device length to identify. 1. New battery type of manufacture name is same as BATTERY_BYD_1VX1H, BATTERY_SMP_ATL_VM732 and BATTERY_SMP_COS_VM732, so use device name to recognize. 2. The last three strings of the battery device name are the production date, need ignore,so modify the read length of the device name. BUG=b:183875170 BRANCH=dedede TEST=Battery can be found via EC log check and battery can be cutoff by ectool command. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I1ab8116d8e6c41d3eeb48852058fbd71bee0eca6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919151 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: add Power LED behaviorjohnwc_yeh2021-05-271-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Battery control for Cret. Power LED: System S0: White System S0ix: Blinking white (1 sec on, 1 sec off) System S5/G3: Off. Battery LED: DC mode: System S0: off. System S5/G3: Off. System battery low: Blinking Amber (1 sec on, 1 sec off). AC mode: Charging: Amber. Full charged: White. Battery low or AC only: Blinking Amber (1 sec on, 1 sec off). BUG=b:188900681 BRANCH=dedede TEST=test on cret ,battery 、 Power LEDs are work. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I184753a738576772e37baa37e0484e9cd9834b7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919152 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Add three battery parameterjohnwc_yeh2021-05-191-3/+6
| | | | | | | | | | | | | | | | | Add three battery type for cret. And add device name to identify. BUG=b:183875170 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I923eed50eb08be38a60a01c28dc2eb9e35f9d255 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2905166 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Add thermistorsjohnwc_yeh2021-05-131-0/+12
| | | | | | | | | | | | | | | | This change adds the temperature sensors for cret, which are hooked up to 2 of the ADCs. BUG=b:187894632 BRANCH=dedede TEST=build and test on cret board. Can obtain value via ectool cmd. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I7d07c36e80b95b149d503fd9e37999291c21d5f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891675 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Disable Tablet mode detection for Clamshell skujohnwc_yeh2021-05-101-0/+2
| | | | | | | | | | | | | | | | It should disable tablet mode detection for Clamshell sku, plan to use fw_config to disable tablet mode. BUG=b:184504093 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I1bfd6e12da3df4dd435c5518c65fd3f85cb221d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875910 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Implement motion sensor setting MB LSM6DSOjohnwc_yeh2021-05-051-1/+3
| | | | | | | | | | | | | | | | | | | Implement motion sensor setting on MB side and sensor board side. Change MB LSM6DSM to LSM6DSO. The sensor of model: 1.MB: LSM6DSOTR 2.Sensor board: LIS2DE12TR BUG=b:184504094 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I002feb39026c132834a7e18af67348f5a1082c08 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2835260 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Cret: Removed PD port 1 configuration and modified HDMI gpio settingJosh Tsai2021-05-051-21/+3
| | | | | | | | | | | | | | | | | | | Due to cret only support a USB PD port 0 on MB side, so remove the PD port 1 configuration in board layer. Also change the GPIOF5 and GPIO92 to HDMI function. BUG=b:186393859,b:185009499 BRANCH=dedede TEST=DUT can power on, and HDMI function is normal. Signed-off-by: Josh Tsai <Josh_Tsai@compal.corp-partner.google.com> Change-Id: I477a157aeb9115fa5b827a1412f0862c480207d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870892 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Tested-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
* cret: Remove GPIO43 of ADC Alternate functionjohnwc_yeh2021-04-121-1/+0
| | | | | | | | | | | | | | | Remove GPIO43 of ADC Alternate function and set Input and Internal pull up. BUG=b:181325655 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I3e506c0916a284a57afa93f8e100f45c285a38bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2817683 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Add Forest Creek battery parameter on Cretjohnwc_yeh2021-04-121-0/+4
| | | | | | | | | | | | | | | Use the Forest Creek battery to Cret. BUG=b:185066840 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: Ib4c9c3feb7236b2d2a3d6224249003797ce1c189 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2817691 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Implement motion sensor settingjohnwc_yeh2021-04-081-2/+2
| | | | | | | | | | | | | | | | | | Implement motion sensor setting on MB side and sensor board side. The sensor of model: 1.MB: LSM6DSOTR 2.Sensor board: LIS2DE12TR BUG=b:184504094 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: Ie010e38e5c2ffeb5acc09cdcf15aea429169cf5e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809925 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Initial EC image setup battery parameterjohnwc_yeh2021-04-061-1/+6
| | | | | | | | | | | | | | | | Setup battery parameter for cret. BUG=b:183875170 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I3f4df0a4255bbc6aaf9bbee1260abc7660e4626d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789807 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Add a common header for board_is_sourcing_vbus()Simon Glass2021-03-311-2/+0
| | | | | | | | | | | | | | | | This function prototype is defined in lots of files, none of which is visible to Zephyr. Add a prototype in one place and remove the others. BUG=b:183296099 BRANCH=none TEST=make buildall Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ia324327a69b117483ab9ee5c85eba93c0fb5ad9c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789799 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* cret: Initial EC image set gpiojohnwc_yeh2021-03-301-3/+0
| | | | | | | | | | | | | Initial gpio for cret. BUG=b:181325655 BRANCH=None TEST=This ec bin file can boot on madoo. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I8d6e0b534503bf08e5f81f739543337e92af19b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2787949 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* cret: Initial EC imageIan Feng2021-03-251-0/+186
Create the initial EC image for the cret variant by copying the waddledoo reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:181325655 BRANCH=None TEST=make BOARD=cret Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com> Change-Id: Icdc166c2189dc35512818884c72aa553f3b7c0f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2764219 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>