All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys
@ 2015-07-31 10:11 Chen-Yu Tsai
  2015-07-31 10:11 ` [PATCH 1/3] ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC Chen-Yu Tsai
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2015-07-31 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime,

This series enables USB OTG and the volume buttons on the side of
the HSG-H702 tablet.

The third patch is just for reference, as the axp209 usb power supply
driver hasn't been merged yet.


Regards
ChenYu


Chen-Yu Tsai (3):
  ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
  ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
  ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply

 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 65 ++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
  2015-07-31 10:11 [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
@ 2015-07-31 10:11 ` Chen-Yu Tsai
  2015-07-31 10:11 ` [PATCH 2/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG controller Chen-Yu Tsai
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2015-07-31 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

The tablet has volume up/down buttons on the side, connected to the LRADC.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index 990f9d61ae4d..4b8808ab9711 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -45,6 +45,7 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
@@ -96,6 +97,25 @@
 	status = "okay";
 };
 
+&lradc {
+	vref-supply = <&reg_ldo2>;
+	status = "okay";
+
+	button at 200 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <200000>;
+	};
+
+	button at 400 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <400000>;
+	};
+};
+
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
  2015-07-31 10:11 [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
  2015-07-31 10:11 ` [PATCH 1/3] ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC Chen-Yu Tsai
@ 2015-07-31 10:11 ` Chen-Yu Tsai
  2015-07-31 10:11 ` [PATCH 3/3] ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply Chen-Yu Tsai
  2015-07-31 10:12 ` [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
  3 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2015-07-31 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 41 ++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index 4b8808ab9711..672f88a8bfbe 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -130,6 +130,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	mmc0_cd_pin_h702: mmc0_cd_pin at 0 {
 		allwinner,pins = "PG0";
@@ -137,6 +141,27 @@
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PG2";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+		allwinner,pins = "PG1";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	usb0_vbus_pin_a: usb0_vbus_pin at 0 {
+		allwinner,pins = "PG12";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
 
 #include "axp209.dtsi"
@@ -172,13 +197,29 @@
 	regulator-name = "vcc-wifi";
 };
 
+&reg_usb0_vbus {
+	pinctrl-0 = <&usb0_vbus_pin_a>;
+	gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+	status = "okay";
+};
+
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart1_pins_b>;
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+	usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+	usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_ldo3>;
 	status = "okay";
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply
  2015-07-31 10:11 [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
  2015-07-31 10:11 ` [PATCH 1/3] ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC Chen-Yu Tsai
  2015-07-31 10:11 ` [PATCH 2/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG controller Chen-Yu Tsai
@ 2015-07-31 10:11 ` Chen-Yu Tsai
  2015-07-31 10:12 ` [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
  3 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2015-07-31 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index 672f88a8bfbe..c69844891027 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -214,6 +214,10 @@
 	status = "okay";
 };
 
+&usb_power_supply {
+	status = "okay";
+};
+
 &usbphy {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys
  2015-07-31 10:11 [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2015-07-31 10:11 ` [PATCH 3/3] ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply Chen-Yu Tsai
@ 2015-07-31 10:12 ` Chen-Yu Tsai
  2015-07-31 10:27   ` Chen-Yu Tsai
  3 siblings, 1 reply; 6+ messages in thread
From: Chen-Yu Tsai @ 2015-07-31 10:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 31, 2015 at 6:11 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> Hi Maxime,
>
> This series enables USB OTG and the volume buttons on the side of
> the HSG-H702 tablet.

Sorry, please ignore. Something bad happened when I split the patches.

> The third patch is just for reference, as the axp209 usb power supply
> driver hasn't been merged yet.
>
>
> Regards
> ChenYu
>
>
> Chen-Yu Tsai (3):
>   ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
>   ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
>   ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply
>
>  arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 65 ++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
>
> --
> 2.5.0
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys
  2015-07-31 10:12 ` [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
@ 2015-07-31 10:27   ` Chen-Yu Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2015-07-31 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 31, 2015 at 6:12 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Fri, Jul 31, 2015 at 6:11 PM, Chen-Yu Tsai <wens@csie.org> wrote:
>> Hi Maxime,
>>
>> This series enables USB OTG and the volume buttons on the side of
>> the HSG-H702 tablet.
>
> Sorry, please ignore. Something bad happened when I split the patches.

PEBCAK .. The series doesn't compile because of the last patch.

Anyway, since you had some comments on the patches Hans posted, I'll
fix up the same issues in mine as well.

ChenYu

>> The third patch is just for reference, as the axp209 usb power supply
>> driver hasn't been merged yet.
>>
>>
>> Regards
>> ChenYu
>>
>>
>> Chen-Yu Tsai (3):
>>   ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
>>   ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
>>   ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply
>>
>>  arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 65 ++++++++++++++++++++++++++++++++
>>  1 file changed, 65 insertions(+)
>>
>> --
>> 2.5.0
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-31 10:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31 10:11 [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
2015-07-31 10:11 ` [PATCH 1/3] ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC Chen-Yu Tsai
2015-07-31 10:11 ` [PATCH 2/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG controller Chen-Yu Tsai
2015-07-31 10:11 ` [PATCH 3/3] ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply Chen-Yu Tsai
2015-07-31 10:12 ` [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys Chen-Yu Tsai
2015-07-31 10:27   ` Chen-Yu Tsai

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.