From patchwork Fri Apr 2 12:47:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461665 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=OEZxDS6B; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfxS4GBDz9sV5 for ; Fri, 2 Apr 2021 23:48:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38B1180C7F; Fri, 2 Apr 2021 14:48:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367715; bh=sJLBgtUxadokBTc93kexR9PlV33mob0l8h1fh7j58yk=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=OEZxDS6BctlxbydQZMv2Imfv+VSx+ojL4UqaX+oPwxX/ByxmVBWhwxkvWjyXcS40g 9/YmgoC/2aLNHgOpEF0a2FDGhdin947ldYo4/9HyVVX0f+kuXLLubPH9z9TV0eRvy2 vwjuNFzI9ENtEdLdV1a6Yi7XPhDyrx4ZSDIq8j5HYN7B9pGDt9OpxBip+6zlJvkMCw e8ElZ53HtsGUMr2u7a77Zv0VIO8Py8qIKwtKTw/3awjGdO6jCppzplsKFoaG6ZNsQ3 Sg4TV3WHh9ImD111NhSZFP00Qs73qexBEVMEOjcVuRLHNX/Xh5f8XzfivQ9iev11Xr 26bJ7PQLsF4aQ== Received: by phobos.denx.de (Postfix, from userid 109) id A50D280C7A; Fri, 2 Apr 2021 14:48:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4BE3480021 for ; Fri, 2 Apr 2021 14:48:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxB4DNLz1qtPq; Fri, 2 Apr 2021 14:48:30 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxB2pZTz1r18L; Fri, 2 Apr 2021 14:48:30 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id JbKk1lwBUvQb; Fri, 2 Apr 2021 14:48:29 +0200 (CEST) X-Auth-Info: G8l2uBBPffE5oOuSTOwKrvW0HSs4L1DjRNx9n42mEFA= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:28 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Alexey Brodkin , Eugeniy Paltsev , Fabio Estevam , Jean-Jacques Hiblot , Murali Karicheri , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 01/19] phy: nop-phy: Add standard usb-nop-xceiv compat string Date: Fri, 2 Apr 2021 14:47:54 +0200 Message-Id: <20210402124812.186761-1-marex@denx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The USB no-op PHY uses "usb-nop-xceiv" compatible string. This driver is compatible with USB no-op PHY, so add the compatible string. Signed-off-by: Marek Vasut Cc: Alexey Brodkin Cc: Eugeniy Paltsev Cc: Fabio Estevam Cc: Jean-Jacques Hiblot Cc: Murali Karicheri Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/phy/nop-phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/nop-phy.c b/drivers/phy/nop-phy.c index 84aac806230..9f12ebc0624 100644 --- a/drivers/phy/nop-phy.c +++ b/drivers/phy/nop-phy.c @@ -43,6 +43,7 @@ static int nop_phy_probe(struct udevice *dev) static const struct udevice_id nop_phy_ids[] = { { .compatible = "nop-phy" }, + { .compatible = "usb-nop-xceiv" }, { } }; From patchwork Fri Apr 2 12:47:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461666 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=sb3LLapO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfxk6QFtz9sVq for ; Fri, 2 Apr 2021 23:48:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1569D812B3; Fri, 2 Apr 2021 14:48:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367717; bh=uEbMEkuMEL6aLZWV/kZbW/FlNHpXh9DzFQhp1DMbGI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sb3LLapOjWQpUc91CRkPeHVRAWzMdPzrVt68E4tVouX5FH3+BFWSdxD+aIsALyPVo DyaeJo+faIv4/eGrNoqgCix+ASv8zNGH5EX319c+vg+KOlHFY44djTmCSuIqWB0nGJ t1HFI+vYsgVZ9Ib9+O4l132aEsn+zendLdVeThq8SbyrLnP0m6+ImyXWCOMbH91O0j 50xg2XDMaksW4P8qlHVZHK3fSCBA6G4CHuQ0uIaGuCyFiaFRFaU2H2xsDnYk+wHOE1 WMvms7T9KaIN8qd1o8wf77fYIaTeRjnFSG1I+TsQPy4SfEnVqRCciHmHjAt7rJ9SWD hb68zxrD+J8BA== Received: by phobos.denx.de (Postfix, from userid 109) id 7D09480C81; Fri, 2 Apr 2021 14:48:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ECD9E80C71 for ; Fri, 2 Apr 2021 14:48:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxC6lrHz1s2CJ; Fri, 2 Apr 2021 14:48:31 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxC6PJ6z1r18L; Fri, 2 Apr 2021 14:48:31 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 1nE7InaxQJbZ; Fri, 2 Apr 2021 14:48:30 +0200 (CEST) X-Auth-Info: QUapAwcUUpPWeF0YL6tXxUB34T5k6dsfxg0P2D2LIzo= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:30 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Alexey Brodkin , Eugeniy Paltsev , Fabio Estevam , Jean-Jacques Hiblot , Murali Karicheri , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 02/19] arc: emsdp/iotdk: Use standard compatible string for USB no-op PHY Date: Fri, 2 Apr 2021 14:47:55 +0200 Message-Id: <20210402124812.186761-2-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The standard compatible string is "usb-nop-xceiv", use it. Signed-off-by: Marek Vasut Cc: Alexey Brodkin Cc: Eugeniy Paltsev Cc: Fabio Estevam Cc: Jean-Jacques Hiblot Cc: Murali Karicheri Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- arch/arc/dts/iot_devkit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/dts/iot_devkit.dts b/arch/arc/dts/iot_devkit.dts index c0173fa5ab4..2122827527e 100644 --- a/arch/arc/dts/iot_devkit.dts +++ b/arch/arc/dts/iot_devkit.dts @@ -39,7 +39,7 @@ }; usbphy: phy { - compatible = "nop-phy"; + compatible = "usb-nop-xceiv"; #phy-cells = <0>; }; From patchwork Fri Apr 2 12:47:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461667 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=TEcur/Qj; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfxv4nbyz9sV5 for ; Fri, 2 Apr 2021 23:49:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E055E81578; Fri, 2 Apr 2021 14:48:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367719; bh=A1e2iEiU51SMQpGie0LQCtiA6gS7KJgRwt2Wws2FLaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TEcur/QjMas3DBaHKleU8mLMFessEMKqDOjr892FWvpoHiciCUpWa8a0lzKNHkn8I ml0+zOBcU2h1OzqCOFeP8rbwt+9yHU9A9C1apadBMPGLkVdKKHhrtd2UCDOGo+Phkz EMhYkiC42RuhnbzXubzF2S5v0TM/fwPBJp1wa3k/fidpN2jpaCAehrYxaSCFR7NGza KjlMdc4w0flOEAHZye1d/Kg7FuuXU0w6QlO3x+kfkdz9KIJucVqaQ8SGzMSRvRqOMY y42rjrbos1CQvQI2t9iQ1bhG4y0IGKqPdvQNH/w5cRBIuLcCp/XiJOUSS3COe0bz+f 1FukG/5BO0RTQ== Received: by phobos.denx.de (Postfix, from userid 109) id 44657812B2; Fri, 2 Apr 2021 14:48:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 96D8280C7E for ; Fri, 2 Apr 2021 14:48:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxF2lnKz1qtPq; Fri, 2 Apr 2021 14:48:33 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxF1nJBz1r18L; Fri, 2 Apr 2021 14:48:33 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Q3t6nM5C22Nf; Fri, 2 Apr 2021 14:48:32 +0200 (CEST) X-Auth-Info: iVm9p0NdFj8yyyhgivfYSqHjkY5S4qmGR6uomTEjvRU= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:32 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Alexey Brodkin , Eugeniy Paltsev , Fabio Estevam , Jean-Jacques Hiblot , Murali Karicheri , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 03/19] ARM: dts: k2g-evm: Use standard compatible string for USB no-op PHY Date: Fri, 2 Apr 2021 14:47:56 +0200 Message-Id: <20210402124812.186761-3-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The standard compatible string is "usb-nop-xceiv", use it. Note that keystone-k2g.dtsi already uses the aforementioned compat string, so this patch can only remove the override. Signed-off-by: Marek Vasut Cc: Alexey Brodkin Cc: Eugeniy Paltsev Cc: Fabio Estevam Cc: Jean-Jacques Hiblot Cc: Murali Karicheri Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- arch/arm/dts/keystone-k2g-evm.dts | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/dts/keystone-k2g-evm.dts b/arch/arm/dts/keystone-k2g-evm.dts index 7c5deef8083..b5b511cbd61 100644 --- a/arch/arm/dts/keystone-k2g-evm.dts +++ b/arch/arm/dts/keystone-k2g-evm.dts @@ -38,7 +38,6 @@ &usb0_phy { status = "okay"; - compatible = "nop-phy"; }; &usb0 { @@ -51,7 +50,6 @@ }; &usb1_phy { - compatible = "nop-phy"; status = "okay"; }; From patchwork Fri Apr 2 12:47:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461668 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=MM2PeMuB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfy66L8Hz9sV5 for ; Fri, 2 Apr 2021 23:49:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 88667815A6; Fri, 2 Apr 2021 14:48:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367721; bh=D49QUQziHLdNLx/rXk29D4KXXTK9m7MN0jolMFwTPTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MM2PeMuB8T1j3SgQkf2UWSSFaQHsSN0nLHk5NQ7aGTiLib9q7D3qTpvDgw72krnD3 39K8wR1lW4KMu8Cvx2hs23OgzL0JVh+Kq4nCykyOC2oTkqJz3PP3S+U5CQPjNtDsfW Te6o7Qaj4LTDl1kjE/dViI6k1MZ423TnLeKrFiGFK5UZa9YgWXgOyVvmPzftzx2gIU jihboo6bWcgE5+0tM1MBJ/V0ktK4OurhakAnnvpGZyIRKQ77M6oP5HM0Uz6n7juaUo 1M9Mqr9NuVtSIYqQb0dVv3ntOxpic8oaxIvz3i7vQnwNwtGimENy233e08B+KEzE+N xbGQSULUDboXw== Received: by phobos.denx.de (Postfix, from userid 109) id 5BBCD814E1; Fri, 2 Apr 2021 14:48:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B0C0D80021 for ; Fri, 2 Apr 2021 14:48:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxG3YDgz1s2CP; Fri, 2 Apr 2021 14:48:34 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxG3G5mz1r18L; Fri, 2 Apr 2021 14:48:34 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id NzXS0QsGFWYX; Fri, 2 Apr 2021 14:48:33 +0200 (CEST) X-Auth-Info: w6wFcFlagVcbgS9LfW5CPWbSw86dkEvO6nn8x17JDsw= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:33 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 04/19] ARM: dts: imx8mm: Replace deprecated fsl, usbphy DT props with phys Date: Fri, 2 Apr 2021 14:47:57 +0200 Message-Id: <20210402124812.186761-4-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The fsl,usbphy DT property is deprecated, replace it with phys DT property and specify #phy-cells, so that the generic PHY framework can parse the PHY bindings without any extra hacking. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- arch/arm/dts/imx8mm.dtsi | 6 ++++-- arch/arm/dts/imx8mn.dtsi | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/imx8mm.dtsi b/arch/arm/dts/imx8mm.dtsi index c824f2615fe..fa2d73f1803 100644 --- a/arch/arm/dts/imx8mm.dtsi +++ b/arch/arm/dts/imx8mm.dtsi @@ -241,6 +241,7 @@ }; usbphynop1: usbphynop1 { + #phy-cells = <0>; compatible = "usb-nop-xceiv"; clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; assigned-clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; @@ -249,6 +250,7 @@ }; usbphynop2: usbphynop2 { + #phy-cells = <0>; compatible = "usb-nop-xceiv"; clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; assigned-clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; @@ -936,7 +938,7 @@ clock-names = "usb1_ctrl_root_clk"; assigned-clocks = <&clk IMX8MM_CLK_USB_BUS>; assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; - fsl,usbphy = <&usbphynop1>; + phys = <&usbphynop1>; fsl,usbmisc = <&usbmisc1 0>; status = "disabled"; }; @@ -955,7 +957,7 @@ clock-names = "usb1_ctrl_root_clk"; assigned-clocks = <&clk IMX8MM_CLK_USB_BUS>; assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; - fsl,usbphy = <&usbphynop2>; + phys = <&usbphynop2>; fsl,usbmisc = <&usbmisc2 0>; status = "disabled"; }; diff --git a/arch/arm/dts/imx8mn.dtsi b/arch/arm/dts/imx8mn.dtsi index ee179023049..f77b223682c 100644 --- a/arch/arm/dts/imx8mn.dtsi +++ b/arch/arm/dts/imx8mn.dtsi @@ -930,7 +930,7 @@ clock-names = "usb1_ctrl_root_clk"; assigned-clocks = <&clk IMX8MN_CLK_USB_BUS>; assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_500M>; - fsl,usbphy = <&usbphynop1>; + phys = <&usbphynop1>; fsl,usbmisc = <&usbmisc1 0>; status = "disabled"; }; @@ -998,6 +998,7 @@ }; usbphynop1: usbphynop1 { + #phy-cells = <0>; compatible = "usb-nop-xceiv"; clocks = <&clk IMX8MN_CLK_USB_PHY_REF>; assigned-clocks = <&clk IMX8MN_CLK_USB_PHY_REF>; From patchwork Fri Apr 2 12:47:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461669 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=U4jMqHsn; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfyL1Q5cz9sV5 for ; Fri, 2 Apr 2021 23:49:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CB2781668; Fri, 2 Apr 2021 14:48:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367723; bh=6Lu/ieNNi/7h0W2JlNwx4gWMnJbTmrxUYCQbPFlLE+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U4jMqHsnRxdocABPcr0gpVUabCiHW5aenJ/YmjMNT+QnzRrDTNwz2xFJ9hJZGG1Ss pCWfryp25hlzu0oRkdh0GYanLJF5PLV8s/kG4u1zA2CrSz6nn0r9xoeym5JC5QU/A+ BjFqa2UJpt7Ic6Iy9dCn9xwZo/Wr0CRnBwZVbpXQbrr+7cnbskjZQaxgNs3qopIDsT Jltp2k0l+Mu3Q89YAydZ13KrwyQ8BdjhOFqEoZVhQ97JAmHlfIdmRkZNj5HkW2gCXK fC2GMGNBP2HsrrakUKTaG0kEXNohqLifLTb063bfNFRgYq4K6WoNTHIJcg+4uiy1zz iB7jSjjstOicg== Received: by phobos.denx.de (Postfix, from userid 109) id 3D27A815A6; Fri, 2 Apr 2021 14:48:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1319580C81 for ; Fri, 2 Apr 2021 14:48:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxH5xnHz1qtPt; Fri, 2 Apr 2021 14:48:35 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxH5jDnz1r18L; Fri, 2 Apr 2021 14:48:35 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id qRgemxCQKTdh; Fri, 2 Apr 2021 14:48:34 +0200 (CEST) X-Auth-Info: ybcZux0FdrYqcbGdfD6Mwq85UaPjtSlxHKE8Gfz4gzs= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:34 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 05/19] ARM: dts: imx8mm: Add power domain nodes Date: Fri, 2 Apr 2021 14:47:58 +0200 Message-Id: <20210402124812.186761-5-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Add power domain nodes to DT. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx Reviewed-by: Jaehoon Chung --- arch/arm/dts/imx8mm.dtsi | 73 ++++++++++++++++++++++++ include/dt-bindings/power/imx8mm-power.h | 22 +++++++ 2 files changed, 95 insertions(+) create mode 100644 include/dt-bindings/power/imx8mm-power.h diff --git a/arch/arm/dts/imx8mm.dtsi b/arch/arm/dts/imx8mm.dtsi index fa2d73f1803..b142b80734d 100644 --- a/arch/arm/dts/imx8mm.dtsi +++ b/arch/arm/dts/imx8mm.dtsi @@ -4,6 +4,8 @@ */ #include +#include +#include #include #include #include @@ -592,6 +594,75 @@ interrupts = ; #reset-cells = <1>; }; + + gpc: gpc@303a0000 { + compatible = "fsl,imx8mm-gpc"; + reg = <0x303a0000 0x10000>; + interrupt-parent = <&gic>; + interrupt-controller; + #interrupt-cells = <3>; + + pgc { + #address-cells = <1>; + #size-cells = <0>; + + pgc_hsiomix: power-domain@0 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MM_CLK_USB_BUS>; + }; + + pgc_pcie: power-domain@1 { + #power-domain-cells = <0>; + reg = ; + power-domains = <&pgc_hsiomix>; + }; + + pgc_otg1: power-domain@2 { + #power-domain-cells = <0>; + reg = ; + power-domains = <&pgc_hsiomix>; + }; + + pgc_otg2: power-domain@3 { + #power-domain-cells = <0>; + reg = ; + power-domains = <&pgc_hsiomix>; + }; + + pgc_gpumix: power-domain@4 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MM_CLK_GPU_BUS_ROOT>, + <&clk IMX8MM_CLK_GPU_AHB>; + }; + + pgc_gpu: power-domain@5 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MM_CLK_GPU_AHB>, + <&clk IMX8MM_CLK_GPU_BUS_ROOT>, + <&clk IMX8MM_CLK_GPU2D_ROOT>, + <&clk IMX8MM_CLK_GPU3D_ROOT>; + resets = <&src IMX8MQ_RESET_GPU_RESET>; + power-domains = <&pgc_gpumix>; + }; + + dispmix_pd: power-domain@10 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MM_CLK_DISP_ROOT>, + <&clk IMX8MM_CLK_DISP_AXI_ROOT>, + <&clk IMX8MM_CLK_DISP_APB_ROOT>; + }; + + mipi_pd: power-domain@11 { + #power-domain-cells = <0>; + reg = ; + power-domains = <&dispmix_pd>; + }; + }; + }; }; aips2: bus@30400000 { @@ -940,6 +1011,7 @@ assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; phys = <&usbphynop1>; fsl,usbmisc = <&usbmisc1 0>; + power-domains = <&pgc_otg1>; status = "disabled"; }; @@ -959,6 +1031,7 @@ assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; phys = <&usbphynop2>; fsl,usbmisc = <&usbmisc2 0>; + power-domains = <&pgc_otg2>; status = "disabled"; }; diff --git a/include/dt-bindings/power/imx8mm-power.h b/include/dt-bindings/power/imx8mm-power.h new file mode 100644 index 00000000000..fc9c2e16aad --- /dev/null +++ b/include/dt-bindings/power/imx8mm-power.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Copyright (C) 2020 Pengutronix, Lucas Stach + */ + +#ifndef __DT_BINDINGS_IMX8MM_POWER_H__ +#define __DT_BINDINGS_IMX8MM_POWER_H__ + +#define IMX8MM_POWER_DOMAIN_HSIOMIX 0 +#define IMX8MM_POWER_DOMAIN_PCIE 1 +#define IMX8MM_POWER_DOMAIN_OTG1 2 +#define IMX8MM_POWER_DOMAIN_OTG2 3 +#define IMX8MM_POWER_DOMAIN_GPUMIX 4 +#define IMX8MM_POWER_DOMAIN_GPU 5 +#define IMX8MM_POWER_DOMAIN_VPUMIX 6 +#define IMX8MM_POWER_DOMAIN_VPUG1 7 +#define IMX8MM_POWER_DOMAIN_VPUG2 8 +#define IMX8MM_POWER_DOMAIN_VPUH1 9 +#define IMX8MM_POWER_DOMAIN_DISPMIX 10 +#define IMX8MM_POWER_DOMAIN_MIPI 11 + +#endif From patchwork Fri Apr 2 12:47:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461675 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=StTvYLel; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfzJ0XFxz9sV5 for ; Fri, 2 Apr 2021 23:50:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 22E2781782; Fri, 2 Apr 2021 14:48:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367729; bh=yV2VSX3c8Uuva1JtA/K3yXbcIHPm5UV7r9CRt+eWsQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=StTvYLelQ4BUsExIIGQANHSYuRM1fG+WowOi5ibHFG+8sOEeriAIL5GJjwZcXqQ2K kJC42xAxvW9fhZFivPkQNTvWufpB0dChC8kFleRMBm/iYc7oRnQzNi4v3EgFNqXswc Mev5Dg11mvnMyuMliWrM8utW4EJgt3l2uD0Tn2NWfPkdqW4Zx8RL1ccUvE1XTaJ+pu CDxW/7UPgyTBBmgdSUIW8BRcnoW/4QceHgZkLThNwsGoKd7vd6BiH7w4xf34/x7Rxp ua+FGi/xgN51rMcKBiPnEvFGCOv0ncseNw5XTkr/b2/qjuJtw0rbj0gH1MxR8z4gOK TzIyoWn2Lxvqg== Received: by phobos.denx.de (Postfix, from userid 109) id 829DA81691; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 385D1814A4 for ; Fri, 2 Apr 2021 14:48:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxJ75Znz1s2CR; Fri, 2 Apr 2021 14:48:36 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxJ6Wccz1r18L; Fri, 2 Apr 2021 14:48:36 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id jmqZFmb-Gqtt; Fri, 2 Apr 2021 14:48:35 +0200 (CEST) X-Auth-Info: SV+dLp3jfGVOIYC6k8ENrXIgIf7RBuyktclOEd6oCnQ= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:35 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 06/19] imx: power-domain: Add fsl, imx8mm-gpc compatible string Date: Fri, 2 Apr 2021 14:47:59 +0200 Message-Id: <20210402124812.186761-6-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The driver is compatible with iMX8MM, add missing compatible string. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx Reviewed-by: Jaehoon Chung --- drivers/power/domain/imx8m-power-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c index c4cd07ffaf4..ebac90d81c1 100644 --- a/drivers/power/domain/imx8m-power-domain.c +++ b/drivers/power/domain/imx8m-power-domain.c @@ -120,6 +120,7 @@ static int imx8m_power_domain_of_to_plat(struct udevice *dev) static const struct udevice_id imx8m_power_domain_ids[] = { { .compatible = "fsl,imx8mq-gpc" }, + { .compatible = "fsl,imx8mm-gpc" }, { } }; From patchwork Fri Apr 2 12:48:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461670 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=JTIp79WN; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfyb0pJQz9sV5 for ; Fri, 2 Apr 2021 23:49:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 812AA81607; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367724; bh=+/0RBG06z2VxCyAJepeXWLeikGJ3kafE9fM1V+9uSJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JTIp79WNS9URfAJwVcQULAcLhIPhaHym5ZxYy3VuBlPwhgX9RtvP4XvaFR2FI69V1 rWy0/rkREny3pyCI7sWTBhG1XR4Nmd9lVPTyhh4vKdycaeynTvHCjInVq3NX8GIWFR TbrGUBqLzWcnToJ4s+CcObmUhnO4mJtgxxQe887JLg5at2AXBa/5GvDELD+qOBxvcO HxdfoRgknidQ/mGqHHSgR6OQEfNIhnT7UZFBDtA4AK4f3ODov+PzFkDqoNUIARQ+I/ wG5nzkyZ8C+GObjlXJH/Asr5Yaa1E5I3IcwDVnfwHUAmmGcZc2P+u0ub0txyBw/oLZ pSDN8+rPfGMyw== Received: by phobos.denx.de (Postfix, from userid 109) id 4A6FD8164D; Fri, 2 Apr 2021 14:48:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5408C814E1 for ; Fri, 2 Apr 2021 14:48:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxL0sw0z1qtPq; Fri, 2 Apr 2021 14:48:38 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxL0f32z1r18L; Fri, 2 Apr 2021 14:48:38 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id afGWMfq6lqJj; Fri, 2 Apr 2021 14:48:37 +0200 (CEST) X-Auth-Info: 2naxxT6RuvTTkpOFJfG9XmQTa8LAKV114LooGiQ9yIA= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:37 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 07/19] usb: ehci-mx6: Turn off Vbus on probe failure Date: Fri, 2 Apr 2021 14:48:00 +0200 Message-Id: <20210402124812.186761-7-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The driver turns on Vbus regulator in probe, but fails to turn it back off in case of probe failure. Add the missing code. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index aeea5399995..6fb596633a3 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -640,7 +640,32 @@ static int ehci_usb_probe(struct udevice *dev) hcor = (struct ehci_hcor *)((uint32_t)hccr + HC_LENGTH(ehci_readl(&(hccr)->cr_capbase))); - return ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type); + ret = ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type); + if (ret) + goto err_regulator; + + return ret; + +err_regulator: +#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (priv->vbus_supply) + regulator_set_enable(priv->vbus_supply, false); +#endif + return ret; +} + +int ehci_usb_remove(struct udevice *dev) +{ + struct ehci_mx6_priv_data *priv = dev_get_priv(dev); + + ehci_deregister(dev); + +#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (priv->vbus_supply) + regulator_set_enable(priv->vbus_supply, false); +#endif + + return 0; } static const struct udevice_id mx6_usb_ids[] = { @@ -655,7 +680,7 @@ U_BOOT_DRIVER(usb_mx6) = { .of_to_plat = ehci_usb_of_to_plat, .bind = ehci_usb_bind, .probe = ehci_usb_probe, - .remove = ehci_deregister, + .remove = ehci_usb_remove, .ops = &ehci_usb_ops, .plat_auto = sizeof(struct usb_plat), .priv_auto = sizeof(struct ehci_mx6_priv_data), From patchwork Fri Apr 2 12:48:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461672 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=mF8Wccqq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfyq5gTTz9sV5 for ; Fri, 2 Apr 2021 23:49:55 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA291816CA; Fri, 2 Apr 2021 14:48:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367727; bh=pzbFUJajPAlPWMha8gKrsAU+M01opCKsJ7HIjivT388=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mF8WccqqPydijKsveeQAbYQRtU/dplf5P6zm9vBmUE3yue2DAzemuUW+lMCTNop6r a/Kw048yYWlnKo9n1ffSRIg9AD10IV3EI/WA2iBfL/m18yMzYa2voDGNdbnVpoDG/U zpJxtlA5fGr1m3sH6MlLU62ovCFl0i61goNxsekMduyN0/+kDDiAha7K8CRCsMMLGe hwbAii1aYTrm+0v4rp81y5LIo4jW3ycJP9H4+Qz2hsrfOI4KOcK5+hkeAzmgLUX40G 9yihySzXv/88D3yagFvUyb4WgjkJ8ScRdf6VCYa+AIzDaBo5fcQf7bVe3zvXwxKQAq +TotpPDzbE40g== Received: by phobos.denx.de (Postfix, from userid 109) id A88AE81668; Fri, 2 Apr 2021 14:48:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B74DB81525 for ; Fri, 2 Apr 2021 14:48:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxM2VPNz1s2CJ; Fri, 2 Apr 2021 14:48:39 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxM2GnYz1r18L; Fri, 2 Apr 2021 14:48:39 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id pPV6I0GQ3UTh; Fri, 2 Apr 2021 14:48:38 +0200 (CEST) X-Auth-Info: vrcshYX1OF99KpuqYzzGKn93YZx7VIRGW/Z+OetlVnU= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:38 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 08/19] usb: ehci-mx6: Add DM clock support Date: Fri, 2 Apr 2021 14:48:01 +0200 Message-Id: <20210402124812.186761-8-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Add support for using DM clock framework to enable and disable all the necessary clock for the USB controller. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 6fb596633a3..ecc79cb54b6 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -347,9 +348,6 @@ int ehci_mx6_common_init(struct usb_ehci *ehci, int index) { int ret; - enable_usboh3_clk(1); - mdelay(1); - /* Do board specific initialization */ ret = board_ehci_hcd_init(index); if (ret) @@ -391,6 +389,9 @@ int ehci_hcd_init(int index, enum usb_init_type init, } } + enable_usboh3_clk(1); + mdelay(1); + ret = ehci_mx6_common_init(ehci, index); if (ret) return ret; @@ -428,6 +429,7 @@ struct ehci_mx6_priv_data { struct ehci_ctrl ctrl; struct usb_ehci *ehci; struct udevice *vbus_supply; + struct clk clk; enum usb_init_type init_type; int portnr; }; @@ -606,6 +608,20 @@ static int ehci_usb_probe(struct udevice *dev) priv->portnr = dev_seq(dev); priv->init_type = type; +#if CONFIG_IS_ENABLED(CLK) + ret = clk_get_by_index(dev, 0, &priv->clk); + if (ret < 0) + return ret; + + ret = clk_enable(&priv->clk); + if (ret) + return ret; +#else + /* Compatibility with DM_USB and !CLK */ + enable_usboh3_clk(1); + mdelay(1); +#endif + #if CONFIG_IS_ENABLED(DM_REGULATOR) ret = device_get_supply_regulator(dev, "vbus-supply", &priv->vbus_supply); @@ -614,7 +630,7 @@ static int ehci_usb_probe(struct udevice *dev) #endif ret = ehci_mx6_common_init(ehci, priv->portnr); if (ret) - return ret; + goto err_clk; #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { @@ -623,7 +639,7 @@ static int ehci_usb_probe(struct udevice *dev) false : true); if (ret && ret != -ENOSYS) { printf("Error enabling VBUS supply (ret=%i)\n", ret); - return ret; + goto err_clk; } } #endif @@ -650,6 +666,13 @@ err_regulator: #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) regulator_set_enable(priv->vbus_supply, false); +#endif +err_clk: +#if CONFIG_IS_ENABLED(CLK) + clk_disable(&priv->clk); +#else + /* Compatibility with DM_USB and !CLK */ + enable_usboh3_clk(0); #endif return ret; } @@ -665,6 +688,10 @@ int ehci_usb_remove(struct udevice *dev) regulator_set_enable(priv->vbus_supply, false); #endif +#if CONFIG_IS_ENABLED(CLK) + clk_disable(&priv->clk); +#endif + return 0; } From patchwork Fri Apr 2 12:48:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461674 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=E6lfGDco; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfz36xrvz9sVq for ; Fri, 2 Apr 2021 23:50:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EBA1381743; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367728; bh=O1TdfLdrHDqGtCaNcJ1qFfTSjncauwGKPmqjLtbUzr8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E6lfGDcoC97hEuMVthaPuUWPt+7MdPSH5klJgUCKPn1jlC0si8T3BMZ8JlyAeeEPm NM33H8ClbpAhD1rq/UcGXCdhWUvciXejfi0OnqI7DgfNMYPtL90iEQ4qBF2Ejnq9uS sdkF515HNwHmRmiBRmAg/+x5vy+PnOBfgJQHE3cWb+gsuB5h4U6HzFWfdk/uQtXpQJ wwJvSC2qo8xR0uccm3rx0ShEU2tzT3TCX0xYxW73mUiPGc974Dkb5yQ9is9YrscQtF tdyWZLwRPnkLt+b5yN9xEnvypLRe4+WqkkxS3dwjBmQ2yYqZrl2bu+bTPYbs7RP1cY TNuHXWN9B2qkg== Received: by phobos.denx.de (Postfix, from userid 109) id 0DB1781691; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B759B81607 for ; Fri, 2 Apr 2021 14:48:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxN3dLPz1s2CP; Fri, 2 Apr 2021 14:48:40 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxN3MVNz1r18L; Fri, 2 Apr 2021 14:48:40 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 6DSCplUMYxFr; Fri, 2 Apr 2021 14:48:39 +0200 (CEST) X-Auth-Info: XNUVJy5O7WQjMlEfd/rgAhSoElDtwpZk4Oq/o2MLPCE= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:39 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 09/19] usb: ehci-mx6: Unify USBNC registers Date: Fri, 2 Apr 2021 14:48:02 +0200 Message-Id: <20210402124812.186761-9-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Merge USBNC register layout structure into a single one, instead of having three separate structures and a lot of ifdeffery. No functional change. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 53 +++++++++++++------------------------ 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index ecc79cb54b6..b0703502db0 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -68,6 +68,24 @@ DECLARE_GLOBAL_DATA_PTR; #define UCMD_RUN_STOP (1 << 0) /* controller run/stop */ #define UCMD_RESET (1 << 1) /* controller reset */ +/* Base address for this IP block is 0x02184800 */ +struct usbnc_regs { + u32 ctrl[4]; /* otg/host1-3 */ + u32 uh2_hsic_ctrl; + u32 uh3_hsic_ctrl; + u32 otg_phy_ctrl_0; + u32 uh1_phy_ctrl_0; + u32 reserve1[4]; + u32 phy_cfg1; + u32 phy_cfg2; + u32 reserve2; + u32 phy_status; + u32 reserve3[4]; + u32 adp_cfg1; + u32 adp_cfg2; + u32 adp_status; +}; + #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) static const unsigned phy_bases[] = { USB_PHY0_BASE_ADDR, @@ -207,39 +225,7 @@ int usb_phy_mode(int port) return USB_INIT_HOST; } -#if defined(CONFIG_MX7ULP) -struct usbnc_regs { - u32 ctrl1; - u32 ctrl2; - u32 reserve0[2]; - u32 hsic_ctrl; -}; -#else -/* Base address for this IP block is 0x02184800 */ -struct usbnc_regs { - u32 ctrl[4]; /* otg/host1-3 */ - u32 uh2_hsic_ctrl; - u32 uh3_hsic_ctrl; - u32 otg_phy_ctrl_0; - u32 uh1_phy_ctrl_0; -}; -#endif - #elif defined(CONFIG_MX7) -struct usbnc_regs { - u32 ctrl1; - u32 ctrl2; - u32 reserve1[10]; - u32 phy_cfg1; - u32 phy_cfg2; - u32 reserve2; - u32 phy_status; - u32 reserve3[4]; - u32 adp_cfg1; - u32 adp_cfg2; - u32 adp_status; -}; - static void usb_power_config(int index) { struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + @@ -274,12 +260,11 @@ static void usb_oc_config(int index) #if defined(CONFIG_MX6) struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET); - void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl[index]); #elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + (0x10000 * index) + USBNC_OFFSET); - void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl1); #endif + void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl[index]); #if CONFIG_MACH_TYPE == MACH_TYPE_MX6Q_ARM2 /* mx6qarm2 seems to required a different setting*/ From patchwork Fri Apr 2 12:48:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461676 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=PeEVwdkD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfzW5bpSz9sV5 for ; Fri, 2 Apr 2021 23:50:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9E05B81718; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367730; bh=wDOJ+IvOHT+j+c+wmHAB/AJl42m1LMi7tctFoTbF6lQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PeEVwdkDcBJ1bLLtl3a187jNu6IhAYXUffU1/x8HYSqBFxctH2/i0Js8jCz5AxI+E BSr+62ugGyvzy4KSzQMTrddmRpSzc5tCixHkCsSOT9iugmW9U/aR6GKr6JvAxq6GG+ RvdZU7Xu2rc2yKQpdsnqh2OwRzvG5zK/F3QjwRwd8eEdWApFSC3RoiuMlDUiXA/quB cp40H7rIFnnkw4KNnyNrZRx+uPDxz7aNf0OSrkG7tI1Z50JxP1ILxkYMdxjSUdqzBm 2O7HurjvN7tuhrRP9gXgwbFKZD0+eepOX3/Jkho1b9qIdanjhuHA5TkqydGi60KGMs 9EQ2tionA+15Q== Received: by phobos.denx.de (Postfix, from userid 109) id 22F6D816AE; Fri, 2 Apr 2021 14:48:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2E8F781660 for ; Fri, 2 Apr 2021 14:48:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxP6pZxz1s2CP; Fri, 2 Apr 2021 14:48:41 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxP6YRyz1r18L; Fri, 2 Apr 2021 14:48:41 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 7l8kxVXpsbNs; Fri, 2 Apr 2021 14:48:40 +0200 (CEST) X-Auth-Info: 0l0wAuTtSVLM5/GWYwUsPC1wR8ix//FQcfLC81INX5w= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:40 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 10/19] usb: ehci-mx6: Parse USB PHY and MISC offsets from DT Date: Fri, 2 Apr 2021 14:48:03 +0200 Message-Id: <20210402124812.186761-10-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean In case DM and OF controler is enabled, but PHY support is disabled, parse USB PHY and MISC component addresses from DT manually. Those component addresses will be used in subsequent patches to access the ANATOP, PHY and MISC registers matching the controller and thus get rid of the ad-hoc controller sequence number mapping. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index b0703502db0..008dca9bae7 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -417,6 +417,12 @@ struct ehci_mx6_priv_data { struct clk clk; enum usb_init_type init_type; int portnr; +#if !defined(CONFIG_PHY) + /* Legacy iMX6/iMX7/iMX7ULP compat, they do not use PHY framework yet */ + void __iomem *phy_addr; + void __iomem *misc_addr; + void __iomem *anatop_addr; +#endif }; static int mx6_init_after_reset(struct ehci_ctrl *dev) @@ -571,6 +577,55 @@ static int ehci_usb_bind(struct udevice *dev) return 0; } +static int mx6_parse_dt_addrs(struct udevice *dev) +{ +#if !defined(CONFIG_PHY) + /* + * Parse USB PHY/MISC/ANATOP addresses out of DT on platforms + * which do not use PHY framework yet, that is MX6/MX7/MX7ULP. + */ + struct ehci_mx6_priv_data *priv = dev_get_priv(dev); + int phy_off, misc_off, anatop_off; + const void *blob = gd->fdt_blob; + int offset = dev_of_offset(dev); + void *__iomem addr; + + phy_off = fdtdec_lookup_phandle(blob, offset, "fsl,usbphy"); + if (phy_off < 0) + return -EINVAL; + + misc_off = fdtdec_lookup_phandle(blob, offset, "fsl,usbmisc"); + if (misc_off < 0) + return -EINVAL; + + addr = (void __iomem *)fdtdec_get_addr(blob, phy_off, "reg"); + if ((fdt_addr_t)addr == FDT_ADDR_T_NONE) + return -EINVAL; + + priv->phy_addr = addr; + + addr = (void __iomem *)fdtdec_get_addr(blob, misc_off, "reg"); + if ((fdt_addr_t)addr == FDT_ADDR_T_NONE) + return -EINVAL; + + priv->misc_addr = addr; + +#if defined(CONFIG_MX6) + /* Resolve ANATOP offset through USB PHY node */ + anatop_off = fdtdec_lookup_phandle(blob, phy_off, "fsl,anatop"); + if (anatop_off < 0) + return -EINVAL; + + addr = (void __iomem *)fdtdec_get_addr(blob, anatop_off, "reg"); + if ((fdt_addr_t)addr == FDT_ADDR_T_NONE) + return -EINVAL; + + priv->anatop_addr = addr; +#endif +#endif + return 0; +} + static int ehci_usb_probe(struct udevice *dev) { struct usb_plat *plat = dev_get_plat(dev); @@ -589,6 +644,10 @@ static int ehci_usb_probe(struct udevice *dev) } } + ret = mx6_parse_dt_addrs(dev); + if (ret) + return ret; + priv->ehci = ehci; priv->portnr = dev_seq(dev); priv->init_type = type; From patchwork Fri Apr 2 12:48:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461677 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=MaxZ0X61; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfzk6fJPz9sV5 for ; Fri, 2 Apr 2021 23:50:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 36459817A2; Fri, 2 Apr 2021 14:48:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367732; bh=VQhV0WFvwkRfgC0ISraxdNYtJ4K4GxzoTE7o7mULORs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MaxZ0X614gs7AAKgKoO6BN8EVwBG8OcAeqonvZcAA/ZV0pCykVYU+n8heqNMDYYI3 Qz4PF2vqCANK7HxuyIYybCoW+1FIDMGxcReGQWb4fwNxBYWhKIQFxZVAK5Zyju8GlF mv1PlIYdnI9M4VwEl21r8rTlznGJpcviY0xctT78woymlo1sjnv+TtolUjxeB0rQN5 4Qu+fUzNaLIs2242BtS3w9KpMzrK3WFG1heU3cYl/RLkwg9TVpkYyOwuIvYXWNiTIO WFbfTGLEUS7J4gPE/ENZTNctglhXek+Ae3bfoERcoeH/87cTfBffCc2pzQdcRqksP6 bJJ/hPnTXarjA== Received: by phobos.denx.de (Postfix, from userid 109) id 44060816AE; Fri, 2 Apr 2021 14:48:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6FDBF8167E for ; Fri, 2 Apr 2021 14:48:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxR1m76z1s2CJ; Fri, 2 Apr 2021 14:48:43 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxR1T1Fz1r18L; Fri, 2 Apr 2021 14:48:43 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id M5YyvcMMuCSp; Fri, 2 Apr 2021 14:48:42 +0200 (CEST) X-Auth-Info: KPWyzLiUQVxd253o2INhl2SZCfpDSQDXsrqDK2bxxcI= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:42 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 11/19] usb: ehci-mx6: Split ehci_mx6_common_init() Date: Fri, 2 Apr 2021 14:48:04 +0200 Message-Id: <20210402124812.186761-11-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean In order to pass component addresses around easily instead of passing ad-hoc sequence numbers, it is necessary to split ehci_mx6_common_init(). Make it so and call the separate functions instead. Since board_ehci_hcd_init() makes no sense in DM case, do not call it in DM case. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 58 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 008dca9bae7..b195ba4c89b 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -283,6 +283,7 @@ static void usb_oc_config(int index) #endif } +#if !CONFIG_IS_ENABLED(DM_USB) /** * board_usb_phy_mode - override usb phy mode * @port: usb host/otg port @@ -329,27 +330,6 @@ int __weak board_ehci_power(int port, int on) return 0; } -int ehci_mx6_common_init(struct usb_ehci *ehci, int index) -{ - int ret; - - /* Do board specific initialization */ - ret = board_ehci_hcd_init(index); - if (ret) - return ret; - - usb_power_config(index); - usb_oc_config(index); - -#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) - usb_internal_phy_clock_gate(index, 1); - usb_phy_enable(index, ehci); -#endif - - return 0; -} - -#if !CONFIG_IS_ENABLED(DM_USB) int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { @@ -377,9 +357,20 @@ int ehci_hcd_init(int index, enum usb_init_type init, enable_usboh3_clk(1); mdelay(1); - ret = ehci_mx6_common_init(ehci, index); - if (ret) + /* Do board specific initialization */ + ret = board_ehci_hcd_init(index); + if (ret) { + enable_usboh3_clk(0); return ret; + } + + usb_power_config(index); + usb_oc_config(index); + +#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) + usb_internal_phy_clock_gate(index, 1); + usb_phy_enable(index, ehci); +#endif type = board_usb_phy_mode(index); @@ -432,9 +423,13 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) struct usb_ehci *ehci = priv->ehci; int ret; - ret = ehci_mx6_common_init(priv->ehci, priv->portnr); - if (ret) - return ret; + usb_power_config(priv->portnr); + usb_oc_config(priv->portnr); + +#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) + usb_internal_phy_clock_gate(priv->portnr, 1); + usb_phy_enable(priv->portnr, ehci); +#endif #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { @@ -672,9 +667,14 @@ static int ehci_usb_probe(struct udevice *dev) if (ret) debug("%s: No vbus supply\n", dev->name); #endif - ret = ehci_mx6_common_init(ehci, priv->portnr); - if (ret) - goto err_clk; + + usb_power_config(priv->portnr); + usb_oc_config(priv->portnr); + +#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) + usb_internal_phy_clock_gate(priv->portnr, 1); + usb_phy_enable(priv->portnr, ehci); +#endif #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { From patchwork Fri Apr 2 12:48:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461678 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=Noph24YL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBfzx21ZTz9sV5 for ; Fri, 2 Apr 2021 23:50:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 546D28179F; Fri, 2 Apr 2021 14:48:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367733; bh=lD0n1HoXDFM/oWrPXDn2wwI/fve6+V/pm/74/F2cLN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Noph24YLAvB2AiLdTO9qfz5NWUtkKEWWVQJifPHA5pai0MF2KJS1jjt5gE2Y82dLu l3wMgvngnnvISSgP4BErkSl2Dk+ykDKkr8heXRomxBpmxvvqj6apy6EY20QZnyWhuM T3mP26AMFpVeBGjOWhI6eQa07jFR1UZ1GJyMhAi/KeE37Xde4GNsOCn9gawJ0Yi4/6 VU/TkQ0k/m0/APzzQdSDt/jroutBThPyDtVnHVSsZaEiB+P7aSq8cPQrr9L9SglSfw Wz0GRu+hBdCRJ+396zEcgZkCOAUOdzhKEmG7r+0SlirS5MvYwE/3Y/XoM47PzuivPM BHmciz1yYwAXA== Received: by phobos.denx.de (Postfix, from userid 109) id 9D03A81742; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B07A6816A4 for ; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxS3bTWz1qtPq; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxS3Hqsz1r18L; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 3F5uMj9c6joO; Fri, 2 Apr 2021 14:48:43 +0200 (CEST) X-Auth-Info: 7D/fNHRkgmJqd1CWo8APt4e5tlEgTTiAOBjqsRRouXE= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:43 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 12/19] usb: ehci-mx6: Pass PHY address to usb_*_phy*() Date: Fri, 2 Apr 2021 14:48:05 +0200 Message-Id: <20210402124812.186761-12-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Instead of passing ad-hoc index to USB PHY handling functions and then try and figure out the PHY address, pass in the PHY address itself. For DM case, this address comes easily from DT. For non-DM case, the previous method is still present, however the non-DM case will soon be removed. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index b195ba4c89b..800a25d1d9d 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -94,14 +94,8 @@ static const unsigned phy_bases[] = { #endif }; -static void usb_internal_phy_clock_gate(int index, int on) +static void usb_internal_phy_clock_gate(void __iomem *phy_reg, int on) { - void __iomem *phy_reg; - - if (index >= ARRAY_SIZE(phy_bases)) - return; - - phy_reg = (void __iomem *)phy_bases[index]; phy_reg += on ? USBPHY_CTRL_CLR : USBPHY_CTRL_SET; writel(USBPHY_CTRL_CLKGATE, phy_reg); } @@ -166,17 +160,12 @@ static void usb_power_config(int index) } /* Return 0 : host node, <>0 : device mode */ -static int usb_phy_enable(int index, struct usb_ehci *ehci) +static int usb_phy_enable(struct usb_ehci *ehci, void __iomem *phy_reg) { - void __iomem *phy_reg; void __iomem *phy_ctrl; void __iomem *usb_cmd; int ret; - if (index >= ARRAY_SIZE(phy_bases)) - return 0; - - phy_reg = (void __iomem *)phy_bases[index]; phy_ctrl = (void __iomem *)(phy_reg + USBPHY_CTRL); usb_cmd = (void __iomem *)&ehci->usbcmd; @@ -368,8 +357,10 @@ int ehci_hcd_init(int index, enum usb_init_type init, usb_oc_config(index); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) - usb_internal_phy_clock_gate(index, 1); - usb_phy_enable(index, ehci); + if (index < ARRAY_SIZE(phy_bases)) { + usb_internal_phy_clock_gate((void __iomem *)phy_bases[index], 1); + usb_phy_enable(ehci, (void __iomem *)phy_bases[index]); + } #endif type = board_usb_phy_mode(index); @@ -427,8 +418,8 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) usb_oc_config(priv->portnr); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) - usb_internal_phy_clock_gate(priv->portnr, 1); - usb_phy_enable(priv->portnr, ehci); + usb_internal_phy_clock_gate(priv->phy_addr, 1); + usb_phy_enable(ehci, priv->phy_addr); #endif #if CONFIG_IS_ENABLED(DM_REGULATOR) @@ -672,8 +663,8 @@ static int ehci_usb_probe(struct udevice *dev) usb_oc_config(priv->portnr); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) - usb_internal_phy_clock_gate(priv->portnr, 1); - usb_phy_enable(priv->portnr, ehci); + usb_internal_phy_clock_gate(priv->phy_addr, 1); + usb_phy_enable(ehci, priv->phy_addr); #endif #if CONFIG_IS_ENABLED(DM_REGULATOR) From patchwork Fri Apr 2 12:48:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461679 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=bRy4fWgs; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg080lKMz9sV5 for ; Fri, 2 Apr 2021 23:51:04 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7BA3A81889; Fri, 2 Apr 2021 14:48:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367734; bh=AEAW4/iuYMEeyprJjBC/fqM51KRzhm8M8no2Cm8PFO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=bRy4fWgssXaJHOAX7WUlNjPu2+S/QfL4gtz8vkTJiNdxGrqpu/CzV0dnqdE01NaA1 r3rVrVr/etE9ArrOCqXc46q73T1mOPY2PkpS1BEHjO13CpCPNEzMvOY50LkzQs0f42 22MR1vy+5jzaGjPWcSmv2224mGZP6+M4yoKfIREH/x8fxWUwInqr76e4uhp2ltvKnK FZ5B0nN2pqVvl53aDRBqi45G2DH69oztm9ol6BmlmOaYEsMFduRom3n4C1jmR7DriT Jr8WBNnWHTAOaZJMxr0qiFLCivcuVSQnmB+Dyny4ia9vZaWOTWTf4RUXhdKQIoptWY yU7O0yEyKHSTg== Received: by phobos.denx.de (Postfix, from userid 109) id 339068177E; Fri, 2 Apr 2021 14:48:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5CF2F8167E for ; Fri, 2 Apr 2021 14:48:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxV0rqmz1qtPt; Fri, 2 Apr 2021 14:48:46 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxT6xfCz1r18L; Fri, 2 Apr 2021 14:48:45 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id TXFNr3X07ilo; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) X-Auth-Info: xciRh9uzm2KntDMapuEn1w0DyL4jDqVAA6KOivP1Hrw= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:44 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 13/19] usb: ehci-mx6: Split usb_power_config() Date: Fri, 2 Apr 2021 14:48:06 +0200 Message-Id: <20210402124812.186761-13-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Split usb_power_config() per SoC and pass in USB PHY, USBNC and ANATOP addresses instead of ad-hoc sequence numbers. This is only applicable on legacy systems which do not implement proper PHY support. Once PHY support is available, parts of this can be removed altogether and moved to the PHY driver, similar to Linux phy-mxs-usb.c . Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 127 ++++++++++++++++++++++-------------- 1 file changed, 78 insertions(+), 49 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 800a25d1d9d..5001a8e74fb 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -86,43 +86,17 @@ struct usbnc_regs { u32 adp_status; }; -#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) -static const unsigned phy_bases[] = { - USB_PHY0_BASE_ADDR, -#if defined(USB_PHY1_BASE_ADDR) - USB_PHY1_BASE_ADDR, -#endif -}; - -static void usb_internal_phy_clock_gate(void __iomem *phy_reg, int on) -{ - phy_reg += on ? USBPHY_CTRL_CLR : USBPHY_CTRL_SET; - writel(USBPHY_CTRL_CLKGATE, phy_reg); -} - -static void usb_power_config(int index) +#if defined(CONFIG_MX6) +static void usb_power_config_mx6(void __iomem *anatop, int anatop_bits_index) { -#if defined(CONFIG_MX7ULP) - struct usbphy_regs __iomem *usbphy = - (struct usbphy_regs __iomem *)USB_PHY0_BASE_ADDR; - - if (index > 0) - return; - - writel(ANADIG_USB2_CHRG_DETECT_EN_B | - ANADIG_USB2_CHRG_DETECT_CHK_CHRG_B, - &usbphy->usb1_chrg_detect); - - scg_enable_usb_pll(true); - -#else - struct anatop_regs __iomem *anatop = - (struct anatop_regs __iomem *)ANATOP_BASE_ADDR; void __iomem *chrg_detect; void __iomem *pll_480_ctrl_clr; void __iomem *pll_480_ctrl_set; - switch (index) { + if (!is_mx6()) + return; + + switch (anatop_bits_index) { case 0: chrg_detect = &anatop->usb1_chrg_detect; pll_480_ctrl_clr = &anatop->usb1_pll_480_ctrl_clr; @@ -155,8 +129,51 @@ static void usb_power_config(int index) ANADIG_USB2_PLL_480_CTRL_POWER | ANADIG_USB2_PLL_480_CTRL_EN_USB_CLKS, pll_480_ctrl_set); +} +#endif + +#if defined(CONFIG_MX7) +static void usb_power_config_mx7(struct usbnc_regs *usbnc) +{ + void __iomem *phy_cfg2 = (void __iomem *)(&usbnc->phy_cfg2); + + if (!is_mx7()) + return; + + /* + * Clear the ACAENB to enable usb_otg_id detection, + * otherwise it is the ACA detection enabled. + */ + clrbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB); +} +#endif + +#if defined(CONFIG_MX7ULP) +static void usb_power_config_mx7ulp(struct usbphy_regs __iomem *usbphy) +{ + if (!is_mx7ulp()) + return; + + writel(ANADIG_USB2_CHRG_DETECT_EN_B | + ANADIG_USB2_CHRG_DETECT_CHK_CHRG_B, + &usbphy->usb1_chrg_detect); + + scg_enable_usb_pll(true); +} +#endif +#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) +static const unsigned phy_bases[] = { + USB_PHY0_BASE_ADDR, +#if defined(USB_PHY1_BASE_ADDR) + USB_PHY1_BASE_ADDR, #endif +}; + +static void usb_internal_phy_clock_gate(void __iomem *phy_reg, int on) +{ + phy_reg += on ? USBPHY_CTRL_CLR : USBPHY_CTRL_SET; + writel(USBPHY_CTRL_CLKGATE, phy_reg); } /* Return 0 : host node, <>0 : device mode */ @@ -215,19 +232,6 @@ int usb_phy_mode(int port) } #elif defined(CONFIG_MX7) -static void usb_power_config(int index) -{ - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + - (0x10000 * index) + USBNC_OFFSET); - void __iomem *phy_cfg2 = (void __iomem *)(&usbnc->phy_cfg2); - - /* - * Clear the ACAENB to enable usb_otg_id detection, - * otherwise it is the ACA detection enabled. - */ - clrbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB); -} - int usb_phy_mode(int port) { struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + @@ -325,8 +329,16 @@ int ehci_hcd_init(int index, enum usb_init_type init, enum usb_init_type type; #if defined(CONFIG_MX6) u32 controller_spacing = 0x200; -#elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) + struct anatop_regs __iomem *anatop = + (struct anatop_regs __iomem *)ANATOP_BASE_ADDR; +#elif defined(CONFIG_MX7) + u32 controller_spacing = 0x10000; + struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + (0x10000 * index) + USBNC_OFFSET); +#elif defined(CONFIG_MX7ULP) u32 controller_spacing = 0x10000; + struct usbphy_regs __iomem *usbphy = + (struct usbphy_regs __iomem *)USB_PHY0_BASE_ADDR; #endif struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR + (controller_spacing * index)); @@ -353,7 +365,14 @@ int ehci_hcd_init(int index, enum usb_init_type init, return ret; } - usb_power_config(index); +#if defined(CONFIG_MX6) + usb_power_config_mx6(anatop, index); +#elif defined (CONFIG_MX7) + usb_power_config_mx7(usbnc); +#elif defined (CONFIG_MX7ULP) + usb_power_config_mx7ulp(usbphy); +#endif + usb_oc_config(index); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) @@ -414,13 +433,18 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) struct usb_ehci *ehci = priv->ehci; int ret; - usb_power_config(priv->portnr); +#if !defined(CONFIG_PHY) + usb_power_config_mx6(priv->anatop_addr, priv->portnr); + usb_power_config_mx7(priv->misc_addr); + usb_power_config_mx7ulp(priv->phy_addr); + usb_oc_config(priv->portnr); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) usb_internal_phy_clock_gate(priv->phy_addr, 1); usb_phy_enable(ehci, priv->phy_addr); #endif +#endif #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { @@ -659,13 +683,18 @@ static int ehci_usb_probe(struct udevice *dev) debug("%s: No vbus supply\n", dev->name); #endif - usb_power_config(priv->portnr); +#if !defined(CONFIG_PHY) + usb_power_config_mx6(priv->anatop_addr, priv->portnr); + usb_power_config_mx7(priv->usbnc); + usb_power_config_mx7ulp(priv->usbphy); + usb_oc_config(priv->portnr); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) usb_internal_phy_clock_gate(priv->phy_addr, 1); usb_phy_enable(ehci, priv->phy_addr); #endif +#endif #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { From patchwork Fri Apr 2 12:48:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461680 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=PQMNcBXo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg0M20Jmz9sV5 for ; Fri, 2 Apr 2021 23:51:15 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFC1E81895; Fri, 2 Apr 2021 14:48:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367736; bh=dA2zzyey6huNDS3s1dGu3bJQPBWaJoKmPufLQdb7MIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PQMNcBXotgAju3izR23QXx22Lv/aFe7w6QplzHXcq47Yjfvp8S+r02aZGxfaAo2Sx vaNZy9kzHnsQg2N7eZkvjk5PaDmdbxb5MYRTGJrSUSN4lGKAXuxUAKnhJY3bdwJYNe WfWmukt1sT7/8OSDayLH+kdUgcv91XZlUbdcfbAA5rPGekmRMSEPvXRZE/89CyYGHr tAUchu8+WwtC4eGCvYhMFNHAtPvjvacRAJ8aRaiQY0YdyZkUrxiJlTuU5ruZ0zLVHS igW+NhtPLCJxrv48maHbOiII8cp+n9za1bp6GGfD3ScGuVfWlNdomscB/OCKqqWTu1 G0WGn5H2dJEuw== Received: by phobos.denx.de (Postfix, from userid 109) id 3E8EA817A1; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A189281718 for ; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxW2rcSz1s2CP; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxW2TqQz1r18L; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Wko9tjqM0t41; Fri, 2 Apr 2021 14:48:46 +0200 (CEST) X-Auth-Info: 1SQFL5VeoRxwOIpCAovOLHar2B9qAFBguckGTRwQZgk= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:46 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 14/19] usb: ehci-mx6: Pass MISC address to usb_oc_config() Date: Fri, 2 Apr 2021 14:48:07 +0200 Message-Id: <20210402124812.186761-14-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Instead of passing ad-hoc sequence number to usb_oc_config(), pass in the USB MISC address itself. The USB MISC address comes from DT in DM case, and from the old method using controller index in non-DM case. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 5001a8e74fb..345be528739 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -248,15 +248,8 @@ int usb_phy_mode(int port) } #endif -static void usb_oc_config(int index) +static void usb_oc_config(struct usbnc_regs *usbnc, int index) { -#if defined(CONFIG_MX6) - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + - USB_OTHERREGS_OFFSET); -#elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + - (0x10000 * index) + USBNC_OFFSET); -#endif void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl[index]); #if CONFIG_MACH_TYPE == MACH_TYPE_MX6Q_ARM2 @@ -331,6 +324,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, u32 controller_spacing = 0x200; struct anatop_regs __iomem *anatop = (struct anatop_regs __iomem *)ANATOP_BASE_ADDR; + struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + USB_OTHERREGS_OFFSET); #elif defined(CONFIG_MX7) u32 controller_spacing = 0x10000; struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + @@ -339,6 +334,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, u32 controller_spacing = 0x10000; struct usbphy_regs __iomem *usbphy = (struct usbphy_regs __iomem *)USB_PHY0_BASE_ADDR; + struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + (0x10000 * index) + USBNC_OFFSET); #endif struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR + (controller_spacing * index)); @@ -373,7 +370,7 @@ int ehci_hcd_init(int index, enum usb_init_type init, usb_power_config_mx7ulp(usbphy); #endif - usb_oc_config(index); + usb_oc_config(usbnc, index); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) if (index < ARRAY_SIZE(phy_bases)) { @@ -438,7 +435,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) usb_power_config_mx7(priv->misc_addr); usb_power_config_mx7ulp(priv->phy_addr); - usb_oc_config(priv->portnr); + usb_oc_config(priv->misc_addr, priv->portnr); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) usb_internal_phy_clock_gate(priv->phy_addr, 1); @@ -688,7 +685,7 @@ static int ehci_usb_probe(struct udevice *dev) usb_power_config_mx7(priv->usbnc); usb_power_config_mx7ulp(priv->usbphy); - usb_oc_config(priv->portnr); + usb_oc_config(priv->misc_addr, priv->portnr); #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) usb_internal_phy_clock_gate(priv->phy_addr, 1); From patchwork Fri Apr 2 12:48:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461681 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=JNho0lQ6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg0Z1Bm5z9sV5 for ; Fri, 2 Apr 2021 23:51:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D93681B52; Fri, 2 Apr 2021 14:48:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367737; bh=htiz5xJrEJn1ITV6jYnRmgN2XIcw2OEghA0+w2995k0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JNho0lQ6ADZ4uinAFCsRFO1kH/jhk/ZxbxymDGK8MA3gx9+lLQfDqLcwYBYrDXt06 2bKzDW9Tu2NiD0M8mH3fRNGr2BIAOTPEi8nNTDZiKeaxEO2cRr/nqmZCS2CGcNR5rl mVdg9x/Vs3SwyHKOVKn/23ZXuvvbH8qLrMtPwRvsAlmjaWDCXNjZ3F+/juzFI9VEFd jsq/FcaXiNShRkTBTL4TILvUPCE8rVlbpHbAgBH8aBEY5vXBKldXKIi+N0FnJzSHcI 5xENog6UqngoeQWX2LOgdt4Zf5g2tOAK72HQGYpGxAAQlIy/my8+t+FWMVqNxspPcS 5rE3YCizET0Qg== Received: by phobos.denx.de (Postfix, from userid 109) id 13741817B1; Fri, 2 Apr 2021 14:48:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1C66381784 for ; Fri, 2 Apr 2021 14:48:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxX6QF5z1s2CJ; Fri, 2 Apr 2021 14:48:48 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxX5TT0z1r18L; Fri, 2 Apr 2021 14:48:48 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id cYI-ZXs1cHh3; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) X-Auth-Info: RhD31lnTy0bxPIjFzRifaFO5bjhbwjFJWFDF7TWmsq4= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:47 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 15/19] usb: ehci-mx6: Use portnr in DM only if PHY is disabled Date: Fri, 2 Apr 2021 14:48:08 +0200 Message-Id: <20210402124812.186761-15-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean In case of legacy platforms which do not implement PHY support, determine portnr from PHY node DT aliases, just like Linux does. This is not necessary in case PHY support is enabled and a PHY driver is available, so only enable the portnr handling for the legacy platforms. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 54 ++++++------------------------------- 1 file changed, 8 insertions(+), 46 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 345be528739..b1cc62fcc37 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -414,12 +414,12 @@ struct ehci_mx6_priv_data { struct udevice *vbus_supply; struct clk clk; enum usb_init_type init_type; - int portnr; #if !defined(CONFIG_PHY) /* Legacy iMX6/iMX7/iMX7ULP compat, they do not use PHY framework yet */ void __iomem *phy_addr; void __iomem *misc_addr; void __iomem *anatop_addr; + int portnr; #endif }; @@ -541,49 +541,6 @@ static int ehci_usb_of_to_plat(struct udevice *dev) return 0; } -static int ehci_usb_bind(struct udevice *dev) -{ - /* - * TODO: - * This driver is only partly converted to DT probing and still uses - * a tremendous amount of hard-coded addresses. To make things worse, - * the driver depends on specific sequential indexing of controllers, - * from which it derives offsets in the PHY and ANATOP register sets. - * - * Here we attempt to calculate these indexes from DT information as - * well as we can. The USB controllers on all existing iMX6 SoCs - * are placed next to each other, at addresses incremented by 0x200, - * and iMX7 their addresses are shifted by 0x10000. - * Thus, the index is derived from the multiple of 0x200 (0x10000 for - * iMX7) offset from the first controller address. - * - * However, to complete conversion of this driver to DT probing, the - * following has to be done: - * - DM clock framework support for iMX must be implemented - * - usb_power_config() has to be converted to clock framework - * -> Thus, the ad-hoc "index" variable goes away. - * - USB PHY handling has to be factored out into separate driver - * -> Thus, the ad-hoc "index" variable goes away from the PHY - * code, the PHY driver must parse it's address from DT. This - * USB driver must find the PHY driver via DT phandle. - * -> usb_power_config() shall be moved to PHY driver - * With these changes in place, the ad-hoc indexing goes away and - * the driver is fully converted to DT probing. - */ - - /* - * FIXME: This cannot work with the new sequence numbers. - * Please complete the DM conversion. - * - * u32 controller_spacing = is_mx7() ? 0x10000 : 0x200; - * fdt_addr_t addr = devfdt_get_addr_index(dev, 0); - * - * dev->req_seq = (addr - USB_BASE_ADDR) / controller_spacing; - */ - - return 0; -} - static int mx6_parse_dt_addrs(struct udevice *dev) { #if !defined(CONFIG_PHY) @@ -596,11 +553,17 @@ static int mx6_parse_dt_addrs(struct udevice *dev) const void *blob = gd->fdt_blob; int offset = dev_of_offset(dev); void *__iomem addr; + int ret, devnump; phy_off = fdtdec_lookup_phandle(blob, offset, "fsl,usbphy"); if (phy_off < 0) return -EINVAL; + ret = fdtdec_get_alias_seq(blob, dev->uclass->uc_drv->name, + phy_off, &devnump); + if (ret < 0) + return ret; + misc_off = fdtdec_lookup_phandle(blob, offset, "fsl,usbmisc"); if (misc_off < 0) return -EINVAL; @@ -610,6 +573,7 @@ static int mx6_parse_dt_addrs(struct udevice *dev) return -EINVAL; priv->phy_addr = addr; + priv->portnr = devnump; addr = (void __iomem *)fdtdec_get_addr(blob, misc_off, "reg"); if ((fdt_addr_t)addr == FDT_ADDR_T_NONE) @@ -656,7 +620,6 @@ static int ehci_usb_probe(struct udevice *dev) return ret; priv->ehci = ehci; - priv->portnr = dev_seq(dev); priv->init_type = type; #if CONFIG_IS_ENABLED(CLK) @@ -766,7 +729,6 @@ U_BOOT_DRIVER(usb_mx6) = { .id = UCLASS_USB, .of_match = mx6_usb_ids, .of_to_plat = ehci_usb_of_to_plat, - .bind = ehci_usb_bind, .probe = ehci_usb_probe, .remove = ehci_usb_remove, .ops = &ehci_usb_ops, From patchwork Fri Apr 2 12:48:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461683 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=LWg4TrKP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg0m73VTz9sVq for ; Fri, 2 Apr 2021 23:51:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 25C4781C84; Fri, 2 Apr 2021 14:48:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367738; bh=BmDiYYUCWLH0XMNFmQCqGLD/G0wTcI2FOvmf8uqrK+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LWg4TrKPh8cHI+vI+pPthidUuOW35rPdX+E7d/EdE17eP/avHnZzBaPmJB9ecpSF0 25f6T+VnM+gRHd2wOayMErhF11rBvrlj9Nu8z9tPSkPX0t6lcUl+XeSYyFReJ64dRX JJP7GTPGojPubWGP/PAB9MA4X7CiglTjxO7olg++l/ntzFSTjKw2GfgpybI6KhtaP+ P3NG2YuH1rbPH7flFTPK7eQXL6GcSkBWJAK9qNDFNo8+rmGEYpAmrzHgXmb+IgWXob 2ZHZvDkYsv5jwJ6yy5r4659TtL9kMMIDPPA83YMqrsVb2kOi7wGzpykYGV8XkFOizJ ZuyU0d2u16dWg== Received: by phobos.denx.de (Postfix, from userid 109) id 4EFE3817BD; Fri, 2 Apr 2021 14:48:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DE7AB8179F for ; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxZ4wNMz1qtPq; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxZ4bHvz1r18L; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ayqe9_SI3VTE; Fri, 2 Apr 2021 14:48:48 +0200 (CEST) X-Auth-Info: BqaWVYxPDjfs0/7RnmdF/JK4xd3yy4CiI0owpCZahvY= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:48 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 16/19] usb: ehci-mx6: Add generic EHCI PHY support Date: Fri, 2 Apr 2021 14:48:09 +0200 Message-Id: <20210402124812.186761-16-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean In case PHY support is enabled, use the generic EHCI PHY support to start and stop the PHY. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index b1cc62fcc37..855a1bdaaa2 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -413,6 +413,7 @@ struct ehci_mx6_priv_data { struct usb_ehci *ehci; struct udevice *vbus_supply; struct clk clk; + struct phy phy; enum usb_init_type init_type; #if !defined(CONFIG_PHY) /* Legacy iMX6/iMX7/iMX7ULP compat, they do not use PHY framework yet */ @@ -676,16 +677,26 @@ static int ehci_usb_probe(struct udevice *dev) mdelay(10); +#if defined(CONFIG_PHY) + ret = ehci_setup_phy(dev, &priv->phy, 0); + if (ret) + goto err_regulator; +#endif + hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); hcor = (struct ehci_hcor *)((uint32_t)hccr + HC_LENGTH(ehci_readl(&(hccr)->cr_capbase))); ret = ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type); if (ret) - goto err_regulator; + goto err_phy; return ret; +err_phy: +#if defined(CONFIG_PHY) + ehci_shutdown_phy(dev, &priv->phy); +#endif err_regulator: #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) @@ -707,6 +718,10 @@ int ehci_usb_remove(struct udevice *dev) ehci_deregister(dev); +#if defined(CONFIG_PHY) + ehci_shutdown_phy(dev, &priv->phy); +#endif + #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) regulator_set_enable(priv->vbus_supply, false); From patchwork Fri Apr 2 12:48:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461685 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=HAK0HYbp; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg101QNNz9sV5 for ; Fri, 2 Apr 2021 23:51:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4329781986; Fri, 2 Apr 2021 14:48:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367739; bh=jRjYnUU0TaERzjOHADdbE1P0FCYs2oCDuOZTBktGPk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HAK0HYbphl2Cnoy6TXThr01dcmIxgTKqMVSY1prwCBK+e1Ct6UNjtqW62PDGkEKUC Yhckr+RVcq8OMFco4V64Qfbo7abtO1azapr5cS0kn9M8CioBhAf947tNXYv4J+VSSQ zK6RT4mGA8QIhiLiTCiTIq3DZW9b6L18Neh+zgUEeKrS9fGZTzcENVu8nu3g3yZA88 CZQYJc6mw7vHiAVJxnyNmVrFMvg87u0kMYEcmQ5s7Qm74wetIcI4naEYmGsHQJtYlP D8Z3iMQ6lv9PWO2ew6GA0BIZ/IzJVDk7T8Uxl01kCMH5alya/UemXFpR1fl8wCnqOy P/5TLqoZmeRBQ== Received: by phobos.denx.de (Postfix, from userid 109) id 8B6C8817A9; Fri, 2 Apr 2021 14:48:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DF741817A9 for ; Fri, 2 Apr 2021 14:48:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxb4wX4z1s2CP; Fri, 2 Apr 2021 14:48:51 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxb4bRVz1r18L; Fri, 2 Apr 2021 14:48:51 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Tt4vubOslZaI; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) X-Auth-Info: uPR5h4p3fzS9hXP+1csD6Wl551ydhkPFVLRa3wM/yZ8= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:50 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 17/19] usb: ehci-mx6: Add fsl,imx7d-usb compatible string Date: Fri, 2 Apr 2021 14:48:10 +0200 Message-Id: <20210402124812.186761-17-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Add new compatible string, used by some more up-to-date DTs. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/ehci-mx6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 855a1bdaaa2..c218bdc0574 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -736,6 +736,7 @@ int ehci_usb_remove(struct udevice *dev) static const struct udevice_id mx6_usb_ids[] = { { .compatible = "fsl,imx27-usb" }, + { .compatible = "fsl,imx7d-usb" }, { } }; From patchwork Fri Apr 2 12:48:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461686 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=QaHfc0i9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg194rqnz9sV5 for ; Fri, 2 Apr 2021 23:51:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5586381CC9; Fri, 2 Apr 2021 14:49:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367740; bh=gYl6er4OntPcMRCjfM+5mupo1/DG0vbj+bSrlom/ZMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QaHfc0i9btOky7FZkbYxXgaiMX+z4T76cdn+rzdisMN+dv5hHHPeWACcb5VxEnh69 CJhG2pXFG3pXAGA511z43i58VYkrkCvB4MOgwSzqJQHpQhMhh0KRfhahUdlwS/mD0d Z/KDlfvvPUwdq/1JZWgthQTvjxJf8sD8c5KQvcktkjF2bsfDoPwjfcltUQh1QnpdJX ihnxr91HcSuhzzQWnGj6bLdy6YBUe5DbdEcS/gf/DuRJ7ovq7xnzdPjl9fekvokaTN dLeMD4qbN0mTOJVtA1qRoxTDyI8iXoTiHO/AYyt6+1L4pI1SX7SGRdnT/GK1AXY/Bp Y0ZPyoQTnTnXQ== Received: by phobos.denx.de (Postfix, from userid 109) id 8873381895; Fri, 2 Apr 2021 14:48:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 01985817B8 for ; Fri, 2 Apr 2021 14:48:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxc5bhqz1s2CP; Fri, 2 Apr 2021 14:48:52 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxc5Kf9z1r18L; Fri, 2 Apr 2021 14:48:52 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id m8ZacKoCN23B; Fri, 2 Apr 2021 14:48:51 +0200 (CEST) X-Auth-Info: zJrhxGisUI8WH5LbIOtM5XpTqGJ1yQVLiFPhd8crILk= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:51 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic , Ye Li , uboot-imx Subject: [PATCH 18/19] usb: ehci-mx6: Add iMX8M support Date: Fri, 2 Apr 2021 14:48:11 +0200 Message-Id: <20210402124812.186761-18-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The iMX8M uses nop PHY, select PHY and NOP_PHY automatically. Otherwise, the DM capable driver is now perfectly compatible. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: Ye Li Cc: uboot-imx --- drivers/usb/host/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 0971a7c8139..a51183d4d3c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -156,7 +156,9 @@ config USB_EHCI_MX6 config USB_EHCI_MX7 bool "Support for i.MX7 on-chip EHCI USB controller" - depends on ARCH_MX7 + depends on ARCH_MX7 || IMX8MM + select PHY if IMX8MM + select NOP_PHY if IMX8MM default y ---help--- Enables support for the on-chip EHCI controller on i.MX7 SoCs. From patchwork Fri Apr 2 12:48:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1461687 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=vohF8FIS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBg1M5xtXz9sWK for ; Fri, 2 Apr 2021 23:52:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8103E81CF0; Fri, 2 Apr 2021 14:49:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1617367743; bh=IMyml51swYI9vmlLxZw456En+14O6p4O8WpRF5DAmRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vohF8FISttk5lK1hGW+14s4yLXPNLZo/N/FnfDFYaYErTjNYRor0IikaDt1V8NX8H RHtt0sisFbr1ORpIemzZRfNlNXNOtboY+3JyL6qxW0P92PXGG6q4QBHT4bQ2Hc/ykA JQhyJZn24ha/wtx0L0eE+txdVZZIx7RM4jE10Bvg8Rr0KxteYjwTo3gk1pbRRSVHSu SdVcpn/RNdE4oem2Uy5ug4bBJQ6jB6WO/fiOzstBjjk+QdSw+k2Xqljr8m4aK6MTwt 0Rkz+lP8tNa6Fuacuo7Dzto44UA40hvNdO5ISdgrwWvcaTEjYImDZqhKTLeTijeAkD Ccyya0oJycLBg== Received: by phobos.denx.de (Postfix, from userid 109) id 8770081B52; Fri, 2 Apr 2021 14:48:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1CAD0817BD for ; Fri, 2 Apr 2021 14:48:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4FBfxd6TLvz1qtPq; Fri, 2 Apr 2021 14:48:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4FBfxd60ksz1r18L; Fri, 2 Apr 2021 14:48:53 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id zayfW3v9mFsF; Fri, 2 Apr 2021 14:48:52 +0200 (CEST) X-Auth-Info: Ik5gkEOKZeLsb/1Tkb6NCxotncZI0DtXWBoSvPA3Glk= Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 2 Apr 2021 14:48:52 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Marcel Ziswiler , Max Krummenacher , Oleksandr Suvorov Subject: [PATCH 19/19] ARM: imx8m: verdin-imx8mm: Enable USB Host support Date: Fri, 2 Apr 2021 14:48:12 +0200 Message-Id: <20210402124812.186761-19-marex@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402124812.186761-1-marex@denx.de> References: <20210402124812.186761-1-marex@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Enable USB host support on MX8MM Verdin. Signed-off-by: Marek Vasut Cc: Marcel Ziswiler Cc: Max Krummenacher Cc: Oleksandr Suvorov Reviewed-by: Oleksandr Suvorov Tested-by: Marcel Ziswiler # Verdin iMX8M Mini V1.0B and V1.1A --- configs/verdin-imx8mm_defconfig | 8 +++++++- include/configs/verdin-imx8mm.h | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig index ea0b5978f1f..c8c3420b6a5 100644 --- a/configs/verdin-imx8mm_defconfig +++ b/configs/verdin-imx8mm_defconfig @@ -37,7 +37,6 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_POWER_SUPPORT=y -CONFIG_SPL_USB_HOST_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_PROMPT="Verdin iMX8MM # " # CONFIG_BOOTM_NETBSD is not set @@ -50,6 +49,7 @@ CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y CONFIG_CMD_REGULATOR=y @@ -89,6 +89,8 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_DOMAIN=y +CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_PMIC=y CONFIG_SPL_DM_PMIC_PCA9450=y CONFIG_DM_PMIC_PFUZE100=y @@ -101,5 +103,9 @@ CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y +CONFIG_USB=y +CONFIG_DM_USB=y +# CONFIG_SPL_DM_USB is not set +CONFIG_USB_EHCI_HCD=y CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h index 4751bf5a5af..e3ba08dc69c 100644 --- a/include/configs/verdin-imx8mm.h +++ b/include/configs/verdin-imx8mm.h @@ -117,5 +117,11 @@ #define FEC_QUIRK_ENET_MAC #define IMX_FEC_BASE 0x30BE0000 +/* USB Configs */ +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 + #endif /*_VERDIN_IMX8MM_H */