aboutsummaryrefslogtreecommitdiffstats
path: root/parade_lspcon.c
Commit message (Collapse)AuthorAgeFilesLines
* parade_lspcon: Rename PAGE_SIZE to avoid redefinitionThomas Heijligen2022-08-171-10/+10
| | | | | | | | | | | | | PAGE_SIZE is defined in musl libc include/limits.h as _GNU_SOURCE _BSD_DOURCE or _XOPEN_SOURCE Change-Id: Ib6162f87f021f0085073253b73528bbe0737a48e Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66745 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* parade_lspcon.c: Clarify coincidentally JEDEC command usageEdward O'Callaghan2022-08-021-3/+4
| | | | | | | | | | | | | | | | | | Clarify that SWSPI_WDATA_* coincidentally uses the same commands as specified by JEDEC. A similar data sheet does not really shed light if these literally are raw JEDEC command values or 'virtual' ones. As to avoid confusion, comment but perhaps not use the JEDEC literals from spi.h until it is certain. Change-Id: I851319ad4c36baad1e280309a6df8c86d6c4ad3d Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65557 Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* parade_lspcon.c: Leverage the BIT() macroEdward O'Callaghan2022-07-301-14/+14
| | | | | | | | | | Change-Id: Iad51fb4b3440e281e842bcaecf0c060084681635 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65558 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* parade_lspcon.c: Add allow_brick=yes programmer paramEdward O'Callaghan2022-07-301-0/+37
| | | | | | | | | | | | | | | | | | | Currently i2c programmers do not have a safe allow listing mechanism via board_enable to facilitate fully qualified chip detection. Since i2c addresses alone can overlap a user may make the mistake of using the wrong programmer. Although unlikely, it is within the realm of possibility that a user could accidently somehow program another chip on their board. Change-Id: I819f9a5e0f3102bec8d01dd52a0025a0fbe46970 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65555 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* parade_lspcon.c: Drop unused defineEdward O'Callaghan2022-07-301-1/+0
| | | | | | | | | | Change-Id: I35e800dec8295059d7cd0fa4503379e059993757 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65556 Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* Rename lspcon_i2c_spi to parade_lspconThomas Heijligen2022-07-171-0/+476
The chip targeted by the `lspcon_i2c_spi` programmer is a Parade PS175. Rename the programmer to match the chips vendor / family instead of the generic LSPCON protocol. Remove the `_i2c_spi` ending in preparation to become an opaque master. The chip is visible on an Acer Chromebox CXI4. https://www.paradetech.com/products/ps175/ https://www.acer.com/ac/en/US/content/series/acerchromeboxcxi4 TEST: `make CONFIG_PARADE_LSPCON=yes` and `meson build -Dconfig_parade_lspcon=true` produces flashrom binaries with the parade_lspcon programmer included. Change-Id: I9148be6d9162c1722ff739929ca5e181b628dd57 Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65547 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com>