From: hzpeterchen@gmail.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 12/12] ARM: dts: exynos: Fix LAN and HUB after bootloader initialization on Odroid U3
Date: Thu, 2 Jun 2016 15:58:44 +0800 [thread overview]
Message-ID: <20160602075844.GA7889@shlinux2> (raw)
In-Reply-To: <574FDFC1.5050209@samsung.com>
On Thu, Jun 02, 2016 at 09:26:57AM +0200, Krzysztof Kozlowski wrote:
> On 06/01/2016 01:59 PM, Peter Chen wrote:
> > On Wed, Jun 01, 2016 at 10:02:21AM +0200, Krzysztof Kozlowski wrote:
> >> On Odroid U3 (Exynos4412-based) board if USB was initialized by
> >> bootloader (in U-Boot "usb start" before tftpboot), the HUB (usb3503)
> >> and LAN (smsc95xx) after after successful probing were not visible in the
> >> system ("lsusb").
> >>
> >> In such case the devices had to be fully reset before configuring.
> >> Reset by GPIO (called RESET_N pin) and by RESET field in STCD register
> >> in usb3503 HUB are not sufficient. Instead full reset has to be done by
> >> disabling and enabling regulator.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> >> ---
> >> arch/arm/boot/dts/exynos4412-odroidu3.dts | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> >> index 31cdc036fda4..23e30e4609df 100644
> >> --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
> >> +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> >> @@ -99,11 +99,15 @@
> >> clock-names = "refclk";
> >> clocks = <&pmu_system_controller 0>;
> >> refclk-frequency = <24000000>;
> >> +
> >> + power-sequence;
> >> + ext-supply = <&buck8_reg>;
> >> };
> >>
> >> &ehci {
> >> port at 1 {
> >> status = "okay";
> >> + usb-pwrseq = <&usb3503>;
> >> };
> >> port at 2 {
> >> status = "okay";
> >> --
> >> 1.9.1
> >>
> >
> > The hub is under the port1, you may need to describe it
> > under the port at 1, see below:
> > Documentation/devicetree/bindings/usb/usb-device.txt
>
> My configuration is a little bit different than yours.
>
> In my case I have a USB hub (usb3503) which is also a a i2c device
> because it has to be configured through I2C.
>
> I can add the power-sequence properties to the I2C node or as you
> pointed under port using the vendor-product-id compatible. In the first
> option: not many USB changes are needed. It works for me, at least as a
> proof of concept.
>
> The second solution: currently it does not work because the USB device
> does not get enumerated before the power sequence begins. It would be
> great if you could implement this on USB side.
Well, not matter which solution, the USB device can't be enumerated
without power sequence. For the #2 solution, it just handles all
gpios under dts before the enumeration at USB code.
>
> >
> > If I get Rob's comments correctly, you may need to consider
> > below MMC and USB device tree description together, it seems
> > hard for USB to use pwrseq driver, sorry for confusing you.
> >
> > If rob can accept below USB device description, we have to
> > do it under USB. In future, if there is some suitable framework,
> > we can move it.
> >
> > 1. MMC device:
> > usdhc3_pwrseq: usdhc3_pwrseq {
> > compatible = "mmc-pwrseq-simple";
> > reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>, /* WL_REG_ON */
> > <&gpio4 7 GPIO_ACTIVE_LOW>, /* WL_HOSTWAKE */
> > <&gpio3 25 GPIO_ACTIVE_LOW>, /* BT_REG_ON */
> > <&gpio3 27 GPIO_ACTIVE_LOW>, /* BT_HOSTWAKE */
> > <&gpio4 4 GPIO_ACTIVE_LOW>, /* BT_WAKE */
> > <&gpio4 6 GPIO_ACTIVE_LOW>; /* BT_RST_N */
> > };
> >
> > &usdhc3 {
> > pinctrl-names = "default", "state_100mhz", "state_200mhz";
> > pinctrl-0 = <&pinctrl_usdhc3>;
> > pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
> > pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
> > bus-width = <4>;
> > non-removable;
> > keep-power-in-suspend;
> > wakeup-source;
> > mmc-pwrseq = <&usdhc3_pwrseq>;
> > status = "okay";
> > };
> >
> > 2. USB device
> >
> > &usbotg1 {
> > vbus-supply = <®_usb_otg1_vbus>;
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_usb_otg1_id>;
> > status = "okay";
> >
> > #address-cells = <1>;
> > #size-cells = <0>;
> > hub: genesys at 1 {
> > compatible = "usb5e3,608";
> > reg = <1>;
> > reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */
> > reset-duration-us = <10>;
> > clocks = <&clks IMX6SX_CLK_CKO>;
> > };
>
> Yes, that looks like what Rob wanted... Do you plan to work on it? The
> power sequence is needed before device is enumerated.
>
Ok, I will work on it.
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2016-06-02 7:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 8:02 [PATCH v3 00/12] usb/mmc/power: Generic power sequence (and fix USB/LAN when TFTP booting) Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 01/12] power/mmc: Move pwrseq drivers to power/pwrseq Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 02/12] MAINTAINERS: Retain Ulf Hansson as the same maintainer of pwrseq Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 03/12] power: pwrseq: Enable COMPILE_TEST for drivers Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 04/12] power: pwrseq: Remove mmc prefix from mmc_pwrseq Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 05/12] power: pwrseq: Generalize mmc_pwrseq operations by removing mmc prefix Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 06/12] power: pwrseq: simple: Add support for regulator and generic property Krzysztof Kozlowski
2016-06-03 2:02 ` Rob Herring
2016-06-03 12:35 ` Krzysztof Kozlowski
2016-06-06 3:22 ` Peter Chen
2016-06-07 9:29 ` Krzysztof Kozlowski
2016-06-08 19:03 ` Rob Herring
2016-06-09 2:34 ` Chen-Yu Tsai
2016-06-09 5:11 ` Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 07/12] power: pwrseq: Add support for USB hubs with external power Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 08/12] usb: hub: Handle deferred probe Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 09/12] EXAMPLE CODE: usb: port: Parse pwrseq phandle from Device Tree Krzysztof Kozlowski
2016-06-01 8:57 ` Stephen Boyd
2016-06-01 9:06 ` Krzysztof Kozlowski
2016-06-01 12:05 ` Peter Chen
2016-06-01 18:16 ` Stephen Boyd
2016-06-02 1:24 ` Peter Chen
2016-06-02 23:59 ` Stephen Boyd
2016-06-01 8:02 ` [PATCH v3 10/12] EXAMPLE CODE: usb: hub: Power sequence the ports on activation Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 11/12] ARM: dts: exynos: Switch the buck8 to GPIO mode on Odroid U3 Krzysztof Kozlowski
2016-06-01 8:02 ` [PATCH v3 12/12] ARM: dts: exynos: Fix LAN and HUB after bootloader initialization " Krzysztof Kozlowski
2016-06-01 11:59 ` Peter Chen
2016-06-02 7:26 ` Krzysztof Kozlowski
2016-06-02 7:58 ` Peter Chen [this message]
2016-06-06 20:43 ` [PATCH v3 00/12] usb/mmc/power: Generic power sequence (and fix USB/LAN when TFTP booting) Heiko Stübner
2016-06-07 6:03 ` Krzysztof Kozlowski
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=20160602075844.GA7889@shlinux2 \
--to=hzpeterchen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).