From: Jisheng Zhang <jszhang@marvell.com>
To: Chen-Yu Tsai <wens@csie.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>, <linux-sunxi@googlegroups.com>,
<linux-clk@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/5] ARM: dts: sun9i: Add A80 PRCM clocks and reset control nodes
Date: Tue, 24 Nov 2015 18:27:09 +0800 [thread overview]
Message-ID: <20151124182709.7671f12f@xhacker> (raw)
In-Reply-To: <1448357536-26613-5-git-send-email-wens@csie.org>
+ Sebastian
On Tue, 24 Nov 2015 17:32:15 +0800
Chen-Yu Tsai wrote:
> This adds the supported PRCM clocks and reset controls to the A80 dtsi.
> The DAUDIO module clocks are not supported yet.
>
> Also update clock and reset phandles for r_uart.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> arch/arm/boot/dts/sun9i-a80.dtsi | 79 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 78 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
> index 1118bf5cc4fb..a4ce348c0831 100644
> --- a/arch/arm/boot/dts/sun9i-a80.dtsi
> +++ b/arch/arm/boot/dts/sun9i-a80.dtsi
> @@ -164,6 +164,14 @@
> "usb_phy2", "usb_hsic_12M";
> };
>
> + pll3: clk@06000008 {
> + /* placeholder until implemented */
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + clock-rate = <0>;
> + clock-output-names = "pll3";
> + };
> +
> pll4: clk@0600000c {
> #clock-cells = <0>;
> compatible = "allwinner,sun9i-a80-pll4-clk";
> @@ -350,6 +358,68 @@
> "apb1_uart2", "apb1_uart3",
> "apb1_uart4", "apb1_uart5";
> };
> +
> + cpus_clk: clk@08001410 {
> + compatible = "allwinner,sun9i-a80-cpus-clk";
> + reg = <0x08001410 0x4>;
> + #clock-cells = <0>;
> + clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
> + clock-output-names = "cpus";
> + };
> +
> + ahbs: ahbs_clk {
> + compatible = "fixed-factor-clock";
> + #clock-cells = <0>;
> + clock-div = <1>;
> + clock-mult = <1>;
> + clocks = <&cpus_clk>;
> + clock-output-names = "ahbs";
> + };
Dear Sebastian and all,
I just want to take the sunxi clk support in mainline for example.
I'm not sure I understand correctly, it seems to me that some maintainers draw a
line: "having a node for every clock" is a no, no[1]. But here we saw one node for
cpus_clk and apbs below. And <0x08001410 0x4>; <0x0800141c 0x4>; shows they
are close each other, so should we merge them into a single clock complex node
then use mfd, regmap in clk driver?
But IMHO, sunxi dts nodes really represent real HW, so I still can't understand
why we could not have each node for cpus_clk and apbs. Can you please kindly
teach me?
Another question: is "Not having a node for every clock" a rule, Would you
please confirm? if yes, I'll strictly follow this rule.
[1]http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/387335.html
Thank you very much,
Jisheng
> +
> + apbs: clk@0800141c {
> + compatible = "allwinner,sun8i-a23-apb0-clk";
> + reg = <0x0800141c 0x4>;
> + #clock-cells = <0>;
> + clocks = <&ahbs>;
> + clock-output-names = "apbs";
> + };
> +
> + apbs_gates: clk@08001428 {
> + compatible = "allwinner,sun9i-a80-apbs-gates-clk";
> + reg = <0x08001428 0x4>;
> + #clock-cells = <1>;
> + clocks = <&apbs>;
> + clock-indices = <0>, <1>,
> + <2>, <3>,
> + <4>, <5>,
> + <6>, <7>,
> + <12>, <13>,
> + <16>, <17>,
> + <18>, <20>;
> + clock-output-names = "apbs_pio", "apbs_ir",
> + "apbs_timer", "apbs_rsb",
> + "apbs_uart", "apbs_1wire",
> + "apbs_i2c0", "apbs_i2c1",
> + "apbs_ps2_0", "apbs_ps2_1",
> + "apbs_dma", "apbs_i2s0",
> + "apbs_i2s1", "apbs_twd";
> + };
This is for gate clocks, so we have a node for gateclks. gateclks are merged
into one node.
> +
> + r_1wire_clk: clk@08001450 {
> + reg = <0x08001450 0x4>;
> + #clock-cells = <0>;
> + compatible = "allwinner,sun4i-a10-mod0-clk";
> + clocks = <&osc32k>, <&osc24M>;
> + clock-output-names = "r_1wire";
> + };
> +
> + r_ir_clk: clk@08001454 {
> + reg = <0x08001454 0x4>;
> + #clock-cells = <0>;
> + compatible = "allwinner,sun4i-a10-mod0-clk";
> + clocks = <&osc32k>, <&osc24M>;
> + clock-output-names = "r_ir";
> + };
> };
>
> soc {
> @@ -764,13 +834,20 @@
> interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
> };
>
> + apbs_rst: reset@080014b0 {
> + reg = <0x080014b0 0x4>;
> + compatible = "allwinner,sun6i-a31-clock-reset";
> + #reset-cells = <1>;
> + };
> +
> r_uart: serial@08002800 {
> compatible = "snps,dw-apb-uart";
> reg = <0x08002800 0x400>;
> interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
> reg-shift = <2>;
> reg-io-width = <4>;
> - clocks = <&osc24M>;
> + clocks = <&apbs_gates 4>;
> + resets = <&apbs_rst 4>;
> status = "disabled";
> };
> };
WARNING: multiple messages have this Message-ID (diff)
From: jszhang@marvell.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/5] ARM: dts: sun9i: Add A80 PRCM clocks and reset control nodes
Date: Tue, 24 Nov 2015 18:27:09 +0800 [thread overview]
Message-ID: <20151124182709.7671f12f@xhacker> (raw)
In-Reply-To: <1448357536-26613-5-git-send-email-wens@csie.org>
+ Sebastian
On Tue, 24 Nov 2015 17:32:15 +0800
Chen-Yu Tsai wrote:
> This adds the supported PRCM clocks and reset controls to the A80 dtsi.
> The DAUDIO module clocks are not supported yet.
>
> Also update clock and reset phandles for r_uart.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> arch/arm/boot/dts/sun9i-a80.dtsi | 79 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 78 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
> index 1118bf5cc4fb..a4ce348c0831 100644
> --- a/arch/arm/boot/dts/sun9i-a80.dtsi
> +++ b/arch/arm/boot/dts/sun9i-a80.dtsi
> @@ -164,6 +164,14 @@
> "usb_phy2", "usb_hsic_12M";
> };
>
> + pll3: clk at 06000008 {
> + /* placeholder until implemented */
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + clock-rate = <0>;
> + clock-output-names = "pll3";
> + };
> +
> pll4: clk at 0600000c {
> #clock-cells = <0>;
> compatible = "allwinner,sun9i-a80-pll4-clk";
> @@ -350,6 +358,68 @@
> "apb1_uart2", "apb1_uart3",
> "apb1_uart4", "apb1_uart5";
> };
> +
> + cpus_clk: clk at 08001410 {
> + compatible = "allwinner,sun9i-a80-cpus-clk";
> + reg = <0x08001410 0x4>;
> + #clock-cells = <0>;
> + clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
> + clock-output-names = "cpus";
> + };
> +
> + ahbs: ahbs_clk {
> + compatible = "fixed-factor-clock";
> + #clock-cells = <0>;
> + clock-div = <1>;
> + clock-mult = <1>;
> + clocks = <&cpus_clk>;
> + clock-output-names = "ahbs";
> + };
Dear Sebastian and all,
I just want to take the sunxi clk support in mainline for example.
I'm not sure I understand correctly, it seems to me that some maintainers draw a
line: "having a node for every clock" is a no, no[1]. But here we saw one node for
cpus_clk and apbs below. And <0x08001410 0x4>; <0x0800141c 0x4>; shows they
are close each other, so should we merge them into a single clock complex node
then use mfd, regmap in clk driver?
But IMHO, sunxi dts nodes really represent real HW, so I still can't understand
why we could not have each node for cpus_clk and apbs. Can you please kindly
teach me?
Another question: is "Not having a node for every clock" a rule, Would you
please confirm? if yes, I'll strictly follow this rule.
[1]http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/387335.html
Thank you very much,
Jisheng
> +
> + apbs: clk at 0800141c {
> + compatible = "allwinner,sun8i-a23-apb0-clk";
> + reg = <0x0800141c 0x4>;
> + #clock-cells = <0>;
> + clocks = <&ahbs>;
> + clock-output-names = "apbs";
> + };
> +
> + apbs_gates: clk at 08001428 {
> + compatible = "allwinner,sun9i-a80-apbs-gates-clk";
> + reg = <0x08001428 0x4>;
> + #clock-cells = <1>;
> + clocks = <&apbs>;
> + clock-indices = <0>, <1>,
> + <2>, <3>,
> + <4>, <5>,
> + <6>, <7>,
> + <12>, <13>,
> + <16>, <17>,
> + <18>, <20>;
> + clock-output-names = "apbs_pio", "apbs_ir",
> + "apbs_timer", "apbs_rsb",
> + "apbs_uart", "apbs_1wire",
> + "apbs_i2c0", "apbs_i2c1",
> + "apbs_ps2_0", "apbs_ps2_1",
> + "apbs_dma", "apbs_i2s0",
> + "apbs_i2s1", "apbs_twd";
> + };
This is for gate clocks, so we have a node for gateclks. gateclks are merged
into one node.
> +
> + r_1wire_clk: clk at 08001450 {
> + reg = <0x08001450 0x4>;
> + #clock-cells = <0>;
> + compatible = "allwinner,sun4i-a10-mod0-clk";
> + clocks = <&osc32k>, <&osc24M>;
> + clock-output-names = "r_1wire";
> + };
> +
> + r_ir_clk: clk at 08001454 {
> + reg = <0x08001454 0x4>;
> + #clock-cells = <0>;
> + compatible = "allwinner,sun4i-a10-mod0-clk";
> + clocks = <&osc32k>, <&osc24M>;
> + clock-output-names = "r_ir";
> + };
> };
>
> soc {
> @@ -764,13 +834,20 @@
> interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
> };
>
> + apbs_rst: reset at 080014b0 {
> + reg = <0x080014b0 0x4>;
> + compatible = "allwinner,sun6i-a31-clock-reset";
> + #reset-cells = <1>;
> + };
> +
> r_uart: serial at 08002800 {
> compatible = "snps,dw-apb-uart";
> reg = <0x08002800 0x400>;
> interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
> reg-shift = <2>;
> reg-io-width = <4>;
> - clocks = <&osc24M>;
> + clocks = <&apbs_gates 4>;
> + resets = <&apbs_rst 4>;
> status = "disabled";
> };
> };
next prev parent reply other threads:[~2015-11-24 10:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 9:32 [PATCH v3 0/5] ARM: sun9i: Add Allwinner A80 PRCM clock/reset support Chen-Yu Tsai
2015-11-24 9:32 ` Chen-Yu Tsai
2015-11-24 9:32 ` [PATCH v3 1/5] clk: sunxi: Add CLK_OF_DECLARE support for sun8i-a23-apb0-clk driver Chen-Yu Tsai
2015-11-24 9:32 ` Chen-Yu Tsai
2015-11-25 14:18 ` Maxime Ripard
2015-11-25 14:18 ` Maxime Ripard
2015-11-24 9:32 ` [PATCH v3 2/5] clk: sunxi: Add sun9i A80 apbs gates support Chen-Yu Tsai
2015-11-24 9:32 ` Chen-Yu Tsai
2015-11-24 9:32 ` [PATCH v3 3/5] clk: sunxi: Add sun9i A80 cpus (cpu special) clock support Chen-Yu Tsai
2015-11-24 9:32 ` Chen-Yu Tsai
2015-11-25 17:32 ` Maxime Ripard
2015-11-25 17:32 ` Maxime Ripard
2015-11-27 7:13 ` Chen-Yu Tsai
2015-11-27 7:13 ` Chen-Yu Tsai
2015-11-24 9:32 ` [PATCH v3 4/5] ARM: dts: sun9i: Add A80 PRCM clocks and reset control nodes Chen-Yu Tsai
2015-11-24 9:32 ` Chen-Yu Tsai
2015-11-24 10:27 ` Jisheng Zhang [this message]
2015-11-24 10:27 ` Jisheng Zhang
2015-11-26 20:09 ` Maxime Ripard
2015-11-26 20:09 ` Maxime Ripard
2015-11-27 5:42 ` Jisheng Zhang
2015-11-27 5:42 ` Jisheng Zhang
2015-11-24 9:32 ` [PATCH v3 5/5] ARM: dts: sun9i: Add TODO comments for the main and low power clocks Chen-Yu Tsai
2015-11-24 9:32 ` Chen-Yu Tsai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151124182709.7671f12f@xhacker \
--to=jszhang@marvell.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=mturquette@baylibre.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.