Skip to contentSkip to conversation

XCLKOUT in exynos5250 clock driver

DISCUSSION Mark Brown 3 participants 5 messages Jul 25, 2013 – Jul 26, 2013 Arm Samsung Exynos

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

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>

#1 lore raw
Quoted 9 lines · Mark Brown

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.

Signature · 1 line
Tushar Behera
author
#2 lore raw
Quoted 4 lines · Tushar Behera

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.

Quoted 1 line

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>

#3 lore raw
In reply to Tushar Behera
Quoted 6 lines · Tushar Behera
Quoted 5 lines · Mark Brown

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.

Quoted 10 lines
Quoted 3 lines

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

author
#4 lore raw
Quoted 8 lines · Sylwester Nawrocki
Quoted 4 lines · Tushar Behera
Quoted 2 lines · Mark Brown

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 :)

Quoted 3 lines

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

Quoted 8 lines

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.

Quoted 5 lines

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>