summaryrefslogtreecommitdiff
path: root/board/waddledoo/gpio.inc
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* dedede: Enable CONFIG_ASSERT_CCD_MODE_ON_DTS_CONNECTRob Barnes2021-07-021-1/+1
| | | | | | | | | | | | | | | | | | Enable CONFIG_ASSERT_CCD_MODE_ON_DTS_CONNECT on all dedede boards. This will assert GPIO_CCD_MODE_ODL when a debug device is connected to a CCD port. GPIO_CCD_MODE_ODL must be configured as an open drain so EC and Cr50 don't drive fight. BUG=b:190189242 TEST=Build dedede BRANCH=None Change-Id: I2d71312967f2d4a693ac9753279f49478e8c092c Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2976759 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Diana Z <dzigterman@chromium.org>
* Dedede: Remove VSYNC sensorDiana Z2020-09-231-1/+0
| | | | | | | | | | | | | Remove VSYNC sensor, and related GPIOs and configs. BRANCH=None BUG=b:169056723 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ib37e648ea04b5da3ed9ce6a660fcd60f2bfe264a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2424891 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* waddledoo: Configure unused GPIOs as inputsBrian J. Nemec2020-08-191-0/+12
| | | | | | | | | | | | | | | | | Configure unused GPIOs as inputs to save power in deep sleep states. BUG=b:162318932 BRANCH=none TEST=make buildall TEST=flash waddledoo put device into S0iX or other low power state measure system and EC power consumption Signed-off-by: Brian Nemec <bnemec@chromium.org> Change-Id: Ie29c15d1c4947fe3d6665c66df476ac6b9ed943d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2358903 Reviewed-by: Evan Green <evgreen@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* Revert "power: Clear AP_IDLE when waking up by PB or LID"Daisuke Nojiri2020-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 27ee378bb78a299a0983379be83eb6d55860b4ae. Reason for revert: b/162508724 A wake-up source from hibernation needs to be determined only by RO. Reverting back to the original implementation: CL:2236589. Original change's description: > power: Clear AP_IDLE when waking up by PB or LID > > Currently, AP_IDLE is cleared when EC wakes up by the power button or > the lid open. > > This patch extends the logic from CONFIG_EXTPOWER_GPIO to > CONFIG_EXTPOWER so that the bug (chromium:1073960) can be also fixed > on the boards using non-GPIO method for extpower_is_present. > > Tested as follows on Trembyle: > 1. Put DUT in hibernation. > 2. Wake up DUT and observe: > a. When waking up by power button, AP is turned on. > b. When waking up by lid open, AP is turned on. > c. When waking up by AC, AP is left idle. > > BUG=b:157077589, chromium:1073960, b:159350276 > BRANCH=none > TEST=See above. > > Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> > Change-Id: I944aaac036ce58659e81b7021e52a3291f31e951 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283946 > Reviewed-by: Jett Rink <jettrink@chromium.org> Bug: b:157077589 Bug: chromium:1073960 Bug: b:159350276 Bug: b:162508724 Change-Id: Iaf9d0af2ca8c48bbf2529c4ba05493837dd76287 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2333106 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* Waddledoo: Enable HDMI daughterboardDiana Z2020-07-131-12/+12
| | | | | | | | | | | | | | | | | | | | | Sub-board GPIOs are connected to different signals when the HDMI daughterboard is attached. This change uses the CBI FW_CONFIG field to determine if the HDMI DB should be present, and re-configures the GPIO modules and flags accordingly. This change also switches waddledoo to use the run-time determination for maximum type-c ports. BRANCH=None BUG=b:155963446 TEST=on waddledoo with type-c DB, C1 still works on waddledoo with HDMI DB and FW_CONFIG set to 0x0003 HDMI plug-ins are detected and the USB-A port functions Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie093706e3bf515efa53223aec761714062f2f427 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2274993 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Waddledoo: configure ECH1_PACKET_MODEDiana Z2020-05-211-8/+9
| | | | | | | | | | | | | | This GPIO will be used to communicate with the cr50 when we enable EFS2. BRANCH=None BUG=b:156785199 TEST=make -j buildall, boots on waddledoo Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia960e1ad6ddd83338570cae133697ed5d4f61597 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2210864 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* waddledoo/waddledee: Deassert ALL_SYS_PGOOD quicklyAseda Aboagye2020-04-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | According to tPLT17 in the PDG, the time from SLP_S3_L assertion to VCCIN_EN de-assertion should be less than 200us, but this was not occurring on waddledoo. This commit adds a special interrupt handler in order to meet that timing requirement by immediately deasserting ALL_SYS_PGOOD once SLP_S3_L is asserted. BUG=b:152552074 BRANCH=None TEST=Build and flash waddledoo, boot and shut AP down, verify that the time between SLP_S3_L asserting and ALL_SYS_PGOOD deasserting is less than 200us. TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ib34016d5bdfa956f410dde3e3b3074bd306a18f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2142744 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* dedede: Make EC_MKBP_INT_L open drainAseda Aboagye2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | This commit changes EC_MKBP_INT_L to be an open-drain output. The AP firmware will also be configured to apply an internal pull-up to allow this configuration to work. BUG=b:151680590 BRANCH=None TEST=Build and flash waddledoo with modified AP FW that sets internal pull-up, verify that EC_MKBP_INT_L is asserted when the AP shuts down and is de-asserted when the AP turns on. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I76a772f88ab8af1a9c7c699e5922eb86b926ae86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2109117 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* waddledoo: Swap EN_PP5000_U & VOLUP_BTN_ODLAseda Aboagye2020-03-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | On the older boards, the 5V enable was swapped with the volume up button. We worked around it in firmware, but for the next builds we need to fix the firmware such that it matches reality. This commit adds a remap which will allow the 5V enable to work for all boards based upon the board version stored in CBI. However, this will break the volume up button on the older boards as our interrupt table is statically defined at compile time. BUG=b:147257497 BRANCH=None TEST=Build and flash a waddledoo with unformatted CBI EEPROM, verify that the 5V rail still being controlled. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I9892b057054800a3acff5e2c2316921a479b32a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2099746 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* dedede: Configure EN_VCCST as inputAseda Aboagye2020-02-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | Currently, the EC isn't using EN_VCCST itself, but we are using external logic to set this pin. The pin is initialized to low on the EC which causes a drive fight. This commit changes GPIO_EN_VCCST to an input while we determine whether or not we will use this pin in the EC. BUG=b:149775160 BRANCH=None TEST=`make -j buildall` TEST=Build and flash waddledoo, verify EC cannot set EN_VCCST. Change-Id: Ia9f439d3d049580ac66689fdde11ed75ca044584 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2068801 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* dedede: Set pullup on PG_PP1050_ST_OD only after RSMRSTAseda Aboagye2020-02-211-1/+1
| | | | | | | | | | | | | | | | | | Per recommendation from the SoC vendor, we should only enable the pull up on PG_PP1050_ST_OD once RSMRST has been de-asserted. Otherwise, the pull up can inidicate a false power good. BUG=b:148688874 BRANCH=None TEST=Build and flash waddledoo, verify that PG_PP1050_ST_OD is actually valid. Change-Id: Icdd8ec08fc84954730ae2d80fed86af4f07f01ba Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2058694 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* waddledoo: Change PP1050_ST power goodAseda Aboagye2020-01-311-1/+2
| | | | | | | | | | | | | | | | | | The power good for VCCST is actually now a digital signal as opposed to an analog signal that it used to be. This commit updates the waddledoo GPIO configuration to account for this fact. BUG=b:148169171 BRANCH=None TEST=`make -j BOARD=waddledoo`; flash waddledoo, verify EC boots okay. Change-Id: I0fe64c07705fa3652b79414a3ec451ebf7204aae Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2028354 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* waddledoo: don't enable pull-ups with low-voltage modeDavid Schneider2020-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | It is not valid on the NPCX7 to simultaneously use low-voltage mode and enable the pull-up, so pull-ups were being ignored. This caused spurious volume up and volume down button presses. Prochot is similarly misconfigured and really should be an ADC input, but for now just remove the pull-up. These changes have been updated on the EC pinout table as well. BUG=None BRANCH=None TEST=press buttons on waddledoo Change-Id: I8fd6e13d0e0ca79dbb777563443da0858ac62187 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2018033 Tested-by: David Schneider <dnschneid@chromium.org> Auto-Submit: David Schneider <dnschneid@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* waddledoo: Add keyboard supportAseda Aboagye2020-01-211-0/+9
| | | | | | | | | | | | | | | | | This commit adds keyboard support to waddledoo using the default keyboard config. BUG=b:147453459 BRANCH=None TEST=Flash waddledoo, connect keyboard, `ksstate on` verify that each key is registered. Change-Id: I0a10eeb3080170c731f90317d4a0b3c0fbfb9243 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2001940 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* waddledoo: Add Type-C, PD, and charging supportAseda Aboagye2020-01-211-0/+5
| | | | | | | | | | | | | | | | | | | | This commit adds USB Type-C, Power Delivery and charging support to waddledoo. Waddledoo is using the new TCPMv2, low power mode has been disabled for the time being while we sort out issues with the TCPC. Currently in this state, we cannot actually receive any PD messages, but the PD task is running. BUG=b:147257992 BRANCH=None TEST=Build and flash on waddledoo, verify that we can detect Type-C chargers, and that it can charge a battery. Change-Id: Id30218ef685ed27a934bae3a580f47754f659ac6 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2001127 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* Waddledoo: Add sensor supportDiana Z2020-01-141-0/+8
| | | | | | | | | | | | | | Waddledoo is using the BMI160 as a base accel and the BMA253 lid accel, which is compatible with the current bma2x2 driver. BUG=b:147258603 BRANCH=none TEST=builds Change-Id: Id76e826f11154f8b687021713a2bf176bd82fef4 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1993952 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* waddledoo: Add JSL supportAseda Aboagye2020-01-081-1/+18
| | | | | | | | | | | | | | | | | | | | | waddledoo is using the Intel Jasperlake chipset. This commit enables support for that chipset as well as adding the other related power sequencing signals. JSL uses the same chipset driver as ICL, but waddledoo doesn't have a couple of the power good pins that the driver assumes. Therefore, waddledoo overrides these power good signals using other logic. BUG=b:147257114,b:146172102 BRANCH=None TEST=`make -j BOARD=waddledoo` Change-Id: Ib4baa7ff38a4f59f751ecb16c22522eda71b6f4f Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1987837 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* waddledoo: Add volume button supportAseda Aboagye2020-01-071-1/+4
| | | | | | | | | | | | | | | | waddledoo has dedicated volume buttons. BUG=b:146172102 BRANCH=None TEST=`make -j BOARD=waddledoo` Change-Id: I49c5f02d6e8ac66d4dac55208fb55aa16f83f5c4 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1989116 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* waddledoo: Initial commitAseda Aboagye2020-01-071-0/+83
This is the initial commit for waddledoo, the NPCX796FC variant of dedede. This commit adds ADC channels and i2c ports and some scaffolding such that the board will compile. More features will be coming in subsequent commits. BUG=b:146172102 BRANCH=None TEST=`make -j BOARD=waddledoo` Change-Id: I8277f6ce843fc155bd97f7f46fd96ab98cfe0881 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1988596 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>