From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] mips: ath79: Add support for ungating USB and ethernet on qca953x
Date: Tue, 31 May 2016 13:38:30 +0200 [thread overview]
Message-ID: <574D77B6.3030002@denx.de> (raw)
In-Reply-To: <CAMTkhzPken7mo5gctso_pKUOsHK4v+g8ABvZqKrgh0Z9wuXkrg@mail.gmail.com>
On 05/31/2016 10:50 AM, Piotr Dymacz wrote:
> Hello,
>
> 2016-05-31 2:51 GMT+02:00 Marek Vasut <marex@denx.de>:
>> On 05/31/2016 02:35 AM, Wills Wang wrote:
>
> [snip]
>
>>>>> +static int usb_reset_qca953x(void __iomem *reset_regs)
>>>>> +{
>>>>> + void __iomem *pregs = map_physmem(AR71XX_PLL_BASE, AR71XX_PLL_SIZE,
>>>>> + MAP_NOCACHE);
>>>>> +
>>>>> + clrsetbits_be32(pregs + QCA953X_PLL_SWITCH_CLOCK_CONTROL_REG,
>>>>> + 0xf00, 0x200);
>>
>> Do you know what these magic numbers mean ?
>
> I can help here.
>
> This register is common for (almost) all modern QC/A WiSOCs, with
> similar structure, at least for AR934x, QCA953x, QCA955x and QCA956x
> (please take a look at [1]).
> I have seen it (SDK, datasheets) under two different names:
> SWITCH_CLOCK_SPARE and SWITCH_CLOCK_CONTROL, on different addresses
> (offset +/- 1), depending on the SOC.
>
> The bit field [8:11] is "USB_REFCLK_FREQ_SEL" and it's the same for
> all above SOCs. Value (dec) 2 is for 25 MHz, value 5 for 40 MHz.
>
> I'm going to provide some patches for ath79 in future, which will make
> code more universal for all QC/A WiSOCs.
Oh, very cool, thanks!
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-05-31 11:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1464620095-4333-1-git-send-email-wills.wang@live.com>
2016-05-30 14:54 ` [U-Boot] [PATCH 2/6] mips: ath79: ap121: Enable ethernet Wills Wang
2016-05-31 9:39 ` Daniel Schwierzeck
2016-05-30 14:54 ` [U-Boot] [PATCH 3/6] mips: ath79: Use 8MB flash profile for mtd partition by default Wills Wang
2016-05-31 9:40 ` Daniel Schwierzeck
2016-05-30 14:54 ` [U-Boot] [PATCH 4/6] mips: ath79: Add support for ungating USB and ethernet on qca953x Wills Wang
2016-05-30 15:18 ` Marek Vasut
2016-05-31 0:35 ` Wills Wang
2016-05-31 0:51 ` Marek Vasut
2016-05-31 8:50 ` Piotr Dymacz
2016-05-31 11:38 ` Marek Vasut [this message]
2016-05-31 14:24 ` Wills Wang
2016-05-31 9:40 ` Daniel Schwierzeck
2016-05-30 14:54 ` [U-Boot] [PATCH 5/6] mips: ath79: Use AR933X_PLL_SWITCH_CLOCK_CONTROL_REG macro define Wills Wang
2016-05-31 9:40 ` Daniel Schwierzeck
2016-05-30 14:54 ` [U-Boot] [PATCH 6/6] mips: ath79: ap143: Reset ethernet on boot Wills Wang
2016-05-31 9:41 ` Daniel Schwierzeck
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=574D77B6.3030002@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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