summaryrefslogtreecommitdiff
path: root/board/kappa
Commit message (Collapse)AuthorAgeFilesLines
* ioex: it8801: Support multiple I2C addressesVijay Hiremath2021-09-102-3/+6
| | | | | | | | | | | | | | | | | | | To avoid the I2C address contention between multiple I2C devices on same bus, added code to support multiple I2C addresses for it8801 I/O expander. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I6985973f9ae3ce91383d3b568a851169e6a308af Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115426 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Li Feng <li1.feng@intel.com>
* kappa: Remove tablet modeDevin Lu2021-09-012-2/+3
| | | | | | | | | | | | | | | Since Kappa didn't support tablet mode. Remove tablet mode to prevent unexpected triggering. BUG=none BRANCH=firmware-kukui-12573.B TEST=make BOARD=kappa Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ic35832e73ba51e68933986a487f641f4f5fd94e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3131327 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* USB MUX: Convert usb_mux HPD functions to use mux_state_tDiana Z2021-08-301-1/+1
| | | | | | | | | | | | | | Since we have definitions for HPD IRQ and level in the mux flags, extend this to the HPD update function in the usb_mux structure as well. BRANCH=None BUG=b:172222942 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I19c3a65fc821a341338d73fabd7876339b37fe7d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3095437 Reviewed-by: Keith Short <keithshort@chromium.org>
* 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>
* keyboard: Use __override for keyboard_scan_configDaisuke Nojiri2021-07-231-1/+1
| | | | | | | | | | | | | | | | | Currently keyboard_scan_config is defined by each board using CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as __override hence removes CONFIG_KEYBOARD_BOARD_CONFIG. BUG=None BRANCH=None TEST=buildall Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403 Tested-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* cleanup: Fix Dynapack stringDevin Lu2021-07-212-5/+5
| | | | | | | | | | | | | | | The naming string should be DYNAPACK. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I32f2498d4e51a83bd323d313a862622b6e69967d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038017 Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* kukui: move common mkbp wake events to baseboard.hEric Yilun Lin2021-06-291-4/+0
| | | | | | | | | | | | | | | | also, kodama(detachable) missed MODE_CHANGE event, add it back. BUG=none TEST=make buildall BRANCH=kukui,icarus Change-Id: Id7139ef64caf28720d389d8c048bfd724b42ba95 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2987227 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* kappa: Remove motion_sense taskGwendal Grignou2021-03-314-42/+0
| | | | | | | | | | | | | | Kappa does not have any sensors, no need to have motion_sense task. BUG=none BRANCH=kukui TEST=compile Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: Icda2beec15278b25d7c9da1413152ba1e3ad608a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2791770 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Devin Lu <Devin.Lu@quantatw.com>
* Add a common header for board_is_sourcing_vbus()Simon Glass2021-03-311-1/+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>
* 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>
* COIL: Rename ioexpander i2c address variableDiana Z2021-02-241-1/+1
| | | | | | | | | | | | | | Rename ioexpander i2c address to match current conventions and update any calling locations. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iddad457f73d0dd0167496b794c00e274f8985615 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697855 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* baseboard/kukui: add support for EC variantDino Li2021-02-231-0/+1
| | | | | | | | | | | | | | | With this change, we are able to build baseboard/kukui/baseboard.c on other chips. BUG=none BRANCH=none TEST=buildall. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I209daaa991f021fb7c33c21c28a7be30203510bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2710131 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* COIL: Rename fusb302 driver variablesDiana Z2021-01-271-1/+1
| | | | | | | | | | | | | Rename i2c variables in the fusb302 driver and c-file references. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ifaf7984c52fc197403d447e00c02af036e54987e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2649354 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* tcpm: Move tcpm.h into an include directorySimon Glass2020-12-221-1/+1
| | | | | | | | | | | | | | | | | | This header file is used from quite a few files, relying on the EC build system to find includes in the driver/tcpm directory. For Zephyr we don't want to add that as an include. It makes more sense for header files to be in an include directory, so move it and fix up the users. BUG=b:175434113 BRANCH=none TEST=build Zephyr and ECOS on volteer Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I5851914b1a7d3fdc1ba911c0fbe9046afbaf6f5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597985 Reviewed-by: Keith Short <keithshort@chromium.org>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* jacuzzi: remove ADC_BATT_IDTing Shen2020-08-282-2/+0
| | | | | | | | | | | | | | | | | ADC_BATT_ID is reassigned to BATT_PRES in Jacuzzi families. Remove it from source code to prevent people using it. BRANCH=kukui BUG=none TEST=make buildall Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I213b502413642c9bfff99443180ddb43debb2463 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2380842 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
* kappa: implement battery_get_vendor_param to return oemdataTing Shen2020-05-282-0/+22
| | | | | | | | | | | | | | | | | | | | | | Kappa has a script (CL:*661617) that needs access of a non-standard SBS command for supplier and manufacture information. Implement a customized vendor param to expose this data to host. Since battery_get_vendor_param can only return 4 bytes at once, the command 0x70 is split into 16 separate calls (0x70~0x7F) to mimic the read string operation. Commands outside this range are rejected. BUG=b:155936029 TEST=1) `ectool batteryparam get <reg>`, where reg=0x70~0x7F 2) in ec console: `battparam <reg>`, where reg=0x70~0x7F BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I1ee505f7473711b15b2c1029261956c4bf1bea5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215091 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* kukui: pull up SPI1_NSS (CS_L).Eric Yilun Lin2020-05-251-1/+1
| | | | | | | | | | | | | | | | There is no pull-up at AP side, so we should pull it up at EC side to prevent EC SPI controller is starved waitting for AP SPI commands. BUG=b:156047546 TEST=make buildall; krane is booted. BRANCH=kukui Change-Id: I81f4aefb5e96f968cfbf5189b1f80e1e82f2d3ae Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2214460 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@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>
* OCPC: Add concept of active charger ICAseda Aboagye2020-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | With OCPC, one charger IC per Type-C port, there are now multiple charger ICs present in the system. This commit adds the beginning of OCPC support by adding the notion of an active charger IC. Charge Manager will select the active charger IC based upon the charge port. Boards must define this mapping in a board specific function. Additionally, this commit adds chgnum as a parameter to charger_set_input_current_limit(). BUG=b:148981052 BRANCH=None TEST=With other patches, verify that the active charger IC is able to be saved and retrieved. Change-Id: Iba4a8958171ad6e1630b0ca3d07d128bc1f2c4dd Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2135963 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* driver: Replace BMI160 to BMI in board configChing-Kang Yen2020-04-232-2/+2
| | | | | | | | | | | | | | | | | 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>
* jacuzzi: introduce VARIANT_KUKUI_JACUZZITing Shen2020-04-211-15/+1
| | | | | | | | | | | | | | | move common configs from jacuzzi derivatives into baseboard BUG=None TEST=make BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I5baf8c5bbb6520c324be4d30824b642141eeb331 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2147824 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* jacuzzi: enable 3A sourcingTing Shen2020-04-211-0/+1
| | | | | | | | | | | | | | | | | | | According to the hw requirement, Jacuzzi should be able to provide 5V/3A when it's not providing power on any other port. BUG=b:153699375 TEST=1. Connect juniper to another chromebook 2. in ec console, `pd 0 dualrole source` to force juniper sourcing power 3. make sure another device is receiving 5V/3A. BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I3f1b95d3a63b15828b4ea860c32fe2a638593f2b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2145128 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* kappa: fix battery manufacturer name dataDevin Lu2020-03-241-1/+1
| | | | | | | | | | | BUG=b:146504215 BRANCH=kukui TEST=make BOARD=kappa Change-Id: Id56be3e3e98fc88f5ebac7ea8604a1d65dc1d0df Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115907 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* usb_mux: retimer: mux as chained mux and retimerDenis Brockus2020-02-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kappa: add gpio led controllingDevin Lu2020-02-184-52/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | CL:1712887 added ioexpander gpio control. This patch add customize led behavior. Charging: Amber. Discharging: Off. Fully: White. Battery Error: Blinking white (0.5 sec on, 0.5 sec off) Fuel <10%: Blinking white (1 sec on, 1 sec off) Force idle for factory: Blinking amber (1 sec on, 1 sec off) system suspend without charging: Blinking white (1 sec on, 1 sec off) BUG=b:146844869 BRANCH=kukui TEST=make sure led is showing amber while battery is charging. make sure led is showing white while battery is fully charged. make sure led is blinking white while battery low. make sure led is blinking white on suspend without charging. make sure led is blinking white quickly while battery error. Change-Id: I2790cba404222c98d2e9741865ed3a532a6d001e Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2060249 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* jacuzzi: enable tablet mode in ECTing Shen2020-02-183-1/+6
| | | | | | | | | | | | | | | BUG=b:149666087 TEST="tablet mode enabled/disabled" in EC console TEST=see virtual keyboard when flip to 360 degree BRANCH=kukui Change-Id: I44af9f742775aaf71bbf792a70af3176f73bda52 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2059861 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
* driver/ioexpander_it8801: add I/O expander driver for GPIOtim2020-02-172-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IT8801 is an I/O expander with the gpio. Add api compatible with ioexpander_drv so the main io expander framework can make use of the pins on the it8801. BUG=b/138352732, b/146996723 BRANCH=none TEST=Use gpio.inc to declare the gpio state. The console command #ioexget can get as follows: 0 O L IT8801_G0_00 1 O H IT8801_G0_03 1 O H IT8801_G0_04 0 O L IT8801_G0_06 0 O L IT8801_G0_07 1 O H ODR IT8801_G1_10 1 O H ODR IT8801_G1_11 1 O H ODR IT8801_G1_12 1 I H IT8801_G1_13 1 I H IT8801_G1_14 1 I H IT8801_G1_15 1 O H ODR IT8801_G2_20 1 O H ODR IT8801_G2_21 0 O L ODR IT8801_G2_22 0 O L ODR IT8801_G2_23 TEST=jacuzzi, juniper and kappa still compile TEST=keyboard scanning still works TEST=keyboard scanning now uses fewer i2c packets due to caching of GPIO23 Change-Id: I7ad89058ccd43b073d648e93877b86d6f187b5df Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1712887 Reviewed-by: David Huang <David.Huang@quantatw.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: David Huang <David.Huang@quantatw.com>
* kappa: reduce bitbang failrateTing Shen2020-02-172-3/+3
| | | | | | | | | | | | | | | | | | | | | IRQ too often may cause bitbang generate incorrec clock waves, and make slave thinks transfer timeout. Reduce the busyloop interval in keyscan task to make bitbang waveform looks better, and also increase bitbang retry count to further reduce fail rate. BUG=b:147842740 TEST=verify that no battery error while typing. BRANCH=kukui Change-Id: If157073a8651e481fc798da30e0ead73c5837339 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2050003 Tested-by: Devin Lu <Devin.Lu@quantatw.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* juniper: implement otg functionTing Shen2020-02-101-6/+0
| | | | | | | | | | | | | | | | - set otg limit to 5V/3.3A according to hw requirement - remove unused charger_is_sourcing_otg_power function BUG=b:148627490 TEST=verify that the USB ports (both C and A) can supply up to 3A BRANCH=kukui Change-Id: I61b047f1d05e5428d4eef74c9e0af3a222449779 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2040879 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* jacuzzi: enable watchdog interruptTing Shen2020-02-101-1/+2
| | | | | | | | | | | | | | | | | BUG=b:148834107 TEST=On juniper: $ stop daisydog $ echo "z" > /dev/watchdog make sure DUT reboots successfully. BRANCH=kukui Change-Id: I60aa093bcbca0ef8865a9b4063a6c7c217b58499 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2043431 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Yu-Ping Wu <yupingso@chromium.org> Tested-by: Yu-Ping Wu <yupingso@chromium.org>
* kappa: enable ledDevin Lu2020-01-314-6/+77
| | | | | | | | | | | | | | | This patch is enabling led temporally for incoming build. Will add gpio control for led after CL:1712887 merged. BUG=b:146844869 BRANCH=kukui TEST=make sure led is showing amber while battery is charging. make sure led is showing white after battery was fully charged. Change-Id: I5b55bbed45360807dceca9fe2896084619fb900a Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2009540 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kappa: add battery configurationDevin Lu2020-01-102-37/+39
| | | | | | | | | | | | | | | This patch adds battery parameter as following: 1. Dynapack HIGHPOWER DAK124960-W110703HT 2. Dynapack CosMX DAK124960-W0P0707HT BUG=b:146504215 BRANCH=kukui TEST=make sure battery charging, battery cutoff works. Change-Id: I64d04dbd4056ce74c036d873a7b19f23a9dece11 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980407 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kappa: enable i2c bitbangDevin Lu2020-01-104-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clone from CL:1876290 BUG=b:146504215 BRANCH=kukui TEST=use console command "battery" to read battery information. 2019-12-25 15:16:15 Status: 0x00c0 DCHG INIT 2019-12-25 15:16:15 Param flags:00000003 2019-12-25 15:16:15 Temp: 0x0b9f = 297.5 K (24.4 C) 2019-12-25 15:16:15 V: 0x20c9 = 8393 mV 2019-12-25 15:16:15 V-desired: 0x21fc = 8700 mV 2019-12-25 15:16:15 I: 0xfffd = -3 mA(DISCHG) 2019-12-25 15:16:15 I-desired: 0x09b0 = 2480 mA 2019-12-25 15:16:15 Charging: Allowed 2019-12-25 15:16:15 Charge: 91 % 2019-12-25 15:16:15 Manuf: 333-24-1C-A 2019-12-25 15:16:15 Device: FO02037XL 2019-12-25 15:16:15 Chem: LION 2019-12-25 15:16:15 Serial: 0x0001 2019-12-25 15:16:15 V-design: 0x1db0 = 7600 mV 2019-12-25 15:16:15 Mode: 0x6001 2019-12-25 15:16:15 Abs charge:88 % 2019-12-25 15:16:15 Remaining: 4323 mAh 2019-12-25 15:16:15 Cap-full: 4787 mAh (4691 mAh with 98 % compensation) 2019-12-25 15:16:15 Display: 0.0 % 2019-12-25 15:16:15 Design: 4960 mAh 2019-12-25 15:16:15 Time-full: 0h:0 2019-12-25 15:16:15 Empty: 0h:0 Change-Id: I5ae254ce8e9abccfda6ba9f07251ca7e2fe19ff4 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980405 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kappa: remove charger port allocation with board versionDevin Lu2020-01-092-6/+1
| | | | | | | | | | | BUG=none BRANCH=kukui TEST=make BOARD=kappa Change-Id: I0c50c899f936707bfcb1b9388f0bddc1f9c0133b Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980401 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kappa: enlarge stack for hook_taskDevin Lu2019-12-251-1/+1
| | | | | | | | | | | | | Clone from CL:1957341 BUG=none BRANCH=kukui TEST=make BOARD=kappa Change-Id: I98479731d2b6c0323bae2b4ced1a25b856ca2b21 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980400 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kappa: Add keyboard functionalityZick Wei2019-12-114-1/+30
| | | | | | | | | | | | | | | Clone from CL:1693863 Added IT8801 io expandor (which include keyboard controller) and the keyscan task. BUG=none BRANCH=none TEST=make buildall Change-Id: Ibd74f55e37e8c9bef1d1866b0e538dec37000d66 Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1943496 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* power/mt8183: correct EN_PP1800_S5_L enable timingYilun Lin2019-12-103-30/+4
| | | | | | | | | | | | | | | | The power rail should be turned on at G3S5 rather than S5S3, and should be turned off after stay in G3 for 20ms. TEST=Ensure the power rail is on/off at correct timing BUG=b:144144075 b:145255107 BRANCH=none Change-Id: Ie621ab1ac5332da6718201c44266f41aafcac296 Signed-off-by: Yilun Lin <yllin@chromium.org> Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928413 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* jacuzzi: remove CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENTTing Shen2019-12-091-1/+0
| | | | | | | | | | | | | BUG=b:145376409 TEST=`ectool usbpdpower` BRANCH=none Change-Id: I95fea133997643408652e1884fe53215ef17e2a9 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1947508 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Revert "kukui: remove virtual battery for devices with smart battery"Ting Shen2019-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-0/+2
| | | | | | | | | | | | | | | | | | 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>
* kappa: fix charge/discharge control setting orderDevin Lu2019-11-211-3/+3
| | | | | | | | | | | | | Clone form CL:1916160 BUG=none BRANCH=none TEST=make BOARD=kappa Change-Id: I18905f7ace402debf1fad93e72b8a86ee27d1f50 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1918986 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* kappa: remove symbolic link from jaccuziDevin Lu2019-11-137-1/+644
| | | | | | | | | | | | | | | Copy jaccuzi for kappa EC image. Below CLs will come after this CL merged. 1. Battery configration. 2. Implement leds. BUG=b:144388520 BRANCH=none TEST=make BOARD=kappa Change-Id: Ica52cc6ddaf5d7bc6c94a11525584edad0258c00 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913943 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kappa: initial setupPaul Ma2019-11-121-0/+1
Create a new build target "kappa" and point to jacuzzi board. Since CL:1907512 has added damu and kappa in model.yaml, we need kappa has a board in ec source tree so that the command 'emerge-jacuzzi chromeos-ec chromeos-bootimage' to work. BUG=b:144191171 BRANCH=none TEST=make -j BOARD=kappa Change-Id: I6cccb786b16a027c205ba7ef7827e1eeb8b4c8b1 Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911269 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>