clock-frequency = <50000000>;
};
- stg_apb: stg_apb {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <51200000>;
- };
-
gmac0_rmii_refin: gmac0_rmii_refin {
compatible = "fixed-clock";
#clock-cells = <0>;
<&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
<&tdm_ext>, <&mclk_ext>,
<&jtag_tck_inner>, <&bist_apb>,
- <&stg_apb>, <&clk_rtc>,
+ <&clk_rtc>,
<&gmac0_rmii_refin>, <&gmac0_rgmii_rxin>;
clock-names = "osc", "gmac1_rmii_refin",
"gmac1_rgmii_rxin",
"i2srx_bclk_ext", "i2srx_lrck_ext",
"tdm_ext", "mclk_ext",
"jtag_tck_inner", "bist_apb",
- "stg_apb", "clk_rtc",
+ "clk_rtc",
"gmac0_rmii_refin", "gmac0_rgmii_rxin";
#clock-cells = <1>;
starfive,sys-syscon = <&sys_syscon 0x18 0x1c
/* external clocks */
#define JH7110_OSC (JH7110_CLK_END + 0)
-/* stg external clocks */
-#define JH7110_STG_APB (JH7110_CLK_END + 11)
static const struct jh7110_clk_data jh7110_clk_stg_data[] __initconst = {
//hifi4
priv->pll[PLL_OF(JH7110_STG_SYSCON_PCLK)] =
devm_clk_hw_register_fixed_factor(priv->dev,
"u0_stg_syscon_pclk", "stg_apb", 0, 1, 1);
+ priv->pll[PLL_OF(JH7110_STG_APB)] =
+ devm_clk_hw_register_fixed_factor(priv->dev,
+ "stg_apb", "apb_bus", 0, 1, 1);
for (idx = JH7110_CLK_SYS_REG_END; idx < JH7110_CLK_STG_REG_END; idx++) {
u32 max = jh7110_clk_stg_data[idx].max;
for (i = 0; i < init.num_parents; i++) {
unsigned int pidx = jh7110_clk_stg_data[idx].parents[i];
- if (pidx < JH7110_CLK_STG_REG_END)
+ if (pidx < JH7110_CLK_REG_END )
parents[i].hw = &priv->reg[pidx].hw;
else if ((pidx < JH7110_CLK_STG_END) &&
- (pidx > JH7110_CLK_SYS_END))
+ (pidx > (JH7110_CLK_SYS_END - 1)))
parents[i].hw = priv->pll[PLL_OF(pidx)];
else if (pidx == JH7110_OSC)
parents[i].fw_name = "osc";
- else if (pidx == JH7110_STG_APB)
- parents[i].fw_name = "stg_apb";
}
clk->hw.init = &init;
#define JH7110_E2_IRQ_SYNC_CLK_CORE 324
#define JH7110_STG_CRG_PCLK 325
#define JH7110_STG_SYSCON_PCLK 326
+#define JH7110_STG_APB 327
-#define JH7110_CLK_STG_END 327
+#define JH7110_CLK_STG_END 328
/* aon other */
-#define JH7110_U0_GMAC5_CLK_PTP 327
-#define JH7110_U0_GMAC5_CLK_RMII 328
-#define JH7110_AON_SYSCON_PCLK 329
-#define JH7110_AON_IOMUX_PCLK 330
-#define JH7110_AON_CRG_PCLK 331
-#define JH7110_PMU_CLK_APB 332
-#define JH7110_PMU_CLK_WKUP 333
-#define JH7110_RTC_HMS_CLK_OSC32K_G 334
-#define JH7110_32K_OUT 335
-#define JH7110_RESET0_CTRL_CLK_SRC 336
+#define JH7110_U0_GMAC5_CLK_PTP 328
+#define JH7110_U0_GMAC5_CLK_RMII 329
+#define JH7110_AON_SYSCON_PCLK 330
+#define JH7110_AON_IOMUX_PCLK 331
+#define JH7110_AON_CRG_PCLK 332
+#define JH7110_PMU_CLK_APB 333
+#define JH7110_PMU_CLK_WKUP 334
+#define JH7110_RTC_HMS_CLK_OSC32K_G 335
+#define JH7110_32K_OUT 336
+#define JH7110_RESET0_CTRL_CLK_SRC 337
/* aon other and source */
-#define JH7110_PCLK_MUX_FUNC_PCLK 337
-#define JH7110_PCLK_MUX_BIST_PCLK 338
+#define JH7110_PCLK_MUX_FUNC_PCLK 338
+#define JH7110_PCLK_MUX_BIST_PCLK 339
-#define JH7110_CLK_END 339
+#define JH7110_CLK_END 340
#endif /* __DT_BINDINGS_CLOCK_STARFIVE_JH7110_H__ */