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 0/8] phy: rockchip-usb: correct pll handling and usb-uart
Date: Mon, 09 Nov 2015 22:48:32 +0100	[thread overview]
Message-ID: <4138105.lq8ZJ1GKoN@phil> (raw)
In-Reply-To: <CAD=FV=UytwJ9jthOZZEzw6ZwTFwyuTz5-B7xkuN_OgMbHKbWRA@mail.gmail.com>

Am Montag, 9. November 2015, 13:32:28 schrieb Doug Anderson:
> Heiko,
> 
> On Mon, Nov 9, 2015 at 1:27 PM, Heiko Stuebner <heiko@sntech.de> wrote:
> >> If you happened to be in the mood for cleaning up this PHY and wanted
> >> to fix up one more thing that I noticed...
> >>
> >> ...you could actually increase the range of registers managed by the
> >> PHYs.  For instance, in rk3288, the "host1" port isn't just managed by
> >> 1 register, but by 4 (GRF_UOC2_CON0 - GRF_UOC2_CON3).  I think there
> >> are 5 for the OTG port.
> >>
> >> Obviously not required for this series and there's no (current) reason
> >> to do anything with the rest of those registers, but it might be
> >> interesting for the future...
> >
> > I'm not sure what change you're proposing :-) .
> 
> I was proposing changing the PHY to look like:
> 
> usbphy: phy {
>   compatible = "rockchip,rk3288-usb-phy";
>   rockchip,grf = <&grf>;
>   #address-cells = <1>;
>   #size-cells = <1>;
>   status = "disabled";
> 
>   usbphy0: usb-phy0 {
>     #phy-cells = <0>;
>     reg = <0x320 0x14>;
>     clocks = <&cru SCLK_OTGPHY0>;
>     clock-names = "phyclk";
>   };
>   ...
> };
> 
> ...in other words change the "size-cells" for the main PHY to 1 and
> add a length to the registers.
> 
> 
> > I currently see the reg-property both in the dts and in the code as
> > "offset" - the start-register, because it points to uoc_con0 for each phy.
> > So if needed I was just planning on doing reg+x , as they're coming from
> > the GRF anyway.
> 
> Yeah, that would work.  I was just trying to make it more obvious in
> the DTS that there was actually a range of registers managed here...

ok, that would make sense to make that a bit more visible, and it
would even require functional changes ;-)


> > One interesting point would be to move that under the GRF node, similar
> > to what we're doing with the power-domains under the PMU.
> >
> > In retrospect I think exposing the phys individually was not the best
> > decision - especially as when you dive deeper, they are not that similar
> > anymore and individual functions change. But we'll have to live with that.
> 
> Now it's my turn: I'm not sure I understand...  ;)

as the driver currently stands (without my changes) every phy is seen as
the same function block - it looks like phy0...phy2 have the same
functionality and the driver cannot distinguish between them. The
similarity is true for SIDDQ and some other generic bits (even across
different Rockchip SoCs), but for more special functionality bits move
their location between phys. This is even more visisble if you compare
rk3066/rk3188/rk3288 phys.

What I mean, and would like to have for the new phy-IP for rk3368 etc
would be to have one node, then do the reference via an index like 
<&usbphy 1> and hide the internals in the driver instead of having
that in the dts.

That's why it's nice to be able to reidentify the phy in the driver again
via the register/structs introduced, because now you can again know that
phyX is actually the OTG phy etc.


Heiko

      reply	other threads:[~2015-11-09 21:48 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
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 [this message]

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=4138105.lq8ZJ1GKoN@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).