示例#1
0
	F_RAW(f, SRC_##s, MD16(m, n), N16(m, n)|SPDIV(SRC_SEL_##s, div), \
		0, (B(8) * !!(n)), v, NULL)
#define F_MND8(f, nmsb, nlsb, s, div, m, n, v) \
	F_RAW(f, SRC_##s, MD8(m, n), \
		N8(nmsb, nlsb, m, n)|SPDIV(SRC_SEL_##s, div), 0, \
		(B(8) * !!(n)), v, NULL)

static struct clk_freq_tbl clk_tbl_csi[] = {
	F_MND8(153600000, 24, 17, PLL1, 2, 2, 5, NOMINAL),
	F_MND8(192000000, 24, 17, PLL1, 4, 0, 0, NOMINAL),
	F_MND8(384000000, 24, 17, PLL1, 2, 0, 0, NOMINAL),
	F_END,
};

static struct clk_freq_tbl clk_tbl_tcxo[] = {
	F_RAW(19200000, SRC_TCXO, 0, 0, 0, 0, NOMINAL, NULL),
	F_END,
};

static struct clk_freq_tbl clk_tbl_axi[] = {
	F_RAW(1, SRC_AXI, 0, 0, 0, 0, NOMINAL, NULL),
	F_END,
};

static struct clk_freq_tbl clk_tbl_uartdm[] = {
	F_MND16( 3686400, PLL3, 3,   3, 200, NOMINAL),
	F_MND16( 7372800, PLL3, 3,   3, 100, NOMINAL),
	F_MND16(14745600, PLL3, 3,   3,  50, NOMINAL),
	F_MND16(32000000, PLL3, 3,  25, 192, NOMINAL),
	F_MND16(40000000, PLL3, 3, 125, 768, NOMINAL),
	F_MND16(46400000, PLL3, 3, 145, 768, NOMINAL),
		.md_val = MD8(m, n), \
		.ns_val = N8(nmsb, nlsb, m, n) | SPDIV(SRC_SEL_##s, div), \
		.mnd_en_mask = BIT(8) * !!(n), \
		.sys_vdd = v, \
	}

static struct clk_freq_tbl clk_tbl_csi[] = {
	F_MND8(        0,  0,  0, GND,  1, 0, 0, NONE),
	F_MND8(153600000, 24, 17, PLL1, 2, 2, 5, NOMINAL),
	F_MND8(192000000, 24, 17, PLL1, 4, 0, 0, NOMINAL),
	F_MND8(384000000, 24, 17, PLL1, 2, 0, 0, NOMINAL),
	F_END,
};

static struct clk_freq_tbl clk_tbl_tcxo[] = {
	F_RAW(19200000, SRC_TCXO, 0, 0, 0, 0, NOMINAL, NULL),
	F_END,
};

static struct clk_freq_tbl clk_tbl_axi[] = {
	F_RAW(1, SRC_AXI, 0, 0, 0, 0, NOMINAL, NULL),
	F_END,
};

static struct clk_freq_tbl clk_tbl_uartdm[] = {
	F_MND16(       0, GND,  1,   0,   0, NONE),
	F_MND16( 3686400, PLL3, 3,   3, 200, NOMINAL),
	F_MND16( 7372800, PLL3, 3,   3, 100, NOMINAL),
	F_MND16(14745600, PLL3, 3,   3,  50, NOMINAL),
	F_MND16(32000000, PLL3, 3,  25, 192, NOMINAL),
	F_MND16(40000000, PLL3, 3, 125, 768, NOMINAL),