All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Brian Norris <briannorris@chromium.org>,
	dianders@chromium.org, Chris Zhong <zyw@rock-chips.com>,
	William wu <wulf@rock-chips.com>,
	hl@rock-chips.com, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	kernel@collabora.com
Subject: Re: [PATCH v3 1/6] phy: rockchip-typec: deprecate some DT properties for various register fields.
Date: Sat, 17 Feb 2018 01:06:47 +0100	[thread overview]
Message-ID: <7311922.FVjtJqota6@phil> (raw)
In-Reply-To: <20180216120956.19034-1-enric.balletbo@collabora.com>

Am Freitag, 16. Februar 2018, 13:09:51 CET schrieb Enric Balletbo i Serra:
> Adding properties for various register fields in the DT doesn't scale and
> this information should be in the driver instead.
> 
> Before this patch these registers (description below) were specified in
> the DT, every register node contained 3 sections: offset, enable bit,
> write mask bit.
> 
>  - rockchip,typec-conn-dir : the register of type-c connector direction,
>    for type-c phy0, it must be <0xe580 0 16>;
>    for type-c phy1, it must be <0xe58c 0 16>;
>  - rockchip,usb3tousb2-en : the register of type-c force usb3 to usb2 enable
>    control.
>    for type-c phy0, it must be <0xe580 3 19>;
>    for type-c phy1, it must be <0xe58c 3 19>;
>  - rockchip,external-psm : the register of type-c phy external psm clock
>    selection.
>    for type-c phy0, it must be <0xe588 14 30>;
>    for type-c phy1, it must be <0xe594 14 30>;
>  - rockchip,pipe-status : the register of type-c phy pipe status.
>    for type-c phy0, it must be <0xe5c0 0 0>;
>    for type-c phy1, it must be <0xe5c0 16 16>;
> 
> After this patch these register definitions are in the driver. So can be
> removed from the DT. Note that there are 2 type-c phys for RK3399 with
> different offsets, the driver checks the phy base address of the running
> instance and applies the right offsets.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> Changes since v2:
> - Suggested by Heiko Stuebner:
>   - Prefix phy config struct with rk3399_ as is rk3399-specific.
>   - Create a new struct similar to things like the inno-usb2-phy
>   - Select phy config according to the compatible and remove the
>     specific constants.
> Changes since v1:
> - This patch is new in this series to accomplish the purpose of get rid
>   of some registers from the DT. Suggested by Rob Herring.

looks great now
Reviewed-by: Heiko Stuebner <heiko@sntech.de>

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stuebner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/6] phy: rockchip-typec: deprecate some DT properties for various register fields.
Date: Sat, 17 Feb 2018 01:06:47 +0100	[thread overview]
Message-ID: <7311922.FVjtJqota6@phil> (raw)
In-Reply-To: <20180216120956.19034-1-enric.balletbo@collabora.com>

Am Freitag, 16. Februar 2018, 13:09:51 CET schrieb Enric Balletbo i Serra:
> Adding properties for various register fields in the DT doesn't scale and
> this information should be in the driver instead.
> 
> Before this patch these registers (description below) were specified in
> the DT, every register node contained 3 sections: offset, enable bit,
> write mask bit.
> 
>  - rockchip,typec-conn-dir : the register of type-c connector direction,
>    for type-c phy0, it must be <0xe580 0 16>;
>    for type-c phy1, it must be <0xe58c 0 16>;
>  - rockchip,usb3tousb2-en : the register of type-c force usb3 to usb2 enable
>    control.
>    for type-c phy0, it must be <0xe580 3 19>;
>    for type-c phy1, it must be <0xe58c 3 19>;
>  - rockchip,external-psm : the register of type-c phy external psm clock
>    selection.
>    for type-c phy0, it must be <0xe588 14 30>;
>    for type-c phy1, it must be <0xe594 14 30>;
>  - rockchip,pipe-status : the register of type-c phy pipe status.
>    for type-c phy0, it must be <0xe5c0 0 0>;
>    for type-c phy1, it must be <0xe5c0 16 16>;
> 
> After this patch these register definitions are in the driver. So can be
> removed from the DT. Note that there are 2 type-c phys for RK3399 with
> different offsets, the driver checks the phy base address of the running
> instance and applies the right offsets.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> Changes since v2:
> - Suggested by Heiko Stuebner:
>   - Prefix phy config struct with rk3399_ as is rk3399-specific.
>   - Create a new struct similar to things like the inno-usb2-phy
>   - Select phy config according to the compatible and remove the
>     specific constants.
> Changes since v1:
> - This patch is new in this series to accomplish the purpose of get rid
>   of some registers from the DT. Suggested by Rob Herring.

