All of lore.kernel.org
 help / color / mirror / Atom feed
* XCLKOUT in exynos5250 clock driver
@ 2013-07-25 14:51 ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2013-07-25 14:51 UTC (permalink / raw)
  To: Tushar Behera, Thomas Abraham
  Cc: Kukjin Kim, linux-samsung-soc, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

I appear to be missing something in the clock driver for the exynos5250.
I'm looking at the Arndale schematic and I see that the audio master
clock is connected to XCLKOUT on the SoC.  However I can't see any
reference to XCLKOUT or anything similar in the clock driver or any of
the DTS files - where is this clock exposed by the clock driver?

Unfortunately I haven't been able to get access to the datasheet for the
part so I can't check this myself.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* XCLKOUT in exynos5250 clock driver
@ 2013-07-25 14:51 ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2013-07-25 14:51 UTC (permalink / raw)
  To: linux-arm-kernel

I appear to be missing something in the clock driver for the exynos5250.
I'm looking at the Arndale schematic and I see that the audio master
clock is connected to XCLKOUT on the SoC.  However I can't see any
reference to XCLKOUT or anything similar in the clock driver or any of
the DTS files - where is this clock exposed by the clock driver?

Unfortunately I haven't been able to get access to the datasheet for the
part so I can't check this myself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130725/040fd358/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: XCLKOUT in exynos5250 clock driver
  2013-07-25 14:51 ` Mark Brown
@ 2013-07-26  9:56   ` Tushar Behera
  -1 siblings, 0 replies; 10+ messages in thread
From: Tushar Behera @ 2013-07-26  9:56 UTC (permalink / raw)
  To: Mark Brown
  Cc: Thomas Abraham, Kukjin Kim, linux-samsung-soc, linux-arm-kernel

On 07/25/2013 08:21 PM, Mark Brown wrote:
> I appear to be missing something in the clock driver for the exynos5250.
> I'm looking at the Arndale schematic and I see that the audio master
> clock is connected to XCLKOUT on the SoC.  However I can't see any
> reference to XCLKOUT or anything similar in the clock driver or any of
> the DTS files - where is this clock exposed by the clock driver?
> 
> Unfortunately I haven't been able to get access to the datasheet for the
> part so I can't check this myself.
> 

Information as per Exynos5250 user manual:
"XCLKOUT is an output pin for debugging clocks. Exynos5250 has a CLKOUT
logic which can select one of the clocks (within its clock domains) and
output that through XCLKOUT pin."

Not sure if XCLKOUT on Arndale schematics means the same.

-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 10+ messages in thread

* XCLKOUT in exynos5250 clock driver
@ 2013-07-26  9:56   ` Tushar Behera
  0 siblings, 0 replies; 10+ messages in thread
From: Tushar Behera @ 2013-07-26  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/25/2013 08:21 PM, Mark Brown wrote:
> I appear to be missing something in the clock driver for the exynos5250.
> I'm looking at the Arndale schematic and I see that the audio master
> clock is connected to XCLKOUT on the SoC.  However I can't see any
> reference to XCLKOUT or anything similar in the clock driver or any of
> the DTS files - where is this clock exposed by the clock driver?
> 
> Unfortunately I haven't been able to get access to the datasheet for the
> part so I can't check this myself.
> 

Information as per Exynos5250 user manual:
"XCLKOUT is an output pin for debugging clocks. Exynos5250 has a CLKOUT
logic which can select one of the clocks (within its clock domains) and
output that through XCLKOUT pin."

Not sure if XCLKOUT on Arndale schematics means the same.

-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: XCLKOUT in exynos5250 clock driver
  2013-07-26  9:56   ` Tushar Behera
@ 2013-07-26 11:39     ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2013-07-26 11:39 UTC (permalink / raw)
  To: Tushar Behera
  Cc: Thomas Abraham, Kukjin Kim, linux-samsung-soc, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

