Add S4 SoC PLL and Peripheral clock
Subsystems (4)
v8 cover Add S4 SoC PLL and Peripheral clock
1. Add S4 SoC PLL and Peripheral clock controller dt-bindings.
2. Add PLL and Peripheral clock controller driver for S4 SOC.
Yu Tu (4):
dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
dt-bindings: clock: document Amlogic S4 SoC peripherals clock
controller
clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver
clk: meson: s4: add support for Amlogic S4 SoC peripheral clock
controller
V7 -> V8:
1. Change patch 0001/0002 dt-bindings title description, remove "meson". Suggested by Dmitry, Neil.
2. Change patch 0003/0004 clocks comment, format and clock flags suggested by Dmitry, Neil, Jerome.
V6 -> V7: Change send patch series as well change format and clock flags suggested by Jerome. Change dt-bindings suggested by Krzysztof. V5 -> V6: Change send patch series, as well change format and clock flags. V4 -> V5: change format and clock flags and adjust the patch series as suggested by Jerome.
V3 -> V4: change format and clock flags.
V2 -> V3: Use two clock controller.
V1 -> V2: Change format as discussed in the email.
.../clock/amlogic,s4-peripherals-clkc.yaml | 97 + .../bindings/clock/amlogic,s4-pll-clkc.yaml | 50 + MAINTAINERS | 1 + drivers/clk/meson/Kconfig | 25 + drivers/clk/meson/Makefile | 2 + drivers/clk/meson/s4-peripherals.c | 3830 +++++++++++++++++ drivers/clk/meson/s4-peripherals.h | 217 + drivers/clk/meson/s4-pll.c | 907 ++++ drivers/clk/meson/s4-pll.h | 87 + .../clock/amlogic,s4-peripherals-clkc.h | 131 + .../dt-bindings/clock/amlogic,s4-pll-clkc.h | 30 + 11 files changed, 5377 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,s4-peripherals-clkc.yaml create mode 100644 Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml create mode 100644 drivers/clk/meson/s4-peripherals.c create mode 100644 drivers/clk/meson/s4-peripherals.h create mode 100644 drivers/clk/meson/s4-pll.c create mode 100644 drivers/clk/meson/s4-pll.h create mode 100644 include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h create mode 100644 include/dt-bindings/clock/amlogic,s4-pll-clkc.h
base-commit: ac9a78681b921877518763ba0e89202254349d1b
Signature · 7 lines
2.33.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH RESEND v8 1/4 dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
Add the S4 PLL clock controller dt-bindings in the s4 SoC family.
--- .../bindings/clock/amlogic,s4-pll-clkc.yaml | 50 +++++++++++++++++++ MAINTAINERS | 1 + .../dt-bindings/clock/amlogic,s4-pll-clkc.h | 30 +++++++++++ 3 files changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml create mode 100644 include/dt-bindings/clock/amlogic,s4-pll-clkc.h
Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml new file +50 -0
@@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,s4-pll-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic S serials PLL Clock Controller + +maintainers: + - Neil Armstrong <[email protected]> + - Jerome Brunet <[email protected]> + - Yu Tu <[email protected]> + +properties: + compatible: + const: amlogic,s4-pll-clkc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: xtal + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + clkc_pll: clock-controller@fe008000 { + compatible = "amlogic,s4-pll-clkc"; + reg = <0xfe008000 0x1e8>; + clocks = <&xtal>; + clock-names = "xtal"; + #clock-cells = <1>; + }; + +...
MAINTAINERS +1 -0
@@ -1888,6 +1888,7 @@ L: [email protected] S: Maintained F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ +F: include/dt-bindings/clock/amlogic* F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson*
include/dt-bindings/clock/amlogic,s4-pll-clkc.h new file +30 -0
@@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* +* Copyright (c) 2021 Amlogic, Inc. All rights reserved. +* Author: Yu Tu <[email protected]> +*/ + +#ifndef _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H +#define _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H + +/* +* CLKID index values +*/ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11 +#define CLKID_FCLK_DIV2P5 13 +#define CLKID_GP0_PLL 15 +#define CLKID_HIFI_PLL 17 +#define CLKID_HDMI_PLL 20 +#define CLKID_MPLL_50M 22 +#define CLKID_MPLL0 25 +#define CLKID_MPLL1 27 +#define CLKID_MPLL2 29 +#define CLKID_MPLL3 31 + +#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H */
Signature · 7 lines
2.33.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Re: [PATCH V8 RESEND 1/4] dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
Quoted 4 lines · Yu Tu
Add the S4 PLL clock controller dt-bindings in the s4 SoC family.
Signed-off-by Yu Tu <[email protected]>---
This is a friendly reminder during the review process.
It looks like you received a tag and forgot to add it.
If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.
https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540
If a tag was not added on purpose, please state why and what changed.
Best regards,
Krzysztof
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH RESEND v8 2/4 dt-bindings: clock: document Amlogic S4 SoC peripherals clock controller
In reply to Yu TuAdd the S4 peripherals clock controller dt-bindings in the s4 SoC family.
--- .../clock/amlogic,s4-peripherals-clkc.yaml | 97 +++++++++++++ .../clock/amlogic,s4-peripherals-clkc.h | 131 ++++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,s4-peripherals-clkc.yaml create mode 100644 include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h
Documentation/devicetree/bindings/clock/amlogic,s4-peripherals-clkc.yaml new file +97 -0
@@ -0,0 +1,97 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,s4-peripherals-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic S serials Peripherals Clock Controller + +maintainers: + - Neil Armstrong <[email protected]> + - Jerome Brunet <[email protected]> + - Yu Tu <[email protected]> + +properties: + compatible: + const: amlogic,s4-peripherals-clkc + + reg: + maxItems: 1 + + clocks: + items: + - description: input fixed pll div2 + - description: input fixed pll div2p5 + - description: input fixed pll div3 + - description: input fixed pll div4 + - description: input fixed pll div5 + - description: input fixed pll div7 + - description: input hifi pll + - description: input gp0 pll + - description: input mpll0 + - description: input mpll1 + - description: input mpll2 + - description: input mpll3 + - description: input hdmi pll + - description: input oscillator (usually at 24MHz) + - description: input external 32kHz reference (optional) + + clock-names: + items: + - const: fclk_div2 + - const: fclk_div2p5 + - const: fclk_div3 + - const: fclk_div4 + - const: fclk_div5 + - const: fclk_div7 + - const: hifi_pll + - const: gp0_pll + - const: mpll0 + - const: mpll1 + - const: mpll2 + - const: mpll3 + - const: hdmi_pll + - const: xtal + - const: ext_32k + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> + + clkc_periphs: clock-controller@fe000000 { + compatible = "amlogic,s4-peripherals-clkc"; + reg = <0xfe000000 0x49c>; + clocks = <&clkc_pll 3>, + <&clkc_pll 13>, + <&clkc_pll 5>, + <&clkc_pll 7>, + <&clkc_pll 9>, + <&clkc_pll 11>, + <&clkc_pll 17>, + <&clkc_pll 15>, + <&clkc_pll 25>, + <&clkc_pll 27>, + <&clkc_pll 29>, + <&clkc_pll 31>, + <&clkc_pll 20>, + <&xtal>, + <&ext_32k>; + clock-names = "fclk_div2", "fclk_div2p5", "fclk_div3", "fclk_div4", + "fclk_div5", "fclk_div7", "hifi_pll", "gp0_pll", + "mpll0", "mpll1", "mpll2", "mpll3", "hdmi_pll", "xtal", + "ext_32k"; + #clock-cells = <1>; + }; +...
include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h new file +131 -0
131 lines not on this page · raw message
Signature · 1 line
2.33.1
Re: [PATCH V8 RESEND 2/4] dt-bindings: clock: document Amlogic S4 SoC peripherals clock controller
Quoted 5 lines · Yu Tu
Add the S4 peripherals clock controller dt-bindings in the s4 SoC family.
Signed-off-by Yu Tu <[email protected]>---
This is a friendly reminder during the review process.
It looks like you received a tag and forgot to add it.
If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.
https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540
If a tag was not added on purpose, please state why and what changed.
Best regards,
Krzysztof
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH RESEND v8 3/4 clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver
In reply to Yu TuAdd the S4 PLL clock controller driver in the s4 SoC family.
--- drivers/clk/meson/Kconfig | 13 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4-pll.c | 907 +++++++++++++++++++++++++++++++++++++ drivers/clk/meson/s4-pll.h | 87 ++++ 4 files changed, 1008 insertions(+) create mode 100644 drivers/clk/meson/s4-pll.c create mode 100644 drivers/clk/meson/s4-pll.h
drivers/clk/meson/Kconfig +13 -0
@@ -115,4 +115,17 @@ config COMMON_CLK_G12A help Support for the clock controller on Amlogic S905D2, S905X2 and S905Y2 devices, aka g12a. Say Y if you want peripherals to work. + +config COMMON_CLK_S4_PLL + tristate "S4 SoC PLL clock controllers support" + depends on ARM64 + default y + select COMMON_CLK_MESON_MPLL + select COMMON_CLK_MESON_PLL + select COMMON_CLK_MESON_REGMAP + help + Support for the pll clock controller on Amlogic S805X2 and S905Y4 devices, + aka s4. Amlogic S805X2 and S905Y4 devices include AQ222 and AQ229. + Say Y if you want the board to work, because plls are the parent of most + peripherals. endmenu
drivers/clk/meson/Makefile +1 -0
@@ -19,3 +19,4 @@ obj-$(CONFIG_COMMON_CLK_AXG_AUDIO) += axg-audio.o obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o obj-$(CONFIG_COMMON_CLK_G12A) += g12a.o g12a-aoclk.o obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b.o meson8-ddr.o +obj-$(CONFIG_COMMON_CLK_S4_PLL) += s4-pll.o
drivers/clk/meson/s4-pll.c new file +907 -0
907 lines not on this page · raw message
drivers/clk/meson/s4-pll.h new file +87 -0
87 lines not on this page · raw message
Signature · 7 lines
2.33.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH RESEND v8 4/4 clk: meson: s4: add support for Amlogic S4 SoC peripheral clock controller
In reply to Yu TuAdd the peripherals clock controller driver in the s4 SoC family.
--- drivers/clk/meson/Kconfig | 12 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4-peripherals.c | 3830 ++++++++++++++++++++++++++++ drivers/clk/meson/s4-peripherals.h | 217 ++ 4 files changed, 4060 insertions(+) create mode 100644 drivers/clk/meson/s4-peripherals.c create mode 100644 drivers/clk/meson/s4-peripherals.h
drivers/clk/meson/Kconfig +12 -0
@@ -128,4 +128,16 @@ config COMMON_CLK_S4_PLL aka s4. Amlogic S805X2 and S905Y4 devices include AQ222 and AQ229. Say Y if you want the board to work, because plls are the parent of most peripherals. + +config COMMON_CLK_S4 + tristate "S4 SoC Peripherals clock controllers support" + depends on ARM64 + default y + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_DUALDIV + select COMMON_CLK_MESON_VID_PLL_DIV + help + Support for the Peripherals clock controller on Amlogic S805X2 and S905Y4 + devices, aka s4. Amlogic S805X2 and S905Y4 devices include AQ222 and AQ229. + Say Y if you want peripherals to work. endmenu
drivers/clk/meson/Makefile +1 -0
@@ -20,3 +20,4 @@ obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o obj-$(CONFIG_COMMON_CLK_G12A) += g12a.o g12a-aoclk.o obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b.o meson8-ddr.o obj-$(CONFIG_COMMON_CLK_S4_PLL) += s4-pll.o +obj-$(CONFIG_COMMON_CLK_S4) += s4-peripherals.o
drivers/clk/meson/s4-peripherals.c new file +3830 -0
2,980 lines not on this page · raw message
drivers/clk/meson/s4-peripherals.h new file +217 -0
217 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.33.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Part of the diff is not shown here. View the raw message.
Quoted 11 lines · Yu Tu
1. Add S4 SoC PLL and Peripheral clock controller dt-bindings.
2. Add PLL and Peripheral clock controller driver for S4 SOC.Yu Tu (4):
dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
dt-bindings: clock: document Amlogic S4 SoC peripherals clock
controller
clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver
clk: meson: s4: add support for Amlogic S4 SoC peripheral clock
controller
Quoted 3 lines
V7 -> V8:
1. Change patch 0001/0002 dt-bindings title description, remove "meson". Suggested by Dmitry, Neil.
So you only removed one word from title and description? This does not justify dropping review tag.
You already got a comment for this - add the tag.
Best regards,
Krzysztof
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 14 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 11 lines · Yu Tu
1. Add S4 SoC PLL and Peripheral clock controller dt-bindings.
2. Add PLL and Peripheral clock controller driver for S4 SOC.Yu Tu (4):
dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
dt-bindings: clock: document Amlogic S4 SoC peripherals clock
controller
clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver
clk: meson: s4: add support for Amlogic S4 SoC peripheral clock
controller
Quoted 6 lines
Quoted 3 lines
V7 -> V8:
1. Change patch 0001/0002 dt-bindings title description, remove "meson". Suggested by Dmitry, Neil.So you only removed one word from title and description? This does not justify dropping review tag.
Yes. I just remove one work.
Quoted 2 lines
You already got a comment for this - add the tag.
I wonder what I should do next?
Add the tag and RESEND it again?
Quoted 4 lines
Best regards,
Krzysztof
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 24 lines · Yu Tu
Quoted 14 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 11 lines · Yu Tu
1. Add S4 SoC PLL and Peripheral clock controller dt-bindings.
2. Add PLL and Peripheral clock controller driver for S4 SOC.Yu Tu (4):
dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
dt-bindings: clock: document Amlogic S4 SoC peripherals clock
controller
clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver
clk: meson: s4: add support for Amlogic S4 SoC peripheral clock
controllerQuoted 6 lines
Quoted 3 lines
V7 -> V8:
1. Change patch 0001/0002 dt-bindings title description, remove "meson". Suggested by Dmitry, Neil.So you only removed one word from title and description? This does not justify dropping review tag.
Quoted 7 lines
Yes. I just remove one work.
Quoted 2 lines
You already got a comment for this - add the tag.
I wonder what I should do next?
Add the tag and RESEND it again?
I cannot add other people tags, e.g. b4 ignores them.
Best regards,
Krzysztof