From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61C98C3A5A3 for ; Fri, 30 Aug 2019 07:13:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E92B22CE3 for ; Fri, 30 Aug 2019 07:13:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AO4gFi3q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E92B22CE3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kontron.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WmeUJD0a/IXY2iMU/PViIuCkWsbU0aOAXjVj2Vr8c5s=; b=AO4gFi3qfuzs+t pw3OlbeiNGoaWqhRik1rAIekXvckxDYSoS0QhyKePBUZ9BJlQaZbKdiZ4c3DivkFlTyvMlokiXzJA hZKyxiZQ+POSaUlbyEP3y8TJRpqjc8sTlYu5m/FiMOkMfY5CGS0XYLwj4IaL6Otr4WTHUYM/L8EfI iKjScohHhdbj9n/U67P8/7M/KSfyyvJx/x5wYcxO5bE1YzlS91nZvY//Y8pKwixmlBi65d6VK54V0 XXnEAXOpppgSWjJcboEMm2m4zoAA3NInd75x6Y0Y02EkNptezpteEq6xwpMC2HJDqTHOQMVQ6dX8+ 84IFfCBvhtczQbKLVqKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i3b5j-0004UT-1D; Fri, 30 Aug 2019 07:13:03 +0000 Received: from skedge04.snt-world.com ([91.208.41.69]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i3b4Y-0003fb-9M for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2019 07:11:52 +0000 Received: from sntmail14r.snt-is.com (unknown [10.203.32.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge04.snt-world.com (Postfix) with ESMTPS id C7C6667A904; Fri, 30 Aug 2019 09:11:42 +0200 (CEST) Received: from sntmail14r.snt-is.com (10.203.32.184) by sntmail14r.snt-is.com (10.203.32.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 30 Aug 2019 09:11:42 +0200 Received: from sntmail14r.snt-is.com ([fe80::c8f3:eae9:52c2:11a8]) by sntmail14r.snt-is.com ([fe80::c8f3:eae9:52c2:11a8%3]) with mapi id 15.01.1713.004; Fri, 30 Aug 2019 09:11:42 +0200 From: Thomas Schaefer To: Peter Chen Subject: AW: [PATCH] ARM: dts: imx7: fix USB controller 'size' parameter Thread-Topic: [PATCH] ARM: dts: imx7: fix USB controller 'size' parameter Thread-Index: AQHVXoFUdokxKz8Ei0Gedpn3mUjvkacS1eQAgABrfiA= Date: Fri, 30 Aug 2019 07:11:42 +0000 Message-ID: References: <20190829154913.2049-1-thomas.schaefer@kontron.com> <20190830022539.GA1146@b29397-desktop> In-Reply-To: <20190830022539.GA1146@b29397-desktop> Accept-Language: en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.228.0.137] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: C7C6667A904.AA526 X-SnT-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: thomas.schaefer@kontron.com X-SnT-MailScanner-To: festevam@gmail.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, marex@denx.de, peter.chen@nxp.com, s.hauer@pengutronix.de, shawnguo@kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190830_001150_788193_057CC9B7 X-CRM114-Status: GOOD ( 17.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "marex@denx.de" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org -----Urspr=FCngliche Nachricht----- Von: Peter Chen = Gesendet: Freitag, 30. August 2019 04:26 > On 19-08-29 17:49:13, Thomas Schaefer wrote: > > Currently the size parameter in the reg property of usbotg and usbh = > > nodes in imx7s and imx7d dts includes is set to 0x200 which is wrong = > > for the i.MX7 CPU. According to reference manual, spacing of USB = > > controller registers is 0x10000 instead. > > = > > This patch will fix this and set the 'size' to 0x10000. > > = > > Signed-off-by: Thomas Schaefer > > --- > > arch/arm/boot/dts/imx7d.dtsi | 2 +- > > arch/arm/boot/dts/imx7s.dtsi | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > = > > diff --git a/arch/arm/boot/dts/imx7d.dtsi = > > b/arch/arm/boot/dts/imx7d.dtsi index 42528d2812a2..f1b098d28b6e 100644 > > --- a/arch/arm/boot/dts/imx7d.dtsi > > +++ b/arch/arm/boot/dts/imx7d.dtsi > > @@ -117,7 +117,7 @@ > > &aips3 { > > usbotg2: usb@30b20000 { > > compatible =3D "fsl,imx7d-usb", "fsl,imx27-usb"; > > - reg =3D <0x30b20000 0x200>; > > + reg =3D <0x30b20000 0x10000>; > > interrupts =3D ; > > clocks =3D <&clks IMX7D_USB_CTRL_CLK>; > > fsl,usbphy =3D <&usbphynop2>; > > diff --git a/arch/arm/boot/dts/imx7s.dtsi = > > b/arch/arm/boot/dts/imx7s.dtsi index c1a4fff5ceda..9e25fccf33f0 100644 > > --- a/arch/arm/boot/dts/imx7s.dtsi > > +++ b/arch/arm/boot/dts/imx7s.dtsi > > @@ -1088,7 +1088,7 @@ > > = > > usbotg1: usb@30b10000 { > > compatible =3D "fsl,imx7d-usb", "fsl,imx27-usb"; > > - reg =3D <0x30b10000 0x200>; > > + reg =3D <0x30b10000 0x10000>; > > interrupts =3D ; > > clocks =3D <&clks IMX7D_USB_CTRL_CLK>; > > fsl,usbphy =3D <&usbphynop1>; > > @@ -1099,7 +1099,7 @@ > > = > > usbh: usb@30b30000 { > > compatible =3D "fsl,imx7d-usb", "fsl,imx27-usb"; > > - reg =3D <0x30b30000 0x200>; > > + reg =3D <0x30b30000 0x10000>; > > interrupts =3D ; > > clocks =3D <&clks IMX7D_USB_CTRL_CLK>; > > fsl,usbphy =3D <&usbphynop3>; > = > Hi Thomos, > = > The core controller range is 0x200, from offset 0x200, it is non-core reg= ister, which is used by usbmisc. Fabio said you met problem at u-boot for t= his size, what's the problem about it? > = > Thanks, > Peter Hi Peter, When porting one of our i.MX7 based modules to u-boot v2019.07, I found tha= t scanning USB with 'usb start' crashes when trying to scan the _second_ co= ntroller enabled in the device tree (the first controller was detected prop= erly). After some investigation I found that the problem was introduced wit= h Marek Vasuts 'usb: ehci-mx6: Fix bus enumeration for DM case' (u-boot com= mit 501547cec1f7f0438cae388a104ff60f18576c01). This patch uses the 'reg' pr= operty in the usbotg and usbh nodes to calculate the device index number fo= r the driver. Actually, controller range on i.MX6 is 0x200, thus the calculation is corre= ct for i.MX6, but on i.MX7 the base addresses of the controller registers d= iffer by 0x10000 and calculation will fail if more than one USB controller = is enabled in the device tree. This is why I suggested to fix this problem = in the imx7s and imx7d device tree include files. Added Marek to this thread. Best regards, Thomas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel