All of lore.kernel.org
 help / color / mirror / Atom feed
From: Enric Balletbo Serra <eballetbo@gmail.com>
To: Emil Renner Berthing <emil.renner.berthing@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Brian Norris <briannorris@chromium.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Doug Anderson <dianders@chromium.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Chris Zhong <zyw@rock-chips.com>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	William wu <wulf@rock-chips.com>,
	kernel@collabora.com,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	huang lin <hl@rock-chips.com>
Subject: Re: [PATCH 2/3] Documentation: bindings: add usb3-host-disable and usb3-host-port for Rockchip USB Type-C PHY
Date: Tue, 13 Feb 2018 23:08:26 +0100	[thread overview]
Message-ID: <CAFqH_50=d3Z-JWiFnxnCm0pF_bpyWG9-9M1mk5nQUYUwZh-Yyw@mail.gmail.com> (raw)
In-Reply-To: <CANBLGcykb99SntD=C67_-iUoZZLeFfMw8jZWdF9fmFss3u24iA@mail.gmail.com>

Hi,

2018-02-13 10:18 GMT+01:00 Emil Renner Berthing
<emil.renner.berthing@gmail.com>:
> On 12 February 2018 at 23:29, Rob Herring <robh@kernel.org> wrote:
>> On Mon, Feb 12, 2018 at 3:26 PM, Brian Norris <briannorris@chromium.org> wrote:
>>> Hi,
>>>
>>> On Mon, Feb 12, 2018 at 10:43:41AM -0600, Rob Herring wrote:
>>>> On Thu, Feb 8, 2018 at 3:23 PM, Enric Balletbo Serra
>>>> <eballetbo@gmail.com> wrote:
>>>> > 2018-02-08 18:52 GMT+01:00 Rob Herring <robh@kernel.org>:
>>>> >> On Thu, Feb 8, 2018 at 9:20 AM, Enric Balletbo i Serra
>>>> >> <enric.balletbo@collabora.com> wrote:
>>>> >>> --- a/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
>>>> >>> +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
>>>> >>> @@ -36,6 +36,12 @@ offset, enable bit, write mask bit.
>>>> >>>   - rockchip,uphy-dp-sel : the register of type-c phy enable DP function
>>>> >>>     for type-c phy0, it must be <0x6268 19 19>;
>>>> >>>     for type-c phy1, it must be <0x6268 3 19>;
>>>> >>> + - rockchip,usb3-host-disable : the register of type-c phy disable usb3 host
>>>> >>> +   for type-c phy0, it must be <0x2434 0 16>;
>>>> >>> +   for type-c phy1, it must be <0x2444 0 16>;
>>>> >>> + - rockchip,usb3-host-port : the register of type-c phy usb3 port number
>>>> >>> +   for type-c phy0, it must be <0x2434 12 28>;
>>>> >>> +   for type-c phy1, it must be <0x2444 12 28>;
>>>> >>
>>>> >> When does this list stop? Adding properties for various register
>>>> >> fields doesn't scale. This information should be in the driver and
>>>> >> based on the compatible string if necessary.
>>>> >>
>>>> >
>>>> > I see, seams reasonable to me, is this applicable to the new ones only
>>>> > or I should get rid of all the proprieties like this from the DT
>>>> > (including the old ones)?
>>>>
>>>> We're already kind of stuck with the existing ones. So it depends if
>>>> people want to phase them out or not.
>>>
>>> FWIW, any Chrome{device} using these sort of bindings is perfectly
>>> capable of handling changed bindings (we ship DTBs with the kernel). But
>>> that's not typically how mainline covers binding deprecation.
>>
>> If it's CrOS only that's using these, then it's really up to you all.
>> I guess it depends if many folks are trying to run mainline on CrOS
>> devices and don't necessarily keep things in sync.
>
> For what it's worth I run mainline on my Chromebook Plus (rk3399-gru-kevin),
> but in order to have a somewhat working setup you need to run
> 4.16-rc1 + various patches from the rockchip mailing list which means
> you have to keep up with the latest mainline (both kernel and devicetree)
> anyway. So I'm all in favour of cleaning up the devicetree.
>
>>> If we're going to start recommending not putting these offsets in the
>>> DT, I'd vote for deprecating them, for consistency. (Otherwise, we'll
>>> keep running into this same question.) We only documented the RK3399
>>> ("rockchip,rk3399-typec-phy") binding, so all users should have the same
>>> offsets. I dunno if/how we pick a time for eventually removing the
>>> bindings entirely.
>>
>> Yes, makes sense.
>>

