From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Nicolas Ferre <nicolas.ferre@microchip.com>
Subject: Re: get, prepare, enable a clock not in DT?
Date: Sat, 31 Aug 2024 18:49:59 +0300 [thread overview]
Message-ID: <6cd18742-7ba8-4b0c-aff9-7065bccd4095@tuxon.dev> (raw)
In-Reply-To: <20240828-gainfully-cringing-2f420d8882bd@thorsis.com>
Hi, Alexander,
On 28.08.2024 09:55, Alexander Dahl wrote:
> Hello Claudiu,
>
> Am Fri, Aug 23, 2024 at 05:29:44PM +0300 schrieb claudiu beznea:
>>
>>
>> On 20.08.2024 15:17, Alexander Dahl wrote:
>>> By chance: I don't have a sama7g5 based board at hand for testing.
>>> The datasheet says the same as for sam9x60.
>>> Does the nvmem_microchip_otpc driver actually work without timeout on
>>> sama7g5?
>>
>> Yes! This should be because system bus is clocked from MCK0 (as mentioned
>> in peripheral identifiers table) which is enabled by bootloader.
>
> Not sure I can follow. Citing the SAMA7G5 datasheet section 30.4
> (OTPC Product Dependencies):
>
> "The OTPC is clocked through the Power Management Controller
> (PMC). The user must power on the main RC oscillator and enable
> the peripheral clock of the OTPC prior to reading or writing the
> OTP memory."
I don't see this in [1]. Only:
"The OTPC is clocked through the Power Management Controller (PMC), so the
programmer must first to configure the PMC."
From this I got that it is about the MCK0 listed in table Table 8-11.
Peripheral Identifiers.
[1]
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAMA7G5-Series-Data-Sheet-DS60001765A.pdf
>
> Table from section 8.5 (Peripheral Clocks …) has no check mark at "PMC
> clock control" but indeed lists MCK0 as main system bus clock.
This is what I was taking about.
> If it
> works on SAMA7G5 without explicitly enabling main RC oscillator, then
> either that clock is on accidentally, or the datasheet is wrong in the
> OTPC section.
Might be.
Thank you,
Claudiu Beznea
>
> Personally I find the "clocked through PMC" part in the OTPC
> section suspicious, because in the peripheral identifiers table OTPC
> has no "PMC Clock Control" mark.
>
> Not sure what's the difference between SAM9X60 and SAMA7G5 internally,
> though. From a user's POV it's possible one of them requires the
> main RC osc, and the other does not, but currently you can't tell from
> the datasheets.
>
>> Here is a snapshot of reading the NVMEM on a SAMA7G5 with bootconfig and
>> thermal calibration packets:
>> https://www.linux4sam.org/bin/view/Linux4SAM/ThermalFaq
>
> Greets
> Alex
>
next prev parent reply other threads:[~2024-08-31 15:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 14:34 get, prepare, enable a clock not in DT? Alexander Dahl
2024-08-19 14:33 ` Alexander Dahl
2024-08-20 11:54 ` claudiu beznea
2024-08-20 12:17 ` Alexander Dahl
2024-08-20 12:20 ` Alexander Dahl
2024-08-23 14:29 ` claudiu beznea
2024-08-28 6:55 ` Alexander Dahl
2024-08-31 15:49 ` claudiu beznea [this message]
2024-09-02 8:24 ` Alexander Dahl
2024-09-04 7:33 ` claudiu beznea
2024-09-04 13:26 ` Nicolas Ferre
2024-09-04 14:43 ` Alexander Dahl
2024-09-04 17:56 ` Nicolas Ferre
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=6cd18742-7ba8-4b0c-aff9-7065bccd4095@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.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;
as well as URLs for NNTP newsgroup(s).