1
0
Fork 0

MLK-17491-21 clk: imx7ulp: fix RTC OSC clock name

'CKIL' clock name is derived from MX6 SoC series which is invalid for
MX7ULP (can't find it from RM). Changing it to the correct 'ROSC'
which is defined in RM.

The exist 'OSC' name is also changed accordingly which should be SOSC
(System OSC).

Fixes: aacf0b70af26 ("MLK-13441-6 ARM: imx: add i.mx7ulp clock driver")
Cc: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
pull/10/head
Dong Aisheng 2017-09-06 22:35:44 +08:00 committed by Jason Liu
parent 9dc495b3f7
commit fc24da6cdb
4 changed files with 32 additions and 31 deletions

View File

@ -25,8 +25,8 @@
clks_m4: scg0@41027000 {
compatible = "fsl,imx7ulp-scg0";
reg = <0x41027000 0x1000>;
clocks = <&cm4_ckil>, <&cm4_osc>, <&cm4_sirc>, <&cm4_firc>;
clock-names = "cm4_ckil", "cm4_osc", "cm4_sirc", "cm4_firc";
clocks = <&cm4_rosc>, <&cm4_sosc>, <&cm4_sirc>, <&cm4_firc>;
clock-names = "cm4_rosc", "cm4_sosc", "cm4_sirc", "cm4_firc";
#clock-cells = <1>;
};
@ -83,18 +83,18 @@
#address-cells = <1>;
#size-cells = <0>;
cm4_ckil: clock@6 {
cm4_rosc: clock@6 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "cm4_ckil";
clock-output-names = "cm4_rosc";
};
cm4_osc: clock@7 {
cm4_sosc: clock@7 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "cm4_osc";
clock-output-names = "cm4_sosc";
};
cm4_sirc: clock@8 {
@ -201,7 +201,7 @@
<&clks_m4 IMX7ULP_CM4_CLK_APLL_VCO_POST_DIV1>,
<&clks_m4 IMX7ULP_CM4_CLK_APLL_VCO_POST_DIV2>,
<&clks_m4 IMX7ULP_CM4_CLK_APLL_PFD0_PRE_DIV>;
assigned-clock-parents = <&clks_m4 IMX7ULP_CM4_CLK_OSC>;
assigned-clock-parents = <&clks_m4 IMX7ULP_CM4_CLK_SOSC>;
assigned-clock-rates = <0>, <540672000>, <49152000>, <12288000>, <270336000>;
};

View File

@ -94,18 +94,18 @@
#address-cells = <1>;
#size-cells = <0>;
ckil: clock@0 {
rosc: clock@0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "ckil";
clock-output-names = "rosc";
};
osc: clock@1 {
sosc: clock@1 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "osc";
clock-output-names = "sosc";
};
sirc: clock@2 {
@ -202,7 +202,7 @@
reg = <0x40250000 0x1000>;
nxp,pwm-number = <6>;
assigned-clocks = <&clks IMX7ULP_CLK_LPTPM4>;
assigned-clock-parents = <&clks IMX7ULP_CLK_OSC>;
assigned-clock-parents = <&clks IMX7ULP_CLK_SOSC>;
clocks = <&clks IMX7ULP_CLK_LPTPM4>;
#pwm-cells = <2>;
};
@ -283,7 +283,7 @@
clocks = <&clks IMX7ULP_CLK_LPUART4>;
clock-names = "ipg";
assigned-clocks = <&clks IMX7ULP_CLK_LPUART4>;
assigned-clock-parents = <&clks IMX7ULP_CLK_OSC>;
assigned-clock-parents = <&clks IMX7ULP_CLK_SOSC>;
assigned-clock-rates = <24000000>;
status = "disabled";
};
@ -388,14 +388,14 @@
clks: scg1@403E0000 {
compatible = "fsl,imx7ulp-scg1";
reg = <0x403E0000 0x10000>;
clocks = <&ckil>, <&osc>, <&sirc>,
clocks = <&rosc>, <&sosc>, <&sirc>,
<&firc>, <&upll>, <&mpll>;
clock-names = "ckil", "osc", "sirc",
clock-names = "rosc", "sosc", "sirc",
"firc", "upll", "mpll";
#clock-cells = <1>;
assigned-clocks = <&clks IMX7ULP_CLK_LPTPM5>,
<&clks IMX7ULP_CLK_USDHC1>;
assigned-clock-parents = <&clks IMX7ULP_CLK_OSC>,
assigned-clock-parents = <&clks IMX7ULP_CLK_SOSC>,
<&clks IMX7ULP_CLK_NIC1_DIV>;
};

