summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8195/pmif_spi.c
blob: 1901bc6dd56e13ee67dbd4d06147ad489da79fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */

#include <device/mmio.h>
#include <soc/iocfg.h>
#include <soc/pmif_spi.h>

/* IOCFG_BM, PWRAP_SPI0_DRIVING */
DEFINE_BITFIELD(PWRAP_SPI0_DRIVING, 29, 24)
DEFINE_BITFIELD(PWRAP_SPI1_DRIVING, 5, 0)

void pmif_spi_iocfg(void)
{
	/* Set SoC SPI IO driving strength to 6 mA */
	SET32_BITFIELDS(&mtk_iocfg_bm->drv_cfg1, PWRAP_SPI0_DRIVING, IO_6_MA);
	SET32_BITFIELDS(&mtk_iocfg_bm->drv_cfg2, PWRAP_SPI1_DRIVING, IO_6_MA);
}