From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 13/17] aspeed: Add support for Clocks needed by MACs
Date: Mon, 20 Mar 2017 15:48:21 -0400 [thread overview]
Message-ID: <20170320194821.GY19897@bill-the-cat> (raw)
In-Reply-To: <CAFR_W8q_mPwTU9NH1vhf7rQuBQ1JLxdHjSS7me_QWqh1878hTg@mail.gmail.com>
On Mon, Mar 20, 2017 at 10:52:12AM -0700, Maxim Sloyko wrote:
> On Mon, Mar 20, 2017 at 10:30 AM, Tom Rini <trini@konsulko.com> wrote:
>
> > On Mon, Mar 20, 2017 at 10:24:20AM -0700, Maxim Sloyko wrote:
> > > On Sun, Mar 19, 2017 at 9:42 AM, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > > On Thu, Mar 16, 2017 at 02:36:20PM -0700, Maxim Sloyko wrote:
> > > > > Add support for clocks needed by MACs to ast2500 clock driver.
> > > > > The clocks are D2-PLL, which is used by both MACs and PCLK_MAC1 and
> > > > > PCLK_MAC2 for MAC1 and MAC2 respectively.
> > > > >
> > > > > The rate of D2-PLL is hardcoded to 250MHz -- the value used in Aspeed
> > > > > SDK. It is not entirely clear from the datasheet how this clock is
> > used
> > > > > by MACs, so not clear if the rate would ever need to be different.
> > So,
> > > > > for now, hardcoding it is probably safer.
> > > > >
> > > > > The rate of PCLK_MAC{1,2} is chosen based on MAC speed selected
> > through
> > > > > hardware strapping.
> > > > >
> > > > > So, the network driver would only need to enable these clocks, no
> > need
> > > > > to configure the rate.
> > > > >
> > > > > Signed-off-by: Maxim Sloyko <maxims@google.com>
> > > > > ---
> > > > >
> > > > > arch/arm/dts/ast2500-u-boot.dtsi | 8 +
> > > > > arch/arm/include/asm/arch-aspeed/scu_ast2500.h | 62 +++++-
> > > > > drivers/clk/aspeed/clk_ast2500.c | 265
> > > > ++++++++++++++++++++++---
> > > > > include/dt-bindings/clock/ast2500-scu.h | 2 +
> > > > > 4 files changed, 304 insertions(+), 33 deletions(-)
> > > > >
> > > > > diff --git a/arch/arm/dts/ast2500-u-boot.dtsi
> > > > b/arch/arm/dts/ast2500-u-boot.dtsi
> > > > > index faeeec1be4..f826646095 100644
> > > > > --- a/arch/arm/dts/ast2500-u-boot.dtsi
> > > > > +++ b/arch/arm/dts/ast2500-u-boot.dtsi
> > > > > @@ -61,3 +61,11 @@
> > > > > };
> > > > > };
> > > > > };
> > > > > +
> > > > > +&mac0 {
> > > > > + clocks = <&scu PCLK_MAC1>, <&scu PLL_D2PLL>;
> > > > > +};
> > > > > +
> > > > > +&mac1 {
> > > > > + clocks = <&scu PCLK_MAC2>, <&scu PLL_D2PLL>;
> > > > > +};
> > > >
> > > > Why is this here and not in the main dts file? The -u-boot.dtsi is for
> > > > stuff that's not appropriate in the upstream dts file. Thanks!
> > >
> > > There is no clock driver for this part in mainline Linux Kernel yet and I
> > > don't know how it will end up being configured. I suspect that they might
> > > not use the same bindings though.
> > >
> > > Should I put this into board specific dts?
> >
> > So this applies to a lot of parts of the series here. What we don't
> > want to do is have places where the DTS here diverges from the Linux
> > kernel DTS and we don't reconcile them. If the relevant Linux drivers
> > are not in mainline, are they at least in linux-next or otherwise
> > submitted to the relevant subtrees?
> >
>
> No, as far as I know, maybe Rick (cc'ed) knows what is the plan there.
>
> I'm not really working on the linux driver and it's outside of my control.
>
> I can change network driver, so that it does not use this DT configuration
> and either hard code clock config into it, or configure it's clocks in
> board specific file -- would that be more acceptable?
For all the cases where you don't have the DT portion itself upstream
yet, go with platdata instead for now. Unless I'm mis-recalling things
that is.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170320/bad33946/attachment.sig>
next prev parent reply other threads:[~2017-03-20 19:48 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 21:36 [U-Boot] [PATCH 00/17] Expand Aspeed AST2500 Support Maxim Sloyko
2017-03-16 21:36 ` [U-Boot] [PATCH 01/17] aspeed: Update ast2500 Device Tree Maxim Sloyko
2017-03-21 23:21 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 02/17] dm: Simple Watchdog uclass Maxim Sloyko
2017-03-17 8:41 ` Lukasz Majewski
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 03/17] aspeed: Watchdog Timer Driver Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 04/17] aspeed: Make SCU lock/unlock functions part of SCU API Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 05/17] aspeed: Reset Driver Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-24 0:50 ` Maxim Sloyko
2017-03-16 21:36 ` [U-Boot] [PATCH 06/17] aspeed: Device Tree configuration for " Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 07/17] aspeed: Refactor AST2500 RAM Driver and Sysreset Driver Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 08/17] aspeed: AST2500 Pinctrl Driver Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 09/17] aspeed: Enable Pinctrl Driver in AST2500 EVB Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 10/17] aspeed: Add P-Bus clock in ast2500 clock driver Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 11/17] aspeed: Add I2C Driver Maxim Sloyko
2017-03-20 6:35 ` Heiko Schocher
2017-03-22 13:05 ` Simon Glass
2017-03-27 10:40 ` Benjamin Herrenschmidt
2017-03-27 10:41 ` Benjamin Herrenschmidt
2017-03-16 21:36 ` [U-Boot] [PATCH 12/17] aspeed: Enable I2C in EVB defconfig Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 13/17] aspeed: Add support for Clocks needed by MACs Maxim Sloyko
2017-03-19 16:42 ` Tom Rini
2017-03-20 17:24 ` Maxim Sloyko
2017-03-20 17:30 ` Tom Rini
2017-03-20 17:52 ` Maxim Sloyko
2017-03-20 19:48 ` Tom Rini [this message]
2017-03-20 22:36 ` Maxim Sloyko
2017-03-20 20:43 ` Rick Altherr
2017-03-21 1:18 ` Joel Stanley
2017-03-16 21:36 ` [U-Boot] [PATCH 14/17] aspeed: Refactor SCU to use consistent mask & shift Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
2017-03-16 21:36 ` [U-Boot] [PATCH 15/17] aspeed: Cleanup ast2500-u-boot.dtsi Device Tree Maxim Sloyko
2017-03-16 21:36 ` [U-Boot] [PATCH 16/17] aspeed: Add AST2500/AST2400 compatible NIC Driver Maxim Sloyko
2017-03-21 19:32 ` Joe Hershberger
2017-03-21 23:44 ` Maxim Sloyko
2017-03-22 13:06 ` Simon Glass
2017-03-24 0:42 ` Maxim Sloyko
2017-03-16 21:36 ` [U-Boot] [PATCH 17/17] aspeed: Network Driver configuration for EVB Maxim Sloyko
2017-03-21 23:22 ` Simon Glass
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=20170320194821.GY19897@bill-the-cat \
--to=trini@konsulko.com \
--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