summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
* volteer: disable PD 3.0 stackKeith Short2019-12-062-0/+39
| | | | | | | | | | | | | The PD 3.0 stack isn't reliably charging the battery. BUG=b:145622441 BRANCH=none TEST=make buildall TEST=verify PD negotiation with battery connected and battery charging Change-Id: Idccf6a4f325e94fdbf2df310b539a0b75125be92 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1949148
* volteer: Enable USB-C Port 1Vijay Hiremath2019-12-042-3/+35
| | | | | | | | | | | BUG=b:140578872 BRANCH=none TEST=Able to boot to OS from Zinger connected on Port 1 Change-Id: I2db9763370ecfae2a38081b6fc607b1ef1d06b67 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1947426 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: enable thermal managementKeith Short2019-12-042-17/+155
| | | | | | | | | | | | | | | Configure fan for PWM operation. Enable thermal management policies. BUG=b:143768086 BRANCH=none TEST=make buildall TEST=use 'thermalset' to force high and halt temperature conditions, verify AP is alerted and halted Change-Id: I6362ce9d5a0edbd231e3f9464dfccf34d4f1c7a0 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1946774 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Revert "kukui: remove virtual battery for devices with smart battery"Ting Shen2019-11-292-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c1edf25f4d3000529994be1ac1af166c69df47a3. Reason for revert: still need virtual battery on kodama/jacuzzi to let OS side has a more stable data. Original change's description: > kukui: remove virtual battery for devices with smart battery > > CONFIG_I2C_VIRTUAL_BATTERY/CONFIG_I2C_PASSTHRU_RESTRICTED is for devices > with dumb battery to simulate smart battery interface. Remove these > flags for devices with smart battery. > > BUG=b:140847169 > TEST=ectool i2cread 8 1 0x16 <reg>, where reg = 0x00~0x03 > BRANCH=master > > Change-Id: I6088f66596e626f62320ee4ab181e972016aa80c > Signed-off-by: Ting Shen <phoenixshen@chromium.org> > Reviewed-on: http://crrev.com/c/1799289 > Reviewed-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> > Reviewed-by: Yilun Lin <yllin@chromium.org> > Tested-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> > Commit-Queue: Sean Abraham <seanabraham@chromium.org> BUG=b:144195782 TEST=`ectool i2cxfer 2 0x0B 16 0x21` multiple times. BRANCH=master Change-Id: I999328cd22561fd9f15eef23bc15be980b66bb8d Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1933793 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* kukui: refactor PD_MAX_VOLTAGE/PD_OPERATING_POWERTing Shen2019-11-292-13/+14
| | | | | | | | | | | | | | | | | | 1) PD_MAX_VOLTAGE_MV is determined by charger, move it into the ifdef VARIANT_KUKUI_CHARGER_* clause. 2) PD_OPERATING_POWER_MW is determined by board, move it into board.h. 3) update the two config variables above for jacuzzi family. BUG=None TEST=make buildall BRANCH=kukui Change-Id: I6f14a71a34e2c81a5030ff5809996ddf74a4ad12 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1930521 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* trembyle: Increase CONFIG_UART_TX_BUF_SIZEEdward Hill2019-11-271-0/+4
| | | | | | | | | | | | | | | Increase console output buffer to avoid risk of losing output (eg when tracing I2C) since we have the RAM available. BUG=none BRANCH=none TEST=build Change-Id: I5886723fe0eacd3d1040bfbd4cd320f279c82d6c Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1940782 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* trembyle: Update GPIO and I2C to match HW changesEdward Hill2019-11-272-7/+7
| | | | | | | | | | | BUG=b:145246560 BRANCH=none TEST=AP still boots ok Change-Id: I0110c7041ab9d2ba2df3107341524c792af2ca5d Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1939786 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* usbc: make BB virtual mux retimer compatible with non-virtualDenis Brockus2019-11-251-6/+6
| | | | | | | | | | | | | | | | Changed the driver interface for BB virtual mux retimer to stop using global functions and use the usb_retimers array instead. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I56befaca1720eb2f4e0599a983629b4df45dc76b Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928121 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* zork: make product ID project levelDenis Brockus2019-11-251-0/+8
| | | | | | | | | | | BUG=none BRANCH=none TEST=none Change-Id: I7cd71e246708dd4423b7fc3021a644e2988e2771 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1930868 Reviewed-by: Jett Rink <jettrink@chromium.org>
* cleanup: Segregate ioexpander related drivers in ioexpander folderVijay Hiremath2019-11-221-1/+1
| | | | | | | | | | | BUG=none BRANCH=none TEST=make buildall -j Change-Id: I7fe9ab23254dbd8515936d10ad6782305e76236c Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925173 Reviewed-by: Jett Rink <jettrink@chromium.org>
* volteer: disable CONFIG_BRINGUPKeith Short2019-11-211-0/+5
| | | | | | | | | | | | | | | | Disable CONFIG_BRINGUP option now that the AP power up sequence is working. Also change the default console mask to disable CC_HOSTCMD, which is flooded with motion sense requests (0x60) from the kernel. BUG=b:142409811 BRANCH=none TEST=make buildall TEST=verify Volteer boots to OS automatically. Change-Id: I58f850188ca3981373af06369eb70c5887c7da31 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1919402 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* volteer: enable EC controlled fanKeith Short2019-11-211-0/+16
| | | | | | | | | | | | | | | | Enable simple GPIO control of the fan. Still need to add PWM controls once a smart fan is available. BUG=b:140582490 BRANCH=none TEST=make buildall TEST=verify fan turns on when exiting G3 and turns off before entering G3. Change-Id: I3ec5b36fd5c7ca607f03efa9a76f8dc2efacbb22 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1924503 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: Add USB-C policyVijay Hiremath2019-11-213-12/+182
| | | | | | | | | | | BUG=b:140578872 BRANCH=none TEST=USB2.0 & USB3.0 device detected over Type-C port 0 Change-Id: I44790aac3543589c32dcd60f84e4e67d5d76cdab Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1922752 Reviewed-by: Keith Short <keithshort@chromium.org>
* icelake/tigerlake: add option to enable PP3300 before PP5000Keith Short2019-11-151-0/+1
| | | | | | | | | | | | | | | On Volteer, to avoid leakage from PP3300_A rail to PP5000 rail, turn on the PP3300 rail before PP5000. BUG=none BRANCH=none TEST=make buildall -j TEST=verify Volteer transitions to S0 Change-Id: Ic86f97dbdde6d6c904fe7efc8b0edc1ead727cf6 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1918603 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: enable delay on RSMRST pass throughKeith Short2019-11-151-0/+1
| | | | | | | | | | | | | | Volteer requires delay on RSMRST to meet power sequencing requirements. BUG=none BRANCH=none TEST=make buildall TEST=Verify Volteer powers on to S0 Change-Id: I927856a49a7a74b8908d6b7340abd60d926ec888 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1918601 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* trembyle: Enable pi3dpx1207Denis Brockus2019-11-142-0/+14
| | | | | | | | | | | | BUG=b:139428185 BRANCH=none TEST=verify mode is set correctly when switching devices Change-Id: I266a399966bb90709bd3395405a67d3a1f49c2f9 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911292 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* volteer: Cleanup LED configurationAbe Levkoy2019-11-131-7/+6
| | | | | | | | | | | | | | Place it in its own section and remove stale TODO. BUG=b:139554899 TEST=make buildall BRANCH=none Change-Id: Iac64a4c0d29091de68213aa719a0b48fcf369177 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913862 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org>
* volteer: Show power information with LEDsAbe Levkoy2019-11-132-4/+2
| | | | | | | | | | | | | | Configure the LEDs as power LEDs and enable setting them based on battery and chipset state. BUG=b:139554899 TEST=Observe LEDs; charge, disconnect battery, and fake low charge BRANCH=none Change-Id: Id303ffa9fce1ce1071d1615da7bb577ef4d6bfd0 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913861 Reviewed-by: Keith Short <keithshort@chromium.org>
* retimer: usbc retimer name cleanupDenis Brockus2019-11-132-3/+3
| | | | | | | | | | | | | | Need to cleanup naming around USBC Retimers for adding PI2DPX1207 code BUG=none BRANCH=none TEST=make buildall -j Change-Id: I7e18e0abbe5bfd89bf0e20fa7b5174669689778f Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911296 Reviewed-by: Edward Hill <ecgh@chromium.org>
* volteer: Adjust LED colorsAbe Levkoy2019-11-131-4/+6
| | | | | | | | | | | | | | | | Decrease the duty cycle for the green LED when used it combinations. It seems to be inherently brighter than the others and overwhelms them in secondary colors when used at the natural duty cycle. BUG=b:139554899 TEST=Ran ledtest; observed LEDs BRANCH=none Change-Id: Id02ff011bc88dc1d6370d07e951236308fce8270 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1907592 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: Enable NPCX7_PWM1_SELAbe Levkoy2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | GPIO alternate configuration is affected by macros referenced in gpio_chip-npcx7.h, such as NPCX7_PWM1_SEL. Enable this switch to 1) allow GPIO C2 to be configured as PWM1 (enabling red LED) and 2) prevent GPIO C1 from being configured as I2C6 SDA0 (enabling EC_PCH_PWR_BTN_ODL). BUG=b:139554899 TEST=ledtest 0 enable red TEST=Set EN_PP3300_A; set and get EC_PCH_PWR_BTN_ODL BRANCH=none Change-Id: I52652105d0a99dced53e451aaf47550029516880 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1907591 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: add BC1.2 for USBC port 0Keith Short2019-11-122-0/+14
| | | | | | | | | | | | | | | | Adds BC1.2 charger detect support for the USB2.0 connection on USBC port 0. BUG=b:140579641 BRANCH=none TEST=make buildall Change-Id: I42cc7ee21475dbbb5165979d0a656ae6eaef31c8 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1897068 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
* Volteer: configure USBC port 0Keith Short2019-11-124-2/+462
| | | | | | | | | | | | | | | | | Configure PPC, and TCPC for USBC port 0. Includes battery and charger stubs. USB PD policy is stubbed or TODO. BUG=b:140572591 BRANCH=none TEST=make buildall TEST=connect 45W charger to Volteer, observe that PD negotiates 15V/3A operation. Change-Id: Iec92a93dd99286289d77e59865c6f0b52f26dffa Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1896641 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* baseboard/kukui: fix pogo extpower statusYilun Lin2019-11-112-4/+19
| | | | | | | | | | | | | | | | On krane, POGO provide extpower when only connects to a dock, so we should check if it's connecting to a dock, rather than checking POGO_VBUS_PRESENT only. TEST=see battery LED is off when connects to keyboard, and LED on when connets to a USB-C charger. BUG=b:144137508 BRANCH=kukui Change-Id: Iab38590780b1e86149287fb9985c8ffa625b016f Signed-off-by: Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1907670 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* power/mt8183: Need 1s pwrbtn press to exit off stateYilun Lin2019-11-111-0/+4
| | | | | | | | | | | | | | | | | | To prevent mispressed cases, we decide to increase the power button press boot time to at least 1s. TEST=aps; powerbtn $sec; where $sec is between 0~1000 and see it won't boot TEST=aps; powerbtn $sec; where $sec > 1000 and see it boot TEST=aps; ensures the physical power button press is working as expected. BUG=b:131856041 BRANCH=kukui Change-Id: Ie3099ba9639a729cee77b7d444a459fbef72733d Signed-off-by: Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906387 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* volteer: set battery I2C speed to 100 kHzKeith Short2019-11-111-1/+1
| | | | | | | | | | | | | | | | The battery fuel gauge only support I2C bus speeds up to 100 kHz. BUG=none BRANCH=none TEST=make buildall TEST=verify communication with battery on volteer Change-Id: Ie170d42844707a8d3b74876cf25e3b8a2eae17e8 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1902692 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* volteer: add charger supportKeith Short2019-11-102-16/+7
| | | | | | | | | | | | | | | | Configure ISL9241 charger on Volteer. BUG=b:140557020 BRANCH=none TEST=make buildall Change-Id: I96f379cbb2adb7d46a79c9d177930e1ff4e0fa63 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1896649 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: add initial battery supportKeith Short2019-11-094-6/+78
| | | | | | | | | | | | Add ODM specified 62 Wh battery. BUG=b:143477210 BRANCH=none TEST=make buildall Change-Id: I7c3292bbd23405781207366981c2af03b6d4624a Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1896648
* volteer: Configure ADC channelsKeith Short2019-11-082-1/+43
| | | | | | | | | | | | | | | | | | Configure ADC channels for temperature sensors. enum adc_channels is required by the isl9241 charger support. Addtional changes are still needed to support EC thermal capabilties. BUG=b:143768086 BRANCH=none TEST=make buildall Change-Id: Ia34464e56185e1693dd4c8aed378d7703c290742 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1896640 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* baseboard/kukui: Increase UART TX buffer size to 8192Yilun Lin2019-11-071-1/+1
| | | | | | | | | | | | | | | To keep buffer overflow logs. TEST=make buildall BUG=none BRANCH=kukui Change-Id: I2db611f9296aa03cfb97932f3c816003a2610ecb Signed-off-by: Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1899654 Tested-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* ec-fans: Make fans configuration const by default.Andrew McRae2019-11-023-3/+3
| | | | | | | | | | | | | | | | 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-0128-63/+63
| | | | | | | | | | | | | | | | | 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>
* cometlake: cleanup power signal namesKeith Short2019-10-311-1/+1
| | | | | | | | | | | | | | | Add X86 prefix to the Comet Lake signals names for consistency with other Intel APs. BUG=none BRANCH=none TEST=make buildall Change-Id: I70b2a261fd6fbc0e6de70e5d4cf3a90b35078d4e Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1888596 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* usb_pd: use enum tcpc_rp_value instead of intCaveh Jalali2019-10-318-8/+10
| | | | | | | | | | | | | | | this changes the declaration and definitions of typec_set_source_current_limit() to take an enum tcpc_rp_value instead of int. BRANCH=none BUG=none TEST=buildall passes Change-Id: If633641a581eeb6085b94bc727e23fb57f7cd435 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1889117 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* trembyle: temperature sensor changesDenis Brockus2019-10-301-11/+51
| | | | | | | | | | | | | | | Changed when thermistors will be valid Changed temperature limits for CPU BUG=b:143611482 BRANCH=none TEST=manual verification on trembyle Change-Id: Iab72844ebee21356a045e57d97ce253f3d23abef Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1890917 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* eSPI: Configure SLP_S3, SLP_S4 separatelyAbe Levkoy2019-10-304-8/+7
| | | | | | | | | | | | | | | | | | 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>
* kukui: set SPI pin to high speedTing Shen2019-10-261-0/+10
| | | | | | | | | | | | | | | | | The SPI pins should be configured to high speed to meet the spec. And since the pin assignment is same on all kukui families, move the setup code to baseboard/. BUG=b:138768646 TEST=verified by observe the waveform BRANCH=kukui Change-Id: I5b07767000bdf47101f83d338d06e7679c4f4848 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1770329 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
* Trembyle: Add CONFIG_USB_PORT_POWER_SMART for USB-A portsEdward Hill2019-10-252-0/+14
| | | | | | | | | | | | | Trembyle uses IO expander for USB-A VBUS enable and current limit GPIOs. BUG=b:138600691 BRANCH=none TEST=USB-A VBUS gets enabled on Trembyle Change-Id: I87b96cc6ce0b0a8ed077425556d838cb55075749 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1854780 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* akemi: add temperature sensor supportLu Zhang2019-10-252-0/+4
| | | | | | | | | | | | | | | | 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>
* usb_mux: Add driver for AMD FP5 USB/DP MuxEdward Hill2019-10-232-4/+4
| | | | | | | | | | | BUG=b:138600585 BRANCH=none TEST=build Change-Id: I547309c7000e7d3ca8549a7e626a63789665305d Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868921 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Kodama: folio case has no function but only works in VT2xiong.huang2019-10-221-4/+3
| | | | | | | | | | | | | | | | | | | When DUT starts up in S5/G3, HOOK_CHIPSET_STARTUP only called in RO stage. In fact, POGO ADC interrupt not be enabled after jumping to RW stage. Krane and Kodama board use POGO keyboard function. Moving common API to HOOK_INI (pogo_chipset_init) to ensure POGO ADC interrupt is enabled and API base_detect_deferred would be called after jumping to RW stage. BUG=b:142849032 BRANCH=kukui TEST=folio case works well in UI and VT2. Change-Id: Ie3fed9a88620414afeea2fa4dcbf2cd120e7ac37 Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869170 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* Reland "baseboard/kukui: use BASE_STATE_SWITCH instead"Yilun Lin2019-10-202-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of 92b3e86b23b59ebec3e59132cae2b32288fcf1b4, fixing up the call to base_init that does not exist anymore. Original change's description: > baseboard/kukui: use BASE_STATE_SWITCH instead > > tablet mode will also depend on BASE_ATTACHED_SWITCH. > > TEST=see EC sends BASE_ATTACHED event when keyboard attach/detach > BUG=b:140608847 > BRANCH=none > > Change-Id: Ib7d9bd0e8cf0efb5d0a3808f4649e0d9eb69b6d8 > Signed-off-by: Yilun Lin <yllin@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1806178 > Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> BRANCH=kukui BUG=b:140608847 BUG=b:141518464 TEST=see EC sends BASE_ATTACHED event when keyboard attach/detach Cq-Depend: chromium:1844514 Change-Id: I609c8ac958f7d344d73f28934e2b1187a8d11f22 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1844653 Tested-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kukui: remove battery SoC overwrite hackTing Shen2019-10-181-1/+3
| | | | | | | | | | | | | | | | | On-pack battery gauges should have better knowledge about battery life, so maybe we can trust SoC value reported from gauge and don't need this hack. BUG=b:142097561 TEST=confirm battery SoC won't jump to 97% unexpectedly BRANCH=kukui Change-Id: Ie3efdcbfa6d6525040e68b5abe0345a4b6c1fcde Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866210 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* kukui: runtime usb mux config selectionTing Shen2019-10-172-3/+22
| | | | | | | | | | | | | | | | | The compile time IF_ENABLED(CONFIG_USB_MUX_XXX) does not work on kukui, change this to runtime selection. BUG=b:135079572 TEST=On Krane Rev5/Kodama, verify the mux switch to dp + usb mode (i2cxfer r 0 0x48 0x11 returns 0x03 or 0x13) BRANCH=kukui Change-Id: Ib44f0c383ed5f9156e3dd3bf6faa3daebb22e146 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1864493 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* treeya: apply USB EQ setting to PS8751 USB muxLu Zhang2019-10-151-1/+12
| | | | | | | | | | | | | | | | | | | The default USB TYPE C connector facing receiver equalization setting is 0x90, compensate for channel loss up to 15.4dB It's high for some dongles. Apply lower USB EQ to 8.7dB BUG=b:140472120 BRANCH=none TEST=build and boot on, read back registers to verify > ectool i2cread 8 2 0x16 0xe7 0x40 Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I1fce255d0dbe8c5a12cf8c8ff5b3c506e8d19475 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1830538 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Paul Ma <magf@bitland.corp-partner.google.com> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com>
* volteer: Support keyboardAbe Levkoy2019-10-112-0/+24
| | | | | | | | | | | | | | | Configure keyboard features, enable keyboard-related tasks, and define a custom time period to wait for output to settle during key scan. BUG=b:139554320 TEST=make buildall BRANCH=none Change-Id: I0d28389361c87a868f62325b86b65fc5b2550a70 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1841885 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* hatch: Add baseboard function for retrieving Board IDTim Wawrzynczak2019-10-092-0/+17
| | | | | | | | | | | | BUG=none BRANCH=none TEST=Verify print output matches CBI dump Change-Id: I7a61179d1ad8a4d3f7e4eea3d2e94b066176bc20 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1838883 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* trembyle: board specific fast switch enable/disableDenis Brockus2019-10-092-0/+21
| | | | | | | | | | | | | | | | | Added board specific tcpc FRS enable/disable to work around timing issues that we found with trembyle. Also added some of the bringup debug settings BUG=b:138599218 BRANCH=none TEST=make buildall -j Change-Id: Ia16db22a9c2b3a47a4273ea1350a5ea58b78f5aa Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1847174 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Trembyle: Update config for bringupEdward Hill2019-10-091-16/+1
| | | | | | | | | | | | BUG=none BRANCH=none TEST=build Change-Id: I05c3fa2a8b72941ef1758be45428b9911938d013 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1845783 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Trembyle: Don't enable the new USB-C PD stack yetEdward Hill2019-10-081-0/+3
| | | | | | | | | | | | | | Wait for charging to work using the new USB-C PD stack before enabling it. BUG=b:142284905 BRANCH=none TEST=Plug charger in Trembyle USB-C0 Change-Id: I9dbadd7d955afbb8d7f7a148ed2ffb0def6c27ff Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1846751 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>