summaryrefslogtreecommitdiff
path: root/baseboard/guybrush/baseboard.c
Commit message (Collapse)AuthorAgeFilesLines
* guybrush: Add guybrush fw_configstabilize-glibc-13901.B-mainRob Barnes2021-04-081-0/+16
| | | | | | | | | | | | | | | | Each guybrush variant may have a different fw_config schema. Defining a schema agnostic fw_config interface at baseboard. Each guybrush variant must implement the interface. Fields that are not applicable outside a specific variant do not need to be exposed in the baseboard interface. BUG=b:178215011 TEST=Build and run on Guybrush B2 BRANCH=None Change-Id: I41d24ffddfc41d3148ba6d3685f728f6ec962919 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2722982 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Set fan_off threshold to 0Rob Barnes2021-03-241-1/+2
| | | | | | | | | | | | | | Set fan off threshold to 0 to ensure fan is always running SOC is on. This is a helpful visual and audible signal during bringup. BUG=b:183544852 TEST=Turn on soc at 33C and see fan on BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Ia552508132d42cfb332cc012431ebb68b3cefbc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2783602 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Remove CPU temp from thermal_paramsRob Barnes2021-03-241-11/+1
| | | | | | | | | | | | | | | | CPU temp is hotter than SOC temp. The CPU thermal params have not been tuned. High CPU temps is causing shutdowns. Removing CPU temp from thermal_params and relying on SOC temp. BUG=b:183561584 TEST=Build and run BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I2d4b5483b88adefb83a7f1f8c6ea0e810f04153f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2783601 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Add 200ms delay between rsmrst and pwrbtnRob Barnes2021-03-161-8/+5
| | | | | | | | | | | | | | | | | Changing from 80ms to 200ms to allow more time for signals to settle before pwrbtn. This delay is not documented in spec, so this may require further tuning. BUG=b:182802230 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I79432b05c11c520fd49cb84c8e575f253b04a836 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2764972 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Add fan supportRob Barnes2021-03-161-0/+30
| | | | | | | | | | | | | | | Add basic fan support. More tuning will be needed. BUG=b:178217015 TEST=Build BRANCH=None Change-Id: I8133bfeb63346a254d0300d99d2b0ade35f74cc6 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762804 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* Guybrush: Enable Power Group interruptsstabilize-13851.B-mainelmo_lan2021-03-131-0/+4
| | | | | | | | | | | | | | Enable interrupt of PG_GROUPC_S0_OD and PG_LPDDR4X_S3_OD. BUG=b:182581653 BRANCH=None TEST=EN_PWR_PCORE_S0_R works normal. Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: I06ece39630b3f4eab290a80a64b9f70a8f61cac0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757809 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* Guybrush: Don't read GPIO_EN_KB_BL as ioexRob Barnes2021-03-121-2/+2
| | | | | | | | | | | | | | GPIO_EN_KB_BL is being read as an ioexpander gpio. This was true on Zork but on Guybrush it's a regular EC GPIO. BUG=None BRANCH=None TEST=Build Change-Id: I1ced4ebbb8c5cbd2dfca0e12528dfcb8fa47f789 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755194 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: add current monitor adc signalsRob Barnes2021-03-091-1/+14
| | | | | | | | | | | | | | Add the two current monitor signals from the PCORE. These will only be used for debugging. BUG=None TEST=Build BRANCH=None Change-Id: I9d25fa263cd4ef9526a8c493a703d020672338c5 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740560 Reviewed-by: Diana Z <dzigterman@chromium.org>
* COIL: Rename ioexpander i2c address variableDiana Z2021-02-241-2/+2
| | | | | | | | | | | | | | 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>
* guybrush: Don't read memory temp in G3Rob Barnes2021-02-161-1/+9
| | | | | | | | | | | | | Memory thermistor is connected to S5 rail. BUG=b:179065659 BRANCH=None TEST=Build Change-Id: I5c412d6c473defae9088251db50cf23b098e2bc2 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2692868 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Configure FP6 USB Muxes for C0 and C1Rob Barnes2021-02-041-3/+133
| | | | | | | | | | | | | | Only PS8818 is supported with this change. Support for ANX74xx will be added later. BUG=b:178713079 BRANCH=None TEST=Build Change-Id: I60b58395001f258896612e9c3efa0a03c5d455bc Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2654388 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Configure keyboardRob Barnes2021-01-251-1/+48
| | | | | | | | | | | | | | | Configure keyboard based on zork. Enable keyboard tasks. Enable pwm for keyboard backlight. BUG=b:178213641 BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Iae9d31c9849a3500dbd000829bd1439901a6d1b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645076 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: hookup temp_sensors read functionRob Barnes2021-01-191-8/+13
| | | | | | | | | | | | | | | | get_temp_3v3_30k9_47k_4050b matches the voltage and resistance used in guybrush. Memory and charger thermistors are powered when EC is powered. SOC thermistor is not powered in G3 so an extra function is needed to guard against this case. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I471d840c0442a022260c7e04704b46b8dc143767 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611519 Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: AND signals SLP_S3_L and PG_PWR_S5Rob Barnes2021-01-191-0/+11
| | | | | | | | | | | | | | | Discrete AND gate was replaced with EC logic. AND signals SLP_S3_L and PG_PWR_S5 to drive EN_PWR_S0. BUG=b:177071412 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I473a82dfe8e04f06cc8d2fc0639c9aaed401069a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2618387 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: AND PG_LPDDR4X_S3 and PG_GROUPC_S0 signalsRob Barnes2021-01-151-0/+10
| | | | | | | | | | | | | | | Latest schematic removes discrete AND gate and moves logic to EC. PG_LPDDR4X_S3 and PG_GROUPC_S0 are anded to drive EN_PWR_PCORE_S0. BUG=b:177071076 BRANCH=None TEST=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Ic4e50015b495faad4a23e09faa5cd520eb158fe4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2618386 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* guybrush: implement board_overcurrent_eventRob Barnes2021-01-141-0/+13
| | | | | | | | | | | | | | Alert SOC for USB overcurrent event. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I6be30a3e717e3fb469ae1b6c4f6a75a55c52182f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2618384 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Enable tcpc interruptsRob Barnes2021-01-141-0/+20
| | | | | | | | | | | | | | Enable TCPC interrupts after i2c. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I57cae426be7562c0eac01ab712a017f937313e72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2618383 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* guybrush: Set ac prochot currentRob Barnes2021-01-131-0/+6
| | | | | | | | | | | | | | Set ac prochot register on init. BUG=None BRANCH=None TEST=build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I50e3d38f037b385b844723a5312cfa13f0f4c917 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2618382 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: implement baseboard_chipset_suspend/resumeRob Barnes2021-01-131-0/+18
| | | | | | | | | | | | | Turn off backlights at suspend and turn on at resume. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I3a8b000395c30538b9d6e7183b6bdf5016995869 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613733 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Implement board_hibernateRob Barnes2021-01-131-0/+19
| | | | | | | | | | | | | Implement board_hibernate with OVLO workaround. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I320809c2628686abfadd23693af82dd683ef9601 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613732 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Implement board_set_active_charge_portRob Barnes2021-01-131-0/+48
| | | | | | | | | | | | | | Implement board_set_active_charge_port based on Zork implementation. BUG=None BRANCH=None TEST=Build Change-Id: Iaba8677411fbf9bd115242eda1ead9f7aa0beae4 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613731 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Implement board_pwrbtn_to_pchRob Barnes2021-01-121-0/+20
| | | | | | | | | | | | | | | | Implement board_pwrbtn_to_pch to delay 80ms before asserting PWRBTN_L when transitioning from G3 to S5. BUG=b:175324615 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Ic6ae34f75c1fcc65c61cb7f49392e158de209563 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613251 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Implement board_is_vbus_too_lowRob Barnes2021-01-121-2/+31
| | | | | | | | | | | | | | | Implement board_is_vbus_too_low. Barrow implementation from zork which works around a bug in ISL9241 (b/168569046). BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Ia77d6c4844d4cfec73116a2741047afba8639c15 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611520 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Implement bc12_interruptRob Barnes2021-01-111-1/+12
| | | | | | | | | | | | | | | Implement bc12_interrupt stub. Add task.h to usb_charge.h to fix build error. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I7d3d14326cf6973b131a6f575eb305039772df04 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611518 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Implement ppc_interruptRob Barnes2021-01-111-1/+12
| | | | | | | | | | | | | | Implement ppc_interrupt handler. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I62cb4d287e237872b9b1f4192fbc434d4aae70a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611517 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Implement tcpc_alert_event and tcpc_get_alert_statusRob Barnes2021-01-081-1/+59
| | | | | | | | | | | | | | | | Implement tcp_alert_event and tcpc_get_alert_status. Add pd_task and pd_interrupt_handler_task tasks. BUG=None BRANCH=None TEST=Build Change-Id: I99b6802eb4ebe59ca3ca25bb0c7f9e8af8be3bd2 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611822 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Implement sbu_fault_interruptRob Barnes2021-01-081-1/+3
| | | | | | | | | | | | | | | Implement sbu_fault_interrupt stub. BUG=None BRANCH=None TEST=Build Change-Id: Id3e307a8cdb0ee4ced243944e2f363a11fb041cb Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611820 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: Implement board_set_charge_limitRob Barnes2021-01-081-1/+3
| | | | | | | | | | | | | | | Use max of requested current and max charger current. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Ia72a47e4587a403ada98480ab21e711fc7e97802 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611819 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: a0z1380 set vbus_source_current_limitRob Barnes2021-01-081-2/+24
| | | | | | | | | | | | | | | | Fill in vbus_source_current_limit stub. Add missing io expander configuration. BUG=None BRANCH=None TEST=Build Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I2e196333ad607297e33a72b64839f5485e42f909 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611818 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: Add AP18F4M battery typeRob Barnes2021-01-081-7/+50
| | | | | | | | | | | | | | | | Add AP18F4M battery type. This may need to be moved out of baseboard and into variants depending on which batteries are supported. BUG=None TEST=Build BRANCH=None Change-Id: Ia267612e19c143a0a2b7fd2254b3ccf58ed1f563 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611810 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* guybrush: USB and charger configurationRob Barnes2021-01-081-0/+130
| | | | | | | | | | | | | | | | Minimal USB, charger and battery configuration. Stubs still need to be implemented. BUG=b:175400400 BRANCH=None TEST=Build Change-Id: I83a5e3e248094e4438bcd2df48664345614a6349 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593363 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* guybrush: Temp sensor configurationRob Barnes2021-01-071-2/+116
| | | | | | | | | | | | | | Configuration for temp and thermal. ADC channels also configured. BUG=b:175408269 TEST=Build BRANCH=None Change-Id: I63aae0366ccb0251163b0660cb47797fe004e68e Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2586043 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: I2C port mapRob Barnes2020-12-171-0/+78
| | | | | | | | | | | | | | Add i2c port map for guybrush. BUG=b:175593988 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Ie78b0fa5d79c4add1776ddcb8a0ee14ec8b1618f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2590564 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* guybrush: power and chipset configurationRob Barnes2020-12-141-0/+30
| | | | | | | | | | | | | | | 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>
* guybrush: config hibernate wake pins and spi flashRob Barnes2020-12-111-0/+9
| | | | | | | | | | | | | | | | 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-111-0/+22
| | | | | | | | | | | | | | 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>
* guybrush: initial EC board setupRob Barnes2020-11-291-0/+6
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>