Hello Roger Lu, Ran Bi,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/46878
to review the following change.
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,381 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/1
diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index d695824..6890910 100755 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -12,6 +12,7 @@ bootblock-y += ../common/uart.c bootblock-y += ../common/wdt.c bootblock-y += pmif.c pmif_clk.c pmif_spi.c pmif_spmi.c +bootblock-y += clkbuf.c srclken_rc.c bootblock-y += ../common/rtc.c rtc.c bootblock-y += mt6315.c bootblock-y += mt6359p.c diff --git a/src/soc/mediatek/mt8192/bootblock.c b/src/soc/mediatek/mt8192/bootblock.c old mode 100755 new mode 100644 index dac9a37..5d1380a --- a/src/soc/mediatek/mt8192/bootblock.c +++ b/src/soc/mediatek/mt8192/bootblock.c @@ -1,14 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h> +#include <soc/clkbuf.h> +#include <soc/eint_event.h> #include <soc/mmu_operations.h> #include <soc/mt6315.h> #include <soc/mt6359p.h> #include <soc/pll.h> #include <soc/pmif.h> -#include <soc/wdt.h> #include <soc/rtc.h> -#include <soc/eint_event.h> +#include <soc/srclken_rc.h> +#include <soc/wdt.h>
void bootblock_soc_init(void) { @@ -19,5 +21,7 @@ mt6359p_init(); mt6315_init(); unmask_eint_event_mask(); + srclken_rc_init(); + clk_buf_init(); rtc_boot(); } diff --git a/src/soc/mediatek/mt8192/clkbuf.c b/src/soc/mediatek/mt8192/clkbuf.c new file mode 100644 index 0000000..937a227 --- /dev/null +++ b/src/soc/mediatek/mt8192/clkbuf.c @@ -0,0 +1,269 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <device/mmio.h> +#include <soc/clkbuf.h> +#include <soc/pmif.h> +#include <soc/srclken_rc.h> + + +#define BUFTAG "[CLKBUF]" +#define buf_info(fmt, arg ...) printk(BIOS_INFO, BUFTAG "%s,%d: " fmt, \ + __func__, __LINE__, ## arg) + +//#define clkbuf_readl_ap(addr) read32(addr) +//#define clkbuf_writel_ap(addr, val) write32(addr, val) + + +#define PMIC_REG_MASK 0xFFFF +#define PMIC_REG_SHIFT 0 + +/* #define CLKBUF_CONN_SUPPORT_CTRL_FROM_I1 */ + +#if 0 +#if MTK_SRCLKEN_RC_FULL_SET +#define PMIC_CW00_INIT_VAL 0x4A4D /* 0100 1010 0100 1101 */ +#define PMIC_CW09_INIT_VAL 0x51F0 /* 0101 0001 1111 0000 */ +#else +#define PMIC_CW00_INIT_VAL 0x4E1D /* 0100 1110 0001 1101 */ +#define PMIC_CW09_INIT_VAL 0x31F0 /* 0011 0001 1111 0000 */ +#endif +#endif + +#define PMIC_CW00_INIT_VAL 0x4005 /* 0100 0000 0000 0101 */ +#define PMIC_CW09_INIT_VAL 0x01F0 /* 0000 0001 1111 0000 */ + +static struct pmif *pmif_arb = NULL; + +static int buf_read(u32 addr, u32 *rdata) +{ + if (pmif_arb == NULL) + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + return pmif_arb->read_cmd(pmif_arb, 0, addr, rdata); +} + +static int buf_write(u32 addr, u32 wdata) +{ + if (pmif_arb == NULL) + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + return pmif_arb->write_cmd(pmif_arb, 0, addr, wdata); +} + +static u32 buf_read_field(u32 reg, u32 mask, u32 shift) +{ + u32 rdata; + + buf_read(reg, &rdata); + rdata &= (mask << shift); + rdata = (rdata >> shift); + + return rdata; +} + +static void buf_write_field(u32 reg, u32 val, u32 mask, u32 shift) +{ + u32 old, new; + + buf_read(reg, &old); + new = old & ~(mask << shift); + new |= (val << shift); + buf_write(reg, new); +} + +static void clk_buf_dump_clkbuf_log(void) +{ + u32 pmic_cw00 = 0, pmic_cw09 = 0, pmic_cw12 = 0, pmic_cw13 = 0, + pmic_cw15 = 0, pmic_cw19 = 0, top_spi_con1 = 0, + ldo_vrfck_op_en = 0, ldo_vbbck_op_en = 0, ldo_vrfck_en = 0, + ldo_vbbck_en = 0; + /*u32 vrfck_vosel = 0, vrfck_votrim = 0;*/ + u32 vrfck_hv_en = 0; + + pmic_cw00 = buf_read_field(PMIC_RG_DCXO_CW00, 0xffff, 0); + pmic_cw09 = buf_read_field(PMIC_RG_DCXO_CW09, 0xffff, 0); + pmic_cw12 = buf_read_field(PMIC_RG_DCXO_CW12, 0xffff, 0); + pmic_cw13 = buf_read_field(PMIC_RG_DCXO_CW13, 0xffff, 0); + pmic_cw15 = buf_read_field(PMIC_RG_DCXO_CW15, 0xffff, 0); + pmic_cw19 = buf_read_field(PMIC_RG_DCXO_CW19, 0xffff, 0); + top_spi_con1 = buf_read_field(PMIC_RG_TOP_SPI_CON1, 0x1, 0); + ldo_vrfck_op_en = buf_read_field(PMIC_RG_LDO_VRFCK_OP_EN, 0x1, 14); + ldo_vbbck_op_en = buf_read_field(PMIC_RG_LDO_VBBCK_OP_EN, 0x1, 14); + ldo_vrfck_en = buf_read_field(PMIC_RG_LDO_VRFCK_CON0, 0x1, 0); + ldo_vbbck_en = buf_read_field(PMIC_RG_LDO_VBBCK_CON0, 0x1, 0); + buf_info("DCXO_CW00/09/12/13/15/19=0x%x %x %x %x %x %x\n", + pmic_cw00, pmic_cw09, pmic_cw12, + pmic_cw13, pmic_cw15, pmic_cw19); + buf_info("spi_con1/ldo_rf_op/ldo_bb_op/ldo_rf_en/ldo_bb_en=0x%x %x %x %x %x\n", + top_spi_con1, ldo_vrfck_op_en, ldo_vbbck_op_en, + ldo_vrfck_en, ldo_vbbck_en); + + vrfck_hv_en = buf_read_field(PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, 0x1, 9); + buf_info("clk buf vrfck_hv_en=0x%x\n", vrfck_hv_en); +} + +static void clk_buf_init_pmic_clkbuf(void) +{ + /* Dump registers before setting */ + clk_buf_dump_clkbuf_log(); + +#if 1 + /* 1.0 XO_WCN/XO_RF switch from VS1 to LDO VRFCK_1 */ + /* unlock pmic key */ + buf_write_field(PMIC_TOP_TMA_KEY, 0x9CA6, 0xFFFF, 0); + + /* 1.1 set VRFCK input supply(11.ac mode) */ + buf_write_field(PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, 0x0, + PMIC_RG_VRFCK_HV_EN_MASK, PMIC_RG_VRFCK_HV_EN_SHIFT); + + /* 1.2.0 Set VRFCK En = 0 */ + buf_write_field(PMIC_RG_LDO_VRFCK_CON0, 0x0, + PMIC_RG_LDO_VRFCK_EN_MASK, PMIC_RG_LDO_VRFCK_EN_SHIFT); + /* 1.2.1 set VRFCK1 as power src */ + buf_write_field(PMIC_RG_LDO_VRFCK_ELR, 0x1, + PMIC_RG_LDO_VRFCK_ANA_SEL_MASK, PMIC_RG_LDO_VRFCK_ANA_SEL_SHIFT); + + /* 1.2.2 switch LDO-RFCK to LDO-RFCK1 */ + buf_write_field(PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, 0x0, + PMIC_RG_VRFCK_NDIS_EN_MASK, PMIC_RG_VRFCK_NDIS_EN_SHIFT); + buf_write_field(PMIC_RG_DCXO_ADLDO_BIAS_ELR_1, 0x1, + PMIC_RG_VRFCK_1_NDIS_EN_MASK, PMIC_RG_VRFCK_1_NDIS_EN_SHIFT); + + /* 1.2.0 Set VRFCK En = 1 */ + buf_write_field(PMIC_RG_LDO_VRFCK_CON0, 0x1, + PMIC_RG_LDO_VRFCK_EN_MASK, PMIC_RG_LDO_VRFCK_EN_SHIFT); + + /* 1.2.3 lock pmic key */ + buf_write_field(PMIC_TOP_TMA_KEY, 0, 0xFFFF, 0); + + /* enable XO LDO */ + buf_write_field(PMIC_RG_LDO_VRFCK_OP_EN_SET, 0x1, + PMIC_RG_LDO_VRFCK_HW14_OP_EN_MASK, PMIC_RG_LDO_VRFCK_HW14_OP_EN_SHIFT); + buf_write_field(PMIC_RG_LDO_VBBCK_OP_EN_SET, 0x1, + PMIC_RG_LDO_VBBCK_HW14_OP_EN_MASK, PMIC_RG_LDO_VBBCK_HW14_OP_EN_SHIFT); + buf_write_field(PMIC_RG_LDO_VRFCK_CON0, 0x0, + PMIC_RG_LDO_VRFCK_EN_MASK, PMIC_RG_LDO_VRFCK_EN_SHIFT); + buf_write_field(PMIC_RG_LDO_VBBCK_CON0, 0x0, + PMIC_RG_LDO_VBBCK_EN_MASK, PMIC_RG_LDO_VBBCK_EN_SHIFT); + +#endif + +#if 0 + /* Setup initial PMIC clock buffer setting */ + /* 1.1 Buffer de-sense setting */ + /* FIXME: read dts and set to SRSEL and HD */ + buf_write_field(PMIC_RG_DCXO_CW13, PMIC_CLK_BUF2_CONTROLS_FOR_DESENSE, + 0x7, 0); + buf_write_field(PMIC_RG_DCXO_CW13, PMIC_CLK_BUF3_CONTROLS_FOR_DESENSE, + 0x3, 10); + buf_write_field(PMIC_RG_DCXO_CW13, PMIC_CLK_BUF4_CONTROLS_FOR_DESENSE, + 0x7, 4); +#endif + +#if 0 + /* 1.2 Buffer setting for trace impedance */ + /* FIXME: read dts and set to RSEL */ + buf_write_field(PMIC_RG_DCXO_CW19, PMIC_CLK_BUF1_OUTPUT_IMPEDANCE, + 0x7, 1); + buf_write_field(PMIC_RG_XO_EXTBUF2_RSEL_ADDR, PMIC_CLK_BUF2_OUTPUT_IMPEDANCE, + PMIC_RG_XO_EXTBUF2_RSEL_MASK, PMIC_RG_XO_EXTBUF2_RSEL_SHIFT); + buf_write_field(PMIC_RG_XO_EXTBUF3_RSEL_ADDR, PMIC_CLK_BUF3_OUTPUT_IMPEDANCE, + PMIC_RG_XO_EXTBUF3_RSEL_MASK, PMIC_RG_XO_EXTBUF3_RSEL_SHIFT); + buf_write_field(PMIC_RG_XO_EXTBUF4_RSEL_ADDR, PMIC_CLK_BUF4_OUTPUT_IMPEDANCE, + PMIC_RG_XO_EXTBUF4_RSEL_MASK, PMIC_RG_XO_EXTBUF4_RSEL_SHIFT); + buf_write_field(PMIC_RG_XO_EXTBUF7_RSEL_ADDR, PMIC_CLK_BUF7_OUTPUT_IMPEDANCE, + PMIC_RG_XO_EXTBUF7_RSEL_MASK, PMIC_RG_XO_EXTBUF7_RSEL_SHIFT); +#endif + + /* 1.4 26M enable control */ +#ifndef MTK_SRCLKEN_RC_SUPPORT + + /*Legacy co-clock mode */ +#ifdef CLKBUF_CONN_SUPPORT_CTRL_FROM_I1 + buf_write_field(PMIC_RG_DCXO_CW12, 0x1, 0x1, 12); +#else + buf_write_field(PMIC_RG_TOP_SPI_CON1, 0, 0x1, 0); +#endif + + buf_write_field(PMIC_RG_DCXO_CW00, PMIC_CW00_INIT_VAL, 0xFFFF, 0); + buf_write_field(PMIC_RG_DCXO_CW09, PMIC_CW09_INIT_VAL, 0xFFFF, 0); + +#else /* MTK_SRCLKEN_RC_SUPPORT */ + +#if MTK_SRCLKEN_RC_FULL_SET + + /* fully new co-clock mode */ + + /* All XO mode should set to 2'b01 */ + buf_write_field(PMIC_RG_DCXO_CW00, PMIC_CW00_INIT_VAL, 0xFFFF, 0); + buf_info("part2.1 done\n"); + buf_write_field(PMIC_RG_DCXO_CW09, PMIC_CW09_INIT_VAL, 0xFFFF, 0); + buf_info("part2.2 done\n"); + + /* 1.update control mapping table */ + /* + * XO_SOC_VOTE=11'h005 + */ + buf_write_field(PMIC_RG_XO_BUF_CTL0, 0x005, 0x7FF, 0); + + /* 2.switch to new control mode */ + /* + * XO_PMIC_TOP_DIG_SW=0 + * XO_MODE_CONN_BT_MASK=0 (BTonly : 1) + * XO_BUF_CONN_BT_MASK=0 (BTonly : 1 ) + */ + buf_write_field(PMIC_RG_DCXO_CW08, 0x0, + 0x1, 2); + buf_info("part2.3 done\n"); + buf_write_field(PMIC_RG_XO_CONN_BT0, 0x0, + 0x1, 0); + buf_info("part2.4 done\n"); + buf_write_field(PMIC_RG_XO_CONN_BT0, 0x0, + 0x1, 1); + buf_info("part2.5 done\n"); + +#endif +#endif /* MTK_SRCLKEN_RC_SUPPORT */ + + /* Check if the setting is ok */ + clk_buf_dump_clkbuf_log(); +} + +static void clk_buf_init_pmic_wrap(void) +{ +#if 0 + /* Setup PMIC_WRAP setting for XO2 & XO3 */ + if (CLK_BUF2_STATUS_PMIC != CLOCK_BUFFER_DISABLE) { +#ifdef CLKBUF_CONN_SUPPORT_CTRL_FROM_I1 + clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); + clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) + | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); +#else + clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); + clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (0 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) + | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); +#endif + } + + if (CLK_BUF3_STATUS_PMIC != CLOCK_BUFFER_DISABLE) { + clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); + clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) + | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); + } + + buf_info("DCXO_CMD_ADR0/WDATA0=0x%x/%x\n", + clkbuf_readl_ap(PMIFSPI_DCXO_CMD_ADDR0), + clkbuf_readl_ap(PMIFSPI_DCXO_CMD_WDATA0)); + buf_info("DCXO_CMD_ADR1/WDATA1=0x%x/%x\n", + clkbuf_readl_ap(PMIFSPI_DCXO_CMD_ADDR1), + clkbuf_readl_ap(PMIFSPI_DCXO_CMD_WDATA1)); +#endif +} + +int clk_buf_init(void) +{ + clk_buf_init_pmic_clkbuf(); + clk_buf_init_pmic_wrap(); + + return 0; +} + diff --git a/src/soc/mediatek/mt8192/include/soc/addressmap.h b/src/soc/mediatek/mt8192/include/soc/addressmap.h index 85eac5b..3266a3a 100644 --- a/src/soc/mediatek/mt8192/include/soc/addressmap.h +++ b/src/soc/mediatek/mt8192/include/soc/addressmap.h @@ -20,6 +20,8 @@ INFRACFG_AO_MEM_BASE = IO_PHYS + 0x00002000, GPIO_BASE = IO_PHYS + 0x00005000, SPM_BASE = IO_PHYS + 0x00006000, + RC_BASE = IO_PHYS + 0x00006500, + RC_STATUS_BASE = IO_PHYS + 0x00006E00, RGU_BASE = IO_PHYS + 0x00007000, GPT_BASE = IO_PHYS + 0x00008000, EINT_BASE = IO_PHYS + 0x0000B000, diff --git a/src/soc/mediatek/mt8192/include/soc/clkbuf.h b/src/soc/mediatek/mt8192/include/soc/clkbuf.h new file mode 100644 index 0000000..2facd3e --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/clkbuf.h @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef SOC_MEDIATEK_MT8192_CLKBUF_H +#define SOC_MEDIATEK_MT8192_CLKBUF_H + +enum { + PMIC_RG_DCXO_CW00 = 0x0788, + PMIC_RG_DCXO_CW02 = 0x0790, + PMIC_RG_DCXO_CW08 = 0x079C, + PMIC_RG_DCXO_CW09 = 0x079E, + PMIC_RG_DCXO_CW09_CLR = 0x07A2, + PMIC_RG_DCXO_CW10 = 0x07A4, + PMIC_RG_DCXO_CW12 = 0x07A8, + PMIC_RG_DCXO_CW13 = 0x07AA, + PMIC_RG_DCXO_CW15 = 0x07AE, + PMIC_RG_DCXO_CW19 = 0x07B6, +}; + + +enum { + PMIC_TOP_TMA_KEY = 0x3A8, + PMIC_RG_TOP_SPI_CON1 = 0x458, +}; + +enum { + PMIC_RG_LDO_VRFCK_ELR = 0x1b40, + PMIC_RG_LDO_VRFCK_CON0 = 0x1D1C, + PMIC_RG_LDO_VRFCK_OP_EN = 0x1D22, + PMIC_RG_LDO_VRFCK_OP_EN_SET = 0x1D24, + PMIC_RG_LDO_VBBCK_CON0 = 0x1D2E, + PMIC_RG_LDO_VBBCK_OP_EN = 0x1D34, + PMIC_RG_LDO_VBBCK_OP_EN_SET = 0x1D36, +}; + +enum { + PMIC_RG_DCXO_ADLDO_BIAS_ELR_0 = 0x209C, + PMIC_RG_DCXO_ADLDO_BIAS_ELR_1 = 0x209E, +}; + +enum { + PMIC_RG_XO_BUF_CTL0 = 0x54C, + PMIC_RG_XO_CONN_BT0 = 0x556, +}; + +#define PMIC_RG_VRFCK_HV_EN_MASK 0x1 +#define PMIC_RG_VRFCK_HV_EN_SHIFT 9 +#define PMIC_RG_LDO_VRFCK_EN_MASK 0x1 +#define PMIC_RG_LDO_VRFCK_EN_SHIFT 0 +#define PMIC_RG_LDO_VRFCK_ANA_SEL_MASK 0x1 +#define PMIC_RG_LDO_VRFCK_ANA_SEL_SHIFT 0 +#define PMIC_RG_LDO_VBBCK_EN_MASK 0x1 +#define PMIC_RG_LDO_VBBCK_EN_SHIFT 0 +#define PMIC_RG_VRFCK_NDIS_EN_MASK 0x1 +#define PMIC_RG_VRFCK_NDIS_EN_SHIFT 11 +#define PMIC_RG_VRFCK_1_NDIS_EN_MASK 0x1 +#define PMIC_RG_VRFCK_1_NDIS_EN_SHIFT 0 +#define PMIC_RG_LDO_VRFCK_HW14_OP_EN_MASK 0x1 +#define PMIC_RG_LDO_VRFCK_HW14_OP_EN_SHIFT 14 +#define PMIC_RG_LDO_VBBCK_HW14_OP_EN_MASK 0x1 +#define PMIC_RG_LDO_VBBCK_HW14_OP_EN_SHIFT 14 + +int clk_buf_init(void); + +#endif + diff --git a/src/soc/mediatek/mt8192/include/soc/pmif.h b/src/soc/mediatek/mt8192/include/soc/pmif.h index 6106a3d..71f3724 100644 --- a/src/soc/mediatek/mt8192/include/soc/pmif.h +++ b/src/soc/mediatek/mt8192/include/soc/pmif.h @@ -154,7 +154,48 @@ E_SPI_INIT_SIDLY, /* SPI edge calibration fail */ };
+enum pmic_interface { + PMIF_VLD_RDY = 0, + PMIF_SLP_REQ, + PMIF_MAX, +}; + +#define PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK 0x1 +#define PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT 4 +#define PMIFSPI_OTHER_INF_DXCO0_EN_MSK 0x1 +#define PMIFSPI_OTHER_INF_DXCO0_EN_SHFT 0 +#define PMIFSPI_OTHER_INF_DXCO1_EN_MSK 0x1 +#define PMIFSPI_OTHER_INF_DXCO1_EN_SHFT 1 +#define PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK 0x1 +#define PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT 4 +#define PMIFSPI_ARB_EN_DCXO_CONN_MSK 0x1 +#define PMIFSPI_ARB_EN_DCXO_CONN_SHFT 15 +#define PMIFSPI_ARB_EN_DCXO_NFC_MSK 0x1 +#define PMIFSPI_ARB_EN_DCXO_NFC_SHFT 16 +#define PMIFSPI_SPM_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT 0 +#define PMIFSPI_SCP_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT 9 +#define PMIFSPI_MD_CTL_PMIF_RDY_MSK 0x1 +#define PMIFSPI_MD_CTL_PMIF_RDY_SHFT 11 +#define PMIFSPI_MD_CTL_SRCLK_EN_MSK 0x1 +#define PMIFSPI_MD_CTL_SRCLK_EN_SHFT 12 +#define PMIFSPI_MD_CTL_SRVOL_EN_MSK 0x1 +#define PMIFSPI_MD_CTL_SRVOL_EN_SHFT 13 + +#define PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT 0 +#define PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT 9 +#define PMIFSPMI_MD_CTL_PMIF_RDY_MSK 0x1 +#define PMIFSPMI_MD_CTL_PMIF_RDY_SHFT 11 +#define PMIFSPMI_MD_CTL_SRCLK_EN_MSK 0x1 +#define PMIFSPMI_MD_CTL_SRCLK_EN_SHFT 12 +#define PMIFSPMI_MD_CTL_SRVOL_EN_MSK 0x1 +#define PMIFSPMI_MD_CTL_SRVOL_EN_SHFT 13 + /* start external API */ extern struct pmif *get_pmif_controller(int inf, int mstid); +extern void pmwrap_interface_init(void); extern int mtk_pmif_init(void); #endif /*__MT8192_SOC_PMIF_H__*/ diff --git a/src/soc/mediatek/mt8192/include/soc/rtc.h b/src/soc/mediatek/mt8192/include/soc/rtc.h index bad7c68..4ec7475 100755 --- a/src/soc/mediatek/mt8192/include/soc/rtc.h +++ b/src/soc/mediatek/mt8192/include/soc/rtc.h @@ -159,6 +159,7 @@ PMIC_RG_BANK_FQMTR_RST_SHIFT = 6 };
+#if 0 /* PMIC DCXO Register Definition */ enum { PMIC_RG_DCXO_CW00 = 0x0788, @@ -171,6 +172,7 @@ PMIC_RG_DCXO_CW09_CLR = 0x07A2, PMIC_RG_DCXO_CW12 = 0x07A8 }; +#endif
/* PMIC Frequency Meter Definition */ enum { diff --git a/src/soc/mediatek/mt8192/include/soc/srclken_rc.h b/src/soc/mediatek/mt8192/include/soc/srclken_rc.h new file mode 100644 index 0000000..0ed4da9 --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/srclken_rc.h @@ -0,0 +1,425 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef SOC_MEDIATEK_MT8192_SRCLKEN_RC_H +#define SOC_MEDIATEK_MT8192_SRCLKEN_RC_H + +//#include <soc/addressmap.h> + +struct mtk_rc_regs { + u32 srclken_rc_cfg; + u32 rc_central_cfg1; + u32 rc_central_cfg2; + u32 rc_cmd_arb_cfg; + u32 rc_pmic_rcen_addr; + u32 rc_pmic_rcen_set_clr_addr; + u32 rc_dcxo_fpm_cfg; + u32 rc_central_cfg3; + u32 rc_mxx_srclken_cfg[13]; + u32 srclken_sw_con_cfg; + u32 rc_central_cfg4; + u32 reserved1; + u32 rc_protocol_chk_cfg; + u32 rc_debug_cfg; + u32 reserved2[19]; + u32 rc_misc_0; + u32 rc_spm_ctrl; + u32 rc_subsys_intf_cfg; +}; + +check_member(mtk_rc_regs, rc_central_cfg1, 0x4); +check_member(mtk_rc_regs, rc_mxx_srclken_cfg[0], 0x20); +check_member(mtk_rc_regs, rc_mxx_srclken_cfg[12], 0x50); +check_member(mtk_rc_regs, rc_central_cfg4, 0x58); +check_member(mtk_rc_regs, rc_protocol_chk_cfg, 0x60); +check_member(mtk_rc_regs, rc_misc_0, 0xb4); +check_member(mtk_rc_regs, rc_subsys_intf_cfg, 0xbc); + +struct mtk_rc_status_regs { + u32 rc_fsm_sta_0; + u32 rc_cmd_sta_0; + u32 rc_cmd_sta_1; + u32 rc_spi_sta_0; + u32 rc_pi_po_sta_0; + u32 rc_mxx_req_sta_0[14]; + u32 reserved2[2]; + u32 rc_debug_trace; +}; + +check_member(mtk_rc_status_regs, rc_cmd_sta_1, 0x8); +check_member(mtk_rc_status_regs, rc_mxx_req_sta_0[0], 0x14); +check_member(mtk_rc_status_regs, rc_mxx_req_sta_0[13], 0x48); +check_member(mtk_rc_status_regs, rc_debug_trace, 0x54); + +/* + * Definitions + */ + +#define MTK_SRCLKEN_RC_BRINGUP (0) +#define MTK_SRCLKEN_RC_SUPPORT +#ifdef MTK_SRCLKEN_RC_SUPPORT +#define MTK_SRCLKEN_RC_FULL_SET (1) +#endif +#define SRCLKEN_DBG (1) + + +//#define AP_BASE (0x1000C000) +//#define SPM_BASE (0x10006000) +//#define RC_BASE (0x10006500) +//#define RC_STATE_BASE (0x10006E00) +//#define PMIF_SPI_BASE (0x10026000) +//#define PMIF_SPMI_BASE (0x10027000) + +#if 0 +/* PMIF Register*/ +#define PMIFSPI_INF_EN (PMIF_SPI_BASE + 0x0024) +#define PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK 0x1 +#define PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT 4 + +#define PMIFSPI_OTHER_INF_EN (PMIF_SPI_BASE + 0x0028) +#define PMIFSPI_OTHER_INF_DXCO0_EN_MSK 0x1 +#define PMIFSPI_OTHER_INF_DXCO0_EN_SHFT 0 +#define PMIFSPI_OTHER_INF_DXCO1_EN_MSK 0x1 +#define PMIFSPI_OTHER_INF_DXCO1_EN_SHFT 1 + +#define PMIFSPI_DCXO_CMD_ADDR0 (PMIF_SPI_BASE + 0x005C) +#define DCXO_CMD_ADDR0_0_MSK 0xffff +#define DCXO_CMD_ADDR0_0_SHFT 0 +#define DCXO_CMD_ADDR0_1_MSK 0xffff +#define DCXO_CMD_ADDR0_1_SHFT 16 + +#define PMIFSPI_DCXO_CMD_WDATA0 (PMIF_SPI_BASE + 0x0060) +#define DCXO_CMD_WDATA0_0_MSK 0xffff +#define DCXO_CMD_WDATA0_0_SHFT 0 +#define DCXO_CMD_WDATA0_1_MSK 0xffff +#define DCXO_CMD_WDATA0_1_SHFT 16 + +#define PMIFSPI_DCXO_CMD_ADDR1 (PMIF_SPI_BASE + 0x0064) +#define DCXO_CMD_ADDR1_0_MSK 0xffff +#define DCXO_CMD_ADDR1_0_SHFT 0 +#define DCXO_CMD_ADDR1_1_MSK 0xffff +#define DCXO_CMD_ADDR1_1_SHFT 16 + +#define PMIFSPI_DCXO_CMD_WDATA1 (PMIF_SPI_BASE + 0x0068) +#define DCXO_CMD_WDATA1_0_MSK 0xffff +#define DCXO_CMD_WDATA1_0_SHFT 0 +#define DCXO_CMD_WDATA1_1_MSK 0xffff +#define DCXO_CMD_WDATA1_1_SHFT 16 + +#define PMIFSPI_ARB_EN (PMIF_SPI_BASE + 0x0150) +#define PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK 0x1 +#define PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT 4 +#define PMIFSPI_ARB_EN_DCXO_CONN_MSK 0x1 +#define PMIFSPI_ARB_EN_DCXO_CONN_SHFT 15 +#define PMIFSPI_ARB_EN_DCXO_NFC_MSK 0x1 +#define PMIFSPI_ARB_EN_DCXO_NFC_SHFT 16 + +#define PMIFSPI_SLEEP_PROTECTION_CRL (PMIF_SPI_BASE + 0x03E8) +#define PMIFSPI_SPM_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT 0 +#define PMIFSPI_SCP_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT 9 + +#define PMIFSPI_MODE_CRL (PMIF_SPI_BASE + 0x0400) +#define PMIFSPI_MD_CTL_PMIF_RDY_MSK 0x1 +#define PMIFSPI_MD_CTL_PMIF_RDY_SHFT 11 +#define PMIFSPI_MD_CTL_SRCLK_EN_MSK 0x1 +#define PMIFSPI_MD_CTL_SRCLK_EN_SHFT 12 +#define PMIFSPI_MD_CTL_SRVOL_EN_MSK 0x1 +#define PMIFSPI_MD_CTL_SRVOL_EN_SHFT 13 + +#define PMIFSPMI_SLEEP_PROTECTION_CRL (PMIF_SPMI_BASE + 0x03E8) +#define PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT 0 +#define PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK 0x3 +#define PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT 9 + +#define PMIFSPMI_MODE_CRL (PMIF_SPMI_BASE + 0x0400) +#define PMIFSPMI_MD_CTL_PMIF_RDY_MSK 0x1 +#define PMIFSPMI_MD_CTL_PMIF_RDY_SHFT 11 +#define PMIFSPMI_MD_CTL_SRCLK_EN_MSK 0x1 +#define PMIFSPMI_MD_CTL_SRCLK_EN_SHFT 12 +#define PMIFSPMI_MD_CTL_SRVOL_EN_MSK 0x1 +#define PMIFSPMI_MD_CTL_SRVOL_EN_SHFT 13 +#endif + +/* SPM Register */ +#define ULPOSC_CON (SPM_BASE + 0x0440) +#define ULPOSC_EN_SHFT 0 +#define ULPOSC_RST_SHFT 1 +#define ULPOSC_CG_EN_SHFT 2 +#define ULPOSC_CLK_SEL_SHFT 3 + +#define SRCLKEN_RC_CFG (RC_BASE + 0x0000) +#define SW_RESET_MSK 0x1 +#define SW_RESET_SHFT 0 +#define CG_32K_EN_MSK 0x1 +#define CG_32K_EN_SHFT 1 +#define CG_FCLK_EN_MSK 0x1 +#define CG_FCLK_EN_SHFT 2 +#define CG_FCLK_FR_EN_MSK 0x1 +#define CG_FCLK_FR_EN_SHFT 3 +#define MUX_FCLK_FR_MSK 0x1 +#define MUX_FCLK_FR_SHFT 4 +#define RC_32K_DCM_MSK 0x1 +#define RC_32K_DCM_SHFT 8 + + +#define RC_CENTRAL_CFG1 (RC_BASE + 0x0004) +#define SRCLKEN_RC_EN_MSK 0x1 +#define SRCLKEN_RC_EN_SHFT 0 +#define RCEN_ISSUE_M_MSK 0x1 +#define RCEN_ISSUE_M_SHFT 1 +#define RC_SPI_ACTIVE_MSK 0x1 +#define RC_SPI_ACTIVE_SHFT 2 +#define SRCLKEN_RC_EN_SEL_MSK 0x1 +#define SRCLKEN_RC_EN_SEL_SHFT 3 +#define VCORE_SETTLE_T_MSK 0x7 +#define VCORE_SETTLE_T_SHFT 5 +#define ULPOSC_SETTLE_T_MSK 0xf +#define ULPOSC_SETTLE_T_SHFT 8 +#define NON_DCXO_SETTLE_T_MSK 0x3ff +#define NON_DCXO_SETTLE_T_SHFT 12 +#define DCXO_SETTLE_T_MSK 0x3ff +#define DCXO_SETTLE_T_SHFT 22 + +#define RC_CENTRAL_CFG2 (RC_BASE + 0x0008) +#define SRCVOLTEN_CTRL_MSK 0xf +#define SRCVOLTEN_CTRL_SHFT 0 +#define VREQ_CTRL_MSK 0xf +#define VREQ_CTRL_SHFT 4 +#define SRCVOLTEN_VREQ_SEL_MSK 0x1 +#define SRCVOLTEN_VREQ_SEL_SHFT 8 +#define SRCVOLTEN_VREQ_M_MSK 0x1 +#define SRCVOLTEN_VREQ_M_SHFT 9 +#define FORCE_SRCVOLTEN_OFF_MSK 0x1 +#define FORCE_SRCVOLTEN_OFF_SHFT 10 +#define FORCE_SRCVOLTEN_ON_MSK 0x1 +#define FORCE_SRCVOLTEN_ON_SHFT 11 +#define ULPOSC_CTRL_M_MSK 0xf +#define ULPOSC_CTRL_M_SHFT 12 +#define FORCE_VCORE_RDY_MSK 0x1 +#define FORCE_VCORE_RDY_SHFT 16 +#define FORCE_ULPOSC2ON_MSK 0x1 +#define FORCE_ULPOSC2ON_SHFT 17 +#define FORCE_ULPOSC_CLK_EN_MSK 0x1 +#define FORCE_ULPOSC_CLK_EN_SHFT 18 +#define FORCE_ULPOSC_ON_MSK 0x1 +#define FORCE_ULPOSC_ON_SHFT 19 +#define DIS_ULPOSC_RDY_CHK_MSK 0x1 +#define DIS_ULPOSC_RDY_CHK_SHFT 20 +#define PWRAP_SLP_CTRL_M_MSK 0xf +#define PWRAP_SLP_CTRL_M_SHFT 21 +#define PWRAP_SLP_MUX_SEL_MSK 0x1 +#define PWRAP_SLP_MUX_SEL_SHFT 25 +#define FORCE_PWRAP_ON_MSK 0x1 +#define FORCE_PWRAP_ON_SHFT 26 +#define FORCE_PWRAP_AWK_MSK 0x1 +#define FORCE_PWRAP_AWK_SHFT 27 +#define NON_DCXO_REQ_FORCEON_MSK 0x1 +#define NON_DCXO_REQ_FORCEON_SHFT 28 +#define NON_DCXO_REQ_FORCEOFF_MSK 0x1 +#define NON_DCXO_REQ_FORCEOFF_SHFT 29 +#define DCXO_REQ_FORCEON_MSK 0x1 +#define DCXO_REQ_FORCEON_SHFT 30 +#define DCXO_REQ_FORCEOFF_MSK 0x1 +#define DCXO_REQ_FORCEOFF_SHFT 31 + +#define RC_CMD_ARB_CFG (RC_BASE + 0x000C) +#define SW_RC_EN_MSK 0x1fff +#define SW_RC_EN_SHFT 0 +#define SW_RCEN_EN_MSK 0x1fff +#define SW_RCEN_EN_SHFT 13 +#define SW_DCXO_M_EN_MSK 0x1 +#define SW_DCXO_M_EN_SHFT 28 +#define SW_DCXO_M_MSK 0x7 +#define SW_DCXO_M_SHFT 29 + +#define RC_PMIC_RCEN_ADDR (RC_BASE + 0x0010) +#define RC_PMIC_RCEN_SET_CLR_ADDR (RC_BASE + 0x0014) +#define RC_DCXO_FPM_CFG (RC_BASE + 0x0018) +#define DCXO_FPM_CTRL_M_MSK 0xf +#define DCXO_FPM_CTRL_M_SHFT 0 +#define SRCVOLTEN_FPM_MSK_B_MSK 0x1 +#define SRCVOLTEN_FPM_MSK_B_SHFT 4 +#define SUB_SRCLKEN_FPM_MSK_B_MSK 0x1fff +#define SUB_SRCLKEN_FPM_MSK_B_SHFT 16 + +#define RC_CENTRAL_CFG3 (RC_BASE + 0x001C) +#define TO_LPM_SETTLE_EN_MSK 0x1 +#define TO_LPM_SETTLE_EN_SHFT 0 +#define BLK_SCP_DXCO_MD_TARGET_MSK 0x1 +#define BLK_SCP_DXCO_MD_TARGET_SHFT 1 +#define BLK_COANT_DXCO_MD_TARGET_MSK 0x1 +#define BLK_COANT_DXCO_MD_TARGET_SHFT 2 +#define TO_BBLPM_SETTLE_EN_MSK 0x1 +#define TO_BBLPM_SETTLE_EN_SHFT 0x3 +#define TO_BBLPM_SETTLE_ND_EN_MSK 0x1 +#define TO_BBLPM_SETTLE_ND_EN_SHFT 0x4 +#define TO_LPM_SETTLE_T_MSK 0x2ff +#define TO_LPM_SETTLE_T_SHFT 12 + +#define RC_MXX_SRCLKEN_CFG (RC_BASE + 0x0020) +#define DCXO_SETTLE_BLK_EN_MSK 0x1 +#define DCXO_SETTLE_BLK_EN_SHFT 1 +#define BYPASS_CMD_EN_MSK 0x1 +#define BYPASS_CMD_EN_SHFT 2 +#define SW_SRCLKEN_RC_MSK 0x1 +#define SW_SRCLKEN_RC_SHFT 3 +#define SW_SRCLKEN_FPM_MSK 0x1 +#define SW_SRCLKEN_FPM_SHFT 4 +#define SW_SRCLKEN_BBLPM_MSK 0x1 +#define SW_SRCLKEN_BBLPM_SHFT 5 +#define XO_SOC_LINK_EN_MSK 0x1 +#define XO_SOC_LINK_EN_SHFT 6 +#define REQ_ACK_LOW_IMD_EN_MSK 0x1 +#define REQ_ACK_LOW_IMD_EN_SHFT 7 +#define SRCLKEN_TRACK_M_EN_MSK 0x1 +#define SRCLKEN_TRACK_M_EN_SHFT 8 +#define CNT_PRD_STEP_MSK 0x3 +#define CNT_PRD_STEP_SHFT 10 +#define XO_STABLE_PRD_MSK 0x3ff +#define XO_STABLE_PRD_SHFT 12 +#define DCXO_STABLE_PRD_MSK 0x3ff +#define DCXO_STABLE_PRD_SHFT 22 + +#define RC_DEBUG_TRACE (RC_BASE + 0x0054) +#define TACE_EN_MSK 0x1 +#define TACE_EN_SHFT 0 + +#define RC_CENTRAL_CFG4 (RC_BASE + 0x0058) +#define KEEP_RC_SPI_ACTIVE_MSK 0x1ff +#define KEEP_RC_SPI_ACTIVE_SHFT 0 +#define PWRAP_VLD_FORCE_MAK 0x1 +#define PWRAP_VLD_FORCE_SHFT 16 +#define SLEEP_VLD_MODE_MAK 0x1 +#define SLEEP_VLD_MODE_SHFT 17 +#define SCP_SLEEP_REQ_MODE_MAK 0x1 +#define SCP_SLEEP_REQ_MODE_SHFT 18 +#define SLEEP_REQ_MODE_MSK 0x1 +#define SLEEP_REQ_MODE_SHFT 20 + +#define RC_DEBUG_CFG (RC_BASE + 0x0064) +#define TRACE_MODE_EN_MSK 0x1 +#define TRACE_MODE_EN_SHFT 24 +#define DBG_STOP_PROT_EN_MSK 0x1 +#define DBG_STOP_PROT_EN_SHFT 28 + +#define SUBSYS_INTF_CFG (RC_BASE + 0x00BC) +#define SRCLKEN_FPM_MASK_B_MSK 0x1fff +#define SRCLKEN_FPM_MASK_B_SHFT 0 +#define SRCLKEN_BBLPM_MASK_B_MSK 0x1fff +#define SRCLKEN_BBLPM_MASK_B_SHFT 16 + +#define RC_PI_PO_STA (RC_STATUS_BASE + 0x0010) +#define RC_MXX_REQ_STA_0 (RC_STATUS_BASE + 0x0014) +#define FPM_ACK_MSK 0x1 +#define FPM_ACK_SHFT 1 +#define BBLPM_ACK_MSK 0x1 +#define BBLPM_ACK_SHFT 3 + +#define RC_SPI_STA_0 (RC_STATUS_BASE + 0x000C) + +/*#define TEST_UFS (UFS_HCI_BASE + 0x0144)*/ + +enum { + PMIC_PMRC_CON0 = 0x1A6, +}; + +typedef struct { + u32 osc_div; + u32 cali_val; +} ulposc_con_t; + +enum { + ULPOSC_DIV_1 = 0, + ULPOSC_DIV_4 = 1 +}; + +enum chn_id { + CHN_SUSPEND = 0, + CHN_RF = 1, + CHN_DEEPIDLE = 2, + CHN_MD= 3, + CHN_GPS = 4, + CHN_BT = 5, + CHN_WIFI = 6, + CHN_MCU = 7, + CHN_COANT = 8, + CHN_NFC = 9, + CHN_UFS = 10, + CHN_SCP = 11, + CHN_RESERVE = 12, + MAX_CHN_NUM, +}; + +enum { + SRCLKENAO_MODE, + VREQ_MODE, +}; + +enum { + MERGE_OR_MODE = 0x0, + BYPASS_MODE = 0x1, + MERGE_AND_MODE = 0x1 << 1, + BYPASS_RC_MODE = 0x2 << 1, + BYPASS_OTHER_MODE = 0x3 << 1, + ASYNC_MODE = 0x1 << 3, +}; + +enum { + RC_32K = 0, + RC_ULPOSC1, +}; + +enum rc_ctrl_m { + HW_MODE = 0, + SW_MODE = 1, + INIT_MODE = 0xff, +}; + +enum rc_ctrl_r { + NO_REQ = 0, + FPM_REQ = 1 << SW_SRCLKEN_FPM_SHFT, + BBLPM_REQ = 1 << SW_SRCLKEN_BBLPM_SHFT, +}; + +enum { + SRLCKEN_RC_BRINGUP = 0, + SRCLKEN_RC_DISABLE, + SRCLKEN_RC_ENABLE, + SRCLKEN_RC_SKIP, +}; + +struct subsys_rc_con { + enum chn_id id; + unsigned int dcxo_prd; + unsigned int xo_prd; + unsigned int cnt_step; + unsigned int track_en; + unsigned int req_ack_imd_en; + unsigned int xo_soc_link_en; + unsigned int sw_bblpm; + unsigned int sw_fpm; + unsigned int sw_rc; + unsigned int bypass_cmd; + unsigned int dcxo_settle_blk_en; +}; + +#define RC_SUBSYS_SET(_dcxo_prd, _xo_prd, _cnt_step, _track_en, \ + _req_ack_imd_en, _xo_soc_link_en, _sw_bblpm, \ + _sw_fpm, _sw_rc, _bypass_settle) { \ + .dcxo_prd = _dcxo_prd, \ + .xo_prd = _xo_prd, \ + .cnt_step = _cnt_step, \ + .track_en = _track_en, \ + .req_ack_imd_en = _req_ack_imd_en, \ + .xo_soc_link_en = _xo_soc_link_en, \ + .sw_bblpm = _sw_bblpm, \ + .sw_fpm = _sw_fpm, \ + .sw_rc = _sw_rc, \ + .bypass_settle = _bypass_settle, \ + } + +//extern void rc_ctrl_mode_switch_hw(enum chn_id id); +//extern void rc_ctrl_mode_switch_sw(enum chn_id id); +extern int srclken_rc_init(void); +#endif diff --git a/src/soc/mediatek/mt8192/pmif.c b/src/soc/mediatek/mt8192/pmif.c index 295deaf..c7d325b 100644 --- a/src/soc/mediatek/mt8192/pmif.c +++ b/src/soc/mediatek/mt8192/pmif.c @@ -156,6 +156,134 @@ return NULL; }
+static void pmif_select(enum pmic_interface mode) +{ + unsigned int spi_sleep_ctrl, spmi_sleep_ctrl; + unsigned int spi_mode_ctrl, spmi_mode_ctrl; + unsigned int inf_en, other_inf_en, arb_en; + + spi_sleep_ctrl = read32(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl); + spmi_sleep_ctrl = read32(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl); + spi_mode_ctrl = read32(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl); + spmi_mode_ctrl = read32(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl); + inf_en = read32(&pmif_spi_arb[0].mtk_pmif->inf_en); + other_inf_en = read32(&pmif_spi_arb[0].mtk_pmif->other_inf_en); + arb_en = read32(&pmif_spi_arb[0].mtk_pmif->arb_en); + + if(PMIF_VLD_RDY == mode){ + /* spm and scp sleep request disable spi and spmi */ + spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) + | (0x1 << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT); + spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) + | (0x1 << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT); + + spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) + | (0x1 << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT); + spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) + | (0x1 << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT); + /* pmic vld/rdy control spi mode enable*/ + spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) + | (0x1 << PMIFSPI_MD_CTL_PMIF_RDY_SHFT); + /* srclken control spi mode disable*/ + spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) + | (0x0 << PMIFSPI_MD_CTL_SRCLK_EN_SHFT); + /* vreq control spi mode disable*/ + spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) + | (0x0 << PMIFSPI_MD_CTL_SRVOL_EN_SHFT); + spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) + | (0x1 << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT); + spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) + | (0x0 << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT); + spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) + | (0x0 << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT); + + /* srclken rc interface enable*/ + inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) + | (0x1 << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT); + + /* dcxo interface disable */ + other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) + | (0x0 << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT); + other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) + | (0x0 << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT); + /*srclken enable, dcxo0,1 disable*/ + arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) + | (0x1 << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT); + arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) + | (0x0 << PMIFSPI_ARB_EN_DCXO_CONN_SHFT); + arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) + | (0x0 << PMIFSPI_ARB_EN_DCXO_NFC_SHFT); + + } else if (PMIF_SLP_REQ == mode) { + + /* spm and scp sleep request enable spi and spmi */ + spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) + | (0x0 << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT); + spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) + | (0x0 << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT); + + spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) + | (0x0 << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT); + spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) + | (0x0 << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT); + + /* pmic vld/rdy control spi mode disable*/ + spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) + | (0x0 << PMIFSPI_MD_CTL_PMIF_RDY_SHFT); + /* srclken control spi mode enable*/ + spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) + | (0x1 << PMIFSPI_MD_CTL_SRCLK_EN_SHFT); + /* vreq control spi mode enable*/ + spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) + | (0x1 << PMIFSPI_MD_CTL_SRVOL_EN_SHFT); + + spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) + | (0x0 << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT); + spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) + | (0x1 << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT); + spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) + | (0x1 << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT); + + /* srclken rc interface disable*/ + inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) + | (0x0 << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT); + /* dcxo interface enable */ + other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) + | (0x1 << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT); + other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) + | (0x1 << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT); + + /*srclken dissable, dcxo0,1 enable*/ + arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) + | (0x0 << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT); + arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) + | (0x1 << PMIFSPI_ARB_EN_DCXO_CONN_SHFT); + arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) + | (0x1 << PMIFSPI_ARB_EN_DCXO_NFC_SHFT); + + } else + return; + + write32(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, spi_sleep_ctrl); + write32(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, spmi_sleep_ctrl); + write32(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, spi_mode_ctrl); + write32(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, spmi_mode_ctrl); + write32(&pmif_spi_arb[0].mtk_pmif->inf_en, inf_en); + write32(&pmif_spi_arb[0].mtk_pmif->other_inf_en, other_inf_en); + write32(&pmif_spi_arb[0].mtk_pmif->arb_en, arb_en); +} + +void pmwrap_interface_init(void){ + /* MTK_SRCLKEN_RC_SUPPORT */ +#if 1 + printk(BIOS_ERR, "[%s] PMIF_VLD_RDY\n", __func__); + pmif_select(PMIF_VLD_RDY); +#else + printk(BIOS_ERR, "[%s] PMIF_SLP_REQ\n", __func__); + pmic_select(PMIF_SLP_REQ); +#endif +} + int mtk_pmif_init(void) { int ret = 1; diff --git a/src/soc/mediatek/mt8192/rtc.c b/src/soc/mediatek/mt8192/rtc.c index f02c633..ca817fa 100755 --- a/src/soc/mediatek/mt8192/rtc.c +++ b/src/soc/mediatek/mt8192/rtc.c @@ -14,6 +14,7 @@ */ #include <delay.h> #include <halt.h> +#include <soc/clkbuf.h> #include <soc/mt6359p.h> #include <soc/pmif.h> #include <soc/rtc_common.h> @@ -428,6 +429,7 @@ halt(); }
+#if 0 static void dcxo_init(void) { u16 tmp; @@ -459,13 +461,17 @@ rtc_write_field(PMIC_RG_DCXO_CW12, 0x2, 0x3, 0); }
+#endif + /* the rtc boot flow entry */ void rtc_boot(void) { u16 tmp;
+#if 0 /* dcxo clock init settings */ dcxo_init(); +#endif /* dcxo 32k init settings */ rtc_write_field(PMIC_RG_DCXO_CW02, 0xF, 0xF, 0); rtc_read(PMIC_RG_SCK_TOP_CON0, &tmp); diff --git a/src/soc/mediatek/mt8192/srclken_rc.c b/src/soc/mediatek/mt8192/srclken_rc.c new file mode 100644 index 0000000..31a0098 --- /dev/null +++ b/src/soc/mediatek/mt8192/srclken_rc.c @@ -0,0 +1,437 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <delay.h> +#include <device/mmio.h> +#include <soc/addressmap.h> +#include <soc/pmif.h> +#include <soc/srclken_rc.h> + +#define RCTAG "[SRCLKEN_RC]" +#define rc_info(fmt, arg ...) printk(BIOS_INFO, RCTAG "%s,%d: " fmt, \ + __func__, __LINE__, ## arg) + +/* RC settle time setting */ +/*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ +//#define BT_ONLY_HW_MODE ((1 << CHN_BT)) /* only BT use HW side-band signal */ +#define FULL_SET_HW_MODE 0 /* dcxo mode use pmrc_en */ +#define VCORE_SETTLE_TIME 1 /* ~= 30us */ +#define ULPOSC_SETTLE_TIME 4 /* ~= ? 150us */ +#define XO_SETTLE_TIME 0x1 /* 2^(step_sz+5) * 0x33 *30.77ns~=400us */ +#define DCXO_SETTLE_TIME 0x1 /* 2^(step_sz+5) * 0x87 *30.77ns~= 1063us */ +#define CENTROL_CNT_STEP 0x3 /* Fix in 3, central align with Mxx Channel */ +#define DCXO_STABLE_TIME 0x70 +#define XO_STABLE_TIME 0x70 +#define KEEP_RC_SPI_ACTIVE 1 +#define SRCLKEN_RC_EN_SEL 0 + +#define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ + | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ + | 1 << CHN_WIFI | 1 << CHN_MCU \ + | 1 << CHN_COANT | 1 << CHN_NFC | 1 << CHN_UFS \ + | 1 << CHN_SCP | 1 << CHN_RESERVE) + +#define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) + +#define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ + | 1 << CHN_GPS | 1 <<CHN_BT \ + | 1 << CHN_WIFI | 1 << CHN_MCU \ + | 1 << CHN_COANT | 1 << CHN_NFC ) + +/* RC central setting */ +#define RC_CENTRAL_ENABLE 1 +#define RC_CENTRAL_DISABLE 0 +#if MTK_SRCLKEN_RC_FULL_SET +#define SPI_TRIG_MODE SRCLKENAO_MODE /* use srlckenao to set vcore */ +#define IS_SPI_DONE_RELEASE 0 /* release vcore when spi request done */ +#define IS_SPI2PMIC_SET_CLR 0 /* register direct write */ +#define SRCLKENO_0_CTRL_M MERGE_OR_MODE /* merge with spm */ +#define VREQ_CTRL_M BYPASS_MODE /* merge with vreq */ +#define ULPOSC_CTRL_M BYPASS_MODE /* merge with ulposc */ +#define PWRAP_CTRL_M MERGE_OR_MODE /* merge with pwrap_scp */ +#endif +#define SPI_CLK_SRC RC_32K /* pmic spec under 200us */ + +/* other setting */ +#define PMRC_CON0 0x1A6 /* default use this reg direct write */ +#define PMRC_CON0_SET 0x1A8 +#define PMRC_CON0_CLR 0x1AA + +#define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ + +#define PWRAP_TMOUT_VAL 0xA /* 31us * 0xa ~= 310us */ + +#if MTK_SRCLKEN_RC_FULL_SET +#define FPM_MSK_B FULL_SET_HW_MODE +#define MD0_SRCLKENO_0_MASK_B 0 /* md0 control by pmrc */ + +#define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) +#define SUB_FPM_SET (1 << CHN_SUSPEND | 1 << CHN_RF \ + | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ + | 1 << CHN_WIFI | 1 << CHN_MCU \ + | 1 << CHN_NFC | 1 << CHN_UFS | 1 << CHN_SCP \ + | 1 << CHN_RESERVE) + +#define SW_BBLPM_HIGH 1 +#define SW_BBLPM_LOW 0 +#define SW_FPM_HIGH 1 +#define SW_FPM_LOW 0 +#define DXCO_SETTLE_BLK_EN 1 +#define DXCO_SETTLE_BLK_DIS 0 + +#define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ + _sw_rc, _bypass_cmd, _dcxo_settle_blk_en) { \ + .id = _id, \ + .dcxo_prd = _dcxo_prd, \ + .xo_prd = _xo_prd, \ + .cnt_step = CENTROL_CNT_STEP, \ + .track_en = 0x0, \ + .req_ack_imd_en = 0x1, \ + .xo_soc_link_en = 0x0, \ + .sw_bblpm = _sw_bblpm, \ + .sw_fpm = _sw_fpm, \ + .sw_rc = _sw_rc, \ + .bypass_cmd = _bypass_cmd, \ + .dcxo_settle_blk_en = _dcxo_settle_blk_en, \ + } + +static struct mtk_rc_regs *rc_regs = (struct mtk_rc_regs *)RC_BASE; +static struct mtk_rc_status_regs *rc_sta_regs = + (struct mtk_rc_status_regs *)RC_STATUS_BASE; + +static struct subsys_rc_con rc_ctrl[MAX_CHN_NUM] = { + SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), + SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), + SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), + SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), +}; +#endif + +static struct pmif *pmif_arb = NULL; +static s32 pmic_read(u32 addr, u32 *rdata) +{ + if (pmif_arb == NULL) + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + + return pmif_arb->read_cmd(pmif_arb, 0, addr, rdata); +} + +static void rc_dump_reg_info(void){ +#if SRCLKEN_DBG + unsigned int chn_n; + + rc_info("SRCLKEN_RC_CFG:0x%x\n", read32(&rc_regs->srclken_rc_cfg)); + rc_info("RC_CENTRAL_CFG1:0x%x\n", read32(&rc_regs->rc_central_cfg1)); + rc_info("RC_CENTRAL_CFG2:0x%x\n", read32(&rc_regs->rc_central_cfg2)); + rc_info("RC_CENTRAL_CFG3:0x%x\n", read32(&rc_regs->rc_central_cfg3)); + rc_info("RC_CENTRAL_CFG4:0x%x\n", read32(&rc_regs->rc_central_cfg4)); + rc_info("RC_DCXO_FPM_CFG:0x%x\n", read32(&rc_regs->rc_dcxo_fpm_cfg)); + rc_info("SUBSYS_INTF_CFG:0x%x\n", read32(&rc_regs->rc_subsys_intf_cfg)); + rc_info("RC_SPI_STA_0:0x%x\n", read32(&rc_sta_regs->rc_spi_sta_0)); + rc_info("RC_PI_PO_STA:0x%x\n", read32(&rc_sta_regs->rc_pi_po_sta_0)); + + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ + rc_info("M0%d: 0x%x\n", chn_n, + read32(&rc_regs->rc_mxx_srclken_cfg[chn_n])); + } +#endif +} + +/* RC initial flow and relative setting */ +static void __rc_ctrl_mode_switch(enum chn_id id, enum rc_ctrl_m mode) +{ +#ifdef MTK_SRCLKEN_RC_SUPPORT + + unsigned int value = 0; + + if(mode == INIT_MODE){ + value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | + ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | + ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | + ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | + ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | + ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | + ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | + ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | + ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | + ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | + ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; + }else if (mode == SW_MODE){ + value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); + }else if (mode == HW_MODE){ + value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); + }else + return; + + write32(&rc_regs->rc_mxx_srclken_cfg[id], value); + + rc_info("M0%d: 0x%x\n", id, read32(&rc_regs->rc_mxx_srclken_cfg[id])); +#endif +} + + +/* RC subsys FPM control*/ +static void __rc_ctrl_fpm_switch(enum chn_id id, unsigned int mode) +{ +#ifdef MTK_SRCLKEN_RC_SUPPORT + + unsigned int value = 0; + + if (mode == SW_FPM_HIGH){ + value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); + }else if (mode == SW_FPM_LOW){ + value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); + }else + return; + + rc_ctrl[id].sw_fpm = mode; + write32(&rc_regs->rc_mxx_srclken_cfg[id], value); + + rc_info("M0%d FPM SWITCH: 0x%x\n", id, read32(&rc_regs->rc_mxx_srclken_cfg[id])); +#endif +} + +static void __rc_ctrl_bblpm_switch(enum chn_id id, unsigned int mode) +{ +#ifdef MTK_SRCLKEN_RC_SUPPORT + + unsigned int value = 0; + + if (mode == SW_BBLPM_HIGH){ + value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); + }else if (mode == SW_BBLPM_LOW){ + value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); + }else + return; + + rc_ctrl[id].sw_bblpm = mode; + write32(&rc_regs->rc_mxx_srclken_cfg[id], value); + + rc_info("M0%d BBLPM SWITCH: 0x%x\n", id, read32(&rc_regs->rc_mxx_srclken_cfg[id])); +#endif +} + +static void rc_init_subsys_hw_mode(void){ +#ifdef MTK_SRCLKEN_RC_SUPPORT + unsigned int chn_n; + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ + if( INIT_SUBSYS_TO_HW & (1 << chn_n)) + __rc_ctrl_mode_switch(chn_n, HW_MODE); + } +#endif +} + +static void rc_init_subsys_lpm(void){ +#ifdef MTK_SRCLKEN_RC_SUPPORT + unsigned int chn_n; + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ + if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) + __rc_ctrl_fpm_switch(chn_n, SW_FPM_LOW); + } + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ + if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) + __rc_ctrl_bblpm_switch(chn_n, SW_BBLPM_HIGH); + } +#endif +} + +#if 0 +static void rc_ctrl_mode_switch_hw(enum chn_id id) +{ + __rc_ctrl_mode_switch(id, HW_MODE); +} + +static void rc_ctrl_mode_switch_sw(enum chn_id id) +{ + __rc_ctrl_mode_switch(id, SW_MODE); +} +#endif + +static void rc_ctrl_mode_switch_init(enum chn_id id) +{ + __rc_ctrl_mode_switch(id, INIT_MODE); +} + +static int srclken_rc_chk_init_cfg(void) +{ +#if MTK_SRCLKEN_RC_BRINGUP + rc_info("Bring-UP : skip srclken_rc init\n"); + + return SRLCKEN_RC_BRINGUP; +#else + pmwrap_interface_init(); + + /*enable debug trace*/ +#if SRCLKEN_DBG + write32(&rc_sta_regs->rc_debug_trace, 1); + write32(&rc_regs->rc_debug_cfg, + read32(&rc_regs->rc_debug_cfg) + | (TRACE_MODE_EN_MSK << TRACE_MODE_EN_SHFT)); +#endif +#ifdef MTK_SRCLKEN_RC_SUPPORT + return SRCLKEN_RC_ENABLE; +#else + return SRCLKEN_RC_DISABLE; +#endif +#endif +} + +int srclken_rc_init(void) +{ + /* new co-clock architecture srclkenrc implement here */ + unsigned int chn_n; + int ret = 0; + + /* check platform config to proceed init flow */ + if (srclken_rc_chk_init_cfg() != SRCLKEN_RC_ENABLE) + return ret; + + /* Set SW RESET 1 */ + write32(&rc_regs->srclken_rc_cfg, 1 << SW_RESET_SHFT); + + /* Wait 100us */ + udelay(100); + + /* Set SW CG 1 */ + write32(&rc_regs->srclken_rc_cfg, + (1 << SW_RESET_SHFT) | (1 << CG_32K_EN_SHFT) + | (1 << CG_FCLK_EN_SHFT) | (1 << CG_FCLK_FR_EN_SHFT)); + + /* Wait 100us */ + udelay(100); + + /* Set Clock Mux*/ + write32(&rc_regs->srclken_rc_cfg, + (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) + | (1 << CG_FCLK_EN_SHFT) | (1 << CG_FCLK_FR_EN_SHFT) + | (1 << MUX_FCLK_FR_SHFT)); + + /* Set req_filter m00~m12 as default SW_FPM */ + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) + rc_ctrl_mode_switch_init(chn_n); + + /* Set PMIC addr for SPI CMD */ + write32(&rc_regs->rc_pmic_rcen_addr, PMRC_CON0); + + write32(&rc_regs->rc_pmic_rcen_set_clr_addr, + (PMRC_CON0_CLR << 16 | PMRC_CON0_SET)); + + write32(&rc_regs->rc_cmd_arb_cfg, 0); + + /* CFG1 setting for spi cmd config */ + write32(&rc_regs->rc_central_cfg1, + DCXO_SETTLE_TIME << DCXO_SETTLE_T_SHFT | + XO_SETTLE_TIME << NON_DCXO_SETTLE_T_SHFT | + ULPOSC_SETTLE_TIME << ULPOSC_SETTLE_T_SHFT | + VCORE_SETTLE_TIME << VCORE_SETTLE_T_SHFT | + SRCLKEN_RC_EN_SEL << SRCLKEN_RC_EN_SEL_SHFT | + KEEP_RC_SPI_ACTIVE << RC_SPI_ACTIVE_SHFT | + IS_SPI2PMIC_SET_CLR << RCEN_ISSUE_M_SHFT | + RC_CENTRAL_DISABLE << SRCLKEN_RC_EN_SHFT); + + /* CFG2 setting for signal mode of each control mux */ + write32(&rc_regs->rc_central_cfg2, + SPI_CLK_SRC << PWRAP_SLP_MUX_SEL_SHFT | + PWRAP_CTRL_M << PWRAP_SLP_CTRL_M_SHFT | + ULPOSC_CTRL_M << ULPOSC_CTRL_M_SHFT | + IS_SPI_DONE_RELEASE << SRCVOLTEN_VREQ_M_SHFT | + SPI_TRIG_MODE << SRCVOLTEN_VREQ_SEL_SHFT | + VREQ_CTRL_M << VREQ_CTRL_SHFT | + SRCLKENO_0_CTRL_M << SRCVOLTEN_CTRL_SHFT); + + write32(&rc_regs->rc_central_cfg3, + 0x4 << TO_LPM_SETTLE_T_SHFT | + 1 << TO_BBLPM_SETTLE_EN_SHFT | + 1 << BLK_COANT_DXCO_MD_TARGET_SHFT | + 1 << BLK_SCP_DXCO_MD_TARGET_SHFT | + 1 << TO_LPM_SETTLE_EN_SHFT); + + /* Set srclkeno_0/conn_bt as factor to allow dcxo change to FPM */ + write32(&rc_regs->rc_dcxo_fpm_cfg, + FPM_MSK_B << SUB_SRCLKEN_FPM_MSK_B_SHFT | + MD0_SRCLKENO_0_MASK_B << SRCVOLTEN_FPM_MSK_B_SHFT | + DCXO_FPM_CTRL_MODE << DCXO_FPM_CTRL_M_SHFT); + + /* Set bblpm/fpm channel */ + write32(&rc_regs->rc_subsys_intf_cfg, + SUB_BBLPM_SET << SRCLKEN_BBLPM_MASK_B_SHFT| + SUB_FPM_SET << SRCLKEN_FPM_MASK_B_SHFT); + + /* Trigger srclken_rc enable */ + write32(&rc_regs->rc_central_cfg1, read32(&rc_regs->rc_central_cfg1) + | (RC_CENTRAL_ENABLE << SRCLKEN_RC_EN_SHFT)); + + write32(&rc_regs->rc_central_cfg4, + 0x1 << SLEEP_VLD_MODE_SHFT | + 0x1 << PWRAP_VLD_FORCE_SHFT | + 0x800 << KEEP_RC_SPI_ACTIVE_SHFT); + + + /* Wait 100us */ + udelay(100); + + /* Set SW RESET 0 */ + write32(&rc_regs->srclken_rc_cfg, + (1 << CG_32K_EN_SHFT) | (1 << CG_FCLK_EN_SHFT) + | (1 << CG_FCLK_FR_EN_SHFT) | (1 << MUX_FCLK_FR_SHFT)); + + /* Wait 100us */ + udelay(100); + + /* Set SW CG 0 */ + write32(&rc_regs->srclken_rc_cfg, 1 << MUX_FCLK_FR_SHFT); + + /* Wait 500us */ + udelay(500); + + /* Set req_filter m00~m12 FPM to LPM*/ + rc_init_subsys_lpm(); + + /* Polling ACK of Initial Subsys Input */ + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) { + unsigned int chk_sta, shift_chn_n = 0; + int i = 0; + u32 temp; + + if(chn_n > 0) + shift_chn_n = 1; + + chk_sta = (rc_ctrl[chn_n].sw_fpm & SW_SRCLKEN_FPM_MSK) << 1 + | (rc_ctrl[chn_n].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << 3; + ; /* Fix RC_MXX_REQ_STA_0 register shift */ + while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { + udelay(10); + i++; + if(i > 200) { + pmic_read(PMIC_PMRC_CON0, &temp); + rc_info("%s: polling M%d status fail.(R:0x%x)(C:0x%x)(PMRC:0x%x)\n", + __func__, chn_n, + read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), + read32(&rc_regs->rc_mxx_srclken_cfg[chn_n]), temp); + ret = -1; + break; + } + } + } + + /* Set req_filter m00~m12 */ + rc_init_subsys_hw_mode(); + + /* release force pmic req signal*/ + write32(&rc_regs->rc_central_cfg4, + 0x1 << SLEEP_VLD_MODE_SHFT | + 0x800 << KEEP_RC_SPI_ACTIVE_SHFT); + + rc_dump_reg_info(); + + return ret; +}
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 1:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/clk... PS1, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/inc... PS1, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/inc... PS1, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/pmi... PS1, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/1/src/soc/mediatek/mt8192/src... PS1, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 2:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/clk... PS2, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/inc... PS2, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/inc... PS2, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/pmi... PS2, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/2/src/soc/mediatek/mt8192/src... PS2, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 3:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/clk... PS3, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/inc... PS3, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/inc... PS3, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/pmi... PS3, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/3/src/soc/mediatek/mt8192/src... PS3, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 4:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/clk... PS4, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/inc... PS4, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/inc... PS4, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/pmi... PS4, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/4/src/soc/mediatek/mt8192/src... PS4, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
Yidi Lin has uploaded a new patch set (#5) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,380 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/5
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 5:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/clk... PS5, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/inc... PS5, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/inc... PS5, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/pmi... PS5, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/5/src/soc/mediatek/mt8192/src... PS5, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 6:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/clk... PS6, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/inc... PS6, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/inc... PS6, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/pmi... PS6, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/6/src/soc/mediatek/mt8192/src... PS6, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 7:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/clk... PS7, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/inc... PS7, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/inc... PS7, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/pmi... PS7, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/7/src/soc/mediatek/mt8192/src... PS7, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 8:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/clk... PS8, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/inc... PS8, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/inc... PS8, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 173: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 173: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 175: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 177: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 180: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 182: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 185: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 188: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 191: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 193: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 195: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 197: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 201: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 205: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 207: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 210: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 212: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 214: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 217: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 220: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 222: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 225: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 227: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 231: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 234: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 237: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 240: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 242: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 244: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 248: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 251: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 253: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 256: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 257: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 259: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 261: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/pmi... PS8, Line 276: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/8/src/soc/mediatek/mt8192/src... PS8, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
Yidi Lin has uploaded a new patch set (#9) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,381 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/9
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 9:
(146 comments)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 237: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 238: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA0, (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 239: | (PMIC_XO_EXTBUF2_EN_M_MASK << PMIC_XO_EXTBUF2_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 241: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR0, PMIC_RG_SRCLKEN_IN3_EN_ADDR | (PMIC_RG_SRCLKEN_IN3_EN_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 243: | (1 << PMIC_RG_SRCLKEN_IN3_EN_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 248: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_ADDR1, PMIC_DCXO_CW00_CLR_ADDR | (PMIC_DCXO_CW00_SET_ADDR << DCXO_CMD_ADDR0_1_SHFT)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 249: clkbuf_writel_ap(PMIFSPI_DCXO_CMD_WDATA1, (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/clk... PS9, Line 250: | (PMIC_XO_EXTBUF3_EN_M_MASK << PMIC_XO_EXTBUF3_EN_M_SHIFT) << DCXO_CMD_WDATA0_1_SHFT ); space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/inc... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/inc... PS9, Line 162: #define RC_32K_DCM_MSK 0x1 please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/inc... PS9, Line 341: CHN_MD= 3, spaces required around that '=' (ctx:VxW)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 198: if(PMIF_VLD_RDY == mode){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 198: if(PMIF_VLD_RDY == mode){ Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 198: if(PMIF_VLD_RDY == mode){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 200: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 202: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 205: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 207: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 210: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 213: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 216: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 218: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 220: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 222: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 226: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 230: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 232: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 235: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 237: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 239: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 242: } else if (PMIF_SLP_REQ == mode) { Comparisons should place the constant on the right side of the test
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 245: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 247: spi_sleep_ctrl = (spi_sleep_ctrl & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 250: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 252: spmi_sleep_ctrl = (spmi_sleep_ctrl & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 256: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 259: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 262: spi_mode_ctrl = (spi_mode_ctrl & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 265: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 267: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 269: spmi_mode_ctrl = (spmi_mode_ctrl & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 273: inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 276: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 278: other_inf_en = (other_inf_en & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 281: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 282: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 284: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 286: arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/pmi... PS9, Line 301: void pmwrap_interface_init(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 15: /*#define NO_DCXO_XO_CHN ((1 << CHN_COANT) | (1 << CHN_SCP) | (1 << CHN_RESERVE))*/ line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 28: #define INIT_SUBSYS_FPM_TO_LPM ( 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 29: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 34: #define INIT_SUBSYS_FPM_TO_BBLPM ( 1 << CHN_DEEPIDLE) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 36: #define INIT_SUBSYS_TO_HW ( 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_DEEPIDLE \ space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 37: | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 39: | 1 << CHN_COANT | 1 << CHN_NFC ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 60: #define DCXO_FPM_CTRL_MODE MERGE_OR_MODE | ASYNC_MODE /* merge with spm */ Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 68: #define SUB_BBLPM_SET ( 1 << CHN_COANT | 1 << CHN_DEEPIDLE ) space prohibited before that close parenthesis ')'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 70: | 1 << CHN_MD | 1 << CHN_GPS | 1 <<CHN_BT \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 82: #define SUB_CTRL_CON(_id, _dcxo_prd, _xo_prd , _sw_bblpm, _sw_fpm, \ space prohibited before that ',' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 93: .sw_rc = _sw_rc, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 94: .bypass_cmd = _bypass_cmd, \ please, no space before tabs
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 103: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 104: SUB_CTRL_CON(CHN_RF, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 105: SUB_CTRL_CON(CHN_DEEPIDLE, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 106: SUB_CTRL_CON(CHN_MD, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 107: SUB_CTRL_CON(CHN_GPS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 108: SUB_CTRL_CON(CHN_BT, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 109: SUB_CTRL_CON(CHN_WIFI, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 110: SUB_CTRL_CON(CHN_MCU, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 111: SUB_CTRL_CON(CHN_COANT, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 112: SUB_CTRL_CON(CHN_NFC, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 113: SUB_CTRL_CON(CHN_UFS, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x0 /*bypass*/,DXCO_SETTLE_BLK_EN), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 114: SUB_CTRL_CON(CHN_SCP, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 115: SUB_CTRL_CON(CHN_RESERVE, 0x0, 0x0, SW_BBLPM_LOW, SW_FPM_HIGH, SW_MODE, 0x1 /*bypass*/,DXCO_SETTLE_BLK_DIS), space required after that ',' (ctx:CxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 128: static void rc_dump_reg_info(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 142: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 156: if(mode == INIT_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 156: if(mode == INIT_MODE){ space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 157: value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) << DCXO_SETTLE_BLK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 158: ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 159: ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 160: ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 161: ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << SW_SRCLKEN_BBLPM_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 162: ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) << XO_SOC_LINK_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 163: ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) << REQ_ACK_LOW_IMD_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 164: ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) << SRCLKEN_TRACK_M_EN_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 165: ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 166: ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) | line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 167: ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 168: }else if (mode == SW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 168: }else if (mode == SW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 169: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_RC_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 170: }else if (mode == HW_MODE){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 170: }else if (mode == HW_MODE){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 171: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 172: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 189: if (mode == SW_FPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 189: if (mode == SW_FPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 190: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_FPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 191: }else if (mode == SW_FPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 191: }else if (mode == SW_FPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 192: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 193: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 209: if (mode == SW_BBLPM_HIGH){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 209: if (mode == SW_BBLPM_HIGH){ braces {} are not necessary for any arm of this statement
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 210: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | ( 0x1 << SW_SRCLKEN_BBLPM_SHFT); space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 211: }else if (mode == SW_BBLPM_LOW){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 211: }else if (mode == SW_BBLPM_LOW){ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 212: value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 213: }else space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 223: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 226: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 227: if( INIT_SUBSYS_TO_HW & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 233: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 236: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 237: if( INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 240: for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++){ space required before the open brace '{'
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space prohibited after that open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 241: if( INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 314: (1 << SW_RESET_SHFT) |(1 << CG_32K_EN_SHFT) need consistent spacing around '|' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 405: if(chn_n > 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { line over 96 characters
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 411: while((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) != chk_sta) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 414: if(i > 200) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46878/9/src/soc/mediatek/mt8192/src... PS9, Line 418: read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), line over 96 characters
Ran Bi has uploaded a new patch set (#10) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,198 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/10
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 10:
(6 comments)
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/pm... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/pm... PS10, Line 310: /*srclken dissable, dcxo0,1 enable*/ 'dissable' may be misspelled - perhaps 'disable'?
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/pm... PS10, Line 333: void pmwrap_interface_init(void) { open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/sr... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/sr... PS10, Line 121: static void rc_dump_reg_info(void) { open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/sr... PS10, Line 166: << DCXO_STABLE_PRD_SHFT) ; space prohibited before semicolon
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/sr... PS10, Line 226: static void rc_init_subsys_hw_mode(void){ open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/46878/10/src/soc/mediatek/mt8192/sr... PS10, Line 236: static void rc_init_subsys_lpm(void){ open brace '{' following function definitions go on the next line
Ran Bi has uploaded a new patch set (#11) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,202 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/11
Ran Bi has uploaded a new patch set (#14) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,199 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/14
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 14:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46878/14/src/soc/mediatek/mt8192/sr... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/14/src/soc/mediatek/mt8192/sr... PS14, Line 27: | 1 << CHN_GPS | 1 <<CHN_BT | 1 << CHN_WIFI \ need consistent spacing around '<<' (ctx:WxV)
https://review.coreboot.org/c/coreboot/+/46878/14/src/soc/mediatek/mt8192/sr... PS14, Line 57: | 1 << CHN_GPS | 1 <<CHN_BT | 1 << CHN_WIFI \ need consistent spacing around '<<' (ctx:WxV)
Ran Bi has uploaded a new patch set (#15) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,199 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/15
Yidi Lin has uploaded a new patch set (#17) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,199 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/17
Xi Chen has uploaded a new patch set (#22) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,202 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/22
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 22:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... PS22, Line 78: 0x%x %#x
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... PS22, Line 81: 0x%x %#x
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... PS22, Line 86: 0x%x %#x
Yidi Lin has uploaded a new patch set (#23) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,199 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/23
Yidi Lin has uploaded a new patch set (#28) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,199 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/28
Yidi Lin has uploaded a new patch set (#30) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,199 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/30
Yidi Lin has uploaded a new patch set (#35) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,198 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/35
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 39:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46878/39/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/rtc.h:
https://review.coreboot.org/c/coreboot/+/46878/39/src/soc/mediatek/mt8192/in... PS39, Line 151: #if 0 Is this ready for review?
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 39:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46878/39/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/rtc.h:
https://review.coreboot.org/c/coreboot/+/46878/39/src/soc/mediatek/mt8192/in... PS39, Line 151: #if 0
Is this ready for review?
I will move this patch to the tail of the chain and have few rounds of review with Ran Bi first.
Yidi Lin has uploaded a new patch set (#40) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,198 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/40
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 40:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46878/39/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/rtc.h:
https://review.coreboot.org/c/coreboot/+/46878/39/src/soc/mediatek/mt8192/in... PS39, Line 151: #if 0
I will move this patch to the tail of the chain and have few rounds of review with Ran Bi first.
Okay. Please notify me when this is ready.
Yidi Lin has uploaded a new patch set (#41) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,198 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/41
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 41:
(10 comments)
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 23: static void buf_read(u32 addr, u32 *rdata) can we reuse rtc_read/rtc_write ?
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 66: pmic_cw00 = buf_read_field(PMIC_RG_DCXO_CW00, 0xffff, 0); use PMIC_REG_MASK and PMIC_REG_SHIFT ?
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 77: buf_info("DCXO_CW00/09/12/13/15/19=0x%x %x %x %x %x %x\n", %#x
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 95: buf_write_field(PMIC_TOP_TMA_KEY, 0x9CA6, 0xFFFF, 0); please define this number
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 17: remove extra blank line
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 176: #define PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK 0x1 use tab for indent
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/rtc.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 151: #if 0 just remove
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... PS41, Line 12: #include <soc/srclken_rc.h> is this header necessary ?
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... File src/soc/mediatek/mt8192/rtc.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... PS41, Line 5: #include <soc/clkbuf.h> remove ?
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... PS41, Line 316: #if 0 just remove the code if dcox is not used.
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 41:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 176: #define PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK 0x1 : #define PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT 4 DEFINE_BIT
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 188: #define PMIFSPI_SPM_SLEEP_REQ_SEL_MSK 0x3 : #define PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT 0 DEFINE_BITFIELD
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... PS41, Line 183: unsigned int spi_sleep_ctrl, spmi_sleep_ctrl; : unsigned int spi_mode_ctrl, spmi_mode_ctrl; : unsigned int inf_en, other_inf_en, arb_en; : : spi_sleep_ctrl = read32(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl); : spmi_sleep_ctrl = read32(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl); : spi_mode_ctrl = read32(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl); : spmi_mode_ctrl = read32(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl); : inf_en = read32(&pmif_spi_arb[0].mtk_pmif->inf_en); : other_inf_en = read32(&pmif_spi_arb[0].mtk_pmif->other_inf_en); : arb_en = read32(&pmif_spi_arb[0].mtk_pmif->arb_en); : : if (mode == PMIF_VLD_RDY) { : /* spm and scp sleep request disable spi and spmi */ : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT); : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT); : : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT); : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT); : : /* pmic vld/rdy control spi mode enable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) : | (0x1 << PMIFSPI_MD_CTL_PMIF_RDY_SHFT); : /* srclken control spi mode disable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) : | (0x0 << PMIFSPI_MD_CTL_SRCLK_EN_SHFT); : /* vreq control spi mode disable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) : | (0x0 << PMIFSPI_MD_CTL_SRVOL_EN_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) : | (0x1 << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) : | (0x0 << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) : | (0x0 << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT); : : /* srclken rc interface enable*/ : inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) : | (0x1 << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT); : : /* dcxo interface disable */ : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) : | (0x0 << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT); : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) : | (0x0 << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT); : /*srclken enable, dcxo0,1 disable*/ : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) : | (0x1 << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK : << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) : | (0x0 << PMIFSPI_ARB_EN_DCXO_CONN_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK : << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) : | (0x0 << PMIFSPI_ARB_EN_DCXO_NFC_SHFT); : } else if (mode == PMIF_SLP_REQ) { : /* spm and scp sleep request enable spi and spmi */ : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT); : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT); : : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT); : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT); : : /* pmic vld/rdy control spi mode disable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) : | (0x0 << PMIFSPI_MD_CTL_PMIF_RDY_SHFT); : /* srclken control spi mode enable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) : | (0x1 << PMIFSPI_MD_CTL_SRCLK_EN_SHFT); : /* vreq control spi mode enable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) : | (0x1 << PMIFSPI_MD_CTL_SRVOL_EN_SHFT); : : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) : | (0x0 << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) : | (0x1 << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) : | (0x1 << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT); : : /* srclken rc interface disable*/ : inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) : | (0x0 << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT); : /* dcxo interface enable */ : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) : | (0x1 << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT); : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) : | (0x1 << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT); : : /*srclken disable, dcxo0,1 enable*/ : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) : | (0x0 << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK : << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) : | (0x1 << PMIFSPI_ARB_EN_DCXO_CONN_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK : << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) : | (0x1 << PMIFSPI_ARB_EN_DCXO_NFC_SHFT); : : } else : return; : : write32(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, spi_sleep_ctrl); : write32(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, spmi_sleep_ctrl); : write32(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, spi_mode_ctrl); : write32(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, spmi_mode_ctrl); : write32(&pmif_spi_arb[0].mtk_pmif->inf_en, inf_en); : write32(&pmif_spi_arb[0].mtk_pmif->other_inf_en, other_inf_en); : write32(&pmif_spi_arb[0].mtk_pmif->arb_en, arb_en); : } use DEFINE_BITFIELD, DEFINE_BIT and SET32_BITFIELDS
if (mode == PMIF_VLD_RDY) { spi_spm_sleep_req = 0x1; scp_spm_sleep_req = 0x1; ... } else if (mode == PMIF_SLP_REQ) { spi_spm_sleep_req = 0x0; scp_spm_sleep_req = 0x0; ... } else { return; }
SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, PMIFSPI_SPM_SLEEP_REQ_SEL, spi_spm_sleep_req, PMIFSPI_SCP_SLEEP_REQ_SEL, scp_spm_sleep_req); SET32_BITFIELDS(....);
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 41:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... PS41, Line 155: if (mode == INIT_MODE) { : value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) : << DCXO_SETTLE_BLK_EN_SHFT) : | ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) : | ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) : | ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) : | ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) : << SW_SRCLKEN_BBLPM_SHFT) : | ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) : << XO_SOC_LINK_EN_SHFT) : | ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) : << REQ_ACK_LOW_IMD_EN_SHFT) : | ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) : << SRCLKEN_TRACK_M_EN_SHFT) : | ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) : | ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) : | ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) : << DCXO_STABLE_PRD_SHFT); : } else if (mode == SW_MODE) { : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | (0x1 << SW_SRCLKEN_RC_SHFT); : } else if (mode == HW_MODE) { : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); : } else : return; : : write32(&rc_regs->rc_mxx_srclken_cfg[id], value); SET32_BITFIELDS
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... PS41, Line 194: if (mode == SW_FPM_HIGH) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | (0x1 << SW_SRCLKEN_FPM_SHFT); : else if (mode == SW_FPM_LOW) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); : else : return; : : rc_ctrl[id].sw_fpm = mode; : write32(&rc_regs->rc_mxx_srclken_cfg[id], value); SET32_BITFIELDS
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... PS41, Line 214: if (mode == SW_BBLPM_HIGH) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : | (0x1 << SW_SRCLKEN_BBLPM_SHFT); : else if (mode == SW_BBLPM_LOW) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); : else : return; : : rc_ctrl[id].sw_bblpm = mode; : write32(&rc_regs->rc_mxx_srclken_cfg[id], value); ditto
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 44:
src/soc/mediatek/mt8192/clkbuf.c has multiple final newlines. src/soc/mediatek/mt8192/include/soc/clkbuf.h has multiple final newlines.
hsin-hsiung wang has uploaded a new patch set (#45) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,198 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/45
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 45:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46878/45//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46878/45//COMMIT_MSG@9 PS45, Line 9: Add clkbuf and srclken_rc init for low power. Please add the name and revision of the used datasheet.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 45:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/cl... PS44, Line 175: remove these blank lines
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/in... PS44, Line 68: remove these blank lines
Yuchen Huang has uploaded a new patch set (#48) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,046 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/48
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 48:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46878/48/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
PS48: remove execution bit
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 48:
(20 comments)
https://review.coreboot.org/c/coreboot/+/46878/45//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46878/45//COMMIT_MSG@9 PS45, Line 9: Add clkbuf and srclken_rc init for low power.
Please add the name and revision of the used datasheet.
Done
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... PS22, Line 78: 0x%x
%#x
Done
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... PS22, Line 81: 0x%x
%#x
Done
https://review.coreboot.org/c/coreboot/+/46878/22/src/soc/mediatek/mt8192/cl... PS22, Line 86: 0x%x
%#x
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 23: static void buf_read(u32 addr, u32 *rdata)
can we reuse rtc_read/rtc_write ?
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 66: pmic_cw00 = buf_read_field(PMIC_RG_DCXO_CW00, 0xffff, 0);
use PMIC_REG_MASK and PMIC_REG_SHIFT ?
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 77: buf_info("DCXO_CW00/09/12/13/15/19=0x%x %x %x %x %x %x\n",
%#x
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/cl... PS41, Line 95: buf_write_field(PMIC_TOP_TMA_KEY, 0x9CA6, 0xFFFF, 0);
please define this number
Done
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/cl... PS44, Line 175:
remove these blank lines
Done
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/44/src/soc/mediatek/mt8192/in... PS44, Line 68:
remove these blank lines
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 17:
remove extra blank line
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 176: #define PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK 0x1
use tab for indent
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 176: #define PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK 0x1 : #define PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT 4
DEFINE_BIT
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 188: #define PMIFSPI_SPM_SLEEP_REQ_SEL_MSK 0x3 : #define PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT 0
DEFINE_BITFIELD
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/rtc.h:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/in... PS41, Line 151: #if 0
just remove
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... PS41, Line 183: unsigned int spi_sleep_ctrl, spmi_sleep_ctrl; : unsigned int spi_mode_ctrl, spmi_mode_ctrl; : unsigned int inf_en, other_inf_en, arb_en; : : spi_sleep_ctrl = read32(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl); : spmi_sleep_ctrl = read32(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl); : spi_mode_ctrl = read32(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl); : spmi_mode_ctrl = read32(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl); : inf_en = read32(&pmif_spi_arb[0].mtk_pmif->inf_en); : other_inf_en = read32(&pmif_spi_arb[0].mtk_pmif->other_inf_en); : arb_en = read32(&pmif_spi_arb[0].mtk_pmif->arb_en); : : if (mode == PMIF_VLD_RDY) { : /* spm and scp sleep request disable spi and spmi */ : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT); : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT); : : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT); : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x1 << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT); : : /* pmic vld/rdy control spi mode enable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) : | (0x1 << PMIFSPI_MD_CTL_PMIF_RDY_SHFT); : /* srclken control spi mode disable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) : | (0x0 << PMIFSPI_MD_CTL_SRCLK_EN_SHFT); : /* vreq control spi mode disable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) : | (0x0 << PMIFSPI_MD_CTL_SRVOL_EN_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) : | (0x1 << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) : | (0x0 << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) : | (0x0 << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT); : : /* srclken rc interface enable*/ : inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) : | (0x1 << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT); : : /* dcxo interface disable */ : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) : | (0x0 << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT); : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) : | (0x0 << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT); : /*srclken enable, dcxo0,1 disable*/ : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) : | (0x1 << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK : << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) : | (0x0 << PMIFSPI_ARB_EN_DCXO_CONN_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK : << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) : | (0x0 << PMIFSPI_ARB_EN_DCXO_NFC_SHFT); : } else if (mode == PMIF_SLP_REQ) { : /* spm and scp sleep request enable spi and spmi */ : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPI_SPM_SLEEP_REQ_SEL_SHFT); : spi_sleep_ctrl = (spi_sleep_ctrl : & ~(PMIFSPI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPI_SCP_SLEEP_REQ_SEL_SHFT); : : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SPM_SLEEP_REQ_SEL_MSK << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPMI_SPM_SLEEP_REQ_SEL_SHFT); : spmi_sleep_ctrl = (spmi_sleep_ctrl : & ~(PMIFSPMI_SCP_SLEEP_REQ_SEL_MSK << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT)) : | (0x0 << PMIFSPMI_SCP_SLEEP_REQ_SEL_SHFT); : : /* pmic vld/rdy control spi mode disable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_PMIF_RDY_MSK << PMIFSPI_MD_CTL_PMIF_RDY_SHFT)) : | (0x0 << PMIFSPI_MD_CTL_PMIF_RDY_SHFT); : /* srclken control spi mode enable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRCLK_EN_MSK << PMIFSPI_MD_CTL_SRCLK_EN_SHFT)) : | (0x1 << PMIFSPI_MD_CTL_SRCLK_EN_SHFT); : /* vreq control spi mode enable*/ : spi_mode_ctrl = (spi_mode_ctrl : & ~(PMIFSPI_MD_CTL_SRVOL_EN_MSK << PMIFSPI_MD_CTL_SRVOL_EN_SHFT)) : | (0x1 << PMIFSPI_MD_CTL_SRVOL_EN_SHFT); : : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_PMIF_RDY_MSK << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT)) : | (0x0 << PMIFSPMI_MD_CTL_PMIF_RDY_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRCLK_EN_MSK << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT)) : | (0x1 << PMIFSPMI_MD_CTL_SRCLK_EN_SHFT); : spmi_mode_ctrl = (spmi_mode_ctrl : & ~(PMIFSPMI_MD_CTL_SRVOL_EN_MSK << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT)) : | (0x1 << PMIFSPMI_MD_CTL_SRVOL_EN_SHFT); : : /* srclken rc interface disable*/ : inf_en = (inf_en & ~(PMIFSPI_INF_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT)) : | (0x0 << PMIFSPI_INF_EN_SRCLKEN_RC_HW_SHFT); : /* dcxo interface enable */ : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO0_EN_MSK << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT)) : | (0x1 << PMIFSPI_OTHER_INF_DXCO0_EN_SHFT); : other_inf_en = (other_inf_en : & ~(PMIFSPI_OTHER_INF_DXCO1_EN_MSK << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT)) : | (0x1 << PMIFSPI_OTHER_INF_DXCO1_EN_SHFT); : : /*srclken disable, dcxo0,1 enable*/ : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_SRCLKEN_RC_HW_MSK : << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT)) : | (0x0 << PMIFSPI_ARB_EN_SRCLKEN_RC_HW_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_CONN_MSK : << PMIFSPI_ARB_EN_DCXO_CONN_SHFT)) : | (0x1 << PMIFSPI_ARB_EN_DCXO_CONN_SHFT); : arb_en = (arb_en & ~(PMIFSPI_ARB_EN_DCXO_NFC_MSK : << PMIFSPI_ARB_EN_DCXO_NFC_SHFT)) : | (0x1 << PMIFSPI_ARB_EN_DCXO_NFC_SHFT); : : } else : return; : : write32(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, spi_sleep_ctrl); : write32(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, spmi_sleep_ctrl); : write32(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, spi_mode_ctrl); : write32(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, spmi_mode_ctrl); : write32(&pmif_spi_arb[0].mtk_pmif->inf_en, inf_en); : write32(&pmif_spi_arb[0].mtk_pmif->other_inf_en, other_inf_en); : write32(&pmif_spi_arb[0].mtk_pmif->arb_en, arb_en); : }
use DEFINE_BITFIELD, DEFINE_BIT and SET32_BITFIELDS […]
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... File src/soc/mediatek/mt8192/rtc.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... PS41, Line 316: #if 0
just remove the code if dcox is not used.
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... PS41, Line 155: if (mode == INIT_MODE) { : value = ((rc_ctrl[id].dcxo_settle_blk_en & DCXO_SETTLE_BLK_EN_MSK) : << DCXO_SETTLE_BLK_EN_SHFT) : | ((rc_ctrl[id].bypass_cmd & BYPASS_CMD_EN_MSK) << BYPASS_CMD_EN_SHFT) : | ((rc_ctrl[id].sw_rc & SW_SRCLKEN_RC_MSK) << SW_SRCLKEN_RC_SHFT) : | ((rc_ctrl[id].sw_fpm & SW_SRCLKEN_FPM_MSK) << SW_SRCLKEN_FPM_SHFT) : | ((rc_ctrl[id].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) : << SW_SRCLKEN_BBLPM_SHFT) : | ((rc_ctrl[id].xo_soc_link_en & XO_SOC_LINK_EN_MSK) : << XO_SOC_LINK_EN_SHFT) : | ((rc_ctrl[id].req_ack_imd_en & REQ_ACK_LOW_IMD_EN_MSK) : << REQ_ACK_LOW_IMD_EN_SHFT) : | ((rc_ctrl[id].track_en & SRCLKEN_TRACK_M_EN_MSK) : << SRCLKEN_TRACK_M_EN_SHFT) : | ((rc_ctrl[id].cnt_step & CNT_PRD_STEP_MSK) << CNT_PRD_STEP_SHFT) : | ((rc_ctrl[id].xo_prd & XO_STABLE_PRD_MSK) << XO_STABLE_PRD_SHFT) : | ((rc_ctrl[id].dcxo_prd & DCXO_STABLE_PRD_MSK) : << DCXO_STABLE_PRD_SHFT); : } else if (mode == SW_MODE) { : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | (0x1 << SW_SRCLKEN_RC_SHFT); : } else if (mode == HW_MODE) { : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : & ~(SW_SRCLKEN_RC_MSK << SW_SRCLKEN_RC_SHFT); : } else : return; : : write32(&rc_regs->rc_mxx_srclken_cfg[id], value);
SET32_BITFIELDS
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... PS41, Line 194: if (mode == SW_FPM_HIGH) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) | (0x1 << SW_SRCLKEN_FPM_SHFT); : else if (mode == SW_FPM_LOW) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : & ~(SW_SRCLKEN_FPM_MSK << SW_SRCLKEN_FPM_SHFT); : else : return; : : rc_ctrl[id].sw_fpm = mode; : write32(&rc_regs->rc_mxx_srclken_cfg[id], value);
SET32_BITFIELDS
Done
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/sr... PS41, Line 214: if (mode == SW_BBLPM_HIGH) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : | (0x1 << SW_SRCLKEN_BBLPM_SHFT); : else if (mode == SW_BBLPM_LOW) : value = read32(&rc_regs->rc_mxx_srclken_cfg[id]) : & ~(SW_SRCLKEN_BBLPM_MSK << SW_SRCLKEN_BBLPM_SHFT); : else : return; : : rc_ctrl[id].sw_bblpm = mode; : write32(&rc_regs->rc_mxx_srclken_cfg[id], value);
ditto
Done
Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 48:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/pm... PS41, Line 12: #include <soc/srclken_rc.h>
is this header necessary ?
MTK_SRCLKEN_RC_SUPPORT macro come from “soc/srclken_rc.h”. So we need to include this header.
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... File src/soc/mediatek/mt8192/rtc.c:
https://review.coreboot.org/c/coreboot/+/46878/41/src/soc/mediatek/mt8192/rt... PS41, Line 5: #include <soc/clkbuf.h>
remove ?
RTC need to operate some clockbuffer register like PMIC_RG_DCXO_CW02. So we need to include this header.
Yuchen Huang has uploaded a new patch set (#49) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,046 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/49
Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 49:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46878/48/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
PS48:
remove execution bit
Done
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 49:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... PS49, Line 1: /* SPDX-License-Identifier: GPL-2.0-only */ : #ifndef SOC_MEDIATEK_MT8192_CLKBUF_H insert one blank line after license header
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... PS49, Line 1: /* SPDX-License-Identifier: GPL-2.0-only */ : #ifndef SOC_MEDIATEK_MT8192_SRCLKEN_RC_H insert one blank line after license header
Yuchen Huang has uploaded a new patch set (#50) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,048 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/50
Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 50:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... PS49, Line 1: /* SPDX-License-Identifier: GPL-2.0-only */ : #ifndef SOC_MEDIATEK_MT8192_CLKBUF_H
insert one blank line after license header
Done
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/49/src/soc/mediatek/mt8192/in... PS49, Line 1: /* SPDX-License-Identifier: GPL-2.0-only */ : #ifndef SOC_MEDIATEK_MT8192_SRCLKEN_RC_H
insert one blank line after license header
Done
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 50:
Hung-Te & Yu-Ping,
Please review this patch.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 50:
(9 comments)
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 52: #define PMIC_RG_VRFCK_HV_EN_MASK 0x1 : #define PMIC_RG_VRFCK_HV_EN_SHIFT 9 : #define PMIC_RG_LDO_VRFCK_EN_MASK 0x1 : #define PMIC_RG_LDO_VRFCK_EN_SHIFT 0 : #define PMIC_RG_LDO_VRFCK_ANA_SEL_MASK 0x1 : #define PMIC_RG_LDO_VRFCK_ANA_SEL_SHIFT 0 : #define PMIC_RG_LDO_VBBCK_EN_MASK 0x1 : #define PMIC_RG_LDO_VBBCK_EN_SHIFT 0 : #define PMIC_RG_VRFCK_NDIS_EN_MASK 0x1 : #define PMIC_RG_VRFCK_NDIS_EN_SHIFT 11 : #define PMIC_RG_VRFCK_1_NDIS_EN_MASK 0x1 : #define PMIC_RG_VRFCK_1_NDIS_EN_SHIFT 0 : #define PMIC_RG_LDO_VRFCK_HW14_OP_EN_MASK 0x1 : #define PMIC_RG_LDO_VRFCK_HW14_OP_EN_SHIFT 14 : #define PMIC_RG_LDO_VBBCK_HW14_OP_EN_MASK 0x1 : #define PMIC_RG_LDO_VBBCK_HW14_OP_EN_SHIFT 14 Can we use DEFINE_BITFIELD to replace BIT and SHIFT?
Or at least change these to enum.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 6: (0) replace this by enum?
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 7: #if !MTK_SRCLKEN_RC_BRINGUP : #define MTK_SRCLKEN_RC_SUPPORT : #endif I'd prefer a Kconfig for this (and only do the logic in *.c files, not having any #if/define in header files), for example CONFIG_MTK_SRCLKEN_RC_BRINGUP or _DEBUG or _PRODUCTION etc.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 10: (1) replace by enum
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 59: #define SW_RESET_MSK 0x1 : #define SW_RESET_SHFT 0 : #define CG_32K_EN_MSK 0x1 : #define CG_32K_EN_SHFT 1 : #define CG_FCLK_EN_MSK 0x1 : #define CG_FCLK_EN_SHFT 2 : #define CG_FCLK_FR_EN_MSK 0x1 : #define CG_FCLK_FR_EN_SHFT 3 : #define MUX_FCLK_FR_MSK 0x1 : #define MUX_FCLK_FR_SHFT 4 : DEFINE_BIT(SW_RESET, 0) : : /* RC_CENTRAL_CFG1 */ : #define SRCLKEN_RC_EN_MSK 0x1 : #define SRCLKEN_RC_EN_SHFT 0 : #define RCEN_ISSUE_M_MSK 0x1 : #define RCEN_ISSUE_M_SHFT 1 : #define RC_SPI_ACTIVE_MSK 0x1 : #define RC_SPI_ACTIVE_SHFT 2 : #define SRCLKEN_RC_EN_SEL_MSK 0x1 : #define SRCLKEN_RC_EN_SEL_SHFT 3 : #define VCORE_SETTLE_T_MSK 0x7 : #define VCORE_SETTLE_T_SHFT 5 : #define ULPOSC_SETTLE_T_MSK 0xf : #define ULPOSC_SETTLE_T_SHFT 8 : #define NON_DCXO_SETTLE_T_MSK 0x3ff : #define NON_DCXO_SETTLE_T_SHFT 12 : #define DCXO_SETTLE_T_MSK 0x3ff : #define DCXO_SETTLE_T_SHFT 22 : DEFINE_BIT(SRCLKEN_RC_EN, 0) : : /* RC_CENTRAL_CFG2 */ : #define SRCVOLTEN_CTRL_MSK 0xf : #define SRCVOLTEN_CTRL_SHFT 0 : #define VREQ_CTRL_MSK 0xf : #define VREQ_CTRL_SHFT 4 : #define SRCVOLTEN_VREQ_SEL_MSK 0x1 : #define SRCVOLTEN_VREQ_SEL_SHFT 8 : #define SRCVOLTEN_VREQ_M_MSK 0x1 : #define SRCVOLTEN_VREQ_M_SHFT 9 : #define ULPOSC_CTRL_M_MSK 0xf : #define ULPOSC_CTRL_M_SHFT 12 : #define PWRAP_SLP_CTRL_M_MSK 0xf : #define PWRAP_SLP_CTRL_M_SHFT 21 : #define PWRAP_SLP_MUX_SEL_MSK 0x1 : #define PWRAP_SLP_MUX_SEL_SHFT 25 : : /* RC_DCXO_FPM_CFG */ : #define DCXO_FPM_CTRL_M_MSK 0xf : #define DCXO_FPM_CTRL_M_SHFT 0 : #define SRCVOLTEN_FPM_MSK_B_MSK 0x1 : #define SRCVOLTEN_FPM_MSK_B_SHFT 4 : #define SUB_SRCLKEN_FPM_MSK_B_MSK 0x1fff : #define SUB_SRCLKEN_FPM_MSK_B_SHFT 16 : : /* RC_CENTRAL_CFG3 */ : #define TO_LPM_SETTLE_EN_MSK 0x1 : #define TO_LPM_SETTLE_EN_SHFT 0 : #define BLK_SCP_DXCO_MD_TARGET_MSK 0x1 : #define BLK_SCP_DXCO_MD_TARGET_SHFT 1 : #define BLK_COANT_DXCO_MD_TARGET_MSK 0x1 : #define BLK_COANT_DXCO_MD_TARGET_SHFT 2 : #define TO_BBLPM_SETTLE_EN_MSK 0x1 : #define TO_BBLPM_SETTLE_EN_SHFT 0x3 : #define TO_LPM_SETTLE_T_MSK 0x2ff : #define TO_LPM_SETTLE_T_SHFT 12 : : /* RC_CENTRAL_CFG4 */ : #define KEEP_RC_SPI_ACTIVE_MSK 0x1ff : #define KEEP_RC_SPI_ACTIVE_SHFT 0 : #define PWRAP_VLD_FORCE_MAK 0x1 : #define PWRAP_VLD_FORCE_SHFT 16 : #define SLEEP_VLD_MODE_MAK 0x1 : #define SLEEP_VLD_MODE_SHFT 17 : : /* RC_MXX_SRCLKEN_CFG */ : #define SW_SRCLKEN_FPM_MSK 0x1 : #define SW_SRCLKEN_FPM_SHFT 4 : #define SW_SRCLKEN_BBLPM_MSK 0x1 : #define SW_SRCLKEN_BBLPM_SHFT 5 : can we use DEFINE_BIT and DEFINE_BITFIELD for all?
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/pm... File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/pm... PS50, Line 183: if (mode == PMIF_VLD_RDY) { : /* spm and scp sleep request disable spi and spmi */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPI_SPM_SLEEP_REQ_SEL, 1, : PMIFSPI_SCP_SLEEP_REQ_SEL, 1); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPMI_SPM_SLEEP_REQ_SEL, 1, : PMIFSPMI_SCP_SLEEP_REQ_SEL, 1); : : /* pmic vld/rdy control spi mode enable : * srclken control spi mode disable : * vreq control spi mode disable : */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPI_MD_CTL_PMIF_RDY, 1, : PMIFSPI_MD_CTL_SRCLK_EN, 0, : PMIFSPI_MD_CTL_SRVOL_EN, 0); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPMI_MD_CTL_PMIF_RDY, 1, : PMIFSPMI_MD_CTL_SRCLK_EN, 0, : PMIFSPMI_MD_CTL_SRVOL_EN, 0); : : /* srclken rc interface enable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->inf_en, : PMIFSPI_INF_EN_SRCLKEN_RC_HW, 1); : : /* dcxo interface disable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->other_inf_en, : PMIFSPI_OTHER_INF_DXCO0_EN, 0, : PMIFSPI_OTHER_INF_DXCO1_EN, 0); : : /* srclken enable, dcxo0,1 disable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->arb_en, : PMIFSPI_ARB_EN_SRCLKEN_RC_HW, 1, : PMIFSPI_ARB_EN_DCXO_CONN, 0, : PMIFSPI_ARB_EN_DCXO_NFC, 0); : } else if (mode == PMIF_SLP_REQ) { : /* spm and scp sleep request enable spi and spmi */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPI_SPM_SLEEP_REQ_SEL, 0, : PMIFSPI_SCP_SLEEP_REQ_SEL, 0); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPMI_SPM_SLEEP_REQ_SEL, 0, : PMIFSPMI_SCP_SLEEP_REQ_SEL, 0); : : /* pmic vld/rdy control spi mode disable : * srclken control spi mode enable : * vreq control spi mode enable : */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPI_MD_CTL_PMIF_RDY, 0, : PMIFSPI_MD_CTL_SRCLK_EN, 1, : PMIFSPI_MD_CTL_SRVOL_EN, 1); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPMI_MD_CTL_PMIF_RDY, 0, : PMIFSPMI_MD_CTL_SRCLK_EN, 1, : PMIFSPMI_MD_CTL_SRVOL_EN, 1); : : /* srclken rc interface disable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->inf_en, : PMIFSPI_INF_EN_SRCLKEN_RC_HW, 0); : : /* dcxo interface enable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->other_inf_en, : PMIFSPI_OTHER_INF_DXCO0_EN, 1, : PMIFSPI_OTHER_INF_DXCO1_EN, 1); : : /* srclken disable, dcxo0,1 enable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->arb_en, : PMIFSPI_ARB_EN_SRCLKEN_RC_HW, 0, : PMIFSPI_ARB_EN_DCXO_CONN, 1, : PMIFSPI_ARB_EN_DCXO_NFC, 1); : } else : return; We should try to minimize duplication, e.g,
int sleep_request, pmic_rdy, rc_rw,....;
switch (mode) { case PMIF_VLD_RDY: sleep_request = 1; pmic_rdy = 1; ... break; case ... break; default: return; }
SET32_BITFIELDS(pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, PMIFSPI_SPM_SLEEP_REQ_SEL, sleep_request, PMIFSPI_SCP_SLEEP_REQ_SEL, sleep_request);
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/pm... PS50, Line 261: #ifdef MTK_SRCLKEN_RC_SUPPORT : printk(BIOS_ERR, "[%s] PMIF_VLD_RDY\n", __func__); : pmif_select(PMIF_VLD_RDY); : #else : printk(BIOS_ERR, "[%s] PMIF_SLP_REQ\n", __func__); : pmif_select(PMIF_SLP_REQ); : #endif if (CONFIG(....))
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/sr... File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/sr... PS50, Line 14: /* RC settle time setting */ : #define FULL_SET_HW_MODE 0 /* dcxo mode use pmrc_en */ : #define VCORE_SETTLE_TIME 1 /* ~= 30us */ : #define ULPOSC_SETTLE_TIME 4 /* ~= ? 150us */ : #define XO_SETTLE_TIME 0x1 /* 2^(step_sz+5) * 0x33 *30.77ns~=400us */ : #define DCXO_SETTLE_TIME 0x1 /* 2^(step_sz+5) * 0x87 *30.77ns~= 1063us */ : #define CENTROL_CNT_STEP 0x3 /* Fix in 3, central align with Mxx Channel */ : #define DCXO_STABLE_TIME 0x70 : #define XO_STABLE_TIME 0x70 : #define KEEP_RC_SPI_ACTIVE 1 : #define SRCLKEN_RC_EN_SEL 0 enum is better than #define
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/sr... PS50, Line 26: #define INIT_SUBSYS_FPM_TO_LPM (1 << CHN_RF | 1 << CHN_DEEPIDLE | 1 << CHN_MD \ : | 1 << CHN_GPS | 1 << CHN_BT | 1 << CHN_WIFI \ : | 1 << CHN_MCU | 1 << CHN_COANT | 1 << CHN_NFC \ : | 1 << CHN_UFS | 1 << CHN_SCP | 1 << CHN_RESERVE) : : #define INIT_SUBSYS_FPM_TO_BBLPM (1 << CHN_DEEPIDLE) : : #define INIT_SUBSYS_TO_HW (1 << CHN_SUSPEND | 1 << CHN_DEEPIDLE | 1 << CHN_MCU) try enum
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 50:
(8 comments)
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/cl... File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/cl... PS50, Line 21: = NULL No need for this.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/cl... PS50, Line 43: ( No parentheses.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/cl... PS50, Line 60: u32 pmic_cw00 = 0, pmic_cw09 = 0, pmic_cw12 = 0, pmic_cw13 = 0, : pmic_cw15 = 0, pmic_cw19 = 0, top_spi_con1 = 0, : ldo_vrfck_op_en = 0, ldo_vbbck_op_en = 0, ldo_vrfck_en = 0, : ldo_vbbck_en = 0; : u32 vrfck_hv_en = 0; No need for initialization.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/cl... PS50, Line 138: #ifndef MTK_SRCLKEN_RC_SUPPORT Is this always defined for mt8192? If we really need an if-else statement, I'd prefer using Kconfig.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 200: start external External
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 155: SRCLKEN_FPM_MASK_B_MSK This is not used anywhere.
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/in... PS50, Line 230: RC_SUBSYS_SET Where's the usage?
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/rt... File src/soc/mediatek/mt8192/rtc.c:
https://review.coreboot.org/c/coreboot/+/46878/50/src/soc/mediatek/mt8192/rt... PS50, Line 339: mt6359_dcxo_disable_unused Also remove it from rtc.h.
Yidi Lin has uploaded a new patch set (#54) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 11 files changed, 1,048 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/54
Attention is currently required from: Yidi Lin. Yuchen Huang has uploaded a new patch set (#56) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 993 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/56
Attention is currently required from: Yidi Lin, Yuchen Huang. build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 56:
(6 comments)
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/038c4cd5_9f98183f PS56, Line 183: spi_md_ctl_pmif_rdy, spi_md_ctl_srclk_en,spi_md_ctl_srvol_en, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/46878/comment/99b9a766_7c1ef974 PS56, Line 184: spmi_md_ctl_pmif_rdy, spmi_md_ctl_srclk_en,spmi_md_ctl_srvol_en, space required after that ',' (ctx:VxV)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/c0eea3bd_402c4dc4 PS56, Line 28: INIT_SUBSYS_FPM_TO_LPM = (1 << CHN_RF | 1 << CHN_DEEPIDLE | 1 << CHN_MD \ Avoid unnecessary line continuations
https://review.coreboot.org/c/coreboot/+/46878/comment/88037777_83204ce3 PS56, Line 60: SUB_FPM_SET = (1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_MD \ Avoid unnecessary line continuations
https://review.coreboot.org/c/coreboot/+/46878/comment/27e5b624_61be978f PS56, Line 249: } else { else is not generally useful after a break or return
https://review.coreboot.org/c/coreboot/+/46878/comment/308ec8ce_280dab9b PS56, Line 356: _BF_VALUE(CG_FCLK_FR_EN, 1) | _BF_VALUE(MUX_FCLK_FR,1)); space required after that ',' (ctx:VxV)
Attention is currently required from: Roger Lu, Yidi Lin, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#57) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 991 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/57
Attention is currently required from: Yidi Lin, Yuchen Huang. build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 57:
(3 comments)
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/f07fda83_21394fd2 PS57, Line 183: spi_md_ctl_pmif_rdy, spi_md_ctl_srclk_en,spi_md_ctl_srvol_en, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/46878/comment/a4a90ab7_8f2e9f86 PS57, Line 184: spmi_md_ctl_pmif_rdy, spmi_md_ctl_srclk_en,spmi_md_ctl_srvol_en, space required after that ',' (ctx:VxV)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/56ec1a78_80050248 PS57, Line 354: _BF_VALUE(CG_FCLK_FR_EN, 1) | _BF_VALUE(MUX_FCLK_FR,1)); space required after that ',' (ctx:VxV)
Attention is currently required from: Yidi Lin, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#58) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 991 insertions(+), 45 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/58
Attention is currently required from: Hung-Te Lin, Roger Lu, Yu-Ping Wu, Yidi Lin, Yuchen Huang. Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 58:
(13 comments)
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/df53dd23_a336a880 PS50, Line 21: = NULL
No need for this.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/6691389b_13d973e1 PS50, Line 43: (
No parentheses.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/00460a2d_55d6c482 PS50, Line 60: u32 pmic_cw00 = 0, pmic_cw09 = 0, pmic_cw12 = 0, pmic_cw13 = 0, : pmic_cw15 = 0, pmic_cw19 = 0, top_spi_con1 = 0, : ldo_vrfck_op_en = 0, ldo_vbbck_op_en = 0, ldo_vrfck_en = 0, : ldo_vbbck_en = 0; : u32 vrfck_hv_en = 0;
No need for initialization.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/fbcfca5c_519fb79d PS50, Line 138: #ifndef MTK_SRCLKEN_RC_SUPPORT
Is this always defined for mt8192? If we really need an if-else statement, I'd prefer using Kconfig.
Done
File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/4e7c12cd_49752293 PS50, Line 52: #define PMIC_RG_VRFCK_HV_EN_MASK 0x1 : #define PMIC_RG_VRFCK_HV_EN_SHIFT 9 : #define PMIC_RG_LDO_VRFCK_EN_MASK 0x1 : #define PMIC_RG_LDO_VRFCK_EN_SHIFT 0 : #define PMIC_RG_LDO_VRFCK_ANA_SEL_MASK 0x1 : #define PMIC_RG_LDO_VRFCK_ANA_SEL_SHIFT 0 : #define PMIC_RG_LDO_VBBCK_EN_MASK 0x1 : #define PMIC_RG_LDO_VBBCK_EN_SHIFT 0 : #define PMIC_RG_VRFCK_NDIS_EN_MASK 0x1 : #define PMIC_RG_VRFCK_NDIS_EN_SHIFT 11 : #define PMIC_RG_VRFCK_1_NDIS_EN_MASK 0x1 : #define PMIC_RG_VRFCK_1_NDIS_EN_SHIFT 0 : #define PMIC_RG_LDO_VRFCK_HW14_OP_EN_MASK 0x1 : #define PMIC_RG_LDO_VRFCK_HW14_OP_EN_SHIFT 14 : #define PMIC_RG_LDO_VBBCK_HW14_OP_EN_MASK 0x1 : #define PMIC_RG_LDO_VBBCK_HW14_OP_EN_SHIFT 14
Can we use DEFINE_BITFIELD to replace BIT and SHIFT? […]
Done
File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/b895ee73_600cf313 PS50, Line 200: start external
External
Done
File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/b6eb1d1a_3be20668 PS50, Line 59: #define SW_RESET_MSK 0x1 : #define SW_RESET_SHFT 0 : #define CG_32K_EN_MSK 0x1 : #define CG_32K_EN_SHFT 1 : #define CG_FCLK_EN_MSK 0x1 : #define CG_FCLK_EN_SHFT 2 : #define CG_FCLK_FR_EN_MSK 0x1 : #define CG_FCLK_FR_EN_SHFT 3 : #define MUX_FCLK_FR_MSK 0x1 : #define MUX_FCLK_FR_SHFT 4 : DEFINE_BIT(SW_RESET, 0) : : /* RC_CENTRAL_CFG1 */ : #define SRCLKEN_RC_EN_MSK 0x1 : #define SRCLKEN_RC_EN_SHFT 0 : #define RCEN_ISSUE_M_MSK 0x1 : #define RCEN_ISSUE_M_SHFT 1 : #define RC_SPI_ACTIVE_MSK 0x1 : #define RC_SPI_ACTIVE_SHFT 2 : #define SRCLKEN_RC_EN_SEL_MSK 0x1 : #define SRCLKEN_RC_EN_SEL_SHFT 3 : #define VCORE_SETTLE_T_MSK 0x7 : #define VCORE_SETTLE_T_SHFT 5 : #define ULPOSC_SETTLE_T_MSK 0xf : #define ULPOSC_SETTLE_T_SHFT 8 : #define NON_DCXO_SETTLE_T_MSK 0x3ff : #define NON_DCXO_SETTLE_T_SHFT 12 : #define DCXO_SETTLE_T_MSK 0x3ff : #define DCXO_SETTLE_T_SHFT 22 : DEFINE_BIT(SRCLKEN_RC_EN, 0) : : /* RC_CENTRAL_CFG2 */ : #define SRCVOLTEN_CTRL_MSK 0xf : #define SRCVOLTEN_CTRL_SHFT 0 : #define VREQ_CTRL_MSK 0xf : #define VREQ_CTRL_SHFT 4 : #define SRCVOLTEN_VREQ_SEL_MSK 0x1 : #define SRCVOLTEN_VREQ_SEL_SHFT 8 : #define SRCVOLTEN_VREQ_M_MSK 0x1 : #define SRCVOLTEN_VREQ_M_SHFT 9 : #define ULPOSC_CTRL_M_MSK 0xf : #define ULPOSC_CTRL_M_SHFT 12 : #define PWRAP_SLP_CTRL_M_MSK 0xf : #define PWRAP_SLP_CTRL_M_SHFT 21 : #define PWRAP_SLP_MUX_SEL_MSK 0x1 : #define PWRAP_SLP_MUX_SEL_SHFT 25 : : /* RC_DCXO_FPM_CFG */ : #define DCXO_FPM_CTRL_M_MSK 0xf : #define DCXO_FPM_CTRL_M_SHFT 0 : #define SRCVOLTEN_FPM_MSK_B_MSK 0x1 : #define SRCVOLTEN_FPM_MSK_B_SHFT 4 : #define SUB_SRCLKEN_FPM_MSK_B_MSK 0x1fff : #define SUB_SRCLKEN_FPM_MSK_B_SHFT 16 : : /* RC_CENTRAL_CFG3 */ : #define TO_LPM_SETTLE_EN_MSK 0x1 : #define TO_LPM_SETTLE_EN_SHFT 0 : #define BLK_SCP_DXCO_MD_TARGET_MSK 0x1 : #define BLK_SCP_DXCO_MD_TARGET_SHFT 1 : #define BLK_COANT_DXCO_MD_TARGET_MSK 0x1 : #define BLK_COANT_DXCO_MD_TARGET_SHFT 2 : #define TO_BBLPM_SETTLE_EN_MSK 0x1 : #define TO_BBLPM_SETTLE_EN_SHFT 0x3 : #define TO_LPM_SETTLE_T_MSK 0x2ff : #define TO_LPM_SETTLE_T_SHFT 12 : : /* RC_CENTRAL_CFG4 */ : #define KEEP_RC_SPI_ACTIVE_MSK 0x1ff : #define KEEP_RC_SPI_ACTIVE_SHFT 0 : #define PWRAP_VLD_FORCE_MAK 0x1 : #define PWRAP_VLD_FORCE_SHFT 16 : #define SLEEP_VLD_MODE_MAK 0x1 : #define SLEEP_VLD_MODE_SHFT 17 : : /* RC_MXX_SRCLKEN_CFG */ : #define SW_SRCLKEN_FPM_MSK 0x1 : #define SW_SRCLKEN_FPM_SHFT 4 : #define SW_SRCLKEN_BBLPM_MSK 0x1 : #define SW_SRCLKEN_BBLPM_SHFT 5 :
can we use DEFINE_BIT and DEFINE_BITFIELD for all?
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/5e37c6de_ac667353 PS50, Line 155: SRCLKEN_FPM_MASK_B_MSK
This is not used anywhere.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/a4d2aa46_849d44ad PS50, Line 230: RC_SUBSYS_SET
Where's the usage?
Removed.
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/7de8bfdc_106b8bf2 PS50, Line 183: if (mode == PMIF_VLD_RDY) { : /* spm and scp sleep request disable spi and spmi */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPI_SPM_SLEEP_REQ_SEL, 1, : PMIFSPI_SCP_SLEEP_REQ_SEL, 1); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPMI_SPM_SLEEP_REQ_SEL, 1, : PMIFSPMI_SCP_SLEEP_REQ_SEL, 1); : : /* pmic vld/rdy control spi mode enable : * srclken control spi mode disable : * vreq control spi mode disable : */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPI_MD_CTL_PMIF_RDY, 1, : PMIFSPI_MD_CTL_SRCLK_EN, 0, : PMIFSPI_MD_CTL_SRVOL_EN, 0); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPMI_MD_CTL_PMIF_RDY, 1, : PMIFSPMI_MD_CTL_SRCLK_EN, 0, : PMIFSPMI_MD_CTL_SRVOL_EN, 0); : : /* srclken rc interface enable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->inf_en, : PMIFSPI_INF_EN_SRCLKEN_RC_HW, 1); : : /* dcxo interface disable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->other_inf_en, : PMIFSPI_OTHER_INF_DXCO0_EN, 0, : PMIFSPI_OTHER_INF_DXCO1_EN, 0); : : /* srclken enable, dcxo0,1 disable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->arb_en, : PMIFSPI_ARB_EN_SRCLKEN_RC_HW, 1, : PMIFSPI_ARB_EN_DCXO_CONN, 0, : PMIFSPI_ARB_EN_DCXO_NFC, 0); : } else if (mode == PMIF_SLP_REQ) { : /* spm and scp sleep request enable spi and spmi */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPI_SPM_SLEEP_REQ_SEL, 0, : PMIFSPI_SCP_SLEEP_REQ_SEL, 0); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, : PMIFSPMI_SPM_SLEEP_REQ_SEL, 0, : PMIFSPMI_SCP_SLEEP_REQ_SEL, 0); : : /* pmic vld/rdy control spi mode disable : * srclken control spi mode enable : * vreq control spi mode enable : */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPI_MD_CTL_PMIF_RDY, 0, : PMIFSPI_MD_CTL_SRCLK_EN, 1, : PMIFSPI_MD_CTL_SRVOL_EN, 1); : SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, : PMIFSPMI_MD_CTL_PMIF_RDY, 0, : PMIFSPMI_MD_CTL_SRCLK_EN, 1, : PMIFSPMI_MD_CTL_SRVOL_EN, 1); : : /* srclken rc interface disable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->inf_en, : PMIFSPI_INF_EN_SRCLKEN_RC_HW, 0); : : /* dcxo interface enable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->other_inf_en, : PMIFSPI_OTHER_INF_DXCO0_EN, 1, : PMIFSPI_OTHER_INF_DXCO1_EN, 1); : : /* srclken disable, dcxo0,1 enable */ : SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->arb_en, : PMIFSPI_ARB_EN_SRCLKEN_RC_HW, 0, : PMIFSPI_ARB_EN_DCXO_CONN, 1, : PMIFSPI_ARB_EN_DCXO_NFC, 1); : } else : return;
We should try to minimize duplication, e.g, […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/49178efb_de1e7e08 PS50, Line 261: #ifdef MTK_SRCLKEN_RC_SUPPORT : printk(BIOS_ERR, "[%s] PMIF_VLD_RDY\n", __func__); : pmif_select(PMIF_VLD_RDY); : #else : printk(BIOS_ERR, "[%s] PMIF_SLP_REQ\n", __func__); : pmif_select(PMIF_SLP_REQ); : #endif
if (CONFIG(.... […]
Done
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/47ccc5b1_04d94ae1 PS50, Line 14: /* RC settle time setting */ : #define FULL_SET_HW_MODE 0 /* dcxo mode use pmrc_en */ : #define VCORE_SETTLE_TIME 1 /* ~= 30us */ : #define ULPOSC_SETTLE_TIME 4 /* ~= ? 150us */ : #define XO_SETTLE_TIME 0x1 /* 2^(step_sz+5) * 0x33 *30.77ns~=400us */ : #define DCXO_SETTLE_TIME 0x1 /* 2^(step_sz+5) * 0x87 *30.77ns~= 1063us */ : #define CENTROL_CNT_STEP 0x3 /* Fix in 3, central align with Mxx Channel */ : #define DCXO_STABLE_TIME 0x70 : #define XO_STABLE_TIME 0x70 : #define KEEP_RC_SPI_ACTIVE 1 : #define SRCLKEN_RC_EN_SEL 0
enum is better than #define
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/1cfd03cb_4bac5041 PS50, Line 26: #define INIT_SUBSYS_FPM_TO_LPM (1 << CHN_RF | 1 << CHN_DEEPIDLE | 1 << CHN_MD \ : | 1 << CHN_GPS | 1 << CHN_BT | 1 << CHN_WIFI \ : | 1 << CHN_MCU | 1 << CHN_COANT | 1 << CHN_NFC \ : | 1 << CHN_UFS | 1 << CHN_SCP | 1 << CHN_RESERVE) : : #define INIT_SUBSYS_FPM_TO_BBLPM (1 << CHN_DEEPIDLE) : : #define INIT_SUBSYS_TO_HW (1 << CHN_SUSPEND | 1 << CHN_DEEPIDLE | 1 << CHN_MCU)
try enum
Done
Attention is currently required from: Hung-Te Lin, Roger Lu, Yu-Ping Wu, Yuchen Huang. Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 58:
(3 comments)
File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/d4b0f5f2_0e1bedee PS50, Line 6: (0)
replace this by enum?
removed
https://review.coreboot.org/c/coreboot/+/46878/comment/e714a763_1231fdfc PS50, Line 7: #if !MTK_SRCLKEN_RC_BRINGUP : #define MTK_SRCLKEN_RC_SUPPORT : #endif
I'd prefer a Kconfig for this (and only do the logic in *. […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/f9d199a8_c2a1e5a3 PS50, Line 10: (1)
replace by enum
Done
Attention is currently required from: Hung-Te Lin, Roger Lu, Yu-Ping Wu, Yuchen Huang. Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 58:
(1 comment)
File src/soc/mediatek/mt8192/rtc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/6087b8a7_b67b9926 PS50, Line 339: mt6359_dcxo_disable_unused
Also remove it from rtc.h.
Done
Attention is currently required from: Hung-Te Lin, Roger Lu, Yu-Ping Wu, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#59) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 991 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/59
Attention is currently required from: Roger Lu, Yu-Ping Wu, Yuchen Huang. Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 59:
(6 comments)
Patchset:
PS59: Thanks for refactoring, much easier to read now. Just a few nits!
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/34e1f3cf_5c28d857 PS59, Line 15: #define PMIC_REG_MASK 0xFFFF : #define PMIC_REG_SHIFT 0 not used any more?
https://review.coreboot.org/c/coreboot/+/46878/comment/a6d033de_a20c8a6a PS59, Line 121: / one blank line before this comment
File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/80fb740a_1b1e267f PS59, Line 7: #define _BUF_BF_MASK(name) \ : (_BF_MASK(name, 0) >> name##_BITFIELD_SHIFT) : #define BUF_READ_FIELDS(addr, name) \ : (buf_read_field(addr, _BUF_BF_MASK(name), name##_BITFIELD_SHIFT)) : #define BUF_WRITE_FIELDS(addr, value, name) \ : (buf_write_field(addr, value, _BUF_BF_MASK(name), name##_BITFIELD_SHIFT)) : 1. I think we'll only use these APIs in clkbuf.c? It's probably better to move it there since it'll be pretty 'local'.
2. I think it's easier to read if we do BUF_WRITE_FIELDS(addr, name, value) instead of (addr, value, name).
3. The 'read' can return only one value so it should be named READ_FIELD.
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/72971bd3_0ac9f0a8 PS59, Line 218: break one blank line after break
https://review.coreboot.org/c/coreboot/+/46878/comment/73499f8c_498d0a5b PS59, Line 248: break one blank line after break
Attention is currently required from: Roger Lu, Yu-Ping Wu, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#60) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 992 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/60
Attention is currently required from: Hung-Te Lin, Roger Lu, Yu-Ping Wu, Yuchen Huang. Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 60:
(5 comments)
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/f086fe1b_f7eef683 PS59, Line 15: #define PMIC_REG_MASK 0xFFFF : #define PMIC_REG_SHIFT 0
not used any more?
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/b505d402_7fb33f0b PS59, Line 121: /
one blank line before this comment
Done
File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/7a93bb76_5ad7853a PS59, Line 7: #define _BUF_BF_MASK(name) \ : (_BF_MASK(name, 0) >> name##_BITFIELD_SHIFT) : #define BUF_READ_FIELDS(addr, name) \ : (buf_read_field(addr, _BUF_BF_MASK(name), name##_BITFIELD_SHIFT)) : #define BUF_WRITE_FIELDS(addr, value, name) \ : (buf_write_field(addr, value, _BUF_BF_MASK(name), name##_BITFIELD_SHIFT)) :
- I think we'll only use these APIs in clkbuf. […]
Done
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/06597d06_fd6e8792 PS59, Line 218: break
one blank line after break
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/1748b632_f8dcca9e PS59, Line 248: break
one blank line after break
Done
Attention is currently required from: Roger Lu, Yu-Ping Wu, Yuchen Huang. Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 60:
(6 comments)
Patchset:
PS60: final nits, probably no code changes.
File src/soc/mediatek/mt8192/Kconfig:
https://review.coreboot.org/c/coreboot/+/46878/comment/9cfbcef7_7bf59026 PS60, Line 89: srclken_rc can you also add what does that stand for? for example
srclken_rc (sxxxr clock enable re...? )
I can't tell what does srclken_rc mean.
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/f940d510_635dd067 PS60, Line 98: /* 1.0 XO_WCN/XO_RF switch from VS1 to LDO VRFCK_1 */ : /* unlock pmic key */ do we still have some 1.0 switching from vs1 to ldo vrfck_1, or the new 1.0 is just unlock pmic key?
https://review.coreboot.org/c/coreboot/+/46878/comment/14f853cb_daf6af88 PS60, Line 105: S be consistent on upper case or lower case - we can do either
/* 1.2.0 set ...
or
/* 1.2.0 Set ....
But that should be consistent (e.g., you currently have "1.1 s" and "1.2.0 S")
https://review.coreboot.org/c/coreboot/+/46878/comment/ba139f6b_5d0b438b PS60, Line 140: /* : * XO_SOC_VOTE=11'h005 : */ remove this since the code is now very clear.
https://review.coreboot.org/c/coreboot/+/46878/comment/32d0636e_f6aff854 PS60, Line 152: /* : * XO_PMIC_TOP_DIG_SW=0 : */ remove this since the code is now very clear.
Attention is currently required from: Roger Lu, Yuchen Huang. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 60:
(33 comments)
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/069b1447_0e32a819 PS60, Line 16: _BF_MASK I wonder if we should publicize _BF_MASK and _BF_VALUE (by removing the leading underscore). @hungte, what do you think?
https://review.coreboot.org/c/coreboot/+/46878/comment/00dd6a12_a4d3d221 PS60, Line 18: ( No need for parentheses. Same for BUF_WRITE_FIELD.
https://review.coreboot.org/c/coreboot/+/46878/comment/e7d8ff79_818c2ca5 PS60, Line 19: FIELDS Just "FIELD" since there's only one field.
https://review.coreboot.org/c/coreboot/+/46878/comment/715b7165_3bdba029 PS60, Line 62: clk_buf_dump_clkbuf_log Just "dump_clkbuf_log"? No need to have "clk_buf" prefix since it's a static function.
https://review.coreboot.org/c/coreboot/+/46878/comment/42aa99cc_b7017dd8 PS60, Line 139: 1.update "1. Update". Same for 2.
File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/bf1768ae_10f203d9 PS60, Line 32: 0x1D1C Let's align the values using tabs.
File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/52e1b106_5991f642 PS60, Line 174: PMIF_MAX Not used.
File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/cda8df52_977df0ca PS60, Line 123: SRCLKEN_DBG Please move to srclken_rc.c and change to macro.
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/0a9086c4_31d6bc6e PS60, Line 182: int unsigned int
https://review.coreboot.org/c/coreboot/+/46878/comment/b306e70f_efa7daad PS60, Line 196: /* pmic vld/rdy control spi mode enable : * srclken control spi mode disable : * vreq control spi mode disable : */ format:
/* * pmic vld/rdy control spi mode enable * srclken control spi mode disable * vreq control spi mode disable */
Same below.
https://review.coreboot.org/c/coreboot/+/46878/comment/777dff7f_a126ff1d PS60, Line 251: default This indicates an error. Can we call die()?
https://review.coreboot.org/c/coreboot/+/46878/comment/1593e74b_b65b37fd PS60, Line 283: [%s] PMIF_VLD_RDY How about
%s: Select PMIF_VLD_RDY
https://review.coreboot.org/c/coreboot/+/46878/comment/7c4b98be_afddc1da PS60, Line 283: ERR INFO or DEBUG?
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/702d51ad_0b1383c5 PS60, Line 17: ? What does that mean?
https://review.coreboot.org/c/coreboot/+/46878/comment/c733e228_123cef93 PS60, Line 19: Extra space
https://review.coreboot.org/c/coreboot/+/46878/comment/d91d8253_796a8cbc PS60, Line 77: id This field is not used.
https://review.coreboot.org/c/coreboot/+/46878/comment/adeeef1b_315711a1 PS60, Line 96: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW, Write
[CHN_SUSPEND] = SUB_CTRL_CON(...).
https://review.coreboot.org/c/coreboot/+/46878/comment/429d444f_298fd6ea PS60, Line 98: SW_BBLPM_LOW, : SW_FPM_HIGH, SW_MODE These are the same for all elements in this array. Could we fix the values in the macro definition of SUB_CTRL_CON?
https://review.coreboot.org/c/coreboot/+/46878/comment/ca274836_5610b83f PS60, Line 124: static struct pmif *pmif_arb; Move inside pmic_read().
https://review.coreboot.org/c/coreboot/+/46878/comment/90aed587_24425912 PS60, Line 149: 0%d Do you mean "%02d"?
https://review.coreboot.org/c/coreboot/+/46878/comment/cb589c98_9b6262f8 PS60, Line 158: if Use switch, and die() for other invalid mode.
https://review.coreboot.org/c/coreboot/+/46878/comment/9a1eb0f1_82c746b2 PS60, Line 180: 0%d Same
https://review.coreboot.org/c/coreboot/+/46878/comment/4192e92d_5f4d6574 PS60, Line 189: else if (mode == SW_FPM_LOW) How about just "else"? Or even simply write
SET32_BITFIELDS(..., !!mode);
https://review.coreboot.org/c/coreboot/+/46878/comment/14967e18_3e5bbe10 PS60, Line 203: else if (mode == SW_BBLPM_LOW) Same.
https://review.coreboot.org/c/coreboot/+/46878/comment/206db3bf_7597d1b7 PS60, Line 242: int Give the enum SRCLKEN_RC_{ENABLE,DISABLE} a name and use it. It's fine to move the definition here.
https://review.coreboot.org/c/coreboot/+/46878/comment/72a675bb_df85a12a PS60, Line 250: /*enable debug trace*/ /* enable debug trace */
https://review.coreboot.org/c/coreboot/+/46878/comment/5a6d3ee2_7388a960 PS60, Line 259: n N
Same for all comments below.
https://review.coreboot.org/c/coreboot/+/46878/comment/897bff72_65594dab PS60, Line 295: Remove extra tab
https://review.coreboot.org/c/coreboot/+/46878/comment/5d32831f_a977479f PS60, Line 384: if Move the if clause out of the while loop.
int retry = 200; while ((read32(...) & 0xa) != chk_sta && retry-- > 0) udelay(10); if (retry == 0) { ... }
https://review.coreboot.org/c/coreboot/+/46878/comment/102de2aa_487c2679 PS60, Line 386: %d fail %02d failed
https://review.coreboot.org/c/coreboot/+/46878/comment/31345493_9c00d482 PS60, Line 387: __func__ __func__ is already contained in rc_info.
https://review.coreboot.org/c/coreboot/+/46878/comment/9bd45853_e79a98bb PS60, Line 400: r R
https://review.coreboot.org/c/coreboot/+/46878/comment/3f814289_1a63c21f PS60, Line 400: * Missing space
Attention is currently required from: Roger Lu, Yu-Ping Wu, Yuchen Huang. Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 60:
(1 comment)
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/0f580d3c_a1c5ad85 PS60, Line 16: _BF_MASK
I wonder if we should publicize _BF_MASK and _BF_VALUE (by removing the leading underscore). […]
I was expecting some easier way.
Ideally the bitfields API can be generalized by _BF_IMPL, which should be more generic than publishing BF_MASK and BF_VALUE.
What about changing _BF_IMPL to DEFINE_BITFIELD_API?
Then we can do
#define BUF_SET_FIELDS(addr, ...) \ DEFINE_BITFIELD_API(buf_clrset32, addr, __VA_ARGS__)
And of course, the buf_write_field must be re-designed to buf_clrset32
Attention is currently required from: Hung-Te Lin, Joel Kitching, Roger Lu, Yuchen Huang. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 60:
(1 comment)
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/9eb1692e_a9dd5994 PS60, Line 16: _BF_MASK
I was expecting some easier way. […]
Sounds good to me.
Attention is currently required from: Hung-Te Lin, Joel Kitching, Yidi Lin, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#63) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 957 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/63
Attention is currently required from: Hung-Te Lin, Joel Kitching, Yidi Lin, Yuchen Huang. build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 63:
(1 comment)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/db55e05a_b317b0a8 PS63, Line 103: [CHN_DEEPIDLE] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), line over 96 characters
Attention is currently required from: Hung-Te Lin, Joel Kitching, Roger Lu, Yu-Ping Wu, Yidi Lin, Yuchen Huang. Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 63:
(35 comments)
File src/soc/mediatek/mt8192/Kconfig:
https://review.coreboot.org/c/coreboot/+/46878/comment/370eda4e_0dd60128 PS60, Line 89: srclken_rc
can you also add what does that stand for? for example […]
Done
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/bff45baa_bf890758 PS60, Line 16: _BF_MASK
Sounds good to me.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/2feccab1_b3afb983 PS60, Line 18: (
No need for parentheses. Same for BUF_WRITE_FIELD.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/2ddfa810_cae69c56 PS60, Line 19: FIELDS
Just "FIELD" since there's only one field.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/67a1fff4_0fc3cc44 PS60, Line 62: clk_buf_dump_clkbuf_log
Just "dump_clkbuf_log"? No need to have "clk_buf" prefix since it's a static function.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/55aaaeb0_93ce1394 PS60, Line 98: /* 1.0 XO_WCN/XO_RF switch from VS1 to LDO VRFCK_1 */ : /* unlock pmic key */
do we still have some 1.0 switching from vs1 to ldo vrfck_1, or the new 1. […]
"1.0 XO_WCN/XO_RF switch from VS1 to LDO VRFCK_1" this is for XO_WCN/XO_RF setting, which we don't have. Just remove it.
https://review.coreboot.org/c/coreboot/+/46878/comment/9e851f14_56efdbf8 PS60, Line 105: S
be consistent on upper case or lower case - we can do either […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/90cca20d_057c22d7 PS60, Line 139: 1.update
"1. Update". Same for 2.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/39a10797_b45105c0 PS60, Line 140: /* : * XO_SOC_VOTE=11'h005 : */
remove this since the code is now very clear.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/3bfe6aec_6be592bc PS60, Line 152: /* : * XO_PMIC_TOP_DIG_SW=0 : */
remove this since the code is now very clear.
Done
File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/7d1ab472_f6713c58 PS60, Line 32: 0x1D1C
Let's align the values using tabs.
Done
File src/soc/mediatek/mt8192/include/soc/pmif.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/def3880d_e1da4130 PS60, Line 174: PMIF_MAX
Not used.
Done
File src/soc/mediatek/mt8192/include/soc/srclken_rc.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/45c5b7fc_4d333148 PS60, Line 123: SRCLKEN_DBG
Please move to srclken_rc.c and change to macro.
Done
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/924cb3fe_28b13df6 PS60, Line 182: int
unsigned int
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/d29367fa_2a2709ef PS60, Line 196: /* pmic vld/rdy control spi mode enable : * srclken control spi mode disable : * vreq control spi mode disable : */
format: […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/a432936f_2241a0a7 PS60, Line 251: default
This indicates an error. […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/9f567488_db0cb3b0 PS60, Line 283: [%s] PMIF_VLD_RDY
How about […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/d9e5de2b_5a7b077e PS60, Line 283: ERR
INFO or DEBUG?
INFO
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/33a52ac8_b6b38a8d PS60, Line 17: ?
What does that mean?
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/fb023adc_96b0fd74 PS60, Line 19:
Extra space
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/7caf25e1_600fda1a PS60, Line 77: id
This field is not used.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/be56c6a8_186f3400 PS60, Line 96: SUB_CTRL_CON(CHN_SUSPEND, DCXO_STABLE_TIME, XO_STABLE_TIME, SW_BBLPM_LOW,
Write […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/b9af8e87_95834f36 PS60, Line 98: SW_BBLPM_LOW, : SW_FPM_HIGH, SW_MODE
These are the same for all elements in this array. […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/715f1a63_152cf12a PS60, Line 124: static struct pmif *pmif_arb;
Move inside pmic_read().
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/4b242426_79814224 PS60, Line 149: 0%d
Do you mean "%02d"?
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/f81e693c_7c9e7a57 PS60, Line 158: if
Use switch, and die() for other invalid mode.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/97b0aa03_eb2131cf PS60, Line 180: 0%d
Same
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/ee7dd25c_b8efe994 PS60, Line 242: int
Give the enum SRCLKEN_RC_{ENABLE,DISABLE} a name and use it. It's fine to move the definition here.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/ed0b5399_94ed93f3 PS60, Line 250: /*enable debug trace*/
/* enable debug trace */
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/ec865df8_ce025556 PS60, Line 259: n
N […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/26c32a79_973f15c9 PS60, Line 295:
Remove extra tab
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/c8a9d93a_27233c48 PS60, Line 384: if
Move the if clause out of the while loop. […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/843b10bb_3ae3385b PS60, Line 386: %d fail
%02d failed
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/19b61719_41236366 PS60, Line 387: __func__
__func__ is already contained in rc_info.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/2593542a_c3534e27 PS60, Line 400: r
R
Done
Attention is currently required from: Hung-Te Lin, Joel Kitching, Roger Lu, Yu-Ping Wu, Yidi Lin, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#64) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 948 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/64
Attention is currently required from: Hung-Te Lin, Joel Kitching, Roger Lu, Yu-Ping Wu, Yidi Lin, Yuchen Huang. Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 64:
(4 comments)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/f72fa565_399ee3b8 PS60, Line 17: ?
Done
fix typo.
https://review.coreboot.org/c/coreboot/+/46878/comment/ed663bfd_28f86d79 PS60, Line 189: else if (mode == SW_FPM_LOW)
How about just "else"? Or even simply write […]
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/213e266e_42b15482 PS60, Line 203: else if (mode == SW_BBLPM_LOW)
Same.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/54febf45_1d3fed00 PS60, Line 400: *
Missing space
Done
Attention is currently required from: Joel Kitching, Roger Lu, Yu-Ping Wu, Yidi Lin, Yuchen Huang. Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 64: Code-Review+2
Attention is currently required from: Joel Kitching, Roger Lu, Yidi Lin, Yuchen Huang. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 64:
(5 comments)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/38269ca5_24119184 PS64, Line 13: ( No need for parentheses.
https://review.coreboot.org/c/coreboot/+/46878/comment/da89d3be_88442eef PS64, Line 104: 0x0 Align with DCXO_STABLE_TIME
https://review.coreboot.org/c/coreboot/+/46878/comment/0c22dd1a_9242afd0 PS64, Line 278: ) Move ")" right after 16.
https://review.coreboot.org/c/coreboot/+/46878/comment/4a2ebb67_88dac447 PS64, Line 354: 0 No initialization.
https://review.coreboot.org/c/coreboot/+/46878/comment/d8f5e866_f6d10e78 PS64, Line 365: retry-- Sorry I was wrong. This should be "--retry", so that after the last failure, 'retry' will be 0.
Attention is currently required from: Joel Kitching, Roger Lu, Yidi Lin, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#65) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 948 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/65
Attention is currently required from: Joel Kitching, Roger Lu, Yu-Ping Wu, Yidi Lin, Yuchen Huang. Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 65:
(5 comments)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/79687b61_3f8ece23 PS64, Line 13: (
No need for parentheses.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/0aa17614_1b3257f9 PS64, Line 104: 0x0
Align with DCXO_STABLE_TIME
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/b0faae88_5d4a3f03 PS64, Line 278: )
Move ")" right after 16.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/a1cfe4ad_9339db75 PS64, Line 354: 0
No initialization.
Done
https://review.coreboot.org/c/coreboot/+/46878/comment/d8b96284_f730b967 PS64, Line 365: retry--
Sorry I was wrong. This should be "--retry", so that after the last failure, 'retry' will be 0.
I suppose it's correct to use "retry--". For example, if retry=1, we will have 10us delay at least.
Attention is currently required from: Joel Kitching, Roger Lu, Ran Bi, Yidi Lin, Yuchen Huang. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 65:
(2 comments)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/3cec8886_6067b07b PS64, Line 365: retry--
I suppose it's correct to use "retry--". For example, if retry=1, we will have 10us delay at least.
If retry is 1, then read32() will be called at most twice. After it fails for the second time, the value of 'retry' will be -1 (NOT 0). Therefore, another way to fix it is to change line #367 to
if (retry < 0)
Otherwise, we'll not enter the if clause.
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/b28fb28c_c46a1d4d PS65, Line 374: break Remove it, since the if clause has been moved out of the while loop.
Attention is currently required from: Joel Kitching, Roger Lu, Ran Bi, Yu-Ping Wu, Yuchen Huang. Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 65:
(2 comments)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/d91790de_c531fcee PS64, Line 365: retry--
If retry is 1, then read32() will be called at most twice. […]
maybe we can use stopwatch API to make it more clear ?
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/5d7efa03_d57db0bd PS65, Line 374: break
Remove it, since the if clause has been moved out of the while loop.
@Ran, do we need to poll remaining channels if current channel is timed out ?
Attention is currently required from: Joel Kitching, Roger Lu, Ran Bi, Yu-Ping Wu, Yuchen Huang. Yuchen Huang has uploaded a new patch set (#66) to the change originally created by Roger Lu. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 947 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/46878/66
Attention is currently required from: Joel Kitching, Roger Lu, Yidi Lin, Yu-Ping Wu, Yuchen Huang. Ran Bi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 66:
(2 comments)
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/3ffe8539_e1f780a4 PS64, Line 365: retry--
maybe we can use stopwatch API to make it more clear ?
Done
File src/soc/mediatek/mt8192/srclken_rc.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/822cd42d_1a8ea845 PS65, Line 374: break
@Ran, do we need to poll remaining channels if current channel is timed out ?
Removed
Attention is currently required from: Joel Kitching, Roger Lu, Yidi Lin, Yuchen Huang. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 66: Code-Review+2
Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver
Add clkbuf and srclken_rc init for low power.
Reference datasheet: Document No: RH-D-2018-0205.
TEST=boot asurada
Signed-off-by: Ran Bi ran.bi@mediatek.com Change-Id: I947bf14df7a307bf359c590c2a20265882b3f1be Reviewed-on: https://review.coreboot.org/c/coreboot/+/46878 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/soc/mediatek/mt8192/Kconfig M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/clkbuf.c M src/soc/mediatek/mt8192/include/soc/addressmap.h A src/soc/mediatek/mt8192/include/soc/clkbuf.h M src/soc/mediatek/mt8192/include/soc/pmif.h M src/soc/mediatek/mt8192/include/soc/rtc.h A src/soc/mediatek/mt8192/include/soc/srclken_rc.h M src/soc/mediatek/mt8192/pmif.c M src/soc/mediatek/mt8192/rtc.c A src/soc/mediatek/mt8192/srclken_rc.c 12 files changed, 947 insertions(+), 46 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8192/Kconfig b/src/soc/mediatek/mt8192/Kconfig index fd0a4cd..e2d7eea 100644 --- a/src/soc/mediatek/mt8192/Kconfig +++ b/src/soc/mediatek/mt8192/Kconfig @@ -82,4 +82,11 @@ When this option is enabled, the flash controller provides the ability to dual read mode.
+config SRCLKEN_RC_SUPPORT + bool + default y + help + This option enables clock buffer remote controller module + to control PMIC 26MHz clock output. + endif diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index ce94a46..ad8b3d9 100644 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -2,6 +2,7 @@
bootblock-y += ../common/auxadc.c bootblock-y += bootblock.c +bootblock-y += clkbuf.c srclken_rc.c bootblock-y += eint_event.c bootblock-y += ../common/flash_controller.c bootblock-y += ../common/gpio.c gpio.c diff --git a/src/soc/mediatek/mt8192/bootblock.c b/src/soc/mediatek/mt8192/bootblock.c index 1c95d65..0249b15 100644 --- a/src/soc/mediatek/mt8192/bootblock.c +++ b/src/soc/mediatek/mt8192/bootblock.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h> +#include <soc/clkbuf.h> #include <soc/eint_event.h> #include <soc/mmu_operations.h> #include <soc/mt6315.h> @@ -8,6 +9,7 @@ #include <soc/pll.h> #include <soc/pmif.h> #include <soc/rtc.h> +#include <soc/srclken_rc.h> #include <soc/wdt.h>
void bootblock_soc_init(void) @@ -18,6 +20,8 @@ mtk_pmif_init(); mt6359p_init(); mt6315_init(); + srclken_rc_init(); + clk_buf_init(); rtc_boot(); unmask_eint_event_mask(); } diff --git a/src/soc/mediatek/mt8192/clkbuf.c b/src/soc/mediatek/mt8192/clkbuf.c new file mode 100644 index 0000000..83fdb92 --- /dev/null +++ b/src/soc/mediatek/mt8192/clkbuf.c @@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <delay.h> +#include <device/mmio.h> +#include <soc/clkbuf.h> +#include <soc/pmif.h> +#include <soc/srclken_rc.h> + + +#define BUFTAG "[CLKBUF]" +#define buf_info(fmt, arg ...) printk(BIOS_INFO, BUFTAG "%s,%d: " fmt, \ + __func__, __LINE__, ## arg) + +#define _buf_clrset32_impl(addr, clear, set) \ + buf_write(addr, (buf_read(addr) & ~((uint32_t)(clear))) | (set)) + +#define BUF_SET_FIELDS(addr, ...) \ + _BF_IMPL(_buf_clrset32_impl, addr, __VA_ARGS__) +#define BUF_READ_FIELD(addr, name) \ + EXTRACT_BITFIELD(buf_read(addr), name) + +#define PMIC_CW00_INIT_VAL 0x4005 /* 0100 0000 0000 0101 */ +#define PMIC_CW09_INIT_VAL 0x01F0 /* 0000 0001 1111 0000 */ + +static struct pmif *pmif_arb; + +static u32 buf_read(u32 addr) +{ + u32 rdata; + + if (pmif_arb == NULL) + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + pmif_arb->read(pmif_arb, 0, addr, &rdata); + + return rdata; +} + +static void buf_write(u32 addr, u32 wdata) +{ + if (pmif_arb == NULL) + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + pmif_arb->write(pmif_arb, 0, addr, wdata); +} + +static void dump_clkbuf_log(void) +{ + u32 pmic_cw00, pmic_cw09, pmic_cw12, pmic_cw13, pmic_cw15, pmic_cw19, + top_spi_con1, ldo_vrfck_op_en, ldo_vbbck_op_en, ldo_vrfck_en, + ldo_vbbck_en, vrfck_hv_en; + + pmic_cw00 = BUF_READ_FIELD(PMIC_RG_DCXO_CW00, PMIC_REG_COMMON); + pmic_cw09 = BUF_READ_FIELD(PMIC_RG_DCXO_CW09, PMIC_REG_COMMON); + pmic_cw12 = BUF_READ_FIELD(PMIC_RG_DCXO_CW12, PMIC_REG_COMMON); + pmic_cw13 = BUF_READ_FIELD(PMIC_RG_DCXO_CW13, PMIC_REG_COMMON); + pmic_cw15 = BUF_READ_FIELD(PMIC_RG_DCXO_CW15, PMIC_REG_COMMON); + pmic_cw19 = BUF_READ_FIELD(PMIC_RG_DCXO_CW19, PMIC_REG_COMMON); + buf_info("DCXO_CW00/09/12/13/15/19=%#x %#x %#x %#x %#x %#x\n", + pmic_cw00, pmic_cw09, pmic_cw12, + pmic_cw13, pmic_cw15, pmic_cw19); + + top_spi_con1 = BUF_READ_FIELD(PMIC_RG_TOP_SPI_CON1, PMIC_RG_SRCLKEN_IN3_EN); + ldo_vrfck_op_en = BUF_READ_FIELD(PMIC_RG_LDO_VRFCK_OP_EN, + PMIC_RG_LDO_VRFCK_HW14_OP_EN); + ldo_vbbck_op_en = BUF_READ_FIELD(PMIC_RG_LDO_VBBCK_OP_EN, + PMIC_RG_LDO_VBBCK_HW14_OP_EN); + ldo_vrfck_en = BUF_READ_FIELD(PMIC_RG_LDO_VRFCK_CON0, PMIC_RG_LDO_VRFCK_EN); + ldo_vbbck_en = BUF_READ_FIELD(PMIC_RG_LDO_VBBCK_CON0, PMIC_RG_LDO_VBBCK_EN); + buf_info("spi_con1/ldo_rf_op/ldo_bb_op/ldo_rf_en/ldo_bb_en=%#x %#x %#x %#x %#x\n", + top_spi_con1, ldo_vrfck_op_en, ldo_vbbck_op_en, + ldo_vrfck_en, ldo_vbbck_en); + + vrfck_hv_en = BUF_READ_FIELD(PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, PMIC_RG_VRFCK_HV_EN); + buf_info("clk buf vrfck_hv_en=%#x\n", vrfck_hv_en); +} + +int clk_buf_init(void) +{ + /* Dump registers before setting */ + dump_clkbuf_log(); + + /* Unlock pmic key */ + BUF_SET_FIELDS(PMIC_TOP_TMA_KEY, PMIC_REG_COMMON, PMIC_TOP_TMA_KEY_UNLOCK); + + /* 1.1 Set VRFCK input supply(11.ac mode) */ + BUF_SET_FIELDS(PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, PMIC_RG_VRFCK_HV_EN, 0x0); + + /* 1.2.0 Set VRFCK En = 0 */ + BUF_SET_FIELDS(PMIC_RG_LDO_VRFCK_CON0, PMIC_RG_LDO_VRFCK_EN, 0x0); + /* 1.2.1 Set VRFCK1 as power src */ + BUF_SET_FIELDS(PMIC_RG_LDO_VRFCK_ELR, PMIC_RG_LDO_VRFCK_ANA_SEL, 0x1); + + /* 1.2.2 Switch LDO-RFCK to LDO-RFCK1 */ + BUF_SET_FIELDS(PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, PMIC_RG_VRFCK_NDIS_EN, 0x0); + BUF_SET_FIELDS(PMIC_RG_DCXO_ADLDO_BIAS_ELR_1, PMIC_RG_VRFCK_1_NDIS_EN, 0x1); + + /* 1.2.0 Set VRFCK En = 1 */ + BUF_SET_FIELDS(PMIC_RG_LDO_VRFCK_CON0, PMIC_RG_LDO_VRFCK_EN, 0x1); + + /* 1.2.3 Lock pmic key */ + BUF_SET_FIELDS(PMIC_TOP_TMA_KEY, PMIC_REG_COMMON, 0x0); + + /* Enable XO LDO */ + BUF_SET_FIELDS(PMIC_RG_LDO_VRFCK_OP_EN_SET, PMIC_RG_LDO_VRFCK_HW14_OP_EN, 0x1); + BUF_SET_FIELDS(PMIC_RG_LDO_VBBCK_OP_EN_SET, PMIC_RG_LDO_VBBCK_HW14_OP_EN, 0x1); + BUF_SET_FIELDS(PMIC_RG_LDO_VRFCK_CON0, PMIC_RG_LDO_VRFCK_EN, 0x0); + BUF_SET_FIELDS(PMIC_RG_LDO_VBBCK_CON0, PMIC_RG_LDO_VBBCK_EN, 0x0); + + /* Enable 26M control */ + if (!CONFIG(SRCLKEN_RC_SUPPORT)) { + /* Legacy co-clock mode */ + BUF_SET_FIELDS(PMIC_RG_TOP_SPI_CON1, PMIC_RG_SRCLKEN_IN3_EN, 0x0); + + BUF_SET_FIELDS(PMIC_RG_DCXO_CW00, PMIC_REG_COMMON, PMIC_CW00_INIT_VAL); + BUF_SET_FIELDS(PMIC_RG_DCXO_CW09, PMIC_REG_COMMON, PMIC_CW09_INIT_VAL); + } else { + /* New co-clock mode */ + /* All XO mode should set to 2'b01 */ + BUF_SET_FIELDS(PMIC_RG_DCXO_CW00, PMIC_REG_COMMON, PMIC_CW00_INIT_VAL); + BUF_SET_FIELDS(PMIC_RG_DCXO_CW09, PMIC_REG_COMMON, PMIC_CW09_INIT_VAL); + + /* 1. Update control mapping table */ + BUF_SET_FIELDS(PMIC_RG_XO_BUF_CTL0, PMIC_RG_XO_VOTE, 0x005); + BUF_SET_FIELDS(PMIC_RG_XO_BUF_CTL1, PMIC_RG_XO_VOTE, 0x0); + BUF_SET_FIELDS(PMIC_RG_XO_BUF_CTL2, PMIC_RG_XO_VOTE, 0x0); + BUF_SET_FIELDS(PMIC_RG_XO_BUF_CTL3, PMIC_RG_XO_VOTE, 0x0); + BUF_SET_FIELDS(PMIC_RG_XO_BUF_CTL4, PMIC_RG_XO_VOTE, 0x0); + /* Wait 100us */ + udelay(100); + + /* 2. Switch to new control mode */ + BUF_SET_FIELDS(PMIC_RG_DCXO_CW08, PMIC_RG_XO_PMIC_TOP_DIG_SW, 0x0); + } + + /* Check if the setting is ok */ + dump_clkbuf_log(); + + return 0; +} diff --git a/src/soc/mediatek/mt8192/include/soc/addressmap.h b/src/soc/mediatek/mt8192/include/soc/addressmap.h index e4d57b0..3a07802 100644 --- a/src/soc/mediatek/mt8192/include/soc/addressmap.h +++ b/src/soc/mediatek/mt8192/include/soc/addressmap.h @@ -20,6 +20,8 @@ INFRACFG_AO_MEM_BASE = IO_PHYS + 0x00002000, GPIO_BASE = IO_PHYS + 0x00005000, SPM_BASE = IO_PHYS + 0x00006000, + RC_BASE = IO_PHYS + 0x00006500, + RC_STATUS_BASE = IO_PHYS + 0x00006E00, RGU_BASE = IO_PHYS + 0x00007000, GPT_BASE = IO_PHYS + 0x00008000, EINT_BASE = IO_PHYS + 0x0000B000, diff --git a/src/soc/mediatek/mt8192/include/soc/clkbuf.h b/src/soc/mediatek/mt8192/include/soc/clkbuf.h new file mode 100644 index 0000000..b5fa3a3 --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/clkbuf.h @@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8192_CLKBUF_H +#define SOC_MEDIATEK_MT8192_CLKBUF_H + +#include <device/mmio.h> + +enum { + PMIC_RG_DCXO_CW00 = 0x0788, + PMIC_RG_DCXO_CW02 = 0x0790, + PMIC_RG_DCXO_CW08 = 0x079C, + PMIC_RG_DCXO_CW09 = 0x079E, + PMIC_RG_DCXO_CW09_CLR = 0x07A2, + PMIC_RG_DCXO_CW10 = 0x07A4, + PMIC_RG_DCXO_CW12 = 0x07A8, + PMIC_RG_DCXO_CW13 = 0x07AA, + PMIC_RG_DCXO_CW15 = 0x07AE, + PMIC_RG_DCXO_CW19 = 0x07B6, +}; + +enum { + PMIC_TOP_TMA_KEY = 0x3A8, + PMIC_RG_TOP_SPI_CON1 = 0x458, +}; + +enum { + PMIC_TOP_TMA_KEY_UNLOCK = 0x9CA6, +}; + +enum { + PMIC_RG_LDO_VRFCK_ELR = 0x1B40, + PMIC_RG_LDO_VRFCK_CON0 = 0x1D1C, + PMIC_RG_LDO_VRFCK_OP_EN = 0x1D22, + PMIC_RG_LDO_VRFCK_OP_EN_SET = 0x1D24, + PMIC_RG_LDO_VBBCK_CON0 = 0x1D2E, + PMIC_RG_LDO_VBBCK_OP_EN = 0x1D34, + PMIC_RG_LDO_VBBCK_OP_EN_SET = 0x1D36, +}; + +enum { + PMIC_RG_DCXO_ADLDO_BIAS_ELR_0 = 0x209C, + PMIC_RG_DCXO_ADLDO_BIAS_ELR_1 = 0x209E, +}; + +enum { + PMIC_RG_XO_BUF_CTL0 = 0x54C, + PMIC_RG_XO_BUF_CTL1 = 0x54E, + PMIC_RG_XO_BUF_CTL2 = 0x550, + PMIC_RG_XO_BUF_CTL3 = 0x552, + PMIC_RG_XO_BUF_CTL4 = 0x554, + PMIC_RG_XO_CONN_BT0 = 0x556, +}; + +DEFINE_BITFIELD(PMIC_REG_COMMON, 15, 0) +DEFINE_BIT(PMIC_RG_VRFCK_HV_EN, 9) +DEFINE_BIT(PMIC_RG_LDO_VRFCK_EN, 0) +DEFINE_BIT(PMIC_RG_LDO_VRFCK_ANA_SEL, 0) +DEFINE_BIT(PMIC_RG_LDO_VBBCK_EN, 0) +DEFINE_BIT(PMIC_RG_VRFCK_NDIS_EN, 11) +DEFINE_BIT(PMIC_RG_VRFCK_1_NDIS_EN, 0) +DEFINE_BIT(PMIC_RG_LDO_VRFCK_HW14_OP_EN, 14) +DEFINE_BIT(PMIC_RG_LDO_VBBCK_HW14_OP_EN, 14) +DEFINE_BIT(PMIC_RG_SRCLKEN_IN3_EN, 0) +DEFINE_BIT(PMIC_RG_XO_PMIC_TOP_DIG_SW, 2) +DEFINE_BITFIELD(PMIC_RG_XO_VOTE, 10, 0) + +int clk_buf_init(void); + +#endif /* SOC_MEDIATEK_MT8192_CLKBUF_H */ diff --git a/src/soc/mediatek/mt8192/include/soc/pmif.h b/src/soc/mediatek/mt8192/include/soc/pmif.h index fe3def0..cfc7fe5 100644 --- a/src/soc/mediatek/mt8192/include/soc/pmif.h +++ b/src/soc/mediatek/mt8192/include/soc/pmif.h @@ -3,6 +3,7 @@ #ifndef __MT8192_SOC_PMIF_H__ #define __MT8192_SOC_PMIF_H__
+#include <device/mmio.h> #include <types.h>
enum { @@ -167,6 +168,36 @@ E_SPI_INIT_SIDLY, /* SPI edge calibration fail */ };
+enum pmic_interface { + PMIF_VLD_RDY = 0, + PMIF_SLP_REQ, +}; + +DEFINE_BIT(PMIFSPI_INF_EN_SRCLKEN_RC_HW, 4) + +DEFINE_BIT(PMIFSPI_OTHER_INF_DXCO0_EN, 0) +DEFINE_BIT(PMIFSPI_OTHER_INF_DXCO1_EN, 1) + +DEFINE_BIT(PMIFSPI_ARB_EN_SRCLKEN_RC_HW, 4) +DEFINE_BIT(PMIFSPI_ARB_EN_DCXO_CONN, 15) +DEFINE_BIT(PMIFSPI_ARB_EN_DCXO_NFC, 16) + +DEFINE_BITFIELD(PMIFSPI_SPM_SLEEP_REQ_SEL, 1, 0) +DEFINE_BITFIELD(PMIFSPI_SCP_SLEEP_REQ_SEL, 10, 9) + +DEFINE_BIT(PMIFSPI_MD_CTL_PMIF_RDY, 9) +DEFINE_BIT(PMIFSPI_MD_CTL_SRCLK_EN, 10) +DEFINE_BIT(PMIFSPI_MD_CTL_SRVOL_EN, 11) + +DEFINE_BITFIELD(PMIFSPMI_SPM_SLEEP_REQ_SEL, 1, 0) +DEFINE_BITFIELD(PMIFSPMI_SCP_SLEEP_REQ_SEL, 10, 9) + +DEFINE_BIT(PMIFSPMI_MD_CTL_PMIF_RDY, 9) +DEFINE_BIT(PMIFSPMI_MD_CTL_SRCLK_EN, 10) +DEFINE_BIT(PMIFSPMI_MD_CTL_SRVOL_EN, 11) + +/* External API */ extern struct pmif *get_pmif_controller(int inf, int mstid); +extern void pmwrap_interface_init(void); extern int mtk_pmif_init(void); #endif /*__MT8192_SOC_PMIF_H__*/ diff --git a/src/soc/mediatek/mt8192/include/soc/rtc.h b/src/soc/mediatek/mt8192/include/soc/rtc.h index 491aeab..46c06f4 100644 --- a/src/soc/mediatek/mt8192/include/soc/rtc.h +++ b/src/soc/mediatek/mt8192/include/soc/rtc.h @@ -149,19 +149,6 @@ PMIC_RG_BANK_FQMTR_RST_SHIFT = 6, };
-/* PMIC DCXO Register Definition */ -enum { - PMIC_RG_DCXO_CW00 = 0x0788, - PMIC_RG_DCXO_CW00_SET = 0x078A, - PMIC_RG_DCXO_CW00_CLR = 0x078C, - PMIC_RG_DCXO_CW02 = 0x0790, - PMIC_RG_DCXO_CW08 = 0x079C, - PMIC_RG_DCXO_CW09 = 0x079E, - PMIC_RG_DCXO_CW09_SET = 0x07A0, - PMIC_RG_DCXO_CW09_CLR = 0x07A2, - PMIC_RG_DCXO_CW12 = 0x07A8, -}; - /* PMIC Frequency Meter Definition */ enum { PMIC_RG_FQMTR_CKSEL = 0x0118, @@ -228,5 +215,4 @@ bool rtc_gpio_init(void); void rtc_boot(void); u16 rtc_get_frequency_meter(u16 val, u16 measure_src, u16 window_size); -void mt6359_dcxo_disable_unused(void); #endif /* SOC_MEDIATEK_MT8192_RTC_H */ diff --git a/src/soc/mediatek/mt8192/include/soc/srclken_rc.h b/src/soc/mediatek/mt8192/include/soc/srclken_rc.h new file mode 100644 index 0000000..dc0a076 --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/srclken_rc.h @@ -0,0 +1,191 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8192_SRCLKEN_RC_H +#define SOC_MEDIATEK_MT8192_SRCLKEN_RC_H + +#include <device/mmio.h> + +struct mtk_rc_regs { + u32 srclken_rc_cfg; + u32 rc_central_cfg1; + u32 rc_central_cfg2; + u32 rc_cmd_arb_cfg; + u32 rc_pmic_rcen_addr; + u32 rc_pmic_rcen_set_clr_addr; + u32 rc_dcxo_fpm_cfg; + u32 rc_central_cfg3; + u32 rc_mxx_srclken_cfg[13]; + u32 srclken_sw_con_cfg; + u32 rc_central_cfg4; + u32 reserved1; + u32 rc_protocol_chk_cfg; + u32 rc_debug_cfg; + u32 reserved2[19]; + u32 rc_misc_0; + u32 rc_spm_ctrl; + u32 rc_subsys_intf_cfg; +}; + +check_member(mtk_rc_regs, rc_central_cfg1, 0x4); +check_member(mtk_rc_regs, rc_mxx_srclken_cfg[0], 0x20); +check_member(mtk_rc_regs, rc_mxx_srclken_cfg[12], 0x50); +check_member(mtk_rc_regs, rc_central_cfg4, 0x58); +check_member(mtk_rc_regs, rc_protocol_chk_cfg, 0x60); +check_member(mtk_rc_regs, rc_misc_0, 0xb4); +check_member(mtk_rc_regs, rc_subsys_intf_cfg, 0xbc); + +struct mtk_rc_status_regs { + u32 rc_fsm_sta_0; + u32 rc_cmd_sta_0; + u32 rc_cmd_sta_1; + u32 rc_spi_sta_0; + u32 rc_pi_po_sta_0; + u32 rc_mxx_req_sta_0[14]; + u32 reserved2[2]; + u32 rc_debug_trace; +}; + +check_member(mtk_rc_status_regs, rc_cmd_sta_1, 0x8); +check_member(mtk_rc_status_regs, rc_mxx_req_sta_0[0], 0x14); +check_member(mtk_rc_status_regs, rc_mxx_req_sta_0[13], 0x48); +check_member(mtk_rc_status_regs, rc_debug_trace, 0x54); + +/* SPM Register */ +/* SRCLKEN_RC_CFG */ +DEFINE_BIT(SW_RESET, 0) +DEFINE_BIT(CG_32K_EN, 1) +DEFINE_BIT(CG_FCLK_EN, 2) +DEFINE_BIT(CG_FCLK_FR_EN, 3) +DEFINE_BIT(MUX_FCLK_FR, 4) + +/* RC_CENTRAL_CFG1 */ +DEFINE_BIT(SRCLKEN_RC_EN, 0) +DEFINE_BIT(RCEN_ISSUE_M, 1) +DEFINE_BIT(RC_SPI_ACTIVE, 2) +DEFINE_BIT(SRCLKEN_RC_EN_SEL, 3) +DEFINE_BITFIELD(VCORE_SETTLE_T, 7, 5) +DEFINE_BITFIELD(ULPOSC_SETTLE_T, 11, 8) +DEFINE_BITFIELD(NON_DCXO_SETTLE_T, 21, 12) +DEFINE_BITFIELD(DCXO_SETTLE_T, 31, 22) + +/* RC_CENTRAL_CFG2 */ +DEFINE_BITFIELD(SRCVOLTEN_CTRL, 3, 0) +DEFINE_BITFIELD(VREQ_CTRL, 7, 4) +DEFINE_BIT(SRCVOLTEN_VREQ_SEL, 8) +DEFINE_BIT(SRCVOLTEN_VREQ_M, 9) +DEFINE_BITFIELD(ULPOSC_CTRL_M, 15, 12) +DEFINE_BITFIELD(PWRAP_SLP_CTRL_M, 24, 21) +DEFINE_BIT(PWRAP_SLP_MUX_SEL, 25) + +/* RC_DCXO_FPM_CFG */ +DEFINE_BITFIELD(DCXO_FPM_CTRL_M, 3, 0) +DEFINE_BIT(SRCVOLTEN_FPM_MSK_B, 4) +DEFINE_BITFIELD(SUB_SRCLKEN_FPM_MSK_B, 28, 16) + +/* RC_CENTRAL_CFG3 */ +DEFINE_BIT(TO_LPM_SETTLE_EN, 0) +DEFINE_BIT(BLK_SCP_DXCO_MD_TARGET, 1) +DEFINE_BIT(BLK_COANT_DXCO_MD_TARGET, 2) +DEFINE_BIT(TO_BBLPM_SETTLE_EN, 3) +DEFINE_BITFIELD(TO_LPM_SETTLE_T, 21, 12) + +/* RC_CENTRAL_CFG4 */ +DEFINE_BITFIELD(KEEP_RC_SPI_ACTIVE, 8, 0) +DEFINE_BIT(PWRAP_VLD_FORCE, 16) +DEFINE_BIT(SLEEP_VLD_MODE, 17) + +/* RC_MXX_SRCLKEN_CFG */ +DEFINE_BIT(DCXO_SETTLE_BLK_EN, 1) +DEFINE_BIT(BYPASS_CMD_EN, 2) +DEFINE_BIT(SW_SRCLKEN_RC, 3) +DEFINE_BIT(SW_SRCLKEN_FPM, 4) +DEFINE_BIT(SW_SRCLKEN_BBLPM, 5) +DEFINE_BIT(XO_SOC_LINK_EN, 6) +DEFINE_BIT(REQ_ACK_LOW_IMD_EN, 7) +DEFINE_BIT(SRCLKEN_TRACK_M_EN, 8) +DEFINE_BITFIELD(CNT_PRD_STEP, 11, 10) +DEFINE_BITFIELD(XO_STABLE_PRD, 21, 12) +DEFINE_BITFIELD(DCXO_STABLE_PRD, 31, 22) + +enum { + SW_SRCLKEN_FPM_MSK = 0x1, + SW_SRCLKEN_BBLPM_MSK = 0x1, +}; + +/* RC_DEBUG_CFG */ +DEFINE_BIT(TRACE_MODE_EN, 24) + +/* SUBSYS_INTF_CFG */ +DEFINE_BITFIELD(SRCLKEN_FPM_MASK_B, 12, 0) +DEFINE_BITFIELD(SRCLKEN_BBLPM_MASK_B, 28, 16) + +enum { + PMIC_PMRC_CON0 = 0x1A6, + PMIC_PMRC_CON0_SET = 0x1A8, + PMIC_PMRC_CON0_CLR = 0x1AA, +}; + +enum chn_id { + CHN_SUSPEND = 0, + CHN_RF = 1, + CHN_DEEPIDLE = 2, + CHN_MD = 3, + CHN_GPS = 4, + CHN_BT = 5, + CHN_WIFI = 6, + CHN_MCU = 7, + CHN_COANT = 8, + CHN_NFC = 9, + CHN_UFS = 10, + CHN_SCP = 11, + CHN_RESERVE = 12, + MAX_CHN_NUM, +}; + +enum { + SRCLKENAO_MODE, + VREQ_MODE, +}; + +enum { + MERGE_OR_MODE = 0x0, + BYPASS_MODE = 0x1, + MERGE_AND_MODE = 0x1 << 1, + BYPASS_RC_MODE = 0x2 << 1, + BYPASS_OTHER_MODE = 0x3 << 1, + ASYNC_MODE = 0x1 << 3, +}; + +enum { + RC_32K = 0, + RC_ULPOSC1, +}; + +enum rc_ctrl_m { + HW_MODE = 0, + SW_MODE = 1, + INIT_MODE = 0xff, +}; + +enum rc_support { + SRCLKEN_RC_ENABLE = 0, + SRCLKEN_RC_DISABLE, +}; + +struct subsys_rc_con { + unsigned int dcxo_prd; + unsigned int xo_prd; + unsigned int cnt_step; + unsigned int track_en; + unsigned int req_ack_imd_en; + unsigned int xo_soc_link_en; + unsigned int sw_bblpm; + unsigned int sw_fpm; + unsigned int sw_rc; + unsigned int bypass_cmd; + unsigned int dcxo_settle_blk_en; +}; + +extern int srclken_rc_init(void); + +#endif /* SOC_MEDIATEK_MT8192_SRCLKEN_RC_H */ diff --git a/src/soc/mediatek/mt8192/pmif.c b/src/soc/mediatek/mt8192/pmif.c index f6b1525..57fc9d4 100644 --- a/src/soc/mediatek/mt8192/pmif.c +++ b/src/soc/mediatek/mt8192/pmif.c @@ -177,6 +177,120 @@ return NULL; }
+static void pmif_select(enum pmic_interface mode) +{ + unsigned int spi_spm_sleep_req, spi_scp_sleep_req, + spmi_spm_sleep_req, spmi_scp_sleep_req, + spi_md_ctl_pmif_rdy, spi_md_ctl_srclk_en, spi_md_ctl_srvol_en, + spmi_md_ctl_pmif_rdy, spmi_md_ctl_srclk_en, spmi_md_ctl_srvol_en, + spi_inf_srclken_rc_en, spi_other_inf_dcxo0_en, spi_other_inf_dcxo1_en, + spi_arb_srclken_rc_en, spi_arb_dcxo_conn_en, spi_arb_dcxo_nfc_en; + + switch (mode) { + case PMIF_VLD_RDY: + /* spm and scp sleep request disable spi and spmi */ + spi_spm_sleep_req = 1; + spi_scp_sleep_req = 1; + spmi_spm_sleep_req = 1; + spmi_scp_sleep_req = 1; + + /* + * pmic vld/rdy control spi mode enable + * srclken control spi mode disable + * vreq control spi mode disable + */ + spi_md_ctl_pmif_rdy = 1; + spi_md_ctl_srclk_en = 0; + spi_md_ctl_srvol_en = 0; + spmi_md_ctl_pmif_rdy = 1; + spmi_md_ctl_srclk_en = 0; + spmi_md_ctl_srvol_en = 0; + + /* srclken rc interface enable */ + spi_inf_srclken_rc_en = 1; + + /* dcxo interface disable */ + spi_other_inf_dcxo0_en = 0; + spi_other_inf_dcxo1_en = 0; + + /* srclken enable, dcxo0,1 disable */ + spi_arb_srclken_rc_en = 1; + spi_arb_dcxo_conn_en = 0; + spi_arb_dcxo_nfc_en = 0; + break; + + case PMIF_SLP_REQ: + /* spm and scp sleep request enable spi and spmi */ + spi_spm_sleep_req = 0; + spi_scp_sleep_req = 0; + spmi_spm_sleep_req = 0; + spmi_scp_sleep_req = 0; + + /* + * pmic vld/rdy control spi mode disable + * srclken control spi mode enable + * vreq control spi mode enable + */ + spi_md_ctl_pmif_rdy = 0; + spi_md_ctl_srclk_en = 1; + spi_md_ctl_srvol_en = 1; + spmi_md_ctl_pmif_rdy = 0; + spmi_md_ctl_srclk_en = 1; + spmi_md_ctl_srvol_en = 1; + + /* srclken rc interface disable */ + spi_inf_srclken_rc_en = 0; + + /* dcxo interface enable */ + spi_other_inf_dcxo0_en = 1; + spi_other_inf_dcxo1_en = 1; + + /* srclken disable, dcxo0,1 enable */ + spi_arb_srclken_rc_en = 0; + spi_arb_dcxo_conn_en = 1; + spi_arb_dcxo_nfc_en = 1; + break; + + default: + die("Can't support pmif mode %d\n", mode); + } + + SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->sleep_protection_ctrl, + PMIFSPI_SPM_SLEEP_REQ_SEL, spi_spm_sleep_req, + PMIFSPI_SCP_SLEEP_REQ_SEL, spi_scp_sleep_req); + SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->sleep_protection_ctrl, + PMIFSPMI_SPM_SLEEP_REQ_SEL, spmi_spm_sleep_req, + PMIFSPMI_SCP_SLEEP_REQ_SEL, spmi_scp_sleep_req); + SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->spi_mode_ctrl, + PMIFSPI_MD_CTL_PMIF_RDY, spi_md_ctl_pmif_rdy, + PMIFSPI_MD_CTL_SRCLK_EN, spi_md_ctl_srclk_en, + PMIFSPI_MD_CTL_SRVOL_EN, spi_md_ctl_srvol_en); + SET32_BITFIELDS(&pmif_spmi_arb[0].mtk_pmif->spi_mode_ctrl, + PMIFSPMI_MD_CTL_PMIF_RDY, spmi_md_ctl_pmif_rdy, + PMIFSPMI_MD_CTL_SRCLK_EN, spmi_md_ctl_srclk_en, + PMIFSPMI_MD_CTL_SRVOL_EN, spmi_md_ctl_srvol_en); + SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->inf_en, + PMIFSPI_INF_EN_SRCLKEN_RC_HW, spi_inf_srclken_rc_en); + SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->other_inf_en, + PMIFSPI_OTHER_INF_DXCO0_EN, spi_other_inf_dcxo0_en, + PMIFSPI_OTHER_INF_DXCO1_EN, spi_other_inf_dcxo1_en); + SET32_BITFIELDS(&pmif_spi_arb[0].mtk_pmif->arb_en, + PMIFSPI_ARB_EN_SRCLKEN_RC_HW, spi_arb_srclken_rc_en, + PMIFSPI_ARB_EN_DCXO_CONN, spi_arb_dcxo_conn_en, + PMIFSPI_ARB_EN_DCXO_NFC, spi_arb_dcxo_nfc_en); +} + +void pmwrap_interface_init(void) +{ + if (CONFIG(SRCLKEN_RC_SUPPORT)) { + printk(BIOS_INFO, "%s: Select PMIF_VLD_RDY\n", __func__); + pmif_select(PMIF_VLD_RDY); + } else { + printk(BIOS_INFO, "%s: Select PMIF_SLP_REQ\n", __func__); + pmif_select(PMIF_SLP_REQ); + } +} + int mtk_pmif_init(void) { int ret; diff --git a/src/soc/mediatek/mt8192/rtc.c b/src/soc/mediatek/mt8192/rtc.c index d966cab..b5c381b 100644 --- a/src/soc/mediatek/mt8192/rtc.c +++ b/src/soc/mediatek/mt8192/rtc.c @@ -2,6 +2,7 @@
#include <delay.h> #include <halt.h> +#include <soc/clkbuf.h> #include <soc/mt6359p.h> #include <soc/pmif.h> #include <soc/rtc.h> @@ -312,43 +313,11 @@ halt(); }
-static void dcxo_init(void) -{ - u16 tmp; - - rtc_read(PMIC_RG_DCXO_CW00, &tmp); - rtc_info("CW00,%#x:%#x\n", PMIC_RG_DCXO_CW00, tmp); - rtc_read(PMIC_RG_DCXO_CW09, &tmp); - rtc_info("CW09,%#x:%#x\n", PMIC_RG_DCXO_CW09, tmp); - rtc_read(PMIC_RG_DCXO_CW08, &tmp); - rtc_info("CW08,%#x:%#x\n", PMIC_RG_DCXO_CW08, tmp); - /* 26M enable control */ - /* enable clock buffer XO_SOC */ - rtc_write_field(PMIC_RG_DCXO_CW00, 0x4005, 0xFFFF, 0); - rtc_read(PMIC_RG_DCXO_CW00, &tmp); - rtc_info("CW0,%#x:%#x\n", PMIC_RG_DCXO_CW00, tmp); - rtc_write_field(PMIC_RG_DCXO_CW09_CLR, 0x3f, 0x3f, 9); - rtc_read(PMIC_RG_DCXO_CW09, &tmp); - rtc_info("PMIC_RG_DCXO_CW09,%#x:%#x\n", PMIC_RG_DCXO_CW09, tmp); - /* mode and buffer controlled by srclken0 */ - rtc_write_field(PMIC_RG_DCXO_CW08, 0x1, 0x1, 2); - rtc_read(PMIC_RG_DCXO_CW08, &tmp); - rtc_info("PMIC_RG_DCXO_CW08,%#x:%#x\n", PMIC_RG_DCXO_CW08, tmp); -} - -void mt6359_dcxo_disable_unused(void) -{ - /* disable HW BBLPM arbiter */ - rtc_write_field(PMIC_RG_DCXO_CW12, 0x2, 0x3, 0); -} - /* the rtc boot flow entry */ void rtc_boot(void) { u16 tmp;
- /* dcxo clock init settings */ - dcxo_init(); /* dcxo 32k init settings */ rtc_write_field(PMIC_RG_DCXO_CW02, 0xF, 0xF, 0); rtc_read(PMIC_RG_SCK_TOP_CON0, &tmp); diff --git a/src/soc/mediatek/mt8192/srclken_rc.c b/src/soc/mediatek/mt8192/srclken_rc.c new file mode 100644 index 0000000..f6790c6 --- /dev/null +++ b/src/soc/mediatek/mt8192/srclken_rc.c @@ -0,0 +1,388 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <delay.h> +#include <soc/addressmap.h> +#include <soc/pmif.h> +#include <soc/srclken_rc.h> + +#define RCTAG "[SRCLKEN_RC]" +#define rc_info(fmt, arg ...) printk(BIOS_INFO, RCTAG "%s,%d: " fmt, \ + __func__, __LINE__, ## arg) + +#define SRCLKEN_DBG 1 + +/* RC settle time setting */ +enum { + FULL_SET_HW_MODE = 0, /* dcxo mode use pmrc_en */ + VCORE_SETTLE_TIME = 1, /* ~= 30us */ + ULPOSC_SETTLE_TIME = 4, /* ~= 150us */ + XO_SETTLE_TIME = 0x1, /* 2 ^ (step_sz + 5) * 0x33 * 30.77ns ~= 400us */ + DCXO_SETTLE_TIME = 0x1, /* 2 ^ (step_sz + 5) * 0x87 * 30.77ns ~= 1063us */ + CENTROL_CNT_STEP = 0x3, /* fix in 3, central align with Mxx channel */ + DCXO_STABLE_TIME = 0x70, + XO_STABLE_TIME = 0x70, + KEEP_RC_SPI_ACTIVE_VAL = 1, + SRCLKEN_RC_EN_SEL_VAL = 0, +}; + +enum { + INIT_SUBSYS_FPM_TO_LPM = 1 << CHN_RF | 1 << CHN_DEEPIDLE | 1 << CHN_MD + | 1 << CHN_GPS | 1 << CHN_BT | 1 << CHN_WIFI + | 1 << CHN_MCU | 1 << CHN_COANT | 1 << CHN_NFC + | 1 << CHN_UFS | 1 << CHN_SCP | 1 << CHN_RESERVE, + INIT_SUBSYS_FPM_TO_BBLPM = 1 << CHN_DEEPIDLE, + INIT_SUBSYS_TO_HW = 1 << CHN_SUSPEND | 1 << CHN_DEEPIDLE | 1 << CHN_MCU, +}; + +/* RC central setting */ +enum { + RC_CENTRAL_ENABLE = 1, + RC_CENTRAL_DISABLE = 0, + SPI_TRIG_MODE = SRCLKENAO_MODE, /* use srlckenao to set vcore */ + IS_SPI_DONE_RELEASE = 0, /* release vcore when spi request done */ + IS_SPI2PMIC_SET_CLR = 0, /* register direct write */ + SRCLKENO_0_CTRL_M = MERGE_OR_MODE, /* merge with spm */ + VREQ_CTRL_M = BYPASS_MODE, /* merge with vreq */ + ULPOSC_CTRL_M_VAL = BYPASS_MODE, /* merge with ulposc */ + PWRAP_CTRL_M = MERGE_OR_MODE, /* merge with pwrap_scp */ + SPI_CLK_SRC = RC_32K, /* pmic spec under 200us */ +}; + +/* Other setting */ +enum { + DCXO_FPM_CTRL_MODE = MERGE_OR_MODE | ASYNC_MODE, /* merge with spm */ + PWRAP_TMOUT_VAL = 0xA, /* 31us * 0xa ~= 310us */ + FPM_MSK_B = FULL_SET_HW_MODE, + MD0_SRCLKENO_0_MASK_B = 0, /* md0 control by pmrc */ +}; + +enum { + SUB_BBLPM_SET = 1 << CHN_COANT | 1 << CHN_DEEPIDLE, + SUB_FPM_SET = 1 << CHN_SUSPEND | 1 << CHN_RF | 1 << CHN_MD + | 1 << CHN_GPS | 1 << CHN_BT | 1 << CHN_WIFI + | 1 << CHN_MCU | 1 << CHN_NFC | 1 << CHN_UFS + | 1 << CHN_SCP | 1 << CHN_RESERVE, +}; + +enum { + SW_FPM_LOW = 0, + SW_FPM_HIGH = 1, +}; + +enum { + SW_BBLPM_LOW = 0, + SW_BBLPM_HIGH = 1, +}; + +enum { + DXCO_SETTLE_BLK_DIS = 0, + DXCO_SETTLE_BLK_EN = 1, +}; + +#define SUB_CTRL_CON(_dcxo_prd, _xo_prd, _bypass_cmd, _dcxo_settle_blk_en) { \ + .dcxo_prd = _dcxo_prd, \ + .xo_prd = _xo_prd, \ + .cnt_step = CENTROL_CNT_STEP, \ + .track_en = 0x0, \ + .req_ack_imd_en = 0x1, \ + .xo_soc_link_en = 0x0, \ + .sw_bblpm = SW_BBLPM_LOW, \ + .sw_fpm = SW_FPM_HIGH, \ + .sw_rc = SW_MODE, \ + .bypass_cmd = _bypass_cmd, \ + .dcxo_settle_blk_en = _dcxo_settle_blk_en, \ + } + +static struct mtk_rc_regs *rc_regs = (struct mtk_rc_regs *)RC_BASE; +static struct mtk_rc_status_regs *rc_sta_regs = (struct mtk_rc_status_regs *)RC_STATUS_BASE; + +static struct subsys_rc_con rc_ctrl[MAX_CHN_NUM] = { + [CHN_SUSPEND] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_RF] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_DEEPIDLE] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, + 0x0, DXCO_SETTLE_BLK_EN), + [CHN_MD] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_GPS] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_BT] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_WIFI] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_MCU] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_COANT] = SUB_CTRL_CON(0x0, 0x0, 0x1, DXCO_SETTLE_BLK_DIS), + [CHN_NFC] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_UFS] = SUB_CTRL_CON(DCXO_STABLE_TIME, XO_STABLE_TIME, 0x0, DXCO_SETTLE_BLK_EN), + [CHN_SCP] = SUB_CTRL_CON(0x0, 0x0, 0x1, DXCO_SETTLE_BLK_DIS), + [CHN_RESERVE] = SUB_CTRL_CON(0x0, 0x0, 0x1, DXCO_SETTLE_BLK_DIS), +}; + +static void pmic_read(u32 addr, u32 *rdata) +{ + static struct pmif *pmif_arb; + + if (pmif_arb == NULL) + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + + pmif_arb->read(pmif_arb, 0, addr, rdata); +} + +static void rc_dump_reg_info(void) +{ + unsigned int chn_n; + + if (SRCLKEN_DBG) { + rc_info("SRCLKEN_RC_CFG:%#x\n", read32(&rc_regs->srclken_rc_cfg)); + rc_info("RC_CENTRAL_CFG1:%#x\n", read32(&rc_regs->rc_central_cfg1)); + rc_info("RC_CENTRAL_CFG2:%#x\n", read32(&rc_regs->rc_central_cfg2)); + rc_info("RC_CENTRAL_CFG3:%#x\n", read32(&rc_regs->rc_central_cfg3)); + rc_info("RC_CENTRAL_CFG4:%#x\n", read32(&rc_regs->rc_central_cfg4)); + rc_info("RC_DCXO_FPM_CFG:%#x\n", read32(&rc_regs->rc_dcxo_fpm_cfg)); + rc_info("SUBSYS_INTF_CFG:%#x\n", read32(&rc_regs->rc_subsys_intf_cfg)); + rc_info("RC_SPI_STA_0:%#x\n", read32(&rc_sta_regs->rc_spi_sta_0)); + rc_info("RC_PI_PO_STA:%#x\n", read32(&rc_sta_regs->rc_pi_po_sta_0)); + + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) { + rc_info("M%02d: %#x\n", chn_n, + read32(&rc_regs->rc_mxx_srclken_cfg[chn_n])); + } + } +} + +/* RC initial flow and relative setting */ +static void __rc_ctrl_mode_switch(enum chn_id id, enum rc_ctrl_m mode) +{ + switch (mode) { + case INIT_MODE: + SET32_BITFIELDS(&rc_regs->rc_mxx_srclken_cfg[id], + DCXO_SETTLE_BLK_EN, rc_ctrl[id].dcxo_settle_blk_en, + BYPASS_CMD_EN, rc_ctrl[id].bypass_cmd, + SW_SRCLKEN_RC, rc_ctrl[id].sw_rc, + SW_SRCLKEN_FPM, rc_ctrl[id].sw_fpm, + SW_SRCLKEN_BBLPM, rc_ctrl[id].sw_bblpm, + XO_SOC_LINK_EN, rc_ctrl[id].xo_soc_link_en, + REQ_ACK_LOW_IMD_EN, rc_ctrl[id].req_ack_imd_en, + SRCLKEN_TRACK_M_EN, rc_ctrl[id].track_en, + CNT_PRD_STEP, rc_ctrl[id].cnt_step, + XO_STABLE_PRD, rc_ctrl[id].xo_prd, + DCXO_STABLE_PRD, rc_ctrl[id].dcxo_prd); + break; + case SW_MODE: + SET32_BITFIELDS(&rc_regs->rc_mxx_srclken_cfg[id], SW_SRCLKEN_RC, 1); + break; + case HW_MODE: + SET32_BITFIELDS(&rc_regs->rc_mxx_srclken_cfg[id], SW_SRCLKEN_RC, 0); + break; + default: + die("Can't support rc_mode %d\n", mode); + } + + rc_info("M%02d: %#x\n", id, read32(&rc_regs->rc_mxx_srclken_cfg[id])); +} + + +/* RC subsys FPM control */ +static void __rc_ctrl_fpm_switch(enum chn_id id, unsigned int mode) +{ + SET32_BITFIELDS(&rc_regs->rc_mxx_srclken_cfg[id], SW_SRCLKEN_FPM, !!mode); + rc_ctrl[id].sw_fpm = mode; + rc_info("M%02d FPM SWITCH: %#x\n", id, read32(&rc_regs->rc_mxx_srclken_cfg[id])); +} + +static void __rc_ctrl_bblpm_switch(enum chn_id id, unsigned int mode) +{ + SET32_BITFIELDS(&rc_regs->rc_mxx_srclken_cfg[id], SW_SRCLKEN_BBLPM, !!mode); + rc_ctrl[id].sw_bblpm = mode; + rc_info("M%02d BBLPM SWITCH: %#x\n", id, read32(&rc_regs->rc_mxx_srclken_cfg[id])); +} + +static void rc_init_subsys_hw_mode(void) +{ + unsigned int chn_n; + + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) { + if (INIT_SUBSYS_TO_HW & (1 << chn_n)) + __rc_ctrl_mode_switch(chn_n, HW_MODE); + } +} + +static void rc_init_subsys_lpm(void) +{ + unsigned int chn_n; + + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) { + if (INIT_SUBSYS_FPM_TO_LPM & (1 << chn_n)) + __rc_ctrl_fpm_switch(chn_n, SW_FPM_LOW); + } + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) { + if (INIT_SUBSYS_FPM_TO_BBLPM & (1 << chn_n)) + __rc_ctrl_bblpm_switch(chn_n, SW_BBLPM_HIGH); + } +} + +static void rc_ctrl_mode_switch_init(enum chn_id id) +{ + __rc_ctrl_mode_switch(id, INIT_MODE); +} + +static enum rc_support srclken_rc_chk_init_cfg(void) +{ + pmwrap_interface_init(); + if (!CONFIG(SRCLKEN_RC_SUPPORT)) { + rc_info("Bring-UP : skip srclken_rc init\n"); + return SRCLKEN_RC_DISABLE; + } + if (SRCLKEN_DBG) { + /* Enable debug trace */ + write32(&rc_sta_regs->rc_debug_trace, 1); + SET32_BITFIELDS(&rc_regs->rc_debug_cfg, TRACE_MODE_EN, 1); + } + return SRCLKEN_RC_ENABLE; +} + +int srclken_rc_init(void) +{ + /* New co-clock architecture srclkenrc implement here */ + unsigned int chn_n; + int ret = 0; + + /* Check platform config to proceed init flow */ + if (srclken_rc_chk_init_cfg() != SRCLKEN_RC_ENABLE) + return ret; + + /* Set SW RESET 1 */ + SET32_BITFIELDS(&rc_regs->srclken_rc_cfg, SW_RESET, 1); + + /* Wait 100us */ + udelay(100); + + /* Set SW CG 1 */ + write32(&rc_regs->srclken_rc_cfg, + _BF_VALUE(SW_RESET, 1) | _BF_VALUE(CG_32K_EN, 1) | + _BF_VALUE(CG_FCLK_EN, 1) | _BF_VALUE(CG_FCLK_FR_EN, 1)); + + /* Wait 100us */ + udelay(100); + + /* Set Clock Mux */ + write32(&rc_regs->srclken_rc_cfg, + _BF_VALUE(SW_RESET, 1) | _BF_VALUE(CG_32K_EN, 1) | + _BF_VALUE(CG_FCLK_EN, 1) | _BF_VALUE(CG_FCLK_FR_EN, 1) | + _BF_VALUE(MUX_FCLK_FR, 1)); + + /* Set req_filter m00~m12 as default SW_FPM */ + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) + rc_ctrl_mode_switch_init(chn_n); + + /* Set PMIC addr for SPI CMD */ + write32(&rc_regs->rc_pmic_rcen_addr, PMIC_PMRC_CON0); + + write32(&rc_regs->rc_pmic_rcen_set_clr_addr, + (PMIC_PMRC_CON0_CLR << 16) | PMIC_PMRC_CON0_SET); + + write32(&rc_regs->rc_cmd_arb_cfg, 0); + + /* CFG1 setting for spi cmd config */ + write32(&rc_regs->rc_central_cfg1, + _BF_VALUE(DCXO_SETTLE_T, DCXO_SETTLE_TIME) | + _BF_VALUE(NON_DCXO_SETTLE_T, XO_SETTLE_TIME) | + _BF_VALUE(ULPOSC_SETTLE_T, ULPOSC_SETTLE_TIME) | + _BF_VALUE(VCORE_SETTLE_T, VCORE_SETTLE_TIME) | + _BF_VALUE(SRCLKEN_RC_EN_SEL, SRCLKEN_RC_EN_SEL_VAL) | + _BF_VALUE(RC_SPI_ACTIVE, KEEP_RC_SPI_ACTIVE_VAL) | + _BF_VALUE(RCEN_ISSUE_M, IS_SPI2PMIC_SET_CLR) | + _BF_VALUE(SRCLKEN_RC_EN, RC_CENTRAL_DISABLE)); + + /* CFG2 setting for signal mode of each control mux */ + write32(&rc_regs->rc_central_cfg2, + _BF_VALUE(PWRAP_SLP_MUX_SEL, SPI_CLK_SRC) | + _BF_VALUE(PWRAP_SLP_CTRL_M, PWRAP_CTRL_M) | + _BF_VALUE(ULPOSC_CTRL_M, ULPOSC_CTRL_M_VAL) | + _BF_VALUE(SRCVOLTEN_VREQ_M, IS_SPI_DONE_RELEASE) | + _BF_VALUE(SRCVOLTEN_VREQ_SEL, SPI_TRIG_MODE) | + _BF_VALUE(VREQ_CTRL, VREQ_CTRL_M) | + _BF_VALUE(SRCVOLTEN_CTRL, SRCLKENO_0_CTRL_M)); + + write32(&rc_regs->rc_central_cfg3, + _BF_VALUE(TO_LPM_SETTLE_T, 0x4) | + _BF_VALUE(TO_BBLPM_SETTLE_EN, 1) | + _BF_VALUE(BLK_COANT_DXCO_MD_TARGET, 1) | + _BF_VALUE(BLK_SCP_DXCO_MD_TARGET, 1) | + _BF_VALUE(TO_LPM_SETTLE_EN, 1)); + + /* Set srclkeno_0/conn_bt as factor to allow dcxo change to FPM */ + write32(&rc_regs->rc_dcxo_fpm_cfg, + _BF_VALUE(SUB_SRCLKEN_FPM_MSK_B, FPM_MSK_B) | + _BF_VALUE(SRCVOLTEN_FPM_MSK_B, MD0_SRCLKENO_0_MASK_B) | + _BF_VALUE(DCXO_FPM_CTRL_M, DCXO_FPM_CTRL_MODE)); + + /* Set bblpm/fpm channel */ + write32(&rc_regs->rc_subsys_intf_cfg, + _BF_VALUE(SRCLKEN_BBLPM_MASK_B, SUB_BBLPM_SET) | + _BF_VALUE(SRCLKEN_FPM_MASK_B, SUB_FPM_SET)); + + /* Trigger srclken_rc enable */ + SET32_BITFIELDS(&rc_regs->rc_central_cfg1, + SRCLKEN_RC_EN, RC_CENTRAL_ENABLE); + + write32(&rc_regs->rc_central_cfg4, + _BF_VALUE(SLEEP_VLD_MODE, 0x1) | + _BF_VALUE(PWRAP_VLD_FORCE, 0x1) | + _BF_VALUE(KEEP_RC_SPI_ACTIVE, 0x800)); + + + /* Wait 100us */ + udelay(100); + + /* Set SW RESET 0 */ + write32(&rc_regs->srclken_rc_cfg, + _BF_VALUE(CG_32K_EN, 1) | _BF_VALUE(CG_FCLK_EN, 1) | + _BF_VALUE(CG_FCLK_FR_EN, 1) | _BF_VALUE(MUX_FCLK_FR, 1)); + + /* Wait 100us */ + udelay(100); + + /* Set SW CG 0 */ + write32(&rc_regs->srclken_rc_cfg, _BF_VALUE(MUX_FCLK_FR, 1)); + + /* Wait 500us */ + udelay(500); + + /* Set req_filter m00~m12 FPM to LPM */ + rc_init_subsys_lpm(); + + /* Polling ACK of Initial Subsys Input */ + for (chn_n = 0; chn_n < MAX_CHN_NUM; chn_n++) { + unsigned int chk_sta, shift_chn_n = 0; + int retry; + u32 temp; + + /* Fix RC_MXX_REQ_STA_0 register shift */ + if (chn_n > 0) + shift_chn_n = 1; + + chk_sta = (rc_ctrl[chn_n].sw_fpm & SW_SRCLKEN_FPM_MSK) << 1 | + (rc_ctrl[chn_n].sw_bblpm & SW_SRCLKEN_BBLPM_MSK) << 3; + retry = 200; + while ((read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]) & 0xa) + != chk_sta && retry-- > 0) + udelay(10); + if (retry < 0) { + pmic_read(PMIC_PMRC_CON0, &temp); + rc_info("polling M%02d failed.(R:%#x)(C:%#x)(PMRC:%#x)\n", + chn_n, + read32(&rc_sta_regs->rc_mxx_req_sta_0[chn_n + shift_chn_n]), + read32(&rc_regs->rc_mxx_srclken_cfg[chn_n]), temp); + ret = -1; + } + } + + /* Set req_filter m00~m12 */ + rc_init_subsys_hw_mode(); + + /* Release force pmic req signal */ + write32(&rc_regs->rc_central_cfg4, + _BF_VALUE(SLEEP_VLD_MODE, 0x1) | + _BF_VALUE(KEEP_RC_SPI_ACTIVE, 0x800)); + + rc_dump_reg_info(); + + return ret; +}