From patchwork Thu Apr 16 08:52:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 1271592 X-Patchwork-Delegate: sbabic@denx.de 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; dmarc=none (p=none dis=none) header.from=denx.de 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=W7puy1Gv; 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 492tKH041Qz9sR4 for ; Thu, 16 Apr 2020 18:52:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4493A81A0D; Thu, 16 Apr 2020 10:52: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=1587027163; bh=yKznUewpRUThmAtHze2+C4R36ojOrUbxVochL2bpR/M=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=W7puy1Gv9bLN1IYJkJ0le7Od7/QAPuzzVzgu6IVjWPbRGdCB+Clb7j8E3vUxkiBFt mI5ezFK7KYWonqzReLuTP0v0KSGVouM8hR65rJP3vCOT2WoTm9puyV/MWEDPQOKouv +n/4wywiplLj1hwYyeEToKC/+60Fp7buPeN+BpoF87YT/NVNsgzk4+P6KyYiOQZrqh HOXKE8+uwytuyuJxPGgREbS98PNVhOla+yR9BrrE3OKNc6RWeS13Y0KTvFeL6TxfnI OSXbGK2VyFRmy86isG7YkugYXiQ/WBDEfGXgAEuLqbyABhg43pmmDoyjs5JJigYZMS hHPl5+nFK01/w== Received: by phobos.denx.de (Postfix, from userid 109) id A492C81A08; Thu, 16 Apr 2020 10:52: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,URIBL_BLOCKED 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 6DB038065D for ; Thu, 16 Apr 2020 10:52: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=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 492tJw0ZTPz1qs3y; Thu, 16 Apr 2020 10:52:32 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 492tJw02dCz1qr4t; Thu, 16 Apr 2020 10:52: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 z9hT_jlkQvXK; Thu, 16 Apr 2020 10:52:30 +0200 (CEST) X-Auth-Info: 4VQYWZ1R/oJKRy2132pEl5BPqmRKneSzf1EScXKO6tI= Received: from localhost.localdomain (p54847A6E.dip0.t-ipconnect.de [84.132.122.110]) (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; Thu, 16 Apr 2020 10:52:30 +0200 (CEST) From: Harald Seiler To: u-boot@lists.denx.de Cc: Harald Seiler , Andreas Geisreiter , Ludwig Zenz , Marek Vasut , Stefano Babic , Fabio Estevam Subject: [PATCH] ARM: imx6: DHCOM i.MX6 PDK: Fix usb-otg VBUS regulator Date: Thu, 16 Apr 2020 10:52:19 +0200 Message-Id: <20200416085219.60921-1-hws@denx.de> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean During the conversion of this board to DM_REGULATOR, usb-mass-storage was broken and started failing with the following error: => ums 0 mmc 2 UMS: LUN 0, dev 2, hwpart 0, sector 0x0, count 0xe90000 Error enabling VBUS supply g_dnl_register: failed!, error: -38 g_dnl_register failed Fix this by adding the relevant GPIO to the regulator node. Fixes: 4ca99fe81aea ("ARM: imx: dh-imx6: Enable DM regulator") Signed-off-by: Harald Seiler --- Notes: This patch currently depends on "ARM: imx6: DHCOM i.MX6 PDK: Convert to DM_ETH" although this could be changed. This is a working fix but I am not 100% sure if it is the correct thing to do. The device-tree contains a second regulator which already defines this exact GPIO: reg_usb_h1_vbus: regulator-usb-h1-vbus { compatible = "regulator-fixed"; regulator-name = "usb_h1_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; enable-active-high; }; Maybe ®_usb_otg_vbus is superfluous and the two should be merged into a single regulator used for both &usbh1 and &usbotg? arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi | 2 ++ arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi diff --git a/arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi b/arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi index a54e421de3e4..32128d4d2ab4 100644 --- a/arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi +++ b/arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright (C) 2020 Harald Seiler */ +#include "imx6qdl-dhcom-u-boot.dtsi" + / { fec_vio: regulator-fec { compatible = "regulator-fixed"; diff --git a/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi b/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi new file mode 100644 index 000000000000..4c3b5e82d61b --- /dev/null +++ b/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: (GPL-2.0+) +/* + * Copyright (C) 2020 Harald Seiler + */ + +®_usb_otg_vbus { + gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; + enable-active-high; +};