On Fri, Jul 26, 2013 at 03:26:06PM +0530, Tushar Behera wrote:

> Information as per Exynos5250 user manual:
> "XCLKOUT is an output pin for debugging clocks. Exynos5250 has a CLKOUT
> logic which can select one of the clocks (within its clock domains) and
> output that through XCLKOUT pin."

Yeah, I know what XCLKOUT is but to implement this in the driver and DT
I'd need to know about the register or registers that are used to
configure the mux.

> Not sure if XCLKOUT on Arndale schematics means the same.

I'd be astonished if it meant anything else, it's fairly clearly
labelled as that on the schematics and this is a *very* common pattern
in system designs using Samsung SoCs.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* XCLKOUT in exynos5250 clock driver
@ 2013-07-26 11:39     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2013-07-26 11:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 26, 2013 at 03:26:06PM +0530, Tushar Behera wrote:

> Information as per Exynos5250 user manual:
> "XCLKOUT is an output pin for debugging clocks. Exynos5250 has a CLKOUT
> logic which can select one of the clocks (within its clock domains) and
> output that through XCLKOUT pin."

Yeah, I know what XCLKOUT is but to implement this in the driver and DT
I'd need to know about the register or registers that are used to
configure the mux.

> Not sure if XCLKOUT on Arndale schematics means the same.

I'd be astonished if it meant anything else, it's fairly clearly
labelled as that on the schematics and this is a *very* common pattern
in system designs using Samsung SoCs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130726/4242f00d/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: XCLKOUT in exynos5250 clock driver
  2013-07-26  9:56   ` Tushar Behera
@ 2013-07-26 12:19     ` Sylwester Nawrocki
  -1 siblings, 0 replies; 10+ messages in thread
From: Sylwester Nawrocki @ 2013-07-26 12:19 UTC (permalink / raw)
  To: Tushar Behera, Mark Brown
  Cc: Thomas Abraham, Kukjin Kim, linux-samsung-soc, linux-arm-kernel,
	Tomasz Figa, Padmavathi Venna

On 07/26/2013 11:56 AM, Tushar Behera wrote:
> On 07/25/2013 08:21 PM, Mark Brown wrote:
>> I appear to be missing something in the clock driver for the exynos5250.
>> I'm looking at the Arndale schematic and I see that the audio master
>> clock is connected to XCLKOUT on the SoC.  However I can't see any
>> reference to XCLKOUT or anything similar in the clock driver or any of
>> the DTS files - where is this clock exposed by the clock driver?

This is something that's not yet supported in the mainline kernels I'm
afraid.

>> Unfortunately I haven't been able to get access to the datasheet for the
>> part so I can't check this myself.
>>
>
> Information as per Exynos5250 user manual:
> "XCLKOUT is an output pin for debugging clocks. Exynos5250 has a CLKOUT
> logic which can select one of the clocks (within its clock domains) and
> output that through XCLKOUT pin."
>
> Not sure if XCLKOUT on Arndale schematics means the same.

I suspect that the same, you can easily verify that by checking what ball
identifier corresponds to XCLKOUT pin and how the routing looks like on
the schematics.

We have a bit hackish patch that adds support for the CLKOUT at the
Exynos4 clocks driver to enable the audio codec. An issue here is that the
CLKOUT mux and divider control bitfield is in the PMU registers (as opposed
to CMU where the clock  control registers normally are) and additionally
single register contains the clock mux/divider bitfield as well as couple
other unrelated control bits. Depending if those other bits are considered
really important or not it it might another reason to expose (part of ?)
PMU registers through syscon-like interface. There are registers in PMU
that multiple drivers would be interested in, so instead of all of them to
independently memory map and mess with single registers, probably a regmap
interface could be used. Not sure if this solves the problem well, since
each driver would need to have coded SoC specific register offsets.