One question, maybe silly question, that comes to my mind is, as the
offsets for same register are different between type-c phy0 and type-c
phy1 and there is two instances, the driver needs to know which type-c
phyter is and I'm not sure the proper way to do it. It is just check
the type-c phyter base address? So if base address is 0xff7c0000
(phy0) we know that we should apply the offsets for phy0 and if base
address is 0xff800000 we know that we should apply the offsets for
phy1?

Best regards,
 Enric

>> Rob
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Enric Balletbo Serra <eballetbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Emil Renner Berthing
	<emil.renner.berthing-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Brian Norris
	<briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
	Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	Enric Balletbo i Serra
	<enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	William wu <wulf-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org,
	linux-arm-kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	huang lin <hl-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Subject: Re: [PATCH 2/3] Documentation: bindings: add usb3-host-disable and usb3-host-port for Rockchip USB Type-C PHY
Date: Tue, 13 Feb 2018 23:08:26 +0100	[thread overview]
Message-ID: <CAFqH_50=d3Z-JWiFnxnCm0pF_bpyWG9-9M1mk5nQUYUwZh-Yyw@mail.gmail.com> (raw)
In-Reply-To: <CANBLGcykb99SntD=C67_-iUoZZLeFfMw8jZWdF9fmFss3u24iA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi,

2018-02-13 10:18 GMT+01:00 Emil Renner Berthing
<emil.renner.berthing-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> On 12 February 2018 at 23:29, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>> On Mon, Feb 12, 2018 at 3:26 PM, Brian Norris <briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
>>> Hi,
>>>
>>> On Mon, Feb 12, 2018 at 10:43:41AM -0600, Rob Herring wrote:
>>>> On Thu, Feb 8, 2018 at 3:23 PM, Enric Balletbo Serra
>>>> <eballetbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>> > 2018-02-08 18:52 GMT+01:00 Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>:
>>>> >> On Thu, Feb 8, 2018 at 9:20 AM, Enric Balletbo i Serra
>>>> >> <enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> wrote:
>>>> >>> --- a/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
>>>> >>> +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
>>>> >>> @@ -36,6 +36,12 @@ offset, enable bit, write mask bit.
>>>> >>>   - rockchip,uphy-dp-sel : the register of type-c phy enable DP function
>>>> >>>     for type-c phy0, it must be <0x6268 19 19>;
>>>> >>>     for type-c phy1, it must be <0x6268 3 19>;
>>>> >>> + - rockchip,usb3-host-disable : the register of type-c phy disable usb3 host
>>>> >>> +   for type-c phy0, it must be <0x2434 0 16>;
>>>> >>> +   for type-c phy1, it must be <0x2444 0 16>;
>>>> >>> + - rockchip,usb3-host-port : the register of type-c phy usb3 port number
>>>> >>> +   for type-c phy0, it must be <0x2434 12 28>;
>>>> >>> +   for type-c phy1, it must be <0x2444 12 28>;
>>>> >>
>>>> >> When does this list stop? Adding properties for various register
>>>> >> fields doesn't scale. This information should be in the driver and
>>>> >> based on the compatible string if necessary.
>>>> >>
>>>> >
>>>> > I see, seams reasonable to me, is this applicable to the new ones only
>>>> > or I should get rid of all the proprieties like this from the DT
>>>> > (including the old ones)?
>>>>
>>>> We're already kind of stuck with the existing ones. So it depends if
>>>> people want to phase them out or not.
>>>
>>> FWIW, any Chrome{device} using these sort of bindings is perfectly
>>> capable of handling changed bindings (we ship DTBs with the kernel). But
>>> that's not typically how mainline covers binding deprecation.
>>
>> If it's CrOS only that's using these, then it's really up to you all.
>> I guess it depends if many folks are trying to run mainline on CrOS
>> devices and don't necessarily keep things in sync.
>
> For what it's worth I run mainline on my Chromebook Plus (rk3399-gru-kevin),
> but in order to have a somewhat working setup you need to run
> 4.16-rc1 + various patches from the rockchip mailing list which means
> you have to keep up with the latest mainline (both kernel and devicetree)
> anyway. So I'm all in favour of cleaning up the devicetree.
>
>>> If we're going to start recommending not putting these offsets in the
>>> DT, I'd vote for deprecating them, for consistency. (Otherwise, we'll
>>> keep running into this same question.) We only documented the RK3399
>>> ("rockchip,rk3399-typec-phy") binding, so all users should have the same
>>> offsets. I dunno if/how we pick a time for eventually removing the
>>> bindings entirely.
>>
>> Yes, makes sense.
>>

