mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
arm64: meson: odroid-go-ultra: add joypad
This commit is contained in:
@@ -48,95 +48,126 @@
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
gpios = <&gpio GPIOX_9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
dpad-up-button {
|
||||
label = "DPAD-UP";
|
||||
linux,code = <BTN_DPAD_UP>;
|
||||
};
|
||||
|
||||
joypad: gou_joypad {
|
||||
compatible = "odroidgou-joypad";
|
||||
poll-interval = <10>;
|
||||
pinctrl-0 = <&keypad_gpio_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
joypad-name = "GO-Ultra Gamepad";
|
||||
//joypad-vendor = <0x045e>;
|
||||
joypad-product = <0x1000>;
|
||||
joypad-revision = <0x0100>;
|
||||
|
||||
/* Analog sticks */
|
||||
io-channels = <&saradc 0>, <&saradc 1>, <&saradc 2>, <&saradc 3>;
|
||||
io-channel-names = "key-RY", "key-RX", "key-LY", "key-LX";
|
||||
button-adc-scale = <4>;
|
||||
button-adc-deadzone = <64>;
|
||||
button-adc-fuzz = <32>;
|
||||
button-adc-flat = <32>;
|
||||
abs_x-p-tuning = <350>;
|
||||
abs_x-n-tuning = <350>;
|
||||
abs_y-p-tuning = <350>;
|
||||
abs_y-n-tuning = <350>;
|
||||
abs_rx-p-tuning = <350>;
|
||||
abs_rx-n-tuning = <350>;
|
||||
abs_ry-p-tuning = <350>;
|
||||
abs_ry-n-tuning = <350>;
|
||||
|
||||
/* Buttons */
|
||||
sw1 {
|
||||
gpios = <&gpio GPIOX_0 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO DPAD-UP";
|
||||
linux,code = <BTN_DPAD_UP>; // 0x220
|
||||
};
|
||||
dpad-down-button {
|
||||
label = "DPAD-DOWN";
|
||||
linux,code = <BTN_DPAD_DOWN>;
|
||||
sw2 {
|
||||
gpios = <&gpio GPIOX_1 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO DPAD-DOWN";
|
||||
linux,code = <BTN_DPAD_DOWN>; // 0x221
|
||||
};
|
||||
dpad-left-button {
|
||||
label = "DPAD-LEFT";
|
||||
linux,code = <BTN_DPAD_LEFT>;
|
||||
sw3 {
|
||||
gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO DPAD-LEFT";
|
||||
linux,code = <BTN_DPAD_LEFT>; // 0x222
|
||||
};
|
||||
dpad-right-button {
|
||||
label = "DPAD-RIGHT";
|
||||
linux,code = <BTN_DPAD_RIGHT>;
|
||||
sw4 {
|
||||
gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO DPAD-RIGHT";
|
||||
linux,code = <BTN_DPAD_RIGHT>; // 0x223
|
||||
};
|
||||
a-button {
|
||||
label = "A";
|
||||
linux,code = <BTN_EAST>;
|
||||
sw5 {
|
||||
gpios = <&gpio GPIOX_4 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO BTN-A";
|
||||
linux,code = <BTN_EAST>; // 0x131
|
||||
};
|
||||
b-button {
|
||||
label = "B";
|
||||
linux,code = <BTN_SOUTH>;
|
||||
sw6 {
|
||||
gpios = <&gpio GPIOX_5 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO BTN-B";
|
||||
linux,code = <BTN_SOUTH>; // 0x130
|
||||
};
|
||||
y-button {
|
||||
label = "Y";
|
||||
linux,code = <BTN_WEST>;
|
||||
sw7 {
|
||||
gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO BTN-Y";
|
||||
linux,code = <BTN_WEST>; // 0x134
|
||||
};
|
||||
x-button {
|
||||
label = "X";
|
||||
linux,code = <BTN_NORTH>;
|
||||
sw8 {
|
||||
gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO BTN-X";
|
||||
linux,code = <BTN_NORTH>; // 0x133
|
||||
};
|
||||
f1-button {
|
||||
label = "F1";
|
||||
linux,code = <BTN_TRIGGER_HAPPY1>;
|
||||
gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
f2-button {
|
||||
label = "F2";
|
||||
linux,code = <BTN_TRIGGER_HAPPY2>;
|
||||
sw11 {
|
||||
gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO F2";
|
||||
linux,code = <BTN_TRIGGER_HAPPY2>; // 0x2c2
|
||||
};
|
||||
f3-button {
|
||||
label = "F3";
|
||||
linux,code = <BTN_TRIGGER_HAPPY3>;
|
||||
sw12 {
|
||||
gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO F3";
|
||||
linux,code = <BTN_TRIGGER_HAPPY3>; // 0x2c3
|
||||
};
|
||||
f4-button {
|
||||
label = "F4";
|
||||
linux,code = <BTN_TRIGGER_HAPPY4>;
|
||||
sw13 {
|
||||
gpios = <&gpio GPIOX_12 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO F4";
|
||||
linux,code = <BTN_TRIGGER_HAPPY4>; // 0x2c4
|
||||
};
|
||||
f5-button {
|
||||
label = "F5";
|
||||
linux,code = <BTN_TRIGGER_HAPPY5>;
|
||||
sw14 {
|
||||
gpios = <&gpio GPIOX_13 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO F5";
|
||||
linux,code = <BTN_TRIGGER_HAPPY5>; // 0x13c
|
||||
};
|
||||
f6-button {
|
||||
label = "F6";
|
||||
linux,code = <BTN_TRIGGER_HAPPY6>;
|
||||
gpios = <&gpio GPIOX_16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
top-left-button {
|
||||
label = "TOP Left";
|
||||
linux,code = <BTN_TL>;
|
||||
sw15 {
|
||||
gpios = <&gpio GPIOX_14 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO TOP-LEFT";
|
||||
linux,code = <BTN_TL>; // 0x02
|
||||
};
|
||||
top-left2-button {
|
||||
label = "TOP Left 2";
|
||||
linux,code = <BTN_TL2>;
|
||||
gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
top-right-button {
|
||||
label = "TOP Right";
|
||||
linux,code = <BTN_TR>;
|
||||
sw16 {
|
||||
gpios = <&gpio GPIOX_15 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO TOP-RIGHT";
|
||||
linux,code = <BTN_TR>; // 0x05
|
||||
};
|
||||
top-right2-button {
|
||||
label = "TOP Right 2";
|
||||
linux,code = <BTN_TR2>;
|
||||
sw17 {
|
||||
gpios = <&gpio GPIOX_16 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO F6";
|
||||
linux,code = <BTN_TRIGGER_HAPPY6>;
|
||||
};
|
||||
sw18 {
|
||||
gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO F1";
|
||||
linux,code = <BTN_TRIGGER_HAPPY1>;
|
||||
};
|
||||
sw19 {
|
||||
gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO TOP-RIGHT2";
|
||||
linux,code = <BTN_TR2>;
|
||||
};
|
||||
sw20 {
|
||||
gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>;
|
||||
label = "GPIO TOP-LEFT2";
|
||||
linux,code = <BTN_TL2>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user