Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751514AbdFGBnQ (ORCPT ); Tue, 6 Jun 2017 21:43:16 -0400 Received: from mail-sn1nam01on0076.outbound.protection.outlook.com ([104.47.32.76]:8008 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751453AbdFGBnM (ORCPT ); Tue, 6 Jun 2017 21:43:12 -0400 Authentication-Results: spf=softfail (sender IP is 192.88.158.2) smtp.mailfrom=gmail.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=gmail.com; Date: Wed, 7 Jun 2017 09:43:12 +0800 From: Peter Chen To: Fabien Lahoudere CC: Stephen Boyd , Peter Chen , Peter Senna Tschudin , Felipe Balbi , Greg Kroah-Hartman , "open list:USB PHY LAYER" , open list Subject: Re: [RFC] usb-phy-generic: Add support to SMSC USB3315 Message-ID: <20170607014312.GA10588@b29397-desktop> References: <1495563396.12055.93.camel@collabora.co.uk> <20170523210022.GN20170@codeaurora.org> <1495708587.12055.97.camel@collabora.co.uk> <1495789230.12055.104.camel@collabora.co.uk> <20170602220010.GQ20170@codeaurora.org> <1496653020.31741.2.camel@collabora.co.uk> <20170605094330.GA21071@b29397-desktop> <1496656346.31741.4.camel@collabora.co.uk> <20170606015528.GB26189@b29397-desktop> <1496770570.22734.3.camel@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1496770570.22734.3.camel@collabora.co.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-EOPAttributedMessage: 0 X-Matching-Connectors: 131412733896090011;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.158.2;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39380400002)(39850400002)(39400400002)(39840400002)(39860400002)(39410400002)(39450400003)(2980300002)(189002)(199003)(377424004)(24454002)(9170700003)(73972006)(83506001)(498600001)(97736004)(104016004)(77096006)(4001350100001)(105596002)(6260500002)(229853002)(54356999)(106466001)(5660300001)(82202002)(189998001)(53936002)(76176999)(83322999)(33656002)(81442002)(110136004)(38730400002)(6246003)(73392002)(6666003)(230783001)(93886004)(23756003)(6306002)(33716001)(47776003)(87572001)(50986999)(9686003)(55016002)(8656002)(8936002)(50466002)(54906002)(356003)(2950100002)(966005)(2870700001)(6916009)(2906002)(4326008)(86362001)(305945005)(81166006)(76482006)(8676002)(1076002)(18370500001)(41533002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB167;H:az84smr01.freescale.net;FPR:;SPF:SoftFail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD042;1:WE+u+lnWfoMGEHjEvlMlTlmTfRE2lpTFNjZJSiJ5dZ5GqVcMbQUoGgaWGcBkl5j+4aXlNlSGuJT0cgb47c9nm29G9S8Q/CbRE2o3LpRvoZa8sgEkeI3/x88PR7XRjLrgDNGsMW9UB/qNT/vG7si91tXSmjtNuWLCdKlXXyYPDFacX240TLGG8W7bZtBhe1k/xpMCob7LzNZVhh7itVo5LIYkMF/9rnT3owMWpSZ7Fl+EK3TZdajUIdeNg+utj2tsFQW4R5aR9eBfrthyvzbK+2Em25wFxthAGis19ykECO9oY1pFvwElPlk40cAotSRffWtHN74+iY33X4i6zQZqj+pb2885j1wMlYDPrH6WondBRPvgg/flcNEh2qhnugqfHGf02XaD4VD/BM7JMFaT5/izcACASnjexjKObqmxcU9jY+vQXRF29Hj+/5kQq7UwX4wFNmjP0zc6gVXyasOOvkNm1PbBm5XZF84eAKzBJcaYQleysmZZ3gh+3FWXxaRdII3VYWWRM6Naf3kAG+ShJ9ZUJivuI56JmE/RkvP5XaQ3ZnxPUCl2kmdkEL1o+ujP X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR03MB167: X-MS-Office365-Filtering-Correlation-Id: 3cb4e06e-5ea1-4f1f-e19b-08d4ad468d4d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BLUPR03MB167; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB167;3:Ib5697ZxwC8swQyX5IRELRvIuIMRjXOIP18BVhMkQM+MDjA3Rec2CP+zZWf1jvIldkModpbzGVbqhWWWjAaXdTY41NAMiYCJ+7CUr5Z251iXzA1Z61bjYuGd5xKfavYi7o2Q3XSH8Ck8SoefFEnUsRotbKFZmSAzXXpuvMqBf1a1LGpZRObF4wPw8hPlVVpNc2mPMIp43lbfWZGj7TtUWrewOZ6R9pMWQ8lcmW5mDLfjvFryo2ZwKBmtZ3zAek1C5N629kjIv7InitXNTjVc91jve6THvfqG8XWI9/DoEnB10t1f0y9kv7bAyDHaOVdJotFlJ+zF/8U9TomUu6xB0/6rsicpwApHjFkqnOmEzNDU1O87LYAxeMNEol8PPCGZqAm1H7+Ylz/kR7jH5NCfGSnG3pL9hDpeNO/4/puztrQOThVvBx9JasL0ypxZSDDM;25:gCDG14axkL8SIGjZKxu6cBAlv4chqM9zwnPHql+Kl0wwy2/2PQUjO2dOxWBDbuRJ41O+zWV3GtkRdF4/rDxA4e5K0OJVrBXf3oOgf++R/ZxsI8UQ3JwpgUv7wibJopDQgKrXK7uWFm0X9hR0/XnPbG87debrlP+MAh15t+wvlMDyP68EdX7rY+c1yfDzIk2UtRgLAI7o+OsMuUIq8+clou1H8ealK8jiY3XZ4VP36VkJJFjwEeMueb2hadIPn2BT0x9UuOhFPSC58+L+kU5rouJFkC84Ihem+YedbJOSqPrRwybIwDBOdueMRhFh/6253m6w/AkrkgFE5tylg6kSSIm7YNzISPiNxoH5EJ1I6AREjaqCa0dmZTKCJhnDxUvDV6Rb0/B+vDjFQXaSL1Mwi8EyB02gc9JtdrghqcRSv3IfD0/01UG29Q6+2I7DExDFrb8hHAcAGH4jY8uHHV+6SEGpAbO2reTqp21IjAh6S54= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB167;31:uKDzV6ocWqCNheBSJIRy8/fR3wyOSuuSRC8mD1MyOrzfAZLJ+oC0AZsqaMvSvqB+hujwJ/RKAkJK/YJ3IWYLl79+i8ErCV6oI+/T7n95bT9eUVTk9yy6pqEqYFv6kG8Z9pUvp9oScQuDxPOz88XNK8EIgTONZD6pxY1W4Xkp/88RNFYTey3L2R5Lwsz6x1llmJ/KPNItyLmXaYglzB2WAMY7gmNT1QCv3d9sDXcae8rEZrItkgYvNptcJXiCVtK+YxPRZIekJGH1O+vopv38Kw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(20161123559100)(20161123556025)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123561025)(20161123563025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BLUPR03MB167;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BLUPR03MB167; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BLUPR03MB167;4:rTMibVSu8m9bvm5JlMClB7xr3LwAWlptN/pXUgvGD?= =?iso-8859-1?Q?QhXkM4/NFMDDbMXfSS4c4Mw4yB/SogcVt85X/mDGODT7dBrJeQVNhTat2d?= =?iso-8859-1?Q?wk/cAoy+n6ZeVxIown5D8zBo4j0I3uu1oN2srF/sfMFiDNp+zZmyoqTUa7?= =?iso-8859-1?Q?Yo9DOqhpYxIJQG/m1W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= =?iso-8859-1?Q?1VnvToL4v4hHZFgFy79vA9uDxPiuj/sqBkXXDDjrNQcgZrNWKLX0bSnyOa?= =?iso-8859-1?Q?tT9JqLdqI3VUsehOU/Uf9SCm/+EK29+Rgp6wLJl/6HArzlQcstdHVqxlSs?= =?iso-8859-1?Q?GjWPfOBGWWPmmQHa8dsFQYn69Xa4DKqPzmIzSDouRyjhHlN9UEG/PMV6/A?= =?iso-8859-1?Q?60kqWCzXtWqgpAqtexr9bRUywe1h56Dh+9QVA=3D=3D?= X-Forefront-PRVS: 03319F6FEF X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BLUPR03MB167;23:Wl4wdCZa3HUohhGE8eGPPG2KrRxbyaotj5SX1y4N?= =?iso-8859-1?Q?7jXc+vEHmb95oic6I0eyKCrcv7ofrXrJ8ogTi9SKM8Z0+UH95iJbtRoS3V?= =?iso-8859-1?Q?Ei2ZCqN5G+YAYD/HITOZcT9tL9Q1crDb+4wD4tTr+A4C4tRyeY3BEU92Ng?= =?iso-8859-1?Q?6vjMUxdyxLY41sUDdcR+cBs7ZQ8weJYqFolAEwZqw8z6/NHeHAlU/2xglz?= =?iso-8859-1?Q?+S8XDrzVZyK8qiaxax3wSkl1sS8ZFjaDG45+O0Dbu9kivxTcZOyiLlwJ81?= =?iso-8859-1?Q?/sdNG9c6H1EdQ50Z1D/osGksG6CKXXkMEEoORkWZWhvrLaCbgHLKjdjZav?= =?iso-8859-1?Q?CoAQaEvpZ1IpjnLrQWFsev7VEIlidmq8W4DXFO/tQAYnCFch08SO3iMNnV?= =?iso-8859-1?Q?jouo28+F989+HQ7pB5HYqrcb3/sv7pXQQK8C5VRaRC02/poEDA4fN2teIK?= =?iso-8859-1?Q?gfU0RuY9auksd03yzs/t7XI0OAiNXF5KRwgaD66HJksNU/9nFdNtfz4h1P?= =?iso-8859-1?Q?q0qDRVeHaf9UJB0sajmf+MIYG92Bp+XjJwxL9fYaJDZrS9YT5GQm71GM0C?= =?iso-8859-1?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UjsLbwVxo7owwR9DrSFExscMTSVHE0HfL4RDPNx+NjTkxhn/iNKwOumJuaeX/aw9DWFnWPSn1i1UlbErGkQiV39RzQXHBO3giPj4gBch3zVDRMdY8Mg55Jkzh9PboiKfdSMMeq6XEEiMwcrBgwBEFSeK71OMElziMTaEwbZ5//DFUNT9Yt9q8/1PGjtpvfjXP8BFE27z0JDN9+iE9O06Qc6FKxWj0oCuukJMv7AReKfWYTOapIy0i8dAEEj8iIKXkYZ8c1VG0+eFSwUu7duovuzir09KJJMeUOCFY2aST7PidYCP2iUL4gimQbvSpuLglHmEPmewIAirQchpkk/gY0j7c6n7W8wJYJlsyHaQjZQPtG76OC6QrNJFaLRkg==;24:NPuplv58vJgssVILets9Kh29fV0FtHorrr0q0MpQ+jtne8JESvJNM3ECmu/zCY9B7zerU3JKQj/2L12LVVx6lYcdzMca/WiWOhDtn44bQqY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB167;7:Z12Hs7B1pRMDscOtwfZQvlIRiABIk2dJnpuOCB9fCZ3uXwDCcxLi7WRXQc5CwdK5CnikN8h2kug+MpGuIkkMlYzYsmllFB1cvu3ndTYFADMMOwC1qGk5kG7fGOa9EbFrIFX698zYL6qq154yKMe5vn3II83NWmBVg8GOxr2sYPmHcAaB3laZGAQzoKWQSpDEH+Ej2LUiPNBkQ8swhNJ57uVJdIjvg8bC4DU4U0Zl6A62OvTcq4wWYqGM1xhH9H8cu4BEHbUqYiY1gasRl4UKivJPzuBW1ZxSbtu3aSRmsjGED5x3kLuhYXCV2D5WKbh2Goe6umD1Vnhx2tVnuPjqRg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 01:43:09.2501 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB167 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7205 Lines: 185 On Tue, Jun 06, 2017 at 07:36:10PM +0200, Fabien Lahoudere wrote: > Hi Peter, > > On Tue, 2017-06-06 at 09:55 +0800, Peter Chen wrote: > > On Mon, Jun 05, 2017 at 11:52:26AM +0200, Fabien Lahoudere wrote: > > > On Mon, 2017-06-05 at 17:43 +0800, Peter Chen wrote: > > > > On Mon, Jun 05, 2017 at 10:57:00AM +0200, Fabien Lahoudere wrote: > > > > > On Fri, 2017-06-02 at 15:00 -0700, Stephen Boyd wrote: > > > > > > On 05/26, Fabien Lahoudere wrote: > > > > > > > Hello > > > > > > > > > > > > > > I modify ci_hrdc_imx_probe to bypass?"data->phy = devm_usb_get_phy_by_phandle(&pdev- > > > > > > > >dev, > > > > > > > "fsl,usbphy", 0);". Everything works as expected and call ci_ulpi_init. > > > > > > > > > > > > > > The problem is that in ci_ulpi_init, before calling "ci->ulpi = > > > > > > > ulpi_register_interface(ci- > > > > > > > > dev, > > > > > > > > > > > > > > &ci->ulpi_ops);" (to initialize our phy), "hw_phymode_configure(ci);" is called which is > > > > > > > the > > > > > > > original function that make our system to hang. > > > > > > > > > > > > > > Our phy is not initialised before calling ulpi_register_interface so I don't understand > > > > > > > how > > > > > > > the > > > > > > > phy > > > > > > > can reply if it is not out of reset state. > > > > > > > > > > > > I haven't see any problem in hw_phymode_configure(). What's the > > > > > > value of ci->platdata->phy_mode? USBPHY_INTERFACE_MODE_ULPI? If > > > > > > you phy needs to be taken out of reset to reply to the ulpi reads > > > > > > of the vendor/product ids, then it sounds like you have a similar > > > > > > situation to what I had. I needed to turn on some regulators to > > > > > > get those reads to work, otherwise they would fail, but knowing > > > > > > what needed to be turned on basically meant I needed to probe the > > > > > > ulpi driver so probing the ids wasn't going to be useful. So on > > > > > > my device the reads for the ids go through, but they get all > > > > > > zeroes back, which is actually ok because there aren't any bits > > > > > > set on my devices anyway. After the reads see 0, we fallback to > > > > > > DT matching, which avoids the "bring it out of reset/power it on" > > > > > > sorts of problems entirely. > > > > > > > > > > > > > > > > Yes the phy mode is configured to USBPHY_INTERFACE_MODE_ULPI. > > > > > Indeed, this phy need to be out of reset to work. For example everything works fine if I > > > > > call? > > > > > "_ci_usb_phy_init(ci);" before calling "hw_phymode_configure(ci);" > > > > > This function only init reset GPIO and clock. > > > > > > > > > > For information, the original patch I have to fix the issue: > > > > > > > > > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > > > > > index 79ad8e9..21aaff1 100644 > > > > > --- a/drivers/usb/chipidea/core.c > > > > > +++ b/drivers/usb/chipidea/core.c > > > > > @@ -391,6 +391,7 @@ static int ci_usb_phy_init(struct ci_hdrc *ci) > > > > > ? case USBPHY_INTERFACE_MODE_UTMI: > > > > > ? case USBPHY_INTERFACE_MODE_UTMIW: > > > > > ? case USBPHY_INTERFACE_MODE_HSIC: > > > > > + case USBPHY_INTERFACE_MODE_ULPI: > > > > > ? ret = _ci_usb_phy_init(ci); > > > > > ? if (!ret) > > > > > ? hw_wait_phy_stable(); > > > > > @@ -398,7 +399,6 @@ static int ci_usb_phy_init(struct ci_hdrc *ci) > > > > > ? return ret; > > > > > ? hw_phymode_configure(ci); > > > > > ? break; > > > > > - case USBPHY_INTERFACE_MODE_ULPI: > > > > > ? case USBPHY_INTERFACE_MODE_SERIAL: > > > > > ? hw_phymode_configure(ci); > > > > > ? ret = _ci_usb_phy_init(ci); > > > > > --? > > > > > > > > Currently, the hw_phymode_configure is called twice for ULPI PHY, the > > > > two execution are between _ci_usb_phy_init, would you test which one > > > > causes hang? If the second causes hang, you can make a patch for > > > > hw_phymode_configure that if the required PORTSC_PTS is the same > > > > the value in register, do noop. > > > > > > The first one hangs,?_ci_usb_phy_init is not called due to hang. > > > > > > > So, you need to comment out hw_phymode_configure at ci_ulpi_init, and you > > can't get vid/pid correctly, right? If it is, we may need to add power on > > sequence at chipidea core driver (ci_hdrc_probe) for clock and reset things. > > > > http://www.spinics.net/lists/linux-usb/msg157134.html > > > > I am wondering if we can call ci_usb_phy_init before calling ci_ulpi_init, > > since we need to let hardware be ready before reading vid/pid. > > Stephen & Fabien, does that work for you? > > > > I test the following patch and it works. But I am not sure that we can move safely ci_ulpi_init. > I will investigate more tomorrow if it is a problem for other phys. > > Is it a good approach? > > Subject: [PATCH 1/1] power on phy before getting vid/pid > > Signed-off-by: Fabien Lahoudere > --- > ?drivers/usb/chipidea/core.c | 12 ++++++++---- > ?drivers/usb/chipidea/ulpi.c | 19 +++++++++++++++++++ > ?2 files changed, 27 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > index 79ad8e9..26889e1 100644 > --- a/drivers/usb/chipidea/core.c > +++ b/drivers/usb/chipidea/core.c > @@ -879,10 +879,6 @@ static int ci_hdrc_probe(struct platform_device *pdev) > ? return -ENODEV; > ? } > ? > - ret = ci_ulpi_init(ci); > - if (ret) > - return ret; > - > ? if (ci->platdata->phy) { > ? ci->phy = ci->platdata->phy; > ? } else if (ci->platdata->usb_phy) { > @@ -909,6 +905,14 @@ static int ci_hdrc_probe(struct platform_device *pdev) > ? ci->usb_phy = NULL; > ? } > ? > + /*? > + ???We move this in order to have phy reset and gpio information > + ???before calling ci_ulpi_init. > + */ > + ret = ci_ulpi_init(ci); > + if (ret) > + return ret; > + > ? ret = ci_usb_phy_init(ci); > ? if (ret) { > ? dev_err(dev, "unable to init phy: %d\n", ret); > diff --git a/drivers/usb/chipidea/ulpi.c b/drivers/usb/chipidea/ulpi.c > index 1219583..1c272e4 100644 > --- a/drivers/usb/chipidea/ulpi.c > +++ b/drivers/usb/chipidea/ulpi.c > @@ -73,9 +73,28 @@ static int ci_ulpi_write(struct device *dev, u8 addr, u8 val) > ? > ?int ci_ulpi_init(struct ci_hdrc *ci) > ?{ > +????????int ret; > ? if (ci->platdata->phy_mode != USBPHY_INTERFACE_MODE_ULPI) > ? return 0; > ? > + /*? > + ???This is the content of _ci_usb_phy_init from core.c to power on the phy. > + ???Duplicated for test purpose only. > + */ > + if (ci->phy) { > + ret = phy_init(ci->phy); > + if (ret) > + return ret; > + > + ret = phy_power_on(ci->phy); > + if (ret) { > + phy_exit(ci->phy); > + return ret; > + } > + } else { > + ret = usb_phy_init(ci->usb_phy); > + } > + > ? /* > ? ?* Set PORTSC correctly so we can read/write ULPI registers for > ? ?* identification purposes Your above patch is not accepted. I don't know ULPI PHY behavior at imx53, would you please make clear below things: - Before setting phy mode at portsc, which you need to do? If they can't be in phy_init, you may register a power sequence instance. - Can you read pid/vid correctly, and which way you would like to match your ulpi device, pid/vid or using device tree, see ulpi_match -- Best Regards, Peter Chen