Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5130971ybg; Mon, 21 Oct 2019 21:37:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZ02/4FYM0SCJ9Udw+bB79a+/LEWU9YM5TGaFqWwdPAnmX7MDSe1nWF3gCLbhSwaNFPWvo X-Received: by 2002:aa7:cfd4:: with SMTP id r20mr28812949edy.268.1571719040177; Mon, 21 Oct 2019 21:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571719040; cv=none; d=google.com; s=arc-20160816; b=o8nlPF2L47urPvPMBg2pLVqiKNf1FI77s4sfLY3oZ5f8tMOcOKmHc8ivryaCpLGLxB qGbgFP9kIKs4XM+i6YSuccPiRGLI124ylA/W+wgGVzswSZo5CnxzcCB2DH3c1jRbNL2J S7EuKNeXJnuzYO4aWj/JuDq+xGZWZgCSHCyUXfxmAiGsuvebhlj30PWogyWmpAfDGyZA uaIcZJKuJOkdX4DCFlnXJrcvlbQQNfdEK1t1iCz15u9oUHZO4ygh5xk4oWR/dyY3TAUE AOHk4CTwxUZe7+Ax2oDOUelN2Y0X0xmxf+k1x3HOQlwWh3me3FZjBz0YY+ZNEXMSS0oe elaw== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rs9LAlJ/Mb8c9Q5mqnJ0h++sIssMn8kGp7hyQlxdI80=; b=dvi1zyzuyPGXUVsVzR7RC3mbFt2z2M9nBi0HlV4dHULI5DIaL+TJIVXWC9FsiUcAxv WGzdvyW2bHoQeJDkOFvh58ir4Hg5EWbO+boe0Kpro5y+mM+raRQ8lfi3LqB3acKHWXWl PWC/h67iovEdgDdgxJVD5f/wuK/4gbxtsLENOGcdGdiUZAyoKw0/hB2sg4evgdZn9k5m Tj8uenyvwHfyw8AnXLPPNeexglJynXKO2EaFvDnnrPOLD0z5Gn4qKDLxhMgupw+eqrBO zVDXsfjfrX06ixzJsK8sX2AR05BVprbdpEZBYMUcXgeqB9pzWri9jOJhvBUSQHi/ifi5 w5nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QZEVW2RS; 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=NONE sp=QUARANTINE 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 q20si10121015ejn.18.2019.10.21.21.36.16; Mon, 21 Oct 2019 21:37:20 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=QZEVW2RS; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730601AbfJVEOu (ORCPT + 99 others); Tue, 22 Oct 2019 00:14:50 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:32864 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725907AbfJVEOu (ORCPT ); Tue, 22 Oct 2019 00:14:50 -0400 Received: by mail-pg1-f195.google.com with SMTP id i76so9139341pgc.0 for ; Mon, 21 Oct 2019 21:14:50 -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:mime-version :content-transfer-encoding; bh=rs9LAlJ/Mb8c9Q5mqnJ0h++sIssMn8kGp7hyQlxdI80=; b=QZEVW2RSSdkh1WJhJ+2zM6gvI5OM1zukP2RcEMAPrk+gYXdCshBt6eo69Xdgf3piwH 2jsrvgUWf8cb/5otO7cLp0OZTGHxclN0W7hqZny+giRNR8fylKD+GerxqjcUfDHD2lG2 0KEw2YMYwQxe0KdAWRk8BFnaKDfT6Y4Mi/ezDoYAsR2aM80Bu/w8isG2AaVlXU5mmZZi ZsbERCij07rF7+9yS69wVKkOmNcbWkmFlmMwOqEO0p+lgpHQoaJBcTEvA3l4FlUVr5em 877NV13qWH29BIhewCk+S4alQLXyTiejyaeVxvRhyP2IOZ4F9mgRTLfTePWYZ1dO2ZV+ Z9ZQ== 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:mime-version :content-transfer-encoding; bh=rs9LAlJ/Mb8c9Q5mqnJ0h++sIssMn8kGp7hyQlxdI80=; b=SWEReylUAQmA1wUmEr1BB8h4gQdVVjThVOb9qoGaFEYLWQv1K0xqs4xlRvx+uKN+cz 7SurrV7u34PwT/8pwcnGdLSIf245sASAi+dzIRV+tzbJDrA6b9soEekmTtBkNA/Dw6YG CLm9F39FZI2/FozJ8QKw72LEcSHZINiFCQduBSTf0hwL1MzhwCh2daE2+xWKQK+UybJO jgudE3Xhxybq/rysHg0XogVYCK/V3X+vv1xxAUAaeap8sfvN6Lli5eRbzFjWJkx3+bl8 FdUuVsyhOV8c48Jrk4B4261O5pA9w6ypDETLBuIyw1ZJg5HEi3l5vZJe1OFf7uG3yP5Z O6Nw== X-Gm-Message-State: APjAAAWEj1Z+kE3OIh2X3+x/GDQZ1QIA11gX1XVPEx54MgZhGzSTOHJ/ bOIHVen+ZSX5SZm3PsC3BDg= X-Received: by 2002:a62:1c96:: with SMTP id c144mr278831pfc.219.1571717689798; Mon, 21 Oct 2019 21:14:49 -0700 (PDT) Received: from localhost.lan (c-67-185-54-80.hsd1.wa.comcast.net. [67.185.54.80]) by smtp.gmail.com with ESMTPSA id b3sm15042191pjp.13.2019.10.21.21.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 21:14:48 -0700 (PDT) From: Andrey Smirnov To: linux-arm-kernel@lists.infradead.org Cc: Andrey Smirnov , Chris Healy , Shawn Guo , Fabio Estevam , Peter Chen , linux-imx@nxp.com, linux-kernel@vger.kernel.org Subject: [PATCH v2] ARM: imx: Drop imx_anatop_usb_chrg_detect_disable() Date: Mon, 21 Oct 2019 21:14:45 -0700 Message-Id: <20191022041445.23897-1-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With commit b5bbe2235361 ("usb: phy: mxs: Disable external charger detect in mxs_phy_hw_init()") in tree all of the necessary charger setup is done by the USB PHY driver which covers all of the affected i.MX6 SoCs. NOTE: imx_anatop_usb_chrg_detect_disable() was also called for i.MX7D, but looking at its datasheet it appears to have a different USB PHY IP block, so executing i.MX6 charger disable configuration seems unnecessary. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Shawn Guo Cc: Fabio Estevam Cc: Peter Chen Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- Changes since [v1]: - Scope of the patch reduced to remove only imx_anatop_usb_chrg_detect_disable() instead of imx_anatop_init() [v1] lore.kernel.org/lkml/20190731180131.8597-1-andrew.smirnov@gmail.com arch/arm/mach-imx/anatop.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c index 777d8c255501..8fb68c0ec34c 100644 --- a/arch/arm/mach-imx/anatop.c +++ b/arch/arm/mach-imx/anatop.c @@ -19,8 +19,6 @@ #define ANADIG_REG_2P5 0x130 #define ANADIG_REG_CORE 0x140 #define ANADIG_ANA_MISC0 0x150 -#define ANADIG_USB1_CHRG_DETECT 0x1b0 -#define ANADIG_USB2_CHRG_DETECT 0x210 #define ANADIG_DIGPROG 0x260 #define ANADIG_DIGPROG_IMX6SL 0x280 #define ANADIG_DIGPROG_IMX7D 0x800 @@ -33,8 +31,6 @@ #define BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG 0x1000 /* Below MISC0_DISCON_HIGH_SNVS is only for i.MX6SL */ #define BM_ANADIG_ANA_MISC0_DISCON_HIGH_SNVS 0x2000 -#define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B 0x80000 -#define BM_ANADIG_USB_CHRG_DETECT_EN_B 0x100000 static struct regmap *anatop; @@ -96,16 +92,6 @@ void imx_anatop_post_resume(void) } -static void imx_anatop_usb_chrg_detect_disable(void) -{ - regmap_write(anatop, ANADIG_USB1_CHRG_DETECT, - BM_ANADIG_USB_CHRG_DETECT_EN_B - | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B); - regmap_write(anatop, ANADIG_USB2_CHRG_DETECT, - BM_ANADIG_USB_CHRG_DETECT_EN_B | - BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B); -} - void __init imx_init_revision_from_anatop(void) { struct device_node *np; @@ -171,10 +157,6 @@ void __init imx_init_revision_from_anatop(void) void __init imx_anatop_init(void) { anatop = syscon_regmap_lookup_by_compatible("fsl,imx6q-anatop"); - if (IS_ERR(anatop)) { + if (IS_ERR(anatop)) pr_err("%s: failed to find imx6q-anatop regmap!\n", __func__); - return; - } - - imx_anatop_usb_chrg_detect_disable(); } -- 2.21.0