One question, maybe silly question, that comes to my mind is, as the
offsets for same register are different between type-c phy0 and type-c
phy1 and there is two instances, the driver needs to know which type-c
phyter is and I'm not sure the proper way to do it. It is just check
the type-c phyter base address? So if base address is 0xff7c0000
(phy0) we know that we should apply the offsets for phy0 and if base
address is 0xff800000 we know that we should apply the offsets for
phy1?

Best regards,
 Enric

>> Rob
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: eballetbo@gmail.com (Enric Balletbo Serra)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] Documentation: bindings: add usb3-host-disable and usb3-host-port for Rockchip USB Type-C PHY
Date: Tue, 13 Feb 2018 23:08:26 +0100	[thread overview]
Message-ID: <CAFqH_50=d3Z-JWiFnxnCm0pF_bpyWG9-9M1mk5nQUYUwZh-Yyw@mail.gmail.com> (raw)
In-Reply-To: <CANBLGcykb99SntD=C67_-iUoZZLeFfMw8jZWdF9fmFss3u24iA@mail.gmail.com>

Hi,

2018-02-13 10:18 GMT+01:00 Emil Renner Berthing
<emil.renner.berthing@gmail.com>:
> On 12 February 2018 at 23:29, Rob Herring <robh@kernel.org> wrote:
>> On Mon, Feb 12, 2018 at 3:26 PM, Brian Norris <briannorris@chromium.org> wrote:
>>> Hi,
>>>
>>> On Mon, Feb 12, 2018 at 10:43:41AM -0600, Rob Herring wrote:
>>>> On Thu, Feb 8, 2018 at 3:23 PM, Enric Balletbo Serra
>>>> <eballetbo@gmail.com> wrote:
>>>> > 2018-02-08 18:52 GMT+01:00 Rob Herring <robh@kernel.org>:
>>>> >> On Thu, Feb 8, 2018 at 9:20 AM, Enric Balletbo i Serra
>>>> >> <enric.balletbo@collabora.com> wrote:
>>>> >>> --- a/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
>>>> >>> +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
>>>> >>> @@ -36,6 +36,12 @@ offset, enable bit, write mask bit.
>>>> >>>   - rockchip,uphy-dp-sel : the register of type-c phy enable DP function
>>>> >>>     for type-c phy0, it must be <0x6268 19 19>;
>>>> >>>     for type-c phy1, it must be <0x6268 3 19>;
>>>> >>> + - rockchip,usb3-host-disable : the register of type-c phy disable usb3 host
>>>> >>> +   for type-c phy0, it must be <0x2434 0 16>;
>>>> >>> +   for type-c phy1, it must be <0x2444 0 16>;
>>>> >>> + - rockchip,usb3-host-port : the register of type-c phy usb3 port number
>>>> >>> +   for type-c phy0, it must be <0x2434 12 28>;
>>>> >>> +   for type-c phy1, it must be <0x2444 12 28>;
>>>> >>
>>>> >> When does this list stop? Adding properties for various register
>>>> >> fields doesn't scale. This information should be in the driver and
>>>> >> based on the compatible string if necessary.
>>>> >>
>>>> >
>>>> > I see, seams reasonable to me, is this applicable to the new ones only
>>>> > or I should get rid of all the proprieties like this from the DT
>>>> > (including the old ones)?
>>>>
>>>> We're already kind of stuck with the existing ones. So it depends if
>>>> people want to phase them out or not.
>>>
>>> FWIW, any Chrome{device} using these sort of bindings is perfectly
>>> capable of handling changed bindings (we ship DTBs with the kernel). But
>>> that's not typically how mainline covers binding deprecation.
>>
>> If it's CrOS only that's using these, then it's really up to you all.
>> I guess it depends if many folks are trying to run mainline on CrOS
>> devices and don't necessarily keep things in sync.
>
> For what it's worth I run mainline on my Chromebook Plus (rk3399-gru-kevin),
> but in order to have a somewhat working setup you need to run
> 4.16-rc1 + various patches from the rockchip mailing list which means
> you have to keep up with the latest mainline (both kernel and devicetree)
> anyway. So I'm all in favour of cleaning up the devicetree.
>
>>> If we're going to start recommending not putting these offsets in the
>>> DT, I'd vote for deprecating them, for consistency. (Otherwise, we'll
>>> keep running into this same question.) We only documented the RK3399
>>> ("rockchip,rk3399-typec-phy") binding, so all users should have the same
>>> offsets. I dunno if/how we pick a time for eventually removing the
>>> bindings entirely.
>>
>> Yes, makes sense.
>>

