All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: cw00.choi@samsung.com, Chanwoo Choi <cwchoi00@gmail.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Mike Turquette <mturquette@linaro.org>,
	Kukjin Kim <kgene@kernel.org>,
	"pankaj.dubey@samsung.com" <pankaj.dubey@samsung.com>,
	"inki.dae@samsung.com" <inki.dae@samsung.com>,
	"chanho61.park@samsung.com" <chanho61.park@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 01/12] clk: samsung: exynos5433: Add clocks using common clock framework
Date: Thu, 29 Jan 2015 08:38:03 +0900	[thread overview]
Message-ID: <54C972DB.1020808@samsung.com> (raw)
In-Reply-To: <CAGTfZH3NM-Y7Q9ru_iyKXFRO67TAc=SG8urwDyUF_qWWKEGVVg@mail.gmail.com>

Hi Sylwester,

Do you have any comment about Tomasz and me reply?

Thanks,
Chanwoo Choi

On 01/24/2015 07:05 AM, Chanwoo Choi wrote:
> Hi Sylwester,
> 
> On Sat, Jan 24, 2015 at 2:40 AM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> On 23/01/15 08:44, Chanwoo Choi wrote:
>>>>> +   cmu_top: clock-controller@0x10030000 {
>>>>>>> +                compatible = "samsung,exynos5433-cmu-top";
>>>>>>> +                reg = <0x10030000 0x0c04>;
>>>>>>> +                #clock-cells = <1>;
>>>>>>> +        };
>>>>>>> +
>>
>>>>>>> +        cmu_fsys: clock-controller@0x156e0000 {
>>>>>>> +                compatible = "samsung,exynos5433-cmu-fsys";
>>>>>>> +                reg = <0x156e0000 0x0b04>;
>>>>>>> +                #clock-cells = <1>;
>>>>>>> +        };
>>>>>
>>>>> What are the reasons to split the whole clock controller into separate
>>>>> device nodes with different compatible strings like this? I doubt drivers
>>>>> associated with each of those compatible strings could be ever reused on
>>>>> different Exynos SoCs.
>>>
>>> No special reason. I added the clock controller according to clock domain
>>> separately. As I knew, samsung clk drivers use this way to support various
>>> clock domains. For exmaple, drivers/clk/samsung/clk-exynos7.c.
>>
>> I'm afraid exynos7 has that initialization ordering issue, unfortunately I
>> didn't notice it before.
> 
> OK.
> 
>>
>>>>> There are hardware dependencies between these clock domains, which are
>>>>> not currently modelled in DT with your binding.
>>>
>>> Right. current samsung clock drivers cannot show the hierarchy among clock
>>> domains in DT.
>>>
>>>>> IOW, there is currently
>>>>> no way to ensure proper registration order of the CMUs (clock domains).
>>>>> This may be important in some cases.
>>>>>
>>>>> To address this we could either add clocks/clock-names properties in
>>>>> respective CMU device nodes, pointing to any clocks in other CMU(s) or
>>>>> make a single device node for the whole clock controller, with an
>>>>> aggregated reg entry, e.g.
>>>>>
>>>>>  cmu: clock-controller@0x10030000 {
>>>>>    compatible = "samsung,exynos5433-cmu";
>>>>>    reg =   <0x10030000 0x0c04>,
>>>>>            <0x10fc0000 0x0c04>,
>>>>>            <0x105b0000 0x100c>,
>>>>>            <0x14c80000 0x0b08>,
>>>>>            <0x10040000 0x0b20>,
>>>>>            <0x156e0000 0x0b04>,
>>>>>                    ...
>>>>>    reg-names = "top", "cpif", "mif", "peric", "peris", "fsys"...
>>>>>    #clock-cells = <1>;
>>>>>  };
>>>
>>> If you make a single device node to support various clock domain,
>>> How are you indicate the specific clock in some clock domain?
>>
>> This might be an issue, we would need to make all the clk indexes a one
>> contiguous set.
> 
> Exynos5433 has a whole lot of clocks against Exynos4 series clocks.
> So, if make all the clocks in the same set, I wonder making too huge set.
> It may cause the complicated code to find the proper clock or to analyze
> the clock driver.
> 
> I'm wondering if there is really any use of having such
>> information expressed explicitly in DT, or it would just make the DT
>> binding closer resembling the SoC's documentation ?
> 
> If we show the hierarchy or dependency between clock domains,
> I think we should modify "structure samsung_clk_provider"
> to include dependency information between clock domains.
> (It is just my opinion, this opinion could be not proper solution.)
> 
> Because
> when we use the common clk framework without adding
> any dependency information between clock domains, it is well working.
> 
>>
>> Similarly, the clock controller is divided into subdomains in older SoCs,
>> like exynos4, yet we do not create separate device nodes for each domain.
>> Is reference to each individual clock domain required in any other SoC's
>> part in case of exynos5433 ?
> 
> There is a difference between exynos4 cmu and exynos5433 cmu.
> exynos4. As I knew, Exynos4 series have the one more clock domain.
> But, there are not any IPs between clock domains. We can check it as following
> read base address and scope.
> 
> The base address and range of Exynos4412 clock domain :
> - 0x1003_0000 ~ 0x1003_CA08
> - 0x1004_0000 ~ 0x1004_8B0C
> 
> But, the clock domain in base address map of exynos5433 is located
> in non-continuous range. Also, there are un-related IPs to clocks.
> (e.g., mct 101c_0000, gic 1100_1000, serial0 14c1_0000, pinctrl 1058_0000 ...)
> If we make the one dt node for clock domains like exynos4,
> I think it may cause the possible issue that clock drivers may access
> the un-related memory-mapped region.
> 
> The base address and range of Exynos5433 clock domain :
> - top domain    : 0x1003_0000 ~ 0x1003_0c04
> - cpif domain   : 0x10fc_0000 ~ 0x10fc_0x0c04
> - mif domain    : 0x105b_0000 ~ 0x105b_0x100c
> - peric domain : 0x14c8_0000 ~ 0x14c8_0b08
> - peris domain  : 0x1004_0000 ~ 0x1004_0x0b20
> - fsys domain   : 0x156e_0000 ~ 0x156e_0b04
> 
>>
>>> For example,
>>> The serial dt node in exynos7.dtsi. serial_0 dt node use the uart clocks
>>> in 'clock_peric0' clock domain and serial_1 dt node use the uart clocks
>>> in 'clock-peric1' clock domain.
>>>
>>> When using the clock in specific clock domain,
>>> we need to phandle(e.g., clock_peric0, clock_peric1) of clock domain.
>>>
>>>               serial_0: serial@13630000 {
>>>                       compatible = "samsung,exynos4210-uart";
>>>                       reg = <0x13630000 0x100>;
>>>                       interrupts = <0 440 0>;
>>>                       clocks = <&clock_peric0 PCLK_UART0>,
>>>                                <&clock_peric0 SCLK_UART0>;
>>>                       clock-names = "uart", "clk_uart_baud0";
>>>                       status = "disabled";
>>>               };
>>>
>>>               serial_1: serial@14c20000 {
>>>                       compatible = "samsung,exynos4210-uart";
>>>                       reg = <0x14c20000 0x100>;
>>>                       interrupts = <0 456 0>;
>>>                       clocks = <&clock_peric1 PCLK_UART1>,
>>>                                <&clock_peric1 SCLK_UART1>;
>>>                       clock-names = "uart", "clk_uart_baud0";
>>>                       status = "disabled";
>>>               };
>>>
>>>>> Then we could modify samsung_cmu_register_one() function by adding
>>>>> the reg entry index or name argument. What do you think ?
>>>
>>> If there is more reasonable way to show the dependency between clock domains,
>>> I will agree.
>>
>> The other option I mentioned is specifying all parent clocks of a given
>> clock domain in its device node with clocks(/clock-names) properties.
>> But it might be a bit hard to list all the clock domain dependencies
>> this way
> 
> Right, I agree that it is too hard.
> 
> Regards,
> Chanwoo Choi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2015-01-28 23:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21  6:26 [PATCH v3 00/12] clk: samsung: Add the support for exynos5433 clocks Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 01/12] clk: samsung: exynos5433: Add clocks using common clock framework Chanwoo Choi
2015-01-22 16:47   ` Sylwester Nawrocki
2015-01-23  7:44     ` Chanwoo Choi
2015-01-23 17:40       ` Sylwester Nawrocki
2015-01-23 22:05         ` Chanwoo Choi
2015-01-28 23:38           ` Chanwoo Choi [this message]
2015-01-29 12:18             ` Sylwester Nawrocki
2015-01-24 16:11     ` Tomasz Figa
2015-01-23 17:40   ` Sylwester Nawrocki
2015-01-23 20:54     ` Chanwoo Choi
2015-01-29 12:53       ` Sylwester Nawrocki
2015-01-30  0:50         ` Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 02/12] clk: samsung: exynos5433: Add MUX clocks of CMU_TOP domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 03/12] clk: samsung: exynos5433: Add clocks for CMU_PERIC domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 04/12] clk: samsung: exynos5433: Add clocks for CMU_PERIS domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 05/12] clk: samsung: exynos5433: Add clocks for CMU_G2D domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 06/12] clk: samsung: exynos5433: Add clocks for CMU_MIF domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 07/12] clk: samsung: exynos5433: Add clocks for CMU_DISP domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 08/12] clk: samsung: exynos5433: Add clocks for CMU_AUD domain Chanwoo Choi
2015-01-21  6:26 ` [PATCH v3 09/12] clk: samsung: exynos5433: Add clocks for CMU_BUS{0|1|2} domains Chanwoo Choi
2015-01-21  6:51 ` [PATCH 10/12] clk: samsung: exynos5433: Add missing clocks for CMU_FSYS domain Chanwoo Choi
2015-01-21  6:56   ` Chanwoo Choi
2015-01-21  6:51 ` [PATCH 11/12] clk: samsung: exynos5433: Add clocks for CMU_G3D domain Chanwoo Choi
2015-01-21  6:52 ` [PATCH 12/12] clk: samsung: exynos5433: Add clocks for CMU_GSCL domain Chanwoo Choi

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=54C972DB.1020808@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=chanho61.park@samsung.com \
    --cc=cwchoi00@gmail.com \
    --cc=inki.dae@samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=pankaj.dubey@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sw0312.kim@samsung.com \
    --cc=tomasz.figa@gmail.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.