ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys
Subsystems (2)
v2 cover ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys
Hi Maxime,
This series enables USB OTG and the volume buttons on the side of the HSG-H702 tablet.
v2 uses a reference for usb0_vbus_pin_a, instead of full path. The third patch is also dropped to avoid confusion.
Regards
ChenYu
Chen-Yu Tsai (2):
ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+)
Signature · 1 line
2.5.0
PATCH v2 1/2 ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
The tablet has volume up/down buttons on the side, connected to the LRADC.
--- arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts +20 -0
@@ -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 = <®_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>;
Signature · 1 line
2.5.0
Maxime Ripard
AppliedPATCH v2 1/2 ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
1;3803;0c
Quoted 3 lines · Chen-Yu Tsai
The tablet has volume up/down buttons on the side, connected to the LRADC.
Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150731/754edc0a/attachment.sig>
PATCH v2 2/2 ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
In reply to Chen-Yu TsaiThis tablet has proper USB OTG support, using 3 GPIO pins for ID and VBUS detection, and also VBUS control.
--- arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts +38 -0
@@ -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,20 @@ 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>; + }; }; #include "axp209.dtsi"
@@ -172,13 +190,33 @@ regulator-name = "vcc-wifi"; }; +®_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"; +}; + +&usb0_vbus_pin_a { + allwinner,pins = "PG12"; +}; + &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 = <®_usb0_vbus>; usb1_vbus-supply = <®_ldo3>; status = "okay"; };
Signature · 1 line
2.5.0
Maxime Ripard
AppliedPATCH v2 2/2 ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
Quoted 4 lines · Chen-Yu Tsai
This tablet has proper USB OTG support, using 3 GPIO pins for ID and VBUS detection, and also VBUS control.
Signed-off-by Chen-Yu Tsai <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150731/27bc03ff/attachment.sig>