summaryrefslogtreecommitdiff
path: root/board/helios
Commit message (Collapse)AuthorAgeFilesLines
* adc: Remove adc_chip.h where adc.h is usedCaveh Jalali2021-08-271-1/+0
| | | | | | | | | | | | | | This removes the use of adc_chip.h where adc.h is also used. In this case, adc_chip.h is redundant. BRANCH=none BUG=b:181271666 TEST=buildall passes Change-Id: Id7baf9aef949447a4d47934242f9bae97c971262 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120317 Reviewed-by: Keith Short <keithshort@chromium.org>
* helios: gyro sensor add 2nd source icm40608Michael5 Chen12021-08-243-1/+100
| | | | | | | | | | | | | | | | gyro sensor add 2nd source icm-40608 BUG=b:196286603 BRANCH=hatch TEST=make BAORD=helios Using command "watch ectool motionsense lid_angle". Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I06c1ea21b353959f07dd16a3732d23c638d031bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3089086 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* LED On/Off: Make battery LED optionalDiana Z2021-04-221-4/+5
| | | | | | | | | | | | | | | Currently, all boards using the LED On/Off module have battery LEDs. However, if we'd like to expand support to Chromeboxes then the battery LED must become optional. BRANCH=None BUG=b:185508707 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* LED On/Off: Remove power LED configDiana Z2021-04-222-3/+2
| | | | | | | | | | | | | | | | | | | | | | Move the LED on/off module towards using a more flexible LED support approach. Define a weak power LED table and setter for boards to override when needed. Note that during run-time these functions will not get called since led_auto_control_is_enabled() will return false for nonexistent LEDs. This consumes an average of 165 additional bytes of flash space on boards which do not use a power LED. BRANCH=None BUG=b:185508707 TEST=make -j buildall, load on guybrush (battery LED only) and confirm no errors are seen. Load on Boten (both LEDs) and confirm behavior appears normal Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iaa1e22a7f5d8be39eb8792ee13d358087d7f7482 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832691 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* thermisor: move header to include dirDawid Niedzwiecki2021-04-221-1/+1
| | | | | | | | | | | | | | | | Move the "thermistor.h" header to the include/driver/temp_sensor directory. It is used by the Zephyr shim, so the change is useful to include the header. BUG=b:180403276 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I0e83df97e50a3b324440b65ddb900ddf135f2439 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2843323 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* genvif: Use VIF overrides by defaultAbe Levkoy2021-03-301-0/+3
| | | | | | | | | | | | | | Use board-specific override files when generating VIFs for boards. BUG=b:172276715 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I197365018ceb8197c22d631cebf4cbce1c0119f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785506 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* ec: change usage of "sane" per inclusive languagePaul Fagerburg2020-07-221-1/+1
| | | | | | | | | | | | | | | | Google is working to change its source code to use more inclusive language. To that end, replace the terms "sane", "sanity check", and similar with inclusive/non-stigmatizing alternatives. BUG=b:161832469 BRANCH=None TEST=`make buildall -j` succeeds. `grep -Eir "sane|sanity" .` shows results only in third-party code or documentation. Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Change-Id: I29e78ab27f84f17b1ded75cfa10868fa4e5ae88c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2311169 Reviewed-by: Jett Rink <jettrink@chromium.org>
* PD: Remove unnecessary PDCMD taskDiana Z2020-05-201-1/+0
| | | | | | | | | | | | | | | | | | | The PDCMD task is only pulling interrupts from the TCPCs on most boards, which is unnecessary since the PD_INT tasks handle this job now. Remove it from any boards using the PD_INT command which are not using the older CONFIG_HOSTCMD_PD functionality (ex. samus, oak). Located boards using: find -name "ec.tasklist" | xargs grep -l PD_INT | xargs grep PDCMD BRANCH=None BUG=b:154959596 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I29be8ab1d7a2616603fb55236aed4329ed8654f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208221 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* hatch: Remove the board keyscan_config definition and use the defaultWai-Hong Tam2020-05-111-1/+0
| | | | | | | | | | | | | | | | | | | The keyscan_config is the same as the default. Don't define the board custom keyscan_config. For the board.h, most of them have duplicated definitions from the baseboard.h. Remove them by the script: $ grep -rl 'BASEBOARD:=hatch' * | cut -f1 -d/ | xargs -IX sed -i \ '/#define CONFIG_KEYBOARD_BOARD_CONFIG/d' X/board.h BRANCH=hatch BUG=b:156007029 TEST=Build all the hatches boards, no error. Change-Id: Ib02550708d533ced77f5fad05b074291b66dd4fc Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2194160 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* driver: Replace BMI160 to BMI in board configChing-Kang Yen2020-04-231-6/+6
| | | | | | | | | | | | | | | | | Replace some macro of BMI160 to BMI version for common function of BMI series. Make board config include the accelgyro_bmi_common.h instead of accel_gyro_bmi160.h. BRANCH=None BUG=b:146144827 TEST=make buildall -j Change-Id: I043ff8a92f15295ead3fa5c1e292319e2b4fa21a Signed-off-by: Ching-Kang Yen <chingkang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2156525 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* 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/+7
| | | | | | | | | | | | | | | | 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-8/+4
| | | | | | | | | | | | | | 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>
* helios: Modify TCPC register MUX_DP_EQ_Configuration setting on MB port.Michael5 Chen2020-02-051-3/+10
| | | | | | | | | | | | | | | Modify TCPC register MUX_DP_EQ_Configuration setting to 0x98 on MB port. BUG=b:146462625 BRANCH=master TEST=Manual Using command "ectool i2cread 8 3 0x16 0xd3" to check register value. Change-Id: Ie72f672a166c42d5f4ea9eec1314a2eff8f690c7 Signed-off-by: Michael5 Chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2012453 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@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>
* Revert "hatch: refactor ↵Josh Tsai2019-12-131-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PD_MAX_VOLTAGE/PD_MAX_CURRENT/PD_MAX_POWER/PD_OPERATING_POWER/" This reverts commit 89197aceaf26ccf33b143c7a5e95eb07ba4c7464. Reason for revert: It is not necessary to change the PD setting, so revert it. Original change's description: > hatch: refactor PD_MAX_VOLTAGE/PD_MAX_CURRENT/PD_MAX_POWER/PD_OPERATING_POWER/ > > 1) The four config is determined by board, move it into board.h. > 2) Update the config variables above for stryke. > > BUG=b:145257655 > BRANCH=hatch > TEST=make buildall > > Change-Id: I1dd6a4f2a78b5196006821bc5d2686f68206c2e1 > Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1950270 > Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Bug: b:145257655 Change-Id: Ib2cb2db51b15f0974d2b22ef8e0e3e6d4e6b60d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1958299 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Josh Tsai <josh_tsai@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>
* hatch: refactor PD_MAX_VOLTAGE/PD_MAX_CURRENT/PD_MAX_POWER/PD_OPERATING_POWER/Josh Tsai2019-12-061-0/+6
| | | | | | | | | | | | | | 1) The four config is determined by board, move it into board.h. 2) Update the config variables above for stryke. BUG=b:145257655 BRANCH=hatch TEST=make buildall Change-Id: I1dd6a4f2a78b5196006821bc5d2686f68206c2e1 Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1950270 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* helios: Increase power button init timeoutTim Wawrzynczak2019-11-291-0/+7
| | | | | | | | | | | | | | | | | Helios' battery takes several seconds to come back from the cutoff state. Recorded about ~4 seconds, so bump the init timeout up to 6 seconds for some margin as well. BUG=b:141577278 BRANCH=firmware-hatch-12672.B TEST=Verify DUT will boot up from cutoff a few seconds after AC power is plugged in. Change-Id: I26086ef862ae09e8aca5afd67dff2492065428dc Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1940857 Reviewed-by: Shelley Chen <shchen@chromium.org> Commit-Queue: Shelley Chen <shchen@chromium.org>
* all hatch variants: Make sure EC_RST_ODL is GPIO_LOCKEDShelley Chen2019-11-221-0/+11
| | | | | | | | | | | | | BUG=b:144886704 BRANCH=hatch TEST=make buildall Change-Id: I0d520a5c375a2b47c55a335da91f556ccfd59c29 Signed-off-by: Shelley Chen <shchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928422 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* all hatch variants: Assign SYS_RST_ODL to GPIOC5Shelley Chen2019-11-221-1/+1
| | | | | | | | | | | | | | | | | There is an error where SYS_RST_ODL is assigned to GPIO02 where it is actually assigned to GPIOC5 in the schematics. This should cause AP reset to fail from the ec console. BUG=b:141476349 BRANCH=hatch TEST=None (I don't have a hatch board to test this out on) Change-Id: I855a65489ce974ee92be4bf51a83d5af40e4e2da Signed-off-by: Shelley Chen <shchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928421 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* helios: Fix battery discharge FET access config settingScott Collyer2019-11-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The batteries for helios specified register 0x44 as the register address that contains the status of the discahrge FET. That is correct for the TI fuel gauge. However, address 0x44 is in the manufacturer access region and therfore .mfgacc_support field needs to be set. However, register 0x0 mirrors the lower 16 bits of mfgacc reg 0x44, so an alternate solution is to change the reg_addr field to 0x0 and keep the regular smart battery register access method. In addition, this CL also removes dependency on the charge FET for battery disconnect state as that really only depends on the discharge FET being active so the battery can supply power to the system. BUG=b:136970148 BRANCH=None TEST=Put helios in ship mode via 'cutoff' on EC console. Then after waiting 30 seconds apply external AC power. Verfied that the discharge FET is initially disabled, then gets enabled as the battery wakes up. 2019-11-08 14:48:54 [3.428296 Batt disconnected: reg 0x6301 2019-11-08 14:48:54 [3.428843 found battery in disconnect state] 2019-11-08 14:48:54 [3.678447 Batt disconnected: reg 0x6301 2019-11-08 14:48:54 [3.678995 found battery in disconnect state] 2019-11-08 14:48:55 [4.427645 charge_manager_leave_safe_mode()] 2019-11-08 14:48:55 [4.434650 Battery 99% (Display 100.0 %) / ??h:?? to full] Prior to this fix this register was reading back 0x16 always. Change-Id: I8fbcdeb55f692796ced034c3c95db94fafdc908e Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906995 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Scott Collyer <scollyer@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>
* eSPI: Configure SLP_S3, SLP_S4 separatelyAbe Levkoy2019-10-301-1/+3
| | | | | | | | | | | | | | | | | | Split the configuration option CONFIG_HOSTCMD_ESPI_VW_SLP_SIGNALS into separate options controlling SLP_S3 and SLP_S4. Allow volteer to configure SLP_S3 as a GPIO and SLP_S4 as an eSPI virtual wire. Cause a build error if virtual wires are configured, but eSPI is not. BUG=b:139553375,b:143288478 TEST=make buildall TEST=Build volteer with CONFIG_HOSTCMD_ESPI_VW_S4 defined but CONFIG_HOSTCMD_ESPI undefined; observe build error BRANCH=none Change-Id: I8c6737e2ccb1a77a882e5fa65c6eddb342209b61 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1881758 Reviewed-by: Keith Short <keithshort@chromium.org>
* helios: Remove ALS OPT3001 configurationMichael5 Chen2019-10-282-40/+0
| | | | | | | | | | | | | | | Helios does not have an ambient light sensor (ALS). Remove the ALS OPT3001 configuration. BUG=b:142881461 BRANCH=None TEST=Manual Check EC console message. Change-Id: I91b94b3f9842621fc7b70e8dc9e84533174febfd Signed-off-by: Michael5 Chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871491 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* helios: Modify EC fan control tableMichael5 Chen2019-10-181-12/+6
| | | | | | | | | | | | | | | | | | Modify EC fan control table by Thermal request. (#21) BUG=b:136565336 BRANCH=none TEST=Manual Verify fan behavior by thermal team. Remove DPTF and check fan speed with temperature. When temperature over 65 degree, the fan start working. When temperature over 85 degree, the fan full run. And check system shutdown when temperature over 90 degree. Change-Id: I0d4633e9ba93ba12f28d4d069a9ae2a7a82fcedd Signed-off-by: Michael5 Chen <michael5_chen@pegatroncorp.com> Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1833944
* cometlake: Cleanup GPIO_PCH_SYS_PWROKKeith Short2019-10-151-8/+9
| | | | | | | | | | | | | | | | | | | | Change GPIO_EC_PCH_SYS_PWROK to GPIO_PCH_SYS_PWROK on cometlake to conform with naming convention used on other Intel processors. Leave gpio.inc files unchanged and add a mapping from GPIO_EC_PCH_SYS_PWROK to GPIO_PCH_SYS_PWROK in the board files. BUG=none BRANCH=none TEST=make buildall -j TEST=boot kohaku Change-Id: I722cb06dd90ee5d7e426664508f54a5cbe19de4a Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1848251 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* helios: Support GMR sensor for rev2 boardMichael5 Chen2019-10-143-1/+16
| | | | | | | | | | | | | BUG=b:141723737 BRANCH=Master TEST=Manual Check tablet mode behavior for board version 1 and 2. Change-Id: Iea992b726d9c5a8e4562362dbd24aec8460742c4 Signed-off-by: Michael5 Chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1831933 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* helios: Add TEMP_SENSOR4Paul Fagerburg2019-10-103-1/+10
| | | | | | | | | | | | | | | | | | Helios adds TEMP_SENSOR4 to the EC ADC2 pin. Add this to the list of temperature sensors that the EC can report on. BRANCH=None BUG=b:142266102 TEST=`make buildall -j` Verify that Helios builds correctly. Change-Id: I05ccaf5ac339d8a7e1ccd1e3079fc7bddfb841be Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1848968 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Commit-Queue: Sean Abraham <seanabraham@chromium.org> Commit-Queue: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
* tablet_mode: Renaming for GMR sensorPhilip Chen2019-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* helios: Add support for TEMP_SENSOR3Philip Chen2019-09-183-3/+12
| | | | | | | | | | | | | | | | | | | | A new temperature sensor is added to Helios board, close to the audio jack. It is used to support the speaker calibration test in the factory. This patch adds support for this temperature sensor. BUG=b:139335207 BRANCH=none TEST=temp command in EC console Change-Id: I766240540ad55b80a1aae3e1a9fb8f3286aba679 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1803975 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Tested-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
* helios: Use a custom lid interrupt handlerFurquan Shaikh2019-09-052-1/+23
| | | | | | | | | | | | | | | | | This change ignores lid open signal when tablet mode is returned as true. This is a workaround with board version #1 where lid open can be incorrectly triggered in 360-degree mode. BUG=b:139964210 BRANCH=None TEST=make -j BOARD=helios Change-Id: I707dcd2a8efd75668ee29bffa54622aa698e7d57 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1781803 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
* hatch: Change interrupt handler for EC_RSMRST_LScott Collyer2019-09-041-1/+1
| | | | | | | | | | | | | | | | | | This CL changes the interrupt handler for EC_RSMRST_L gpio to use intel_x86_rsmrst_signal_interrupt. This interrupt handler reduces the propagation delay for high->low signal transitions. BUG=b:132421681 BRANCH=None TEST=make buildall Change-Id: I00420347fad84b876688e8d8a7ede9093e11ccaf Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1772482 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* akemi, hatch, helios, kindred: Add EC_PROCHOT_IN_OD to gpio.incFurquan Shaikh2019-08-241-0/+1
| | | | | | | | | | | | | | | | This is useful when debugging PROCHOT# related issues. BUG=b:139034279 BRANCH=None TEST=Verified that gpioget shows the state of PROCHOT# on helios. Change-Id: I771743b181620189263246daa424b2bdf76b59b6 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1768925 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* Helios: Support mode-aware DPTFPhilip Chen2019-08-211-0/+4
| | | | | | | | | | | | | | | BUG=b:138702459 BRANCH=none TEST=manually test on helios board together with coreboot changes, confirm the trip temperatures are different in clamshell/flipped-360 mode Change-Id: I4ad0d9d0d12ceb536f5c1c2e5074f046f307131b Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1752720 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
* hatch: update for 30.9K resistor in thermistor dividerPaul Fagerburg2019-08-132-3/+3
| | | | | | | | | | | | | | | | | | | All hatch-family hardware uses a 30.9K resistor in the temperature sensor with the 47K thermistor. Update Hatch reference, Helios, and Kindred. BRANCH=none BUG=b:124316213 TEST=Rebuild EC for each board: ``cd ~/trunk/src/platform/ec`` ``make -j BOARD=hatch`` ``make -j BOARD=helios`` ``make -j BOARD=kindred`` Change-Id: I71cb0b8db79f64e4809a2ef66db6fb1f0607ed53 Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1749740 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* hatch: SLP_S3/S4 sideband signals guarded with wrong configKeith Short2019-08-121-1/+0
| | | | | | | | | | | | | | | | All the hatch platforms had a typo with the config option guarding the configuration of the SLP_S3_L and SLP_S4_L signals. Changed CONFIG_HOSTCMD_ESPI_VW_SIGNALS to CONFIG_HOSTCMD_ESPI_VW_SLP_SIGNALS. BUG=b:139198212 BRANCH=none TEST=make buildall -j Change-Id: I96c01fb8e1903585f3bc19a30b2f9c0596e9edad Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1745655 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* hatch: remove CONFIG_SYSTEM_UNLOCKED, enable CONFIG_USB_PD_COMM_LOCKEDPaul Fagerburg2019-08-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the CONFIG_SYSTEM_UNLOCKED option from some board configurations and enable CONFIG_USB_PD_COMM_LOCKED. This allows factory tests to verify the behavior, and also ensures that developers and dogfooders are working with the same configs that will be released to customers - "test what you fly and fly what you test." Developers must remember to jump to RW before PD will negotiate. BRANCH=none BUG=b:138868206 TEST=Rebuild and flash on hatch: ``cd ~/trunk/src/platform/ec`` ``make -j BOARD=hatch`` ``./util/flash_ec --board=hatch`` Connect to EC console via servo Enable hardware write protect by connecting a battery Verify software write protect is off via ``flashinfo`` Reboot the device Look for "PD comm enabled" at the start of EC RO boot Enable software write protect via ``flashwp true`` Verify software write protect is on via ``flashinfo`` Reboot the device Look for "PD comm disabled" at the start of EC RO boot Look for "PD comm enabled" at the start of EC RW boot Shut down the device Disconnect the AC adapter Disconnect the battery Boot the device Disable software write protect via ``flashwp false`` Shut down the device Disconnect the AC adapter Connect the battery Connect the AC adapter Look for "PD comm enabled" at the start of EC RO boot Verify software write protect is off via ``flashinfo`` Change-Id: Ibf999ee3ef948168dd05a40d9c002f93f32dc48c Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1737530 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* pi3usb9201: Fix typo in structure name.Keith Short2019-07-301-1/+1
| | | | | | | | | | | | | | | | The structure used by board files to define the I2C connections to the PI3USB9201 driver had digits in the part number transposed. BUG=b:138650914 BRANCH=none TEST=make buildall Change-Id: Iaa7897a35f3172dd71fccca4e203b1d0e6a18ef7 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725959 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Helios:Modify Power LED behavior under suspendBarney_Liao2019-07-301-3/+4
| | | | | | | | | | | | | | | | According to Hatch Chromebook Requirements (Four second period, 25% duty cycle), modify power LED behavior under suspend. BUG=b:138411772 BRANCH=master TEST=Manual Check Power LED behavior under suspend. Change-Id: Id92539c378d2c99d884a84eca58514ffa78773fa Signed-off-by: Barney_Liao <barney_liao@pegatron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1723889 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* Remove __7b, __8b and __7bfDenis Brockus2019-07-202-9/+9
| | | | | | | | | | | | | | | | | | | 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-192-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Helios:Initial Type-C Controller PS8751 settingBarney_Liao2019-07-181-0/+7
| | | | | | | | | | | | | | | | Setting Type-C Port1 controller register 0xE8 (High Speed Signal Detector threshold adjustment) to 0x80 (-25%). BUG=b:136531130 BRANCH=master TEST=Manual Check Type-C Port1 register 0xE8. Change-Id: I5957fcd3389296500992ea3075dcde4a3b690f98 Signed-off-by: Barney_Liao <barney_liao@pegatron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1703724 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* Helios:Modify lid and base rotation matrixBarney_Liao2019-07-171-9/+4
| | | | | | | | | | | | | | Depend on placement modify rotation matrix for the lid and base sensor. BUG=b:135554555 BRANCH=ToT TEST=Manual Check EC console accleinfo. Change-Id: I287808dde06ff752f9e10766f3c348e0d63606f3 Signed-off-by: Barney_Liao <barney_liao@pegatron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1687037 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* hatch/helios/kindred/kohaku: Enable EC-based display backlight controlPhilip Chen2019-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | This patch allows EC to override display backlight control for hatch family. Also enable CONFIG_BACKLIGHT_LID so that EC can specifically turn off display backlight when the lid is closed. BUG=b:135511415 BRANCH=none TEST=On hatch rev1 board, turn off/on display backlight by 'ectool backlight 0' and 'ectool backlight 1' TEST='emerge-hatch chromeos-ec' Change-Id: I894ef2879fb584ccf84cd643cc4c0cd5fdcb8525 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679047 Reviewed-by: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
* helios: Modify Battery pack infomichael5_chen2019-06-262-6/+33
| | | | | | | | | | | | | | | Update board_battery_info with latest battery pack information. BUG=b:135074326 BRANCH=Master TEST=Manual Battery charge and discharge and check EC console message. Change-Id: Ie3dbbdc06a9ebf3873c9b255539b40bb29ec7d19 Signed-off-by: michael5_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660527 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Philip Chen <philipchen@chromium.org>
* helios: Add support for power LEDScott Collyer2019-06-212-1/+29
| | | | | | | | | | | | | | | | This CL adds support for the power LED. BUG=b:133501368 BRANCH=none TEST=make -j BOARD=helios Change-Id: Ib0d117631b7482fad65e6b8df326194281b21d5b Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1636433 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Auto-Submit: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* helios: Remove support for USB-AScott Collyer2019-06-213-14/+1
| | | | | | | | | | | | | | | | | | | Helios will not have any USB-A ports so can remove EC support for that feature. The GPIO signals for this feature are routed to test points and so have kept those signals, but changed them to GPIO_INPUTS to avoid any potential leakage issues. BUG=b:133501368 BRANCH=none TEST=make -j BOARD=helios Change-Id: Ia6ee1436abd26b428fa5381fe64b7ad837783d2b Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1636432 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Auto-Submit: Scott Collyer <scollyer@chromium.org>
* helios: Change port 0 TCPC from ANX7447 to PS8751Scott Collyer2019-06-153-10/+8
| | | | | | | | | | | | | | | | | | | This CL changes the TCPC config for port 0 from the ANX7447 to the PS8751. It includes changing the gpio name for the reset to reflect that it's active low instead of active high. BUG=b:133501368 BRANCH=none TEST=make -j BOARD=helios Change-Id: Ic96b8e9ddbf229c251cae3db4a70feb7b7e83765 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1633910 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>