From patchwork Wed May 30 17:34:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10439469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70281601D3 for ; Wed, 30 May 2018 17:34:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DA6F28D2C for ; Wed, 30 May 2018 17:34:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51DEE291F1; Wed, 30 May 2018 17:34:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E6A728D2C for ; Wed, 30 May 2018 17:34:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbeE3Rej (ORCPT ); Wed, 30 May 2018 13:34:39 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36657 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751817AbeE3Reh (ORCPT ); Wed, 30 May 2018 13:34:37 -0400 Received: by mail-pl0-f66.google.com with SMTP id v24-v6so11511498plo.3; Wed, 30 May 2018 10:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=elJRYvUTElZnJYzFuIWV6Yo7t3oOWnQ4z+qpm+jw2j8=; b=VLefe2lpCl3l9XlIcxYXLql0cKwzLW7S3y08PQxCXQ/p9X/lNCNqguF/Qi6NGZtURN xOOafd9J++MSZafcslWvRAJvNmi1I+byRVE8i8wCORemMaDnkrsJ+v5xtk7CdAAbfBrN Lh+Ygz0HdjSY/CnfvOdlQLkvd8HC3uOBtEGnTmI35OWOjt2YGW25v059LrKt49O7RHCm BNvokBr96zmztQpWn4HoVu3B3vfNpCCj5ot+ESdW7vuL+wKji2Rp1tzxgaWs9E6rzu85 nMckVIVkoxcu+eEZZHGz7qM6yhhcBtjTXeE41t5uOquggWmcofq0stQHcUp6IhKbfhND zOGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=elJRYvUTElZnJYzFuIWV6Yo7t3oOWnQ4z+qpm+jw2j8=; b=b5/7QxDuVeJCIoibFpPZRh/U2meJrunKH9doT5UM3YmM2UetJmSFHudBJLPpru3cee u+SJTP/r4RSa+8SyxqjACAXQ0srHRxubH1KazF6KlovCh4tlSprEbs7s6ejCQlfy1X/9 6cMVfzNbD5UkrDSGSZNtljqEZVPxqF1o3GATahdsvV8FvnYaEr1C9HdpF6YDdy3sLf9O J++SctWHJh6/p8n/hFBrKHO+jI4U1h3YqUE7bj+t2gNsyjnV+QOWN8Ri+5cDot+Wah/I 0nEoz4877naeyzgJnqCObLnXYD1sZ0Zhmt2syswfhSj7AICMOwTnfMnHrI9n31bfzUGL Lh6Q== X-Gm-Message-State: ALKqPwcMMGNU95XyElCrVeEtIEIn9VXUnjwCnSfdFJHOe6hlgBHRCbnt hK4MKryxsOPwqpe2EnHziv0= X-Google-Smtp-Source: ADUXVKKMF1clviDi3ZNl6/S+Xz0j0Q1cP0NPPoiBnreQ9QzarKUE+HgwyWfwK7heEkR0lZiJkQubZw== X-Received: by 2002:a17:902:7844:: with SMTP id e4-v6mr3663166pln.296.1527701676789; Wed, 30 May 2018 10:34:36 -0700 (PDT) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id r5-v6sm46977466pgp.81.2018.05.30.10.34.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 10:34:35 -0700 (PDT) From: Andrey Smirnov To: Greg Kroah-Hartman Cc: Andrey Smirnov , Peter Chen , Nikita Yushchenko , Fabio Estevam , Lucas Stach , Chris Healy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH] usb: chipidea: Fix ULPI on imx51 Date: Wed, 30 May 2018 10:34:14 -0700 Message-Id: <20180530173414.6121-1-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Workaround introduced for i.MX53 in be9cae2479f48 ("usb: chipidea: imx: Fix ULPI on imx53") seems to be applicable in case of i.MX51 as well. Running latest kernel on ZII RDU1 Board (imx51-zii-rdu1.dts) exhibits a kernel frozen on PORTSC access and applying the workaround resolves the issue. Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: Nikita Yushchenko Cc: Fabio Estevam Cc: Lucas Stach Cc: Chris Healy Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Fabio Estevam Tested-By: Nikita Yushchenko --- drivers/usb/chipidea/ci_hdrc_imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index e431c5aafe35..19f5f5f2a48a 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -291,7 +291,8 @@ 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 && + if ((of_device_is_compatible(np, "fsl,imx53-usb") || + of_device_is_compatible(np, "fsl,imx51-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;