keypad: s7: support keypad [1/1]

PD#SWPL-154013

Problem:
S7 Silicon Bringup.

Solution:
S7 Silicon Bringup.

Verify:
S7/BH201

Change-Id: Ia55dbc3f0eba086046b470c3d0994530a4584013
Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
This commit is contained in:
Huqiang Qin
2024-01-13 15:20:44 +08:00
committed by Luan Yuan
parent bb60a1a5e9
commit 5ec7cfa4c0
4 changed files with 35 additions and 58 deletions
@@ -17,6 +17,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/meson_ir.h>
#include <dt-bindings/mailbox/s7-mbox.h>
#include <dt-bindings/iio/adc/amlogic-saradc.h>
#include "meson-ir-map.dtsi"
#include "mesong12a-bifrost.dtsi"
/ {
+16 -15
View File
@@ -719,28 +719,29 @@
adc_keypad {
compatible = "amlogic, adc_keypad";
status = "disabled";
key_name = "standby", "vol+", "vol-";
status = "okay";
key_name = "vol-", "vol+", "power";
key_num = <3>;
io-channels = <&saradc 0>;
io-channels = <&saradc SARADC_CH0>;
io-channel-names = "key-chan-0";
key_chan = <0 0 0>;
key_code = <116 115 114>;
key_val = <20 910 630>; //val=voltage/1800mV*1023
key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0>;
key_code = <KEY_VOLUMEDOWN KEY_VOLUMEUP KEY_POWER>;
/* val = voltage / 1800mV * 1023 */
key_val = <630 910 20>;
key_tolerance = <40 40 40>;
};
gpio_keypad{
gpio_keypad {
compatible = "amlogic, gpio_keypad";
status = "disabled";
status = "okay";
scan_period = <20>;
key_num = <2>;
key_name = "bluetooth", "mute";
key_code = <600 SW_MUTE_DEVICE>;
key_type = <EV_KEY EV_SW>;
key-gpios = <&gpio GPIOD_2 GPIO_ACTIVE_HIGH
&gpio GPIOD_3 GPIO_ACTIVE_HIGH>;
detect_mode = <0>;/*0:polling mode, 1:irq mode*/
key_num = <1>;
key_name = "bluetooth";
key_code = <600>;
key_type = <EV_KEY>;
key-gpios = <&gpio GPIOD_2 GPIO_ACTIVE_HIGH>;
/* 0:polling mode, 1:irq mode */
detect_mode = <0>;
};
vin_12v_reg: fixedregulator@12v {
@@ -748,30 +748,17 @@
status = "disabled";
};/* Audio Related end */
adc_keypad {
compatible = "amlogic, adc_keypad";
status = "disabled";
key_name = "standby", "vol+", "vol-";
key_num = <3>;
io-channels = <&saradc 0>;
io-channel-names = "key-chan-0";
key_chan = <0 0 0>;
key_code = <116 115 114>;
key_val = <20 910 630>; //val=voltage/1800mV*1023
key_tolerance = <40 40 40>;
};
gpio_keypad{
gpio_keypad {
compatible = "amlogic, gpio_keypad";
status = "disabled";
status = "okay";
scan_period = <20>;
key_num = <2>;
key_name = "bluetooth", "mute";
key_code = <600 SW_MUTE_DEVICE>;
key_type = <EV_KEY EV_SW>;
key-gpios = <&gpio GPIOD_2 GPIO_ACTIVE_HIGH
&gpio GPIOD_3 GPIO_ACTIVE_HIGH>;
detect_mode = <0>;/*0:polling mode, 1:irq mode*/
key_num = <1>;
key_name = "bluetooth";
key_code = <600>;
key_type = <EV_KEY>;
key-gpios = <&gpio GPIOD_2 GPIO_ACTIVE_HIGH>;
/* 0:polling mode, 1:irq mode */
detect_mode = <0>;
};
vin_5v_reg: fixedregulator@vin_5v {
@@ -750,28 +750,16 @@
adc_keypad {
compatible = "amlogic, adc_keypad";
status = "disabled";
key_name = "standby", "vol+", "vol-";
key_num = <3>;
io-channels = <&saradc 0>;
status = "okay";
key_name = "menu", "vol-", "vol+", "esc", "home";
key_num = <5>;
io-channels = <&saradc SARADC_CH0>;
io-channel-names = "key-chan-0";
key_chan = <0 0 0>;
key_code = <116 115 114>;
key_val = <20 910 630>; //val=voltage/1800mV*1023
key_tolerance = <40 40 40>;
};
gpio_keypad{
compatible = "amlogic, gpio_keypad";
status = "disabled";
scan_period = <20>;
key_num = <2>;
key_name = "bluetooth", "mute";
key_code = <600 SW_MUTE_DEVICE>;
key_type = <EV_KEY EV_SW>;
key-gpios = <&gpio GPIOD_2 GPIO_ACTIVE_HIGH
&gpio GPIOD_3 GPIO_ACTIVE_HIGH>;
detect_mode = <0>;/*0:polling mode, 1:irq mode*/
key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0 SARADC_CH0 SARADC_CH0>;
key_code = <KEY_MENU KEY_VOLUMEDOWN KEY_VOLUMEUP KEY_ESC KEY_HOME>;
/* key_val = voltage / 1800mV * 1023 */
key_val = <0 143 266 389 512>;
key_tolerance = <40 40 40 40 40>;
};
vin_12v_reg: fixedregulator@12v {