Add clock driver for Actions S700 SoC
Subsystems (3)
v7 cover Add clock driver for Actions S700 SoC
This patchset adds clock support for Actions Semi Owl series S700 SoC with relevant clock bindings and device tree info.
Changed the UART clock using CMU instance and changes are tested in cubieboard7
Changelog v7:
- Moved cmu (clock controller) dts entry under soc node and positioned based on address
Changelog v6:
- Adding Fixes tag for adding REGMAP dependency addition
Changelog v5:
- Commit message corrections
- Removed MMC_OWL_CLK_NANDPLL option, as no active consumer
- Device tree clock label name correction
Changelog v4:
- dt-bindings use absolute numbering for clocks
- Patch re-oredering
Changelog v3:
- Splitted uart clock DTS changes into separate patch
- Splitted REGMAP Kconfig selection into separate patch
- General naming convention as "Actions Semi" in dt-binding documentation
- Patch re-oredering
- Cleanup and fixed review findings
Changelog v2:
Fixed 0 day compilation warning
Modified existing dts Actions S900 clock bindings common to Actions Soc family
Thanks and regards,
Saravanan,
Parthiban
Saravanan Sekar (5):
clk: actions: Add missing REGMAP_MMIO dependency
dt-bindings: clock: Add S700 support for Actions Semi Soc's
clk: actions: Add S700 SoC clock support
arm64: dts: actions: Add Clock Management Unit for S700
arm64: dts: actions: Set UART clock reference from CMU
.../{actions,s900-cmu.txt => actions,owl-cmu.txt} | 20 +-
arch/arm64/boot/dts/actions/s700-cubieboard7.dts | 8 +-
arch/arm64/boot/dts/actions/s700.dtsi | 14 +
drivers/clk/actions/Kconfig | 7 +
drivers/clk/actions/Makefile | 1 +
drivers/clk/actions/owl-s700.c | 606 +++++++++++++++++++++
include/dt-bindings/clock/actions,s700-cmu.h | 118 ++++
7 files changed, 758 insertions(+), 16 deletions(-)
rename Documentation/devicetree/bindings/clock/{actions,s900-cmu.txt => actions,owl-cmu.txt} (68%)
create mode 100644 drivers/clk/actions/owl-s700.c
create mode 100644 include/dt-bindings/clock/actions,s700-cmu.hSignature · 1 line
2.14.4
PATCH v7 1/5 clk: actions: Add missing REGMAP_MMIO dependency
Add REGMAP_MMIO as dependency to avoid undefined
reference to regmap symbols.
--- drivers/clk/actions/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/clk/actions/Kconfig +1 -0
@@ -1,6 +1,7 @@ config CLK_ACTIONS bool "Clock driver for Actions Semi SoCs" depends on ARCH_ACTIONS || COMPILE_TEST + select REGMAP_MMIO default ARCH_ACTIONS if CLK_ACTIONS
Signature · 1 line
2.14.4
Re: [PATCH v7 1/5] clk: actions: Add missing REGMAP_MMIO dependency
Quoting Saravanan Sekar (2018-07-19 02:06:45)
Quoted 8 lines
Add
REGMAP_MMIOas dependency to avoid undefined
reference to regmap symbols.Fixes d85d20053e19 ("clk: actions: Add S900 SoC clock support")Signed-off-by Saravanan Sekar <[email protected]>Reviewed-by Andreas F?rber <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>---
Applied to clk-next
PATCH v7 2/5 dt-bindings: clock: Add S700 support for Actions Semi Soc's
In reply to Saravanan SekarAdd clock bindings constants for action S700 Maintain common clock dt-bindings for Actions Semi SoC's S700 and S900.
---
.../{actions,s900-cmu.txt => actions,owl-cmu.txt} | 20 ++--
include/dt-bindings/clock/actions,s700-cmu.h | 118 +++++++++++++++++++++
2 files changed, 129 insertions(+), 9 deletions(-)
rename Documentation/devicetree/bindings/clock/{actions,s900-cmu.txt => actions,owl-cmu.txt} (68%)
create mode 100644 include/dt-bindings/clock/actions,s700-cmu.hDocumentation/devicetree/bindings/clock/actions,owl-cmu.txt renamed from Documentation/devicetree/bindings/clock/actions,s900-cmu.txt +11 -9
@@ -1,12 +1,14 @@ -* Actions S900 Clock Management Unit (CMU) +* Actions Semi Owl Clock Management Unit (CMU) -The Actions S900 clock management unit generates and supplies clock to various -controllers within the SoC. The clock binding described here is applicable to -S900 SoC. +The Actions Semi Owl Clock Management Unit generates and supplies clock +to various controllers within the SoC. The clock binding described here is +applicable to S900 and S700 SoC's. Required Properties: -- compatible: should be "actions,s900-cmu" +- compatible: should be one of the following, + "actions,s900-cmu" + "actions,s700-cmu" - reg: physical base address of the controller and length of memory mapped region. - clocks: Reference to the parent clocks ("hosc", "losc")
@@ -15,16 +17,16 @@ Required Properties: 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 -dt-bindings/clock/actions,s900-cmu.h header and can be used in device -tree sources. +All available clocks are defined as preprocessor macros in corresponding +dt-bindings/clock/actions,s900-cmu.h or actions,s700-cmu.h header and can be +used in device tree sources. External clocks: The hosc clock used as input for the plls is generated outside the SoC. It is expected that it is defined using standard clock bindings as "hosc". -Actions S900 CMU also requires one more clock: +Actions Semi S900 CMU also requires one more clock: - "losc" - internal low frequency oscillator Example: Clock Management Unit node:
include/dt-bindings/clock/actions,s700-cmu.h new file +118 -0
118 lines not on this page · raw message
Signature · 1 line
2.14.4
Re: [PATCH v7 2/5] dt-bindings: clock: Add S700 support for Actions Semi Soc's
Quoting Saravanan Sekar (2018-07-19 02:06:46)
Quoted 8 lines
Add clock bindings constants for action S700 Maintain common clock dt-bindings for Actions Semi SoC's S700 and S900.
Signed-off-by Parthiban Nallathambi <[email protected]>Signed-off-by Saravanan Sekar <[email protected]>Reviewed-by Rob Herring <[email protected]>---
Applied to clk-next
PATCH v7 3/5 clk: actions: Add S700 SoC clock support
In reply to Saravanan SekarAdd Actions Semi S700 SoC clock support
--- drivers/clk/actions/Kconfig | 6 + drivers/clk/actions/Makefile | 1 + drivers/clk/actions/owl-s700.c | 606 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 613 insertions(+) create mode 100644 drivers/clk/actions/owl-s700.c
drivers/clk/actions/Kconfig +6 -0
@@ -8,8 +8,14 @@ if CLK_ACTIONS # SoC Drivers +config CLK_OWL_S700 + bool "Support for the Actions Semi OWL S700 clocks" + depends on (ARM64 && ARCH_ACTIONS) || COMPILE_TEST + default ARM64 && ARCH_ACTIONS + config CLK_OWL_S900 bool "Support for the Actions Semi OWL S900 clocks" depends on (ARM64 && ARCH_ACTIONS) || COMPILE_TEST default ARM64 && ARCH_ACTIONS + endif
drivers/clk/actions/Makefile +1 -0
@@ -9,4 +9,5 @@ clk-owl-y += owl-composite.o clk-owl-y += owl-pll.o # SoC support +obj-$(CONFIG_CLK_OWL_S700) += owl-s700.o obj-$(CONFIG_CLK_OWL_S900) += owl-s900.o
drivers/clk/actions/owl-s700.c new file +606 -0
606 lines not on this page · raw message
Signature · 1 line
2.14.4
Re: [PATCH v7 3/5] clk: actions: Add S700 SoC clock support
Quoting Saravanan Sekar (2018-07-19 02:06:47)
Quoted 6 lines
Add Actions Semi S700 SoC clock support
Signed-off-by Parthiban Nallathambi <[email protected]>Signed-off-by Saravanan Sekar <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>---
Applied to clk-next
PATCH v7 4/5 arm64: dts: actions: Add Clock Management Unit for S700
In reply to Saravanan SekarAdd Clock Management Unit for Actions Semi S700 SoC.
--- arch/arm64/boot/dts/actions/s700.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/actions/s700.dtsi +14 -0
@@ -4,6 +4,7 @@ */ #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/actions,s700-cmu.h> / { compatible = "actions,s700";
@@ -87,6 +88,12 @@ #clock-cells = <0>; }; + losc: losc { + compatible = "fixed-clock"; + clock-frequency = <32768>; + #clock-cells = <0>; + }; + soc { compatible = "simple-bus"; #address-cells = <2>;
@@ -153,6 +160,13 @@ status = "disabled"; }; + cmu: clock-controller at e0168000 { + compatible = "actions,s700-cmu"; + reg = <0x0 0xe0168000 0x0 0x1000>; + clocks = <&hosc>, <&losc>; + #clock-cells = <1>; + }; + sps: power-controller at e01b0100 { compatible = "actions,s700-sps"; reg = <0x0 0xe01b0100 0x0 0x100>;
Signature · 1 line
2.14.4
Re: [PATCH v7 4/5] arm64: dts: actions: Add Clock Management Unit for S700
Quoted 4 lines · Saravanan Sekar
Add Clock Management Unit for Actions Semi S700 SoC.
Signed-off-by Parthiban Nallathambi <[email protected]>Signed-off-by Saravanan Sekar <[email protected]>
Thanks,
Mani
Quoted 46 lines
--- arch/arm64/boot/dts/actions/s700.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm64/boot/dts/actions/s700.dtsi +14
-0@@ -4,6 +4,7 @@ */ #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/actions,s700-cmu.h> / { compatible = "actions,s700";@@ -87,6 +88,12 @@ #clock-cells = <0>; }; + losc: losc { + compatible = "fixed-clock"; + clock-frequency = <32768>; + #clock-cells = <0>; + }; + soc { compatible = "simple-bus"; #address-cells = <2>;@@ -153,6 +160,13 @@ status = "disabled"; }; + cmu: clock-controller at e0168000 { + compatible = "actions,s700-cmu"; + reg = <0x0 0xe0168000 0x0 0x1000>; + clocks = <&hosc>, <&losc>; + #clock-cells = <1>; + }; + sps: power-controller at e01b0100 { compatible = "actions,s700-sps"; reg = <0x0 0xe01b0100 0x0 0x100>;Signature · 1 line
2.14.4
PATCH v7 5/5 arm64: dts: actions: Set UART clock reference from CMU
In reply to Saravanan Sekar--- arch/arm64/boot/dts/actions/s700-cubieboard7.dts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
arch/arm64/boot/dts/actions/s700-cubieboard7.dts +1 -7
@@ -28,12 +28,6 @@ device_type = "memory"; reg = <0x1 0xe0000000 0x0 0x0>; }; - - uart3_clk: uart3-clk { - compatible = "fixed-clock"; - clock-frequency = <921600>; - #clock-cells = <0>; - }; }; &timer {
@@ -42,5 +36,5 @@ &uart3 { status = "okay"; - clocks = <&uart3_clk>; + clocks = <&cmu CLK_UART3>; };
Signature · 1 line
2.14.4
Re: [PATCH v7 5/5] arm64: dts: actions: Set UART clock reference from CMU
Hi Andreas,
Quoted 4 lines · Saravanan Sekar
Signed-off-by Parthiban Nallathambi <[email protected]>Signed-off-by Saravanan Sekar <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>---
Will you be queuing up the dts patches through actions tree?
Thanks,
Mani
Quoted 30 lines
arch/arm64/boot/dts/actions/s700-cubieboard7.dts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)arch/arm64/boot/dts/actions/s700-cubieboard7.dts +1
-7@@ -28,12 +28,6 @@ device_type = "memory"; reg = <0x1 0xe0000000 0x0 0x0>; }; - - uart3_clk: uart3-clk { - compatible = "fixed-clock"; - clock-frequency = <921600>; - #clock-cells = <0>; - }; }; &timer {@@ -42,5 +36,5 @@ &uart3 { status = "okay"; - clocks = <&uart3_clk>; + clocks = <&cmu CLK_UART3>; };Signature · 1 line
2.14.4