One question, maybe silly question, that comes to my mind is, as the
offsets for same register are different between type-c phy0 and type-c
phy1 and there is two instances, the driver needs to know which type-c
phyter is and I'm not sure the proper way to do it. It is just check
the type-c phyter base address? So if base address is 0xff7c0000
(phy0) we know that we should apply the offsets for phy0 and if base
address is 0xff800000 we know that we should apply the offsets for
phy1?

Best regards,
 Enric

>> Rob
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2018-02-13 22:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 15:20 [PATCH 1/3] phy: rockchip-typec: enable usb3 host during usb3 phy power on Enric Balletbo i Serra
2018-02-08 15:20 ` Enric Balletbo i Serra
2018-02-08 15:20 ` Enric Balletbo i Serra
2018-02-08 15:20 ` [PATCH 2/3] Documentation: bindings: add usb3-host-disable and usb3-host-port for Rockchip USB Type-C PHY Enric Balletbo i Serra
2018-02-08 15:20   ` Enric Balletbo i Serra
2018-02-08 17:52   ` Rob Herring
2018-02-08 17:52     ` Rob Herring
2018-02-08 21:23     ` Enric Balletbo Serra
2018-02-08 21:23       ` Enric Balletbo Serra
2018-02-08 21:23       ` Enric Balletbo Serra
2018-02-12 16:43       ` Rob Herring
2018-02-12 16:43         ` Rob Herring
2018-02-12 16:43         ` Rob Herring
2018-02-12 21:26         ` Brian Norris
2018-02-12 21:26           ` Brian Norris
2018-02-12 21:26           ` Brian Norris
2018-02-12 22:29           ` Rob Herring
2018-02-12 22:29             ` Rob Herring
2018-02-12 22:29             ` Rob Herring
2018-02-13  9:18             ` Emil Renner Berthing
2018-02-13  9:18               ` Emil Renner Berthing
2018-02-13  9:18               ` Emil Renner Berthing
2018-02-13 22:08               ` Enric Balletbo Serra [this message]
2018-02-13 22:08                 ` Enric Balletbo Serra
2018-02-13 22:08                 ` Enric Balletbo Serra
2018-02-13 22:22                 ` Heiko Stübner
2018-02-13 22:22                   ` Heiko Stübner
2018-02-13 22:22                   ` Heiko Stübner
2018-02-08 15:20 ` [PATCH 3/3] phy: rockchip-typec: force to USB2 if DP at 4 lanes mode Enric Balletbo i Serra
2018-02-08 15:20   ` Enric Balletbo i Serra
2018-02-08 15:20   ` Enric Balletbo i Serra

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='CAFqH_50=d3Z-JWiFnxnCm0pF_bpyWG9-9M1mk5nQUYUwZh-Yyw@mail.gmail.com' \
    --to=eballetbo@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=emil.renner.berthing@gmail.com \
    --cc=enric.balletbo@collabora.com \
    --cc=heiko@sntech.de \
    --cc=hl@rock-chips.com \
    --cc=kernel@collabora.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=wulf@rock-chips.com \
    --cc=zyw@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.