All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org, tony@atomide.com, nm@ti.com,
	rnayak@ti.com, bcousson@baylibre.com, mturquette@linaro.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCHv10 21/41] ARM: dts: omap4 clock data
Date: Tue, 17 Dec 2013 11:57:36 +0200	[thread overview]
Message-ID: <52B02010.2060307@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1312170934180.14039@utopia.booyaka.com>

On 12/17/2013 11:44 AM, Paul Walmsley wrote:
> On Tue, 26 Nov 2013, Tero Kristo wrote:
>
>> This patch creates a unique node for each clock in the OMAP4 power,
>> reset and clock manager (PRCM). OMAP443x and OMAP446x have slightly
>> different clock tree which is taken into account in the data.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>
> ...
>
>> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
>> index a1e0585..c2e3993 100644
>> --- a/arch/arm/boot/dts/omap4.dtsi
>> +++ b/arch/arm/boot/dts/omap4.dtsi
>> @@ -107,6 +107,34 @@
>>   		interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
>>   			     <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
>>
>> +		cm1: cm1@4a004000 {
>> +			compatible = "ti,clock-master";
>
> These devices are low-level IP blocks, and should have accurate compatible
> strings like any other low-level IP block.  At some point in the future,
> these IP blocks will have device driver code that matches up with these DT
> nodes, and is probed via these compatible strings.  These should be
> corrected now, so unnecessary DT data synchronization problems don't
> appear with later kernels.
>
> So this should be something like:
>
> compatible = "ti,omap4-cm1";
>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0x4a004000 0x2000>;
>> +		};
>> +
>> +		prm: prm@4a306000 {
>> +			compatible = "ti,clock-master";
>
> Similarly this should be
>
> compatible = "ti,omap4-prm";

How about just adding dual compatible strings? Keep the current one and 
add the other as extra.

	compatible = "ti,clock-master", "ti,omap4-prm";

Easier to handle it this way.

>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0x4a306000 0x3000>;
>> +		};
>> +
>> +		cm2: cm2@4a008000 {
>> +			compatible = "ti,clock-master";
>
> compatible = "ti,omap4-cm2";
>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0x4a008000 0x3000>;
>> +		};
>> +
>> +		scrm: scrm@4a30a000 {
>> +			compatible = "ti,clock-master";
>
> compatible = "ti,omap4-scrm";
>
>
> ...
>
>> diff --git a/arch/arm/boot/dts/omap443x-clocks.dtsi b/arch/arm/boot/dts/omap443x-clocks.dtsi
>> new file mode 100644
>> index 0000000..643755b
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap443x-clocks.dtsi
>> @@ -0,0 +1,18 @@
>> +/*
>> + * Device Tree Source for OMAP4 clock data
>> + *
>> + * Copyright (C) 2013 Texas Instruments, Inc.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +&prm {
>> +	bandgap_fclk: bandgap_fclk {
>> +		#clock-cells = <0>;
>> +		compatible = "ti,gate-clock";
>> +		clocks = <&sys_32k_ck>;
>> +		ti,bit-shift = <8>;
>> +		reg = <0x1888>;
>> +	};
>
> So we've already discussed that clocks should be moved underneath
> separate "clocks {" node in the IP block data.  And similarly...

Yeah, I have actually wip v11 which has this done. I ended up creating 
this though:

...
    prm {
       prm_clocks: clocks {

       };
    };

... and references like:

&prm_clocks {

};

It seems the references to existing clocks {} nodes is impossible 
otherwise as I need to add some extra clocks to these.

>
>> diff --git a/arch/arm/boot/dts/omap44xx-clocks.dtsi b/arch/arm/boot/dts/omap44xx-clocks.dtsi
>> new file mode 100644
>> index 0000000..2b59d54
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap44xx-clocks.dtsi
>
> ...
>
>> +	emu_sys_clkdm: emu_sys_clkdm {
>> +		compatible = "ti,clockdomain";
>> +		clocks = <&trace_clk_div_ck>;
>> +	};
>
> ... all of the clockdomains should be moved underneath "clockdomains {"
> nodes in the IP block DT data.

Ok that can be done.

>
>
> - Paul
>


WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv10 21/41] ARM: dts: omap4 clock data
Date: Tue, 17 Dec 2013 11:57:36 +0200	[thread overview]
Message-ID: <52B02010.2060307@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1312170934180.14039@utopia.booyaka.com>

On 12/17/2013 11:44 AM, Paul Walmsley wrote:
> On Tue, 26 Nov 2013, Tero Kristo wrote:
>
>> This patch creates a unique node for each clock in the OMAP4 power,
>> reset and clock manager (PRCM). OMAP443x and OMAP446x have slightly
>> different clock tree which is taken into account in the data.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>
> ...
>
>> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
>> index a1e0585..c2e3993 100644
>> --- a/arch/arm/boot/dts/omap4.dtsi
>> +++ b/arch/arm/boot/dts/omap4.dtsi
>> @@ -107,6 +107,34 @@
>>   		interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
>>   			     <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
>>
>> +		cm1: cm1 at 4a004000 {
>> +			compatible = "ti,clock-master";
>
> These devices are low-level IP blocks, and should have accurate compatible
> strings like any other low-level IP block.  At some point in the future,
> these IP blocks will have device driver code that matches up with these DT
> nodes, and is probed via these compatible strings.  These should be
> corrected now, so unnecessary DT data synchronization problems don't
> appear with later kernels.
>
> So this should be something like:
>
> compatible = "ti,omap4-cm1";
>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0x4a004000 0x2000>;
>> +		};
>> +
>> +		prm: prm at 4a306000 {
>> +			compatible = "ti,clock-master";
>
> Similarly this should be
>
> compatible = "ti,omap4-prm";

How about just adding dual compatible strings? Keep the current one and 
add the other as extra.

	compatible = "ti,clock-master", "ti,omap4-prm";

Easier to handle it this way.

>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0x4a306000 0x3000>;
>> +		};
>> +
>> +		cm2: cm2 at 4a008000 {
>> +			compatible = "ti,clock-master";
>
> compatible = "ti,omap4-cm2";
>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0x4a008000 0x3000>;
>> +		};
>> +
>> +		scrm: scrm at 4a30a000 {
>> +			compatible = "ti,clock-master";
>
> compatible = "ti,omap4-scrm";
>
>
> ...
>
>> diff --git a/arch/arm/boot/dts/omap443x-clocks.dtsi b/arch/arm/boot/dts/omap443x-clocks.dtsi
>> new file mode 100644
>> index 0000000..643755b
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap443x-clocks.dtsi
>> @@ -0,0 +1,18 @@
>> +/*
>> + * Device Tree Source for OMAP4 clock data
>> + *
>> + * Copyright (C) 2013 Texas Instruments, Inc.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +&prm {
>> +	bandgap_fclk: bandgap_fclk {
>> +		#clock-cells = <0>;
>> +		compatible = "ti,gate-clock";
>> +		clocks = <&sys_32k_ck>;
>> +		ti,bit-shift = <8>;
>> +		reg = <0x1888>;
>> +	};
>
> So we've already discussed that clocks should be moved underneath
> separate "clocks {" node in the IP block data.  And similarly...

Yeah, I have actually wip v11 which has this done. I ended up creating 
this though:

...
    prm {
       prm_clocks: clocks {

       };
    };

... and references like:

&prm_clocks {

};

It seems the references to existing clocks {} nodes is impossible 
otherwise as I need to add some extra clocks to these.

>
>> diff --git a/arch/arm/boot/dts/omap44xx-clocks.dtsi b/arch/arm/boot/dts/omap44xx-clocks.dtsi
>> new file mode 100644
>> index 0000000..2b59d54
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap44xx-clocks.dtsi
>
> ...
>
>> +	emu_sys_clkdm: emu_sys_clkdm {
>> +		compatible = "ti,clockdomain";
>> +		clocks = <&trace_clk_div_ck>;
>> +	};
>
> ... all of the clockdomains should be moved underneath "clockdomains {"
> nodes in the IP block DT data.

Ok that can be done.

>
>
> - Paul
>

  reply	other threads:[~2013-12-17  9:57 UTC|newest]

Thread overview: 162+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26  8:05 [PATCHv10 00/41] ARM: TI SoC clock DT conversion Tero Kristo
2013-11-26  8:05 ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 01/41] clk: add support for platform specific clock I/O wrapper functions Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-12-15  0:48   ` Mike Turquette
2013-12-15  0:48     ` Mike Turquette
2013-12-16  8:06     ` Tero Kristo
2013-12-16  8:06       ` Tero Kristo
2013-12-17 12:34   ` Paul Walmsley
2013-12-17 12:34     ` Paul Walmsley
2013-12-18  3:33     ` Paul Walmsley
2013-12-18  3:33       ` Paul Walmsley
2013-11-26  8:05 ` [PATCHv10 02/41] CLK: TI: add DT alias clock registration mechanism Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 03/41] CLK: ti: add init support for clock IP blocks Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-12-17  8:14   ` Paul Walmsley
2013-12-17  8:14     ` Paul Walmsley
2013-12-17  8:21     ` Tero Kristo
2013-12-17  8:21       ` Tero Kristo
2013-12-17  8:32       ` Paul Walmsley
2013-12-17  8:32         ` Paul Walmsley
2013-11-26  8:05 ` [PATCHv10 04/41] CLK: TI: Add DPLL clock support Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-12-17  8:37   ` Paul Walmsley
2013-12-17  8:37     ` Paul Walmsley
2013-12-17  8:40   ` Paul Walmsley
2013-12-17  8:40     ` Paul Walmsley
2013-11-26  8:05 ` [PATCHv10 05/41] CLK: TI: add autoidle support Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 06/41] clk: ti: add composite clock support Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 07/41] CLK: ti: add support for ti divider-clock Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 08/41] clk: ti: add support for TI fixed factor clock Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 09/41] CLK: TI: add support for gate clock Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 11/41] clk: ti: add support for basic mux clock Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 12/41] CLK: TI: add omap4 clock init file Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-12-17  9:30   ` Paul Walmsley
2013-12-17  9:30     ` Paul Walmsley
2013-11-26  8:05 ` [PATCHv10 14/41] CLK: TI: omap5: Initialize USB_DPLL at boot Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 15/41] CLK: TI: DRA7: Add APLL support Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:51   ` Alexander Aring
2013-11-26  8:51     ` Alexander Aring
2013-11-29 19:00     ` Tero Kristo
2013-11-29 19:00       ` Tero Kristo
2013-11-29 20:52       ` Alexander Aring
2013-11-29 20:52         ` Alexander Aring
2013-11-26  8:05 ` [PATCHv10 16/41] CLK: TI: add dra7 clock init file Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:05 ` [PATCHv10 17/41] CLK: TI: add am33xx " Tero Kristo
2013-11-26  8:05   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 19/41] CLK: TI: add omap3 " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 20/41] CLK: TI: add am43xx " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 21/41] ARM: dts: omap4 clock data Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-12-17  9:44   ` Paul Walmsley
2013-12-17  9:44     ` Paul Walmsley
2013-12-17  9:57     ` Tero Kristo [this message]
2013-12-17  9:57       ` Tero Kristo
2013-12-20 11:15       ` Paul Walmsley
2013-12-20 11:15         ` Paul Walmsley
2013-11-26  8:06 ` [PATCHv10 23/41] ARM: dts: dra7 " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-12-17  9:46   ` Paul Walmsley
2013-12-17  9:46     ` Paul Walmsley
2013-11-26  8:06 ` [PATCHv10 24/41] ARM: dts: clk: Add apll related clocks Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 26/41] ARM: dts: DRA7: Add PCIe related clock nodes Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 27/41] ARM: dts: am33xx clock data Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-12-17  9:48   ` Paul Walmsley
2013-12-17  9:48     ` Paul Walmsley
2013-11-26  8:06 ` [PATCHv10 28/41] ARM: dts: omap3 " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-12-17  9:50   ` Paul Walmsley
2013-12-17  9:50     ` Paul Walmsley
2013-11-26  8:06 ` [PATCHv10 29/41] ARM: dts: AM35xx: use DT " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 30/41] ARM: dts: am43xx " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-12-17  9:52   ` Paul Walmsley
2013-12-17  9:52     ` Paul Walmsley
2013-11-26  8:06 ` [PATCHv10 31/41] ARM: OMAP2+: clock: add support for regmap Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26 17:40   ` Tony Lindgren
2013-11-26 17:40     ` Tony Lindgren
2013-11-27  9:08     ` Tero Kristo
2013-11-27  9:08       ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 32/41] ARM: OMAP2+: clock: use driver API instead of direct memory read/write Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 33/41] ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 34/41] ARM: OMAP3: hwmod: initialize clkdm from clkdm_name Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 35/41] ARM: OMAP2+: PRM: add support for initializing PRCM clock modules from DT Tero Kristo
2013-11-26  8:06   ` Tero Kristo
     [not found] ` <1385453182-24421-1-git-send-email-t-kristo-l0cyMroinI0@public.gmane.org>
2013-11-26  8:05   ` [PATCHv10 10/41] CLK: TI: add support for clockdomain binding Tero Kristo
2013-11-26  8:05     ` Tero Kristo
2013-12-15  4:23     ` Mike Turquette
2013-12-15  4:23       ` Mike Turquette
2013-12-16  8:13       ` Tero Kristo
2013-12-16  8:13         ` Tero Kristo
2013-12-18  3:07         ` Mike Turquette
2013-12-18  3:07           ` Mike Turquette
2013-11-26  8:05   ` [PATCHv10 13/41] CLK: TI: add omap5 clock init file Tero Kristo
2013-11-26  8:05     ` Tero Kristo
2013-11-26  8:05   ` [PATCHv10 18/41] CLK: TI: add interface clock support for OMAP3 Tero Kristo
2013-11-26  8:05     ` Tero Kristo
2013-11-26  8:06   ` [PATCHv10 22/41] ARM: dts: omap5 clock data Tero Kristo
2013-11-26  8:06     ` Tero Kristo
2013-12-16 10:51     ` Paul Walmsley
2013-12-16 10:51       ` Paul Walmsley
2013-12-16 10:57       ` Tero Kristo
2013-12-16 10:57         ` Tero Kristo
2013-12-17  9:46     ` Paul Walmsley
2013-12-17  9:46       ` Paul Walmsley
2013-11-26  8:06   ` [PATCHv10 25/41] ARM: dts: DRA7: Change apll_pcie_m2_ck to fixed factor clock Tero Kristo
2013-11-26  8:06     ` Tero Kristo
2013-11-26  8:06   ` [PATCHv10 36/41] ARM: OMAP2+: io: use new clock init API Tero Kristo
2013-11-26  8:06     ` Tero Kristo
2013-11-28  0:49   ` [PATCHv10 00/41] ARM: TI SoC clock DT conversion Nishanth Menon
2013-11-28  0:49     ` Nishanth Menon
     [not found]     ` <52969313.6090207-l0cyMroinI0@public.gmane.org>
2013-11-28 18:58       ` Paul Walmsley
2013-11-28 18:58         ` Paul Walmsley
2013-11-29 17:12         ` Tony Lindgren
2013-11-29 17:12           ` Tony Lindgren
2013-11-29 18:59           ` Tero Kristo
2013-11-29 18:59             ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 37/41] ARM: OMAP4: remove old clock data and link in new clock init code Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 38/41] ARM: OMAP: DRA7: Enable clock init Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 39/41] ARM: AM43xx: " Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 40/41] ARM: AM33xx: remove old clock data and link in new clock init code Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26  8:06 ` [PATCHv10 41/41] ARM: OMAP3: use DT clock init if DT data is available Tero Kristo
2013-11-26  8:06   ` Tero Kristo
2013-11-26 17:44   ` Tony Lindgren
2013-11-26 17:44     ` Tony Lindgren
2013-11-27  9:06     ` Tero Kristo
2013-11-27  9:06       ` Tero Kristo
2013-11-26 17:57 ` [PATCHv10 00/41] ARM: TI SoC clock DT conversion Tony Lindgren
2013-11-26 17:57   ` Tony Lindgren
2013-12-15  0:51 ` Mike Turquette
2013-12-15  0:51   ` Mike Turquette
2013-12-15  4:35 ` Mike Turquette
2013-12-15  4:35   ` Mike Turquette
2013-12-16  8:12   ` Tero Kristo
2013-12-16  8:12     ` Tero Kristo
2013-12-20 16:10 ` Felipe Balbi
2013-12-20 16:10   ` Felipe Balbi

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=52B02010.2060307@ti.com \
    --to=t-kristo@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=tony@atomide.com \
    /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.