Add clock support for Hi3670 SoC
Subsystems (3)
cover Add clock support for Hi3670 SoC
This patchset adds clock support for Hi3670 SoC from HiSilicon utilizing the HiSi common clock code. While adding clock support, let's remove the fixed clock for UART and source SoC clock on HiKey970 board.
This patchset has been verified on HiKey970 board.
Thanks,
Mani
Manivannan Sadhasivam (4):
dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk
arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC
arm64: dts: hisilicon: Source SoC clock for UART6
clk: hisilicon: Add clock driver for Hi3670 SoC
.../bindings/clock/hi3670-clock.txt | 43 + arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 48 +- drivers/clk/hisilicon/Kconfig | 7 + drivers/clk/hisilicon/Makefile | 1 + drivers/clk/hisilicon/clk-hi3670.c | 1016 +++++++++++++++++ include/dt-bindings/clock/hi3670-clock.h | 348 ++++++ 6 files changed, 1458 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/hi3670-clock.txt create mode 100644 drivers/clk/hisilicon/clk-hi3670.c create mode 100644 include/dt-bindings/clock/hi3670-clock.h
Signature · 1 line
2.17.1
PATCH 1/4 dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk
Add devicetree bindings for HiSilicon Hi3670 clock controller.
--- .../bindings/clock/hi3670-clock.txt | 43 +++ include/dt-bindings/clock/hi3670-clock.h | 348 ++++++++++++++++++ 2 files changed, 391 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/hi3670-clock.txt create mode 100644 include/dt-bindings/clock/hi3670-clock.h
Documentation/devicetree/bindings/clock/hi3670-clock.txt new file +43 -0
@@ -0,0 +1,43 @@ +* Hisilicon Hi3670 Clock Controller + +The Hi3670 clock controller generates and supplies clock to various +controllers within the Hi3670 SoC. + +Required Properties: + +- compatible: the compatible should be one of the following strings to + indicate the clock controller functionality. + + - "hisilicon,hi3670-crgctrl" + - "hisilicon,hi3670-pctrl" + - "hisilicon,hi3670-pmuctrl" + - "hisilicon,hi3670-sctrl" + - "hisilicon,hi3670-iomcu" + - "hisilicon,hi3670-media1-crg" + - "hisilicon,hi3670-media2-crg" + +- reg: physical base address of the controller and length of memory mapped + region. + +- #clock-cells: should be 1. + +Each clock is assigned an identifier and client nodes use this identifier +to specify the clock which they consume. + +All these identifier could be found in <dt-bindings/clock/hi3670-clock.h>. + +Examples: + crg_ctrl: clock-controller at fff35000 { + compatible = "hisilicon,hi3670-crgctrl", "syscon"; + reg = <0x0 0xfff35000 0x0 0x1000>; + #clock-cells = <1>; + }; + + uart0: serial at fdf02000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x0 0xfdf02000 0x0 0x1000>; + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&crg_ctrl HI3670_CLK_GATE_UART0>, + <&crg_ctrl HI3670_PCLK>; + clock-names = "uartclk", "apb_pclk"; + };
include/dt-bindings/clock/hi3670-clock.h new file +348 -0
348 lines not on this page · raw message
Signature · 1 line
2.17.1
Rob Herring
maintainerPATCH 1/4 dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk
Quoted 10 lines · Manivannan Sadhasivam
Add devicetree bindings for HiSilicon Hi3670 clock controller.
Signed-off-by Manivannan Sadhasivam <[email protected]>--- .../bindings/clock/hi3670-clock.txt | 43 +++ include/dt-bindings/clock/hi3670-clock.h | 348 ++++++++++++++++++ 2 files changed, 391 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/hi3670-clock.txt create mode 100644 include/dt-bindings/clock/hi3670-clock.h
Re: [PATCH 1/4] dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk
In reply to Manivannan SadhasivamQuoting Manivannan Sadhasivam (2018-09-20 23:01:00)
Quoted 4 lines
Add devicetree bindings for HiSilicon Hi3670 clock controller.
Signed-off-by Manivannan Sadhasivam <[email protected]>---
Applied to clk-next
PATCH 2/4 arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC
In reply to Manivannan SadhasivamAdd clock nodes for HiSilicon Hi3670 SoC.
--- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+)
arch/arm64/boot/dts/hisilicon/hi3670.dtsi +43 -0
@@ -7,6 +7,7 @@ */ #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/hi3670-clock.h> / { compatible = "hisilicon,hi3670";
@@ -144,6 +145,48 @@ #size-cells = <2>; ranges; + crg_ctrl: crg_ctrl at fff35000 { + compatible = "hisilicon,hi3670-crgctrl", "syscon"; + reg = <0x0 0xfff35000 0x0 0x1000>; + #clock-cells = <1>; + }; + + pctrl: pctrl at e8a09000 { + compatible = "hisilicon,hi3670-pctrl", "syscon"; + reg = <0x0 0xe8a09000 0x0 0x1000>; + #clock-cells = <1>; + }; + + pmuctrl: crg_ctrl at fff34000 { + compatible = "hisilicon,hi3670-pmuctrl", "syscon"; + reg = <0x0 0xfff34000 0x0 0x1000>; + #clock-cells = <1>; + }; + + sctrl: sctrl at fff0a000 { + compatible = "hisilicon,hi3670-sctrl", "syscon"; + reg = <0x0 0xfff0a000 0x0 0x1000>; + #clock-cells = <1>; + }; + + iomcu: iomcu at ffd7e000 { + compatible = "hisilicon,hi3670-iomcu", "syscon"; + reg = <0x0 0xffd7e000 0x0 0x1000>; + #clock-cells = <1>; + }; + + media1_crg: media1_crgctrl at e87ff000 { + compatible = "hisilicon,hi3670-media1-crg", "syscon"; + reg = <0x0 0xe87ff000 0x0 0x1000>; + #clock-cells = <1>; + }; + + media2_crg: media2_crgctrl at e8900000 { + compatible = "hisilicon,hi3670-media2-crg","syscon"; + reg = <0x0 0xe8900000 0x0 0x1000>; + #clock-cells = <1>; + }; + uart6_clk: clk_19_2M { compatible = "fixed-clock"; #clock-cells = <0>;
Signature · 1 line
2.17.1
Re: [PATCH 2/4] arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC
Hi Manivannan,
Quoted 3 lines · Manivannan Sadhasivam
Add clock nodes for HiSilicon Hi3670 SoC.
Signed-off-by Manivannan Sadhasivam <[email protected]>
Applied to the hisilicon soc dt tree.
Thanks!
Best Regards,
Wei
Quoted 66 lines
--- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+)arch/arm64/boot/dts/hisilicon/hi3670.dtsi +43
-0@@ -7,6 +7,7 @@ */ #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/hi3670-clock.h> / { compatible = "hisilicon,hi3670";@@ -144,6 +145,48 @@ #size-cells = <2>; ranges; + crg_ctrl: crg_ctrl@fff35000 { + compatible = "hisilicon,hi3670-crgctrl", "syscon"; + reg = <0x0 0xfff35000 0x0 0x1000>; + #clock-cells = <1>; + }; + + pctrl: pctrl@e8a09000 { + compatible = "hisilicon,hi3670-pctrl", "syscon"; + reg = <0x0 0xe8a09000 0x0 0x1000>; + #clock-cells = <1>; + }; + + pmuctrl: crg_ctrl@fff34000 { + compatible = "hisilicon,hi3670-pmuctrl", "syscon"; + reg = <0x0 0xfff34000 0x0 0x1000>; + #clock-cells = <1>; + }; + + sctrl: sctrl@fff0a000 { + compatible = "hisilicon,hi3670-sctrl", "syscon"; + reg = <0x0 0xfff0a000 0x0 0x1000>; + #clock-cells = <1>; + }; + + iomcu: iomcu@ffd7e000 { + compatible = "hisilicon,hi3670-iomcu", "syscon"; + reg = <0x0 0xffd7e000 0x0 0x1000>; + #clock-cells = <1>; + }; + + media1_crg: media1_crgctrl@e87ff000 { + compatible = "hisilicon,hi3670-media1-crg", "syscon"; + reg = <0x0 0xe87ff000 0x0 0x1000>; + #clock-cells = <1>; + }; + + media2_crg: media2_crgctrl@e8900000 { + compatible = "hisilicon,hi3670-media2-crg","syscon"; + reg = <0x0 0xe8900000 0x0 0x1000>; + #clock-cells = <1>; + }; + uart6_clk: clk_19_2M { compatible = "fixed-clock"; #clock-cells = <0>;
PATCH 3/4 arm64: dts: hisilicon: Source SoC clock for UART6
In reply to Manivannan SadhasivamRemove fixed clock and source SoC clock for UART6 for HiSilicon Hi3670 SoC.
--- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/hisilicon/hi3670.dtsi +2 -7
@@ -187,17 +187,12 @@ #clock-cells = <1>; }; - uart6_clk: clk_19_2M { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <19200000>; - }; - uart6: serial at fff32000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xfff32000 0x0 0x1000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart6_clk &uart6_clk>; + clocks = <&crg_ctrl HI3670_CLK_UART6>, + <&crg_ctrl HI3670_PCLK>; clock-names = "uartclk", "apb_pclk"; status = "disabled"; };
Signature · 1 line
2.17.1
Re: [PATCH 3/4] arm64: dts: hisilicon: Source SoC clock for UART6
Hi Manivannan,
Quoted 4 lines · Manivannan Sadhasivam
Remove fixed clock and source SoC clock for UART6 for HiSilicon Hi3670 SoC.
Signed-off-by Manivannan Sadhasivam <[email protected]>
Applied to the hisilicon soc dt tree.
Thanks!
Best Regards,
Wei
Quoted 29 lines
--- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)arch/arm64/boot/dts/hisilicon/hi3670.dtsi +2
-7@@ -187,17 +187,12 @@ #clock-cells = <1>; }; - uart6_clk: clk_19_2M { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <19200000>; - }; - uart6: serial@fff32000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xfff32000 0x0 0x1000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&uart6_clk &uart6_clk>; + clocks = <&crg_ctrl HI3670_CLK_UART6>, + <&crg_ctrl HI3670_PCLK>; clock-names = "uartclk", "apb_pclk"; status = "disabled"; };
PATCH 4/4 clk: hisilicon: Add clock driver for Hi3670 SoC
In reply to Manivannan SadhasivamAdd clock driver for HiSilicon Hi3670 SoC utilizing HiSilicon's common clk code.
--- drivers/clk/hisilicon/Kconfig | 7 + drivers/clk/hisilicon/Makefile | 1 + drivers/clk/hisilicon/clk-hi3670.c | 1016 ++++++++++++++++++++++++++++ 3 files changed, 1024 insertions(+) create mode 100644 drivers/clk/hisilicon/clk-hi3670.c
drivers/clk/hisilicon/Kconfig +7 -0
@@ -21,6 +21,13 @@ config COMMON_CLK_HI3660 help Build the clock driver for hi3660. +config COMMON_CLK_HI3670 + bool "Hi3670 Clock Driver" + depends on ARCH_HISI || COMPILE_TEST + default ARCH_HISI + help + Build the clock driver for hi3670. + config COMMON_CLK_HI3798CV200 tristate "Hi3798CV200 Clock Driver" depends on ARCH_HISI || COMPILE_TEST
drivers/clk/hisilicon/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_ARCH_HIX5HD2) += clk-hix5hd2.o obj-$(CONFIG_COMMON_CLK_HI3516CV300) += crg-hi3516cv300.o obj-$(CONFIG_COMMON_CLK_HI3519) += clk-hi3519.o obj-$(CONFIG_COMMON_CLK_HI3660) += clk-hi3660.o +obj-$(CONFIG_COMMON_CLK_HI3670) += clk-hi3670.o obj-$(CONFIG_COMMON_CLK_HI3798CV200) += crg-hi3798cv200.o obj-$(CONFIG_COMMON_CLK_HI6220) += clk-hi6220.o obj-$(CONFIG_RESET_HISI) += reset.o
drivers/clk/hisilicon/clk-hi3670.c new file +1016 -0
1,016 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH 4/4] clk: hisilicon: Add clock driver for Hi3670 SoC
Quoting Manivannan Sadhasivam (2018-09-20 23:01:03)
Quoted 5 lines
Add clock driver for HiSilicon Hi3670 SoC utilizing HiSilicon's common clk code.
Signed-off-by Manivannan Sadhasivam <[email protected]>---
Applied to clk-next
Quoted 6 lines · Manivannan Sadhasivam
This patchset adds clock support for Hi3670 SoC from HiSilicon utilizing the HiSi common clock code. While adding clock support, let's remove the fixed clock for UART and source SoC clock on HiKey970 board.
This patchset has been verified on HiKey970 board.
Hi,
Any update on this series?
Thanks,
Mani
Quoted 23 lines
Thanks,
ManiManivannan Sadhasivam (4):
dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk
arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC
arm64: dts: hisilicon: Source SoC clock for UART6
clk: hisilicon: Add clock driver for Hi3670 SoC.../bindings/clock/hi3670-clock.txt | 43 + arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 48 +- drivers/clk/hisilicon/Kconfig | 7 + drivers/clk/hisilicon/Makefile | 1 + drivers/clk/hisilicon/clk-hi3670.c | 1016 +++++++++++++++++ include/dt-bindings/clock/hi3670-clock.h | 348 ++++++ 6 files changed, 1458 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/hi3670-clock.txt create mode 100644 drivers/clk/hisilicon/clk-hi3670.c create mode 100644 include/dt-bindings/clock/hi3670-clock.hSignature · 1 line
2.17.1
Stephen Boyd
maintainerQuoting Manivannan Sadhasivam (2018-10-11 20:38:58)
Quoted 5 lines · Manivannan Sadhasivam
Quoted 4 lines
This patchset adds clock support for Hi3670 SoC from HiSilicon utilizing the HiSi common clock code. While adding clock support, let's remove the fixed clock for UART and source SoC clock on HiKey970 board.
Quoted 7 lines
Quoted 2 lines
This patchset has been verified on HiKey970 board.
Hi,
Any update on this series?
Can I merge the clk driver part by itself? Are you looking for an ack from clk maintainers?
Quoted 9 lines · Stephen Boyd
Quoting Manivannan Sadhasivam (2018-10-11 20:38:58)
Quoted 8 lines · Manivannan Sadhasivam
Quoted 6 lines
This patchset adds clock support for Hi3670 SoC from HiSilicon utilizing the HiSi common clock code. While adding clock support, let's remove the fixed clock for UART and source SoC clock on HiKey970 board.
This patchset has been verified on HiKey970 board.
Quoted 8 lines
Quoted 4 lines
Hi,
Any update on this series?
Can I merge the clk driver part by itself? Are you looking for an ack from clk maintainers?
Yes, please. I'm not sure about the maintainer for this clk part and it is best if you can take a look and merge if its ok.
Thanks,
Mani
Quoted 6 lines · Manivannan Sadhasivam
This patchset adds clock support for Hi3670 SoC from HiSilicon utilizing the HiSi common clock code. While adding clock support, let's remove the fixed clock for UART and source SoC clock on HiKey970 board.
This patchset has been verified on HiKey970 board.
Quoted 7 lines
Thanks,
ManiManivannan Sadhasivam (4):
dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk
arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC
arm64: dts: hisilicon: Source SoC clock for UART6
Hi Wei,
Since the clk patches are merged, can you please take the DTS patches through HiSi tree? I will post the pinctrl/gpio patches soon which will depend on clk bits.
Thanks,
Mani
Quoted 16 lines
clk: hisilicon: Add clock driver for Hi3670 SoC
.../bindings/clock/hi3670-clock.txt | 43 + arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 48 +- drivers/clk/hisilicon/Kconfig | 7 + drivers/clk/hisilicon/Makefile | 1 + drivers/clk/hisilicon/clk-hi3670.c | 1016 +++++++++++++++++ include/dt-bindings/clock/hi3670-clock.h | 348 ++++++ 6 files changed, 1458 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/hi3670-clock.txt create mode 100644 drivers/clk/hisilicon/clk-hi3670.c create mode 100644 include/dt-bindings/clock/hi3670-clock.hSignature · 1 line
2.17.1