Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33166 )
Change subject: mediatek/mt8183: Use GPIO based CS for SPI0 ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/33166/2/src/soc/mediatek/mt8183/spi.c File src/soc/mediatek/mt8183/spi.c:
https://review.coreboot.org/#/c/33166/2/src/soc/mediatek/mt8183/spi.c@58 PS2, Line 58: {PAD_SPI_CSB_ID, 0}, as your commit description described, this is actually a per-board logic and should not be hard-coded here (as soc/ implementation).
Assuming GPIOs can be programmed multiple times (which should be), maybe we can refactor mtk_spi_init or mtk_spi_set_gpio_pinmux so it'll take additional GPIO arguments for CS; and do teh general pad func first then re-program as GPIO(output).