Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp948070lko; Tue, 13 Jul 2021 13:38:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOtR/lKJkbaGCe1kxEPg8pJI3P5DfTjrtZxs1RN0VbElw16465vjXZPk2TUsfk1xCM2Brx X-Received: by 2002:a05:6638:100b:: with SMTP id r11mr5671030jab.85.1626208689076; Tue, 13 Jul 2021 13:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626208689; cv=none; d=google.com; s=arc-20160816; b=EVQuKYDA/Aj+GifKvNQsxhdyLKXFgAk4bxozerIxD4RLvHlfc/gcR72TNwGBqBGvMq 8lweLpLX9Uvjx40N+pqiz+agj5Q0uupRIA7nKGU6offrS5hVuXm4SZTfnn0Iy/IGHAh1 GsVw/1hVQz473bWckIrzevu0a5C4EyXsWKG6fzRbt7vWYvKqRcQKiooGg0Rc+TjHT344 Z7qRv339VKbjT7z3WqYzu3kERZJkJF3pY9eY3EKxieqlIMIOIZBNZQpDjNY9Hw4nlsb3 Es4FrMqUnEUaFM406Sl7C3HtE6URwOtnb8uDh9JnaR0DTRgzxmtK0P7KWHxQiz2rWl/K 1bBQ== 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=lz1iNRVmJl/8c02nO6mcAo+x0LUik5FJFjS42Nicby8=; b=BIjBD8JomhTQojGpocrPKsVNILpRLfqVNIteEQ5YGUu/tolxjmJh0h5cGKLHogAe+I IV3O9QbW8ROjVcikX7GT8yjgq91O9ZdyQh0R2AIX8QgUOS3BSlwlAkud9GqHUAqBXPBL fXT9LSiMkll8Cin6hIIkkP8SvkEHp+rSewE1yZXio7obZdVb8EVi1k662OMiHYpty5lG N85CiwkrI8ROT3g5TF8UuTo7M/5DNKZWUGztHfVFkb1CbgrTj0ZCBQqyxRz1cOSYjqV5 9VotFHdaxJiLM4cJod9uEJhWha5SU+H4eWY+Jx+gn2mZRgj0hTm8VnQIkpCZlbR1mQi7 kp5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=I93Jw38f; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s17si16522180jaj.68.2021.07.13.13.37.56; Tue, 13 Jul 2021 13:38:09 -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=@googlemail.com header.s=20161025 header.b=I93Jw38f; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235437AbhGMUiU (ORCPT + 99 others); Tue, 13 Jul 2021 16:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235322AbhGMUiU (ORCPT ); Tue, 13 Jul 2021 16:38:20 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAD41C0613DD; Tue, 13 Jul 2021 13:35:29 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id ec55so10087165edb.1; Tue, 13 Jul 2021 13:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lz1iNRVmJl/8c02nO6mcAo+x0LUik5FJFjS42Nicby8=; b=I93Jw38f4suLZLxrcS11ROvBezOGU4JjFfcwHEGortMfxkTfN8UAqSPN2szzMQAE1d er50D8stbzEiVr8XMg/kJF9abJbF/jEILEq+03llk6uLCKV4l6mvLKVURuLRWX5jDO1N 6lZUTJqBPyMJnqbGgBCap5EmeHutNScznEb6M3SAf+4+1tCA2UZ+C1I0JvqBECH2O2uo Habw2ErqzBpxlKBIy5n7bDd40kv1SiqUqkdD5kFy2Ri+Ds5oprwISZsx66w577mnLpwx f7wx0iZY+ozU/lpPvIjZdZkdG8/gJ2Z613VMV3zROZv0ZkbAXj2hjH/7wovNCCu/34CS zeFQ== 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=lz1iNRVmJl/8c02nO6mcAo+x0LUik5FJFjS42Nicby8=; b=UJQ9KD9DmIZUtSURh1qVG+qIwgBGHvQKhfhyej2E4Gy78gKc6wdPAc/XcginK+zOl1 bIZgzMT3KB1R0oNQN73dER/obU7FwLog3z19PhSYfBiPNf0QAXnkB4ypE0cx+3JjUSF4 z2PoeCJZyQOdeKQqg38XxsiqDHPy4FplnBrkC+gLJsKHs6ygmV6AhqM0izx/Cazq6reh 6hEOZkaw8F7HLNV3EpIGfBjuT5zXg7gVHuRvxKd759aKlbCCctsuh3mBF37xqWbp0ZWX FEOjHZJCIXRI6H1D7F4U1TqQaC5dYz9u6jXfM9bHVILfid+jr5vJNf+Dpe/4es/pi4yV /IWg== X-Gm-Message-State: AOAM5305IB9FPIO3KbbP16SWYs8bDCHqkkGO/NVHgAqrtjT1vdt7K0Yi tAiXaJ5g5a+cAOHqnCVcdeRHsY+3pKYVadsfpSo= X-Received: by 2002:a05:6402:190c:: with SMTP id e12mr8137065edz.176.1626208528146; Tue, 13 Jul 2021 13:35:28 -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: Martin Blumenstingl Date: Tue, 13 Jul 2021 22:35:17 +0200 Message-ID: Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node To: Anand Moon 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 Anand, On Tue, Jul 13, 2021 at 8:45 PM Anand Moon wrote: > > Hi Martin, > > Thanks for reviewing the changes, > > On Tue, 13 Jul 2021 at 20:35, Martin Blumenstingl > wrote: > > > > Hi Anand, > > > > On Tue, Jul 13, 2021 at 7:53 AM Anand Moon wrote: > > > > > > Add missing usb phy power node for phy mode fix below warning. > > > > > > [ 1.253149] phy phy-c1108820.phy.0: Looking up phy-supply from device tree > > > [ 1.253166] phy phy-c1108820.phy.0: Looking up phy-supply property > > > in node /soc/cbus@c1100000/phy@8820 failed > > I did some testing on my own Odroid-C1+ and this patch is not doing > > anything for me. > > more information below. > Some device node for USB will have The mistake I made before is considering USB VBUS as PHY power supply. I believe the USB PHY is actually powered by the AVDD18_USB_ADC and USB33_VDDIOH signals. See the S905 datasheet [0], page 25 These are 1.8V and 3.3V signals while you are adding a 5V regulator. [...] > > > + /* > > > + * signal name from schematics: USB_POWER > > > + */ > > Just a few lines below you're saying that the name from the schematics is PWREN > > If this patch is getting another round then please clarify the actual > > signal name, or name both signals if the schematics is actually using > > both names. > > > As per the schematics. > PWREN ---> GPIOAO.BIT5 gpio pin control > USB_POWER ---> P5V0 power source regulator. ah, thanks for clarifying this my suggestion is to put that exact paragraph into the comment to avoid confusion [...] > > Can you please give this a try on your Odroid-C1 as well? > > The conclusion from my own testing is that GPIOAO_5 doesn't seem to be > > related to USB1 (host-only) because if it was then inverting the > > polarity (from active high to active low) should result in a change. > > > > Ok I have modified as per above but not changes in gpio polarity > from active high to active low. see below. > > # Odroid C1 > [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-usbp_pwr_e) out hi > > # Odroid C2 > [alarm@archl-c2lm ~]$ sudo cat /sys/kernel/debug/gpio | grep usb > gpio-501 (USB HUB nRESET |usb-hub-reset ) out hi > gpio-502 (USB OTG Power En |regulator-usb-pwrs ) out hi that's strange, my result is different gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; enable-active-high; gives me: # grep USB_OTG_PWREN /sys/kernel/debug/gpio gpio-418 (USB_OTG_PWREN |regulator-usb-pwr-en) out hi gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_LOW>; gives me: # grep USB_OTG_PWREN /sys/kernel/debug/gpio gpio-418 (USB_OTG_PWREN |regulator-usb-pwr-en) out lo ACTIVE LOW Did you remove the "enable-active-high;" in your "active low" test? GPIO polarity for regulators is managed with that flag, not just with GPIO_ACTIVE_{HIGH,LOW} [...] > > > &usb1_phy { > > > status = "okay"; > > > + phy-supply = <&usb_pwr_en>; > > From the schematics it seems that this is not the PHY supply (which I > > admittedly have used incorrectly for VBUS before). > > In the schematics that I have (odroid-c1+_rev0.4_20150615.pdf) it > > seems to be enabling VBUS. > > So in that case a vbus-supply property should be used inside &usb1 instead. > > > As per the debug log I have added this since core phy looking for this property Let's discuss the results with different polarities first, then we can also discuss the rest. Best regards, Martin