Received: by 10.223.185.116 with SMTP id b49csp1026251wrg; Fri, 16 Feb 2018 11:03:15 -0800 (PST) X-Google-Smtp-Source: AH8x224LhxjG+KtGhi0SUYI+wiQCtwGVbO3zHr/f2C4vJSUNcokCHVviwLcMWgMenSGvNTTUQor0 X-Received: by 10.101.90.65 with SMTP id z1mr4410597pgs.126.1518807795525; Fri, 16 Feb 2018 11:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518807795; cv=none; d=google.com; s=arc-20160816; b=wqhxgRkXMLKIGkwi1pkQKAFk8QFsuEe61r1w32Fc5A2b0untrhCUvbT+SjtZs5oCHX ZQsRcCwZUaTE2ly80NGuIDGkyfb05U+5MHl8MPVJE/acWrJgKJtyAURZHEYCKmTHlcW6 x7sNy6+CqqKJ10vjsrsvhqmGeWp4UCMcauFokVsKsjuOL4VyPKxAsEeWMHbnr/BQLSdb mYeAKZnS/pWTVV74DqS129huTJdHB7j1gTYphJqsrCfAK0fXgWK65/pYTAZnBGPKk22+ Ejeo/gl+NlexPM0AlczC45jE6D1mVGk8WfuMpixmK5w3dx8HBtTiDiRp5weQiKbkec/s 9IAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=D1xY+I0FAhTb70Ew2sWjcJRs+Ezu/D2L166WW8Ee2dI=; b=pfnJDmnuPhrEgyAaQHamg6lOTGGMb5h9rHzklTM/E80HghbiTz0FPF/tAjLTzBHTQ4 es/Bj1XGpDjnZfg3FFbFHIRrpi4rRi6llGim48eegjGynk99c60sT2k3tqqDwxtYGvPN 9whDG68MBw51PTFs+Bek0NyjEs7HYdWK5bmowKb4niHsn+4KM9B4Zw0biWfjdA5wiLP7 4WR/2ip74j9PHDa+NfQTM97v0nBsgRKNkiKeK7wZDAEMUMD96CCbPEAmUI08J1l234FA C7lCJTpjjkleeFhqumfCO8lDw/9voXqn07r1suMXc9IG6Hs8Q/O5gMwhwQkewRIXqnco Pegw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NzuaqAqm; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si1767995pld.637.2018.02.16.11.03.01; Fri, 16 Feb 2018 11:03:15 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NzuaqAqm; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935455AbeBPLVO (ORCPT + 99 others); Fri, 16 Feb 2018 06:21:14 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:33092 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935394AbeBPLVN (ORCPT ); Fri, 16 Feb 2018 06:21:13 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1GBKlVJ022347; Fri, 16 Feb 2018 05:20:47 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518780047; bh=NCxtEG/5a1TEK2G8XShsjZ2LSaG5L8xsFtIjNPbPuLY=; h=Subject:To:References:CC:From:Date:In-Reply-To; b=NzuaqAqm0YJFQGe3uV7WItX034wuY/3DBsg3qxVurNAV+/sf8ztJDOu7xbQrEElvK foOpfSVl5RkTaTbxgW77TbGRNd6DK5PtWgagNYaxN3qkDQ6W3lQy4Yzgm0mdy7RReA 7Dm6T4jM8ycAZfZOLQhdjjw61FafDfUW1itTmwV8= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1GBKlvX030873; Fri, 16 Feb 2018 05:20:47 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 16 Feb 2018 05:20:46 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 16 Feb 2018 05:20:46 -0600 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1GBKhSc025463; Fri, 16 Feb 2018 05:20:44 -0600 Subject: Re: [PATCH] phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS To: Maxime Ripard , Chen-Yu Tsai References: <20180119092541.7508-1-wens@csie.org> <20180119144512.dqqbywavhwsyma2f@flea.lan> CC: Hans de Goede , , , , From: Kishon Vijay Abraham I Message-ID: Date: Fri, 16 Feb 2018 16:50:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20180119144512.dqqbywavhwsyma2f@flea.lan> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 19 January 2018 08:15 PM, Maxime Ripard wrote: > On Fri, Jan 19, 2018 at 05:25:41PM +0800, Chen-Yu Tsai wrote: >> The AXP223 PMIC, like the AXP221, does not generate VBUS change >> interrupts when N_VBUSEN is used to drive VBUS for the OTG port >> on the board. >> >> This was not noticed until recently, as most A23/A33 boards use >> a GPIO pin that does not support interrupts for OTG ID detection. >> This forces the driver to use polling. However the A33-OlinuXino >> uses a pin that does support interrupts, so the driver uses them. >> However the VBUS interrupt never fires, and the driver never gets >> to update the VBUS status. This results in musb timing out waiting >> for VBUS to rise. >> >> This was worked around for the AXP221 by resorting to polling >> changes in commit 91d96f06a760 ("phy-sun4i-usb: Add workaround for >> missing Vbus det interrupts on A31"). This patch adds the A23 and >> A33 to the list of SoCs that need the workaround. >> >> Fixes: fc1f45ed3043 ("phy-sun4i-usb: Add support for the usb-phys on the >> sun8i-a33 SoC") >> Fixes: 123dfdbcfaf5 ("phy-sun4i-usb: Add support for the usb-phys on the >> sun8i-a23 SoC") >> Cc: # 4.3.x: 68dbc2ce77bb phy-sun4i-usb: >> Use of_match_node to get model specific config data >> Cc: # 4.3.x: 5cf700ac9d50 phy: phy-sun4i-usb: >> Fix optional gpios failing probe >> Cc: # 4.3.x: 04e59a0211ff phy-sun4i-usb: >> Fix irq free conditions to match request conditions >> Cc: # 4.3.x: 91d96f06a760 phy-sun4i-usb: >> Add workaround for missing Vbus det interrupts on A31 >> Cc: # 4.3.x >> Signed-off-by: Chen-Yu Tsai >> --- >> >> This list might get longer if the newer AXP8xx PMICs also have this >> behavior. We could switch to a boolean in the per-compatible data, >> or just always use polling. The yet-merged R40 support will have this >> issue as well, as the R40 is paired with the AXP221. But for now, >> I'd like to have something that is easier to backport to stable, so >> we can at least fix this for the A23 and A33. >> >> Also, checkpatch.pl doesn't like the stable kernel prerequisite lines. > > Acked-by: Maxime Ripard merged, thanks! -Kishon