From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> To: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Cc: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: [PATCH 9/9] ARM: dts: sun7i: bananapi-m1-plus: Enable USB OTG Date: Wed, 6 Jul 2016 17:10:50 +0800 [thread overview] Message-ID: <1467796250-22010-10-git-send-email-wens@csie.org> (raw) In-Reply-To: <1467796250-22010-1-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> The Bananapi M1+ supports USB OTG, with the PMIC doing VBUS sensing. Enable the USB OTG related functions. This also enables the previously missing USB PHY node, which also handles some initial setup for the normal USB hosts. Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> --- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts index 7bb418bd1b6e..5182989757ca 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts @@ -204,6 +204,10 @@ status = "okay"; }; +&otg_sram { + status = "okay"; +}; + &pio { gmac_power_pin_bpi_m1p: gmac_power_pin@0 { allwinner,pins = "PH23"; @@ -232,6 +236,13 @@ allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; + + usb0_id_detect_pin_bpi_m1p: usb0_id_detect_pin@0 { + allwinner,pins = "PH4"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; }; #include "axp209.dtsi" @@ -262,8 +273,32 @@ regulator-name = "avcc"; }; +®_usb0_vbus { + /* defaults from sunxi-common-regulators.dtsi */ + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usb_power_supply { + status = "okay"; +}; + +&usbphy { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_id_detect_pin_bpi_m1p>; + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 USB0-IDDET */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + /* USB host VBUS is always on */ + status = "okay"; +}; -- 2.8.1
WARNING: multiple messages have this Message-ID (diff)
From: wens@csie.org (Chen-Yu Tsai) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 9/9] ARM: dts: sun7i: bananapi-m1-plus: Enable USB OTG Date: Wed, 6 Jul 2016 17:10:50 +0800 [thread overview] Message-ID: <1467796250-22010-10-git-send-email-wens@csie.org> (raw) In-Reply-To: <1467796250-22010-1-git-send-email-wens@csie.org> The Bananapi M1+ supports USB OTG, with the PMIC doing VBUS sensing. Enable the USB OTG related functions. This also enables the previously missing USB PHY node, which also handles some initial setup for the normal USB hosts. Signed-off-by: Chen-Yu Tsai <wens@csie.org> --- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts index 7bb418bd1b6e..5182989757ca 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts @@ -204,6 +204,10 @@ status = "okay"; }; +&otg_sram { + status = "okay"; +}; + &pio { gmac_power_pin_bpi_m1p: gmac_power_pin at 0 { allwinner,pins = "PH23"; @@ -232,6 +236,13 @@ allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; + + usb0_id_detect_pin_bpi_m1p: usb0_id_detect_pin at 0 { + allwinner,pins = "PH4"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; }; #include "axp209.dtsi" @@ -262,8 +273,32 @@ regulator-name = "avcc"; }; +®_usb0_vbus { + /* defaults from sunxi-common-regulators.dtsi */ + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usb_power_supply { + status = "okay"; +}; + +&usbphy { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_id_detect_pin_bpi_m1p>; + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 USB0-IDDET */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + /* USB host VBUS is always on */ + status = "okay"; +}; -- 2.8.1
next prev parent reply other threads:[~2016-07-06 9:10 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-07-06 9:10 [PATCH 0/9] ARM: dts: sun7i: BPI-M1+ and Lamobo-R1 fixes Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai [not found] ` <1467796250-22010-1-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> 2016-07-06 9:10 ` [PATCH 1/9] ARM: dts: sun7i: lamobo-r1: Fix USB-based WiFi module power Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 2/9] ARM: dts: sun7i: lamobo-r1: Remove usb1 vbus regulator Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 3/9] ARM: dts: sun7i: lamobo-r1: Fix GPIO flags in reg_ahci_5v Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 4/9] ARM: dts: sun7i: lamobo-r1: Enable audio codec Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 5/9] ARM: dts: sun7i: bananapi-m1-plus: Reindent whole file using tabs Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 6/9] ARM: dts: sun7i: bananapi-m1-plus: Unify suffix for board specific labels Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 7/9] ARM: dts: sun7i: bananapi-m1-plus: red LED is power LED Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai 2016-07-06 9:10 ` [PATCH 8/9] ARM: dts: sun7i: bananapi-m1-plus: Add PMIC regulators and OPPs for cpufreq Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai [not found] ` <1467796250-22010-9-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> 2016-07-09 8:18 ` Maxime Ripard 2016-07-09 8:18 ` Maxime Ripard 2016-07-12 2:12 ` Chen-Yu Tsai 2016-07-12 2:12 ` Chen-Yu Tsai 2016-07-06 9:10 ` Chen-Yu Tsai [this message] 2016-07-06 9:10 ` [PATCH 9/9] ARM: dts: sun7i: bananapi-m1-plus: Enable USB OTG Chen-Yu Tsai 2016-11-20 22:09 ` [PATCH 0/9] ARM: dts: sun7i: BPI-M1+ and Lamobo-R1 fixes Richard Kojedzinszky
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=1467796250-22010-10-git-send-email-wens@csie.org \ --to=wens-jday2fn1rrm@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \ --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.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: linkBe 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.