View File

@ -20,29 +20,30 @@
#include "clk.h"
static const char *pll_pre_sels[] = { "osc", "firc", };
static const char *pll_pre_sels[] = { "sosc", "firc", };
static const char *spll_pfd_sels[] = { "spll_pfd0", "spll_pfd1", "spll_pfd2", "spll_pfd3", };
static const char *spll_sels[] = { "spll", "spll_pfd_sel", };
static const char *apll_pfd_sels[] = { "apll_pfd0", "apll_pfd1", "apll_pfd2", "apll_pfd3", };
static const char *apll_sels[] = { "apll", "apll_pfd_sel", };
static const char *sys_sels[] = { "dummy", "osc", "sirc", "firc", "ckil", "apll_sel", "spll_sel", "upll", };
static const char *sys_sels[] = { "dummy", "sosc", "sirc", "firc", "rosc", "apll_sel", "spll_sel", "upll", };
static const char *arm_sels[] = { "core_div", "dummy", "dummy", "hsrun_core", };
static const char *ddr_sels[] = { "apll_pfd_sel", "upll", };
static const char *nic_sels[] = { "firc", "ddr_div", };
static const char *periph_plat_sels[] = { "dummy", "nic1_bus", "nic1_div", "ddr_div", "apll_pfd2", "apll_pfd1", "apll_pfd0", "upll", };
/* the dummy in only a space holder of spll_bus clk */
static const char *periph_slow_sels[] = { "dummy", "osc", "dummy", "firc", "ckil", "nic1_bus", "nic1_div", "dummy", };
static const char *periph_slow_sels[] = { "dummy", "sosc", "dummy", "firc", "rosc", "nic1_bus", "nic1_div", "dummy", };
static struct clk *clks[IMX7ULP_CLK_END];
static struct clk_onecell_data clk_data;
static const char *cm4_pll_pre_sels[] = { "cm4_osc", "cm4_firc", };
static const char *cm4_pll_pre_sels[] = { "cm4_sosc", "cm4_firc", };
static const char *cm4_spll_pfd_sels[] = { "cm4_spll_pfd0", "cm4_spll_pfd1", "cm4_spll_pfd2", "cm4_spll_pfd3", };
static const char *cm4_spll_sels[] = { "cm4_spll_vco", "cm4_spll_pfd_sel", };
static const char *cm4_apll_pfd_sels[] = { "cm4_apll_pfd0", "cm4_apll_pfd1", "cm4_apll_pfd2", "cm4_apll_pfd3", };
static const char *cm4_apll_sels[] = { "cm4_apll_vco_post_div2", "cm4_apll_pfd_sel", };
static const char *cm4_sys_sels[] = { "cm4_dummy", "cm4_osc", "cm4_sirc", "cm4_firc", "cm4_ckil", "cm4_apll_sel", "cm4_spll_sel", "cm4_dummy", };
static const char *cm4_periph_slow_sels[] = { "cm4_dummy", "cm4_osc", "cm4_sirc", "cm4_firc", "cm4_ckil", "cm4_bus_div", "cm4_spll_pfd2", "cm4_apll_pfd0_pre_div", };
static const char *scg0_clkout_sels[] = { "dummy", "cm4_osc", "cm4_sirc", "cm4_firc", "cm4_ckil", "cm4_apll_sel", "cm4_spll_sel", "dummy"};
static const char *cm4_sys_sels[] = { "cm4_dummy", "cm4_sosc", "cm4_sirc", "cm4_firc", "cm4_rosc", "cm4_apll_sel", "cm4_spll_sel", "cm4_dummy", };
static const char *cm4_periph_slow_sels[] = { "cm4_dummy", "cm4_sosc", "cm4_sirc", "cm4_firc", "cm4_rosc", "cm4_bus_div", "cm4_spll_pfd2", "cm4_apll_pfd0_pre_div", };
static const char *scg0_clkout_sels[] = { "dummy", "cm4_sosc", "cm4_sirc", "cm4_firc", "cm4_rosc", "cm4_apll_sel", "cm4_spll_sel", "dummy"};
static struct clk *clks_cm4[IMX7ULP_CM4_CLK_END];
static struct clk_onecell_data clk_data_cm4;
@ -70,8 +71,8 @@ static void __init imx7ulp_clocks_init(struct device_node *scg_node)
clks[IMX7ULP_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
clks[IMX7ULP_CLK_CKIL] = of_clk_get_by_name(scg_node, "ckil");
clks[IMX7ULP_CLK_OSC] = of_clk_get_by_name(scg_node, "osc");
clks[IMX7ULP_CLK_ROSC] = of_clk_get_by_name(scg_node, "rosc");
clks[IMX7ULP_CLK_SOSC] = of_clk_get_by_name(scg_node, "sosc");
clks[IMX7ULP_CLK_SIRC] = of_clk_get_by_name(scg_node, "sirc");
clks[IMX7ULP_CLK_FIRC] = of_clk_get_by_name(scg_node, "firc");
clks[IMX7ULP_CLK_MIPI_PLL] = of_clk_get_by_name(scg_node, "mpll");
@ -215,8 +216,8 @@ static void __init imx7ulp_cm4_clocks_init(struct device_node *scg_node)
clks_cm4[IMX7ULP_CM4_CLK_DUMMY] = imx_clk_fixed("cm4_dummy", 0);
clks_cm4[IMX7ULP_CM4_CLK_CKIL] = of_clk_get_by_name(scg_node, "cm4_ckil");
clks_cm4[IMX7ULP_CM4_CLK_OSC] = of_clk_get_by_name(scg_node, "cm4_osc");
clks_cm4[IMX7ULP_CM4_CLK_ROSC] = of_clk_get_by_name(scg_node, "cm4_rosc");
clks_cm4[IMX7ULP_CM4_CLK_SOSC] = of_clk_get_by_name(scg_node, "cm4_sosc");
clks_cm4[IMX7ULP_CM4_CLK_SIRC] = of_clk_get_by_name(scg_node, "cm4_sirc");
clks_cm4[IMX7ULP_CM4_CLK_FIRC] = of_clk_get_by_name(scg_node, "cm4_firc");

View File

@ -12,8 +12,8 @@
#define __DT_BINDINGS_CLOCK_IMX7ULP_H
#define IMX7ULP_CLK_DUMMY 0
#define IMX7ULP_CLK_CKIL 1
#define IMX7ULP_CLK_OSC 2
#define IMX7ULP_CLK_ROSC 1
#define IMX7ULP_CLK_SOSC 2
#define IMX7ULP_CLK_FIRC 3
/* SCG1 */
@ -110,8 +110,8 @@
/*cm4 clocks*/
#define IMX7ULP_CM4_CLK_DUMMY 0
#define IMX7ULP_CM4_CLK_CKIL 1
#define IMX7ULP_CM4_CLK_OSC 2
#define IMX7ULP_CM4_CLK_ROSC 1
#define IMX7ULP_CM4_CLK_SOSC 2
#define IMX7ULP_CM4_CLK_FIRC 3
#define IMX7ULP_CM4_CLK_SIRC 4