Received: by 10.223.176.46 with SMTP id f43csp350363wra; Thu, 25 Jan 2018 23:26:17 -0800 (PST) X-Google-Smtp-Source: AH8x2245S5vKRZpKu1JOWrVN/7BhkCN7n9JGPYJ7SqrSjI5xGP46oixIDstErpE3H/0XT0tq060e X-Received: by 10.99.127.24 with SMTP id a24mr14930708pgd.225.1516951577074; Thu, 25 Jan 2018 23:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516951577; cv=none; d=google.com; s=arc-20160816; b=bpCkJ4gqoCcIG9bGmp/7zhwTVqYXDwIOQYAu69K1QqHlsflCdYI4CLAFs4dm9AtVDX pvu0KucAe43QeA6xJyTlwrKPUbtuuAcXenBeF8MjsSwv0E9B3t6N/0ewS9N/AhU5w9/v H8sw7z80VwTaMxZstEG8LbqE+RMB6LQw87dnNMWHWw3T5ySWSy5MlOXYCEj1KQHuYnEl fOhjMJMv4uuStDWNvL7sTMXSMhs+SrmZXHDjBge8nI/wI0pZt/xbUSELkEWAoyxZ1qic IhikDjd7k4Sj2nWYp4P1vVwnzjpaTMI3TJ5XmCr/n32pQAT2QxLCa/QfGTOtvNPUnRHp 80Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=OYFAdVA0FhqWQGMEdjsH/VQO6rdq9luz6c7c70Ha6RY=; b=g3ODgLFKBpe0Jcx+bZb7bBuKYESzc/lak4Ov4o92J36YX+q1NNJPKb5zTk6wmvRkyU CSB3C+REwVlomx9frQrXoVYwDCOz69YUCVfOjmPgCwYOvWdmOKoaByMYYYcx/Bt97k13 1+Z0CLsrPkDGeFY2biFbyjb4VPEOH9frcpALQG8iZz2LGicRexYIaho+SBk7+20VeXwt Bx6ROIYEBlpkbizcFyZjZlHo7mKBY/jY9qaSx8nzsfeJwzpu6B0O+6eLrF2quc74hTt1 /Gc2CBGj1cnSSFJaWzjjRlFunx1vOP5rqJz7BPb6R9gk0AMeq6VJKBCtJQexs1+Ar4UK l9OQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si2617379pgc.746.2018.01.25.23.26.02; Thu, 25 Jan 2018 23:26:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964AbeAZHZf (ORCPT + 99 others); Fri, 26 Jan 2018 02:25:35 -0500 Received: from mail-bl2nam02on0077.outbound.protection.outlook.com ([104.47.38.77]:46560 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751588AbeAZHZd (ORCPT ); Fri, 26 Jan 2018 02:25:33 -0500 Received: from MWHPR03CA0026.namprd03.prod.outlook.com (10.174.173.143) by BLUPR03MB470.namprd03.prod.outlook.com (10.141.78.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Fri, 26 Jan 2018 07:25:32 +0000 Received: from BY2FFO11FD028.protection.gbl (2a01:111:f400:7c0c::160) by MWHPR03CA0026.outlook.office365.com (2603:10b6:301:3b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Fri, 26 Jan 2018 07:25:31 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) 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; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD028.mail.protection.outlook.com (10.1.15.217) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.444.13 via Frontend Transport; Fri, 26 Jan 2018 07:25:30 +0000 Received: from b29397-desktop (b29397-desktop.ap.freescale.net [10.192.242.114]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0Q2qOs9012849; Thu, 25 Jan 2018 19:52:25 -0700 Date: Fri, 26 Jan 2018 10:51:16 +0800 From: Peter Chen To: Sebastian Reichel CC: Peter Chen , Greg Kroah-Hartman , , , Ian Ray , Nandor Han , Fabien Lahoudere , Subject: Re: [PATCH 2/2] usb: chipidea: imx: Fix ULPI on imx53 Message-ID: <20180126025116.GA6921@b29397-desktop> References: <20180124171439.10721-1-sebastian.reichel@collabora.co.uk> <20180124171439.10721-2-sebastian.reichel@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180124171439.10721-2-sebastian.reichel@collabora.co.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-EOPAttributedMessage: 0 X-Matching-Connectors: 131614251311686871;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(396003)(376002)(39380400002)(39860400002)(2980300002)(199004)(189003)(105596002)(5660300001)(50466002)(23726003)(2950100002)(229853002)(9686003)(106466001)(97736004)(55016002)(1076002)(33896004)(76482006)(83506002)(4326008)(6666003)(336011)(81166006)(450100002)(53936002)(6246003)(77096007)(305945005)(107886003)(81156014)(356003)(73392002)(33656002)(26005)(83322999)(8936002)(8676002)(47776003)(2906002)(73972006)(82202002)(316002)(86362001)(81442002)(6862004)(16586007)(58126008)(54906003)(87572001)(68736007)(97756001)(104016004)(46406003)(33716001)(76176011)(498600001)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB470;H:tx30smr01.am.freescale.net;FPR:;SPF:SoftFail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD028;1:su8j9pyu94mRIjkf10gHb96M8dq6WWtbeb9sCp8GiEPNpb3DD+8oTLK+buRm8PmDac7jDMY8Gun3ip9eq7psMTs+iH9qkd/rpZECpo/PIE1IaLW3pC8f4M7vbCQHhEol X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d88a05f7-0aef-4ca3-e4d7-08d5648dfb46 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(5600026)(4604075)(2017052603307);SRVR:BLUPR03MB470; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB470;3:ME3mq6zsWqyZP3BRCh0GjcysYJdfRokznwMlns0u3PWRzrWMH8ASNa7KbCamBWFZHPO6RtcqwFF6v8tu902LdVk8N/jAihExVLGQWnwPb7HKTU05Hlbe4iN18NCpcbopxOAapIh2FNLtNgJTMSFpYQgTd0pLhX5n6IA1Oy/e9jkFz/tvb4eIqVu1O9w06FSz9uR2VCIf/ZTmzMxt7ePJCBvM2SbrQm0Y7riLiD/4foz6gJw/Qv1djQGRK5EMS0rNeYIhokFtBoUNsnHogBDv0ai4iPGxwbA3VFhCv+Hs0SYr5R1frKv10RtEu7jn5fDLWyLCURTjf5IdJsYbF/FWkmdiqhgMc4O/5ekMm+55k0k=;25:3jeN8jiTJRruV8SUFk9PsV11ZO28UerBm9L4ksk7vN1h+mP3OUfrujCMoPURGi98ctuwqDHg0dL2D9xvo1nK9YmL0WtG7Nw7sC3rLswYTxMLxd+e8dldNtc+Zi5uSmySLdu5T/jo8p3uopAjASCllFg7IImvnKdxuiDA7z/4L5HzgPS25b1ZLL5RhGaKgJMYL8bGuHo5fGKdpQcNNZNBP5axdJXk1rg5r7zFDthrd56nSUvk+nbAtGyCqZD2q4aL+EZw4fmfxtQNOCQS5Lg+1gWOQ5biFQxHtGDMoziCxqhRtleVOBg1BRSUS03Ho74rZ3FK+rqr8XkzqUR1pEPxVw== X-MS-TrafficTypeDiagnostic: BLUPR03MB470: X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB470;31:6G30b0hqmm+5euH0w6cJA0cLEn465B2aMCrKTZ8VVQF+mgm4HQPPbN5Nb0ptf0JsdAUhChrS1aKqUD75QwEY8a5xaR76q0dPSmyRbdH5KtlPESVRtQnzXnmJHlN2zqbrcVJ9mErWiqKLjFa0ubebuQGlqjm1e+0I+ZQTLwgSmzecatEh1FjxyPhpWmgsgcbG/zV9n+LI9WpFbRmvStup5/Xnml9sczn2LFq2GXYp1zU=;4:DaLCORYs7hiv6wz4+qmvOc1pYzeHcWPSmz66vJMRd385eI7UwisSf76eKkadwAVi7MCFPVsriJzhQpHHdJaIgu4XMxl8tMfqPR8WwF9oGgnhIiTWIjS0P2f1A9C0N6el3HTv3LwAVQb8Ggto21YeKNxHt1A753RkFdNvwko1/+0kfkfsQzIgPXhR/2W53uQTrUxWNc3thjGhJAw5XQGBy5dvV69CSS+nXAlAGpLMq0mGOiGx27fvc2GDskcGoxKHZvu2EmYiyttAunlYqurRkA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(5005006)(8121501046)(10201501046)(3231068)(2400081)(944501161)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123559100)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123565025)(20161123563025)(20161123561025)(201708071742011);SRVR:BLUPR03MB470;BCL:0;PCL:0;RULEID:(400006);SRVR:BLUPR03MB470; X-Forefront-PRVS: 05641FD966 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB470;23:wICNN1+LTSw+Wd5CcdDnyse0BTo4HshMlMfYV3hy5e?= =?us-ascii?Q?hLCpWrfqMZxIakI4vtRkWoRQ8mS77CfrgxeWv0NebC2xc5/Ok6AgzafBwnDv?= =?us-ascii?Q?CroQbcE4hMORvgcfS0AHRsDtwtd7Vtafuwc4QF6sOxMJ105aDsHzabQw0kDe?= =?us-ascii?Q?ONCZFW9pStkUL4X1zGk8aWXb+4Qfu1NN2bZipB7zLzBMAEKSyMURmfB2olNT?= =?us-ascii?Q?lOLaa30iYc3L9U3IsMa2sz0YyenpTEIzSCLUCh5TY2lpfobmIpRml0txYgwl?= =?us-ascii?Q?TPWw31ALAcWSaUkNHrS1CSYOEBNG5TPAcDlCMhsSZeqc6oNxIwpy5xb0J2yw?= =?us-ascii?Q?8bttGM6zrdnGIKJ8ufZ5ONSlA4Am6qqb15lf6oIkEg8KcCsp0lGOZnsFOJRe?= =?us-ascii?Q?uUOrSdIt5o4y4k7JaF7ulWiHlGD5iw73ukJ1WHL7zOgfebrIKpCMBsdIu77R?= =?us-ascii?Q?Wl1ISwjsr2H7/ovfxShlnVOKoXObmVNVAVH18e3cAxq9uK20l4FjoERTk+Ng?= =?us-ascii?Q?scVm0FiELqmK5lGJWmQl1YxH3JA2HeD6vx1xq1hWGXV5khO2+X56Ug6rw6kZ?= =?us-ascii?Q?/df/LNv7/TU4mBx5M7ybYphJaRSRXZDscAHfscAIWa12ZrhW8P2S7YK5iQq2?= =?us-ascii?Q?2EOPTqn/vATpSr/GXi+LtNY+IdG+I1zmIcsYsXe4FZDNPtg4A0EMIkVrZFp5?= =?us-ascii?Q?sPy3oklcj4dTWA2ifVUOtihGPKachdyHQrTBmU76pG/1N08tXYzwey8lTLb6?= =?us-ascii?Q?3Q6959GG70z9r2t/fhJE+4cakmWpsqzBpym8KaGP5oUQf6w7HIDvs1Fc+smV?= =?us-ascii?Q?OUSmX3bdZeg87nKuPx7m+c74j6DgRhf/tUenSLXhXlxZyMU2S8Did7PsYiKH?= =?us-ascii?Q?5OVqB2YqNCvLau7xQol9ZbrlBsEU46UFyxrAP5ZOxOzIyko6Uj+8HEKg7i9v?= =?us-ascii?Q?AV4kOd+HBLxccQ6hyYvfPcK5s0VmrwpKL9hiJ69zpMF/9zYV5E4Zs/oP9PM5?= =?us-ascii?Q?0moQFJSoGEyvMKm65K/wvUS+2SyVJy6mSUTmOx8goGGdnSNSgrPcgvOKsB9Q?= =?us-ascii?Q?uSPkH2YGfYq1os12RykO9yq/78thISjDlPzYI4uu/pnoJoZJnI1GltxWzJ6c?= =?us-ascii?Q?AIjdQ9+anRvL1MZKuT8lh+k0PgIlf3XwpzwT5/Hy05bwAXjMDGg/e4YPP017?= =?us-ascii?Q?pqF831iUGkCOHEQO5O0TWlfi4QTZdwxltyM9EqmTRJM5gVxxPhL63HnW7twk?= =?us-ascii?Q?wlTt87eXKH7z3SRGEzYTE/lFs5oC4EcuvK98STKbAwZNgnn+dsEXj9Yg/vkg?= =?us-ascii?Q?/zVsqqUUaPy6qFT3hRfIwYOl6pKmvFzCISt1dyStTph1d9tjgVvc2Bawml9y?= =?us-ascii?Q?VbF8xRYjG78lR0BijKIZgkW3Q=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB470;6:gRX/qc7qh/dYan1xW9wbRMxDpPidERavNI7c5vm+Z9lZ6BvmGPsWCwk9HCzo3Yxs80e9cTgxIDaY+cbyJtR0KvNwd+je4L+srctMoOBwjTz0aSpF5OTAt57h/ZkwNgZcFli0qeVyQShSug9GchaoMPujqyseA/m1WD6ynfFpFm407euyF7pxDx1NyEtBJH5g2sx8ixEe6dmtqk++P+mqZI2B3sVgRIepC9iRJIQdZmXhj5NWdMlroo3sXnI9+dzCsJiJrLzf40VWXeziRmX/7TFHj8l+g5vQsREaMPKQqt+g/o7xgG2KRN4g8yhU4SHGuquXiu8nO/XJeSp8iH03t0n+547UZ+pSH0woG8okMXo=;5:xvT78CyEUv7m9Ptxd601Uda1DCIfJaLTDnyeLDFl8rbGH5p0yo4xDJqEIMLns0C1Q/bosshF2wTRWCe9wqM7l/abjJnWaTn3yXyDJujCHgA9GDmiGTaNb2XfFCKeKZ/dyJlkSHlNxGbJyRVSmqHUP5xX0uIdF4u7KPrl/YeB/o0=;24:7Q9gI+UpnoNveCSeG+hFH2O0GZBnUHeSdKEiuTASf/2Qu8jt6USE1kNp1Q5deJ8xJSE+hiam1cBBNir7LnEeksKoZPCgVqgiwc/MH/pX0fk=;7:QHXK5wT8tGtA8AEAkKKfbbq9sbcaFF6ZheLH+yyOCphQzy5wD5C1e7tEAIdjKvP0jwWZRdxopyO4O3YlW5gUjOuXg7ztny2ZzhyCmKzLju3rWPrsgc5h0W9eloOsLxPx5ZrHKqXS/pB9Lm7zTLhg92EH+gUzPOtROvqgGzrCnzvuVdrhuzZRRi7wuLQ8hYr14CRmokpLjzar+8u4TIxtNXrTyyuQ0jTeOa6xo0oB5egBsGAH/9nj2UDtiyLKiP8j SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 07:25:30.7474 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d88a05f7-0aef-4ca3-e4d7-08d5648dfb46 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB470 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 24, 2018 at 06:14:39PM +0100, Sebastian Reichel wrote: > Traditionally, PORTSC should be set before initializing ULPI phys. But > setting PORTSC before powering on the phy results in a kernel freeze > on imx53 based GE PPD. As a workaround this initializes the phy early > in the imx platform code and disables phy power management from the > core. > > Signed-off-by: Fabien Lahoudere > Signed-off-by: Sebastian Reichel > --- > drivers/usb/chipidea/ci_hdrc_imx.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c > index de155c80eb70..e431c5aafe35 100644 > --- a/drivers/usb/chipidea/ci_hdrc_imx.c > +++ b/drivers/usb/chipidea/ci_hdrc_imx.c > @@ -83,6 +83,7 @@ struct ci_hdrc_imx_data { > struct clk *clk; > struct imx_usbmisc_data *usbmisc_data; > bool supports_runtime_pm; > + bool override_phy_control; > bool in_lpm; > /* SoC before i.mx6 (except imx23/imx28) needs three clks */ > bool need_three_clks; > @@ -254,6 +255,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) > int ret; > const struct of_device_id *of_id; > const struct ci_hdrc_imx_platform_flag *imx_platform_flag; > + struct device_node *np = pdev->dev.of_node; > > of_id = of_match_device(ci_hdrc_imx_dt_ids, &pdev->dev); > if (!of_id) > @@ -288,6 +290,14 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) > } > > pdata.usb_phy = data->phy; > + > + if (of_device_is_compatible(np, "fsl,imx53-usb") && pdata.usb_phy && > + of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI) { > + pdata.flags |= CI_HDRC_OVERRIDE_PHY_CONTROL; > + data->override_phy_control = true; > + usb_phy_init(pdata.usb_phy); > + } > + > pdata.flags |= imx_platform_flag->flags; > if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM) > data->supports_runtime_pm = true; > @@ -341,6 +351,8 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev) > pm_runtime_put_noidle(&pdev->dev); > } > ci_hdrc_remove_device(data->ci_pdev); > + if (data->override_phy_control) > + usb_phy_shutdown(data->phy); > imx_disable_unprepare_clks(&pdev->dev); > > return 0; > -- Applied both, thanks. -- Best Regards, Peter Chen