Message ID | 20210601090140.261768-4-narmstrong@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: dts: meson-sm1-odroid: various fixes for C4/HC4 | expand |
Hi Neil, On Tue, Jun 1, 2021 at 11:01 AM Neil Armstrong <narmstrong@baylibre.com> wrote: > > As described in the Odroid-C4 schematics, the HUB_5V regulator is controlled > by GPIOH_8 and in Open Drain since this GPIO doesn't support Push-Pull. > > Fixes: 326e57518b0d ("arm64: dts: meson-sm1: add support for Hardkernel ODROID-C4") > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> my interpretation of page 32 of the schematics [0] is that GPIOH_8 manages VCC5V GPIOH_4 is connected as RST_N to the RESET# pad of the USB hub -> this seems to match the original regulator definition [0] https://wiki.odroid.com/_media/odroid-c4/odroid-c4_rev1.0.pdf
Hi, On 03/06/2021 20:07, Martin Blumenstingl wrote: > Hi Neil, > > On Tue, Jun 1, 2021 at 11:01 AM Neil Armstrong <narmstrong@baylibre.com> wrote: >> >> As described in the Odroid-C4 schematics, the HUB_5V regulator is controlled >> by GPIOH_8 and in Open Drain since this GPIO doesn't support Push-Pull. >> >> Fixes: 326e57518b0d ("arm64: dts: meson-sm1: add support for Hardkernel ODROID-C4") >> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> > my interpretation of page 32 of the schematics [0] is that GPIOH_8 manages VCC5V > GPIOH_4 is connected as RST_N to the RESET# pad of the USB hub -> this > seems to match the original regulator definition You're right, but GPIOH_4 is already a GPIO HOG, so this regulator doesn't make any sense then, and the GPIO for the VCC_5V regulator is missing, like in patch 5. So I'll add: +&vcc_5v { + gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; + enable-active-high; +}; in odroid.dtsi instead in this patch. Not sure what to do about the regulator-hub_5v. Neil > > > [0] https://wiki.odroid.com/_media/odroid-c4/odroid-c4_rev1.0.pdf >
Hi Neil, On Fri, Jun 4, 2021 at 11:43 AM Neil Armstrong <narmstrong@baylibre.com> wrote: [...] > So I'll add: > +&vcc_5v { > + gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; > + enable-active-high; > +}; > > in odroid.dtsi instead in this patch. that sounds good to me > Not sure what to do about the regulator-hub_5v. maybe dropping this regulator overall? we're using gpio-hogs elsewhere for the USB hub's reset line or dropping the gpio-hog and keeping this regulator to manage GPIOH_4 Best regards, Martin
On 04/06/2021 12:13, Martin Blumenstingl wrote: > Hi Neil, > > On Fri, Jun 4, 2021 at 11:43 AM Neil Armstrong <narmstrong@baylibre.com> wrote: > [...] >> So I'll add: >> +&vcc_5v { >> + gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; >> + enable-active-high; >> +}; >> >> in odroid.dtsi instead in this patch. > that sounds good to me > >> Not sure what to do about the regulator-hub_5v. > maybe dropping this regulator overall? we're using gpio-hogs elsewhere > for the USB hub's reset line > or dropping the gpio-hog and keeping this regulator to manage GPIOH_4 I'll drop it completely, it makes no sense to have a regulator for a HUB reset anyway. Neil > > > Best regards, > Martin >
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts index 8c327c03d845..63695ea21b1c 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts @@ -31,7 +31,7 @@ hub_5v: regulator-hub_5v { vin-supply = <&vcc_5v>; /* Connected to the Hub CHIPENABLE, LOW sets low power state */ - gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; + gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; enable-active-high; };
As described in the Odroid-C4 schematics, the HUB_5V regulator is controlled by GPIOH_8 and in Open Drain since this GPIO doesn't support Push-Pull. Fixes: 326e57518b0d ("arm64: dts: meson-sm1: add support for Hardkernel ODROID-C4") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)