* [PATCH 0/4] Move DP phy switch to PHY driver
@ 2017-02-10 7:44 Chris Zhong
2017-02-10 7:44 ` [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY Chris Zhong
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Chris Zhong @ 2017-02-10 7:44 UTC (permalink / raw)
To: dri-devel, kishon, robh, linux-rockchip
Cc: Mark Rutland, Catalin Marinas, Shawn Lin, Will Deacon, Kever Yang,
linux-kernel, groeck, zyw, Brian Norris, Jianqun Xu, Caesar Wang,
devicetree, Elaine Zhang, Rob Herring, William wu,
linux-arm-kernel, Douglas Anderson, Tomasz Figa, David Wu
There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
only one PHY can connect to DP controller at one time, the other should
be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
set this bit means enable PHY 1, clear this bit means enable PHY 0.
If the board has 2 Type-C ports, the DP driver get the phy id from
devm_of_phy_get_by_index, and then control this switch according to
this id. But some others board only has one Type-C port, it may be PHY 0
or PHY 1. The dts node id can not tell us the correct PHY id. Hence move
this switch to PHY driver, the PHY driver can distinguish between PHY 0
and PHY 1, and then write the correct register bit.
Chris Zhong (4):
Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
arm64: dts: rockchip: add rockchip,uphy-dp-sel for Type-C phy
phy: rockchip-typec: support DP phy switch
drm/rockchip: cdn-dp: remove the DP phy switch
Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 ++
drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 -------
drivers/phy/phy-rockchip-typec.c | 9 +++++++++
4 files changed, 16 insertions(+), 7 deletions(-)
--
2.6.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
2017-02-10 7:44 [PATCH 0/4] Move DP phy switch to PHY driver Chris Zhong
@ 2017-02-10 7:44 ` Chris Zhong
2017-02-16 2:20 ` Rob Herring
2017-02-10 7:44 ` [PATCH 2/4] arm64: dts: rockchip: add rockchip, uphy-dp-sel for Type-C phy Chris Zhong
` (2 subsequent siblings)
3 siblings, 1 reply; 16+ messages in thread
From: Chris Zhong @ 2017-02-10 7:44 UTC (permalink / raw)
To: dri-devel, kishon, robh, linux-rockchip
Cc: Mark Rutland, devicetree, linux-kernel, Tomasz Figa, Kever Yang,
zyw, Rob Herring, groeck, linux-arm-kernel
rockchip,uphy-dp-sel is the register of type-c phy enable DP function.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---
Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt b/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
index 6ea867e..c3be83b 100644
--- a/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
+++ b/Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
@@ -33,6 +33,9 @@ offset, enable bit, write mask bit.
- 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>;
+ - 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>;
Required nodes : a sub-node is required for each port the phy provides.
The sub-node name is used to identify dp or usb3 port,
@@ -62,6 +65,7 @@ Example:
rockchip,usb3tousb2-en = <0xe580 3 19>;
rockchip,external-psm = <0xe588 14 30>;
rockchip,pipe-status = <0xe5c0 0 0>;
+ rockchip,uphy-dp-sel = <0x6268 19 19>;
tcphy0_dp: dp-port {
#phy-cells = <0>;
@@ -90,6 +94,7 @@ Example:
rockchip,usb3tousb2-en = <0xe58c 3 19>;
rockchip,external-psm = <0xe594 14 30>;
rockchip,pipe-status = <0xe5c0 16 16>;
+ rockchip,uphy-dp-sel = <0x6268 3 19>;
tcphy1_dp: dp-port {
#phy-cells = <0>;
--
2.6.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/4] arm64: dts: rockchip: add rockchip, uphy-dp-sel for Type-C phy
2017-02-10 7:44 [PATCH 0/4] Move DP phy switch to PHY driver Chris Zhong
2017-02-10 7:44 ` [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY Chris Zhong
@ 2017-02-10 7:44 ` Chris Zhong
2017-11-28 23:32 ` [PATCH 0/4] Move DP phy switch to PHY driver Doug Anderson
[not found] ` <1486712654-15431-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
3 siblings, 0 replies; 16+ messages in thread
From: Chris Zhong @ 2017-02-10 7:44 UTC (permalink / raw)
To: dri-devel, kishon, robh, linux-rockchip
Cc: Mark Rutland, devicetree, Elaine Zhang, Catalin Marinas,
Shawn Lin, Brian Norris, Will Deacon, linux-kernel,
Douglas Anderson, zyw, Rob Herring, David Wu, groeck, William wu,
Caesar Wang, Jianqun Xu, linux-arm-kernel
rockchip,uphy-dp-sel is the register of type-c phy enable DP function.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 8e6d1bd..7e8aa8c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1225,6 +1225,7 @@
rockchip,usb3tousb2-en = <0xe580 3 19>;
rockchip,external-psm = <0xe588 14 30>;
rockchip,pipe-status = <0xe5c0 0 0>;
+ rockchip,uphy-dp-sel = <0x6268 19 19>;
status = "disabled";
tcphy0_dp: dp-port {
@@ -1254,6 +1255,7 @@
rockchip,usb3tousb2-en = <0xe58c 3 19>;
rockchip,external-psm = <0xe594 14 30>;
rockchip,pipe-status = <0xe5c0 16 16>;
+ rockchip,uphy-dp-sel = <0x6268 3 19>;
status = "disabled";
tcphy1_dp: dp-port {
--
2.6.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
2017-02-10 7:44 ` [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY Chris Zhong
@ 2017-02-16 2:20 ` Rob Herring
2017-02-16 3:14 ` Chris Zhong
0 siblings, 1 reply; 16+ messages in thread
From: Rob Herring @ 2017-02-16 2:20 UTC (permalink / raw)
To: Chris Zhong
Cc: Mark Rutland, devicetree, linux-kernel, dri-devel, kishon,
Kever Yang, linux-rockchip, groeck, Tomasz Figa, linux-arm-kernel
On Fri, Feb 10, 2017 at 03:44:11PM +0800, Chris Zhong wrote:
> rockchip,uphy-dp-sel is the register of type-c phy enable DP function.
"dt-bindings: phy:" is the preferred subject prefix.
>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> ---
>
> Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
> 1 file changed, 5 insertions(+)
Otherwise,
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
2017-02-16 2:20 ` Rob Herring
@ 2017-02-16 3:14 ` Chris Zhong
0 siblings, 0 replies; 16+ messages in thread
From: Chris Zhong @ 2017-02-16 3:14 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, devicetree, linux-kernel, dri-devel, kishon,
Kever Yang, linux-rockchip, groeck, Tomasz Figa, linux-arm-kernel
Hi Rob
On 02/16/2017 10:20 AM, Rob Herring wrote:
> On Fri, Feb 10, 2017 at 03:44:11PM +0800, Chris Zhong wrote:
>> rockchip,uphy-dp-sel is the register of type-c phy enable DP function.
> "dt-bindings: phy:" is the preferred subject prefix.
OK, I will change the header next version.
dt-bindings: phy: add uphy-dp-sel for Rockchip USB Type-C PHY.
>
>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
>> ---
>>
>> Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
>> 1 file changed, 5 insertions(+)
> Otherwise,
>
> Acked-by: Rob Herring <robh@kernel.org>
>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2017-02-10 7:44 [PATCH 0/4] Move DP phy switch to PHY driver Chris Zhong
2017-02-10 7:44 ` [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY Chris Zhong
2017-02-10 7:44 ` [PATCH 2/4] arm64: dts: rockchip: add rockchip, uphy-dp-sel for Type-C phy Chris Zhong
@ 2017-11-28 23:32 ` Doug Anderson
[not found] ` <CAD=FV=VdUhfL+_MShYynoXKQW1-KpAOsW=x+hAxGZO78rJEyeQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[not found] ` <1486712654-15431-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
3 siblings, 1 reply; 16+ messages in thread
From: Doug Anderson @ 2017-11-28 23:32 UTC (permalink / raw)
To: Chris Zhong
Cc: Mark Rutland, David Airlie, Catalin Marinas, Shawn Lin,
Will Deacon, Kever Yang, dri-devel, Guenter Roeck, Brian Norris,
Kishon Vijay Abraham I, open list:ARM/Rockchip SoC..., Jianqun Xu,
Caesar Wang, devicetree, Elaine Zhang, Rob Herring, William wu,
Linux ARM, Mark yao, LKML, Tomasz Figa, David Wu,
Enric Balletbo i Serra <enric.ballet>
Hi,
On Thu, Feb 9, 2017 at 11:44 PM, Chris Zhong <zyw@rock-chips.com> wrote:
>
> There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
> only one PHY can connect to DP controller at one time, the other should
> be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
> set this bit means enable PHY 1, clear this bit means enable PHY 0.
>
> If the board has 2 Type-C ports, the DP driver get the phy id from
> devm_of_phy_get_by_index, and then control this switch according to
> this id. But some others board only has one Type-C port, it may be PHY 0
> or PHY 1. The dts node id can not tell us the correct PHY id. Hence move
> this switch to PHY driver, the PHY driver can distinguish between PHY 0
> and PHY 1, and then write the correct register bit.
>
>
>
> Chris Zhong (4):
> Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
> arm64: dts: rockchip: add rockchip,uphy-dp-sel for Type-C phy
> phy: rockchip-typec: support DP phy switch
> drm/rockchip: cdn-dp: remove the DP phy switch
>
> Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 ++
> drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 -------
> drivers/phy/phy-rockchip-typec.c | 9 +++++++++
> 4 files changed, 16 insertions(+), 7 deletions(-)
What ever happened to this series? It seemed like it just dropped on
the floor...
There was a bit of contention on patch #3
<https://patchwork.kernel.org/patch/9566095/> about the fact that we
were specifying addresses in the device tree vs. hardcoding them in
the driver. Any way we can just make a decision and go with it?
-Doug
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
[not found] ` <CAD=FV=VdUhfL+_MShYynoXKQW1-KpAOsW=x+hAxGZO78rJEyeQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-30 2:27 ` Chris Zhong
[not found] ` <c6fb4d29-6c6d-7f39-3cdd-3bc42c4519a2-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Chris Zhong @ 2017-11-30 2:27 UTC (permalink / raw)
To: Doug Anderson
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Kishon Vijay Abraham I, Rob Herring,
open list:ARM/Rockchip SoC..., LKML, Guenter Roeck, Sean Paul,
William wu, Rob Herring, David Airlie, Shawn Lin, Catalin Marinas,
Elaine Zhang, David Wu, Heiko Stuebner, Kever Yang, Brian Norris,
Tomasz Figa, Will Deacon, devicetree-u79uwXL29TY76Z2rM5mHXA
Hi Doug
Thank you for mentioning this patch.
I think the focus of the discussion is: can we put the grf control bit
to dts.
The RK3399 has 2 Type-C phy, but only one DP controller, this "uphy_dp_sel"
can help to switch these 2 phy. So I think this bit can be considered as
a part of
Type-C phy, these 2 phy have different bits, just similar to other bits
(such as "pipe-status").
Put them to DTS file might be a accepted practice.
On 2017年11月29日 07:32, Doug Anderson wrote:
> Hi,
>
> On Thu, Feb 9, 2017 at 11:44 PM, Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>> There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
>> only one PHY can connect to DP controller at one time, the other should
>> be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
>> set this bit means enable PHY 1, clear this bit means enable PHY 0.
>>
>> If the board has 2 Type-C ports, the DP driver get the phy id from
>> devm_of_phy_get_by_index, and then control this switch according to
>> this id. But some others board only has one Type-C port, it may be PHY 0
>> or PHY 1. The dts node id can not tell us the correct PHY id. Hence move
>> this switch to PHY driver, the PHY driver can distinguish between PHY 0
>> and PHY 1, and then write the correct register bit.
>>
>>
>>
>> Chris Zhong (4):
>> Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
>> arm64: dts: rockchip: add rockchip,uphy-dp-sel for Type-C phy
>> phy: rockchip-typec: support DP phy switch
>> drm/rockchip: cdn-dp: remove the DP phy switch
>>
>> Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
>> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 ++
>> drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 -------
>> drivers/phy/phy-rockchip-typec.c | 9 +++++++++
>> 4 files changed, 16 insertions(+), 7 deletions(-)
> What ever happened to this series? It seemed like it just dropped on
> the floor...
>
> There was a bit of contention on patch #3
> <https://patchwork.kernel.org/patch/9566095/> about the fact that we
> were specifying addresses in the device tree vs. hardcoding them in
> the driver. Any way we can just make a decision and go with it?
>
>
> -Doug
>
>
>
--
Chris Zhong
--
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
[not found] ` <c6fb4d29-6c6d-7f39-3cdd-3bc42c4519a2-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-12-01 21:42 ` Doug Anderson
[not found] ` <CAD=FV=Vk0fOfYXc2gGDpvoVuT8m9WGT-eJ4hOM=G5MY_Bzzpwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Doug Anderson @ 2017-12-01 21:42 UTC (permalink / raw)
To: Chris Zhong
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Kishon Vijay Abraham I, Rob Herring,
open list:ARM/Rockchip SoC..., LKML, Guenter Roeck, Sean Paul,
William wu, Rob Herring, David Airlie, Shawn Lin, Catalin Marinas,
Elaine Zhang, David Wu, Heiko Stuebner, Kever Yang, Brian Norris,
Tomasz Figa, Will Deacon, devicetree-u79uwXL29TY76Z2rM5mHXA
Hi,
On Wed, Nov 29, 2017 at 6:27 PM, Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
> Hi Doug
>
> Thank you for mentioning this patch.
>
> I think the focus of the discussion is: can we put the grf control bit to
> dts.
>
> The RK3399 has 2 Type-C phy, but only one DP controller, this "uphy_dp_sel"
>
> can help to switch these 2 phy. So I think this bit can be considered as a
> part of
>
> Type-C phy, these 2 phy have different bits, just similar to other bits
> (such as "pipe-status").
>
> Put them to DTS file might be a accepted practice.
I guess the first step would be finding the person to make a decision.
Is that Heiko? Olof? Kishon? Rob?. As I see it there are a few
options:
1. Land this series as-is. This makes the new bit work just like all
the other ones next to it. If anyone happens to try to use an old
device tree on a new kernel they'll break. Seems rather unlikely
given that the whole type C PHY is not really fully functional
upstream, but technically this is a no-no from a device tree
perspective.
2. Change the series to make this property optional. If it's not
there then the code behaves like it always did. This would address
the "compatibility" problem but likely wouldn't actually help any real
people, and it would be extra work.
3. Redo the driver to deprecate all the old offsets / bits and just
put the table in the driver, keyed off the compatible string and base
address if the IO memory.
I can't make this decision. It's up to those folks who would be
landing the patch and I'd be happy with any of them. What I'm less
happy with, however, is the indecision preventing forward progress.
We should pick one of the above things and land it. My own personal
bias is #1: just land the series. No real people will be hurt and
it's just adding another property that matches the ones next to it.
>From a long term perspective (AKA how I'd write the next driver like
this) I personally lean towards to "tables in the driver, not in the
device tree" but quite honestly I'm happy to take whatever direction
the maintainers give.
-Doug
--
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
[not found] ` <CAD=FV=Vk0fOfYXc2gGDpvoVuT8m9WGT-eJ4hOM=G5MY_Bzzpwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-12-01 21:58 ` Heiko Stuebner
2017-12-04 2:47 ` Chris Zhong
0 siblings, 1 reply; 16+ messages in thread
From: Heiko Stuebner @ 2017-12-01 21:58 UTC (permalink / raw)
To: Doug Anderson
Cc: Chris Zhong, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Kishon Vijay Abraham I, Rob Herring,
open list:ARM/Rockchip SoC..., LKML, Guenter Roeck, Sean Paul,
William wu, Rob Herring, David Airlie, Shawn Lin, Catalin Marinas,
Elaine Zhang, David Wu, Kever Yang, Brian Norris, Tomasz Figa,
Will Deacon, devicetree-u79uwXL29TY76Z2rM5mHXA
Am Freitag, 1. Dezember 2017, 13:42:46 CET schrieb Doug Anderson:
> Hi,
>
> On Wed, Nov 29, 2017 at 6:27 PM, Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
> > Hi Doug
> >
> > Thank you for mentioning this patch.
> >
> > I think the focus of the discussion is: can we put the grf control bit to
> > dts.
> >
> > The RK3399 has 2 Type-C phy, but only one DP controller, this "uphy_dp_sel"
> >
> > can help to switch these 2 phy. So I think this bit can be considered as a
> > part of
> >
> > Type-C phy, these 2 phy have different bits, just similar to other bits
> > (such as "pipe-status").
> >
> > Put them to DTS file might be a accepted practice.
>
> I guess the first step would be finding the person to make a decision.
> Is that Heiko? Olof? Kishon? Rob?. As I see it there are a few
> options:
>
> 1. Land this series as-is. This makes the new bit work just like all
> the other ones next to it. If anyone happens to try to use an old
> device tree on a new kernel they'll break. Seems rather unlikely
> given that the whole type C PHY is not really fully functional
> upstream, but technically this is a no-no from a device tree
> perspective.
>
> 2. Change the series to make this property optional. If it's not
> there then the code behaves like it always did. This would address
> the "compatibility" problem but likely wouldn't actually help any real
> people, and it would be extra work.
>
> 3. Redo the driver to deprecate all the old offsets / bits and just
> put the table in the driver, keyed off the compatible string and base
> address if the IO memory.
>
>
> I can't make this decision. It's up to those folks who would be
> landing the patch and I'd be happy with any of them. What I'm less
> happy with, however, is the indecision preventing forward progress.
> We should pick one of the above things and land it. My own personal
> bias is #1: just land the series. No real people will be hurt and
> it's just adding another property that matches the ones next to it.
I'd second that #1 . That whole type-c phy thingy never fully worked in
the past (some for the never used dp output), so personally I don't have
issues with going that route.
> From a long term perspective (AKA how I'd write the next driver like
> this) I personally lean towards to "tables in the driver, not in the
> device tree" but quite honestly I'm happy to take whatever direction
> the maintainers give.
It looks like we're in agreement here :-) . GRF stuff should not leak into
the devicetree, as it causes endless headaches later. But I guess we'll
need to live with the ones that happened so far.
Heiko
--
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2017-12-01 21:58 ` Heiko Stuebner
@ 2017-12-04 2:47 ` Chris Zhong
2017-12-04 7:46 ` Heiko Stübner
0 siblings, 1 reply; 16+ messages in thread
From: Chris Zhong @ 2017-12-04 2:47 UTC (permalink / raw)
To: Heiko Stuebner, Doug Anderson
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Kishon Vijay Abraham I, Rob Herring,
open list:ARM/Rockchip SoC..., LKML, Guenter Roeck, Sean Paul,
William wu, Rob Herring, David Airlie, Shawn Lin, Catalin Marinas,
Elaine Zhang, David Wu, Kever Yang, Brian Norris, Tomasz Figa,
Will Deacon, devicetree-u79uwXL29TY76Z2rM5mHXA, Linux ARM
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 3236 bytes --]
Hi Heiko
On 2017Äê12ÔÂ02ÈÕ 05:58, Heiko Stuebner wrote:
> Am Freitag, 1. Dezember 2017, 13:42:46 CET schrieb Doug Anderson:
>> Hi,
>>
>> On Wed, Nov 29, 2017 at 6:27 PM, Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>>> Hi Doug
>>>
>>> Thank you for mentioning this patch.
>>>
>>> I think the focus of the discussion is: can we put the grf control bit to
>>> dts.
>>>
>>> The RK3399 has 2 Type-C phy, but only one DP controller, this "uphy_dp_sel"
>>>
>>> can help to switch these 2 phy. So I think this bit can be considered as a
>>> part of
>>>
>>> Type-C phy, these 2 phy have different bits, just similar to other bits
>>> (such as "pipe-status").
>>>
>>> Put them to DTS file might be a accepted practice.
>> I guess the first step would be finding the person to make a decision.
>> Is that Heiko? Olof? Kishon? Rob?. As I see it there are a few
>> options:
>>
>> 1. Land this series as-is. This makes the new bit work just like all
>> the other ones next to it. If anyone happens to try to use an old
>> device tree on a new kernel they'll break. Seems rather unlikely
>> given that the whole type C PHY is not really fully functional
>> upstream, but technically this is a no-no from a device tree
>> perspective.
>>
>> 2. Change the series to make this property optional. If it's not
>> there then the code behaves like it always did. This would address
>> the "compatibility" problem but likely wouldn't actually help any real
>> people, and it would be extra work.
>>
>> 3. Redo the driver to deprecate all the old offsets / bits and just
>> put the table in the driver, keyed off the compatible string and base
>> address if the IO memory.
>>
>>
>> I can't make this decision. It's up to those folks who would be
>> landing the patch and I'd be happy with any of them. What I'm less
>> happy with, however, is the indecision preventing forward progress.
>> We should pick one of the above things and land it. My own personal
>> bias is #1: just land the series. No real people will be hurt and
>> it's just adding another property that matches the ones next to it.
> I'd second that #1 . That whole type-c phy thingy never fully worked in
> the past (some for the never used dp output), so personally I don't have
> issues with going that route.
>
>
>> From a long term perspective (AKA how I'd write the next driver like
>> this) I personally lean towards to "tables in the driver, not in the
>> device tree" but quite honestly I'm happy to take whatever direction
>> the maintainers give.
> It looks like we're in agreement here :-) . GRF stuff should not leak into
> the devicetree, as it causes endless headaches later. But I guess we'll
> need to live with the ones that happened so far.
>
So, the first step is: move all the private property of tcphy to
drivers/phy/rockchip/phy-rockchip-typec.c.
Second step: new a member: uphy-dp-sel.
In my mind, we should have discussed these properties before, and then I
moved them all into DTS.
>
>
>
>
--
Chris Zhong
--
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2017-12-04 2:47 ` Chris Zhong
@ 2017-12-04 7:46 ` Heiko Stübner
2017-12-04 16:08 ` Doug Anderson
0 siblings, 1 reply; 16+ messages in thread
From: Heiko Stübner @ 2017-12-04 7:46 UTC (permalink / raw)
To: Chris Zhong
Cc: Mark Rutland, David Airlie, Catalin Marinas, Shawn Lin,
Will Deacon, Kever Yang, dri-devel, Doug Anderson, Guenter Roeck,
Brian Norris, Kishon Vijay Abraham I,
open list:ARM/Rockchip SoC..., Jianqun Xu, Caesar Wang,
devicetree, Elaine Zhang, Rob Herring, William wu, Linux ARM,
LKML, Tomasz Figa, David Wu,
Enric Balletbo i Serra <enric.ba>
Hi Chris,
Am Montag, 4. Dezember 2017, 10:47:08 CET schrieb Chris Zhong:
> On 2017年12月02日 05:58, Heiko Stuebner wrote:
> > Am Freitag, 1. Dezember 2017, 13:42:46 CET schrieb Doug Anderson:
> >> Hi,
> >>
> >> On Wed, Nov 29, 2017 at 6:27 PM, Chris Zhong <zyw@rock-chips.com> wrote:
> >>> Hi Doug
> >>>
> >>> Thank you for mentioning this patch.
> >>>
> >>> I think the focus of the discussion is: can we put the grf control bit
> >>> to
> >>> dts.
> >>>
> >>> The RK3399 has 2 Type-C phy, but only one DP controller, this
> >>> "uphy_dp_sel"
> >>>
> >>> can help to switch these 2 phy. So I think this bit can be considered as
> >>> a
> >>> part of
> >>>
> >>> Type-C phy, these 2 phy have different bits, just similar to other bits
> >>> (such as "pipe-status").
> >>>
> >>> Put them to DTS file might be a accepted practice.
> >>
> >> I guess the first step would be finding the person to make a decision.
> >> Is that Heiko? Olof? Kishon? Rob?. As I see it there are a few
> >> options:
> >>
> >> 1. Land this series as-is. This makes the new bit work just like all
> >> the other ones next to it. If anyone happens to try to use an old
> >> device tree on a new kernel they'll break. Seems rather unlikely
> >> given that the whole type C PHY is not really fully functional
> >> upstream, but technically this is a no-no from a device tree
> >> perspective.
> >>
> >> 2. Change the series to make this property optional. If it's not
> >> there then the code behaves like it always did. This would address
> >> the "compatibility" problem but likely wouldn't actually help any real
> >> people, and it would be extra work.
> >>
> >> 3. Redo the driver to deprecate all the old offsets / bits and just
> >> put the table in the driver, keyed off the compatible string and base
> >> address if the IO memory.
> >>
> >>
> >> I can't make this decision. It's up to those folks who would be
> >> landing the patch and I'd be happy with any of them. What I'm less
> >> happy with, however, is the indecision preventing forward progress.
> >> We should pick one of the above things and land it. My own personal
> >> bias is #1: just land the series. No real people will be hurt and
> >> it's just adding another property that matches the ones next to it.
> >
> > I'd second that #1 . That whole type-c phy thingy never fully worked in
> > the past (some for the never used dp output), so personally I don't have
> > issues with going that route.
> >
> >> From a long term perspective (AKA how I'd write the next driver like
> >>
> >> this) I personally lean towards to "tables in the driver, not in the
> >> device tree" but quite honestly I'm happy to take whatever direction
> >> the maintainers give.
> >
> > It looks like we're in agreement here :-) . GRF stuff should not leak into
> > the devicetree, as it causes endless headaches later. But I guess we'll
> > need to live with the ones that happened so far.
>
> So, the first step is: move all the private property of tcphy to
> drivers/phy/rockchip/phy-rockchip-typec.c.
> Second step: new a member: uphy-dp-sel.
> In my mind, we should have discussed these properties before, and then I
> moved them all into DTS.
Actually, I was agreeing with Doug, that we probably don't need to rework the
type-c phy driver. As most properties for it are in the devicetree right now
we'll need to support them for backwards-compatiblity anyway.
And yes, there probably was discussion over dts vs. driver-table when the
type-c driver was introduced, but I either missed it or wasn't firm enough
back then ;-) .
Hence the "we'll need to live with it" for the type-c phy, but should not
do similar things in future drivers.
Heiko
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2017-12-04 7:46 ` Heiko Stübner
@ 2017-12-04 16:08 ` Doug Anderson
2017-12-04 21:53 ` Heiko Stübner
0 siblings, 1 reply; 16+ messages in thread
From: Doug Anderson @ 2017-12-04 16:08 UTC (permalink / raw)
To: Heiko Stübner
Cc: Mark Rutland, David Airlie, Catalin Marinas, Shawn Lin,
Will Deacon, Kever Yang, dri-devel, Guenter Roeck, Chris Zhong,
Brian Norris, Kishon Vijay Abraham I,
open list:ARM/Rockchip SoC..., Jianqun Xu, Caesar Wang,
devicetree, Elaine Zhang, Rob Herring, William wu, Linux ARM,
LKML, Tomasz Figa, David Wu,
Enric Balletbo i Serra <enric.balletb>
Hi,
On Sun, Dec 3, 2017 at 11:46 PM, Heiko Stübner <heiko@sntech.de> wrote:
> Hi Chris,
>
> Am Montag, 4. Dezember 2017, 10:47:08 CET schrieb Chris Zhong:
>> On 2017年12月02日 05:58, Heiko Stuebner wrote:
>> > Am Freitag, 1. Dezember 2017, 13:42:46 CET schrieb Doug Anderson:
>> >> Hi,
>> >>
>> >> On Wed, Nov 29, 2017 at 6:27 PM, Chris Zhong <zyw@rock-chips.com> wrote:
>> >>> Hi Doug
>> >>>
>> >>> Thank you for mentioning this patch.
>> >>>
>> >>> I think the focus of the discussion is: can we put the grf control bit
>> >>> to
>> >>> dts.
>> >>>
>> >>> The RK3399 has 2 Type-C phy, but only one DP controller, this
>> >>> "uphy_dp_sel"
>> >>>
>> >>> can help to switch these 2 phy. So I think this bit can be considered as
>> >>> a
>> >>> part of
>> >>>
>> >>> Type-C phy, these 2 phy have different bits, just similar to other bits
>> >>> (such as "pipe-status").
>> >>>
>> >>> Put them to DTS file might be a accepted practice.
>> >>
>> >> I guess the first step would be finding the person to make a decision.
>> >> Is that Heiko? Olof? Kishon? Rob?. As I see it there are a few
>> >> options:
>> >>
>> >> 1. Land this series as-is. This makes the new bit work just like all
>> >> the other ones next to it. If anyone happens to try to use an old
>> >> device tree on a new kernel they'll break. Seems rather unlikely
>> >> given that the whole type C PHY is not really fully functional
>> >> upstream, but technically this is a no-no from a device tree
>> >> perspective.
>> >>
>> >> 2. Change the series to make this property optional. If it's not
>> >> there then the code behaves like it always did. This would address
>> >> the "compatibility" problem but likely wouldn't actually help any real
>> >> people, and it would be extra work.
>> >>
>> >> 3. Redo the driver to deprecate all the old offsets / bits and just
>> >> put the table in the driver, keyed off the compatible string and base
>> >> address if the IO memory.
>> >>
>> >>
>> >> I can't make this decision. It's up to those folks who would be
>> >> landing the patch and I'd be happy with any of them. What I'm less
>> >> happy with, however, is the indecision preventing forward progress.
>> >> We should pick one of the above things and land it. My own personal
>> >> bias is #1: just land the series. No real people will be hurt and
>> >> it's just adding another property that matches the ones next to it.
>> >
>> > I'd second that #1 . That whole type-c phy thingy never fully worked in
>> > the past (some for the never used dp output), so personally I don't have
>> > issues with going that route.
>> >
>> >> From a long term perspective (AKA how I'd write the next driver like
>> >>
>> >> this) I personally lean towards to "tables in the driver, not in the
>> >> device tree" but quite honestly I'm happy to take whatever direction
>> >> the maintainers give.
>> >
>> > It looks like we're in agreement here :-) . GRF stuff should not leak into
>> > the devicetree, as it causes endless headaches later. But I guess we'll
>> > need to live with the ones that happened so far.
>>
>> So, the first step is: move all the private property of tcphy to
>> drivers/phy/rockchip/phy-rockchip-typec.c.
>> Second step: new a member: uphy-dp-sel.
>> In my mind, we should have discussed these properties before, and then I
>> moved them all into DTS.
>
> Actually, I was agreeing with Doug, that we probably don't need to rework the
> type-c phy driver. As most properties for it are in the devicetree right now
> we'll need to support them for backwards-compatiblity anyway.
>
> And yes, there probably was discussion over dts vs. driver-table when the
> type-c driver was introduced, but I either missed it or wasn't firm enough
> back then ;-) .
>
> Hence the "we'll need to live with it" for the type-c phy, but should not
> do similar things in future drivers.
So I guess now we're just waiting for some agreement from Kishon that
he's willing to land the PHY change? Heiko: presumably you could
apply the DP change to drm-misc? ...or is there some other process
needed there?
-Doug
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2017-12-04 16:08 ` Doug Anderson
@ 2017-12-04 21:53 ` Heiko Stübner
0 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2017-12-04 21:53 UTC (permalink / raw)
To: Doug Anderson
Cc: Mark Rutland, David Airlie, Catalin Marinas, Shawn Lin,
Will Deacon, Kever Yang, dri-devel, Guenter Roeck, Chris Zhong,
Brian Norris, Kishon Vijay Abraham I,
open list:ARM/Rockchip SoC..., Jianqun Xu, Caesar Wang,
devicetree, Elaine Zhang, Rob Herring, William wu, Linux ARM,
LKML, Tomasz Figa, David Wu,
Enric Balletbo i Serra <enric.balletb>
Hi,
Am Montag, 4. Dezember 2017, 08:08:31 CET schrieb Doug Anderson:
> On Sun, Dec 3, 2017 at 11:46 PM, Heiko Stübner <heiko@sntech.de> wrote:
> > Am Montag, 4. Dezember 2017, 10:47:08 CET schrieb Chris Zhong:
> >> On 2017年12月02日 05:58, Heiko Stuebner wrote:
> >> > Am Freitag, 1. Dezember 2017, 13:42:46 CET schrieb Doug Anderson:
> >> >> On Wed, Nov 29, 2017 at 6:27 PM, Chris Zhong <zyw@rock-chips.com>
wrote:
> >> >>> Thank you for mentioning this patch.
> >> >>>
> >> >>> I think the focus of the discussion is: can we put the grf control
> >> >>> bit
> >> >>> to
> >> >>> dts.
> >> >>>
> >> >>> The RK3399 has 2 Type-C phy, but only one DP controller, this
> >> >>> "uphy_dp_sel"
> >> >>>
> >> >>> can help to switch these 2 phy. So I think this bit can be considered
> >> >>> as
> >> >>> a
> >> >>> part of
> >> >>>
> >> >>> Type-C phy, these 2 phy have different bits, just similar to other
> >> >>> bits
> >> >>> (such as "pipe-status").
> >> >>>
> >> >>> Put them to DTS file might be a accepted practice.
> >> >>
> >> >> I guess the first step would be finding the person to make a decision.
> >> >> Is that Heiko? Olof? Kishon? Rob?. As I see it there are a few
> >> >> options:
> >> >>
> >> >> 1. Land this series as-is. This makes the new bit work just like all
> >> >> the other ones next to it. If anyone happens to try to use an old
> >> >> device tree on a new kernel they'll break. Seems rather unlikely
> >> >> given that the whole type C PHY is not really fully functional
> >> >> upstream, but technically this is a no-no from a device tree
> >> >> perspective.
> >> >>
> >> >> 2. Change the series to make this property optional. If it's not
> >> >> there then the code behaves like it always did. This would address
> >> >> the "compatibility" problem but likely wouldn't actually help any real
> >> >> people, and it would be extra work.
> >> >>
> >> >> 3. Redo the driver to deprecate all the old offsets / bits and just
> >> >> put the table in the driver, keyed off the compatible string and base
> >> >> address if the IO memory.
> >> >>
> >> >>
> >> >> I can't make this decision. It's up to those folks who would be
> >> >> landing the patch and I'd be happy with any of them. What I'm less
> >> >> happy with, however, is the indecision preventing forward progress.
> >> >> We should pick one of the above things and land it. My own personal
> >> >> bias is #1: just land the series. No real people will be hurt and
> >> >> it's just adding another property that matches the ones next to it.
> >> >
> >> > I'd second that #1 . That whole type-c phy thingy never fully worked in
> >> > the past (some for the never used dp output), so personally I don't
> >> > have
> >> > issues with going that route.
> >> >
> >> >> From a long term perspective (AKA how I'd write the next driver like
> >> >>
> >> >> this) I personally lean towards to "tables in the driver, not in the
> >> >> device tree" but quite honestly I'm happy to take whatever direction
> >> >> the maintainers give.
> >> >
> >> > It looks like we're in agreement here :-) . GRF stuff should not leak
> >> > into
> >> > the devicetree, as it causes endless headaches later. But I guess we'll
> >> > need to live with the ones that happened so far.
> >>
> >> So, the first step is: move all the private property of tcphy to
> >> drivers/phy/rockchip/phy-rockchip-typec.c.
> >> Second step: new a member: uphy-dp-sel.
> >> In my mind, we should have discussed these properties before, and then I
> >> moved them all into DTS.
> >
> > Actually, I was agreeing with Doug, that we probably don't need to rework
> > the type-c phy driver. As most properties for it are in the devicetree
> > right now we'll need to support them for backwards-compatiblity anyway.
> >
> > And yes, there probably was discussion over dts vs. driver-table when the
> > type-c driver was introduced, but I either missed it or wasn't firm enough
> > back then ;-) .
> >
> > Hence the "we'll need to live with it" for the type-c phy, but should not
> > do similar things in future drivers.
>
> So I guess now we're just waiting for some agreement from Kishon that
> he's willing to land the PHY change? Heiko: presumably you could
> apply the DP change to drm-misc? ...or is there some other process
> needed there?
I was lagging behind a bit with the drm-misc account request but have
done so now. So once I got the hang of how drm-misc works and Kishon
has picked the phy-part I can most likely push the drm part (or Sandy,
depending on who is faster).
As for process, I don't think there is special care necessary. When
you get the intermediate case of phy-change but no drm-change
everything will just revert to how it works now anyway.
Heiko
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
[not found] ` <1486712654-15431-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2018-02-16 11:04 ` Kishon Vijay Abraham I
2018-02-16 13:05 ` Heiko Stübner
0 siblings, 1 reply; 16+ messages in thread
From: Kishon Vijay Abraham I @ 2018-02-16 11:04 UTC (permalink / raw)
To: Chris Zhong, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
robh-DgEjT+Ai2ygdnm+yROfE0A,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
mark.yao-TNX95d0MmH7DzftRWevZcw, groeck-F7+t8E8rja9g9hUCZPvPmw,
seanpaul-F7+t8E8rja9g9hUCZPvPmw, William wu, Rob Herring,
David Airlie, Shawn Lin, Catalin Marinas, Elaine Zhang, David Wu,
Heiko Stuebner, Kever Yang, Brian Norris, Tomasz Figa,
Douglas Anderson, Will Deacon, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jianqun Xu,
Caesar Wang, Mark
Hi,
On Friday 10 February 2017 01:14 PM, Chris Zhong wrote:
>
> There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
> only one PHY can connect to DP controller at one time, the other should
> be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
> set this bit means enable PHY 1, clear this bit means enable PHY 0.
>
> If the board has 2 Type-C ports, the DP driver get the phy id from
> devm_of_phy_get_by_index, and then control this switch according to
> this id. But some others board only has one Type-C port, it may be PHY 0
> or PHY 1. The dts node id can not tell us the correct PHY id. Hence move
> this switch to PHY driver, the PHY driver can distinguish between PHY 0
> and PHY 1, and then write the correct register bit.
>
>
Changed subject of "Documentation: bindings: add uphy-dp-sel for Rockchip USB
Type-C PHY" as suggested by Rob, rebased "phy: rockchip-typec: support DP phy
switch" to the latest kernel and merged.
Thanks
Kishon
>
> Chris Zhong (4):
> Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY
> arm64: dts: rockchip: add rockchip,uphy-dp-sel for Type-C phy
> phy: rockchip-typec: support DP phy switch
> drm/rockchip: cdn-dp: remove the DP phy switch
>
> Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 5 +++++
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 ++
> drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 -------
> drivers/phy/phy-rockchip-typec.c | 9 +++++++++
> 4 files changed, 16 insertions(+), 7 deletions(-)
>
--
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2018-02-16 11:04 ` Kishon Vijay Abraham I
@ 2018-02-16 13:05 ` Heiko Stübner
2018-02-16 13:59 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 16+ messages in thread
From: Heiko Stübner @ 2018-02-16 13:05 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: Chris Zhong, dri-devel, robh, linux-rockchip, linux-kernel,
mark.yao, groeck, seanpaul, William wu, Rob Herring, David Airlie,
Shawn Lin, Catalin Marinas, Elaine Zhang, David Wu, Kever Yang,
Brian Norris, Tomasz Figa, Douglas Anderson, Will Deacon,
devicetree, linux-arm-kernel, Jianqun Xu
Hi Kishon,
Am Freitag, 16. Februar 2018, 12:04:42 CET schrieb Kishon Vijay Abraham I:
> On Friday 10 February 2017 01:14 PM, Chris Zhong wrote:
> > There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
> > only one PHY can connect to DP controller at one time, the other should
> > be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
> > set this bit means enable PHY 1, clear this bit means enable PHY 0.
> >
> > If the board has 2 Type-C ports, the DP driver get the phy id from
> > devm_of_phy_get_by_index, and then control this switch according to
> > this id. But some others board only has one Type-C port, it may be PHY 0
> > or PHY 1. The dts node id can not tell us the correct PHY id. Hence move
> > this switch to PHY driver, the PHY driver can distinguish between PHY 0
> > and PHY 1, and then write the correct register bit.
>
> Changed subject of "Documentation: bindings: add uphy-dp-sel for Rockchip
> USB Type-C PHY" as suggested by Rob, rebased "phy: rockchip-typec: support
> DP phy switch" to the latest kernel and merged.
I'm not sure how far along you are with your merging, but you might want to
revert this one.
In your inbox you should find more recent threads about the type-c phy
where Rob strongly suggested moving the whole grf registers out of the
dt and into the driver.
Enric Balletbo did just that and posted a series (including the dp-move)
yesterday (refined in a v2 from today).
Alternatively Enric could rebase his series on top of that recent change.
Heiko
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] Move DP phy switch to PHY driver
2018-02-16 13:05 ` Heiko Stübner
@ 2018-02-16 13:59 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 16+ messages in thread
From: Kishon Vijay Abraham I @ 2018-02-16 13:59 UTC (permalink / raw)
To: Heiko Stübner
Cc: Mark Rutland, David Airlie, Catalin Marinas, Shawn Lin,
Will Deacon, Kever Yang, dri-devel, linux-kernel, groeck,
Chris Zhong, robh, Brian Norris, linux-rockchip, Jianqun Xu,
Caesar Wang, devicetree, Elaine Zhang, Rob Herring, seanpaul,
William wu, linux-arm-kernel, mark.yao, Douglas Anderson,
Tomasz Figa, David Wu
On Friday 16 February 2018 06:35 PM, Heiko Stübner wrote:
> Hi Kishon,
>
> Am Freitag, 16. Februar 2018, 12:04:42 CET schrieb Kishon Vijay Abraham I:
>> On Friday 10 February 2017 01:14 PM, Chris Zhong wrote:
>>> There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
>>> only one PHY can connect to DP controller at one time, the other should
>>> be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
>>> set this bit means enable PHY 1, clear this bit means enable PHY 0.
>>>
>>> If the board has 2 Type-C ports, the DP driver get the phy id from
>>> devm_of_phy_get_by_index, and then control this switch according to
>>> this id. But some others board only has one Type-C port, it may be PHY 0
>>> or PHY 1. The dts node id can not tell us the correct PHY id. Hence move
>>> this switch to PHY driver, the PHY driver can distinguish between PHY 0
>>> and PHY 1, and then write the correct register bit.
>>
>> Changed subject of "Documentation: bindings: add uphy-dp-sel for Rockchip
>> USB Type-C PHY" as suggested by Rob, rebased "phy: rockchip-typec: support
>> DP phy switch" to the latest kernel and merged.
>
> I'm not sure how far along you are with your merging, but you might want to
> revert this one.
>
> In your inbox you should find more recent threads about the type-c phy
> where Rob strongly suggested moving the whole grf registers out of the
> dt and into the driver.
>
> Enric Balletbo did just that and posted a series (including the dp-move)
> yesterday (refined in a v2 from today).
>
> Alternatively Enric could rebase his series on top of that recent change.
I can drop this series and take Enric's series. All of them are still in my
local system.
Thanks
Kishon
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2018-02-16 13:59 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-10 7:44 [PATCH 0/4] Move DP phy switch to PHY driver Chris Zhong
2017-02-10 7:44 ` [PATCH 1/4] Documentation: bindings: add uphy-dp-sel for Rockchip USB Type-C PHY Chris Zhong
2017-02-16 2:20 ` Rob Herring
2017-02-16 3:14 ` Chris Zhong
2017-02-10 7:44 ` [PATCH 2/4] arm64: dts: rockchip: add rockchip, uphy-dp-sel for Type-C phy Chris Zhong
2017-11-28 23:32 ` [PATCH 0/4] Move DP phy switch to PHY driver Doug Anderson
[not found] ` <CAD=FV=VdUhfL+_MShYynoXKQW1-KpAOsW=x+hAxGZO78rJEyeQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-30 2:27 ` Chris Zhong
[not found] ` <c6fb4d29-6c6d-7f39-3cdd-3bc42c4519a2-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-12-01 21:42 ` Doug Anderson
[not found] ` <CAD=FV=Vk0fOfYXc2gGDpvoVuT8m9WGT-eJ4hOM=G5MY_Bzzpwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-01 21:58 ` Heiko Stuebner
2017-12-04 2:47 ` Chris Zhong
2017-12-04 7:46 ` Heiko Stübner
2017-12-04 16:08 ` Doug Anderson
2017-12-04 21:53 ` Heiko Stübner
[not found] ` <1486712654-15431-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-02-16 11:04 ` Kishon Vijay Abraham I
2018-02-16 13:05 ` Heiko Stübner
2018-02-16 13:59 ` Kishon Vijay Abraham I
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).