Clock support for rk3066,rk3188 and rk3288
Subsystems (5)
Heiko Stübner
maintainerv5 cover Clock support for rk3066,rk3188 and rk3288
This series adds a clock driver infrastructure for Rockchip SoCs in general and clock-definitions for the RK3188 and RK3288 in particular.
Apart from the arch/arm patches included here, there are some more in the waiting line, like adding the i2c nodes and possibly the pwm, i2s and spi nodes if the relevant drivers get accepted, where the ids defined in the dt-binding headers are needed.
So if the whole thing is acceptable could we either offer a branch from the clk-tree that can get merged or take the whole series through the arm tree?
changes since v4.2:
- fix uninitialized compiler warning in patch4
- add cleanup patch for clk-composite from Mike Turquette
- fix some softrst-issues in patch6
changes since v4.1:
- forgot the From override, Boris is the original author changes since v4:
- address comments from Gabriel Fernandez
- use abs()
- init best_rate
changes since v3:
- add rk3288 clock controller
- add reset controller ids
- fix some incorrect values in rk3188-cru and export some more clocks
- fold new rk3066 clock tree into the rk3188 one, as can be easily seen the differences are not really big between them
- expand the composite fix description to highlight the underlying issue changes since v2:
- drop the special cpuclk type until coordinated range changes matured, as mentioned in the Samsung cpufreq thread.
- add the patch from Boris BREZILLON that reenables correct rate calculations in composite clocks
- change pll handling to better handle the pll output mux and also the enabling/disabling of the pll clock
- change core code to handle composite clock branches instead of individual basic clock definitions
- use the newly defined GRF syscon instead of mapping a grf register individually
changes since v1:
- adapt to apply on current clk-next branch
- add saradc clock
- add rk3188a cru, which has a slightly different handling of one pll value (bwadj)
Boris BREZILLON (1):
clk: composite: support determine_rate using rate_ops->round_rate +
mux_ops->set_parent
Heiko Stuebner (12):
clk: composite: allow read-only clocks
clk: rockchip: add basic infrastructure for clock branches
clk: rockchip: add clock type for pll clocks and pll used on rk3066
clk: rockchip: add reset controller
dt-bindings: add documentation for rk3188 clock and reset unit
clk: rockchip: add clock driver for rk3188 and rk3066 clocks
dt-bindings: add documentation for rk3288 cru
clk: rockchip: add clock controller for rk3288
ARM: rockchip: Select ARCH_HAS_RESET_CONTROLLER
ARM: dts: rockchip: add cru nodes and update device clocks to use it
ARM: dts: rockchip: move oscillator input clock into main dtsi
arm: dts: rockchip: remove obsolete clock gate definitions
Mike Turquette (1):
clk: composite: improve rate_hw sanity check logic
.../bindings/clock/rockchip,rk3188-cru.txt | 61 ++ .../bindings/clock/rockchip,rk3288-cru.txt | 61 ++ .../devicetree/bindings/clock/rockchip.txt | 3 + arch/arm/boot/dts/rk3066a-clocks.dtsi | 299 --------- arch/arm/boot/dts/rk3066a.dtsi | 30 +- arch/arm/boot/dts/rk3188-clocks.dtsi | 289 --------- arch/arm/boot/dts/rk3188.dtsi | 19 +- arch/arm/boot/dts/rk3xxx.dtsi | 22 +- arch/arm/mach-rockchip/Kconfig | 1 + drivers/clk/clk-composite.c | 79 ++- drivers/clk/rockchip/Makefile | 6 + drivers/clk/rockchip/clk-pll.c | 431 +++++++++++++ drivers/clk/rockchip/clk-rk3188.c | 672 +++++++++++++++++++ drivers/clk/rockchip/clk-rk3288.c | 717 +++++++++++++++++++++ drivers/clk/rockchip/clk.c | 244 +++++++ drivers/clk/rockchip/clk.h | 347 ++++++++++ drivers/clk/rockchip/softrst.c | 118 ++++ include/dt-bindings/clock/rk3066a-cru.h | 35 + include/dt-bindings/clock/rk3188-cru-common.h | 249 +++++++ include/dt-bindings/clock/rk3188-cru.h | 51 ++ include/dt-bindings/clock/rk3288-cru.h | 278 ++++++++ 21 files changed, 3386 insertions(+), 626 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt delete mode 100644 arch/arm/boot/dts/rk3066a-clocks.dtsi delete mode 100644 arch/arm/boot/dts/rk3188-clocks.dtsi create mode 100644 drivers/clk/rockchip/clk-pll.c create mode 100644 drivers/clk/rockchip/clk-rk3188.c create mode 100644 drivers/clk/rockchip/clk-rk3288.c create mode 100644 drivers/clk/rockchip/clk.c create mode 100644 drivers/clk/rockchip/clk.h create mode 100644 drivers/clk/rockchip/softrst.c create mode 100644 include/dt-bindings/clock/rk3066a-cru.h create mode 100644 include/dt-bindings/clock/rk3188-cru-common.h create mode 100644 include/dt-bindings/clock/rk3188-cru.h create mode 100644 include/dt-bindings/clock/rk3288-cru.h
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 1/14 clk: composite: support determine_rate using rate_ops->round_rate + mux_ops->set_parent
From: Boris BREZILLON <[email protected]>
In case the rate_hw does not implement determine_rate, but only round_rate we fallback to best_parent selection if mux_hw is present and support reparenting.
This also fixes a rate calculation problem when using the standard div and mux ops, as in this case currently only the mux->determine_rate is used in the composite rate calculation.
So when for example the composite clock has two parents at 600 and 800MHz, the requested rate is 75MHz, which the divider could provide, without this change the rate would be set 600MHz ignoring the divider completely. This may be way out of spec for the component.
on a stih416 board
---
Gabriel, I hope it is ok that I converted test-success to a Tested-by-Tag :-)
drivers/clk/clk-composite.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-)
drivers/clk/clk-composite.c +47 -1
@@ -64,11 +64,56 @@ static long clk_composite_determine_rate(struct clk_hw *hw, unsigned long rate,const struct clk_ops *mux_ops = composite->mux_ops;struct clk_hw *rate_hw = composite->rate_hw;struct clk_hw *mux_hw = composite->mux_hw; +struct clk *parent; +unsigned long parent_rate; +long tmp_rate, best_rate =0 ; +unsigned long rate_diff; +unsigned long best_rate_diff =ULONG_MAX ; +int i;if (rate_hw && rate_ops && rate_ops->determine_rate) { rate_hw->clk = hw->clk;return rate_ops->determine_rate (rate_hw, rate, best_parent_rate, best_parent_p); + }else if (rate_hw && rate_ops && rate_ops->round_rate && + mux_hw && mux_ops && mux_ops->set_parent) { + *best_parent_p =NULL ; + +if (__clk_get_flags (hw->clk) &CLK_SET_RATE_NO_REPARENT ) { + *best_parent_p =clk_get_parent (mux_hw->clk); + *best_parent_rate =__clk_get_rate (*best_parent_p); + +return rate_ops->round_rate (rate_hw, rate, + best_parent_rate); + } + +for (i =0 ; i <__clk_get_num_parents (mux_hw->clk); i++) { + parent =clk_get_parent_by_index (mux_hw->clk, i); +if (!parent) +continue ; + + parent_rate =__clk_get_rate (parent); + + tmp_rate = rate_ops->round_rate (rate_hw, rate, + &parent_rate); +if (tmp_rate <0 ) +continue ; + + rate_diff =abs (rate - tmp_rate); + +if (!rate_diff || !*best_parent_p + || best_rate_diff > rate_diff) { + *best_parent_p = parent; + *best_parent_rate = parent_rate; + best_rate_diff = rate_diff; + best_rate = tmp_rate; + } + +if (!rate_diff) +return rate; + } + +return best_rate; }else if (mux_hw && mux_ops && mux_ops->determine_rate) { mux_hw->clk = hw->clk; return mux_ops->determine_rate(mux_hw, rate, best_parent_rate,
@@ -196,7 +241,8 @@ struct clk *clk_register_composite(struct device *dev, const char *name, composite->rate_hw = rate_hw; composite->rate_ops = rate_ops; clk_composite_ops->recalc_rate = clk_composite_recalc_rate; -if (rate_ops->determine_rate) +if (rate_ops->determine_rate || + (rate_ops->round_rate && clk_composite_ops->set_parent)) clk_composite_ops->determine_rate = clk_composite_determine_rate; }
Signature · 1 line
1.9.0
PATCH v5 1/14 clk: composite: support determine_rate using rate_ops->round_rate + mux_ops->set_parent
Hi Heiko,
Sorry for the delay...
I have tested your patch with below cases.
-----
| |
CH0 -----------+--| | ----- CLK1
| | MUX |-------| DIV |-----
CH1 ----+---------| | -----
| | | |
| | -----
| |
| | -----
| | | |
| +--| | ----- CLK2
| | | MUX |-------| DIV |-----
+---------| | -----
| | | |
| | -----
| |
| | -----
| | | |
| +--| | ----- CLK3
| | MUX |-------| DIV |-----
+---------| | -----
| |
-----CH0 = 297000000 Hz
CH1 = 148352000 Hz
i set:
CLK1 -> 297000000
CLK2 -> 148352000
CLK3 -> 148352000/2
I was a little confused first time because CLK1,CLK2,CL3 had the clk_flags set to CLK_SET_RATE_PARENT.
result
set rate CLK1 -> 297000000
---> CLK1 = 297000000 (parent CH0)
set rate CLK2 -> 148352000
---> CLK1 = 297000000 (parent CH0)
---> CLK2 = 148352000 (parent CH1)
set rate CLK3 -> 148352000/2
---> CLK1 = 148352000/2 (parent CH0)
---> CLK2 = 148352000 (parent CH1)
---> CLK3 = 148352000/2 (parent CH0)
We try to find the best parent but without considering the DIV... For me output clocks are not at all predictable in this case. what is your feeling about that ? is it a true probleme or a bad use case ?
If clk_flags NOT set to CLK_SET_RATE_PARENT it's ok for me
result
set rate CLK1 -> 297000000
---> CLK1 = 297000000 (parent CH0)
set rate CLK2 -> 148352000
---> CLK1 = 297000000 (parent CH0)
---> CLK2 = 148352000 (parent CH1)
set rate CLK3 -> 148352000/2
---> CLK1 = 297000000 (parent CH0)
---> CLK2 = 148352000 (parent CH1)
---> CLK3 = 148352000/2 (parent CH0)
Quoted 109 lines · Heiko St?bner
From: Boris BREZILLON <[email protected]>
In case the
rate_hwdoes not implementdetermine_rate, but onlyround_ratewe fallback tobest_parentselection ifmux_hwis present and support reparenting.Signed-off-by Boris BREZILLON <[email protected]>This also fixes a rate calculation problem when using the standard div and mux ops, as in this case currently only the
mux->determine_rateis used in the composite rate calculation.
So when for example the composite clock has two parents at 600 and 800MHz, the requested rate is 75MHz, which the divider could provide, without this change the rate would be set 600MHz ignoring the divider completely. This may be way out of spec for the component.[fixed the output to actually return a rate instead of the diff]Signed-off-by Heiko Stuebner <[email protected]>Acked-by Max Schwarz <[email protected]>Tested-by Max Schwarz <[email protected]>on a stih416 board
Tested-by Gabriel Fernandez <[email protected]>---
Gabriel, I hope it is ok that I converted test-success to a Tested-by-Tag :-)drivers/clk/clk-composite.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-)drivers/clk/clk-composite.c +47
-2@@ -64,11 +64,56 @@ static long clk_composite_determine_rate(struct clk_hw *hw, unsigned long rate,const struct clk_ops *mux_ops = composite->mux_ops;struct clk_hw *rate_hw = composite->rate_hw;struct clk_hw *mux_hw = composite->mux_hw; +struct clk *parent; +unsigned long parent_rate; +long tmp_rate, best_rate =0 ; +unsigned long rate_diff; +unsigned long best_rate_diff =ULONG_MAX ; +int i;if (rate_hw && rate_ops && rate_ops->determine_rate) { rate_hw->clk = hw->clk;return rate_ops->determine_rate (rate_hw, rate, best_parent_rate, best_parent_p); + }else if (rate_hw && rate_ops && rate_ops->round_rate && + mux_hw && mux_ops && mux_ops->set_parent) { + *best_parent_p =NULL ; + +if (__clk_get_flags (hw->clk) &CLK_SET_RATE_NO_REPARENT ) { + *best_parent_p =clk_get_parent (mux_hw->clk); + *best_parent_rate =__clk_get_rate (*best_parent_p); + +return rate_ops->round_rate (rate_hw, rate, + best_parent_rate); + } + +for (i =0 ; i <__clk_get_num_parents (mux_hw->clk); i++) { + parent =clk_get_parent_by_index (mux_hw->clk, i); +if (!parent) +continue ; + + parent_rate =__clk_get_rate (parent); + + tmp_rate = rate_ops->round_rate (rate_hw, rate, + &parent_rate); +if (tmp_rate <0 ) +continue ; + + rate_diff =abs (rate - tmp_rate); + +if (!rate_diff || !*best_parent_p + || best_rate_diff > rate_diff) { + *best_parent_p = parent; + *best_parent_rate = parent_rate; + best_rate_diff = rate_diff; + best_rate = tmp_rate; + } + +if (!rate_diff) +return rate; + } + +return best_rate; }else if (mux_hw && mux_ops && mux_ops->determine_rate) { mux_hw->clk = hw->clk; return mux_ops->determine_rate(mux_hw, rate, best_parent_rate,@@ -196,7 +241,8 @@ struct clk *clk_register_composite(struct device *dev, const char *name, composite->rate_hw = rate_hw; composite->rate_ops = rate_ops; clk_composite_ops->recalc_rate = clk_composite_recalc_rate; -if (rate_ops->determine_rate) +if (rate_ops->determine_rate || + (rate_ops->round_rate && clk_composite_ops->set_parent)) clk_composite_ops->determine_rate = clk_composite_determine_rate; } --1.9.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Heiko Stübner
maintainerPATCH v5 1/14 clk: composite: support determine_rate using rate_ops->round_rate + mux_ops->set_parent
Am Freitag, 18. Juli 2014, 15:55:55 schrieb Gabriel Fernandez:
Quoted 70 lines
Hi Heiko,
Sorry for the delay...I have tested your patch with below cases.
-----CH0 -----------+--| | ----- CLK1
| | MUX |-------| DIV |-----CH1 ----+---------| | -----
| | ----- | | | | ----- | | +--| | ----- CLK2 | | | | MUX |-------| DIV |-----+---------| | ----- | | ----- | | | | ----- | | +--| | ----- CLK3 | | | MUX |-------| DIV |----- +---------| | ----- -----CH0 = 297000000 Hz
CH1 = 148352000 Hzi set:
CLK1 -> 297000000
CLK2 -> 148352000
CLK3 -> 148352000/2I was a little confused first time because CLK1,CLK2,CL3 had the
clk_flagsset toCLK_SET_RATE_PARENT.result
set rate CLK1 -> 297000000
---> CLK1 = 297000000 (parent CH0)set rate CLK2 -> 148352000
---> CLK1 = 297000000 (parent CH0)
---> CLK2 = 148352000 (parent CH1)set rate CLK3 -> 148352000/2
---> CLK1 = 148352000/2 (parent CH0)
---> CLK2 = 148352000 (parent CH1)
---> CLK3 = 148352000/2 (parent CH0)We try to find the best parent but without considering the DIV... For me output clocks are not at all predictable in this case. what is your feeling about that ? is it a true probleme or a bad use case ?
If
clk_flagsNOT set toCLK_SET_RATE_PARENTit's ok for meresult
set rate CLK1 -> 297000000
---> CLK1 = 297000000 (parent CH0)
Quoted 8 lines
set rate CLK2 -> 148352000
---> CLK1 = 297000000 (parent CH0)
---> CLK2 = 148352000 (parent CH1)set rate CLK3 -> 148352000/2
---> CLK1 = 297000000 (parent CH0)
---> CLK2 = 148352000 (parent CH1)
---> CLK3 = 148352000/2 (parent CH0)
ok, so when CLK_SET_RATE_PARENT is set, the clock framework essentially sets the CHx frequency to something new while without it it just uses the mux and divider so create a suitable frequency.
I guess, the rate_ops->round_rate is modifying the parent rate, as the CHx sources support changing them. But I'm wondering if the clock framework shouldn't prevent the parent clock from being lowered.
Also I'm not even sure if a traditional setup of mux + divider clocks wouldn't produce a similar result in the example above. Because when looking at __clk_mux_determine_rate it looks very similar [__clk_round_is used for the CLK_SET_RATE_PARENT case] and thus might even produce the same result.
Heiko
Quoted 129 lines · Heiko St?bner
Quoted 127 lines
From: Boris BREZILLON <[email protected]>
In case the
rate_hwdoes not implementdetermine_rate, but onlyround_ratewe fallback tobest_parentselection ifmux_hwis present and support reparenting.Signed-off-by Boris BREZILLON <[email protected]>This also fixes a rate calculation problem when using the standard div and mux ops, as in this case currently only the
mux->determine_rateis used in the composite rate calculation.
So when for example the composite clock has two parents at 600 and 800MHz, the requested rate is 75MHz, which the divider could provide, without this change the rate would be set 600MHz ignoring the divider completely. This may be way out of spec for the component.[fixed the output to actually return a rate instead of the diff]Signed-off-by Heiko Stuebner <[email protected]>Acked-by Max Schwarz <[email protected]>Tested-by Max Schwarz <[email protected]>on a stih416 board
Tested-by Gabriel Fernandez <[email protected]>---
Gabriel, I hope it is ok that I converted test-success to a Tested-by-Tag :-)>drivers/clk/clk-composite.c | 48++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-)
drivers/clk/clk-composite.c +13
-0@@ -64,11 +64,56 @@ static long clk_composite_determine_rate(struct clk_hw *hw, unsigned long rate,>const struct clk_ops *mux_ops = composite->mux_ops;struct clk_hw *rate_hw = composite->rate_hw;struct clk_hw *mux_hw = composite->mux_hw; +struct clk *parent; +unsigned long parent_rate; +long tmp_rate, best_rate =0 ; +unsigned long rate_diff; +unsigned long best_rate_diff =ULONG_MAX ; +int i;if (rate_hw && rate_ops && rate_ops->determine_rate) { rate_hw->clk = hw->clk;return rate_ops->determine_rate (rate_hw, rate, best_parent_rate, best_parent_p); + }else if (rate_hw && rate_ops && rate_ops->round_rate && + mux_hw && mux_ops && mux_ops->set_parent) { + *best_parent_p =NULL ; + +if (__clk_get_flags (hw->clk) &CLK_SET_RATE_NO_REPARENT ) { + *best_parent_p =clk_get_parent (mux_hw->clk); + *best_parent_rate =
__clk_get_rate(*best_parent_p);drivers/clk/clk-composite.c +32
-0+ +return rate_ops->round_rate (rate_hw, rate, + best_parent_rate); + } + +for (i =0 ; i <__clk_get_num_parents (mux_hw->clk); i++) { + parent =clk_get_parent_by_index (mux_hw->clk, i); +if (!parent) +continue ; + + parent_rate =__clk_get_rate (parent); + + tmp_rate = rate_ops->round_rate (rate_hw, rate, + &parent_rate); +if (tmp_rate <0 ) +continue ; + + rate_diff =abs (rate - tmp_rate); + +if (!rate_diff || !*best_parent_p + || best_rate_diff > rate_diff) { + *best_parent_p = parent; + *best_parent_rate = parent_rate; + best_rate_diff = rate_diff; + best_rate = tmp_rate; + } + +if (!rate_diff) +return rate; + } + +return best_rate; }else if (mux_hw && mux_ops && mux_ops->determine_rate) { mux_hw->clk = hw->clk; return mux_ops->determine_rate(mux_hw, rate, best_parent_rate,@@ -196,7 +241,8 @@ struct clk *clk_register_composite(struct device *dev,const char *name,>
composite->rate_hw = rate_hw; composite->rate_ops = rate_ops; clk_composite_ops->recalc_rate = clk_composite_recalc_rate;drivers/clk/clk-composite.c +2
-1-if (rate_ops->determine_rate) + if (rate_ops->determine_rate || + (rate_ops->round_rate &&
clk_composite_ops->set_parent))>clk_composite_ops->determine_rate = clk_composite_determine_rate; }--
1.9.0_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Heiko Stübner
maintainerPATCH v5 2/14 clk: composite: allow read-only clocks
In reply to Heiko StübnerThis allows readl-only composite clocks by making mux_ops->set_parent and divider_ops->round_rate/set_rate optional.
--- drivers/clk/clk-composite.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/clk/clk-composite.c +3 -6
@@ -207,7 +207,7 @@ struct clk *clk_register_composite(struct device *dev, const char *name, clk_composite_ops = &composite->ops;if (mux_hw && mux_ops) { -if (!mux_ops->get_parent || !mux_ops->set_parent) { +if (!mux_ops->get_parent) { clk =ERR_PTR (-EINVAL ); goto err; }
@@ -215,7 +215,8 @@ struct clk *clk_register_composite(struct device *dev, const char *name, composite->mux_hw = mux_hw; composite->mux_ops = mux_ops; clk_composite_ops->get_parent = clk_composite_get_parent; - clk_composite_ops->set_parent = clk_composite_set_parent; +if (mux_ops->set_parent) + clk_composite_ops->set_parent = clk_composite_set_parent;if (mux_ops->determine_rate) clk_composite_ops->determine_rate = clk_composite_determine_rate; }
@@ -232,10 +233,6 @@ struct clk *clk_register_composite(struct device *dev, const char *name,if (rate_ops->set_rate) { clk_composite_ops->set_rate = clk_composite_set_rate; } - }else { -WARN (rate_ops->set_rate, -"%s: missing round_rate op is required\n" , - __func__); } composite->rate_hw = rate_hw;
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 3/14 clk: composite: improve rate_hw sanity check logic
In reply to Heiko StübnerFrom: Mike Turquette <[email protected]>
The function pointer population and sanity checking logic got a bit ugly with the advent of the .determine_rate callback. Clean it up.
--- drivers/clk/clk-composite.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/clk/clk-composite.c +16 -10
@@ -226,21 +226,27 @@ struct clk *clk_register_composite(struct device *dev, const char *name, clk =ERR_PTR (-EINVAL ); goto err; } + clk_composite_ops->recalc_rate = clk_composite_recalc_rate; -/* .round_rate is a prerequisite for .set_rate */ -if (rate_ops->round_rate) { - clk_composite_ops->round_rate = clk_composite_round_rate; -if (rate_ops->set_rate) { - clk_composite_ops->set_rate = clk_composite_set_rate; - } +if (rate_ops->determine_rate) + clk_composite_ops->determine_rate = + clk_composite_determine_rate; +else if (rate_ops->round_rate) + clk_composite_ops->round_rate = + clk_composite_round_rate; + +/* .set_rate requires either .round_rate or .determine_rate */ +if (rate_ops->set_rate) { +if (rate_ops->determine_rate || rate_ops->round_rate) + clk_composite_ops->set_rate = + clk_composite_set_rate; +else +WARN (1 ,"%s: missing round_rate op is required\n" , + __func__); } composite->rate_hw = rate_hw; composite->rate_ops = rate_ops; - clk_composite_ops->recalc_rate = clk_composite_recalc_rate; -if (rate_ops->determine_rate || - (rate_ops->round_rate && clk_composite_ops->set_parent)) - clk_composite_ops->determine_rate = clk_composite_determine_rate; }if (gate_hw && gate_ops) {
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 4/14 clk: rockchip: add basic infrastructure for clock branches
In reply to Heiko StübnerThis adds infrastructure for registering clock branches. On Rockchip SoCs most clock branches are a combination of mux,divider and gate components, thus a composite clock is used when appropriate.
Clock branches are supposed to be declared in an array using the COMPOSITE* or MUX, etc makros defined in the header and then registered using rockchip_clk_register_branches.
--- drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk.c | 209 +++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 250 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 460 insertions(+) create mode 100644 drivers/clk/rockchip/clk.c create mode 100644 drivers/clk/rockchip/clk.h
drivers/clk/rockchip/Makefile +1 -0
@@ -3,3 +3,4 @@ # obj-y += clk-rockchip.o +obj-y += clk.o
drivers/clk/rockchip/clk.c new file +209 -0
209 lines not on this page · raw message
drivers/clk/rockchip/clk.h new file +250 -0
250 lines not on this page · raw message
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 5/14 clk: rockchip: add clock type for pll clocks and pll used on rk3066
In reply to Heiko StübnerAll known Rockchip SoCs down to the RK28xx (ARM9) use a similar pattern to handle their plls:
|--\
xin32k ----------------|mux\
xin24m -----| pll |----|pll|--- pll output
\---------------|src/
|--/The pll output is sourced from 1 of 3 sources, the actual pll being one of them. To change the pll frequency it is imperative to remux it to another source beforehand. This is done by adding a clock-listener to the pll that handles the remuxing before and after the rate change.
The output mux is implemented as a separate clock to make use of already existing common-clock features for disabling the pll if one of the other two sources is used.
--- drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-pll.c | 431 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.c | 35 ++++ drivers/clk/rockchip/clk.h | 74 +++++++ 4 files changed, 541 insertions(+) create mode 100644 drivers/clk/rockchip/clk-pll.c
drivers/clk/rockchip/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-y += clk-rockchip.o obj-y += clk.o +obj-y += clk-pll.o
drivers/clk/rockchip/clk-pll.c new file +431 -0
431 lines not on this page · raw message
drivers/clk/rockchip/clk.c +35 -0
@@ -23,6 +23,8 @@#include <linux/slab.h> #include <linux/clk.h> #include <linux/clk-provider.h> +#include <linux/mfd/syscon.h> +#include <linux/regmap.h> #include "clk.h" /**
@@ -105,11 +107,15 @@ static DEFINE_SPINLOCK(clk_lock);static struct clk **clk_table;static void __iomem *reg_base;static struct clk_onecell_data clk_data; +static struct device_node *cru_node; +static struct regmap *grf;void __init rockchip_clk_init (struct device_node *np,void __iomem *base,unsigned long nr_clks) { reg_base = base; + cru_node = np; + grf =ERR_PTR (-EPROBE_DEFER ); clk_table =kcalloc (nr_clks,sizeof (struct clk *),GFP_KERNEL );if (!clk_table)
@@ -120,12 +126,41 @@ void __init rockchip_clk_init(struct device_node *np, void __iomem *base,of_clk_add_provider (np, of_clk_src_onecell_get, &clk_data); } +struct regmap *rockchip_clk_get_grf (void ) +{ +if (IS_ERR (grf)) + grf =syscon_regmap_lookup_by_phandle (cru_node,"rockchip,grf" ); +return grf; +} +void rockchip_clk_add_lookup (struct clk *clk,unsigned int id) {if (clk_table && id) clk_table[id] = clk; } +void __init rockchip_clk_register_plls (struct rockchip_pll_clock *list, +unsigned int nr_pll,int grf_lock_offset) +{ +struct clk *clk; +int idx; + +for (idx =0 ; idx < nr_pll; idx++, list++) { + clk =rockchip_clk_register_pll (list->type, list->name, + list->parent_names, list->num_parents, + reg_base, list->con_offset, grf_lock_offset, + list->lock_shift, list->mode_offset, + list->mode_shift, list->rate_table, &clk_lock); +if (IS_ERR (clk)) { +pr_err ("%s: failed to register clock %s\n" , __func__, + list->name); +continue ; + } + +rockchip_clk_add_lookup (clk, list->id); + } +} +void __init rockchip_clk_register_branches (struct rockchip_clk_branch *list,unsigned int nr_clk)
drivers/clk/rockchip/clk.h +74 -0
88 lines not on this page · raw message
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 6/14 clk: rockchip: add reset controller
In reply to Heiko StübnerAll Rockchip SoCs at least down to the ARM9-based RK28xx include the reset- controller for SoC peripherals in their clock controller.
While the older SoCs (ARM9 and Cortex-A8) use a regular scheme to change register values, the Cortex-A9 SoCs use a hiword-mask making locking unecessary. To be compatible with both schemes the reset controller takes a flag to decide which scheme to use, similar to the other HIWORD_MASK flags used in the clock framework.
--- drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk.h | 14 +++++ drivers/clk/rockchip/softrst.c | 118 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 drivers/clk/rockchip/softrst.c
drivers/clk/rockchip/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-y += clk-rockchip.o obj-y += clk.o obj-y += clk-pll.o +obj-$(CONFIG_RESET_CONTROLLER) += softrst.o
drivers/clk/rockchip/clk.h +14 -0
@@ -321,4 +321,18 @@ void rockchip_clk_register_branches(struct rockchip_clk_branch *clk_list,void rockchip_clk_register_plls (struct rockchip_pll_clock *pll_list,unsigned int nr_pll,int grf_lock_offset); +#define ROCKCHIP_SOFTRST_HIWORD_MASK BIT(0) + +#ifdef CONFIG_RESET_CONTROLLER +void rockchip_register_softrst (struct device_node *np, +unsigned int num_regs, +void __iomem *base,u8 flags); +#else +static inline void rockchip_register_softrst (struct device_node *np, +unsigned int num_regs, +void __iomem *base,u8 flags) +{ +} +#endif +#endif
drivers/clk/rockchip/softrst.c new file +118 -0
118 lines not on this page · raw message
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 7/14 dt-bindings: add documentation for rk3188 clock and reset unit
In reply to Heiko StübnerThis add bindings documentation for the clock and reset unit found on rk3188 and rk3066 SoCs from Rockchip.
Also deprecate the old gate clock binding, as these shouldn't be used in the future.
--- .../bindings/clock/rockchip,rk3188-cru.txt | 61 ++++++++++++++++++++++ .../devicetree/bindings/clock/rockchip.txt | 3 ++ 2 files changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt new file +61 -0
@@ -0,0 +1,61 @@ +* Rockchip RK3188/RK3066 Clock and Reset Unit + +The RK3188/RK3066 clock controller generates and supplies clock to various +controllers within the SoC and also implements a reset controller for SoC +peripherals. + +Required Properties: + +- compatible: should be "rockchip,rk3188-cru", "rockchip,rk3188a-cru" or + "rockchip,rk3066a-cru" +- reg: physical base address of the controller and length of memory mapped + region. +- #clock-cells: should be 1. +- #reset-cells: should be 1. + +Optional Properties: + +- rockchip,grf: phandle to the syscon managing the "general register files" + If missing pll rates are not changable, due to the missing pll lock status. + +Each clock is assigned an identifier and client nodes can use this identifier +to specify the clock which they consume. All available clocks are defined as +preprocessor macros in the dt-bindings/clock/rk3188-cru.h and +dt-bindings/clock/rk3066-cru.h headers and can be used in device tree sources. +Similar macros exist for the reset sources in these files. + +External clocks: + +There are several clocks that are generated outside the SoC. It is expected +that they are defined using standard clock bindings with following +clock-output-names: + - "xin24m" - crystal input - required, + - "xin32k" - rtc clock - optional, + - "xin27m" - 27mhz crystal input on rk3066 - optional, + - "ext_hsadc" - external HSADC clock - optional, + - "ext_cif0" - external camera clock - optional, + - "ext_rmii" - external RMII clock - optional, + - "ext_jtag" - externalJTAG clock - optional + +Example: Clock controller node: + + cru: cru at 20000000 { + compatible = "rockchip,rk3188-cru"; + reg = <0x20000000 0x1000>; + rockchip,grf = <&grf>; + + #clock-cells = <1>; + #reset-cells = <1>; + }; + +Example: UART controller node that consumes the clock generated by the clock + controller: + + uart0: serial at 10124000 { + compatible = "snps,dw-apb-uart"; + reg = <0x10124000 0x400>; + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <1>; + clocks = <&cru SCLK_UART0>; + };
Documentation/devicetree/bindings/clock/rockchip.txt +3 -0
@@ -6,6 +6,9 @@ This binding uses the common clock binding[1]. == Gate clocks == +These bindings are deprecated! +Please use the soc specific CRU bindings instead. + The gate registers form a continuos block which makes the dt node structure a matter of taste, as either all gates can be put into one gate clock spanning all registers or they can be divided into
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 8/14 clk: rockchip: add clock driver for rk3188 and rk3066 clocks
In reply to Heiko StübnerThis adds a clock driver that handles the specific muxes, dividers and gates of rk3188 and rk3066 SoCs.
The structure of the clock list resembles the arrangement of their counterparts in the clock architecture diagrams found in the SoC documentation.
Clocks exported to the clock provider are currently limited to well known or measured ones. So additional clock exports may be necessary in the future.
--- drivers/clk/rockchip/Makefile | 2 + drivers/clk/rockchip/clk-rk3188.c | 672 ++++++++++++++++++++++++++ include/dt-bindings/clock/rk3066a-cru.h | 35 ++ include/dt-bindings/clock/rk3188-cru-common.h | 249 ++++++++++ include/dt-bindings/clock/rk3188-cru.h | 51 ++ 5 files changed, 1009 insertions(+) create mode 100644 drivers/clk/rockchip/clk-rk3188.c create mode 100644 include/dt-bindings/clock/rk3066a-cru.h create mode 100644 include/dt-bindings/clock/rk3188-cru-common.h create mode 100644 include/dt-bindings/clock/rk3188-cru.h
drivers/clk/rockchip/Makefile +2 -0
@@ -6,3 +6,5 @@ obj-y += clk-rockchip.o obj-y += clk.o obj-y += clk-pll.o obj-$(CONFIG_RESET_CONTROLLER) += softrst.o + +obj-y += clk-rk3188.o
drivers/clk/rockchip/clk-rk3188.c new file +672 -0
672 lines not on this page · raw message
include/dt-bindings/clock/rk3066a-cru.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (c) 2014 MundoReader S.L. +* Author: Heiko Stuebner <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <dt-bindings/clock/rk3188-cru-common.h> + +/* soft-reset indices */ +#define SRST_SRST1 0 +#define SRST_SRST2 1 + +#define SRST_L2MEM 18 +#define SRST_I2S0 23 +#define SRST_I2S1 24 +#define SRST_I2S2 25 +#define SRST_TIMER2 29 + +#define SRST_GPIO4 36 +#define SRST_GPIO6 38 + +#define SRST_TSADC 92 + +#define SRST_HDMI 96 +#define SRST_HDMI_APB 97 +#define SRST_CIF1 111
include/dt-bindings/clock/rk3188-cru-common.h new file +249 -0
249 lines not on this page · raw message
include/dt-bindings/clock/rk3188-cru.h new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 9/14 dt-bindings: add documentation for rk3288 cru
In reply to Heiko StübnerThis adds the dt-binding documentation for the clock and reset unit found on Rockchip rk3288 SoCs.
--- .../bindings/clock/rockchip,rk3288-cru.txt | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt
Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt new file +61 -0
@@ -0,0 +1,61 @@ +* Rockchip RK3288 Clock and Reset Unit + +The RK3288 clock controller generates and supplies clock to various +controllers within the SoC and also implements a reset controller for SoC +peripherals. + +Required Properties: + +- compatible: should be "rockchip,rk3288-cru" +- reg: physical base address of the controller and length of memory mapped + region. +- #clock-cells: should be 1. +- #reset-cells: should be 1. + +Optional Properties: + +- rockchip,grf: phandle to the syscon managing the "general register files" + If missing pll rates are not changable, due to the missing pll lock status. + +Each clock is assigned an identifier and client nodes can use this identifier +to specify the clock which they consume. All available clocks are defined as +preprocessor macros in the dt-bindings/clock/rk3288-cru.h headers and can be +used in device tree sources. Similar macros exist for the reset sources in +these files. + +External clocks: + +There are several clocks that are generated outside the SoC. It is expected +that they are defined using standard clock bindings with following +clock-output-names: + - "xin24m" - crystal input - required, + - "xin32k" - rtc clock - optional, + - "ext_i2s" - external I2S clock - optional, + - "ext_hsadc" - external HSADC clock - optional, + - "ext_edp_24m" - external display port clock - optional, + - "ext_vip" - external VIP clock - optional, + - "ext_isp" - external ISP clock - optional, + - "ext_jtag" - external JTAG clock - optional + +Example: Clock controller node: + + cru: cru at 20000000 { + compatible = "rockchip,rk3188-cru"; + reg = <0x20000000 0x1000>; + rockchip,grf = <&grf>; + + #clock-cells = <1>; + #reset-cells = <1>; + }; + +Example: UART controller node that consumes the clock generated by the clock + controller: + + uart0: serial at 10124000 { + compatible = "snps,dw-apb-uart"; + reg = <0x10124000 0x400>; + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <1>; + clocks = <&cru SCLK_UART0>; + };
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 10/14 clk: rockchip: add clock controller for rk3288
In reply to Heiko StübnerAdd the clock tree definition for the new rk3288 SoC.
--- drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3288.c | 717 +++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 9 + include/dt-bindings/clock/rk3288-cru.h | 278 +++++++++++++ 4 files changed, 1005 insertions(+) create mode 100644 drivers/clk/rockchip/clk-rk3288.c create mode 100644 include/dt-bindings/clock/rk3288-cru.h
drivers/clk/rockchip/Makefile +1 -0
@@ -8,3 +8,4 @@ obj-y += clk-pll.o obj-$(CONFIG_RESET_CONTROLLER) += softrst.o obj-y += clk-rk3188.o +obj-y += clk-rk3288.o
drivers/clk/rockchip/clk-rk3288.c new file +717 -0
717 lines not on this page · raw message
drivers/clk/rockchip/clk.h +9 -0
@@ -40,6 +40,15 @@#define RK2928_SOFTRST_CON (x) (x * 0x4 + 0x110)#define RK2928_MISC_CON 0x134 +#define RK3288_PLL_CON (x) RK2928_PLL_CON(x) +#define RK3288_MODE_CON 0x50 +#define RK3288_CLKSEL_CON (x) (x * 0x4 + 0x60) +#define RK3288_CLKGATE_CON (x) (x * 0x4 + 0x160) +#define RK3288_GLB_SRST_FST 0x1b0 +#define RK3288_GLB_SRST_SND 0x1b4 +#define RK3288_SOFTRST_CON (x) (x * 0x4 + 0x1b8) +#define RK3288_MISC_CON 0x1e8 +enum rockchip_pll_type { pll_rk3066, };
include/dt-bindings/clock/rk3288-cru.h new file +278 -0
278 lines not on this page · raw message
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 11/14 ARM: rockchip: Select ARCH_HAS_RESET_CONTROLLER
In reply to Heiko StübnerAll known Rockchip SoCs have a reset controller in their CRUs, so it's helpful to have the reset controller framework selected by default, only be deselected by the user in special cases.
--- arch/arm/mach-rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-rockchip/Kconfig +1 -0
@@ -2,6 +2,7 @@ config ARCH_ROCKCHIP bool "Rockchip RK2928 and RK3xxx SOCs" if ARCH_MULTI_V7 select PINCTRL select PINCTRL_ROCKCHIP + select ARCH_HAS_RESET_CONTROLLER select ARCH_REQUIRE_GPIOLIB select ARM_GIC select CACHE_L2X0
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 12/14 ARM: dts: rockchip: add cru nodes and update device clocks to use it
In reply to Heiko StübnerThis adds a node for the clock and reset unit on rk3188 and rk3066 SoCs and also updates the device nodes retrieve their clocks from there, instead of the previous gate clock nodes.
--- arch/arm/boot/dts/rk3066a.dtsi | 29 ++++++++++++++++++++--------- arch/arm/boot/dts/rk3188.dtsi | 18 ++++++++++++++---- arch/arm/boot/dts/rk3xxx.dtsi | 16 ++++++++-------- 3 files changed, 42 insertions(+), 21 deletions(-)
arch/arm/boot/dts/rk3066a.dtsi +20 -9
@@ -15,6 +15,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/pinctrl/rockchip.h> +#include <dt-bindings/clock/rk3066a-cru.h> #include "rk3xxx.dtsi" #include "rk3066a-clocks.dtsi"
@@ -45,7 +46,7 @@ compatible = "snps,dw-apb-timer-osc"; reg = <0x20038000 0x100>; interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates1 0>, <&clk_gates7 7>; + clocks = <&cru SCLK_TIMER0>, <&cru PCLK_TIMER0>; clock-names = "timer", "pclk"; };
@@ -53,7 +54,7 @@ compatible = "snps,dw-apb-timer-osc"; reg = <0x2003a000 0x100>; interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates1 1>, <&clk_gates7 8>; + clocks = <&cru SCLK_TIMER1>, <&cru PCLK_TIMER1>; clock-names = "timer", "pclk"; };
@@ -61,7 +62,7 @@ compatible = "snps,dw-apb-timer-osc"; reg = <0x2000e000 0x100>; interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates1 2>, <&clk_gates7 9>; + clocks = <&cru SCLK_TIMER2>, <&cru PCLK_TIMER2>; clock-names = "timer", "pclk"; };
@@ -78,6 +79,16 @@ }; }; + cru: cru at 20000000 { + compatible = "rockchip,rk3066a-cru"; + reg = <0x20000000 0x1000>; + + #clock-cells = <1>; + #reset-cells = <1>; + + rockchip,grf = <&grf>; + }; + pinctrl at 20008000 { compatible = "rockchip,rk3066a-pinctrl"; rockchip,grf = <&grf>;
@@ -89,7 +100,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x20034000 0x100>; interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 9>; + clocks = <&cru PCLK_GPIO0>; gpio-controller; #gpio-cells = <2>;
@@ -102,7 +113,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x2003c000 0x100>; interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 10>; + clocks = <&cru PCLK_GPIO1>; gpio-controller; #gpio-cells = <2>;
@@ -115,7 +126,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x2003e000 0x100>; interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 11>; + clocks = <&cru PCLK_GPIO2>; gpio-controller; #gpio-cells = <2>;
@@ -128,7 +139,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x20080000 0x100>; interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 12>; + clocks = <&cru PCLK_GPIO3>; gpio-controller; #gpio-cells = <2>;
@@ -141,7 +152,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x20084000 0x100>; interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 13>; + clocks = <&cru PCLK_GPIO4>; gpio-controller; #gpio-cells = <2>;
@@ -154,7 +165,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x2000a000 0x100>; interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 15>; + clocks = <&cru PCLK_GPIO6>; gpio-controller; #gpio-cells = <2>;
arch/arm/boot/dts/rk3188.dtsi +14 -4
@@ -15,6 +15,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/pinctrl/rockchip.h> +#include <dt-bindings/clock/rk3188-cru.h> #include "rk3xxx.dtsi" #include "rk3188-clocks.dtsi"
@@ -74,6 +75,15 @@ }; }; + cru: cru at 20000000 { + compatible = "rockchip,rk3188-cru"; + reg = <0x20000000 0x1000>; + rockchip,grf = <&grf>; + + #clock-cells = <1>; + #reset-cells = <1>; + }; + pinctrl at 20008000 { compatible = "rockchip,rk3188-pinctrl"; rockchip,grf = <&grf>;
@@ -87,7 +97,7 @@ compatible = "rockchip,rk3188-gpio-bank0"; reg = <0x2000a000 0x100>; interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 9>; + clocks = <&cru PCLK_GPIO0>; gpio-controller; #gpio-cells = <2>;
@@ -100,7 +110,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x2003c000 0x100>; interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 10>; + clocks = <&cru PCLK_GPIO1>; gpio-controller; #gpio-cells = <2>;
@@ -113,7 +123,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x2003e000 0x100>; interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 11>; + clocks = <&cru PCLK_GPIO2>; gpio-controller; #gpio-cells = <2>;
@@ -126,7 +136,7 @@ compatible = "rockchip,gpio-bank"; reg = <0x20080000 0x100>; interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk_gates8 12>; + clocks = <&cru PCLK_GPIO3>; gpio-controller; #gpio-cells = <2>;
arch/arm/boot/dts/rk3xxx.dtsi +8 -8
@@ -60,14 +60,14 @@ compatible = "arm,cortex-a9-global-timer"; reg = <0x1013c200 0x20>; interrupts = <GIC_PPI 11 0x304>; - clocks = <&dummy150m>; + clocks = <&cru CORE_PERI>; }; local-timer at 1013c600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x1013c600 0x20>; interrupts = <GIC_PPI 13 0x304>; - clocks = <&dummy150m>; + clocks = <&cru CORE_PERI>; }; uart0: serial at 10124000 {
@@ -76,7 +76,7 @@ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; reg-shift = <2>; reg-io-width = <1>; - clocks = <&clk_gates1 8>; + clocks = <&cru SCLK_UART0>; status = "disabled"; };
@@ -86,7 +86,7 @@ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; reg-shift = <2>; reg-io-width = <1>; - clocks = <&clk_gates1 10>; + clocks = <&cru SCLK_UART1>; status = "disabled"; };
@@ -96,7 +96,7 @@ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; reg-shift = <2>; reg-io-width = <1>; - clocks = <&clk_gates1 12>; + clocks = <&cru SCLK_UART2>; status = "disabled"; };
@@ -106,7 +106,7 @@ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; reg-shift = <2>; reg-io-width = <1>; - clocks = <&clk_gates1 14>; + clocks = <&cru SCLK_UART3>; status = "disabled"; };
@@ -117,7 +117,7 @@ #address-cells = <1>; #size-cells = <0>; - clocks = <&clk_gates5 10>, <&clk_gates2 11>; + clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>; clock-names = "biu", "ciu"; status = "disabled";
@@ -130,7 +130,7 @@ #address-cells = <1>; #size-cells = <0>; - clocks = <&clk_gates5 11>, <&clk_gates2 13>; + clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>; clock-names = "biu", "ciu"; status = "disabled";
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 13/14 ARM: dts: rockchip: move oscillator input clock into main dtsi
In reply to Heiko StübnerThe clock definitions get a lot shorter due to the soc clocks being handled by rk3188-cru and only the input clock remains. These can not simply live in the main rk3xxx.dtsi without affecting readability.
--- arch/arm/boot/dts/rk3066a-clocks.dtsi | 6 ------ arch/arm/boot/dts/rk3188-clocks.dtsi | 6 ------ arch/arm/boot/dts/rk3xxx.dtsi | 6 ++++++ 3 files changed, 6 insertions(+), 12 deletions(-)
arch/arm/boot/dts/rk3066a-clocks.dtsi +0 -6
@@ -31,12 +31,6 @@ #clock-cells = <0>; }; - xin24m: xin24m { - compatible = "fixed-clock"; - clock-frequency = <24000000>; - #clock-cells = <0>; - }; - dummy48m: dummy48m { compatible = "fixed-clock"; clock-frequency = <48000000>;
arch/arm/boot/dts/rk3188-clocks.dtsi +0 -6
@@ -31,12 +31,6 @@ #clock-cells = <0>; }; - xin24m: xin24m { - compatible = "fixed-clock"; - clock-frequency = <24000000>; - #clock-cells = <0>; - }; - dummy48m: dummy48m { compatible = "fixed-clock"; clock-frequency = <48000000>;
arch/arm/boot/dts/rk3xxx.dtsi +6 -0
@@ -26,6 +26,12 @@ compatible = "simple-bus"; ranges; + xin24m: xin24m { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + #clock-cells = <0>; + }; + scu at 1013c000 { compatible = "arm,cortex-a9-scu"; reg = <0x1013c000 0x100>;
Signature · 1 line
1.9.0
Heiko Stübner
maintainerPATCH v5 14/14 arm: dts: rockchip: remove obsolete clock gate definitions
In reply to Heiko StübnerThe clock and reset unit is now provided by the rk3188-cru clock driver and thus the old style definitions of the gate clocks can go away.
--- arch/arm/boot/dts/rk3066a-clocks.dtsi | 293 ---------------------------------- arch/arm/boot/dts/rk3066a.dtsi | 1 - arch/arm/boot/dts/rk3188-clocks.dtsi | 283 -------------------------------- arch/arm/boot/dts/rk3188.dtsi | 1 - 4 files changed, 578 deletions(-) delete mode 100644 arch/arm/boot/dts/rk3066a-clocks.dtsi delete mode 100644 arch/arm/boot/dts/rk3188-clocks.dtsi
arch/arm/boot/dts/rk3066a-clocks.dtsi deleted +0 -293
@@ -1,293 +0,0 @@ -/* - * Copyright (c) 2013 MundoReader S.L. - * Author: Heiko Stuebner <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -/ { - clocks { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - /* - * This is a dummy clock, to be used as placeholder on - * other mux clocks when a specific parent clock is not - * yet implemented. It should be dropped when the driver - * is complete. - */ - dummy: dummy { - compatible = "fixed-clock"; - clock-frequency = <0>; - #clock-cells = <0>; - }; - - dummy48m: dummy48m { - compatible = "fixed-clock"; - clock-frequency = <48000000>; - #clock-cells = <0>; - }; - - dummy150m: dummy150m { - compatible = "fixed-clock"; - clock-frequency = <150000000>; - #clock-cells = <0>; - }; - - clk_gates0: gate-clk at 200000d0 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000d0 0x4>; - clocks = <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>; - - clock-output-names = - "gate_core_periph", "gate_cpu_gpll", - "gate_ddrphy", "gate_aclk_cpu", - "gate_hclk_cpu", "gate_pclk_cpu", - "gate_atclk_cpu", "gate_i2s0", - "gate_i2s0_frac", "gate_i2s1", - "gate_i2s1_frac", "gate_i2s2", - "gate_i2s2_frac", "gate_spdif", - "gate_spdif_frac", "gate_testclk"; - - #clock-cells = <1>; - }; - - clk_gates1: gate-clk at 200000d4 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000d4 0x4>; - clocks = <&xin24m>, <&xin24m>, - <&xin24m>, <&dummy>, - <&dummy>, <&xin24m>, - <&xin24m>, <&dummy>, - <&xin24m>, <&dummy>, - <&xin24m>, <&dummy>, - <&xin24m>, <&dummy>, - <&xin24m>, <&dummy>; - - clock-output-names = - "gate_timer0", "gate_timer1", - "gate_timer2", "gate_jtag", - "gate_aclk_lcdc1_src", "gate_otgphy0", - "gate_otgphy1", "gate_ddr_gpll", - "gate_uart0", "gate_frac_uart0", - "gate_uart1", "gate_frac_uart1", - "gate_uart2", "gate_frac_uart2", - "gate_uart3", "gate_frac_uart3"; - - #clock-cells = <1>; - }; - - clk_gates2: gate-clk at 200000d8 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000d8 0x4>; - clocks = <&clk_gates2 1>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&clk_gates2 3>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy48m>, - <&dummy>, <&dummy48m>, - <&dummy>, <&dummy>; - - clock-output-names = - "gate_periph_src", "gate_aclk_periph", - "gate_hclk_periph", "gate_pclk_periph", - "gate_smc", "gate_mac", - "gate_hsadc", "gate_hsadc_frac", - "gate_saradc", "gate_spi0", - "gate_spi1", "gate_mmc0", - "gate_mac_lbtest", "gate_mmc1", - "gate_emmc", "gate_tsadc"; - - #clock-cells = <1>; - }; - - clk_gates3: gate-clk at 200000dc { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000dc 0x4>; - clocks = <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>, <&dummy>; - - clock-output-names = - "gate_aclk_lcdc0_src", "gate_dclk_lcdc0", - "gate_dclk_lcdc1", "gate_pclkin_cif0", - "gate_pclkin_cif1", "reserved", - "reserved", "gate_cif0_out", - "gate_cif1_out", "gate_aclk_vepu", - "gate_hclk_vepu", "gate_aclk_vdpu", - "gate_hclk_vdpu", "gate_gpu_src", - "reserved", "gate_xin27m"; - - #clock-cells = <1>; - }; - - clk_gates4: gate-clk at 200000e0 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000e0 0x4>; - clocks = <&clk_gates2 2>, <&clk_gates2 3>, - <&clk_gates2 1>, <&clk_gates2 1>, - <&clk_gates2 1>, <&clk_gates2 2>, - <&clk_gates2 2>, <&clk_gates2 2>, - <&clk_gates0 4>, <&clk_gates0 4>, - <&clk_gates0 3>, <&clk_gates0 3>, - <&clk_gates0 3>, <&clk_gates2 3>, - <&clk_gates0 4>; - - clock-output-names = - "gate_hclk_peri_axi_matrix", "gate_pclk_peri_axi_matrix", - "gate_aclk_cpu_peri", "gate_aclk_peri_axi_matrix", - "gate_aclk_pei_niu", "gate_hclk_usb_peri", - "gate_hclk_peri_ahb_arbi", "gate_hclk_emem_peri", - "gate_hclk_cpubus", "gate_hclk_ahb2apb", - "gate_aclk_strc_sys", "gate_aclk_l2mem_con", - "gate_aclk_intmem", "gate_pclk_tsadc", - "gate_hclk_hdmi"; - - #clock-cells = <1>; - }; - - clk_gates5: gate-clk at 200000e4 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000e4 0x4>; - clocks = <&clk_gates0 3>, <&clk_gates2 1>, - <&clk_gates0 5>, <&clk_gates0 5>, - <&clk_gates0 5>, <&clk_gates0 5>, - <&clk_gates0 4>, <&clk_gates0 5>, - <&clk_gates2 1>, <&clk_gates2 2>, - <&clk_gates2 2>, <&clk_gates2 2>, - <&clk_gates2 2>, <&clk_gates4 5>, - <&clk_gates4 5>, <&dummy>; - - clock-output-names = - "gate_aclk_dmac1", "gate_aclk_dmac2", - "gate_pclk_efuse", "gate_pclk_tzpc", - "gate_pclk_grf", "gate_pclk_pmu", - "gate_hclk_rom", "gate_pclk_ddrupctl", - "gate_aclk_smc", "gate_hclk_nandc", - "gate_hclk_mmc0", "gate_hclk_mmc1", - "gate_hclk_emmc", "gate_hclk_otg0", - "gate_hclk_otg1", "gate_aclk_gpu"; - - #clock-cells = <1>; - }; - - clk_gates6: gate-clk at 200000e8 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000e8 0x4>; - clocks = <&clk_gates3 0>, <&clk_gates0 4>, - <&clk_gates0 4>, <&clk_gates1 4>, - <&clk_gates0 4>, <&clk_gates3 0>, - <&clk_gates0 4>, <&clk_gates1 4>, - <&clk_gates3 0>, <&clk_gates0 4>, - <&clk_gates0 4>, <&clk_gates1 4>, - <&clk_gates0 4>, <&clk_gates3 0>, - <&dummy>, <&dummy>; - - clock-output-names = - "gate_aclk_lcdc0", "gate_hclk_lcdc0", - "gate_hclk_lcdc1", "gate_aclk_lcdc1", - "gate_hclk_cif0", "gate_aclk_cif0", - "gate_hclk_cif1", "gate_aclk_cif1", - "gate_aclk_ipp", "gate_hclk_ipp", - "gate_hclk_rga", "gate_aclk_rga", - "gate_hclk_vio_bus", "gate_aclk_vio0", - "gate_aclk_vcodec", "gate_shclk_vio_h2h"; - - #clock-cells = <1>; - }; - - clk_gates7: gate-clk at 200000ec { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000ec 0x4>; - clocks = <&clk_gates2 2>, <&clk_gates0 4>, - <&clk_gates0 4>, <&clk_gates0 4>, - <&clk_gates0 4>, <&clk_gates2 2>, - <&clk_gates2 2>, <&clk_gates0 5>, - <&clk_gates0 5>, <&clk_gates0 5>, - <&clk_gates0 5>, <&clk_gates2 3>, - <&clk_gates2 3>, <&clk_gates2 3>, - <&clk_gates2 3>, <&clk_gates2 3>; - - clock-output-names = - "gate_hclk_emac", "gate_hclk_spdif", - "gate_hclk_i2s0_2ch", "gate_hclk_i2s1_2ch", - "gate_hclk_i2s_8ch", "gate_hclk_hsadc", - "gate_hclk_pidf", "gate_pclk_timer0", - "gate_pclk_timer1", "gate_pclk_timer2", - "gate_pclk_pwm01", "gate_pclk_pwm23", - "gate_pclk_spi0", "gate_pclk_spi1", - "gate_pclk_saradc", "gate_pclk_wdt"; - - #clock-cells = <1>; - }; - - clk_gates8: gate-clk at 200000f0 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000f0 0x4>; - clocks = <&clk_gates0 5>, <&clk_gates0 5>, - <&clk_gates2 3>, <&clk_gates2 3>, - <&clk_gates0 5>, <&clk_gates0 5>, - <&clk_gates2 3>, <&clk_gates2 3>, - <&clk_gates2 3>, <&clk_gates0 5>, - <&clk_gates0 5>, <&clk_gates0 5>, - <&clk_gates2 3>, <&clk_gates2 3>, - <&dummy>, <&clk_gates0 5>; - - clock-output-names = - "gate_pclk_uart0", "gate_pclk_uart1", - "gate_pclk_uart2", "gate_pclk_uart3", - "gate_pclk_i2c0", "gate_pclk_i2c1", - "gate_pclk_i2c2", "gate_pclk_i2c3", - "gate_pclk_i2c4", "gate_pclk_gpio0", - "gate_pclk_gpio1", "gate_pclk_gpio2", - "gate_pclk_gpio3", "gate_pclk_gpio4", - "reserved", "gate_pclk_gpio6"; - - #clock-cells = <1>; - }; - - clk_gates9: gate-clk at 200000f4 { - compatible = "rockchip,rk2928-gate-clk"; - reg = <0x200000f4 0x4>; - clocks = <&dummy>, <&clk_gates0 5>, - <&dummy>, <&dummy>, - <&dummy>, <&clk_gates1 4>, - <&clk_gates0 5>, <&dummy>, - <&dummy>, <&dummy>, - <&dummy>; - - clock-output-names = - "gate_clk_core_dbg", "gate_pclk_dbg", - "gate_clk_trace", "gate_atclk", - "gate_clk_l2c", "gate_aclk_vio1", - "gate_pclk_publ", "gate_aclk_intmem0", - "gate_aclk_intmem1", "gate_aclk_intmem2", - "gate_aclk_intmem3"; - - #clock-cells = <1>; - }; - }; - -};
arch/arm/boot/dts/rk3066a.dtsi +0 -1
@@ -17,7 +17,6 @@ #include <dt-bindings/pinctrl/rockchip.h> #include <dt-bindings/clock/rk3066a-cru.h> #include "rk3xxx.dtsi" -#include "rk3066a-clocks.dtsi" / { compatible = "rockchip,rk3066a";
arch/arm/boot/dts/rk3188-clocks.dtsi deleted +0 -283
283 lines not on this page · raw message
arch/arm/boot/dts/rk3188.dtsi +0 -1
@@ -17,7 +17,6 @@ #include <dt-bindings/pinctrl/rockchip.h> #include <dt-bindings/clock/rk3188-cru.h> #include "rk3xxx.dtsi" -#include "rk3188-clocks.dtsi" / { compatible = "rockchip,rk3188";
Signature · 1 line
1.9.0
v5 cover Clock support for rk3066,rk3188 and rk3288
In reply to Heiko StübnerQuoting Heiko St?bner (2014-07-02 16:53:24)
Quoted 11 lines
This series adds a clock driver infrastructure for Rockchip SoCs in general and clock-definitions for the RK3188 and RK3288 in particular.
Apart from the
arch/armpatches included here, there are some more in the waiting line, like adding the i2c nodes and possibly the pwm, i2s and spi nodes if the relevant drivers get accepted, where the ids defined in the dt-binding headers are needed.So if the whole thing is acceptable could we either offer a branch from the clk-tree that can get merged or take the whole series through the arm tree?
Heiko,
This version looks good. I've pushed a branch with all 14 of these patches based on 3.16-rc3 to the clk tree. See:
git://git.linaro.org/people/mike.turquette/linux.git clk-rockchip
If everyone is OK to merge that stable branch then I will merge clk-rockchip into clk-next and we're all good. If the arm-soc guys want to carve it up a bit further or handle it in a different way then we can do that. I've Cc'd arm-soc for clarification.
Regards,
Mike
Quoted 98 lines
changes since v4.2:
- fix uninitialized compiler warning in patch4
- add cleanup patch for clk-composite from Mike Turquette
- fix some softrst-issues in patch6
changes since v4.1:
- forgot the From override, Boris is the original author changes since v4:
- address comments from Gabriel Fernandez
- useabs()
- initbest_rate
changes since v3:
- add rk3288 clock controller
- add reset controller ids
- fix some incorrect values in rk3188-cru and export some more clocks
- fold new rk3066 clock tree into the rk3188 one, as can be easily seen the differences are not really big between them
- expand the composite fix description to highlight the underlying issue changes since v2:
- drop the special cpuclk type until coordinated range changes matured, as mentioned in the Samsung cpufreq thread.
- add the patch from Boris BREZILLON that reenables correct rate calculations in composite clocks
- change pll handling to better handle the pll output mux and also the enabling/disabling of the pll clock
- change core code to handle composite clock branches instead of individual basic clock definitions
- use the newly defined GRF syscon instead of mapping a grf register individually
changes since v1:
- adapt to apply on current clk-next branch
- add saradc clock
- add rk3188a cru, which has a slightly different handling of one pll value (bwadj)Boris BREZILLON (1):
clk: composite: supportdetermine_rateusingrate_ops->round_rate+mux_ops->set_parentHeiko Stuebner (12):
clk: composite: allow read-only clocks
clk: rockchip: add basic infrastructure for clock branches
clk: rockchip: add clock type for pll clocks and pll used on rk3066
clk: rockchip: add reset controller
dt-bindings: add documentation for rk3188 clock and reset unit
clk: rockchip: add clock driver for rk3188 and rk3066 clocks
dt-bindings: add documentation for rk3288 cru
clk: rockchip: add clock controller for rk3288
ARM: rockchip: SelectARCH_HAS_RESET_CONTROLLER
ARM: dts: rockchip: add cru nodes and update device clocks to use it
ARM: dts: rockchip: move oscillator input clock into main dtsi
arm: dts: rockchip: remove obsolete clock gate definitionsMike Turquette (1):
clk: composite: improverate_hwsanity check logic.../bindings/clock/rockchip,rk3188-cru.txt | 61 ++ .../bindings/clock/rockchip,rk3288-cru.txt | 61 ++ .../devicetree/bindings/clock/rockchip.txt | 3 + arch/arm/boot/dts/rk3066a-clocks.dtsi | 299 --------- arch/arm/boot/dts/rk3066a.dtsi | 30 +- arch/arm/boot/dts/rk3188-clocks.dtsi | 289 --------- arch/arm/boot/dts/rk3188.dtsi | 19 +- arch/arm/boot/dts/rk3xxx.dtsi | 22 +- arch/arm/mach-rockchip/Kconfig | 1 + drivers/clk/clk-composite.c | 79 ++- drivers/clk/rockchip/Makefile | 6 + drivers/clk/rockchip/clk-pll.c | 431 +++++++++++++ drivers/clk/rockchip/clk-rk3188.c | 672 +++++++++++++++++++ drivers/clk/rockchip/clk-rk3288.c | 717 +++++++++++++++++++++ drivers/clk/rockchip/clk.c | 244 +++++++ drivers/clk/rockchip/clk.h | 347 ++++++++++ drivers/clk/rockchip/softrst.c | 118 ++++ include/dt-bindings/clock/rk3066a-cru.h | 35 + include/dt-bindings/clock/rk3188-cru-common.h | 249 +++++++ include/dt-bindings/clock/rk3188-cru.h | 51 ++ include/dt-bindings/clock/rk3288-cru.h | 278 ++++++++ 21 files changed, 3386 insertions(+), 626 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt delete mode 100644 arch/arm/boot/dts/rk3066a-clocks.dtsi delete mode 100644 arch/arm/boot/dts/rk3188-clocks.dtsi create mode 100644 drivers/clk/rockchip/clk-pll.c create mode 100644 drivers/clk/rockchip/clk-rk3188.c create mode 100644 drivers/clk/rockchip/clk-rk3288.c create mode 100644 drivers/clk/rockchip/clk.c create mode 100644 drivers/clk/rockchip/clk.h create mode 100644 drivers/clk/rockchip/softrst.c create mode 100644 include/dt-bindings/clock/rk3066a-cru.h create mode 100644 include/dt-bindings/clock/rk3188-cru-common.h create mode 100644 include/dt-bindings/clock/rk3188-cru.h create mode 100644 include/dt-bindings/clock/rk3288-cru.hSignature · 1 line
1.9.0
v5 cover Clock support for rk3066,rk3188 and rk3288
Hi,
Quoted 18 lines · Mike Turquette
Quoting Heiko St?bner (2014-07-02 16:53:24)
Quoted 11 lines
This series adds a clock driver infrastructure for Rockchip SoCs in general and clock-definitions for the RK3188 and RK3288 in particular.
Apart from the
arch/armpatches included here, there are some more in the waiting line, like adding the i2c nodes and possibly the pwm, i2s and spi nodes if the relevant drivers get accepted, where the ids defined in the dt-binding headers are needed.So if the whole thing is acceptable could we either offer a branch from the clk-tree that can get merged or take the whole series through the arm tree?
Heiko,
This version looks good. I've pushed a branch with all 14 of these patches based on 3.16-rc3 to the clk tree. See:
Quoted 6 lines
git://git.linaro.org/people/mike.turquette/linux.gitclk-rockchipIf everyone is OK to merge that stable branch then I will merge clk-rockchip into clk-next and we're all good. If the arm-soc guys want to carve it up a bit further or handle it in a different way then we can do that. I've Cc'd arm-soc for clarification.
Traditionally we usually take the DT changes through arm-soc, but as long as we share the branch we might be ok. We tend to stick them in different branches in our tree though, so rockchip will be a little mis-sorted this release. Not a big deal, and we can deal with it.
So, I'll leave it to Heiko to choose here, he knows best what other DT changes are coming this release. If he wants to carry the DT changes separately, then patches 1-10 would be for the clk tree, so it should be easy to reset the branch back a bit (and 11-14 would be for arm-soc).
-Olof
Heiko Stübner
maintainerv5 cover Clock support for rk3066,rk3188 and rk3288
Hi Olof,
Am Sonntag, 13. Juli 2014, 20:12:07 schrieb Olof Johansson:
Quoted 3 lines
Hi,
On Sun, Jul 13, 2014 at 12:46 PM, Mike Turquette <[email protected]>
Quoted 31 lines · wrote:
Quoted 19 lines
Quoting Heiko St?bner (2014-07-02 16:53:24)
Quoted 11 lines
This series adds a clock driver infrastructure for Rockchip SoCs in general and clock-definitions for the RK3188 and RK3288 in particular.
Apart from the
arch/armpatches included here, there are some more in the waiting line, like adding the i2c nodes and possibly the pwm, i2s and spi nodes if the relevant drivers get accepted, where the ids defined in the dt-binding headers are needed.So if the whole thing is acceptable could we either offer a branch from the clk-tree that can get merged or take the whole series through the arm tree?
Heiko,
This version looks good. I've pushed a branch with all 14 of these patches based on 3.16-rc3 to the clk tree. See:
Quoted 6 lines
git://git.linaro.org/people/mike.turquette/linux.gitclk-rockchipIf everyone is OK to merge that stable branch then I will merge clk-rockchip into clk-next and we're all good. If the arm-soc guys want to carve it up a bit further or handle it in a different way then we can do that. I've Cc'd arm-soc for clarification.
Traditionally we usually take the DT changes through arm-soc, but as long as we share the branch we might be ok. We tend to stick them in different branches in our tree though, so rockchip will be a little mis-sorted this release. Not a big deal, and we can deal with it.
Quoted 5 lines
So, I'll leave it to Heiko to choose here, he knows best what other DT changes are coming this release. If he wants to carry the DT changes separately, then patches 1-10 would be for the clk tree, so it should be easy to reset the branch back a bit (and 11-14 would be for arm-soc).
hmm, there are essentially two changeset/branches upcoming:
- the collected dts changes for rk3066 and rk3188 I posted saturday These essentially extend patches 12-14
- rk3288 support which would start off patch 11 (the reset controller)
So if we were to separate the series I would say patches 1-11 in the shared branch and patch 12-14 as the first ones for a rk3066/rk3188 specific branch.
Heiko
Heiko Stübner
maintainerv5 cover Clock support for rk3066,rk3188 and rk3288
Hi Mike,
Am Montag, 14. Juli 2014, 10:07:01 schrieb Heiko St?bner:
Quoted 46 lines
Hi Olof,
Am Sonntag, 13. Juli 2014, 20:12:07 schrieb Olof Johansson:
Quoted 3 lines
Hi,
On Sun, Jul 13, 2014 at 12:46 PM, Mike Turquette <[email protected]>
Quoted 32 lines · wrote:
Quoted 20 lines
Quoting Heiko St?bner (2014-07-02 16:53:24)
Quoted 9 lines
This series adds a clock driver infrastructure for Rockchip SoCs in general and clock-definitions for the RK3188 and RK3288 in particular.
Apart from the
arch/armpatches included here, there are some more in the waiting line, like adding the i2c nodes and possibly the pwm, i2s
and spi nodes if the relevant drivers get accepted, where the ids defined in the dt-binding headers are needed.Quoted 3 lines
So if the whole thing is acceptable could we either offer a branch from the clk-tree that can get merged or take the whole series through the arm tree?
Heiko,
This version looks good. I've pushed a branch with all 14 of these patches based on 3.16-rc3 to the clk tree. See:
Quoted 6 lines
git://git.linaro.org/people/mike.turquette/linux.gitclk-rockchipIf everyone is OK to merge that stable branch then I will merge clk-rockchip into clk-next and we're all good. If the arm-soc guys want to carve it up a bit further or handle it in a different way then we can do that. I've Cc'd arm-soc for clarification.
Traditionally we usually take the DT changes through arm-soc, but as long as we share the branch we might be ok. We tend to stick them in different branches in our tree though, so rockchip will be a little mis-sorted this release. Not a big deal, and we can deal with it.
Quoted 5 lines
So, I'll leave it to Heiko to choose here, he knows best what other DT changes are coming this release. If he wants to carry the DT changes separately, then patches 1-10 would be for the clk tree, so it should be easy to reset the branch back a bit (and 11-14 would be for arm-soc).
Quoted 8 lines
hmm, there are essentially two changeset/branches upcoming:
- the collected dts changes for rk3066 and rk3188 I posted saturday These essentially extend patches 12-14
- rk3288 support which would start off patch 11 (the reset controller)So if we were to separate the series I would say patches 1-11 in the shared branch and patch 12-14 as the first ones for a rk3066/rk3188 specific branch.
are you ok with simply resetting the clk-rockchip branch to
"ARM: rockchip: Select ARCH_HAS_RESET_CONTROLLER"
being the last commit and the last 3 patches going through arm-soc?
As we're already at -rc6 now, it would be very cool if we could get this sorted soon.
Thanks
Heiko
v5 cover Clock support for rk3066,rk3188 and rk3288
Quoting Heiko St?bner (2014-07-22 08:45:00)
Quoted 58 lines
Hi Mike,
Am Montag, 14. Juli 2014, 10:07:01 schrieb Heiko St?bner:
Quoted 46 lines
Hi Olof,
Am Sonntag, 13. Juli 2014, 20:12:07 schrieb Olof Johansson:
Quoted 3 lines
Hi,
On Sun, Jul 13, 2014 at 12:46 PM, Mike Turquette <[email protected]>
Quoted 32 lines · wrote:
Quoted 20 lines
Quoting Heiko St?bner (2014-07-02 16:53:24)
Quoted 9 lines
This series adds a clock driver infrastructure for Rockchip SoCs in general and clock-definitions for the RK3188 and RK3288 in particular.
Apart from the
arch/armpatches included here, there are some more in the waiting line, like adding the i2c nodes and possibly the pwm, i2s
and spi nodes if the relevant drivers get accepted, where the ids defined in the dt-binding headers are needed.Quoted 3 lines
So if the whole thing is acceptable could we either offer a branch from the clk-tree that can get merged or take the whole series through the arm tree?
Heiko,
This version looks good. I've pushed a branch with all 14 of these patches based on 3.16-rc3 to the clk tree. See:
Quoted 6 lines
git://git.linaro.org/people/mike.turquette/linux.gitclk-rockchipIf everyone is OK to merge that stable branch then I will merge clk-rockchip into clk-next and we're all good. If the arm-soc guys want to carve it up a bit further or handle it in a different way then we can do that. I've Cc'd arm-soc for clarification.
Traditionally we usually take the DT changes through arm-soc, but as long as we share the branch we might be ok. We tend to stick them in different branches in our tree though, so rockchip will be a little mis-sorted this release. Not a big deal, and we can deal with it.
Quoted 5 lines
So, I'll leave it to Heiko to choose here, he knows best what other DT changes are coming this release. If he wants to carry the DT changes separately, then patches 1-10 would be for the clk tree, so it should be easy to reset the branch back a bit (and 11-14 would be for arm-soc).
Quoted 8 lines
hmm, there are essentially two changeset/branches upcoming:
- the collected dts changes for rk3066 and rk3188 I posted saturday These essentially extend patches 12-14
- rk3288 support which would start off patch 11 (the reset controller)So if we were to separate the series I would say patches 1-11 in the shared branch and patch 12-14 as the first ones for a rk3066/rk3188 specific branch.
Quoted 6 lines
are you ok with simply resetting the clk-rockchip branch to
"ARM: rockchip: SelectARCH_HAS_RESET_CONTROLLER"
being the last commit and the last 3 patches going through arm-soc?As we're already at -rc6 now, it would be very cool if we could get this sorted soon.
Done! My apologies on the delay but I was traveling for business for a week, and then relocated my apartment the next week and only just now have the internet tubes been hooked up to my new home.
I've pushed the truncated branch to my linaro tree and merged the same into clk-next.
Regards,
Mike
Quoted 4 lines
Thanks
Heiko