summaryrefslogtreecommitdiff
path: root/zephyr/projects/nissa/src/sub_board.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge remote-tracking branch cros/main into factory-brya-14517.B-main"factory-brya-14517.B-mainYH Lin2022-12-051-0/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit af25602b15b22b9ef5821dcba9934311f2157c48. Reason for revert: broken build due to ec-utils. Original change's description: > Merge remote-tracking branch cros/main into factory-brya-14517.B-main > > Generated by: util/update_release_branch.py --baseboard brya --relevant_paths_file > baseboard/brya/relevant-paths.txt factory-brya-14517.B-main > > Relevant changes: > > git log --oneline 54462f034b..aa40b859b3 -- baseboard/brya board/agah > board/anahera board/banshee board/brya board/crota board/felwinter > board/gimble board/kano board/mithrax board/osiris board/primus > board/redrix board/taeko board/taniks board/vell board/volmar > driver/bc12/pi3usb9201_public.* driver/charger/bq25710.* > driver/ppc/nx20p348x.* driver/ppc/syv682x_public.* > driver/retimer/bb_retimer_public.* driver/tcpm/nct38xx.* > driver/tcpm/ps8xxx_public.* driver/tcpm/tcpci.* include/power/alderlake* > include/intel_x86.h power/alderlake* power/intel_x86.c > util/getversion.sh > > e6da633c38 driver: Sort header files > 234a87ae2d tcpci: Add FRS enable to driver structure > a56be59ccd tcpm_header: add test for tcpm_dump_registers > 57b3256963 Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMIT > e420c8ff9a marasov: Modify TypeC and TypeA configuration. > 43b53e0045 Add default implementation of board_set_charge_limit > b75dc90677 Add CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT > f1b563c350 baseboard: Sort header files > 7d01b1e58d driver/retimer/ps8818.h: Add I2C ADDR FLAGS 0x30, 0x58, 0x70 > ec31407993 Add CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT > 8f89f69a5b crota: disable lid angle sensor for clamshell > > BRANCH=None > BUG=b:259002141 b:255184961 b:247100970 b:259354679 b:260630630 > BUG=b:163093572 b:254328661 > TEST=`emerge-brya chromeos-ec` > > Force-Relevant-Builds: all > Change-Id: Ia85a701fbf6b8e67ec214b9e25e0e55e980a6f47 > Signed-off-by: YH Lin <yueherngl@google.com> Bug: b:259002141 b:255184961 b:247100970 b:259354679 b:260630630 Bug: b:163093572 b:254328661 Change-Id: I48d5aa4cc67a69ee1f6ac9255ac3087d34da4c72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4077248 Tested-by: YH Lin <yueherngl@chromium.org> Commit-Queue: YH Lin <yueherngl@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Auto-Submit: YH Lin <yueherngl@chromium.org>
* zephyr: rename projects folder to programKeith Short2022-11-041-298/+0
| | | | | | | | | | | | | | | | Renme the projects folder to program for consistency with the name scheme used by the boxster configuration. BUG=b:254097139 BRANCH=none TEST=zmake compare-builds -a TEST=twister Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib56a57f1e5942e6dd0460e3be81722896eed72af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3968444 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* nissa: enable SB type-A power if sub-board is unconfiguredPeter Marheine2022-10-171-2/+9
| | | | | | | | | | | | | | | | | It's safe to enable this output with every sub-board, and it's useful to have functioning type-A USB on the sub-board even if CBI isn't fully configured yet; in particular for factory provisioning. BUG=b:251055188 TEST=SB type-A now works with unprovisioned fw_config BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ia73bb09c37fac0d633d55ec78662fd474431ca1c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3954782 Commit-Queue: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com> Code-Coverage: Andrew McRae <amcrae@google.com>
* zephyr: Add alternative usb_mux_chain config for nissaTomasz Michalec2022-09-131-1/+2
| | | | | | | | | | | | | | | | | | Add alternative USB mux configuration in DTS for nissa. LOW_COVERAGE_REASON=no test for nissa board yet BUG=b:234482311 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Id367005334cc378c7495b615bab5333a72d39bf8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3875325 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Adam Mills <adamjmills@google.com>
* zephyr: nissa: usb_mux: Split struct usb_mux in nissa boardsTomasz Michalec2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | Update nissa boards to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Icf0dbef327d8cc5172fef960b6cecb792e1eb887 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780417 Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* 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>
* nissa: Disable LTE rails on AP_POWER_HARD_OFF.Sam McNally2022-08-181-2/+2
| | | | | | | | | | | | | | | | | | LTE rails are enabled on AP_POWER_PRE_INIT - the transition from G3 to S5. The LTE rails are disabled on AP_POWER_SHUTDOWN - the transition from S3 to S5. Combined with the trip back through S5 when switching the CSME to RW, this results in LTE rails always being disabled on normal boots. Switch to disabling LTE rails on AP_POWER_HARD_OFF - the transition from S5 to G3. BUG=b:238387322 TEST=LTE is powered on regular boot on nivviks and unpowered in G3 BRANCH=none Change-Id: Ic4270d594ccf81d42229ff1667ce7648ca4bb165 Signed-off-by: Sam McNally <sammc@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3837537 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* pujjo: Set GPIO02 as empty pin.jimmy.wu2022-08-101-0/+4
| | | | | | | | | | | | | | | | | | | Pujjo has no control of gpio02. Remove GPIO02 from gpio_sb_1 node and set to empty pin. Remove or block out all code reference to gpio_sb_1. BUG=b:241876945 TEST=zmake build pujjo BRANCH=none Signed-off-by: jimmy.wu <jimmy.wu@lcfc.corp-partner.google.com> Change-Id: I027ec3ff9176e25ecdc5e4c28c3c204e85896890 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3819443 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* pujjo: Config hdmi-en-odl for pujjoRuibin Chang2022-08-021-51/+50
| | | | | | | | | | | | | | | Due to CL:3778918 only config hdmi-en-odl for nereid board v2, config hdmi-en-odl for pujjo as well. BUG=b:240084173 TEST=zmake build pujjo BRANCH=none Signed-off-by: jimmy.wu <jimmy.wu@lcfc.corp-partner.google.com> Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Iecc66f9644d3bea882248a40de9b081296e9b1ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3787954 Reviewed-by: Andrew McRae <amcrae@google.com>
* pujjo: Remove second type-c port/charger code.jimmy.wu2022-07-221-0/+2
| | | | | | | | | | | | | | | Disable GPIO I2c function for hdmi pin. Remove type-c port1, second charger code. BUG=b:239653512 TEST=zmake build pujjo BRANCH=none Signed-off-by: jimmy.wu <jimmy.wu@lcfc.corp-partner.google.com> Change-Id: I87ddb8d8df18d70363349f06bf986da8f14c65cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775788 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: run a single task for USB chargersPeter Marheine2022-07-221-2/+1
| | | | | | | | | | | | | | | This saves about 1400 bytes of RAM on Nereid. BUG=b:226411332 TEST=BC1.2 messages still appear on Nereid console when chargers are plugged or unplugged from either USB-C port. BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I85d6d8419bc894b3bbedf43c0ab5e78336c402d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778909 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: only configure hdmi-en-odl if neededPeter Marheine2022-07-211-5/+26
| | | | | | | | | | | | | | | | Boards since nereid v2 don't connect the hdmi-en-odl GPIO to the sub-board, so in those configurations we can skip configuring or controlling the GPIO in order to save about 5 mW when the AP is on. BUG=b:233024993,b:237717730 TEST=When board version is set to 2 in CBI, the sb_4 GPIO does not ever change state on a nereid with HDMI sub-board. BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I231e304dc01c2ed02b3dd103e2173c464a7ce208 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778918 Reviewed-by: Andrew McRae <amcrae@google.com>
* Xivu: Bypass the HDMI functionLeila Lin2022-07-151-0/+5
| | | | | | | | | | | | | | | | | | | | Xivu project has no HDMI port, but still need sub-board.c to do board init. Otherwise, the dut will not power on with AC only. Add the sub-board.c file but bypass the HDMI settings if the HDMI relate pin is not use. BUG=b:237432830 BRANCH=none TEST=zmake build xivu, and check dut can power on with AC only. Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Change-Id: I2ed0f827e6ca83d422e188241d69201595b95fad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759828 Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Andrew McRae <amcrae@google.com> Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Nereid: Do not enable i2c4 on SKU2 (HDMI+type A)Dino Li2022-07-041-0/+29
| | | | | | | | | | | | | | Since the SKU doesn't use i2c4, disable it to ensure that EC can enter deep doze mode in the s0ix state. BRANCH=none BUG=b:236668079, b:237717730 TEST=Verified that EC can enter deep doze mode in the s0ix state. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I3fe47d5656c8489467f38e3201c5f5cf0c447ccd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3739988 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Xivu : GPIO initial.Logan_Liao2022-07-041-1/+1
| | | | | | | | | | | | | | | | | | This patch according to the HW circuit that modify GPIO setting. The Xivu have no HDMI relate pin, Remove the sub-board.c from CMakeLists. BUG=b:237432830 BRANCH=none TEST=zmake build xivu success. Signed-off-by: Logan_Liao <logan_Liao@compal.corp-partner.google.com> Change-Id: I234f78fc4dc149ed235b60b63a89de8007116730 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3733929 Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Logan Liao <logan_liao@compal.corp-partner.google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
* zephyr/projects/nissa/src/sub_board.c: Format with clang-formatJack Rosenthal2022-07-011-14/+11
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Idde4bda55570915c2696344369fddaa39877d8b7 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730798 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: move Nissa USB mux configuration into the DTSTomasz Michalec2022-06-031-3/+2
| | | | | | | | | | | | | | | | | Move Nissa boards (Nivviks, Craask, and Nereid) USB mux configuration into the devicetree. BUG=b:227757117 TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I988603bcc847ce9aae4fd0b86506659066577832 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3593790 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: Add braces for variable declarations.Jeremy Bettis2022-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | With riscv64-zephyr-elf-gcc variable declarations can't come after the switch label, and this is a C99 restriction, so it is strange that it works in any compiler. Add braces around the code in the switch statement, so that the variable declaration follows a { instead of a label. BRANCH=None BUG=None TEST=git cherrypick to gitlab and built there Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic2adbe92c76fc299f06dc379a930b98e50d52aaf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3652376 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zephyr: add a zephyr/ prefix to all zephyr includesFabio Baltieri2022-05-091-4/+4
| | | | | | | | | | | | | | | | | | | This adds a zephyr/ prefix to all #include path pointing to Zephyr header files, so that we could drop LEGACY_INCLUD_PATH once all upstream code has been converted. Generated using something similar to the script in: c7b5b3c419 samples: migrate includes to contain <zephyr/...> prefix BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I5ba2c859fe10a34ea8d3a49a612132ea4d02f2cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3634345 Reviewed-by: Yuval Peress <peress@google.com>
* nissa: don't control HDMI sub-board S5 railsPeter Marheine2022-04-281-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | The EN_S5_RAILS input to the HDMI sub-board is not actually connected to anything (it is enabled as long as the S5 3.3V rail from the mainboard is provided to the sub-board), so it doesn't need to be controlled by the EC. If the EC is asserting EN_S5_RAILS to the sub-board when attempting to hibernate, hibernate fails because it is latched back off by the asserted signal (anytime the AP is in S5 or higher power state). Since hibernate should work in S5 as well as G3, we can simply stop controlling that EC output and the sub-board will continue to work normally. BUG=b:226325993 TEST=Nereid sb_1 (SUB_USB_C1_INT_ODL) remains high when AP is on with sub-board 3 in use, and the sub-board remains powered (the USB port on it works). BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Idd6c0a37249d1e85a8fd0ffc763a31cee452f9cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612982 Reviewed-by: Andrew McRae <amcrae@google.com>
* usba: Allow modification of USB port enableAndrew McRae2022-04-201-0/+5
| | | | | | | | | | | | | | | Allow dynamic modification of the USB port enable GPIO list so that sub-boards without USB-A ports can disable the port enable setting. BUG=b:214858346 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I12b93a3c20852f68303b158aa20bc9a1c63f6ae5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3592312 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Handle S5 power rails for LTE sub-boardAndrew McRae2022-04-121-9/+52
| | | | | | | | | | | | | | | Enable or disable the LTE sub-board power rails when entering or exiting S5 state. BUG=b:214858346 TEST=zmake build {nivviks,nereid} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Icf6a30561ac9859bea9377ab2413229a23c5c61b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3583105 Reviewed-by: Kangheui Won <khwon@chromium.org> Tested-by: Sam McNally <sammc@chromium.org>
* Revert "nissa: convert HOOK_INIT to SYS_INIT"Keith Short2022-04-011-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ef9b0800b60dd25654e0a87cef9d22a5146bb80. Reason for revert: b:227661993: EFS2 broken after SYS_INIT changes Not a clean revert. zephyr/projects/nissa/src/nereid/board_config.c was moved to zephyr/projects/nissa/src/sub_board.c in CL:3559690. Original change's description: > nissa: convert HOOK_INIT to SYS_INIT > > Convert all HOOK_INIT calls to the equivalent SYS_INIT. > > BUG=b:226434387 > BRANCH=none > TEST=zmake testall > > Signed-off-by: Keith Short <keithshort@chromium.org> > Change-Id: I9fde383e7ee7ebf5e939e39ac4145b1d585b4a67 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3553846 > Reviewed-by: Tristan Honscheid <honscheid@google.com> Bug: b:226434387 Change-Id: I2e30cf3898dae1724b97631dd7ca21ebf8a7a6f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3564806 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* Revert "nissa/nereid: run sub-board I2C at 1.8V"Peter Marheine2022-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b1281f53d17c498a1b61fc27c73789b8d32569b4. Reason for revert: Nivviks I2C is to be changed to 1.8V; Nereid will stay at 3.3. Original change's description: > nissa/nereid: run sub-board I2C at 1.8V > > Board revisions 1 and later will run sub-board I2C at 1.8V to improve bus > timing characteristics. Since it's safe to configure the EC for 1.8V > operation with the 3.3V bus on board version 0, we'll always set the I2C > pins to 1.8V. > > BUG=b:227517811 > TEST=USB-C1 continues to function, and manual inspection of the voltage > selection bits (GPE0VS and GPE7VS) in GCR20 indicate 1.8V operation: > `rw .b 0xf016e5` reads 0x92 with bits 3 and 5 set for GPE7 and GPE0, > respectively. > BRANCH=none > > Signed-off-by: Peter Marheine <pmarheine@chromium.org> > Change-Id: Ib2f937fb450088b5154007e4c90d03366297bb2f > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561601 > Reviewed-by: Andrew McRae <amcrae@google.com> Bug: b:227517811 Change-Id: Idc5be71f49131413b3de8f503ee9d3f81a11bbce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3565063 Reviewed-by: Andrew McRae <amcrae@google.com> Tested-by: Peter Marheine <pmarheine@chromium.org> Auto-Submit: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* nissa/nereid: run sub-board I2C at 1.8VPeter Marheine2022-03-311-3/+3
| | | | | | | | | | | | | | | | | | | Board revisions 1 and later will run sub-board I2C at 1.8V to improve bus timing characteristics. Since it's safe to configure the EC for 1.8V operation with the 3.3V bus on board version 0, we'll always set the I2C pins to 1.8V. BUG=b:227517811 TEST=USB-C1 continues to function, and manual inspection of the voltage selection bits (GPE0VS and GPE7VS) in GCR20 indicate 1.8V operation: `rw .b 0xf016e5` reads 0x92 with bits 3 and 5 set for GPE7 and GPE0, respectively. BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ib2f937fb450088b5154007e4c90d03366297bb2f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561601 Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: deduplicate common board_config codePeter Marheine2022-03-311-0/+198
| | | | | | | | | | | | | | | | | | | | | | | The sub-board configuration had diverged between Nivviks and Nereid, with each having some disjoint improvements. This change moves all of the code out of board-specific board_config files and into a common file consisting of the sum of the two boards, and the few functions that differ between boards are moved to existing board-specific source files. Specifically, the divergence was: * Nereid configured HDMI as needed * Nereid fixed incorrect USB-A configuration for the LTE board * Nivviks disabled the C1 charger task if the port was not present BUG=b:226513609,b:214858346 TEST=HDMI board still behaves correctly on Nereid, and USB ports still work with the C+A board on both Nivviks and Nereid. BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Iec0fac5c4fc880193a871ad302ea6752e02d8c01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3559690 Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: Consolidate common code into a single file.Andrew McRae2022-01-311-65/+0
| | | | | | | | | | | | | Consolidate common code for nivviks/nereid into a common file BUG=b:217091028 TEST=zmake configure -b {nereid,nivviks} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I87d49f63073a861455f7a868e3ce18d4fc46fc68 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426244 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Migrate nissa to use the new interrupt frameworkAndrew McRae2022-01-261-0/+5
| | | | | | | | | | | | | Migrate nissa to use the new interrupt framework. BUG=b:214608987 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Id63aaa2cbf7864697686c945304b919dcf82c143 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3391501 Reviewed-by: Keith Short <keithshort@chromium.org>
* nissa: Add FW_CONFIG fields for sub-board selectionAndrew McRae2022-01-111-0/+60
Add FW_CONFIG fields for sub-board selection. BUG=b:212660338 TEST=zmake configure -b {nivviks,nereid} BRANCH=none Change-Id: I12f3872ab2d05ca0a1246b12ea3f842260f511d3 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3374083 Reviewed-by: Peter Marheine <pmarheine@chromium.org>