devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Rob Herring <robh@kernel.org>
Cc: <devicetree@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	<broonie@kernel.org>, <lgirdwood@gmail.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] bindings: sound: Add documentation for TI j721e EVM (CPB and IVI)
Date: Thu, 11 Jun 2020 11:59:59 +0300	[thread overview]
Message-ID: <c91d150c-ddcc-214b-0e7d-ee2318be5269@ti.com> (raw)
In-Reply-To: <65631db2-5cb2-003a-0526-65d26372616b@ti.com>

Hi Rob,

On 20/05/2020 14.50, Peter Ujfalusi wrote:
>>> +  clocks:
>>> +    items:
>>> +      - description: PLL4 clock
>>> +      - description: PLL15 clock
>>> +      - description: McASP10 auxclk clock
>>> +      - description: PLL4_HSDIV0 parent for McASP10 auxclk (for 48KHz)
>>> +      - description: PLL15_HSDIV0 parent for McASP10 auxclk (for 44.1KHz)
>>> +      - description: AUDIO_REFCLK2 clock
>>> +      - description: PLL4_HSDIV2 parent for AUDIO_REFCLK2 clock (for 48KHz)
>>> +      - description: PLL15_HSDIV2 parent for AUDIO_REFCLK2 clock (for 44.1KHz)
>>
>> What h/w are these connected to?
> 
> These clocks are internal to the SoC with the exception of AUDIO_REFCLK2
> which is routed to SoC pin.
> 
>> You have no control interface here, so how do you have clocks?
> 
> I need to control these clocks, the sound card is the user of these clocks.
> 
>> Defining parent clocks seems wrong, too. This seems to just be a 
>> collection of clocks a driver happens to need. Really, you should be 
>> able query possible parents and select one with the right frequency 
>> multiple.
> 
> The issue in hand is that I need to dynamically switch between certain
> parents of the cpb-mcasp (for McASP) and audio-refclk2 (for the codec)
> based on sampling rate of the stream.
> 
> The McASP auxclk parent can be selected from 7 source and I must use the
> two dedicated ones.
> The REFCLK2 parent can be selected from 30 source.
> 
> It is also a limitation of the system that I can not query directly the
> PLL4/PLL15 frequencies, I can only get the frequency on the HSDIVs, but
> I can not get the divider on them.
> In order to handle the constraints on clocking I need to know the source
> rate so the dividers can be taken into account. The codec is picky when
> it comes to clocking and there is a need to switch between
> 256/512/768xFS based SCKI in order to be able to support sampling rates.
> 
> At the moment I have fixed clocks in place for the pll4/15 with the
> rates they are configured so the dts can switch to a real clock which I
> can use in the future.
> As things are it is unlikely that I will ever going to have access to
> them, but I wanted to avoid in the bindings:
> ti,j721e-pll4-rate = <1179648000>;
> ti,j721e-pll15-rate = <1083801600>;
> 
>>> +
>>> +  clock-names:
>>> +    items:
>>> +      - const: pll4
>>> +      - const: pll15
>>> +      - const: cpb-mcasp
>>> +      - const: cpb-mcasp-48000
>>> +      - const: cpb-mcasp-44100
>>> +      - const: audio-refclk2
>>> +      - const: audio-refclk2-48000
>>> +      - const: audio-refclk2-44100

It should be better to document the refclk2 (and refclk0 for IVI) clocks
based on it's use, not source:
cpb-codec-scki (sourced from audio_refclk2)
cpb-codec-scki-48000/44100

For the IVI binding it is just s/cpb/ivi in the clock-names.

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


  reply	other threads:[~2020-06-11  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 13:16 [PATCH v2 0/3] ASoC: ti: Add support for audio on J721e EVM Peter Ujfalusi
2020-05-12 13:16 ` [PATCH v2 1/3] ASoC: ti: davinci-mcasp: Specify stream_name for playback/capture Peter Ujfalusi
2020-05-12 13:16 ` [PATCH v2 2/3] bindings: sound: Add documentation for TI j721e EVM (CPB and IVI) Peter Ujfalusi
2020-05-19 22:21   ` Rob Herring
2020-05-20 11:50     ` Peter Ujfalusi
2020-06-11  8:59       ` Peter Ujfalusi [this message]
2020-05-19 22:42   ` Rob Herring
2020-05-20  9:59     ` Peter Ujfalusi
2020-05-12 13:16 ` [PATCH v2 3/3] ASoC: ti: Add custom machine driver for " Peter Ujfalusi

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=c91d150c-ddcc-214b-0e7d-ee2318be5269@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).