It can be seen in the Galaxy S3 kernel code how the Exynos5 CLKOUT handling
might look like. See enum xclkout_select [1], exynos5_pmu_xclkout_set [2].
It would be good someone who has access to the datasheet come up with at
with some patch so the audio works are not blocked. I'm not working right
now on Exynos5 :P.

[1] 
thttps://github.com/sgs3/GT-I9300_Kernel/blob/master/arch/arm/mach-exynos/include/mach/pmu.h
[2] 
https://github.com/sgs3/GT-I9300_Kernel/blob/master/arch/arm/mach-exynos/pmu-exynos5.c

--
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 10+ messages in thread

* XCLKOUT in exynos5250 clock driver
@ 2013-07-26 12:19     ` Sylwester Nawrocki
  0 siblings, 0 replies; 10+ messages in thread
From: Sylwester Nawrocki @ 2013-07-26 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/26/2013 11:56 AM, Tushar Behera wrote:
> On 07/25/2013 08:21 PM, Mark Brown wrote:
>> I appear to be missing something in the clock driver for the exynos5250.
>> I'm looking at the Arndale schematic and I see that the audio master
>> clock is connected to XCLKOUT on the SoC.  However I can't see any
>> reference to XCLKOUT or anything similar in the clock driver or any of
>> the DTS files - where is this clock exposed by the clock driver?

This is something that's not yet supported in the mainline kernels I'm
afraid.

>> Unfortunately I haven't been able to get access to the datasheet for the
>> part so I can't check this myself.
>>
>
> Information as per Exynos5250 user manual:
> "XCLKOUT is an output pin for debugging clocks. Exynos5250 has a CLKOUT
> logic which can select one of the clocks (within its clock domains) and
> output that through XCLKOUT pin."
>
> Not sure if XCLKOUT on Arndale schematics means the same.

I suspect that the same, you can easily verify that by checking what ball
identifier corresponds to XCLKOUT pin and how the routing looks like on
the schematics.

We have a bit hackish patch that adds support for the CLKOUT at the
Exynos4 clocks driver to enable the audio codec. An issue here is that the
CLKOUT mux and divider control bitfield is in the PMU registers (as opposed
to CMU where the clock  control registers normally are) and additionally
single register contains the clock mux/divider bitfield as well as couple
other unrelated control bits. Depending if those other bits are considered
really important or not it it might another reason to expose (part of ?)
PMU registers through syscon-like interface. There are registers in PMU
that multiple drivers would be interested in, so instead of all of them to
independently memory map and mess with single registers, probably a regmap
interface could be used. Not sure if this solves the problem well, since
each driver would need to have coded SoC specific register offsets.

It can be seen in the Galaxy S3 kernel code how the Exynos5 CLKOUT handling
might look like. See enum xclkout_select [1], exynos5_pmu_xclkout_set [2].
It would be good someone who has access to the datasheet come up with at
with some patch so the audio works are not blocked. I'm not working right
now on Exynos5 :P.

[1] 
thttps://github.com/sgs3/GT-I9300_Kernel/blob/master/arch/arm/mach-exynos/include/mach/pmu.h
[2] 
https://github.com/sgs3/GT-I9300_Kernel/blob/master/arch/arm/mach-exynos/pmu-exynos5.c

--
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: XCLKOUT in exynos5250 clock driver
  2013-07-26 12:19     ` Sylwester Nawrocki
@ 2013-07-26 14:27       ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2013-07-26 14:27 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Tushar Behera, Thomas Abraham, Kukjin Kim, linux-samsung-soc,
	linux-arm-kernel, Tomasz Figa, Padmavathi Venna

[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]

On Fri, Jul 26, 2013 at 02:19:39PM +0200, Sylwester Nawrocki wrote:
> On 07/26/2013 11:56 AM, Tushar Behera wrote:
> >On 07/25/2013 08:21 PM, Mark Brown wrote:

