From: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Nuno Sá" <nuno.sa@analog.com>,
"Shenghao Ding" <shenghao-ding@ti.com>,
"Kevin Lu" <kevin-lu@ti.com>, "Baojun Xu" <baojun.xu@ti.com>,
"Sen Wang" <sen@ti.com>, "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Srinivas Kandagatla" <srini@kernel.org>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v1 3/5] ASoC: codec: pcm1681: Enable system clock before regmap access
Date: Wed, 9 Sep 2026 18:06:41 +0530 [thread overview]
Message-ID: <adcac1a5-6d34-4978-8fce-b9b5a0361b76@oss.qualcomm.com> (raw)
In-Reply-To: <de0a0b99-9213-442c-ac5b-944a0f6bd432@sirena.org.uk>
On 9/8/2026 10:56 PM, Mark Brown wrote:
> On Mon, Sep 07, 2026 at 11:39:44PM +0530, Mohammad Rafi Shaik wrote:
>> The PCM1681 DAC requires the SCK (system clock) input to be
>> present for proper device operation. On platforms where SCK
>> is provided by a controllable clock source, register accesses
>> over I2C may fail when the clock is not enabled.
>
>> @@ -311,6 +313,22 @@ static int pcm1681_i2c_probe(struct i2c_client *client)
>> if (!priv)
>> return -ENOMEM;
>>
>> + priv->sclk = devm_clk_get_optional(&client->dev, "sck");
>> + if (IS_ERR(priv->sclk))
>> + return dev_err_probe(&client->dev, PTR_ERR(priv->sclk),
>> + "Failed to get sck\n");
>> +
>> + ret = clk_prepare_enable(priv->sclk);
>> + if (ret)
>> + return dev_err_probe(&client->dev, ret,
>> + "Failed to enable sck\n");
>
> It looks like the device needs a delay after the clock is enabled before
> the register interface is available (see 8.3.2 of
> https://www.ti.com/lit/ds/symlink/pcm1681-q1.pdf).
Thanks Mark, for pointing this out.
Yes, based on the datasheet, I can see that the device requires a
Power-On Reset period of 65,536 system clock cycles before the register
interface becomes available.
Although audio functionality working fine without this delay in my
testing, I seem to have overlooked this requirement.
I will verify the behavior and update the driver to include the proper
delay configuration as specified in the datasheet.
Best regard's
Rafi.
next prev parent reply other threads:[~2026-09-09 12:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 18:09 [PATCH 0/5] ASoC: qcom: Add Nord Ride audio support Mohammad Rafi Shaik
2026-09-07 18:09 ` [PATCH v1 1/5] ASoC: codec: adau1977-i2c: Add OF device match table Mohammad Rafi Shaik
2026-09-09 14:44 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 2/5] ASoC: dt-bindings: ti,pcm1681: Document the optional SCK clock Mohammad Rafi Shaik
2026-09-09 14:50 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 3/5] ASoC: codec: pcm1681: Enable system clock before regmap access Mohammad Rafi Shaik
2026-09-08 17:26 ` Mark Brown
2026-09-09 12:36 ` Mohammad Rafi Shaik [this message]
2026-09-09 12:39 ` Mark Brown
2026-09-09 12:45 ` Mohammad Rafi Shaik
2026-09-09 14:59 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 4/5] ASoC: dt-bindings: qcom,sm8250: Add Nord Ride sound card Mohammad Rafi Shaik
2026-09-09 14:54 ` Shawn Guo
2026-09-15 16:01 ` Mohammad Rafi Shaik
2026-09-07 18:09 ` [PATCH v1 5/5] ASoC: qcom: sc8280xp: Add Nord Ride sound card support Mohammad Rafi Shaik
2026-09-09 15:37 ` Shawn Guo
2026-09-15 16:32 ` Mohammad Rafi Shaik
2026-09-09 14:46 ` [PATCH 0/5] ASoC: qcom: Add Nord Ride audio support Shawn Guo
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=adcac1a5-6d34-4978-8fce-b9b5a0361b76@oss.qualcomm.com \
--to=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kevin-lu@ti.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=sen@ti.com \
--cc=shenghao-ding@ti.com \
--cc=srini@kernel.org \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®