All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Anand Moon <linux.amoon@gmail.com>
Cc: linux-phy@lists.infradead.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Matt Corallo <oc2udbzfd@mattcorallo.com>,
	Rob Herring <robh+dt@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>,
	Emiliano Ingrassia <ingrassia@epigenesys.com>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node
Date: Thu, 15 Jul 2021 01:30:23 +0200	[thread overview]
Message-ID: <CAFBinCBtZDRH_xTn3hUBbAPNGrut2cbEQOSuEN1vwObP1Ns5qw@mail.gmail.com> (raw)
In-Reply-To: <CANAwSgR5nNN3D+NZjqNNjyp=rVYE=RG2icnJAc=5F23xSh9Bvg@mail.gmail.com>

Hi Anand,

On Wed, Jul 14, 2021 at 7:25 PM Anand Moon <linux.amoon@gmail.com> 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:
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

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).


Best regards,
Martin

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Anand Moon <linux.amoon@gmail.com>
Cc: linux-phy@lists.infradead.org,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	 Linux Kernel <linux-kernel@vger.kernel.org>,
	Matt Corallo <oc2udbzfd@mattcorallo.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	 Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>,
	 Emiliano Ingrassia <ingrassia@epigenesys.com>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node
Date: Thu, 15 Jul 2021 01:30:23 +0200	[thread overview]
Message-ID: <CAFBinCBtZDRH_xTn3hUBbAPNGrut2cbEQOSuEN1vwObP1Ns5qw@mail.gmail.com> (raw)
In-Reply-To: <CANAwSgR5nNN3D+NZjqNNjyp=rVYE=RG2icnJAc=5F23xSh9Bvg@mail.gmail.com>

Hi Anand,

On Wed, Jul 14, 2021 at 7:25 PM Anand Moon <linux.amoon@gmail.com> 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:
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

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).


Best regards,
Martin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Anand Moon <linux.amoon@gmail.com>
Cc: linux-phy@lists.infradead.org,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	 Linux Kernel <linux-kernel@vger.kernel.org>,
	Matt Corallo <oc2udbzfd@mattcorallo.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	 Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>,
	 Emiliano Ingrassia <ingrassia@epigenesys.com>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node
Date: Thu, 15 Jul 2021 01:30:23 +0200	[thread overview]
Message-ID: <CAFBinCBtZDRH_xTn3hUBbAPNGrut2cbEQOSuEN1vwObP1Ns5qw@mail.gmail.com> (raw)
In-Reply-To: <CANAwSgR5nNN3D+NZjqNNjyp=rVYE=RG2icnJAc=5F23xSh9Bvg@mail.gmail.com>

Hi Anand,

On Wed, Jul 14, 2021 at 7:25 PM Anand Moon <linux.amoon@gmail.com> 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:
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

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).


Best regards,
Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Anand Moon <linux.amoon@gmail.com>
Cc: linux-phy@lists.infradead.org,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	 Linux Kernel <linux-kernel@vger.kernel.org>,
	Matt Corallo <oc2udbzfd@mattcorallo.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	 Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>,
	 Emiliano Ingrassia <ingrassia@epigenesys.com>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node
Date: Thu, 15 Jul 2021 01:30:23 +0200	[thread overview]
Message-ID: <CAFBinCBtZDRH_xTn3hUBbAPNGrut2cbEQOSuEN1vwObP1Ns5qw@mail.gmail.com> (raw)
In-Reply-To: <CANAwSgR5nNN3D+NZjqNNjyp=rVYE=RG2icnJAc=5F23xSh9Bvg@mail.gmail.com>

Hi Anand,

On Wed, Jul 14, 2021 at 7:25 PM Anand Moon <linux.amoon@gmail.com> 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:
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

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).


Best regards,
Martin

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2021-07-14 23:30 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13  5:52 [PATCHv1 0/3] Meson-8b and Meson-gxbb Fix some missing code Anand Moon
2021-07-13  5:52 ` Anand Moon
2021-07-13  5:52 ` Anand Moon
2021-07-13  5:52 ` Anand Moon
2021-07-13  5:52 ` [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13 15:05   ` Martin Blumenstingl
2021-07-13 15:05     ` Martin Blumenstingl
2021-07-13 15:05     ` Martin Blumenstingl
2021-07-13 15:05     ` Martin Blumenstingl
2021-07-13 18:44     ` Anand Moon
2021-07-13 18:44       ` Anand Moon
2021-07-13 18:44       ` Anand Moon
2021-07-13 18:44       ` Anand Moon
2021-07-13 20:35       ` Martin Blumenstingl
2021-07-13 20:35         ` Martin Blumenstingl
2021-07-13 20:35         ` Martin Blumenstingl
2021-07-13 20:35         ` Martin Blumenstingl
2021-07-14 11:59         ` Anand Moon
2021-07-14 11:59           ` Anand Moon
2021-07-14 11:59           ` Anand Moon
2021-07-14 11:59           ` Anand Moon
2021-07-14 17:25           ` Anand Moon
2021-07-14 17:25             ` Anand Moon
2021-07-14 17:25             ` Anand Moon
2021-07-14 17:25             ` Anand Moon
2021-07-14 23:30             ` Martin Blumenstingl [this message]
2021-07-14 23:30               ` Martin Blumenstingl
2021-07-14 23:30               ` Martin Blumenstingl
2021-07-14 23:30               ` Martin Blumenstingl
2021-07-15 10:24               ` Anand Moon
2021-07-15 10:24                 ` Anand Moon
2021-07-15 10:24                 ` Anand Moon
2021-07-15 10:24                 ` Anand Moon
2021-07-13  5:52 ` [PATCHv1 2/3] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13 15:10   ` Martin Blumenstingl
2021-07-13 15:10     ` Martin Blumenstingl
2021-07-13 15:10     ` Martin Blumenstingl
2021-07-13 15:10     ` Martin Blumenstingl
2021-07-13  5:52 ` [PATCHv1 3/3] phy: amlogic: meson8b-usb2: don't log an error on -EPROBE_DEFER Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13  5:52   ` Anand Moon
2021-07-13  5:52   ` Anand Moon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFBinCBtZDRH_xTn3hUBbAPNGrut2cbEQOSuEN1vwObP1Ns5qw@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ingrassia@epigenesys.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=kishon@ti.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux.amoon@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=oc2udbzfd@mattcorallo.com \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.