Add clock driver for Actions S700 SoC
Subsystems (3)
v5 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 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: Fix the 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
...tions,s900-cmu.txt => actions,owl-cmu.txt} | 20 +-
.../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.18.0
PATCH v5 1/5 clk: actions: Fix the 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.18.0
Andreas Färber
maintainerRe: [PATCH v5 1/5] clk: actions: Fix the missing REGMAP_MMIO dependency
Am 15.07.2018 um 22:01 schrieb Saravanan Sekar:
Quoted 4 lines
Add
REGMAP_MMIOas dependency to avoid undefined
reference to regmap symbols.Signed-off-by Saravanan Sekar <[email protected]>
Still no Fixes: header. Please read SubmittingPatches.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
PATCH v5 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.
---
...tions,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.18.0
PATCH v5 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.18.0
PATCH v5 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";
@@ -44,6 +45,13 @@ }; }; + cmu: clock-controller at e0168000 { + compatible = "actions,s700-cmu"; + reg = <0x0 0xe0168000 0x0 0x1000>; + clocks = <&hosc>, <&losc>; + #clock-cells = <1>; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>;
@@ -87,6 +95,12 @@ #clock-cells = <0>; }; + losc: losc { + compatible = "fixed-clock"; + clock-frequency = <32768>; + #clock-cells = <0>; + }; + soc { compatible = "simple-bus"; #address-cells = <2>;
Signature · 1 line
2.18.0
PATCH v5 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.18.0