Add CPU clock support for Armada 7K/8K
Subsystems (4)
Gregory CLEMENT
maintainerv3 cover Add CPU clock support for Armada 7K/8K
Hello,
This is the third version of a series allowing to manage the cpu clock for Armada 7K/8K. For these SoCs, the CPUs share the same clock by cluster, so actually the clock management is done at cluster level.
As for the other Armada 7K/8K clocks it is possible to have multiple AP so here again we need to have unique name: the purpose of the second patch is to share a common code which will be used in 3 drivers.
The last 2 patch enable the driver at dt and platform level and will be applied through the mvebu subsystem.
Changelog v2->v3:
- Add back the first patch documenting the binding
Changelog v1->v2:
- Header cleanup
- Use unsigned int instead of it for cluster member of the ap_cpu_clk struct
- Use clk_hw instead of clk
- Use regmap_read_poll_timeout
- Use for_each_of_cpu_node
- Remove unnecessary WARN_ON()
- Remove headers from armada_ap_cp_helper.h
- Few other minor cleanup
Gregory CLEMENT (6):
dt-bindings: ap806: add the cluster clock node in the syscon file
clk: mvebu: add helper file for Armada AP and CP clocks
clk: mvebu: add CPU clock driver for Armada 7K/8K
clk: mvebu: ap806: Fix clock name for the cluster
arm64: marvell: enable the Armada 7K/8K CPU clk driver
arm64: dts: marvell: Add cpu clock node on Armada 7K/8K
.../arm/marvell/ap806-system-controller.txt | 22 ++ arch/arm64/Kconfig.platforms | 1 + .../boot/dts/marvell/armada-ap806-quad.dtsi | 4 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 6 + drivers/clk/mvebu/Kconfig | 8 + drivers/clk/mvebu/Makefile | 2 + drivers/clk/mvebu/ap-cpu-clk.c | 259 ++++++++++++++++++ drivers/clk/mvebu/ap806-system-controller.c | 24 +- drivers/clk/mvebu/armada_ap_cp_helper.c | 30 ++ drivers/clk/mvebu/armada_ap_cp_helper.h | 11 + drivers/clk/mvebu/cp110-system-controller.c | 32 +-- 11 files changed, 357 insertions(+), 42 deletions(-) create mode 100644 drivers/clk/mvebu/ap-cpu-clk.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.h
Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerPATCH v3 1/6 dt-bindings: ap806: add the cluster clock node in the syscon file
Document the device tree binding for the cluster clock controllers found in the Armada 7K/8K SoCs.
--- .../arm/marvell/ap806-system-controller.txt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +22 -0
@@ -136,3 +136,25 @@ ap_syscon1: system-controller@6f8000 { #thermal-sensor-cells = <1>; }; }; + +Cluster clocks: +--------------- + +Device Tree Clock bindings for cluster clock of AP806 Marvell. Each +cluster contain up to 2 CPUs running at the same frequency. + +Required properties: +- compatible: must be "marvell,ap806-cpu-clock"; +- #clock-cells : should be set to 1. +- clocks : shall be the input parents clock phandle for the clock. + +ap_syscon1: system-controller@6f8000 { + compatible = "syscon", "simple-mfd"; + reg = <0x6f8000 0x1000>; + + cpu_clk: clock-cpu { + compatible = "marvell,ap806-cpu-clock"; + clocks = <&ap_clk 0>, <&ap_clk 1>; + #clock-cells = <1>; + }; +};
Signature · 1 line
2.19.2
Rob Herring
maintainerRe: [PATCH v3 1/6] dt-bindings: ap806: add the cluster clock node in the syscon file
Quoted 23 lines · Gregory CLEMENT
Document the device tree binding for the cluster clock controllers found in the Armada 7K/8K SoCs.
Signed-off-by Gregory CLEMENT <[email protected]>--- .../arm/marvell/ap806-system-controller.txt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +7
-0@@ -136,3 +136,25 @@ ap_syscon1: system-controller@6f8000 { #thermal-sensor-cells = <1>; }; }; + +Cluster clocks: +--------------- + +Device Tree Clock bindings for cluster clock of AP806 Marvell. Each +cluster contain up to 2 CPUs running at the same frequency. +
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt ap_syscon1: system-controller@6f8000 { · line 155
Quoted 10 lines
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +10
-0+Required properties: +- compatible: must be "marvell,ap806-cpu-clock"; +- #clock-cells : should be set to 1. +- clocks : shall be the input parents clock phandle for the clock. + +ap_syscon1: system-controller@6f8000 { + compatible = "syscon", "simple-mfd"; + reg = <0x6f8000 0x1000>; + + cpu_clk: clock-cpu {
There's not a register address range you can use even if Linux happens to not need it (currently)?
There's already a clock node under this syscon? Are they really separate sub-blocks?
Quoted 8 lines
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +5
-0+ compatible = "marvell,ap806-cpu-clock"; + clocks = <&ap_clk 0>, <&ap_clk 1>; + #clock-cells = <1>; + }; +};Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerRe: [PATCH v3 1/6] dt-bindings: ap806: add the cluster clock node in the syscon file
Hi Rob,
Quoted 29 lines · Rob Herring
Quoted 28 lines · Gregory CLEMENT
Document the device tree binding for the cluster clock controllers found in the Armada 7K/8K SoCs.
Signed-off-by Gregory CLEMENT <[email protected]>--- .../arm/marvell/ap806-system-controller.txt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +12
-0@@ -136,3 +136,25 @@ ap_syscon1: system-controller@6f8000 { #thermal-sensor-cells = <1>; }; }; + +Cluster clocks: +--------------- + +Device Tree Clock bindings for cluster clock of AP806 Marvell. Each +cluster contain up to 2 CPUs running at the same frequency. + +Required properties: +- compatible: must be "marvell,ap806-cpu-clock"; +- #clock-cells : should be set to 1. +- clocks : shall be the input parents clock phandle for the clock. +
Quoted 8 lines
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt ap_syscon1: system-controller@6f8000 { · line 155
Quoted 5 lines
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +5
-0+ap_syscon1: system-controller@6f8000 { + compatible = "syscon", "simple-mfd"; + reg = <0x6f8000 0x1000>; + + cpu_clk: clock-cpu {There's not a register address range you can use even if Linux happens to not need it (currently)?
We can add an optional reg property if you want, but the whole point of this, is to be able to ensure the compatibility. Indeed, we have now enough experience to know that the information we have from the datasheet is incomplete. And when we start to deal with an IP calling "system controller", then we can expect a mix between all the registers.
Quoted 3 lines
There's already a clock node under this syscon? Are they really separate sub-blocks?
Actually the other clock node (marvell,ap806-clock) is under the other
syscon: system controller 0 with gpio and pinctrl, whereas this one (marvell,ap806-cpu-clock), is under system controller 1 with thermal.
Gregory
Quoted 9 lines
Quoted 9 lines
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt +5
-0+ compatible = "marvell,ap806-cpu-clock"; + clocks = <&ap_clk 0>, <&ap_clk 1>; + #clock-cells = <1>; + }; +};Signature · 1 line
2.19.2
Signature · 3 lines
Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com
Gregory CLEMENT
maintainerPATCH v3 2/6 clk: mvebu: add helper file for Armada AP and CP clocks
In reply to Gregory CLEMENTClock drivers for Armada AP and Armada CP use the same function to generate unique clock name. A third drivers is coming with the same need, so it's time to move this function in a common file.
--- drivers/clk/mvebu/Kconfig | 5 ++++ drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/ap806-system-controller.c | 24 ++++------------ drivers/clk/mvebu/armada_ap_cp_helper.c | 30 +++++++++++++++++++ drivers/clk/mvebu/armada_ap_cp_helper.h | 11 +++++++ drivers/clk/mvebu/cp110-system-controller.c | 32 ++++++--------------- 6 files changed, 61 insertions(+), 42 deletions(-) create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.h
drivers/clk/mvebu/Kconfig +5 -0
@@ -7,6 +7,9 @@ config MVEBU_CLK_CPU config MVEBU_CLK_COREDIV bool +config ARMADA_AP_CP_HELPER + bool + config ARMADA_370_CLK bool select MVEBU_CLK_COMMON
@@ -34,9 +37,11 @@ config ARMADA_XP_CLK config ARMADA_AP806_SYSCON bool + select ARMADA_AP_CP_HELPER config ARMADA_CP110_SYSCON bool + select ARMADA_AP_CP_HELPER config DOVE_CLK bool
drivers/clk/mvebu/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_MVEBU_CLK_COMMON) += common.o obj-$(CONFIG_MVEBU_CLK_CPU) += clk-cpu.o obj-$(CONFIG_MVEBU_CLK_COREDIV) += clk-corediv.o +obj-$(CONFIG_ARMADA_AP_CP_HELPER) += armada_ap_cp_helper.o obj-$(CONFIG_ARMADA_370_CLK) += armada-370.o obj-$(CONFIG_ARMADA_375_CLK) += armada-375.o
drivers/clk/mvebu/ap806-system-controller.c +6 -18
@@ -10,11 +10,11 @@#define pr_fmt (fmt) "ap806-system-controller: " fmt +#include "armada_ap_cp_helper.h" #include <linux/clk-provider.h> #include <linux/mfd/syscon.h> #include <linux/init.h> #include <linux/of.h> -#include <linux/of_address.h> #include <linux/platform_device.h> #include <linux/regmap.h>
@@ -30,18 +30,6 @@ static struct clk_onecell_data ap806_clk_data = { .clk_num = AP806_CLK_NUM, }; -static char *ap806_unique_name (struct device *dev,struct device_node *np, -char *name) -{ -const __be32 *reg; -u64 addr; - - reg =of_get_property (np,"reg" ,NULL ); - addr =of_translate_address (np, reg); -return devm_kasprintf (dev,GFP_KERNEL ,"%llx-%s" , - (unsigned long long )addr, name); -} -static int ap806_syscon_common_probe (struct platform_device *pdev,struct device_node *syscon_node) {
@@ -109,7 +97,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, cpuclk_freq *=1000 *1000 ;/* CPU clocks depend on the Sample At Reset configuration */ - name =ap806_unique_name (dev, syscon_node,"cpu-cluster-0" ); + name =ap_cp_unique_name (dev, syscon_node,"cpu-cluster-0" ); ap806_clks[0 ] =clk_register_fixed_rate (dev, name,NULL ,0 , cpuclk_freq);if (IS_ERR (ap806_clks[0 ])) {
@@ -117,7 +105,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, goto fail0; } - name =ap806_unique_name (dev, syscon_node,"cpu-cluster-1" ); + name =ap_cp_unique_name (dev, syscon_node,"cpu-cluster-1" ); ap806_clks[1 ] =clk_register_fixed_rate (dev, name,NULL ,0 , cpuclk_freq);if (IS_ERR (ap806_clks[1 ])) {
@@ -126,7 +114,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, }/* Fixed clock is always 1200 Mhz */ - fixedclk_name =ap806_unique_name (dev, syscon_node,"fixed" ); + fixedclk_name =ap_cp_unique_name (dev, syscon_node,"fixed" ); ap806_clks[2 ] =clk_register_fixed_rate (dev, fixedclk_name,NULL ,0 ,1200 *1000 *1000 );if (IS_ERR (ap806_clks[2 ])) {
@@ -135,7 +123,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, }/* MSS Clock is fixed clock divided by 6 */ - name =ap806_unique_name (dev, syscon_node,"mss" ); + name =ap_cp_unique_name (dev, syscon_node,"mss" ); ap806_clks[3 ] =clk_register_fixed_factor (NULL , name, fixedclk_name,0 ,1 ,6 );if (IS_ERR (ap806_clks[3 ])) {
@@ -144,7 +132,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, }/* SDIO(/eMMC) Clock is fixed clock divided by 3 */ - name =ap806_unique_name (dev, syscon_node,"sdio" ); + name =ap_cp_unique_name (dev, syscon_node,"sdio" ); ap806_clks[4 ] =clk_register_fixed_factor (NULL , name, fixedclk_name,0 ,1 ,3 );
drivers/clk/mvebu/armada_ap_cp_helper.c new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Marvell Armada AP and CP110 helper +* +* Copyright (C) 2018 Marvell +* +* Gregory Clement <[email protected]> +* +*/ + +#include "armada_ap_cp_helper.h" +#include <linux/device.h> +#include <linux/of.h> +#include <linux/of_address.h> + +char *ap_cp_unique_name (struct device *dev,struct device_node *np, +const char *name) +{ +const __be32 *reg; +u64 addr; + +/* Do not create a name if there is no clock */ +if (!name) +return NULL ; + + reg =of_get_property (np,"reg" ,NULL ); + addr =of_translate_address (np, reg); +return devm_kasprintf (dev,GFP_KERNEL ,"%llx-%s" , + (unsigned long long )addr, name); +}
drivers/clk/mvebu/armada_ap_cp_helper.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __ARMADA_AP_CP_HELPER_H +#define __ARMADA_AP_CP_HELPER_H + +struct device ; +struct device_node ; + +char *ap_cp_unique_name (struct device *dev,struct device_node *np, +const char *name); +#endif
drivers/clk/mvebu/cp110-system-controller.c +8 -24
@@ -26,11 +26,11 @@#define pr_fmt (fmt) "cp110-system-controller: " fmt +#include "armada_ap_cp_helper.h" #include <linux/clk-provider.h> #include <linux/mfd/syscon.h> #include <linux/init.h> #include <linux/of.h> -#include <linux/of_address.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/slab.h>
@@ -212,22 +212,6 @@ static struct clk_hw *cp110_of_clk_get(struct of_phandle_args *clkspec,return ERR_PTR (-EINVAL ); } -static char *cp110_unique_name (struct device *dev,struct device_node *np, -const char *name) -{ -const __be32 *reg; -u64 addr; - -/* Do not create a name if there is no clock */ -if (!name) -return NULL ; - - reg =of_get_property (np,"reg" ,NULL ); - addr =of_translate_address (np, reg); -return devm_kasprintf (dev,GFP_KERNEL ,"%llx-%s" , - (unsigned long long )addr, name); -} -static int cp110_syscon_common_probe (struct platform_device *pdev,struct device_node *syscon_node) {
@@ -261,7 +245,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, cp110_clk_data->num =CP110_CLK_NUM ;/* Register the PLL0 which is the root of the hw tree */ - pll0_name =cp110_unique_name (dev, syscon_node,"pll0" ); + pll0_name =ap_cp_unique_name (dev, syscon_node,"pll0" ); hw =clk_hw_register_fixed_rate (NULL , pll0_name,NULL ,0 ,1000 *1000 *1000 );if (IS_ERR (hw)) {
@@ -272,7 +256,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, cp110_clks[CP110_CORE_PLL0 ] = hw;/* PPv2 is PLL0/3 */ - ppv2_name =cp110_unique_name (dev, syscon_node,"ppv2-core" ); + ppv2_name =ap_cp_unique_name (dev, syscon_node,"ppv2-core" ); hw =clk_hw_register_fixed_factor (NULL , ppv2_name, pll0_name,0 ,1 ,3 );if (IS_ERR (hw)) { ret =PTR_ERR (hw);
@@ -282,7 +266,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, cp110_clks[CP110_CORE_PPV2 ] = hw;/* X2CORE clock is PLL0/2 */ - x2core_name =cp110_unique_name (dev, syscon_node,"x2core" ); + x2core_name =ap_cp_unique_name (dev, syscon_node,"x2core" ); hw =clk_hw_register_fixed_factor (NULL , x2core_name, pll0_name,0 ,1 ,2 );if (IS_ERR (hw)) {
@@ -293,7 +277,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, cp110_clks[CP110_CORE_X2CORE ] = hw;/* Core clock is X2CORE/2 */ - core_name =cp110_unique_name (dev, syscon_node,"core" ); + core_name =ap_cp_unique_name (dev, syscon_node,"core" ); hw =clk_hw_register_fixed_factor (NULL , core_name, x2core_name,0 ,1 ,2 );if (IS_ERR (hw)) {
@@ -303,7 +287,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, cp110_clks[CP110_CORE_CORE ] = hw;/* NAND can be either PLL0/2.5 or core clock */ - nand_name =cp110_unique_name (dev, syscon_node,"nand-core" ); + nand_name =ap_cp_unique_name (dev, syscon_node,"nand-core" );if (nand_clk_ctrl &NF_CLOCK_SEL_400_MASK ) hw =clk_hw_register_fixed_factor (NULL , nand_name, pll0_name,0 ,2 ,5 );
@@ -318,7 +302,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, cp110_clks[CP110_CORE_NAND ] = hw;/* SDIO clock is PLL0/2.5 */ - sdio_name =cp110_unique_name (dev, syscon_node,"sdio-core" ); + sdio_name =ap_cp_unique_name (dev, syscon_node,"sdio-core" ); hw =clk_hw_register_fixed_factor (NULL , sdio_name, pll0_name,0 ,2 ,5 );if (IS_ERR (hw)) {
@@ -330,7 +314,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,/* create the unique name for all the gate clocks */ for (i =0 ; i <ARRAY_SIZE (gate_base_names); i++) - gate_name[i] =cp110_unique_name (dev, syscon_node, + gate_name[i] =ap_cp_unique_name (dev, syscon_node, gate_base_names[i]);for (i =0 ; i <ARRAY_SIZE (gate_base_names); i++) {
Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerPATCH v3 3/6 clk: mvebu: add CPU clock driver for Armada 7K/8K
In reply to Gregory CLEMENTThe CPU frequency is managed at the AP level for the Armada 7K/8K. The CPU frequency is modified by cluster: the CPUs of the same cluster have the same frequency.
This patch adds the clock driver that will be used by CPUFreq, it is based on the work of Omri Itach <[email protected]>.
--- drivers/clk/mvebu/Kconfig | 3 + drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/ap-cpu-clk.c | 259 +++++++++++++++++++++++++++++++++ 3 files changed, 263 insertions(+) create mode 100644 drivers/clk/mvebu/ap-cpu-clk.c
drivers/clk/mvebu/Kconfig +3 -0
@@ -39,6 +39,9 @@ config ARMADA_AP806_SYSCON bool select ARMADA_AP_CP_HELPER +config ARMADA_AP_CPU_CLK + bool + config ARMADA_CP110_SYSCON bool select ARMADA_AP_CP_HELPER
drivers/clk/mvebu/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARMADA_37XX_CLK) += armada-37xx-tbg.o obj-$(CONFIG_ARMADA_37XX_CLK) += armada-37xx-periph.o obj-$(CONFIG_ARMADA_XP_CLK) += armada-xp.o mv98dx3236.o obj-$(CONFIG_ARMADA_AP806_SYSCON) += ap806-system-controller.o +obj-$(CONFIG_ARMADA_AP_CPU_CLK) += ap-cpu-clk.o obj-$(CONFIG_ARMADA_CP110_SYSCON) += cp110-system-controller.o obj-$(CONFIG_DOVE_CLK) += dove.o dove-divider.o obj-$(CONFIG_KIRKWOOD_CLK) += kirkwood.o
drivers/clk/mvebu/ap-cpu-clk.c new file +259 -0
259 lines not on this page · raw message
Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerPATCH v3 4/6 clk: mvebu: ap806: Fix clock name for the cluster
In reply to Gregory CLEMENTActually, the clocks exposed for the cluster are not the CPU clocks, but the PLL clock used as entry clock for the CPU clocks. The CPU clock will be managed by a driver submitting in the following patches.
--- drivers/clk/mvebu/ap806-system-controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mvebu/ap806-system-controller.c +2 -2
@@ -97,7 +97,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, cpuclk_freq *=1000 *1000 ;/* CPU clocks depend on the Sample At Reset configuration */ - name =ap_cp_unique_name (dev, syscon_node,"cpu-cluster-0" ); + name =ap_cp_unique_name (dev, syscon_node,"pll-cluster-0" ); ap806_clks[0 ] =clk_register_fixed_rate (dev, name,NULL ,0 , cpuclk_freq);if (IS_ERR (ap806_clks[0 ])) {
@@ -105,7 +105,7 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, goto fail0; } - name =ap_cp_unique_name (dev, syscon_node,"cpu-cluster-1" ); + name =ap_cp_unique_name (dev, syscon_node,"pll-cluster-1" ); ap806_clks[1 ] =clk_register_fixed_rate (dev, name,NULL ,0 , cpuclk_freq);if (IS_ERR (ap806_clks[1 ])) {
Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerPATCH v3 5/6 arm64: marvell: enable the Armada 7K/8K CPU clk driver
In reply to Gregory CLEMENTThis commit makes sure the driver for the Armada 7K/8K CPU clock is enabled.
--- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
@@ -121,6 +121,7 @@ config ARCH_MESON config ARCH_MVEBU bool "Marvell EBU SoC Family" + select ARMADA_AP_CPU_CLK select ARMADA_AP806_SYSCON select ARMADA_CP110_SYSCON select ARMADA_37XX_CLK
Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerPATCH v3 6/6 arm64: dts: marvell: Add cpu clock node on Armada 7K/8K
In reply to Gregory CLEMENTAdd cpu clock node on AP
--- arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 4 ++++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 6 ++++++ 2 files changed, 10 insertions(+)
arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi +4 -0
@@ -20,24 +20,28 @@ compatible = "arm,cortex-a72", "arm,armv8"; reg = <0x000>; enable-method = "psci"; + clocks = <&cpu_clk 0>; }; cpu1: cpu@1 { device_type = "cpu"; compatible = "arm,cortex-a72", "arm,armv8"; reg = <0x001>; enable-method = "psci"; + clocks = <&cpu_clk 0>; }; cpu2: cpu@100 { device_type = "cpu"; compatible = "arm,cortex-a72", "arm,armv8"; reg = <0x100>; enable-method = "psci"; + clocks = <&cpu_clk 1>; }; cpu3: cpu@101 { device_type = "cpu"; compatible = "arm,cortex-a72", "arm,armv8"; reg = <0x101>; enable-method = "psci"; + clocks = <&cpu_clk 1>; }; }; };
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +6 -0
@@ -263,6 +263,12 @@ #address-cells = <1>; #size-cells = <1>; + cpu_clk: clock-cpu { + compatible = "marvell,ap806-cpu-clock"; + clocks = <&ap_clk 0>, <&ap_clk 1>; + #clock-cells = <1>; + }; + ap_thermal: thermal-sensor@80 { compatible = "marvell,armada-ap806-thermal"; reg = <0x80 0x10>;
Signature · 1 line
2.19.2
Gregory CLEMENT
maintainerHi Stephen,
Quoted 6 lines · Gregory CLEMENT
Hello,
This is the third version of a series allowing to manage the cpu clock for Armada 7K/8K. For these SoCs, the CPUs share the same clock by cluster, so actually the clock management is done at cluster level.
Quoted 6 lines
As for the other Armada 7K/8K clocks it is possible to have multiple AP so here again we need to have unique name: the purpose of the second patch is to share a common code which will be used in 3 drivers.
The last 2 patch enable the driver at dt and platform level and will be applied through the mvebu subsystem.
What is the status of this series?
The only comments I had was from Rob about the binding and I answered them 3 weeks ago. Do you have any other comments? Do you expect a rebase of this series on v5.0-rc1?
Thanks,
Gregory
Quoted 41 lines
Changelog
v2->v3:
- Add back the first patch documenting the bindingChangelog
v1->v2:
- Header cleanup
- Use unsigned int instead of it for cluster member of theap_cpu_clkstruct
- Useclk_hwinstead of clk
- Useregmap_read_poll_timeout
- Usefor_each_of_cpu_node
- Remove unnecessaryWARN_ON()
- Remove headers fromarmada_ap_cp_helper.h
- Few other minor cleanupGregory CLEMENT (6):
dt-bindings: ap806: add the cluster clock node in the syscon file
clk: mvebu: add helper file for Armada AP and CP clocks
clk: mvebu: add CPU clock driver for Armada 7K/8K
clk: mvebu: ap806: Fix clock name for the cluster
arm64: marvell: enable the Armada 7K/8K CPU clk driver
arm64: dts: marvell: Add cpu clock node on Armada 7K/8K.../arm/marvell/ap806-system-controller.txt | 22 ++ arch/arm64/Kconfig.platforms | 1 + .../boot/dts/marvell/armada-ap806-quad.dtsi | 4 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 6 + drivers/clk/mvebu/Kconfig | 8 + drivers/clk/mvebu/Makefile | 2 + drivers/clk/mvebu/ap-cpu-clk.c | 259 ++++++++++++++++++ drivers/clk/mvebu/ap806-system-controller.c | 24 +- drivers/clk/mvebu/armada_ap_cp_helper.c | 30 ++ drivers/clk/mvebu/armada_ap_cp_helper.h | 11 + drivers/clk/mvebu/cp110-system-controller.c | 32 +-- 11 files changed, 357 insertions(+), 42 deletions(-) create mode 100644 drivers/clk/mvebu/ap-cpu-clk.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.hSignature · 1 line
2.19.2
Signature · 3 lines
Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com
Stephen Boyd
maintainerQuoting Gregory CLEMENT (2019-01-10 08:16:22)
Quoted 14 lines
Hi Stephen,
Quoted 10 lines · Gregory CLEMENT
Hello,
This is the third version of a series allowing to manage the cpu clock for Armada 7K/8K. For these SoCs, the CPUs share the same clock by cluster, so actually the clock management is done at cluster level.
As for the other Armada 7K/8K clocks it is possible to have multiple AP so here again we need to have unique name: the purpose of the second patch is to share a common code which will be used in 3 drivers.
Quoted 9 lines
Quoted 2 lines
The last 2 patch enable the driver at dt and platform level and will be applied through the mvebu subsystem.
What is the status of this series?
The only comments I had was from Rob about the binding and I answered them 3 weeks ago. Do you have any other comments? Do you expect a rebase of this series on v5.0-rc1?
I'm waiting for Rob. I think the binding is not proper so presumably you will figure out what Rob wants and then change the code accordingly and resend?
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Gregory CLEMENT
maintainerHi Stephen,
Quoted 20 lines · Stephen Boyd
Quoting Gregory CLEMENT (2019-01-10 08:16:22)
Quoted 19 lines
Hi Stephen,
Quoted 6 lines · Gregory CLEMENT
Hello,
This is the third version of a series allowing to manage the cpu clock for Armada 7K/8K. For these SoCs, the CPUs share the same clock by cluster, so actually the clock management is done at cluster level.
Quoted 6 lines
As for the other Armada 7K/8K clocks it is possible to have multiple AP so here again we need to have unique name: the purpose of the second patch is to share a common code which will be used in 3 drivers.
The last 2 patch enable the driver at dt and platform level and will be applied through the mvebu subsystem.
What is the status of this series?
Quoted 8 lines
Quoted 4 lines
The only comments I had was from Rob about the binding and I answered them 3 weeks ago. Do you have any other comments? Do you expect a rebase of this series on v5.0-rc1?
I'm waiting for Rob. I think the binding is not proper so presumably you will figure out what Rob wants and then change the code accordingly and resend?
Actually the binding describes properly the hardware we have and that what I answered to Rob.
Gregory
Signature · 3 lines
Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com
Gregory CLEMENT
maintainerHi Stephen,
Quoted 29 lines · Gregory CLEMENT
Hi Stephen,
Quoted 25 lines · Stephen Boyd
Quoting Gregory CLEMENT (2019-01-10 08:16:22)
Quoted 23 lines
Hi Stephen,
Quoted 6 lines · Gregory CLEMENT
Hello,
This is the third version of a series allowing to manage the cpu clock for Armada 7K/8K. For these SoCs, the CPUs share the same clock by cluster, so actually the clock management is done at cluster level.
Quoted 6 lines
As for the other Armada 7K/8K clocks it is possible to have multiple AP so here again we need to have unique name: the purpose of the second patch is to share a common code which will be used in 3 drivers.
The last 2 patch enable the driver at dt and platform level and will be applied through the mvebu subsystem.
What is the status of this series?
The only comments I had was from Rob about the binding and I answered them 3 weeks ago. Do you have any other comments? Do you expect a rebase of this series on v5.0-rc1?
Quoted 6 lines
Quoted 3 lines
I'm waiting for Rob. I think the binding is not proper so presumably you will figure out what Rob wants and then change the code accordingly and resend?
Actually the binding describes properly the hardware we have and that what I answered to Rob.
I pinged you about this series more than one month ago, and answered Rob concerned 2 months ago! He didn't said anything about my comments so I really think that the binding is OK and described the hardware we have.
So could you consider to apply this series?
Thanks,
Gregory
Quoted 12 lines
Gregory
Signature · 8 lines
Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 3 lines
Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com