summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
* guybrush: power and chipset configurationRob Barnes2020-12-143-25/+83
| | | | | | | | | | | | | | | Basic power and chipset configuration for guybrush. Using stoney chipset, which is missing support for S0ix. S0ix support will be added later (b/175234270). BUG=b:175118237 BRANCH=None TEST=build Change-Id: I6aaa224b9ef554487a428db069d43922168baceb Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2585924 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-143-5/+5
| | | | | | | | | | | | | | | | | | | | 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>
* Ezkinil: Using fw_config to choose base accelgyro driverSue Chen2020-12-141-0/+1
| | | | | | | | | | | | | | | Add new ec_cfg_base_gyro_sensor_type "BASE_GYRO_ICM426XX = 3" for support ICM-426XX on ezkinil. BUG=b:175169469 BRANCH=zork TEST=Write fw_config bit15-11 to 011b on the Ezkinil DUT with ICM chip. Check the motion function is workable. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: If72746a1b7b44714aa39f7d48fd94d0c63d4f876 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581122 Reviewed-by: Edward Hill <ecgh@chromium.org>
* guybrush: config hibernate wake pins and spi flashRob Barnes2020-12-112-2/+12
| | | | | | | | | | | | | | | | Disable external SPI interface. Enable hibernate wake pins. Following instructions in configuration/ec_chipset.md BUG=b:175117284 BRANCH=None TEST=Build Change-Id: I428be0a0d641ecc6fc210460ae4f3102a022c6f3 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581978 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Fill in gpio.inc for guybrushRob Barnes2020-12-115-29/+192
| | | | | | | | | | | | | | Fill in guybrush gpio.inc based on schematic. Add minimal implementation required to get guybrush to build with gpio.inc filled in. BUG=b:175056466 TEST=Build guybrush binary BRANCH=None Change-Id: I2f66cebb02e174661950ec277175f63f85896c9c Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578256 Reviewed-by: Diana Z <dzigterman@chromium.org>
* honeybuns: Enable usbc supportScott Collyer2020-12-113-1/+123
| | | | | | | | | | | | | | | | | | | | | This CL adds boards specific parts required to enable TCPMv2.0 for both quiche and gingerbread. TCPMv2 configs are included, though, only type-c support is being selected. The reason for this intermediate point is an attempt to have more manageable amounts of changes for CL reviews. BUG=b:167601672 BRANCH=None TEST=verfied type-c attaches properly on quiche Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I2a4c3bf4089fb3e167d06921b177d8c4e61a021f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215424 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Auto-Submit: Scott Collyer <scollyer@chromium.org>
* Guybrush: Move implementation to baseboardRob Barnes2020-12-104-0/+82
| | | | | | | | | | | | | | | | Create a base_gpio.inc and base_ec.tasklist. Move nearly all the implementation to the baseboard. Parts of the implementation can be moved to the boards as needed. BUG=None TEST=Build BRANCH=None Change-Id: I3b6ae7539b152d8078f8ef49d7da143a6283d8d4 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2579647 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* sasuke : apply EC change in sasukeYongBeum.Ha2020-12-091-0/+4
| | | | | | | | | | | | | | | Sync with schematics of sasuke BUG=b:172869638 BRANCH=None TEST=make BOARD=sasuke Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: Ib19431e2f4dd6b9da1e5f2e06a44883496bead54 Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569070 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Raymond Chung <raymondchung@ami.corp-partner.google.com>
* charger: replace charger_get_input_current usesEric Yilun Lin2020-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Replace them with charger_get_input_current_limit which is aligned to the old usage, no funcional changes. Keep OCPC charger_get_input_current uses as was, since it is its intended use. Also, implement - isl923x_get_input_current, raa48900_get_input_current - sm5803_get_input_current_limit BUG=b:171853295 TEST=1. grep "\<charger_get_input_current\>"; only ocpc uses the function. 2. make buildall 3. test with CL:2569086 on waddledee(sm5803), waddledoo(raa489000), hayato(isl923x), pompom(isl923x), and ensure the output of `curr 0|1` equalts to the report of power meter. BRANCH=none Change-Id: I71aca33cbc88dda9b0238cb71b1609665a9c9a7f Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569085 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* kukui: allow Vconn swap if battery exists.Eric Yilun Lin2020-12-081-5/+2
| | | | | | | | | | | | | | BUG=b:174324375 TEST=insert Apple dongle, and HDMI port works. BRANCH=kukui Change-Id: I6ac5c6ce172c6f395a38b0be7dffb4e92f3b9dc4 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578221 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* power: move headers to include/powerJack Rosenthal2020-12-033-3/+3
| | | | | | | | | | | | | | This makes the headers visible to the Zephyr build. BUG=b:173798264 BRANCH=none TEST=buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I3b6d27c1234b3924ee8902a86eec5fdb2ccd9998 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2571897 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Dedede: Bail out of hibernate if z-state failsDiana Z2020-12-021-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | If we fail to enter z-state, this likely indicates that the z-state circuitry is in a state from which wake sources will not work. This would mean the EC would hibernate until a refresh+power sequence is run. Instead, choose to reset the system with the AP off. The battery will drain more quickly, but will be able to turn on when the power button is pressed normally. BRANCH=dedede BUG=b:166476907 TEST=on drawcia, remove C1 interrupt line sharing and wedge line low. Ensure "hibernate" run on the EC console from both S0 and G3 results in a reset with the AP off, and the system can be turned on with a power button press. Run with normal C1 interrupt line sharing in place and verify "hibernate" enters z-state as expected in S0 and G3. Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I8408522dd1b0bbbce6f4e2bf6d0c550febd27bbf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567582 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* ADLRVP:Support for 100w typeC power adapterPoornima Tom2020-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ADL SOC has a TDP of 45W and the RVP can support up to 200W power.Hence, increased the power support to 100W. BRANCH=None BUG=b:173081793 TEST=use chgsup command and list charger type negotiated values. Tested below on ADL: When Typec Charger connected to Port3: > chgsup port=3, type=0, cur=3000mA, vtg=20000mV, lsm=1 when TBT dock connected to Port1: > chgsup port=1, type=0, cur=4500mA, vtg=20000mV, lsm=1 when AC charger connected: > chgsup port=4, type=3, cur=5263mA, vtg=19000mV, lsm=0 Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I0677519a68013dbc593539b692bad5016b52654f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2531771 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* guybrush: initial EC board setupRob Barnes2020-11-293-0/+58
| | | | | | | | | | | | | | Create guybrush skeleton build. Minimal configuration required to build. BUG=b:173820614 BRANCH=none TEST=make -j BOARD=guybrush Change-Id: I1e906da42abc565941e6e7e9ca2c79462556ce09 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552855 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Intelrvp:Separate battery configuration into board specific filesAyushee Shah2020-11-253-119/+0
| | | | | | | | | | | | | | | | | | This CL adds the battery configuration from interlrvp baseboard to board specific file for Alderlake, Tigerlake and jasperlake platform so that same manufacturer battery but with different config params can be used on intended platforms. BUG=b:174129818 BRANCH=None TEST=Able to see correct battery configuration in "battery" EC command and can see the battery charging and discharging. Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Change-Id: I639eb4466c49dbdc01d31feb4ace8844a6b1ac87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2557763 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* PD: Fix passing information about polarity when DTS is connectedPatryk Duda2020-11-234-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7dec638eb577aaa3a00d0551d73c276b94ebacb2 introduced two polarity modes POLARITY_CC1_DTS, POLARITY_CC2_DTS in enum tcpc_cc_polarity, but in many places there was an assumption that value other than 0 means that cable is inverted, the most notable example is usb_mux_set(). As a result kernel sometimes was not reporting SuperSpeed depending on if cable was inverted or not. This patch adds mapping from polarity with DTS to polarity without DTS where necessary. BUG=b:162254118 BRANCH=none TEST=Connect ServoV4 to eve and run servod. Make sure that USB-C muxer is connects USB3.0 lines (servod should set it). Flash EC ToT on eve. Boot ChromeOS and go to Developer Console. Run 'dmesg -w', check if device (eg. ethernet adapter) is attached as SuperSpeed device. Unplug cable, invert and plug again. Kernel should report that device is attached as SuperSpeed. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I354ef7047240cc8b5db01936b3780fae7387edb5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2555157 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* brya: add skeletal board and baseboard buildCaveh Jalali2020-11-192-0/+18
| | | | | | | | | | | | | | | | | this adds a minimal build for a new board called brya. brya will be the basis for a family of boards, so this also introduces a new baseboard called brya. the primary goal is to introduce a build target to enable iterative development of this board. BRANCH=none BUG=b:173575131 TEST=make BOARD=brya, make buildall, verified ec.bin is generated Change-Id: I27a64594b84c69ee43ee91227c47391a801dee44 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546802 Reviewed-by: Keith Short <keithshort@chromium.org>
* kukui: Disable uptime host command in ROKeith Short2020-11-191-0/+3
| | | | | | | | | | | | | | | Save 512 bytes in RO flash space on Kukui platforms by disabling the uptime host command and disabling the AP reset log. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib967f0c07802ec6c08c611d0f26850072722d7dd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546989 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* Trogdor: Ignore HPD Low if the DP path can't be muxedWai-Hong Tam2020-11-181-37/+39
| | | | | | | | | | | | | | | | | | | | Only one DP path is allowed in the Trogdor design. If the DP path is occupied by another port, we ignored the HPD High but we forgot to ignore the HPD Low. We should ignore both HPD High and Low. When exit the DP alt-mode, also check if it is the correct path before clean up. BRANCH=None BUG=b:173213397 TEST=Plugged the 1st monitor to a port. Plugging the 2nd monitor to another port didn't affect the 1st monitor. Unplugging the 2nd monitor didn't affect the 1st monitor. Change-Id: Ice2ebc512239f062d22fa69befcaa39b9090c7db Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2537157 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Trogdor: Do not suppress CC_EVENT channel messagesWai-Hong Tam2020-11-171-1/+1
| | | | | | | | | | | | | | | The messages on CC_EVENT are not too noisy. They help debug. Do not suppress it. BRANCH=Trogdor BUG=b:168714440 TEST=Checked the CC_EVENT messages showing up, like [0.063848 event set 0x0000000000002000] Change-Id: I1036ce52ccea22ced73e7e0127b8777ca016325f Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2543109 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Casta : Support Multi-ChargerYongBeum.Ha2020-11-172-1/+9
| | | | | | | | | | | | | | | Casta needs to support 2 chargers(ISL9238 & BQ25710) BUG=b:168122776 BRANCH=firmware-octopus-11297.B TEST=None Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: I18758acbd0920132c2958bf9d238b4eac3fb5b73 Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428354 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* Trogdor: Move CONFIG_CMD_AP_RESET_LOG out of bringup listWai-Hong Tam2020-11-161-0/+1
| | | | | | | | | | | | | Move this CONFIG from bringup to production. BRANCH=None BUG=b:169736149 TEST=Built the image. Change-Id: I490499f3a85f91c6f07a0e099b8c0738bf0eb787 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2538262 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Kakadu: Add new battery support for gauge bq27542wen zhang2020-11-123-0/+229
| | | | | | | | | | | | | | Configure battery parameter and driver for gauge bq27542 on kakadu. BUG=b:172197008, b:171456201 BRANCH=master TEST=1.make -j BOARD=kakadu 2.verified the battery parameter and the result is OK. Change-Id: I4c2cc11df1e13cb7313280afca717a7f1e2461ff Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2531765 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* eldrid: add FW_CONFIG support for different keyboard layoutScott Chao2020-11-122-1/+18
| | | | | | | | | | | | | | BUG=b:172133632 BRANCH=firmware-volteer-13521.B-master TEST=make buildall TEST= ectool cbi get = 0x14902 ectool cbi set 0x114902 4 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I0decd978bf6c21dddd315857bb1a29ac20dbf276 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528732 Reviewed-by: Keith Short <keithshort@chromium.org>
* dalboz: enable thermal controlPeter Marheine2020-11-122-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Dalboz (and variants) has temperature sensors, but they weren't used. Enable CONFIG_THROTTLE_AP for dalboz as well as trembyle, and define some default thermal parameters (the same as the trembyle reference board, but without fan options because dalboz devices are fanless) to have the EC do platform thermal control. Devices may override the default thermal options by defining a non-__overridable thermal_params in their own board files: struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT] = { /* Copy defaults, modify as desired. */ } BUG=b:172025135 TEST=Setting temperature thresholds with `thermalset` on dirinboz EC console causes AP throttling as expected, `temps` reports reasonable actual temperature measurements. BRANCH=zork Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I641bb8cae3b416bf8a76b4853e2053fad14aed1c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530817 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Add EC_CMD_BATTERY_GET_STATIC v1 for zorkPeter Marheine2020-11-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Some zork variants have battery model names that differ only beyond the 7th character, which cannot be differentiated with the current limitation of 8 characters per battery string. Introduce a new hostcmd version that allows longer battery strings and enable it on Zork. Because allowing longer strings through the host memory map is more difficult and not required (because getting the full longer string is mostly only useful for servicing), the host memory map is unchanged. ectool is updated to use hostcmd (rather than memory map) if the new command version is available, in order to take advantage of it. BUG=b:171854783 TEST=ectool battery prints longer strings when supported by the EC; a hacked EC on morphius can return 11 characters of text. An EC running older firmware still works with a new ectool. BRANCH=zork Change-Id: I63d20d4f690b6945cb1d423aafaf55dafc039211 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519243 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Intelrvp:Supports boards without DC jackAyushee2020-11-073-1/+21
| | | | | | | | | | | | | | | This commit checks if the dedicated port count is greater than 0 for the charger specific files while keeping the code common for both DC jack supported and non DC jack supported boards. BUG=b:172642304 BRANCH=None TEST=make buildall -j Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I138d33802c2df586963e244f18b787ccce60b8f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523294 Reviewed-by: Keith Short <keithshort@chromium.org>
* usb: Remove references to usb23Caveh Jalali2020-11-062-2/+0
| | | | | | | | | | | | | | | | | The TCSS port mapping is not used by the EC and the higher layers no longer query the EC for this mapping. We can remove this feature and disable CONFIG_INTEL_VIRTUAL_MUX which was added to enable it. BRANCH=none BUG=b:153941950 TEST=buildall passes Change-Id: I2d7f51212f3e64d74827d7f82654eb93534b8db4 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427632 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* COIL: Rename CONFIG_I2C_CONTROLLERDiana Z2020-11-0512-12/+12
| | | | | | | | | | | | | Rename CONFIG_I2C_CONTROLLER and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ied6a1829bf54a5c9a32e6772982a4b8aa31aaf23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Trogdor: Request 5V when AP is off and battery is fullWai-Hong Tam2020-11-052-0/+44
| | | | | | | | | | | | | | | | | | | | | The charger is not efficient on buck mode when the operating current is low. It happens when AP is off and battery is full. Request the external adapter to a lower voltage, 5V. The charger will switch to boost mode that has a better efficiency. BRANCH=None BUG=b:170794007 TEST=Charged the battery to full. Checked it requesting 20V when AP is ON, and requesting 5V when AP is OFF. TEST=Discharged the battery to not full. Checked it requesting 20V no matter AP is ON or OFF. Change-Id: Ifa333fccb40e7ebb2461c396be392c4ccc2d4320 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518326 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* ADLP-RVP: Config to enable TBTPoornima Tom2020-11-031-0/+2
| | | | | | | | | | | | BRANCH=None BUG=b:171409539 TEST=Able to enter TBT mode Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I81fb01ac9e537ded25cfffc8a9691c173ed41a49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2490900 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* Kukui: initial a new models kakadu of ec.wen zhang2020-11-021-97/+0
| | | | | | | | | | | | | | | Copy from krane, which is a model from Kukui. Modified for building pass. It will need to be revised later. BUG=b:171763111 BRANCH=master TEST=make -j BOARD=kakadu Change-Id: I87fcf8c8e3bd4fa669e0bcb7fbb9d125a9926cdb Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2501801 Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org>
* intelrvp: Keep PPC specific code generic in baseboardVijay Hiremath2020-10-312-1/+3
| | | | | | | | | | | | BUG=none BRANCH=none TEST=PPC interrupt is invoked on ADL-RVP Change-Id: Ib41be079d0d5731627193d15b66bb9949bd2722f Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508156 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* Trogdor: Configure OE_L and SEL of DP muxes to prevent leakageWai-Hong Tam2020-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | The OE_L has external pull-up. It is actually an open-drain output. Configuring it to push-pull has leakage through the pull-up to an unpowered rail during EC hibernate. Also configure SEL to output low if OE_L is deasserted. The SEL has no meaning if the muxes are disabled. When EC hibernate, the muxing ICs are unpowered. Outputing low prevents leakage through the muxing ICs. BRANCH=None BUG=b:169595541 TEST=Plugged a HDMI monitor to port-0 and port-1; checked the DP mux settings correctly. Change-Id: Icf0e81172626c09bc556756f1bcdddb83f45ac68 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508864 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* morphius: Wait 500ms before allowing DP event to cause resume.Edward Hill2020-10-301-1/+1
| | | | | | | | | | | | | | | | | Turning off the MST hub in S3 (via IOEX_HDMI_DATA_EN_DB) causes a VDM:Attention that immediately wakes us back up from S3. Wait 500ms after S3 entry before setting EC_MKBP_EVENT_DP_ALT_MODE_ENTERED in pd_notify_dp_alt_mode_entry(). BUG=b:167949458 BRANCH=zork TEST=powerd_dbus_suspend with display connected to MST hub DB Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I0d90d0a5130403b9aca1057725509814cac0d545 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2506424 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* adlprvp: add Alderlake RVP supportPoornima Tom2020-10-285-0/+198
| | | | | | | | | | | | | | | | | | | | | | | Following features are enabled and verified. 1. Power sequencing 2. Host communication 3. USB TYPE-C - TCPC over PD AIC 4. H1 Close Case Debug 5. LED 6. Keyboard BRANCH=None BUG=b:169551130 TEST=Build, flash and boot the Alderlake RVP platform to OS make BOARD=adlrvpp_ite -j; sudo util/flash_ec --board=adlrvpp_ite --image=<path> Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I9d85e0cb93bc94f042f902b73ebd96a354d0f365 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435177 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* tree: Use new atomic_* implementationDawid Niedzwiecki2020-10-273-6/+6
| | | | | | | | | | | | | | | | | | | | | | | It is done as a part of porting to Zephyr. Since the implementation of atomic functions is done for all architectures use atomic_* instead of deprecated_atomic_*. Sometimes there was a compilation error "discards 'volatile' qualifier" due to dropping "volatile" in the argument of the functions, thus some pointers casts need to be made. It shouldn't cause any issues, because we are sure about generated asm (store operation will be performed). BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I98f590c323c3af52035e62825e8acfa358e0805a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2478949 Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Zork: Increase delay for hibernate on ACstabilize-rust-13555.B-masterEdward Hill2020-10-241-1/+1
| | | | | | | | | | | | | | | 300ms was not long enough to complete PD re-negotiation to 5V. This caused hibernate on AC to immediately wake back up. Increase delay to 900ms so we remain hibernated. BUG=b:170845706 BRANCH=zork TEST=hibernate on AC Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ia56d74a3e84f19f936d7b48a9ee9c6df609affdf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2494991 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Trogdor: Deprecate PMIC_FAULT_L signalWai-Hong Tam2020-10-222-5/+0
| | | | | | | | | | | | | | This signal is no longer connected to PMIC on recent hardware revisions. It is unused. Deprecate it. BRANCH=None BUG=b:171245607 TEST=Built the affected Trogdor images. Change-Id: I75562f1aa9e411df38afd321ab63b51e91e7d4f7 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2488660 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Octopus: Add SSFC field for ChargerYongBeum.Ha2020-10-222-0/+17
| | | | | | | | | | | | | | Casta need to support 2 chargers(ISL9238 & BQ25710) BUG=b:168122776 BRANCH=firmware-octopus-11297.B TEST=None Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: I6fdc7fefd5923ee1b168e6f0ec9defa19de7cb81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428350 Reviewed-by: Marco Chen <marcochen@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* morphius: update ps8818 usb rx settingZick Wei2020-10-152-0/+11
| | | | | | | | | | | | | | | | | | | This patch will update the ps8818 usb rx setting based on a CONFIG value. This will be set for all as the default of 112 Ohms and overridden by morphius to be 85 Ohms. BUG=b:169409479 BRANCH=zork TEST=verify that ps8818 register setting is as expected Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Iff492287efc9b12487ca0bb089f61486c4344c5e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2469613 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* TBT:Add support for exit mode SOP'/SOP'' on chipset transitionAyushee2020-10-143-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When chipset is transitioning to a new state or on sysjump, the EC re-negotiates to enter an alternate mode on booting up. This commit adds support for exiting Thunderbolt mode for SOP' and SOP'' for active cable on chipset transition and also moves all the alternate mode exit rotines to their respective files. It also delays deleting the SVID data until after the EXIT_MODE message has ACKed and avoids pd_dfp_exit_mode() from changing the alternate mode's internal states. This commit also makes sure that the mux is set to safe state before exiting the alternate mode and it is reconfigured according to the port's current data role on receiving ACK/NAK from the cable/port partner. BUG=b:151169925, b:159717794 BRANCH=none TEST=On reboot, able to exit and re-enter into DisplayPort mode, Thunderbolt mode with passive cable and thunderbolt mode with active cable. Change-Id: If1e48e9f31cd678e23fe89bd3494551b5d1a78f1 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415082 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* intelrvp: update usb_pd files to indicate MECC version complianceName2020-10-137-108/+130
| | | | | | | | | | | | | | | | | Add new configuration for MECC-0.9 version and update JSL,TGL RVP boards to use this config option. Support for new version of MECC-1.0 will be required for ADL-RVP. BRANCH=None BUG=b:169551130 TEST=make buildall -j Signed-off-by: pandeyan <anshuman.pandey@intel.com> Change-Id: Ic1118c460a7052ffd0141a45c9153dbdac421d1b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435175 Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: Poornima Tom <poornima.tom@intel.com>
* intelrvp: Enable temperature sensor only when SOC is on.Madhu M2020-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | As thermistors are on A-rail need to enable temperature sensor only when SOC is on. BUG=none BRANCH=none TEST=Tested on TGLRVP-Y Temperature sensor reading is disabled when A-rail is off Ambient : Not powered DDR : Not powered Skin : Not powered VR : Not powered Signed-off-by: Madhu M <madhu.m@intel.corp-partner.google.com> Change-Id: If64cd5c3503b4e802c4dc9bebc0475d055e63bc5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2454986 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* Trogdor: Make the Type-C port DFP onlystabilize-13525.B-masterWai-Hong Tam2020-10-101-0/+1
| | | | | | | | | | | | | | | | The Type-C ports on Trogdor doesn't support UFP, like ADB mode. So make the ports DFP only. When the data role change to UFP, it disconnects the USB mux. BRANCH=None BUG=b:143616352 TEST=Checked the USB mux disconnected when switching to UFP. Change-Id: I968f1fc7b8c15d34f635275911a013f28dc92359 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2464233 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Alexandru M Stan <amstan@chromium.org>
* Trogdor: Enlarge UART TX bufferWai-Hong Tam2020-10-101-0/+4
| | | | | | | | | | | | | | | Increase console output buffer since we have the RAM available. It helps console message drop/corruption. BRANCH=None BUG=None TEST=Enabled i2ctrace which dumps lots of messages. Change-Id: Icd98d429ec80cdae1d8970624a1c4c385ef73184 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2464232 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Alexandru M Stan <amstan@chromium.org>
* trogdor: enable CONFIG_CMD_CHARGENNamyoon Woo2020-10-091-0/+3
| | | | | | | | | | | | | This patch enables the console command 'chargen'. BUG=b:158477297 BRANCH=trogdor TEST=buildall Signed-off-by: Namyoon Woo <namyoon@chromium.org> Change-Id: I0bffc5ee489b1a3984ea4c59894dda770303fb92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2463596 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* it83xx: enable selecting EC's VCCDino Li2020-10-085-0/+9
| | | | | | | | | | | | | | | | | | | The VCC is the power source of EC's GPM0~6, will connect to 1.8v or 3.3v depended on platform design. This change was made to ensure voltage level setting of GPM0~6 matches the corresponded VCC level. So we can enable internal pull-up no matter VCC is connected to 1.8v or 3.3v BUG=b:168783892 BRANCH=none TEST=- buildall. - The level setting is correct on these boards: asurada, drawcia, and reef_it8320 Change-Id: I4eae368e569987381a0437494262d588436bb011 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2397931 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* Trogdor: Assert a GPIO to turn off rails before enter hibernateWai-Hong Tam2020-10-081-0/+6
| | | | | | | | | | | | | | | | We disabled the PSL mode hibernate. We uses another GPIO to control switches, which were originally controlled by PSL_OUT. Add this GPIO, named HIBERNATE_L, such that the non-PSL mode hibernate can retrofit the original design. BRANCH=None BUG=b:169797080 TEST=Triggered EC hibernate and checked the HIBERNATE_L GPIO asserted. Change-Id: I69c0d0296f701f3027adfd4d27fa51bdae0844a5 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2446662 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Trogdor: Disable PSL mode hibernateWai-Hong Tam2020-10-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RTC stops counting under PSL mode. The Trogdor design relies on EC to give the RTC counter. Disable the PSL mode hibernate and use the traditional non-PSL mode way, i.e. power down all RAM blocks except the last one. BRANCH=None BUG=b:169595541 TEST=Tested on Lazor; triggered hibernate, and waked it up using: * power button press * lid open * servo toggling EC_RST_ODL * AC plug (doesn't work, need to investigate why) TEST=Verified RTC still counting in hibernate: 2020-10-07 14:35:53 [244.922648 power state 9 = S5->G3, in 0x0005] 2020-10-07 14:35:53 RTC: 0x5f7e34b9 (1602106553.00 s) 2020-10-07 14:35:53 [244.923417 power state 0 = G3, in 0x0005] 2020-10-07 14:35:53 [244.926855 SDC Safe] 2020-10-07 14:35:53 [244.927138 Hibernate due to G3 idle] 2020-10-07 14:36:20 2020-10-07 14:36:20 2020-10-07 14:36:20 --- UART initialized after reboot --- 2020-10-07 14:36:20 [Image: RO, lazor_v2.0.5690-d95436fd6 ...] 2020-10-07 14:36:20 [Reset cause: hibernate wake-pin] 2020-10-07 14:36:20 ... 2020-10-07 14:36:23 > rtc 2020-10-07 14:36:25 RTC: 0x5f7e34d9 (1602106585.00 s) First RTC diff from the wall clock: 6553-53 = 6500 Second RTC diff from the wall clock: 6585-(60+25) = 6500 TEST=Verified RTC wake up from hibernate: 2020-10-07 14:59:25 > hibernate 10 2020-10-07 14:59:27 Hibernating for 10.000000 s 2020-10-07 14:59:37 2020-10-07 14:59:37 2020-10-07 14:59:37 --- UART initialized after reboot --- Change-Id: I23f6a65115d5722cf183948fad81dc16d3a6af47 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2447049 Reviewed-by: Alexandru M Stan <amstan@chromium.org>