Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp391296pxv; Thu, 15 Jul 2021 06:43:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvSQ7Xf7+wDiSWlN2rH6hGayKVfO39iS3TBPuytfnN4IZFX/8Kb5qKifgXO1wzsnMzrY/Q X-Received: by 2002:a05:6402:781:: with SMTP id d1mr7296047edy.32.1626356602269; Thu, 15 Jul 2021 06:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626356602; cv=none; d=google.com; s=arc-20160816; b=t0MWA+3DqngUTLOsaLPsTHWBqs8L+GmitPVbzzgQCVhQEyXh8dkcFFYsHRQkfmgzah p+B646jsDT1Fw7qOvxefBNgSgyugToDaC1ZwwAL+k7zm7kf13O/atE03Xyw44pVx4T3c gZ6vxwq3a37szuIMPtPQoE3r+Cwft9EYmwv6HWeiM/oSxPwlEHiMYphfpU+ndNjjVt8F j40yzDaWm8h4V3YBwoulEOD6axF14cqZIBU/hOMJbnpMjyf+oUQjozvBqCcN7P9oxcz5 AY/Qa3uns2FX8vxkRBWnXMZeiNyJ9EHM2o0ziXCRX7gv4TPVMhRehjTcqb/eZBsgy9ER gw1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3O5J6rqGF6JMDu06boGyrc4Tj9mnTxeHjN3XsbyGvrs=; b=f9nCosBlBMaCdB80yHheMHvWNXHM/SN3jhjPYdM7eSpAUvqOBy83/rbfzgV3xW90kw 5sOVLLQzjniq+zTkBE+8sZIf4U9xKHfBggZj341D7HBvU1otqQowPKuoos55PYbKLRIJ 3YkK5ITyK+ImRUfvDPi8m3I50jZ/YuMgZdtymZcj/4g8+nAW9g/0y6az9pMVJJ834adL XbF1Q2qyth4PI12t1JBRXB/wkl8SbrYsTHybr1PpJeNJXAQeRBwAOhB6ByZQJGCBrYYM bO1yqUgznGSQoGBsOBQ0rr6nXCguUetgMFg0UcaCP6+6jjXQl/EgCXerTZwP3wdcuxtM RalQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q6ZL3uQI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o20si7744232edv.34.2021.07.15.06.42.59; Thu, 15 Jul 2021 06:43:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q6ZL3uQI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241294AbhGOK1I (ORCPT + 99 others); Thu, 15 Jul 2021 06:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232502AbhGOK1H (ORCPT ); Thu, 15 Jul 2021 06:27:07 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE8CC06175F; Thu, 15 Jul 2021 03:24:13 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id hc15so8448304ejc.4; Thu, 15 Jul 2021 03:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3O5J6rqGF6JMDu06boGyrc4Tj9mnTxeHjN3XsbyGvrs=; b=q6ZL3uQIevdhZUbDj15RHAlCF1aS0Duaxre+LA3t4f29x1/wHfR62boo6p5nebMWzc m8N6n2foBvI4j5z4tsNI+rfuAr585Spa2jGvsS2v2zJ/8D5cA1WWs6g7yrV9V2pcUxQl kfxe5qWaqfDfdovV5Va4lTP5m7SO6YcVYZmSv5HPu3HxUT1U8OUCqEHfJK+9jwT0nyzr L/N7hGA/7ZPQ+tN7udZKDr9hqxq621/SD+olWyJz4RDnkAIBgeqdBpIkRy5XydnuLq/v UJx/KfGe9+32bvVzdaiLNmBQd7N4re2dgjMjnZoN5kknEvEniBsSp7Hc76d8u7w8gkQc oVBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3O5J6rqGF6JMDu06boGyrc4Tj9mnTxeHjN3XsbyGvrs=; b=B9BqjLkQ9yHggoYMoOnmZNlT3K99+sHpvizsLz7qq5Iht98aPIfZpWZKL/I2zbDqqI hSt6UzlXoH6puGmJGnXMBn+UkugezPsOKfWTg+cAehpezpbxdWUYK57k0IRknD3evLYf rddUjLX3yvfT5uZD/k/nXrDwQcb7zRNoWmQCRKO6oEP0hVzmJKi1bHX3jD79qKjnQwm/ WV+BVPKXKCnAQKe/3ZeR1gSDQTjtfo/1N+8PVIts45B/HNxULugsiwM0/jiX31AJvkiV 3HTTKisE0t/cXoCY9Sc3PlSOHMWCrK5epij1oLYG44l/kTgYXdZvliY3xNfhPr9503AB nnTg== X-Gm-Message-State: AOAM531ODBvIwbSiQN4R/6tt3Gc+UkWWPFBiR583Q6cCeFU62NBXzMWa zI/EqLm95ChP4N9d6LAEHAXBtw8xvN0vA2NA9u0= X-Received: by 2002:a17:907:3c16:: with SMTP id gh22mr4844903ejc.158.1626344652261; Thu, 15 Jul 2021 03:24:12 -0700 (PDT) MIME-Version: 1.0 References: <20210713055227.1142-1-linux.amoon@gmail.com> <20210713055227.1142-2-linux.amoon@gmail.com> In-Reply-To: From: Anand Moon Date: Thu, 15 Jul 2021 15:54:01 +0530 Message-ID: Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node To: Martin Blumenstingl Cc: linux-phy@lists.infradead.org, linux-arm-kernel , linux-amlogic@lists.infradead.org, Linux Kernel , Matt Corallo , Rob Herring , Neil Armstrong , Kevin Hilman , Jerome Brunet , Kishon Vijay Abraham I , Vinod Koul , Emiliano Ingrassia , devicetree Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, On Thu, 15 Jul 2021 at 05:00, Martin Blumenstingl wrote: > > Hi Anand, > > On Wed, Jul 14, 2021 at 7:25 PM Anand Moon wrote: > [...] > > Can you give these small changes a try, > > $ git diff > > diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts > > b/arch/arm/boot/dts/meson8b-odroidc1.dts > > index 748f4c6a050a..066523f14074 100644 > > --- a/arch/arm/boot/dts/meson8b-odroidc1.dts > > +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts > > @@ -47,8 +47,9 @@ usb_pwr_en: regulator-usb-pwr-en { > > /* > > * signal name from schematics: PWREN > > */ > > - gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; > > + gpio = <&gpio_ao GPIOAO_5 GPIO_OPEN_DRAIN>; > > enable-active-high; > > + regulator-always-on; > > }; > > > > [alarm@archl-c1e ~]$ sudo cat /sys/kernel/debug/gpio | grep usb > > gpio-1953 (USB_HUB_RST_N |usb-hub-reset ) out hi > > gpio-1954 (USB_OTG_PWREN |regulator-usb-pwr-en) out lo > I can reproduce the /sys/kernel/debug/gpio output with this patch > > Still USB works for me regardless of whether USB_OTG_PWREN is HIGH or LOW > This is something that is not possible if the regulator is really > connected on the board like you are describing in this patch. > If this .dts change was correct then I would expect that USB is > breaking when inverting the GPIO polarity. > > I am using the "inverted GPIO polarity" approach to find the Ethernet > PHY reset GPIO when working on boards for which I don't have the > schematics: Thanks for the hint, > 1) make an assumption of which GPIO to use > 2) try with GPIO_ACTIVE_LOW -> PHY should be detected > 3) change it to GPIO_ACTIVE_HIGH -> PHY should not be found anymore > (because it's in reset) > 4) before submitting the board.dts upstream I of course change it back > to GPIO_ACTIVE_LOW Yes I am going to changes this to GPIO_ACTIVE_LOW in the next version. These dts changes just assist in power through PHY to USB ports. After going through the previous email I got this working see below. [alarm@archl-c1e linux-amlogic-5.y-devel]$ sudo cat /sys/kernel/debug/gpio | grep usb gpio-1953 (USB_HUB_RST_N |usb-hub-reset ) out hi gpio-1954 (USB_OTG_PWREN |regulator-usb-pwr-en) out lo ACTIVE LOW > > If during step 3) the PHY is still found then I know that it's not the > correct GPIO. > I am seeing the same behavior with this USB regulator. My > interpretation of this is: either you are not using the right GPIO or > the GPIO is not related to &usb1 (or it's PHY). > With reference to the schematic odroid-c1+_rev0.4_20160226 section USB HOST POWER ---- MP62551DGT-LF-Z Both USB POWER and PWREN help control the power to USB Ports. > > Best regards, > Martin Thanks -Anand