summaryrefslogtreecommitdiff
path: root/board/puff
Commit message (Collapse)AuthorAgeFilesLines
* power/cometlake-discrete: implement power sequencingstabilize-12748.B-masterPeter Marheine2019-12-102-6/+9
| | | | | | | | | | | | | | | | | | | | | A first go at the power sequencing needed for Puff. This abuses the Intel common power code a little bit because we don't actually have all the inputs it assumes, but that seems preferable to replacing it wholesale. The one limitation right now is inability to detect transitions on the rails that we only have analog monitoring on; either we need to design a way to monitor those, or decide that detecting dropouts on those rails is unimportant. BUG=b:143188569 TEST=still builds BRANCH=None Change-Id: Ia960f5dd2ccfb1ca2c7d4107ba4e3737adc8f69f Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925787 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* puff: implement PP5000 port power controlPeter Marheine2019-12-106-9/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC watches current limiting on the USB and HDMI ports to keep system load on the 5V rail within the limits of the regulator. The EC's goal is to ensure that any single future state change (connecting or disconnecting a port) doesn't push the 5V rail overcurrent. Verification is done via symbolic execution with Klee; ensuring that there exists no state where plugging something into a port with no further changes would put us over the power budget. Sample verification output: > KLEE: Using Z3 solver backend > > KLEE: done: total instructions = 4439 > KLEE: done: completed paths = 30 > KLEE: done: generated tests = 30 v2: convert ad-hoc state space exploration for verification to symbolic execution, allowing port control code to be reused for both. BUG=b:143190102 TEST=make buildall BRANCH=none Change-Id: If06e319c8d38bd11b29a7e69499d40357176a97e Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911261 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* puff: update PP3300_SNS dividerPeter Marheine2019-11-261-3/+9
| | | | | | | | | | | | | | The schematic has changed to 9.31k / 47k resistors on this input. BUG=b:1829597655 TEST=still builds BRANCH=None Change-Id: I2856df05b2611edd30d497a35bb871b8f5b173e9 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1935467 Reviewed-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
* puff: use cometlake-discrete power driverPeter Marheine2019-11-182-18/+15
| | | | | | | | | | | BUG=b:143188569 TEST=make buildall still succeeds BRANCH=none Change-Id: I9193878c65b20293fad5914af88ea4e49be369a8 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913939 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* puff: Add config for power sensors.Andrew McRae2019-11-142-0/+10
| | | | | | | | | | | | | | | Add config for INA3221 power monitor sensors. BRANCH=none BUG=b:144127082 TEST=EC buildall Change-Id: I87b3da86403b0ec7314b4084bc710c59f019930d Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1915481 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: Add USB A4 overcurrent GPIOAndrew McRae2019-11-131-0/+1
| | | | | | | | | | | | | | | | The latest version of puff has an extra USB-A port, so add the overcurrent GPIO allocated to it. BRANCH=none BUG=b:143190102 TEST=EC buildall Change-Id: I1a08856ec2249cc9537cd72503aff20b789fc925 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913220 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: Update gpio list with unused pins.Andrew McRae2019-11-101-7/+35
| | | | | | | | | | | | | | | | Declare the unused GPIO pins so that they can be placed into the lowest power state. BRANCH=none BUG=b:143189339 TEST=EC buildall Change-Id: I9ec6f339456a08e2f333733e31d84e50cba8d6b3 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906388 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: Finalise EC LED configuration for puff.Andrew McRae2019-11-082-4/+17
| | | | | | | | | | | | | | | | Configure the PWM channels for the red and green LED. LED handling has been copied from fizz. BRANCH=none BUG=b:144063385 TEST=EC buildall, tests Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I6883135387f0a6e49661e93cc5358a8e6c8c7f68 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1902893 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: Complete GPIO list for EC.Andrew McRae2019-11-073-44/+148
| | | | | | | | | | | | | | | | | Fill out the GPIO entries for puff. Some dependencies on the hatch power sequencing still exist, and will need to be modified for the puff power handling. BRANCH=none BUG=b:143189339 TEST=Build image, buildall, tests Change-Id: I60074298be3d75e447c32ee3448f67149ec1bf81 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1898261 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: Add fan configuration to EC.Andrew McRae2019-11-072-10/+11
| | | | | | | | | | | | | | | Add fan configuration to puff. BRANCH=none BUG=b:143327224 TEST=Build puff, tests, buildall. Change-Id: Ib968dafa297c7d17ea0d90c0b67869f5aca5e210 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1899653 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: populate ADCs and temperature sensorsPeter Marheine2019-11-042-20/+90
| | | | | | | | | | | | | | Several analog channels are needed for power sequencing, and may as well fill them all in while we're here. BUG=b:143188569 TEST=image builds and links BRANCH=None Change-Id: I99c2def362b11bef0748adfe11cc7356bb1591c6 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1893016 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* ec-fans: Make fans configuration const by default.Andrew McRae2019-11-021-1/+1
| | | | | | | | | | | | | | | | It was pointed out to me that the fans config list was non-const, but there is only 2 boards that require non-const configuration, so by default make it const, but allow an override. BRANCH=none BUG=None TEST=EC compiles, make tests, buildall Change-Id: I3ef8c72f6774e1a76584c47d89287f446199e0f2 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1893025 Reviewed-by: Andrew McRae <amcrae@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* Rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNTKarthikeyan Ramasubramanian2019-11-013-6/+6
| | | | | | | | | | | | | | | | | Certain SKUs of certain boards have lesser number of USB PD ports than defined by CONFIG_USB_PD_PORT_COUNT. Hence rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNT. BUG=b:140816510, b:143196487 BRANCH=octopus TEST=make -j buildall; Boot to ChromeOS Change-Id: I7c33b27150730a1a3b5813b7b4a72fd24ab73c6a Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879337 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* puff: Scrub config and generate hardware structuresAndrew McRae2019-11-013-26/+156
| | | | | | | | | | | | | | | | | | Verify all CONFIG items in board/puff/board.h. Generate the necessary hardware reference structures in board.c Generate the minimum GPIO references in order to build cleanly. v2: Remove some of the fan and temp sensors config. BUG=b:143564865 TEST=Compile and link EC image. Change-Id: Ibc073718ad1c85705ab460d96202799f8c4fea06 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1893013 Reviewed-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org>
* cometlake: cleanup power signal namesKeith Short2019-10-311-1/+1
| | | | | | | | | | | | | | | Add X86 prefix to the Comet Lake signals names for consistency with other Intel APs. BUG=none BRANCH=none TEST=make buildall Change-Id: I70b2a261fd6fbc0e6de70e5d4cf3a90b35078d4e Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1888596 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* usb_pd: use enum tcpc_rp_value instead of intCaveh Jalali2019-10-311-1/+1
| | | | | | | | | | | | | | | this changes the declaration and definitions of typec_set_source_current_limit() to take an enum tcpc_rp_value instead of int. BRANCH=none BUG=none TEST=buildall passes Change-Id: If633641a581eeb6085b94bc727e23fb57f7cd435 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1889117 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* puff: Initial EC files for puffAndrew McRae2019-10-297-0/+957
Skeleton EC files for puff. Enough GPIOs and functions defined to allow files to build, but don't expect anything to work or be complete. BUG=b:143454886 TEST=None, code compiles. Change-Id: I4badd1741cf04c71b4ae687afe9d06d8e0b8a813 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1880784 Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>