From: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>
To: "H. Nikolaus Schaller"
<hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>,
"Ujfalusi, Peter" <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
Cc: "Tony Lindgren" <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
"Benoît Cousson"
<bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Pawel Moll" <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"Ian Campbell"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
"Kumar Gala" <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"Russell King" <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"Laxman Dewangan"
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-omap <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Marek Belisko" <marek-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>,
kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf@public.gmane.org,
"Discussions about the Letux Kernel"
<letux-kernel-S0jZdbWzriLCfDggNXIi3w@public.gmane.org>
Subject: Re: [PATCH v2 4/5] ARM: dts: omap5: describe control for ckobuffer
Date: Wed, 27 Apr 2016 17:10:35 +0300 [thread overview]
Message-ID: <5720C85B.9010701@ti.com> (raw)
In-Reply-To: <A90F1BFC-A834-4EC0-81F9-2C8222AAA010-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
On 27/04/16 16:10, H. Nikolaus Schaller wrote:
>
>> Am 27.04.2016 um 14:31 schrieb Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>:
>>
>> On 27/04/16 09:04, H. Nikolaus Schaller wrote:
>>>
>>>> Am 26.04.2016 um 19:27 schrieb Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>:
>>>>
>>>> Tero,
>>>>
>>>> * H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> [160418 11:23]:
>>>>> OMAP5 has a register to control if the ckobuffer is enabled
>>>>> and defines the polarity. ckobuffer is required to drive a twl6040
>>>>> with the system clock. Hence, add the pinctrl,single to the
>>>>> OMAP5 SoC description so that omap5-board-common can
>>>>> set up the ckobuffer as required.
>>>>
>>>> Is this really a mux or should it be a mux clock?
>>>
>>> It is a pinmux setting for the clock out buffer to choose what signal
>>> (and polarity) is presented on the fref_xtal_clk pad.
>>>
>>> The register is part of the CTRL_MODULE_WKUP.
>>> The clock signal is the xtal master clock of the whole SoC.
>>>
>>> Although there is a bit to choose an alternate clock, there is no
>>> alternate in the OMAP5 silicon.
>>>
>>> Therefore I would say it is about padconf and not clock or clock mux
>>> related.
>>>
>>> It just happens to be a clock signal which can be routed to this
>>> pad.
>>
>> The two could very well be implemented as clock nodes, a mux and a gate. This would describe the hardware functionality better imo, if the assumptions made here are correct. Implementing the control as pinctrl hacks looks rather weird to me.
>
> Why do you consider it a "pinctrl hack"? IMHO it is not a hack, but 100% proper use of pinctrl.
It is just the level of abstraction we are talking about here. If it is
a clock we are controlling, we should rather control it as a clock
(higher level abstraction), not a pin.
>
> The control register for the clock output buffer is part of the CTRL_MODULE_WKUP, which includes the well known pin controls of gpio1_wk but also this ckobuffer control. So it is grouped with these in a single control register block of the SoC. See "19.6.5.1 CTRL_MODULE_WKUP_PAD" of the TRM.
>
> And IMHO, the naming "buffer" indicates that it controls the pad buffer (like all pinmux) and not the clock.
>
> Yes, of course if can be described differently, as you propose. And one might argue that the twl6040 might want to request its master clock input (19.2 MHz) which could turn on the buffer on demand.
From logic point of view, it might be better to describe it as a clock
node, so TWL6040 driver can ask for a clock and ask it be enabled.
>
> The question it raises to me are:
> * isn't it "overkill" to describe a static pinmux register setup (it does not need to be turned on/off during operation) as mux (without function in OMAP5 SoC) + gate?
If the mux doesn't exist in hardware, no need to worry about it then.
> * does it require new driver code to correctly write to the control register?
No, we should just be able to add some beef in the DT to describe the
clock nodes.
> * does it work if the twl6040 is hooked up differently?
Define hooked up differently. Does the setup you propose work in that case?
>
>>
>> I could not find any documentation related to the ckobuffer usage though,
>
> On the EVM it is the FREF_XTAL_OUT (Ball L33) which goes as signal H_SYSCLK through a jumper (R87) and then as signal P_SYSCLK to the MCLK (Ball K7) of the twl6040.
>
> Description of FREF_XTAL_OUT is in section 3.3.1 of the TRM.
I was just looking for ckobuffer but the TRM indeed seems to talk about
this as FREF_XTAL_CLK. It looks like there is probably no mux in the
hardware. The bit of doc I am missing right now is the description of
the SCM register in relation to what hardware actually does. Namely,
some bits in the register are rather a mystery to me.
-Tero
>
>> maybe Peter can provide some insight?
>> I think you spent some considerable time bringing up twl6040 a few years back...
>
> Yes, that would certainly help to decide how to proceed.
>
>>
>
>>
>> -Tero
>
> BR and thanks,
> NIkolaus
>
>>
>>>
>>> BR,
>>> Nikolaus
>>>
>>>>
>>>> Regards,
>>>>
>>>> Tony
>>>>
>>>>> Signed-off-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
>>>>> ---
>>>>> arch/arm/boot/dts/omap5.dtsi | 10 ++++++++++
>>>>> 1 file changed, 10 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
>>>>> index 120b6b8..1d9050f 100644
>>>>> --- a/arch/arm/boot/dts/omap5.dtsi
>>>>> +++ b/arch/arm/boot/dts/omap5.dtsi
>>>>> @@ -277,6 +277,16 @@
>>>>> pinctrl-single,register-width = <16>;
>>>>> pinctrl-single,function-mask = <0x7fff>;
>>>>> };
>>>>> +
>>>>> + omap5_control_ckobuffer: pinmux@cdb4 {
>>>>> + compatible = "ti,omap5-padconf",
>>>>> + "pinctrl-single";
>>>>> + reg = <0xcdb4 4>;
>>>>> + #address-cells = <1>;
>>>>> + #size-cells = <0>;
>>>>> + pinctrl-single,register-width = <32>;
>>>>> + pinctrl-single,function-mask = <0xf0000000>;
>>>>> + };
>>>>> };
>>>>>
>>>>> ocmcram: ocmcram@40300000 {
>>>>> --
>>>>> 2.7.3
>>>>>
>>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Tero Kristo <t-kristo@ti.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>,
"Ujfalusi, Peter" <peter.ujfalusi@ti.com>
Cc: "Tony Lindgren" <tony@atomide.com>,
"Benoît Cousson" <bcousson@baylibre.com>,
"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>,
"Russell King" <linux@arm.linux.org.uk>,
"Laxman Dewangan" <ldewangan@nvidia.com>,
linux-omap <linux-omap@vger.kernel.org>,
devicetree@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
"Marek Belisko" <marek@goldelico.com>,
kernel@pyra-handheld.com,
"Discussions about the Letux Kernel"
<letux-kernel@openphoenux.org>
Subject: Re: [PATCH v2 4/5] ARM: dts: omap5: describe control for ckobuffer
Date: Wed, 27 Apr 2016 17:10:35 +0300 [thread overview]
Message-ID: <5720C85B.9010701@ti.com> (raw)
In-Reply-To: <A90F1BFC-A834-4EC0-81F9-2C8222AAA010@goldelico.com>
On 27/04/16 16:10, H. Nikolaus Schaller wrote:
>
>> Am 27.04.2016 um 14:31 schrieb Tero Kristo <t-kristo@ti.com>:
>>
>> On 27/04/16 09:04, H. Nikolaus Schaller wrote:
>>>
>>>> Am 26.04.2016 um 19:27 schrieb Tony Lindgren <tony@atomide.com>:
>>>>
>>>> Tero,
>>>>
>>>> * H. Nikolaus Schaller <hns@goldelico.com> [160418 11:23]:
>>>>> OMAP5 has a register to control if the ckobuffer is enabled
>>>>> and defines the polarity. ckobuffer is required to drive a twl6040
>>>>> with the system clock. Hence, add the pinctrl,single to the
>>>>> OMAP5 SoC description so that omap5-board-common can
>>>>> set up the ckobuffer as required.
>>>>
>>>> Is this really a mux or should it be a mux clock?
>>>
>>> It is a pinmux setting for the clock out buffer to choose what signal
>>> (and polarity) is presented on the fref_xtal_clk pad.
>>>
>>> The register is part of the CTRL_MODULE_WKUP.
>>> The clock signal is the xtal master clock of the whole SoC.
>>>
>>> Although there is a bit to choose an alternate clock, there is no
>>> alternate in the OMAP5 silicon.
>>>
>>> Therefore I would say it is about padconf and not clock or clock mux
>>> related.
>>>
>>> It just happens to be a clock signal which can be routed to this
>>> pad.
>>
>> The two could very well be implemented as clock nodes, a mux and a gate. This would describe the hardware functionality better imo, if the assumptions made here are correct. Implementing the control as pinctrl hacks looks rather weird to me.
>
> Why do you consider it a "pinctrl hack"? IMHO it is not a hack, but 100% proper use of pinctrl.
It is just the level of abstraction we are talking about here. If it is
a clock we are controlling, we should rather control it as a clock
(higher level abstraction), not a pin.
>
> The control register for the clock output buffer is part of the CTRL_MODULE_WKUP, which includes the well known pin controls of gpio1_wk but also this ckobuffer control. So it is grouped with these in a single control register block of the SoC. See "19.6.5.1 CTRL_MODULE_WKUP_PAD" of the TRM.
>
> And IMHO, the naming "buffer" indicates that it controls the pad buffer (like all pinmux) and not the clock.
>
> Yes, of course if can be described differently, as you propose. And one might argue that the twl6040 might want to request its master clock input (19.2 MHz) which could turn on the buffer on demand.
From logic point of view, it might be better to describe it as a clock
node, so TWL6040 driver can ask for a clock and ask it be enabled.
>
> The question it raises to me are:
> * isn't it "overkill" to describe a static pinmux register setup (it does not need to be turned on/off during operation) as mux (without function in OMAP5 SoC) + gate?
If the mux doesn't exist in hardware, no need to worry about it then.
> * does it require new driver code to correctly write to the control register?
No, we should just be able to add some beef in the DT to describe the
clock nodes.
> * does it work if the twl6040 is hooked up differently?
Define hooked up differently. Does the setup you propose work in that case?
>
>>
>> I could not find any documentation related to the ckobuffer usage though,
>
> On the EVM it is the FREF_XTAL_OUT (Ball L33) which goes as signal H_SYSCLK through a jumper (R87) and then as signal P_SYSCLK to the MCLK (Ball K7) of the twl6040.
>
> Description of FREF_XTAL_OUT is in section 3.3.1 of the TRM.
I was just looking for ckobuffer but the TRM indeed seems to talk about
this as FREF_XTAL_CLK. It looks like there is probably no mux in the
hardware. The bit of doc I am missing right now is the description of
the SCM register in relation to what hardware actually does. Namely,
some bits in the register are rather a mystery to me.
-Tero
>
>> maybe Peter can provide some insight?
>> I think you spent some considerable time bringing up twl6040 a few years back...
>
> Yes, that would certainly help to decide how to proceed.
>
>>
>
>>
>> -Tero
>
> BR and thanks,
> NIkolaus
>
>>
>>>
>>> BR,
>>> Nikolaus
>>>
>>>>
>>>> Regards,
>>>>
>>>> Tony
>>>>
>>>>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>>>> ---
>>>>> arch/arm/boot/dts/omap5.dtsi | 10 ++++++++++
>>>>> 1 file changed, 10 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
>>>>> index 120b6b8..1d9050f 100644
>>>>> --- a/arch/arm/boot/dts/omap5.dtsi
>>>>> +++ b/arch/arm/boot/dts/omap5.dtsi
>>>>> @@ -277,6 +277,16 @@
>>>>> pinctrl-single,register-width = <16>;
>>>>> pinctrl-single,function-mask = <0x7fff>;
>>>>> };
>>>>> +
>>>>> + omap5_control_ckobuffer: pinmux@cdb4 {
>>>>> + compatible = "ti,omap5-padconf",
>>>>> + "pinctrl-single";
>>>>> + reg = <0xcdb4 4>;
>>>>> + #address-cells = <1>;
>>>>> + #size-cells = <0>;
>>>>> + pinctrl-single,register-width = <32>;
>>>>> + pinctrl-single,function-mask = <0xf0000000>;
>>>>> + };
>>>>> };
>>>>>
>>>>> ocmcram: ocmcram@40300000 {
>>>>> --
>>>>> 2.7.3
>>>>>
>>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-04-27 14:10 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 18:20 [PATCH v2 0/5] DT Fixes for OMAP4 and OMAP5 boards H. Nikolaus Schaller
2016-04-18 18:20 ` [PATCH v2 1/5] ARM: dts: twl6030: describe gpadc H. Nikolaus Schaller
[not found] ` <279e70c9badea0356944093f9493e09922c6974b.1461003660.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-04-26 17:26 ` Tony Lindgren
2016-04-26 17:26 ` Tony Lindgren
2016-04-18 18:20 ` [PATCH v2 2/5] ARM: dts: omap5-board-common: describe gpadc for Palmas H. Nikolaus Schaller
2016-04-18 18:20 ` [PATCH v2 3/5] ARM: dts: omap5: fix range of permitted wakeup pinmux registers H. Nikolaus Schaller
2016-04-26 17:23 ` Tony Lindgren
2016-04-18 18:21 ` [PATCH v2 4/5] ARM: dts: omap5: describe control for ckobuffer H. Nikolaus Schaller
[not found] ` <a5fb89737594a656318896a8e43814c21ca992eb.1461003660.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-04-26 17:27 ` Tony Lindgren
2016-04-26 17:27 ` Tony Lindgren
[not found] ` <20160426172710.GI5995-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-04-27 6:04 ` H. Nikolaus Schaller
2016-04-27 6:04 ` H. Nikolaus Schaller
2016-04-27 12:31 ` Tero Kristo
2016-04-27 13:10 ` H. Nikolaus Schaller
[not found] ` <A90F1BFC-A834-4EC0-81F9-2C8222AAA010-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-04-27 14:10 ` Tero Kristo [this message]
2016-04-27 14:10 ` Tero Kristo
2016-04-27 14:23 ` Peter Ujfalusi
2016-04-27 14:35 ` H. Nikolaus Schaller
2016-04-28 8:03 ` Tero Kristo
2016-04-28 9:12 ` H. Nikolaus Schaller
2016-04-28 13:23 ` Tero Kristo
[not found] ` <57220EDD.7080903-l0cyMroinI0@public.gmane.org>
2016-05-09 11:18 ` H. Nikolaus Schaller
2016-05-09 11:18 ` H. Nikolaus Schaller
[not found] ` <F2BCD4BA-E4E4-43F4-B65C-B625ED3B2D13-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-05-09 11:52 ` Tero Kristo
2016-05-09 11:52 ` Tero Kristo
2016-05-09 12:10 ` Peter Ujfalusi
2016-05-09 12:32 ` [Kernel] " Peter Ujfalusi
2016-05-09 12:46 ` Peter Ujfalusi
2016-05-09 13:52 ` Peter Ujfalusi
[not found] ` <3973330a-8a73-89fa-8e09-383407d0eaf9-l0cyMroinI0@public.gmane.org>
2016-05-09 14:09 ` Tero Kristo
2016-05-09 14:09 ` Tero Kristo
[not found] ` <57309A08.10704-l0cyMroinI0@public.gmane.org>
2016-05-09 15:28 ` Peter Ujfalusi
2016-05-09 15:28 ` Peter Ujfalusi
[not found] ` <f66cd508-fe53-af58-bda5-822c8213cf7d-l0cyMroinI0@public.gmane.org>
2016-05-09 19:44 ` Peter Ujfalusi
2016-05-09 19:44 ` Peter Ujfalusi
[not found] ` <573079F5.7050507-l0cyMroinI0@public.gmane.org>
2016-05-10 5:45 ` H. Nikolaus Schaller
2016-05-10 5:45 ` H. Nikolaus Schaller
[not found] ` <cover.1461003660.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-04-18 18:21 ` [PATCH v2 5/5] ARM: dts: omap5-board-common: set up ckobuffer for twl6040 H. Nikolaus Schaller
2016-04-18 18:21 ` H. Nikolaus Schaller
2016-04-26 15:00 ` [PATCH v2 0/5] DT Fixes for OMAP4 and OMAP5 boards H. Nikolaus Schaller
2016-04-26 17:28 ` Tony Lindgren
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=5720C85B.9010701@ti.com \
--to=t-kristo-l0cymroini0@public.gmane.org \
--cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=letux-kernel-S0jZdbWzriLCfDggNXIi3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marek-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=peter.ujfalusi-l0cyMroinI0@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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.