ARM: qcom: Disable i2c device on gsbi4 for ipq806x
PATCH 1/1 ARM: qcom: Disable i2c device on gsbi4 for ipq806x
Disable the i2c device on gsbi4 and mark gsbi4_h and gsbi4_qup clks as unused. If they are enabled, clock framework will turn them off at end of probe. On ipq806x by design gsbi4_qup, gsbi4_h clks and i2c on gsbi4 are meant for RPM usage. So turning them off in kernel is incorrect.
--- arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 9 --------- drivers/clk/qcom/gcc-ipq806x.c | 5 +++-- 2 files changed, 3 insertions(+), 11 deletions(-)
arch/arm/boot/dts/qcom-ipq8064-ap148.dts +0 -9
@@ -21,14 +21,5 @@ mux { }; }; }; - - gsbi@16300000 { - i2c@16380000 { - status = "ok"; - clock-frequency = <200000>; - pinctrl-0 = <&i2c4_pins>; - pinctrl-names = "default"; - }; - }; }; };
drivers/clk/qcom/gcc-ipq806x.c +3 -2
@@ -782,7 +782,7 @@ static struct clk_rcg gsbi4_qup_src = { .parent_names = gcc_pxo_pll8, .num_parents = 2, .ops = &clk_rcg_ops, - .flags = CLK_SET_PARENT_GATE, + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED, }, }, };
@@ -798,7 +798,7 @@ static struct clk_branch gsbi4_qup_clk = { .parent_names = (const char *[]){ "gsbi4_qup_src" }, .num_parents = 1, .ops = &clk_branch_ops, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, }, }, };
@@ -991,6 +991,7 @@ static struct clk_branch gsbi4_h_clk = { .hw.init = &(struct clk_init_data){ .name ="gsbi4_h_clk" , .ops = &clk_branch_ops, + .flags =CLK_IGNORE_UNUSED , }, }, };
Signature · 1 line
2.25.0
Stephen Boyd
maintainerQuoting Ansuel Smith (2020-03-13 12:58:16)
Quoted 24 lines
arch/arm/boot/dts/qcom-ipq8064-ap148.dts +0
-9@@ -21,14 +21,5 @@ mux { }; }; }; - - gsbi@16300000 { - i2c@16380000 { - status = "ok"; - clock-frequency = <200000>; - pinctrl-0 = <&i2c4_pins>; - pinctrl-names = "default"; - }; - }; }; };drivers/clk/qcom/gcc-ipq806x.c +0
-0
drivers/clk/qcom/gcc-ipq806x.c static struct clk_rcg gsbi4_qup_src = { · line 785
Quoted 5 lines
drivers/clk/qcom/gcc-ipq806x.c +1
-1@@ -782,7 +782,7 @@ static struct clk_rcg gsbi4_qup_src = { .parent_names = gcc_pxo_pll8, .num_parents = 2, .ops = &clk_rcg_ops, - .flags = CLK_SET_PARENT_GATE, + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
A better solution is to use the protected-clocks property so we don't try to touch these clks at all on this device. So this whole patch can be routed through arm-soc and remove the i2c node and add some dt property to the gcc node.
Quoted 3 lines
drivers/clk/qcom/gcc-ipq806x.c +0
-0}, }, };
R: [PATCH] ARM: qcom: Disable i2c device on gsbi4 for ipq806x
Quoted 23 lines
Quoting Ansuel Smith (2020-03-13 12:58:16)
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/boot/dts/qcom-ipq8064-ap148.dtsdrivers/clk/qcom/gcc-
Quoted 19 lines
index
554c65e7aa0e..580aec63030d100644arch/arm/boot/dts/qcom-ipq8064-ap148.dts +0
-9@@ -21,14 +21,5 @@ mux { }; }; }; - - gsbi@16300000 { - i2c@16380000 { - status = "ok"; - clock-frequency = <200000>; - pinctrl-0 = <&i2c4_pins>; - pinctrl-names = "default"; - }; - }; }; };drivers/clk/qcom/gcc- renamed from drivers/clk/qcom/gcc-ipq806x.c +0
-0
ipq806x.c
Quoted 15 lines
drivers/clk/qcom/gcc-ipq806x.c static struct clk_rcg gsbi4_qup_src = { · line 785
Quoted 9 lines
index
b0eee0903807..75706807e6cf100644drivers/clk/qcom/gcc-ipq806x.c +1
-1@@ -782,7 +782,7 @@ static struct clk_rcg gsbi4_qup_src = { .parent_names = gcc_pxo_pll8, .num_parents = 2, .ops = &clk_rcg_ops, - .flags = CLK_SET_PARENT_GATE, + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,A better solution is to use the protected-clocks property so we don't try to touch these clks at all on this device. So this whole patch can be routed through arm-soc and remove the i2c node and add some dt property to the gcc node.
Should I add a comment where the i2c is removed or I can remove it directly?
Quoted 3 lines
Quoted 3 lines
drivers/clk/qcom/gcc-ipq806x.c +0
-0}, }, };
Re: R: [PATCH] ARM: qcom: Disable i2c device on gsbi4 for ipq806x
Quoted 39 lines · On Fri 13 Mar 15:34 PDT 2020, [email protected] wrote:
Quoted 23 lines
Quoting Ansuel Smith (2020-03-13 12:58:16)
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/boot/dts/qcom-ipq8064-ap148.dtsdrivers/clk/qcom/gcc-
Quoted 19 lines
index
554c65e7aa0e..580aec63030d100644arch/arm/boot/dts/qcom-ipq8064-ap148.dts +0
-9@@ -21,14 +21,5 @@ mux { }; }; }; - - gsbi@16300000 { - i2c@16380000 { - status = "ok"; - clock-frequency = <200000>; - pinctrl-0 = <&i2c4_pins>; - pinctrl-names = "default"; - }; - }; }; };drivers/clk/qcom/gcc- renamed from drivers/clk/qcom/gcc-ipq806x.c +0
-0
ipq806x.cQuoted 15 lines
drivers/clk/qcom/gcc-ipq806x.c static struct clk_rcg gsbi4_qup_src = { · line 785
Quoted 9 lines
index
b0eee0903807..75706807e6cf100644drivers/clk/qcom/gcc-ipq806x.c +1
-1@@ -782,7 +782,7 @@ static struct clk_rcg gsbi4_qup_src = { .parent_names = gcc_pxo_pll8, .num_parents = 2, .ops = &clk_rcg_ops, - .flags = CLK_SET_PARENT_GATE, + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,A better solution is to use the protected-clocks property so we don't try to touch these clks at all on this device. So this whole patch can be routed through arm-soc and remove the i2c node and add some dt property to the gcc node.
Quoted 3 lines
Should I add a comment where the i2c is removed or I can remove it directly?
It's fine that you just remove it, like you proposed above.
The commit message should describe the reason and per your description I don't expect that anyone will miss the node...
Regards,
Bjorn
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
drivers/clk/qcom/gcc-ipq806x.c +0
-0}, }, };