summaryrefslogtreecommitdiff
path: root/board/fizz/board.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fizz: Remove AMON_BMONDaisuke Nojiri2017-12-041-6/+0
| | | | | | | | | | | | | | Fizz EC doesn't have IADP_ACMON_BMON. So, this ADC channel can't be used. BUG=none BRANCH=none TEST=none Change-Id: I13a4fd4cbb638af731d5bbe3404bfa6a97a2950d Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/803895 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* charge_manager: Add EC_CMD_OVERRIDE_DEDICATED_CHARGER_LIMITDaisuke Nojiri2017-11-281-1/+2
| | | | | | | | | | | | | | | | | | Usually, the max current and supply voltage of dedicated chargers are not known to the EC. This patch adds EC_CMD_OVERRIDE_DEDICATED_CHARGER_LIMIT, which allows the host to change the max current and supply voltage of the dedicated charge port. BUG=b:64442692 BRANCH=none TEST=make runtests && buildall. Boot Fizz and let coreboot set the adapter current and voltage. Change-Id: I29b3f5762f8b316ca363c23e230530cdf4ca207a Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/769152
* buttons: Make buttons[] common.Aseda Aboagye2017-11-171-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Nearly every board had a buttons array defined in which its contents had the standard volume buttons. This commit creates a single common buttons array that can contain the standard volume buttons and recovery buttons. If a board has volume up and down buttons, they can simply define CONFIG_VOLUME_BUTTONS and it will populate the buttons array with the standard definition. The buttons are active low and have a 30 ms debounce period. Similiarly, if a board has a dedicated recovery button, defining CONFIG_DEDICATED_RECOVERY_BUTTON will also populate the buttons array with a recovery button. BUG=chromium:783371 BRANCH=None TEST=make -j buildall. TEST=Flash a device with CONFIG_VOLUME_BUTTONS, verify pressing volume buttons still work. Change-Id: Ie5d63670ca4c6b146ec8ffb64d40ea9ce437b913 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/773794 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
* Fizz: Switch power source to BJ at G3/S5Daisuke Nojiri2017-11-131-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | This patch allows Fizz to switch the power source from a type-c charger to a barrel jack adapter if the system is in S5. BUG=b:38321259 BRANCH=none TEST=Verify the following with 45W and 60W type-c chargers: 1. Boot Fizz with a type-c charger 2. Go to S5 if not already. 3. Plug in a BJ adapter. Fizz boots to S0 using BJ power. Also verified other boot modes are not affected: 1. Auto boot on BJ insert 2. Auto boot on Type-C insert 3. Recovery boot on BJ 4. Recovery boot on Type-C 5. Stay off if it's previously S5 Change-Id: I86aa0fe6e403bcbacfe396997d897111ffcf8e74 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/706251 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Fizz: Modify thermal tableRyan Zhang2017-11-061-7/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify thermal table for Fizz reference patches: 627542, 288256, 329359 on off RPM step0 0 step1 16 2 2800 step2 27 18 3200 step3 35 29 3400 step4 43 37 4200 step5 54 45 4800 step6 64 56 5200 step7 97 83 5600 Prochot degree: active when t >= 88C release when t <= 85C Shutdown degree: when t >= 90C BUG=b:67487721, b:64439568 BRANCH=master TEST=fan target speed follows table, make -j buildall pass Change-Id: I3378668a560b8ddc568fe9cbf2703613fad8e4b6 Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/729606 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* driver: Rename pmic_tps650830 -> pmic_tps650x30.Aseda Aboagye2017-10-261-15/+15
| | | | | | | | | | | | | | | | The registers seem to be the same for the TPS650930, therefore, this commit just renames the register map to have a more generic name. BUG=None BRANCH=None TEST=make -j buildall Change-Id: Ib1c604b29e7f0e47cc036e042fe597f644d7ad36 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/736311 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
* Fizz: Inform host of BJ plug/unplug eventDaisuke Nojiri2017-10-241-2/+34
| | | | | | | | | | | | | | | | | This patch makes EC notify the host of BJ plug or unplug event by triggering EC_HOST_EVENT_PD_MCU. The host can then use EC_CMD_PD_HOST_EVENT_STATUS to get event details. BUG=b:67060237 BRANCH=none TEST=Boot Fizz on Type-C. Plug/unplug BJ adapter. Verify host event is set by hostevent. Verify available_charge is set by hacking chgsup command. Change-Id: I1831bec9715e0191cb9610e05d08bbc08347b513 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/692848 Reviewed-by: Shawn N <shawnn@chromium.org>
* Fizz: enable fanGaggery Tsai2017-10-171-0/+26
| | | | | | | | | | | | | | | | | | | | This patch is to enable fan through PWM4 output and TACH feedback from TA2 GPIOA6, and move EC_PLATFORM_RST to GPIO45. BUG=b:64915426 BRANCH=None TEST=emerge-fizz chromeos-ec and use fanduty and faninfo from EC console to control and check fan status. Probed oscilloscope on PWM output and checked the duty as expected. Made sure the fan was stopped when DUT entered S3 and was running when DUT resumed from S3. Change-Id: I09f3ac43d2e4170b2aff3830f832bc5fd46a15c0 Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/627542 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* power: Add flags parameter to power_signal_infoFurquan Shaikh2017-10-031-8/+8
| | | | | | | | | | | | | | | | | | | | | | Replace structure member "level" in power_signal_info with "flags". "level" has been used on all boards to indicate active-high or active-low levels. Addition of "flags" allows easy extension of power_signal_info structure to define various flags that might be applicable to power signals (e.g. "level"). Going forward, additional flag will be added in follow-up CLs. Also, provide a helper function power_signal_is_asserted that checks the actual level of a signal and compares it to the flags level to identify if a power signal is asserted. BUG=b:65421825 BRANCH=None TEST=make -j buildall Change-Id: Iacaabd1185b347c17b5159f05520731505b824b8 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/679979 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* Fizz: Initialize PMIC after AP power is readyDaisuke Nojiri2017-09-291-3/+9
| | | | | | | | | | | | | | | | | On proto3, PMIC isn't powered on POR, thus board_pmic_init fails. With this change, EC waits until AP power is ready before it notifies HOOK_CHIPSET_PRE_INIT where PMIC will be initialized. When AP power is ready, PMIC should be ready as well. BUG=b:65839247,b:64944394 BRANCH=none TEST=Run reboot [/cold/ap-off] command on BJ and Type-C. Change-Id: I7e7e07b5acf92167584966ded0a5f14fb6b04f0b Reviewed-on: https://chromium-review.googlesource.com/672152 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Fizz: Blink LED to request more powerDaisuke Nojiri2017-09-291-1/+9
| | | | | | | | | | | | | | | | | | This patch makes the LED blink to alert the user when there is not enough power to boot the system. This patch also changes minimum boot power to 50W. It's common for all SKUs. BUG=b:37646390 BRANCH=none TEST=Power Fizz with 15W, 45W, 60W chargers. Verify LED blinks as expected. Change-Id: If269897f5022f6cba80f37ce03e2315cfb2cf504 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/682876 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* charge_manager: Support no-BC1.2 configurationShawn Nematbakhsh2017-09-281-1/+0
| | | | | | | | | | | | | | | | If BC1.2 isn't supported, don't waste space + time checking for inputs that don't exist. BUG=chromium:759880 BRANCH=None TEST=`make buildall -j` Change-Id: I47e81451abd79a67a666d1859faf2610ee5c941a Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/663838 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
* Fizz: Limit input currentDaisuke Nojiri2017-09-251-43/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Fizz has an over current control system. There are two FETs connected to two registers: PR257 & PR258. They control the max input current as follows: PR257, PR258 For 4.62A (90W BJ adapter), on, off For 3.33A (65W BJ adapter), off, on For 3.00A (Type-C adapter), off, off BJ adapters are distinguished by reading GPIO71. This patch also removes ISL9238 driver and ramping code. The charger chip has been removed from the board since proto2. BUG=b:65013352 BRANCH=none TEST=Boot Fizz Proto3 on BJ and Type-C. Change-Id: I32c2467f4ab23adf3f9313a03914d74d64a722df Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/668119 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* Fizz: Pulse LEDDaisuke Nojiri2017-09-191-1/+9
| | | | | | | | | | | | | | | | This change makes the power LEDs pulse using PWM. S0: solid green. S3: pulsing amber (= mix of green and red) S5: off BUG=b:64975836 BRANCH=none TEST=Verify LED behavior described above on Proto3 Change-Id: I696cf8279dd762236b7b7f000a316820d58916bf Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/669773 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* Fizz: Detect BJ as a power sourceDaisuke Nojiri2017-09-141-0/+6
| | | | | | | | | | | | | | | Proto2 board has the line ADP_IN, which is raised to 2.5 V when a BJ adapter is plugged. This patch makes EC running on proto2 and above use this line to detect the power source at boot (as opposed to proto1 guessing a BJ adapter is plugged if PPVAR_BOOSTIN_SENSE is 19v). BUG=b:37573548 BRANCH=none TEST=Boot proto3 Fizz on BJ and Type-C. Change-Id: I4052a73729d62694ce154bfb33255974dc110841 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/626879
* Treat SYSTEM_IMAGE_RW_B also as RW copyDaisuke Nojiri2017-09-091-2/+1
| | | | | | | | | | | | | | SYSTEM_IMAGE_RW_B hasn't been globally treated as a RW copy. This change makes EC treat it also as a RW copy. BUG=none BRANCH=none TEST=make buildall Change-Id: Iae5a9090cdf30f980014daca44cdf8f2a65ea1f2 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/656337 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* ps8xxx: use custom tcpm_drvCaveh Jalali2017-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | the ps8xxx family of TCPCs (ps8751, ps8805) have historically used the generic tcpci_tcpm_drv functions, but we need to override some of these entry points because the parade parts need to be woken up before accessing registers. in most cases, this doesn't matter because we access the chip in quick succession where we can "safely" assume the chip is awake -- and the code is structured to implicitly keep the chip awake. the new case we need to address here is where we need to suspend the pd_task and TCPC at an arbitrary point in time. the driver's .release method is called to shut down the chip, and that involves first waking up the chip to be able to access its regs to mask off interrupts, etc. BUG=b:35586896 BRANCH=none TEST=tested from depthcharge - we no longer get errors in the EC console logs about TCPC "release" failed. Change-Id: Ic2a90b71050b3f68c697b1cef48d736ed88b3f41 Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://chromium-review.googlesource.com/616460 Reviewed-by: Shawn N <shawnn@chromium.org>
* fizz: Implement workaround for broken reset flagsFurquan Shaikh2017-07-211-0/+12
| | | | | | | | | | | | | | | | | | Board rev0 will lose VBAT on power cycle and therefore cannot successfully save the reset flag state. Implement workaround that will allow these boards to continue to work for FAFT testing by indicating to the skylake chipset power code that it should skip the PMIC reset when doing 'reboot ap-off'. BUG=b:63889675 BRANCH=None TEST=None Change-Id: Ie79053e2e52a3a9efd9cd864808af7214989602e Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/579666 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* driver: tcpm: ps8xxx: Add support for PS8805.Aseda Aboagye2017-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | This commit adds support for the PS8805, another Parade Tech TCPC with integrated superspeed muxes. This also creates a generic Parade Tech TCPC driver which supports the PS8xxx series. The current supported TCPCs are: - PS8751 - PS8805 BUG=b:63508740 BRANCH=None TEST=`make -j buildall` Change-Id: I78383af414996e0e8d6220985d286f95267136f8 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/564799 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
* KBL/SKL: Add wait between DSW_PWROK and PWRBTNDaisuke Nojiri2017-06-191-0/+6
| | | | | | | | | | | | | | | | This patch adds wait between DSW_PWROK and PWRBTN assert. It is required to be 95 msec or longer for Kaby Lake and Sky Lake. Refer to the timing diagram for G3 to S0 on Sky Lake or Kaby Lake platform design guide for details. BUG=b:62584658 BRANCH=none TEST=On Fizz, measured time between DSW_PWROK high and PWRBTN assert for 1:AC plug-in, 2:recovery+power press, 3: reboot ec command. Change-Id: I89a14ac9a49e20a332bd662d90be62f8ea23b003 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/534901
* Fizz: Prevent active charge port from being resetDaisuke Nojiri2017-05-241-32/+0
| | | | | | | | | | | | | | | Fizz needs to set available power on type-c/pd before PD task starts. PD task tries to reset available power at start-up. This patch prevents those reset attempts from disabling already initialized power sources. BUG=b:37316498 BRANCH=none TEST=Boot Fizz on barrel jack and type-c adapters Change-Id: I807f9d5ae4b4530fa80479b4e1a669569be841c1 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/513582 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Fizz: Set up charge suppliers at bootDaisuke Nojiri2017-05-171-40/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Fizz has two power sources: barrel jack and type-c port. It selects a power source at boot and does not dynamicall switch to the other ports after that. Fizz initializes all power suppliers of all ports to zero then initialize the source supplier (barrel jack or type-c port). When both sources are provided, it prefers a barrel jack. This detection is done by reading the voltage on PPVAR_PWR_IN. If barrel jack is detected as a sink, type-c port works as a source only. If type-c port is detected as a sink, type-c port works as a sink only. Fizz does not have a battery. So, battery module is removed. BUG=b:37573548,b:37316498 BRANCH=none TEST=Boot on both type-c & barrel jack. Change-Id: If4f5ff0c6019d06ac9dacb5dd365f5aa96bffef3 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/499547
* Fizz: Add recovery buttonDaisuke Nojiri2017-05-121-0/+15
| | | | | | | | | | | | | | | Cr50 masks the recovery button signal on a proto board when the power button is being pressed (b:37682117). This bug has to be fixed for the recovery button to work. BUG=b:37274183 BRANCH=none TEST=make buildall Change-Id: Ia413ffce84d67b6f24f983ccce8ae8277452ac2c Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/494069 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Fizz: Enable/disable USB Type-A portsDaisuke Nojiri2017-05-111-0/+8
| | | | | | | | | | | | | This change makes Fizz enable USB type-A ports on resume and disable them on shutdown. BUG=b:38226666 BRANCH=none TEST=Boot Fizz off of USB flash drive on a USB-A port. Change-Id: I7f22438271ffc080e950f5f300937d89706e08a4 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/481078
* Fizz: Initialize board directoryDaisuke Nojiri2017-05-101-486/+175
| | | | | | | | | | | | | | | | | | | | | Noteworthy changes: * Remove motion sensors * Remove MKBP keyboard * Temp sensor (TMP432) * Remove BC1.2 * One TCPC port (PS8751) * Remove lid switch * Remove backlight * Switch PMIC to TPS650830 BUG=b:37271713 BRANCH=none TEST=Boot Fizz off of barrel jack. Change-Id: Id3b1ab1d10ad52786d75dc04bc3115c80ea31ee4 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/459114 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Fizz: Add Fizz to flash_ecDaisuke Nojiri2017-04-171-2/+2
| | | | | | | | | | | | | This patch also fixes years and board names in the comments. BUG=b:37271713 BRANCH=none TEST=none Change-Id: Ib9595a7e091c70680333a02ba2fdde3f24c0f4e6 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/475210 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* Fizz: Clone board/poppyDaisuke Nojiri2017-04-171-0/+769
BUG=b:37271713 BRANCH=none TEST=make buildall Change-Id: Id40f125e212067ddbf711a61e2623b92e7c1c4be Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/459112 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>