* [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg @ 2017-12-06 17:51 Jagan Teki [not found] ` <1512582664-24936-1-git-send-email-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Jagan Teki @ 2017-12-06 17:51 UTC (permalink / raw) To: Maxime Ripard Cc: Chen-Yu Tsai, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jagan Teki usb otg on bananapi-m64 has configured with USB-ID with PH9 and USB-DRVVBUS attached with dcdc1 regulatort. Add support for it. Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> --- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts index 4a8d3f8..0c74d62 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts @@ -66,6 +66,10 @@ }; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; }; @@ -136,6 +140,10 @@ status = "okay"; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; @@ -259,6 +267,13 @@ status = "okay"; }; +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + &usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + usb0_vbus-supply = <®_dcdc1>; status = "okay"; }; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <1512582664-24936-1-git-send-email-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>]
* Re: [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg [not found] ` <1512582664-24936-1-git-send-email-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> @ 2017-12-07 3:24 ` Chen-Yu Tsai [not found] ` <CAGb2v67uFnV+m1Ub7rFVGhkv0HKD4ukpQFtJ1pqRi2vf4F=tFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Chen-Yu Tsai @ 2017-12-07 3:24 UTC (permalink / raw) To: Jagan Teki Cc: Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Jagan Teki On Thu, Dec 7, 2017 at 1:51 AM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > usb otg on bananapi-m64 has configured with USB-ID with PH9 > and USB-DRVVBUS attached with dcdc1 regulatort. That is not how you read the schematic... Intersecting lines that are tied together will have a dot representing the connection. The DCDC1 line is a pull-up for the ID pin. This is very clear because it has a resistor connected in series. VBUS for OTG is controlled by the IC displayed to the right in the schematic, which is powered from 5V, and controlled by the DRVVBUS pin from the PMIC. Please take a look at how the A31/A33/A83T board dts files represent this. ChenYu ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAGb2v67uFnV+m1Ub7rFVGhkv0HKD4ukpQFtJ1pqRi2vf4F=tFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg [not found] ` <CAGb2v67uFnV+m1Ub7rFVGhkv0HKD4ukpQFtJ1pqRi2vf4F=tFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-12-07 6:18 ` Jagan Teki [not found] ` <CAD6G_RR-VccHjdrXs55=C50OvDEr96c7axtbR0eKp2THFNx6sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Jagan Teki @ 2017-12-07 6:18 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Maxime Ripard, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Jagan Teki On Thu, Dec 7, 2017 at 8:54 AM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: > On Thu, Dec 7, 2017 at 1:51 AM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> usb otg on bananapi-m64 has configured with USB-ID with PH9 >> and USB-DRVVBUS attached with dcdc1 regulatort. > > That is not how you read the schematic... > > Intersecting lines that are tied together will have a dot representing > the connection. The DCDC1 line is a pull-up for the ID pin. This is very > clear because it has a resistor connected in series. > > VBUS for OTG is controlled by the IC displayed to the right in the > schematic, which is powered from 5V, and controlled by the DRVVBUS > pin from the PMIC. Please take a look at how the A31/A33/A83T board > dts files represent this. This is where I confused, USB-DRVVBUS is connected to pin 51 of PMIC if we add 5v regulator how can configure gpio number for this? I saw sun8i-a33-olinuxino.dts which is also similar but it has gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAD6G_RR-VccHjdrXs55=C50OvDEr96c7axtbR0eKp2THFNx6sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg [not found] ` <CAD6G_RR-VccHjdrXs55=C50OvDEr96c7axtbR0eKp2THFNx6sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-12-07 6:26 ` Chen-Yu Tsai [not found] ` <CAGb2v67dh=dfPKdDOwfj8m7qmUk-=s4kXS3FvZLczskrjbr7eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Chen-Yu Tsai @ 2017-12-07 6:26 UTC (permalink / raw) To: Jagan Teki Cc: Chen-Yu Tsai, Maxime Ripard, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Jagan Teki On Thu, Dec 7, 2017 at 2:18 PM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On Thu, Dec 7, 2017 at 8:54 AM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: >> On Thu, Dec 7, 2017 at 1:51 AM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> usb otg on bananapi-m64 has configured with USB-ID with PH9 >>> and USB-DRVVBUS attached with dcdc1 regulatort. >> >> That is not how you read the schematic... >> >> Intersecting lines that are tied together will have a dot representing >> the connection. The DCDC1 line is a pull-up for the ID pin. This is very >> clear because it has a resistor connected in series. >> >> VBUS for OTG is controlled by the IC displayed to the right in the >> schematic, which is powered from 5V, and controlled by the DRVVBUS >> pin from the PMIC. Please take a look at how the A31/A33/A83T board >> dts files represent this. > > This is where I confused, USB-DRVVBUS is connected to pin 51 of PMIC > if we add 5v regulator how can configure gpio number for this? I saw >From the axp20x bindings: - x-powers,drive-vbus-en: boolean, set this when the N_VBUSEN pin is used as an output pin to control an external regulator to drive the OTG VBus, rather then as an input pin which signals whether the board is driving OTG VBus or not. (axp221 / axp223 / axp813 only) Setting this allows you to use the "drivevbus" regulator under the PMIC. As I said, look at how other boards are doing it. > sun8i-a33-olinuxino.dts which is also similar but it has gpio = <&pio > 1 9 GPIO_ACTIVE_HIGH>; I have no idea where you saw this. It does not exist in my tree. Why don't you just trace backwards from the usb0_vbus-supply property under the usbphy node, and see where it all leads. ChenYu ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAGb2v67dh=dfPKdDOwfj8m7qmUk-=s4kXS3FvZLczskrjbr7eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg [not found] ` <CAGb2v67dh=dfPKdDOwfj8m7qmUk-=s4kXS3FvZLczskrjbr7eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-12-07 6:54 ` Jagan Teki 2017-12-07 7:01 ` Chen-Yu Tsai 0 siblings, 1 reply; 7+ messages in thread From: Jagan Teki @ 2017-12-07 6:54 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Maxime Ripard, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Jagan Teki [-- Attachment #1: Type: text/plain, Size: 2700 bytes --] On Thu, Dec 7, 2017 at 11:56 AM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: > On Thu, Dec 7, 2017 at 2:18 PM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Thu, Dec 7, 2017 at 8:54 AM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: >>> On Thu, Dec 7, 2017 at 1:51 AM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> usb otg on bananapi-m64 has configured with USB-ID with PH9 >>>> and USB-DRVVBUS attached with dcdc1 regulatort. >>> >>> That is not how you read the schematic... >>> >>> Intersecting lines that are tied together will have a dot representing >>> the connection. The DCDC1 line is a pull-up for the ID pin. This is very >>> clear because it has a resistor connected in series. >>> >>> VBUS for OTG is controlled by the IC displayed to the right in the >>> schematic, which is powered from 5V, and controlled by the DRVVBUS >>> pin from the PMIC. Please take a look at how the A31/A33/A83T board >>> dts files represent this. >> >> This is where I confused, USB-DRVVBUS is connected to pin 51 of PMIC >> if we add 5v regulator how can configure gpio number for this? I saw > > From the axp20x bindings: > > - x-powers,drive-vbus-en: boolean, set this when the N_VBUSEN pin is > used as an output pin to control an external > regulator to drive the OTG VBus, rather then > as an input pin which signals whether the > board is driving OTG VBus or not. > (axp221 / axp223 / axp813 only) > > Setting this allows you to use the "drivevbus" regulator under the PMIC. > As I said, look at how other boards are doing it. > >> sun8i-a33-olinuxino.dts which is also similar but it has gpio = <&pio >> 1 9 GPIO_ACTIVE_HIGH>; > > I have no idea where you saw this. It does not exist in my tree. > > Why don't you just trace backwards from the usb0_vbus-supply property > under the usbphy node, and see where it all leads. This what exactly I did, usb0_vbus-supply = <®_drivevbus>; on sun8i-a33-olinuxino.dts is using usb0-vbus from sunxi-common-regulators.dtsi. reg_usb0_vbus regulator using gpio9 which I couldn't find it on schematics. thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: A33-OLinuXino_Rev_B1.pdf --] [-- Type: application/pdf, Size: 134086 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg 2017-12-07 6:54 ` Jagan Teki @ 2017-12-07 7:01 ` Chen-Yu Tsai [not found] ` <CAGb2v65OcqHSDyRowK7UKUpav_CbNtRm9DSs+_uLaZcbu6b7fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Chen-Yu Tsai @ 2017-12-07 7:01 UTC (permalink / raw) To: Jagan Teki Cc: Chen-Yu Tsai, Maxime Ripard, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Jagan Teki On Thu, Dec 7, 2017 at 2:54 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote: > On Thu, Dec 7, 2017 at 11:56 AM, Chen-Yu Tsai <wens@csie.org> wrote: >> On Thu, Dec 7, 2017 at 2:18 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote: >>> On Thu, Dec 7, 2017 at 8:54 AM, Chen-Yu Tsai <wens@csie.org> wrote: >>>> On Thu, Dec 7, 2017 at 1:51 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote: >>>>> usb otg on bananapi-m64 has configured with USB-ID with PH9 >>>>> and USB-DRVVBUS attached with dcdc1 regulatort. >>>> >>>> That is not how you read the schematic... >>>> >>>> Intersecting lines that are tied together will have a dot representing >>>> the connection. The DCDC1 line is a pull-up for the ID pin. This is very >>>> clear because it has a resistor connected in series. >>>> >>>> VBUS for OTG is controlled by the IC displayed to the right in the >>>> schematic, which is powered from 5V, and controlled by the DRVVBUS >>>> pin from the PMIC. Please take a look at how the A31/A33/A83T board >>>> dts files represent this. >>> >>> This is where I confused, USB-DRVVBUS is connected to pin 51 of PMIC >>> if we add 5v regulator how can configure gpio number for this? I saw >> >> From the axp20x bindings: >> >> - x-powers,drive-vbus-en: boolean, set this when the N_VBUSEN pin is >> used as an output pin to control an external >> regulator to drive the OTG VBus, rather then >> as an input pin which signals whether the >> board is driving OTG VBus or not. >> (axp221 / axp223 / axp813 only) >> >> Setting this allows you to use the "drivevbus" regulator under the PMIC. >> As I said, look at how other boards are doing it. >> >>> sun8i-a33-olinuxino.dts which is also similar but it has gpio = <&pio >>> 1 9 GPIO_ACTIVE_HIGH>; >> >> I have no idea where you saw this. It does not exist in my tree. >> >> Why don't you just trace backwards from the usb0_vbus-supply property >> under the usbphy node, and see where it all leads. > > This what exactly I did, usb0_vbus-supply = <®_drivevbus>; on This is not what you did in your patch. > sun8i-a33-olinuxino.dts is using usb0-vbus from > sunxi-common-regulators.dtsi. reg_usb0_vbus regulator using gpio9 > which I couldn't find it on schematics. And I'm telling you that in mainline a33-olinuxino.dts it is: usb0_vbus-supply = <®_drivevbus>; It has been that way since the initial commit adding the file. What tree are you looking at exactly? Take a good look at everything, including your patch, and stop arguing. ChenYu ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAGb2v65OcqHSDyRowK7UKUpav_CbNtRm9DSs+_uLaZcbu6b7fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg [not found] ` <CAGb2v65OcqHSDyRowK7UKUpav_CbNtRm9DSs+_uLaZcbu6b7fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-12-07 7:10 ` Jagan Teki 0 siblings, 0 replies; 7+ messages in thread From: Jagan Teki @ 2017-12-07 7:10 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Maxime Ripard, Icenowy Zheng, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Jagan Teki On Thu, Dec 7, 2017 at 12:31 PM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: > On Thu, Dec 7, 2017 at 2:54 PM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Thu, Dec 7, 2017 at 11:56 AM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: >>> On Thu, Dec 7, 2017 at 2:18 PM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> On Thu, Dec 7, 2017 at 8:54 AM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote: >>>>> On Thu, Dec 7, 2017 at 1:51 AM, Jagan Teki <jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>> usb otg on bananapi-m64 has configured with USB-ID with PH9 >>>>>> and USB-DRVVBUS attached with dcdc1 regulatort. >>>>> >>>>> That is not how you read the schematic... >>>>> >>>>> Intersecting lines that are tied together will have a dot representing >>>>> the connection. The DCDC1 line is a pull-up for the ID pin. This is very >>>>> clear because it has a resistor connected in series. >>>>> >>>>> VBUS for OTG is controlled by the IC displayed to the right in the >>>>> schematic, which is powered from 5V, and controlled by the DRVVBUS >>>>> pin from the PMIC. Please take a look at how the A31/A33/A83T board >>>>> dts files represent this. >>>> >>>> This is where I confused, USB-DRVVBUS is connected to pin 51 of PMIC >>>> if we add 5v regulator how can configure gpio number for this? I saw >>> >>> From the axp20x bindings: >>> >>> - x-powers,drive-vbus-en: boolean, set this when the N_VBUSEN pin is >>> used as an output pin to control an external >>> regulator to drive the OTG VBus, rather then >>> as an input pin which signals whether the >>> board is driving OTG VBus or not. >>> (axp221 / axp223 / axp813 only) >>> >>> Setting this allows you to use the "drivevbus" regulator under the PMIC. >>> As I said, look at how other boards are doing it. >>> >>>> sun8i-a33-olinuxino.dts which is also similar but it has gpio = <&pio >>>> 1 9 GPIO_ACTIVE_HIGH>; >>> >>> I have no idea where you saw this. It does not exist in my tree. >>> >>> Why don't you just trace backwards from the usb0_vbus-supply property >>> under the usbphy node, and see where it all leads. >> >> This what exactly I did, usb0_vbus-supply = <®_drivevbus>; on > > This is not what you did in your patch. > >> sun8i-a33-olinuxino.dts is using usb0-vbus from >> sunxi-common-regulators.dtsi. reg_usb0_vbus regulator using gpio9 >> which I couldn't find it on schematics. > > And I'm telling you that in mainline a33-olinuxino.dts it is: > > usb0_vbus-supply = <®_drivevbus>; > > It has been that way since the initial commit adding the file. > What tree are you looking at exactly? Take a good look at everything, > including your patch, and stop arguing. Sorry, you miss understand. I've seen a33-olinuxino and bananapi-m64 has similar connection in otg. Just trying to compare both and understand what I did different in my patch. Anyway thanks for your time I will send next version it will be worth discussing the same there. thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-07 7:10 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-12-06 17:51 [PATCH 2/2] arm64: allwinner: a64: bananapi-m64: add usb otg Jagan Teki [not found] ` <1512582664-24936-1-git-send-email-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2017-12-07 3:24 ` Chen-Yu Tsai [not found] ` <CAGb2v67uFnV+m1Ub7rFVGhkv0HKD4ukpQFtJ1pqRi2vf4F=tFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-12-07 6:18 ` Jagan Teki [not found] ` <CAD6G_RR-VccHjdrXs55=C50OvDEr96c7axtbR0eKp2THFNx6sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-12-07 6:26 ` Chen-Yu Tsai [not found] ` <CAGb2v67dh=dfPKdDOwfj8m7qmUk-=s4kXS3FvZLczskrjbr7eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-12-07 6:54 ` Jagan Teki 2017-12-07 7:01 ` Chen-Yu Tsai [not found] ` <CAGb2v65OcqHSDyRowK7UKUpav_CbNtRm9DSs+_uLaZcbu6b7fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-12-07 7:10 ` Jagan Teki
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).