From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 1/3] dt-bindings: phy: phy-rockchip-typec: add usb3 otg reset References: <1515751704-13213-1-git-send-email-william.wu@rock-chips.com> <1515751704-13213-2-git-send-email-william.wu@rock-chips.com> <20180117220715.GA112833@google.com> <20180118174748.GA63108@google.com> <20180119214916.fegrzgcmbbdiesyz@rob-hp-laptop> From: wlf Message-ID: Date: Mon, 22 Jan 2018 19:33:05 +0800 MIME-Version: 1.0 In-Reply-To: <20180119214916.fegrzgcmbbdiesyz@rob-hp-laptop> Content-Type: multipart/alternative; boundary="------------3A80C245B8C828B3245428F8" Content-Language: en-US To: Rob Herring , Brian Norris Cc: Enric Balletbo Serra , William Wu , Kishon Vijay Abraham I , =?UTF-8?Q?Heiko_St=c3=bcbner?= , linux-kernel , "open list:ARM/Rockchip SoC..." , Linux ARM , "devicetree@vger.kernel.org" , Frank Wang , huangtao@rock-chips.com, Doug Anderson , Guenter Roeck , daniel.meng@rock-chips.com, John.Youn@synopsys.com, lin.huang@rock-chips.com, Enric Balletbo i Serra List-ID: This is a multi-part message in MIME format. --------------3A80C245B8C828B3245428F8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Rob, 在 2018年01月20日 05:49, Rob Herring 写道: > On Thu, Jan 18, 2018 at 09:47:50AM -0800, Brian Norris wrote: >> On Thu, Jan 18, 2018 at 06:20:09PM +0100, Enric Balletbo Serra wrote: >>> As Brian said commit 06c47e6286d5 'usb: dwc3: of-simple: Add support >>> to get resets for the device' introduced the support to get the resets >>> from dwc3-of-simple and the queued commit 'b7e63d95c14d arm64: dts: >>> rockchip: add reset property for dwc3 controllers on rk3399' started >>> using it. Without the latest I get errors like this doing bind/unbind >>> tests. >>> >>> dwc3: probe of fe900000.dwc3 failed with error -110 >>> >>> I just tested these series on top of mainline, I reverted my patch >>> because otherwise two drivers are requesting the same reset and fails, >>> and I did some of the bind/unbind test. They just worked fine, and >>> seems that this is right way, so this makes me think some questions. >> Actually, this was intended to coexist with DWC3 optionally controlling >> the same reset. It was written before the reset framework was rewritten >> to have shared and exclusive resets. Should this be rewritten to use >> shared resets? We'd have to modify both dwc3 core and the PHY driver. > Seems like abuse of DT to me. If you need to control the controller's > reset from the phy driver, then get the reset out of the controller > node. The phy node should describe the connections to the phy. I try to get the reset out of the controller, but I don't find a good way to get the reset ofthe controller associated with the given phy device node.  Is there an API like theof_usb_get_dr_mode_by_phy() to get 'dr_mode' of the controller? And we're trying to find another method to fix the RK3399 tcphy power on fail issue.If we get another proper method, we may not need these phy patch series. Best regards,     wulf > > Rob > > > --------------3A80C245B8C828B3245428F8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Dear Rob,

在 2018年01月20日 05:49, Rob Herring 写道:
On Thu, Jan 18, 2018 at 09:47:50AM -0800, Brian Norris wrote:
On Thu, Jan 18, 2018 at 06:20:09PM +0100, Enric Balletbo Serra wrote:
As Brian said commit 06c47e6286d5 'usb: dwc3: of-simple: Add support
to get resets for the device' introduced the support to get the resets
from dwc3-of-simple and the queued commit 'b7e63d95c14d arm64: dts:
rockchip: add reset property for dwc3 controllers on rk3399' started
using it. Without the latest I get errors like this doing bind/unbind
tests.

   dwc3: probe of fe900000.dwc3 failed with error -110

I just tested these series on top of mainline, I reverted my patch
because otherwise two drivers are requesting the same reset and fails,
and I did some of the bind/unbind test. They just worked fine, and
seems that this is right way, so this makes me think some questions.
Actually, this was intended to coexist with DWC3 optionally controlling
the same reset. It was written before the reset framework was rewritten
to have shared and exclusive resets. Should this be rewritten to use
shared resets? We'd have to modify both dwc3 core and the PHY driver.
Seems like abuse of DT to me. If you need to control the controller's 
reset from the phy driver, then get the reset out of the controller 
node. The phy node should describe the connections to the phy.
I try to get the reset out of the controller, but I don't find a good
way to get the reset of
the controller associated with the given phy
device node.  Is there an API like the
of_usb_get_dr_mode_by_phy() to
get 'dr_mode' of the controller?


And we're trying to find another method to fix the RK3399 tcphy power
on fail issue.
If we get another proper method, we may not need these
phy patch series.


Best regards,
    wulf

Rob




--------------3A80C245B8C828B3245428F8--