looks great now
Reviewed-by: Heiko Stuebner <heiko@sntech.de>

  parent reply	other threads:[~2018-02-17  0:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 12:09 [PATCH v3 1/6] phy: rockchip-typec: deprecate some DT properties for various register fields Enric Balletbo i Serra
2018-02-16 12:09 ` Enric Balletbo i Serra
2018-02-16 12:09 ` Enric Balletbo i Serra
2018-02-16 12:09 ` [PATCH v3 2/6] dt-bindings: phy-rockchip-typec: deprecate some register properties Enric Balletbo i Serra
2018-02-16 12:09   ` Enric Balletbo i Serra
2018-02-16 12:09   ` Enric Balletbo i Serra
2018-02-17  0:07   ` Heiko Stuebner
2018-02-17  0:07     ` Heiko Stuebner
2018-02-19 20:02   ` Rob Herring
2018-02-19 20:02     ` Rob Herring
2018-02-19 20:02     ` Rob Herring
2018-02-16 12:09 ` [PATCH v3 3/6] phy: rockchip-typec: enable usb3 host during usb3 phy power on Enric Balletbo i Serra
2018-02-16 12:09   ` Enric Balletbo i Serra
     [not found]   ` <20180216120956.19034-3-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-02-17  0:08     ` Heiko Stuebner
2018-02-17  0:08       ` Heiko Stuebner
2018-02-17  0:08       ` Heiko Stuebner
2018-02-16 12:09 ` [PATCH v3 4/6] phy: rockchip-typec: force to USB2 if DP at 4 lanes mode Enric Balletbo i Serra
2018-02-16 12:09   ` Enric Balletbo i Serra
     [not found]   ` <20180216120956.19034-4-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-02-17  0:09     ` Heiko Stuebner
2018-02-17  0:09       ` Heiko Stuebner
2018-02-17  0:09       ` Heiko Stuebner
2018-02-16 12:09 ` [PATCH v3 5/6] phy: rockchip-typec: support DP phy switch Enric Balletbo i Serra
2018-02-16 12:09   ` Enric Balletbo i Serra
     [not found]   ` <20180216120956.19034-5-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-02-17  0:10     ` Heiko Stuebner
2018-02-17  0:10       ` Heiko Stuebner
2018-02-17  0:10       ` Heiko Stuebner
2018-02-16 12:09 ` [PATCH v3 6/6] drm/rockchip: cdn-dp: remove the " Enric Balletbo i Serra
2018-02-16 12:09   ` Enric Balletbo i Serra
     [not found]   ` <20180216120956.19034-6-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2018-02-17  0:10     ` Heiko Stuebner
2018-02-17  0:10       ` Heiko Stuebner
2018-02-17  0:10       ` Heiko Stuebner
2018-03-16 11:02   ` Heiko Stuebner
2018-03-16 11:02     ` Heiko Stuebner
2018-02-17  0:06 ` Heiko Stuebner [this message]
2018-02-17  0:06   ` [PATCH v3 1/6] phy: rockchip-typec: deprecate some DT properties for various register fields 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=7311922.FVjtJqota6@phil \
    --to=heiko@sntech.de \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --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+dt@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.