ARM: sunxi: rename DT clock node names to clk@N
Subsystems (4)
v4 cover ARM: sunxi: rename DT clock node names to clk@N
Hi everyone,
This is v4 of the clock node renaming patch series, which renames the clock nodes in sunxi dts to conform to device tree naming conventions, i.e. clk at N. Dummy clocks that will be renamed/removed later, or clocks sharing registers are not renamed.
Renamed clock nodes have clock-output-names properties added to desginate their names. Support for this is added in the first patch.
Changes since v3:
* Simplify device tree binding documentation: require all sunxi clocks to have clock-output-names.
* Add clock-output-names to all sunxi clock nodes, including ones not renamed.
Changes since v2:
* Dropped Cubietruck dts i2c controller patch. Maxime has taken it.
* Changed ARM in commit messages to uppercase.
* Add pll5, pll6 clock names to factors_data tied to compatible strings.
* Dropped pll5 output name in dts due to the previous change.
* Added dts binding documentation for "clock-output-names", as well as examples.
Changes since v1:
* Fixed pll5, pll6 divs clock name handling
Cheers
ChenYu
Chen-Yu Tsai (8):
clk: sunxi: add clock-output-names dt property support
clk: sunxi: update clock-output-names dt binding documentation
clk: sunxi: add names for pll5, pll6 parent clocks to factors_data
clk: sunxi: get divs parent clock name from parent factor clock
ARM: dts: sun4i: rename clock node names to clk at N
ARM: dts: sun5i: rename clock node names to clk at N
ARM: dts: sun6i: rename clock node names to clk at N
ARM: dts: sun7i: rename clock node names to clk at N
Documentation/devicetree/bindings/clock/sunxi.txt | 32 ++++++++++++++++---- arch/arm/boot/dts/sun4i-a10.dtsi | 30 ++++++++++++------- arch/arm/boot/dts/sun5i-a10s.dtsi | 30 ++++++++++++------- arch/arm/boot/dts/sun5i-a13.dtsi | 30 ++++++++++++------- arch/arm/boot/dts/sun6i-a31.dtsi | 19 ++++++++---- arch/arm/boot/dts/sun7i-a20.dtsi | 25 +++++++++++----- drivers/clk/sunxi/clk-sunxi.c | 36 ++++++++++++++++------- 7 files changed, 143 insertions(+), 59 deletions(-)
Signature · 1 line
1.9.rc1
PATCH v4 1/8 clk: sunxi: add clock-output-names dt property support
sunxi clock drivers use dt node name as clock name, but clock nodes should be named clk at X, so the names would be the same. Let the drivers read clock names from dt clock-output-names property.
--- drivers/clk/sunxi/clk-sunxi.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/clk/sunxi/clk-sunxi.c +6 -0
@@ -51,6 +51,8 @@ static void __init sun4i_osc_clk_setup(struct device_node *node)if (!gate) goto err_free_fixed; +of_property_read_string (node,"clock-output-names" , &clk_name); +/* set up gate and fixed rate properties */ gate->reg =of_iomap (node,0 ); gate->bit_idx =SUNXI_OSC24M_GATE ;
@@ -601,6 +603,8 @@ static void __init sunxi_mux_clk_setup(struct device_node *node, (parents[i] = of_clk_get_parent_name(node, i)) != NULL) i++; +of_property_read_string (node,"clock-output-names" , &clk_name); + clk = clk_register_mux(NULL, clk_name, parents, i, CLK_SET_RATE_NO_REPARENT, reg, data->shift, SUNXI_MUX_GATE_WIDTH,
@@ -660,6 +664,8 @@ static void __init sunxi_divider_clk_setup(struct device_node *node, clk_parent =of_clk_get_parent_name (node,0 ); +of_property_read_string (node,"clock-output-names" , &clk_name); + clk = clk_register_divider(NULL, clk_name, clk_parent, 0, reg, data->shift, data->width, data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0,
Signature · 1 line
1.9.rc1
PATCH v4 2/8 clk: sunxi: update clock-output-names dt binding documentation
In reply to Chen-Yu Tsaiclock-output-names is now required for most of sunxi clock nodes, to provide the name of the corresponding clock. Add the new requirements, exceptions, as well as examples.
--- Documentation/devicetree/bindings/clock/sunxi.txt | 32 ++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/clock/sunxi.txt +26 -6
@@ -44,10 +44,11 @@ Required properties for all clocks: multiplexed clocks, the list order must match the hardware programming order. - #clock-cells : from common clock binding; shall be set to 0 except for - "allwinner,*-gates-clk" where it shall be set to 1 - -Additionally, "allwinner,*-gates-clk" clocks require: -- clock-output-names : the corresponding gate names that the clock controls + "allwinner,*-gates-clk", "allwinner,sun4i-pll5-clk" and + "allwinner,sun4i-pll6-clk" where it shall be set to 1 +- clock-output-names : shall be the corresponding names of the outputs. + If the clock module only has one output, the name shall be the + module name. Clock consumers should specify the desired clocks they use with a "clocks" phandle cell. Consumers that are using a gated clock should
@@ -56,18 +57,28 @@ offset of the bit controlling this particular gate in the register. For example: -osc24M: osc24M at 01c20050 { +osc24M: clk at 01c20050 { #clock-cells = <0>; compatible = "allwinner,sun4i-osc-clk"; reg = <0x01c20050 0x4>; clocks = <&osc24M_fixed>; + clock-output-names = "osc24M"; }; -pll1: pll1 at 01c20000 { +pll1: clk at 01c20000 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20000 0x4>; clocks = <&osc24M>; + clock-output-names = "pll1"; +}; + +pll5: clk at 01c20020 { + #clock-cells = <1>; + compatible = "allwinner,sun4i-pll5-clk"; + reg = <0x01c20020 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll5_ddr", "pll5_other"; }; cpu: cpu at 01c20054 {
@@ -75,4 +86,13 @@ cpu: cpu at 01c20054 { compatible = "allwinner,sun4i-cpu-clk"; reg = <0x01c20054 0x4>; clocks = <&osc32k>, <&osc24M>, <&pll1>; + clock-output-names = "cpu"; +}; + +mmc0_clk: clk at 01c20088 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-mod0-clk"; + reg = <0x01c20088 0x4>; + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; + clock-output-names = "mmc0"; };
Signature · 1 line
1.9.rc1
PATCH v4 3/8 clk: sunxi: add names for pll5, pll6 parent clocks to factors_data
In reply to Chen-Yu TsaiSome factor clocks, such as the parent clock of pll5 and pll6, have multiple output names. Add the corresponding names to factors_data tied to compatible string.
--- drivers/clk/sunxi/clk-sunxi.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)
drivers/clk/sunxi/clk-sunxi.c +18 -9
@@ -389,6 +389,7 @@ struct factors_data {int mux;struct clk_factors_config *table;void (*getter) (u32 *rate,u32 parent_rate,u8 *n,u8 *k,u8 *m,u8 *p); +const char *name; };static struct clk_factors_config sun4i_pll1_config = {
@@ -457,6 +458,14 @@ static const struct factors_data sun4i_pll5_data __initconst = { .enable = 31, .table = &sun4i_pll5_config, .getter = sun4i_get_pll5_factors, + .name = "pll5", +}; + +static const struct factors_data sun4i_pll6_data__initconst = { + .enable =31 , + .table = &sun4i_pll5_config, + .getter = sun4i_get_pll5_factors, + .name ="pll6" , };static const struct factors_data sun4i_apb1_data__initconst = {
@@ -499,14 +508,14 @@ static struct clk * __init sunxi_factors_clk_setup(struct device_node *node, (parents[i] = of_clk_get_parent_name(node, i)) != NULL) i++; -/* Nodes should be providing the name via clock-output-names -* but originally our dts didn't, and so we used node->name. -* The new, better nodes look like clk at deadbeef, so we pull the -* name just in this case */ -if (!strcmp ("clk" , clk_name)) { -of_property_read_string_index (node,"clock-output-names" , -0 , &clk_name); - } +/* +* some factor clocks, such as pll5 and pll6, may have multiple +* outputs, and have their name designated in factors_data +*/ +if (data->name) + clk_name = data->name; +else +of_property_read_string (node,"clock-output-names" , &clk_name); factors =kzalloc (sizeof (struct clk_factors ),GFP_KERNEL );if (!factors)
@@ -838,7 +847,7 @@ static const struct divs_data pll5_divs_data __initconst = { };static const struct divs_data pll6_divs_data__initconst = { - .factors = &sun4i_pll5_data, + .factors = &sun4i_pll6_data, .div = { { .shift =0 , .table = pll6_sata_tbl, .gate =14 },/* M, SATA */ { .fixed =2 },/* P, other */
Signature · 1 line
1.9.rc1
PATCH v4 4/8 clk: sunxi: get divs parent clock name from parent factor clock
In reply to Chen-Yu TsaiDivs clocks consist of a parent factor clock with multiple outputs, and seperate clocks for each output. Get the name of the parent clock from the parent factor clock, instead of the DT node name.
--- drivers/clk/sunxi/clk-sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/sunxi/clk-sunxi.c +2 -1
@@ -869,7 +869,7 @@ static void __init sunxi_divs_clk_setup(struct device_node *node, struct divs_data *data) {struct clk_onecell_data *clk_data; -const char *parent = node->name; +const char *parent;const char *clk_name;struct clk **clks, *pclk;struct clk_hw *gate_hw, *rate_hw;
@@ -883,6 +883,7 @@ static void __init sunxi_divs_clk_setup(struct device_node *node,/* Set up factor clock that we will be dividing */ pclk =sunxi_factors_clk_setup (node, data->factors); + parent =__clk_get_name (pclk); reg =of_iomap (node,0 );
Signature · 1 line
1.9.rc1
PATCH v4 5/8 ARM: dts: sun4i: rename clock node names to clk@N
In reply to Chen-Yu TsaiDevice tree naming conventions state that node names should match node function. Change fully functioning clock nodes to match and add clock-output-names to all sunxi clock nodes.
--- arch/arm/boot/dts/sun4i-a10.dtsi | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)
arch/arm/boot/dts/sun4i-a10.dtsi +20 -10
@@ -52,34 +52,38 @@ clock-frequency = <0>; }; - osc24M: osc24M at 01c20050 { + osc24M: clk at 01c20050 { #clock-cells = <0>; compatible = "allwinner,sun4i-osc-clk"; reg = <0x01c20050 0x4>; clock-frequency = <24000000>; + clock-output-names = "osc24M"; }; - osc32k: osc32k { + osc32k: clk at 0 { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; + clock-output-names = "osc32k"; }; - pll1: pll1 at 01c20000 { + pll1: clk at 01c20000 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20000 0x4>; clocks = <&osc24M>; + clock-output-names = "pll1"; }; - pll4: pll4 at 01c20018 { + pll4: clk at 01c20018 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20018 0x4>; clocks = <&osc24M>; + clock-output-names = "pll4"; }; - pll5: pll5 at 01c20020 { + pll5: clk at 01c20020 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll5-clk"; reg = <0x01c20020 0x4>;
@@ -87,7 +91,7 @@ clock-output-names = "pll5_ddr", "pll5_other"; }; - pll6: pll6 at 01c20028 { + pll6: clk at 01c20028 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll6-clk"; reg = <0x01c20028 0x4>;
@@ -101,6 +105,7 @@ compatible = "allwinner,sun4i-cpu-clk"; reg = <0x01c20054 0x4>; clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>; + clock-output-names = "cpu"; }; axi: axi at 01c20054 {
@@ -108,9 +113,10 @@ compatible = "allwinner,sun4i-axi-clk"; reg = <0x01c20054 0x4>; clocks = <&cpu>; + clock-output-names = "axi"; }; - axi_gates: axi_gates at 01c2005c { + axi_gates: clk at 01c2005c { #clock-cells = <1>; compatible = "allwinner,sun4i-axi-gates-clk"; reg = <0x01c2005c 0x4>;
@@ -123,9 +129,10 @@ compatible = "allwinner,sun4i-ahb-clk"; reg = <0x01c20054 0x4>; clocks = <&axi>; + clock-output-names = "ahb"; }; - ahb_gates: ahb_gates at 01c20060 { + ahb_gates: clk at 01c20060 { #clock-cells = <1>; compatible = "allwinner,sun4i-ahb-gates-clk"; reg = <0x01c20060 0x8>;
@@ -148,9 +155,10 @@ compatible = "allwinner,sun4i-apb0-clk"; reg = <0x01c20054 0x4>; clocks = <&ahb>; + clock-output-names = "apb0"; }; - apb0_gates: apb0_gates at 01c20068 { + apb0_gates: clk at 01c20068 { #clock-cells = <1>; compatible = "allwinner,sun4i-apb0-gates-clk"; reg = <0x01c20068 0x4>;
@@ -165,6 +173,7 @@ compatible = "allwinner,sun4i-apb1-mux-clk"; reg = <0x01c20058 0x4>; clocks = <&osc24M>, <&pll6 1>, <&osc32k>; + clock-output-names = "apb1_mux"; }; apb1: apb1 at 01c20058 {
@@ -172,9 +181,10 @@ compatible = "allwinner,sun4i-apb1-clk"; reg = <0x01c20058 0x4>; clocks = <&apb1_mux>; + clock-output-names = "apb1"; }; - apb1_gates: apb1_gates at 01c2006c { + apb1_gates: clk at 01c2006c { #clock-cells = <1>; compatible = "allwinner,sun4i-apb1-gates-clk"; reg = <0x01c2006c 0x4>;
Signature · 1 line
1.9.rc1
PATCH v4 6/8 ARM: dts: sun5i: rename clock node names to clk@N
In reply to Chen-Yu TsaiDevice tree naming conventions state that node names should match node function. Change fully functioning clock nodes to match and add clock-output-names to all sunxi clock nodes.
--- arch/arm/boot/dts/sun5i-a10s.dtsi | 30 ++++++++++++++++++++---------- arch/arm/boot/dts/sun5i-a13.dtsi | 30 ++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 20 deletions(-)
arch/arm/boot/dts/sun5i-a10s.dtsi +20 -10
@@ -47,34 +47,38 @@ clock-frequency = <0>; }; - osc24M: osc24M at 01c20050 { + osc24M: clk at 01c20050 { #clock-cells = <0>; compatible = "allwinner,sun4i-osc-clk"; reg = <0x01c20050 0x4>; clock-frequency = <24000000>; + clock-output-names = "osc24M"; }; - osc32k: osc32k { + osc32k: clk at 0 { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; + clock-output-names = "osc32k"; }; - pll1: pll1 at 01c20000 { + pll1: clk at 01c20000 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20000 0x4>; clocks = <&osc24M>; + clock-output-names = "pll1"; }; - pll4: pll4 at 01c20018 { + pll4: clk at 01c20018 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20018 0x4>; clocks = <&osc24M>; + clock-output-names = "pll4"; }; - pll5: pll5 at 01c20020 { + pll5: clk at 01c20020 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll5-clk"; reg = <0x01c20020 0x4>;
@@ -82,7 +86,7 @@ clock-output-names = "pll5_ddr", "pll5_other"; }; - pll6: pll6 at 01c20028 { + pll6: clk at 01c20028 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll6-clk"; reg = <0x01c20028 0x4>;
@@ -96,6 +100,7 @@ compatible = "allwinner,sun4i-cpu-clk"; reg = <0x01c20054 0x4>; clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>; + clock-output-names = "cpu"; }; axi: axi at 01c20054 {
@@ -103,9 +108,10 @@ compatible = "allwinner,sun4i-axi-clk"; reg = <0x01c20054 0x4>; clocks = <&cpu>; + clock-output-names = "axi"; }; - axi_gates: axi_gates at 01c2005c { + axi_gates: clk at 01c2005c { #clock-cells = <1>; compatible = "allwinner,sun4i-axi-gates-clk"; reg = <0x01c2005c 0x4>;
@@ -118,9 +124,10 @@ compatible = "allwinner,sun4i-ahb-clk"; reg = <0x01c20054 0x4>; clocks = <&axi>; + clock-output-names = "ahb"; }; - ahb_gates: ahb_gates at 01c20060 { + ahb_gates: clk at 01c20060 { #clock-cells = <1>; compatible = "allwinner,sun5i-a10s-ahb-gates-clk"; reg = <0x01c20060 0x8>;
@@ -139,9 +146,10 @@ compatible = "allwinner,sun4i-apb0-clk"; reg = <0x01c20054 0x4>; clocks = <&ahb>; + clock-output-names = "apb0"; }; - apb0_gates: apb0_gates at 01c20068 { + apb0_gates: clk at 01c20068 { #clock-cells = <1>; compatible = "allwinner,sun5i-a10s-apb0-gates-clk"; reg = <0x01c20068 0x4>;
@@ -155,6 +163,7 @@ compatible = "allwinner,sun4i-apb1-mux-clk"; reg = <0x01c20058 0x4>; clocks = <&osc24M>, <&pll6 1>, <&osc32k>; + clock-output-names = "apb1_mux"; }; apb1: apb1 at 01c20058 {
@@ -162,9 +171,10 @@ compatible = "allwinner,sun4i-apb1-clk"; reg = <0x01c20058 0x4>; clocks = <&apb1_mux>; + clock-output-names = "apb1"; }; - apb1_gates: apb1_gates at 01c2006c { + apb1_gates: clk at 01c2006c { #clock-cells = <1>; compatible = "allwinner,sun5i-a10s-apb1-gates-clk"; reg = <0x01c2006c 0x4>;
arch/arm/boot/dts/sun5i-a13.dtsi +20 -10
@@ -47,34 +47,38 @@ clock-frequency = <0>; }; - osc24M: osc24M at 01c20050 { + osc24M: clk at 01c20050 { #clock-cells = <0>; compatible = "allwinner,sun4i-osc-clk"; reg = <0x01c20050 0x4>; clock-frequency = <24000000>; + clock-output-names = "osc24M"; }; - osc32k: osc32k { + osc32k: clk at 0 { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; + clock-output-names = "osc32k"; }; - pll1: pll1 at 01c20000 { + pll1: clk at 01c20000 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20000 0x4>; clocks = <&osc24M>; + clock-output-names = "pll1"; }; - pll4: pll4 at 01c20018 { + pll4: clk at 01c20018 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20018 0x4>; clocks = <&osc24M>; + clock-output-names = "pll4"; }; - pll5: pll5 at 01c20020 { + pll5: clk at 01c20020 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll5-clk"; reg = <0x01c20020 0x4>;
@@ -82,7 +86,7 @@ clock-output-names = "pll5_ddr", "pll5_other"; }; - pll6: pll6 at 01c20028 { + pll6: clk at 01c20028 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll6-clk"; reg = <0x01c20028 0x4>;
@@ -96,6 +100,7 @@ compatible = "allwinner,sun4i-cpu-clk"; reg = <0x01c20054 0x4>; clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>; + clock-output-names = "cpu"; }; axi: axi at 01c20054 {
@@ -103,9 +108,10 @@ compatible = "allwinner,sun4i-axi-clk"; reg = <0x01c20054 0x4>; clocks = <&cpu>; + clock-output-names = "axi"; }; - axi_gates: axi_gates at 01c2005c { + axi_gates: clk at 01c2005c { #clock-cells = <1>; compatible = "allwinner,sun4i-axi-gates-clk"; reg = <0x01c2005c 0x4>;
@@ -118,9 +124,10 @@ compatible = "allwinner,sun4i-ahb-clk"; reg = <0x01c20054 0x4>; clocks = <&axi>; + clock-output-names = "ahb"; }; - ahb_gates: ahb_gates at 01c20060 { + ahb_gates: clk at 01c20060 { #clock-cells = <1>; compatible = "allwinner,sun5i-a13-ahb-gates-clk"; reg = <0x01c20060 0x8>;
@@ -138,9 +145,10 @@ compatible = "allwinner,sun4i-apb0-clk"; reg = <0x01c20054 0x4>; clocks = <&ahb>; + clock-output-names = "apb0"; }; - apb0_gates: apb0_gates at 01c20068 { + apb0_gates: clk at 01c20068 { #clock-cells = <1>; compatible = "allwinner,sun5i-a13-apb0-gates-clk"; reg = <0x01c20068 0x4>;
@@ -153,6 +161,7 @@ compatible = "allwinner,sun4i-apb1-mux-clk"; reg = <0x01c20058 0x4>; clocks = <&osc24M>, <&pll6 1>, <&osc32k>; + clock-output-names = "apb1_mux"; }; apb1: apb1 at 01c20058 {
@@ -160,9 +169,10 @@ compatible = "allwinner,sun4i-apb1-clk"; reg = <0x01c20058 0x4>; clocks = <&apb1_mux>; + clock-output-names = "apb1"; }; - apb1_gates: apb1_gates at 01c2006c { + apb1_gates: clk at 01c2006c { #clock-cells = <1>; compatible = "allwinner,sun5i-a13-apb1-gates-clk"; reg = <0x01c2006c 0x4>;
Signature · 1 line
1.9.rc1
PATCH v4 7/8 ARM: dts: sun6i: rename clock node names to clk@N
In reply to Chen-Yu TsaiDevice tree naming conventions state that node names should match node function. Change fully functioning clock nodes to match and add clock-output-names to all sunxi clock nodes.
--- arch/arm/boot/dts/sun6i-a31.dtsi | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
arch/arm/boot/dts/sun6i-a31.dtsi +14 -5
@@ -60,17 +60,19 @@ clock-frequency = <24000000>; }; - osc32k: osc32k { + osc32k: clk at 0 { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; + clock-output-names = "osc32k"; }; - pll1: pll1 at 01c20000 { + pll1: clk at 01c20000 { #clock-cells = <0>; compatible = "allwinner,sun6i-a31-pll1-clk"; reg = <0x01c20000 0x4>; clocks = <&osc24M>; + clock-output-names = "pll1"; }; /*
@@ -97,6 +99,7 @@ * Allwinner. */ clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; + clock-output-names = "cpu"; }; axi: axi at 01c20050 {
@@ -104,6 +107,7 @@ compatible = "allwinner,sun4i-axi-clk"; reg = <0x01c20050 0x4>; clocks = <&cpu>; + clock-output-names = "axi"; }; ahb1_mux: ahb1_mux at 01c20054 {
@@ -111,6 +115,7 @@ compatible = "allwinner,sun6i-a31-ahb1-mux-clk"; reg = <0x01c20054 0x4>; clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>; + clock-output-names = "ahb1_mux"; }; ahb1: ahb1 at 01c20054 {
@@ -118,9 +123,10 @@ compatible = "allwinner,sun4i-ahb-clk"; reg = <0x01c20054 0x4>; clocks = <&ahb1_mux>; + clock-output-names = "ahb1"; }; - ahb1_gates: ahb1_gates at 01c20060 { + ahb1_gates: clk at 01c20060 { #clock-cells = <1>; compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; reg = <0x01c20060 0x8>;
@@ -146,9 +152,10 @@ compatible = "allwinner,sun4i-apb0-clk"; reg = <0x01c20054 0x4>; clocks = <&ahb1>; + clock-output-names = "apb1"; }; - apb1_gates: apb1_gates at 01c20060 { + apb1_gates: clk at 01c20068 { #clock-cells = <1>; compatible = "allwinner,sun6i-a31-apb1-gates-clk"; reg = <0x01c20068 0x4>;
@@ -163,6 +170,7 @@ compatible = "allwinner,sun4i-apb1-mux-clk"; reg = <0x01c20058 0x4>; clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "apb2_mux"; }; apb2: apb2 at 01c20058 {
@@ -170,9 +178,10 @@ compatible = "allwinner,sun6i-a31-apb2-div-clk"; reg = <0x01c20058 0x4>; clocks = <&apb2_mux>; + clock-output-names = "apb2"; }; - apb2_gates: apb2_gates at 01c2006c { + apb2_gates: clk at 01c2006c { #clock-cells = <1>; compatible = "allwinner,sun6i-a31-apb2-gates-clk"; reg = <0x01c2006c 0x4>;
Signature · 1 line
1.9.rc1
PATCH v4 8/8 ARM: dts: sun7i: rename clock node names to clk@N
In reply to Chen-Yu TsaiDevice tree naming conventions state that node names should match node function. Change fully functioning clock nodes to match and add clock-output-names to all sunxi clock nodes.
--- arch/arm/boot/dts/sun7i-a20.dtsi | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
arch/arm/boot/dts/sun7i-a20.dtsi +17 -8
@@ -46,11 +46,12 @@ #size-cells = <1>; ranges; - osc24M: osc24M at 01c20050 { + osc24M: clk at 01c20050 { #clock-cells = <0>; compatible = "allwinner,sun4i-osc-clk"; reg = <0x01c20050 0x4>; clock-frequency = <24000000>; + clock-output-names = "osc24M"; }; osc32k: clk at 0 {
@@ -60,21 +61,23 @@ clock-output-names = "osc32k"; }; - pll1: pll1 at 01c20000 { + pll1: clk at 01c20000 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20000 0x4>; clocks = <&osc24M>; + clock-output-names = "pll1"; }; - pll4: pll4 at 01c20018 { + pll4: clk at 01c20018 { #clock-cells = <0>; compatible = "allwinner,sun4i-pll1-clk"; reg = <0x01c20018 0x4>; clocks = <&osc24M>; + clock-output-names = "pll4"; }; - pll5: pll5 at 01c20020 { + pll5: clk at 01c20020 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll5-clk"; reg = <0x01c20020 0x4>;
@@ -82,7 +85,7 @@ clock-output-names = "pll5_ddr", "pll5_other"; }; - pll6: pll6 at 01c20028 { + pll6: clk at 01c20028 { #clock-cells = <1>; compatible = "allwinner,sun4i-pll6-clk"; reg = <0x01c20028 0x4>;
@@ -95,6 +98,7 @@ compatible = "allwinner,sun4i-cpu-clk"; reg = <0x01c20054 0x4>; clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll6 1>; + clock-output-names = "cpu"; }; axi: axi at 01c20054 {
@@ -102,6 +106,7 @@ compatible = "allwinner,sun4i-axi-clk"; reg = <0x01c20054 0x4>; clocks = <&cpu>; + clock-output-names = "axi"; }; ahb: ahb at 01c20054 {
@@ -109,9 +114,10 @@ compatible = "allwinner,sun4i-ahb-clk"; reg = <0x01c20054 0x4>; clocks = <&axi>; + clock-output-names = "ahb"; }; - ahb_gates: ahb_gates at 01c20060 { + ahb_gates: clk at 01c20060 { #clock-cells = <1>; compatible = "allwinner,sun7i-a20-ahb-gates-clk"; reg = <0x01c20060 0x8>;
@@ -136,9 +142,10 @@ compatible = "allwinner,sun4i-apb0-clk"; reg = <0x01c20054 0x4>; clocks = <&ahb>; + clock-output-names = "apb0"; }; - apb0_gates: apb0_gates at 01c20068 { + apb0_gates: clk at 01c20068 { #clock-cells = <1>; compatible = "allwinner,sun7i-a20-apb0-gates-clk"; reg = <0x01c20068 0x4>;
@@ -154,6 +161,7 @@ compatible = "allwinner,sun4i-apb1-mux-clk"; reg = <0x01c20058 0x4>; clocks = <&osc24M>, <&pll6 1>, <&osc32k>; + clock-output-names = "apb1_mux"; }; apb1: apb1 at 01c20058 {
@@ -161,9 +169,10 @@ compatible = "allwinner,sun4i-apb1-clk"; reg = <0x01c20058 0x4>; clocks = <&apb1_mux>; + clock-output-names = "apb1"; }; - apb1_gates: apb1_gates at 01c2006c { + apb1_gates: clk at 01c2006c { #clock-cells = <1>; compatible = "allwinner,sun7i-a20-apb1-gates-clk"; reg = <0x01c2006c 0x4>;
Signature · 1 line
1.9.rc1
PATCH v4 8/8 ARM: dts: sun7i: rename clock node names to clk@N
Hi,
Quoted 5 lines · Chen-Yu Tsai
Device tree naming conventions state that node names should match node function. Change fully functioning clock nodes to match and add clock-output-names to all sunxi clock nodes.
Signed-off-by Chen-Yu Tsai <[email protected]>
This patch seems to have broken cubieboard2 in arm-soc for-next. Cubie 1 is broken too, likely due to the corresponding change there.
Maxime, are we missing some dependency?
-Olof
PATCH v4 8/8 ARM: dts: sun7i: rename clock node names to clk@N
Hi,
Quoted 7 lines · Olof Johansson
Hi,
Quoted 4 lines · Chen-Yu Tsai
Device tree naming conventions state that node names should match node function. Change fully functioning clock nodes to match and add clock-output-names to all sunxi clock nodes.
Quoted 7 lines
Quoted 1 line
Signed-off-by Chen-Yu Tsai <[email protected]>This patch seems to have broken cubieboard2 in arm-soc for-next. Cubie 1 is broken too, likely due to the corresponding change there.
Maxime, are we missing some dependency?
Most likely what you are seeing is more what Kevin already caught here:
http://lists.linaro.org/pipermail/kernel-build-reports/2014-March/002761.html
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140318/c6d0176a/attachment.sig>
v4 cover ARM: sunxi: rename DT clock node names to clk@N
In reply to Chen-Yu TsaiQuoted 10 lines · Chen-Yu Tsai
Hi everyone,
This is v4 of the clock node renaming patch series, which renames the clock nodes in sunxi dts to conform to device tree naming conventions, i.e. clk at N. Dummy clocks that will be renamed/removed later, or clocks sharing registers are not renamed.
Renamed clock nodes have clock-output-names properties added to desginate their names. Support for this is added in the first patch.
Applied the last 4 patches to sunxi/dt-for-3.15.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140207/3aba29dd/attachment.sig>
Emilio López
maintainerv4 cover ARM: sunxi: rename DT clock node names to clk@N
El 07/02/14 16:24, Maxime Ripard escribi?:
Quoted 8 lines · Chen-Yu Tsai
Quoted 7 lines
Hi everyone,
This is v4 of the clock node renaming patch series, which renames the clock nodes in sunxi dts to conform to device tree naming conventions, i.e. clk at N. Dummy clocks that will be renamed/removed later, or clocks sharing registers are not renamed.
Quoted 5 lines
Quoted 3 lines
Renamed clock nodes have clock-output-names properties added to desginate their names. Support for this is added in the first patch.
Applied the last 4 patches to sunxi/dt-for-3.15.
And I've applied the first 4 to sunxi-clk-for-mike some time ago.
Thanks for working on this!
Emilio