Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3208737imu; Sat, 24 Nov 2018 00:08:15 -0800 (PST) X-Google-Smtp-Source: AJdET5ejpyRs4dT/k2ZJnSsXu1UwZAqggBPpbvw17U6/Yl/4cZKvJSRdaOa5WS7/8r9ZNOgEPjxU X-Received: by 2002:a62:647:: with SMTP id 68-v6mr20058353pfg.42.1543046895446; Sat, 24 Nov 2018 00:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543046895; cv=none; d=google.com; s=arc-20160816; b=TOQ5zL4IJuvcIn3CR/73L6I01p1JmR4+ZFhl35wDDqJRdSvEFtW8RstEcP6MB0e+AT j4n7qm8GqvEAaS8X+PMHpmQAgxQ/71pR5MZBCsL2+5MjlPe39p1AwzjMHAMehls+0hH6 Fw10WQFFUxc9KJe9+wyedz+dwFmFZTVh7z5+PA1PCA68ortsUQsdUssWWQDj59oAAtLw /+IwoRM1R0ycR4JV1b+KOif7zUQbft9Pw9ObBDcxMv5OZ/XrpEQ+FGOIneHALCEeC6QP B1l/N7ow86j7ghD9Ch+fctDDAVnFhNG78Z6C57P7NsJyOIKKVAokRgcW+OnQge8Sg9zQ 1e6Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=zt6E+AEAwAfVoVfOWc+5OdA/bqv5H3PAQZ2Ihl7aok4=; b=P7n2X0cWFFjazbzwim+Eo4NDx+8Zgcz/iqDD4z5qM/BrY8Fj/d7FtyBpk/k7n2Li5o ffv+pWPjOGViirNvqqowo24xV4l1ODm6sZtDXQXY7h5FJyXE1bGb7NKPsEqNn57jruED NXGfEpZv8B0i0L3XTJXLcVeHreW5w9Ikq+iXiOPfIfIP5EXkC1X2BJPFn4j34/2FExWi OWX52mLxHczdKzjQF0WGpAh/Kb19SBQT+q5/IYy7x0A+cTDmUsnDh+NWRdQlf5tLfl1b MQTP39x9bisH4JzeFx2MDKx4zSv7O4X2XCkrPOc3jxLwwoDSFMXMjyE0ZbZ+q4uokzzN toog== 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=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 z10si43084718pfm.37.2018.11.24.00.08.01; Sat, 24 Nov 2018 00:08: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; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390242AbeKWSif (ORCPT + 99 others); Fri, 23 Nov 2018 13:38:35 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37008 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387556AbeKWSif (ORCPT ); Fri, 23 Nov 2018 13:38:35 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wAN7tPKZ129774; Fri, 23 Nov 2018 01:55:25 -0600 Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wAN7tPUr090289 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Nov 2018 01:55:25 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 23 Nov 2018 01:55:25 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Fri, 23 Nov 2018 01:55:25 -0600 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAN7tNHS006024; Fri, 23 Nov 2018 01:55:24 -0600 Subject: Re: [PATCH] phy: renesas: rcar-gen3-usb2: follow the hardware manual procedure To: Yoshihiro Shimoda CC: "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" References: <1542787663-32142-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> From: Kishon Vijay Abraham I Message-ID: Date: Fri, 23 Nov 2018 13:25:19 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1542787663-32142-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US 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 Hi, On 21/11/18 1:40 PM, Yoshihiro Shimoda wrote: > This patch modifies rcar_gen3_init_otg() procedure to follow Figure > 73.4 of "R-Car Series, 3rd Generation User's Manual: Hardware Rev.1.00". > > Signed-off-by: Yoshihiro Shimoda > --- > This patch is based on the latest linux-phy / next branch > (commit id = 0eb86fa77f0f0c81631a030f10679a45c05df33a). This patch has some weird characters which I saw while applying. You can see "=20", =3D in the raw format https://lore.kernel.org/lkml/1542787663-32142-1-git-send-email-yoshihiro.shimoda.uh@renesas.com/raw Please fix and repost the patch. Thanks Kishon > > drivers/phy/renesas/phy-rcar-gen3-usb2.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c > index d0f412c..a9e53e8 100644 > --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c > +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c > @@ -307,16 +307,21 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch) > void __iomem *usb2_base = ch->base; > u32 val; > > + rcar_gen3_set_linectrl(ch, 0, 1); > + val = readl(usb2_base + USB2_LINECTRL1); > + writel(val | USB2_LINECTRL1_DPRPD_EN | USB2_LINECTRL1_DMRPD_EN, > + usb2_base + USB2_LINECTRL1); > + > val = readl(usb2_base + USB2_VBCTRL); > writel(val | USB2_VBCTRL_DRVVBUSSEL, usb2_base + USB2_VBCTRL); > - writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA); > - rcar_gen3_control_otg_irq(ch, 1); > val = readl(usb2_base + USB2_ADPCTRL); > writel(val | USB2_ADPCTRL_IDPULLUP, usb2_base + USB2_ADPCTRL); > - val = readl(usb2_base + USB2_LINECTRL1); > - rcar_gen3_set_linectrl(ch, 0, 0); > - writel(val | USB2_LINECTRL1_DPRPD_EN | USB2_LINECTRL1_DMRPD_EN, > - usb2_base + USB2_LINECTRL1); > + > + msleep(20); > + > + writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA); > + > + rcar_gen3_control_otg_irq(ch, 1); > > rcar_gen3_device_recognition(ch); > } >