> >>I appear to be missing something in the clock driver for the exynos5250.
> >>I'm looking at the Arndale schematic and I see that the audio master

> This is something that's not yet supported in the mainline kernels I'm
> afraid.

I was trying to be polite :)

> I suspect that the same, you can easily verify that by checking what ball
> identifier corresponds to XCLKOUT pin and how the routing looks like on
> the schematics.

Right, for what it's worth it's ball AJ27 marked as XCLKOUT/ETC6_1

> We have a bit hackish patch that adds support for the CLKOUT at the
> Exynos4 clocks driver to enable the audio codec. An issue here is that the
> CLKOUT mux and divider control bitfield is in the PMU registers (as opposed
> to CMU where the clock  control registers normally are) and additionally
> single register contains the clock mux/divider bitfield as well as couple
> other unrelated control bits. Depending if those other bits are considered
> really important or not it it might another reason to expose (part of ?)
> PMU registers through syscon-like interface. There are registers in PMU

Sounds like it'd be a good idea to do that if only for the purpose of
describing things clearly in the DT.

> It can be seen in the Galaxy S3 kernel code how the Exynos5 CLKOUT handling
> might look like. See enum xclkout_select [1], exynos5_pmu_xclkout_set [2].
> It would be good someone who has access to the datasheet come up with at
> with some patch so the audio works are not blocked. I'm not working right
> now on Exynos5 :P.

I suspect I can reverse engineer something from this, though it would be
much easier for someone with the datasheet.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* XCLKOUT in exynos5250 clock driver
@ 2013-07-26 14:27       ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2013-07-26 14:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 26, 2013 at 02:19:39PM +0200, Sylwester Nawrocki wrote:
> On 07/26/2013 11:56 AM, Tushar Behera wrote:
> >On 07/25/2013 08:21 PM, Mark Brown wrote:

> >>I appear to be missing something in the clock driver for the exynos5250.
> >>I'm looking at the Arndale schematic and I see that the audio master

> This is something that's not yet supported in the mainline kernels I'm
> afraid.

I was trying to be polite :)

> I suspect that the same, you can easily verify that by checking what ball
> identifier corresponds to XCLKOUT pin and how the routing looks like on
> the schematics.

Right, for what it's worth it's ball AJ27 marked as XCLKOUT/ETC6_1

> We have a bit hackish patch that adds support for the CLKOUT at the
> Exynos4 clocks driver to enable the audio codec. An issue here is that the
> CLKOUT mux and divider control bitfield is in the PMU registers (as opposed
> to CMU where the clock  control registers normally are) and additionally
> single register contains the clock mux/divider bitfield as well as couple
> other unrelated control bits. Depending if those other bits are considered
> really important or not it it might another reason to expose (part of ?)
> PMU registers through syscon-like interface. There are registers in PMU

Sounds like it'd be a good idea to do that if only for the purpose of
describing things clearly in the DT.

> It can be seen in the Galaxy S3 kernel code how the Exynos5 CLKOUT handling
> might look like. See enum xclkout_select [1], exynos5_pmu_xclkout_set [2].
> It would be good someone who has access to the datasheet come up with at
> with some patch so the audio works are not blocked. I'm not working right
> now on Exynos5 :P.

I suspect I can reverse engineer something from this, though it would be
much easier for someone with the datasheet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130726/e93d2ce4/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-26 14:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-25 14:51 XCLKOUT in exynos5250 clock driver Mark Brown
2013-07-25 14:51 ` Mark Brown
2013-07-26  9:56 ` Tushar Behera
2013-07-26  9:56   ` Tushar Behera
2013-07-26 11:39   ` Mark Brown
2013-07-26 11:39     ` Mark Brown
2013-07-26 12:19   ` Sylwester Nawrocki
2013-07-26 12:19     ` Sylwester Nawrocki
2013-07-26 14:27     ` Mark Brown
2013-07-26 14:27       ` Mark Brown

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.