linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stuebner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/8] phy: rockchip-usb: expose the phy-internal PLLs
Date: Mon, 09 Nov 2015 22:08:35 +0100	[thread overview]
Message-ID: <40224324.AZ7Q21CbSk@phil> (raw)
In-Reply-To: <CAD=FV=VburD9eRtNKL8DZXgspp4-nFVVOz5PnOaT8HvNG5uzFg@mail.gmail.com>

Hi Doug,

Am Montag, 9. November 2015, 12:59:58 schrieb Doug Anderson:
> On Sun, Nov 8, 2015 at 8:04 AM, Heiko Stuebner <heiko@sntech.de> wrote:
> > +static const struct rockchip_usb_phy_pdata rk3066a_pdata = {
> > +       .phys = (struct rockchip_usb_phys[]){
> > +               { .reg = 0x17c, .pll_name = "sclk_otgphy0_480m" },
> > +               { .reg = 0x188, .pll_name = "sclk_otgphy1_480m" },
> > +               { /* sentinel */ }
> > +       },
> > +};
> > +
> > +static const struct rockchip_usb_phy_pdata rk3188_pdata = {
> > +       .phys = (struct rockchip_usb_phys[]){
> > +               { .reg = 0x10c, .pll_name = "sclk_otgphy0_480m" },
> > +               { .reg = 0x11c, .pll_name = "sclk_otgphy1_480m" },
> > +               { /* sentinel */ }
> > +       },
> > +};
> > +
> > +static const struct rockchip_usb_phy_pdata rk3288_pdata = {
> > +       .phys = (struct rockchip_usb_phys[]){
> > +               { .reg = 0x320, .pll_name = "sclk_otgphy0_480m" },
> > +               { .reg = 0x334, .pll_name = "sclk_otgphy1_480m" },
> > +               { .reg = 0x348, .pll_name = "sclk_otgphy2_480m" },
> > +               { /* sentinel */ }
> > +       },
> 
> Slighly annoying to have to add a table for each SoC.  I'd imagine
> this growing quite large.
> 
> Would it be possible to query our parent clock name and then append a
> "_480m" suffix?  Then you can magically get the name you want, right?
> That doesn't preclude you from later overriding this or adding a "dts"
> property for it, but it means no tables for now and (hopefully) for
> the forseeable future.  ...and you get to kill a bunch of code in this
> patch...
> 
> You could fall back to some generic name based on the PHY device tree
> node name if you wanted, or use the ID allocator...
> 
> 
> Otherwise, this all looks good to me.  If you have a good reason why
> using the parent name isn't a good idea, let me know and I can add my
> Reviewed-by on this patch.

Adding a _480m suffix was my initial solution. But the phy-supply clock
is actually optional in the binding, so it may not be specified at all.
Still the code needs this pll to work at all after the change, and
inventing some completely random clock name seemed very strange
(like pll_usbphy_REG or something) - especially as this would never
have worked with the downstream clocks. As it is now, the downstream
clock-tree will work indepent of the supply clock being specified.

Also Rockchip seems to have moved to a different phy-ip, with one
supplying clock, one pll and everything more tightly coupled,
so we're probably getting a new driver for it, instead of additional
entries for the picophy.


Heiko

  reply	other threads:[~2015-11-09 21:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 16:04 [PATCH v2 0/8] phy: rockchip-usb: correct pll handling and usb-uart Heiko Stuebner
2015-11-08 16:04 ` [PATCH v2 1/8] phy: rockchip-usb: fix clock get-put mismatch Heiko Stuebner
2015-11-08 16:04 ` [PATCH v2 2/8] phy: rockchip-usb: introduce a common data-struct for the device Heiko Stuebner
2015-11-08 16:04 ` [PATCH v2 3/8] phy: rockchip-usb: move per-phy init into a separate function Heiko Stuebner
2015-11-08 16:04 ` [PATCH v2 4/8] phy: rockchip-usb: expose the phy-internal PLLs Heiko Stuebner
2015-11-09 20:59   ` Doug Anderson
2015-11-09 21:08     ` Heiko Stuebner [this message]
2015-11-09 21:12       ` Doug Anderson
2015-11-08 16:04 ` [PATCH v2 5/8] clk: rockchip: fix usbphy-related clocks Heiko Stuebner
2015-11-09 21:01   ` Doug Anderson
2015-11-08 16:04 ` [PATCH v2 6/8] ARM: dts: rockchip: add clock-cells for usb phy nodes Heiko Stuebner
2015-11-09 21:01   ` Doug Anderson
2015-11-08 16:04 ` [PATCH v2 7/8] ARM: dts: rockchip: assign usbphy480m_src to the new usbphy pll on veyron Heiko Stuebner
2015-11-09 21:08   ` Doug Anderson
2015-11-09 22:08     ` Heiko Stuebner
2015-11-08 16:04 ` [PATCH v2 8/8] phy: rockchip-usb: add handler for usb-uart functionality Heiko Stuebner
2015-11-09 21:11 ` [PATCH v2 0/8] phy: rockchip-usb: correct pll handling and usb-uart Doug Anderson
2015-11-09 21:27   ` Heiko Stuebner
2015-11-09 21:32     ` Doug Anderson
2015-11-09 21:48       ` Heiko Stuebner

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=40224324.AZ7Q21CbSk@phil \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.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).