Beispiel #1
0
    GATE(0, "dclk_hdmiphy_src_dpll", "dpll", CLK_IGNORE_UNUSED,
    RK1108_CLKGATE_CON(6), 4, GFLAGS),
    COMPOSITE_NOGATE(0, "dclk_hdmiphy", mux_dclk_hdmiphy_pre_p, 0,
    RK1108_CLKSEL_CON(32), 6, 2, MFLAGS, 8, 6, DFLAGS),

    /*
     * Clock-Architecture Diagram 5
     */

    FACTOR(0, "xin12m", "xin24m", 0, 1, 2),

    COMPOSITE(0, "i2s0_src", mux_pll_src_2plls_p, 0,
    RK1108_CLKSEL_CON(5), 8, 1, MFLAGS, 0, 7, DFLAGS,
    RK1108_CLKGATE_CON(2), 0, GFLAGS),
    COMPOSITE_FRACMUX(0, "i2s1_frac", "i2s1_src", CLK_SET_RATE_PARENT,
    RK1108_CLKSEL_CON(8), 0,
    RK1108_CLKGATE_CON(2), 1, GFLAGS,
    &rk1108_i2s0_fracmux),
    GATE(SCLK_I2S0, "sclk_i2s0", "i2s0_pre", CLK_SET_RATE_PARENT,
    RK1108_CLKGATE_CON(2), 2, GFLAGS),
    COMPOSITE_NODIV(0, "i2s_out", mux_i2s_out_p, 0,
    RK1108_CLKSEL_CON(5), 15, 1, MFLAGS,
    RK1108_CLKGATE_CON(2), 3, GFLAGS),

    COMPOSITE(0, "i2s1_src", mux_pll_src_2plls_p, 0,
    RK1108_CLKSEL_CON(6), 8, 1, MFLAGS, 0, 7, DFLAGS,
    RK1108_CLKGATE_CON(2), 4, GFLAGS),
    COMPOSITE_FRACMUX(0, "i2s1_frac", "i2s1_src", CLK_SET_RATE_PARENT,
    RK2928_CLKSEL_CON(9), 0,
    RK2928_CLKGATE_CON(2), 5, GFLAGS,
    &rk1108_i2s1_fracmux),
    GATE(SCLK_I2S1, "sclk_i2s1", "i2s1_pre", CLK_SET_RATE_PARENT,
Beispiel #2
0
	COMPOSITE(0, "fclk_mcu_src", mux_pll_src_cpll_gpll_p, CLK_IGNORE_UNUSED,
			RK3368_CLKSEL_CON(12), 7, 1, MFLAGS, 0, 5, DFLAGS,
			RK3368_CLKGATE_CON(1), 3, GFLAGS),
	/*
	 * stclk_mcu is listed as child of fclk_mcu_src in diagram 5,
	 * but stclk_mcu has an additional own divider in diagram 2
	 */
	COMPOSITE_NOMUX(0, "stclk_mcu", "fclk_mcu_src", 0,
			RK3368_CLKSEL_CON(12), 8, 3, DFLAGS,
			RK3368_CLKGATE_CON(13), 13, GFLAGS),

	COMPOSITE(0, "i2s_8ch_src", mux_pll_src_cpll_gpll_p, 0,
			RK3368_CLKSEL_CON(27), 12, 1, MFLAGS, 0, 7, DFLAGS,
			RK3368_CLKGATE_CON(6), 1, GFLAGS),
	COMPOSITE_FRACMUX(0, "i2s_8ch_frac", "i2s_8ch_src", CLK_SET_RATE_PARENT,
			  RK3368_CLKSEL_CON(28), 0,
			  RK3368_CLKGATE_CON(6), 2, GFLAGS,
			  &rk3368_i2s_8ch_fracmux),
	COMPOSITE_NODIV(SCLK_I2S_8CH_OUT, "i2s_8ch_clkout", mux_i2s_8ch_clkout_p, 0,
			RK3368_CLKSEL_CON(27), 15, 1, MFLAGS,
			RK3368_CLKGATE_CON(6), 0, GFLAGS),
	GATE(SCLK_I2S_8CH, "sclk_i2s_8ch", "i2s_8ch_pre", CLK_SET_RATE_PARENT,
			RK3368_CLKGATE_CON(6), 3, GFLAGS),
	COMPOSITE(0, "spdif_8ch_src", mux_pll_src_cpll_gpll_p, 0,
			RK3368_CLKSEL_CON(31), 12, 1, MFLAGS, 0, 7, DFLAGS,
			RK3368_CLKGATE_CON(6), 4, GFLAGS),
	COMPOSITE_FRACMUX(0, "spdif_8ch_frac", "spdif_8ch_src", CLK_SET_RATE_PARENT,
			  RK3368_CLKSEL_CON(32), 0,
			  RK3368_CLKGATE_CON(6), 5, GFLAGS,
			  &rk3368_spdif_8ch_fracmux),
	GATE(SCLK_SPDIF_8CH, "sclk_spdif_8ch", "spdif_8ch_pre", CLK_SET_RATE_PARENT,
	     RK3368_CLKGATE_CON(6), 6, GFLAGS),
Beispiel #3
0
			RK3328_CLKGATE_CON(8), 3, GFLAGS),
	GATE(0, "pclk_phy_pre", "pclk_bus_pre", 0,
			RK3328_CLKGATE_CON(8), 4, GFLAGS),

	COMPOSITE(SCLK_TSP, "clk_tsp", mux_2plls_p, 0,
			RK3328_CLKSEL_CON(21), 15, 1, MFLAGS, 8, 5, DFLAGS,
			RK3328_CLKGATE_CON(2), 5, GFLAGS),
	GATE(0, "clk_hsadc_tsp", "ext_gpio3a2", 0,
			RK3328_CLKGATE_CON(17), 13, GFLAGS),

	/* PD_I2S */
	COMPOSITE(0, "clk_i2s0_div", mux_2plls_p, 0,
			RK3328_CLKSEL_CON(6), 15, 1, MFLAGS, 0, 7, DFLAGS,
			RK3328_CLKGATE_CON(1), 1, GFLAGS),
	COMPOSITE_FRACMUX(0, "clk_i2s0_frac", "clk_i2s0_div", CLK_SET_RATE_PARENT,
			RK3328_CLKSEL_CON(7), 0,
			RK3328_CLKGATE_CON(1), 2, GFLAGS,
			&rk3328_i2s0_fracmux),
	GATE(SCLK_I2S0, "clk_i2s0", "i2s0_pre", CLK_SET_RATE_PARENT,
			RK3328_CLKGATE_CON(1), 3, GFLAGS),

	COMPOSITE(0, "clk_i2s1_div", mux_2plls_p, 0,
			RK3328_CLKSEL_CON(8), 15, 1, MFLAGS, 0, 7, DFLAGS,
			RK3328_CLKGATE_CON(1), 4, GFLAGS),
	COMPOSITE_FRACMUX(0, "clk_i2s1_frac", "clk_i2s1_div", CLK_SET_RATE_PARENT,
			RK3328_CLKSEL_CON(9), 0,
			RK3328_CLKGATE_CON(1), 5, GFLAGS,
			&rk3328_i2s1_fracmux),
	GATE(SCLK_I2S1, "clk_i2s1", "i2s1_pre", CLK_SET_RATE_PARENT,
			RK3328_CLKGATE_CON(0), 6, GFLAGS),
	COMPOSITE_NODIV(SCLK_I2S1_OUT, "i2s1_out", mux_i2s1out_p, 0,
			RK3328_CLKSEL_CON(8), 12, 1, MFLAGS,
Beispiel #4
0
	GATE(SCLK_OTGPHY1, "sclk_otgphy1", "xin24m", CLK_IGNORE_UNUSED,
			RK2928_CLKGATE_CON(1), 6, GFLAGS),

	COMPOSITE(0, "mac_src", mux_mac_p, 0,
			RK2928_CLKSEL_CON(21), 0, 1, MFLAGS, 8, 5, DFLAGS,
			RK2928_CLKGATE_CON(2), 5, GFLAGS),
	MUX(SCLK_MAC, "sclk_macref", mux_sclk_macref_p, CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(21), 4, 1, MFLAGS),
	GATE(0, "sclk_mac_lbtest", "sclk_macref",
			RK2928_CLKGATE_CON(2), 12, 0, GFLAGS),

	COMPOSITE(0, "hsadc_src", mux_pll_src_gpll_cpll_p, 0,
			RK2928_CLKSEL_CON(22), 0, 1, MFLAGS, 8, 8, DFLAGS,
			RK2928_CLKGATE_CON(2), 6, GFLAGS),
	COMPOSITE_FRACMUX(0, "hsadc_frac", "hsadc_src", 0,
			RK2928_CLKSEL_CON(23), 0,
			RK2928_CLKGATE_CON(2), 7, GFLAGS,
			&common_hsadc_out_fracmux),
	INVERTER(SCLK_HSADC, "sclk_hsadc", "sclk_hsadc_out",
			RK2928_CLKSEL_CON(22), 7, IFLAGS),

	COMPOSITE_NOMUX(SCLK_SARADC, "sclk_saradc", "xin24m", 0,
			RK2928_CLKSEL_CON(24), 8, 8, DFLAGS,
			RK2928_CLKGATE_CON(2), 8, GFLAGS),

	COMPOSITE_NOMUX(0, "spdif_pre", "i2s_src", 0,
			RK2928_CLKSEL_CON(5), 0, 7, DFLAGS,
			RK2928_CLKGATE_CON(0), 13, GFLAGS),
	COMPOSITE_FRACMUX(0, "spdif_frac", "spdif_pll", CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(9), 0,
			RK2928_CLKGATE_CON(0), 14, GFLAGS,
			&common_spdif_fracmux),
	MUX(0, "sclk_vop_src", mux_sclk_vop_src_p, 0,
			RK2928_CLKSEL_CON(27), 0, 1, MFLAGS),
	DIV(DCLK_HDMI_PHY, "dclk_hdmiphy", "sclk_vop_src", 0,
			RK2928_CLKSEL_CON(29), 0, 3, DFLAGS),
	DIV(0, "sclk_vop_pre", "sclk_vop_src", 0,
			RK2928_CLKSEL_CON(27), 8, 8, DFLAGS),
	MUX(DCLK_VOP, "dclk_vop", mux_dclk_vop_p, 0,
			RK2928_CLKSEL_CON(27), 1, 1, MFLAGS),

	FACTOR(0, "xin12m", "xin24m", 0, 1, 2),

	COMPOSITE(0, "i2s0_src", mux_pll_src_2plls_p, 0,
			RK2928_CLKSEL_CON(9), 15, 1, MFLAGS, 0, 7, DFLAGS,
			RK2928_CLKGATE_CON(0), 3, GFLAGS),
	COMPOSITE_FRACMUX(0, "i2s0_frac", "i2s0_src", CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(8), 0,
			RK2928_CLKGATE_CON(0), 4, GFLAGS,
			&rk3228_i2s0_fracmux),
	GATE(SCLK_I2S0, "sclk_i2s0", "i2s0_pre", CLK_SET_RATE_PARENT,
			RK2928_CLKGATE_CON(0), 5, GFLAGS),

	COMPOSITE(0, "i2s1_src", mux_pll_src_2plls_p, 0,
			RK2928_CLKSEL_CON(3), 15, 1, MFLAGS, 0, 7, DFLAGS,
			RK2928_CLKGATE_CON(0), 10, GFLAGS),
	COMPOSITE_FRACMUX(0, "i2s1_frac", "i2s1_src", CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(7), 0,
			RK2928_CLKGATE_CON(0), 11, GFLAGS,
			&rk3228_i2s1_fracmux),
	GATE(SCLK_I2S1, "sclk_i2s1", "i2s1_pre", CLK_SET_RATE_PARENT,
			RK2928_CLKGATE_CON(0), 14, GFLAGS),
	COMPOSITE_NODIV(SCLK_I2S_OUT, "i2s_out", mux_i2s_out_p, 0,
			RK2928_CLKSEL_CON(3), 12, 1, MFLAGS,
Beispiel #6
0
			RK2928_CLKSEL_CON(2), 7, 1, MFLAGS,
			RK2928_CLKGATE_CON(2), 5, GFLAGS),

	MUX(0, "uart_pll_clk", mux_pll_src_apll_dpll_gpll_usb480m_p, 0,
			RK2928_CLKSEL_CON(13), 10, 2, MFLAGS),
	COMPOSITE_NOMUX(0, "uart0_src", "uart_pll_clk", 0,
			RK2928_CLKSEL_CON(13), 0, 7, DFLAGS,
			RK2928_CLKGATE_CON(1), 8, GFLAGS),
	COMPOSITE_NOMUX(0, "uart1_src", "uart_pll_clk", 0,
			RK2928_CLKSEL_CON(14), 0, 7, DFLAGS,
			RK2928_CLKGATE_CON(1), 10, GFLAGS),
	COMPOSITE_NOMUX(0, "uart2_src", "uart_pll_clk", 0,
			RK2928_CLKSEL_CON(15), 0, 7, DFLAGS,
			RK2928_CLKGATE_CON(1), 12, GFLAGS),
	COMPOSITE_FRACMUX(0, "uart0_frac", "uart0_src", CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(17), 0,
			RK2928_CLKGATE_CON(1), 9, GFLAGS,
			&rk3036_uart0_fracmux),
	COMPOSITE_FRACMUX(0, "uart1_frac", "uart1_src", CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(18), 0,
			RK2928_CLKGATE_CON(1), 11, GFLAGS,
			&rk3036_uart1_fracmux),
	COMPOSITE_FRACMUX(0, "uart2_frac", "uart2_src", CLK_SET_RATE_PARENT,
			RK2928_CLKSEL_CON(19), 0,
			RK2928_CLKGATE_CON(1), 13, GFLAGS,
			&rk3036_uart2_fracmux),

	COMPOSITE(0, "aclk_vcodec", mux_pll_src_3plls_p, 0,
			RK2928_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS,
			RK2928_CLKGATE_CON(3), 11, GFLAGS),
	FACTOR_GATE(HCLK_VCODEC, "hclk_vcodec", "aclk_vcodec", 0, 1, 4,
			RK2928_CLKGATE_CON(3), 12, GFLAGS),