|
45 | 45 | /dts-v1/;
|
46 | 46 |
|
47 | 47 | #include "meson-gxbb-p20x.dtsi"
|
| 48 | +#include <dt-bindings/input/input.h> |
48 | 49 |
|
49 | 50 | / {
|
50 | 51 | compatible = "amlogic,p200", "amlogic,meson-gxbb";
|
51 | 52 | model = "Amlogic Meson GXBB P200 Development Board";
|
| 53 | + |
| 54 | + avdd18_usb_adc: regulator-avdd18_usb_adc { |
| 55 | + compatible = "regulator-fixed"; |
| 56 | + regulator-name = "AVDD18_USB_ADC"; |
| 57 | + regulator-min-microvolt = <1800000>; |
| 58 | + regulator-max-microvolt = <1800000>; |
| 59 | + }; |
| 60 | + |
| 61 | + adc_keys { |
| 62 | + compatible = "adc-keys"; |
| 63 | + io-channels = <&saradc 0>; |
| 64 | + io-channel-names = "buttons"; |
| 65 | + keyup-threshold-microvolt = <1800000>; |
| 66 | + |
| 67 | + button-home { |
| 68 | + label = "Home"; |
| 69 | + linux,code = <KEY_HOME>; |
| 70 | + press-threshold-microvolt = <900000>; /* 50% */ |
| 71 | + }; |
| 72 | + |
| 73 | + button-esc { |
| 74 | + label = "Esc"; |
| 75 | + linux,code = <KEY_ESC>; |
| 76 | + press-threshold-microvolt = <684000>; /* 38% */ |
| 77 | + }; |
| 78 | + |
| 79 | + button-up { |
| 80 | + label = "Volume Up"; |
| 81 | + linux,code = <KEY_VOLUMEUP>; |
| 82 | + press-threshold-microvolt = <468000>; /* 26% */ |
| 83 | + }; |
| 84 | + |
| 85 | + button-down { |
| 86 | + label = "Volume Down"; |
| 87 | + linux,code = <KEY_VOLUMEDOWN>; |
| 88 | + press-threshold-microvolt = <252000>; /* 14% */ |
| 89 | + }; |
| 90 | + |
| 91 | + button-menu { |
| 92 | + label = "Menu"; |
| 93 | + linux,code = <KEY_MENU>; |
| 94 | + press-threshold-microvolt = <0>; /* 0% */ |
| 95 | + }; |
| 96 | + }; |
52 | 97 | };
|
53 | 98 |
|
54 | 99 | &i2c_B {
|
55 | 100 | status = "okay";
|
56 | 101 | pinctrl-0 = <&i2c_b_pins>;
|
57 | 102 | pinctrl-names = "default";
|
58 | 103 | };
|
| 104 | + |
| 105 | +&saradc { |
| 106 | + status = "okay"; |
| 107 | + vref-supply = <&avdd18_usb_adc>; |
| 108 | +}; |
0 commit comments