| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2019 Hardkernel Co., Ltd |
| 4 |
* Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH |
| 5 |
* Copyright (c) 2022 Maya Matuszczyk <[email protected]> |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
#include "rk3326-odroid-go.dtsi" |
| 10 |
|
| 11 |
/ { |
| 12 |
model = "ODROID-GO Super"; |
| 13 |
compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326"; |
| 14 |
|
| 15 |
joystick_mux_controller: mux-controller { |
| 16 |
compatible = "gpio-mux"; |
| 17 |
pinctrl-0 = <&mux_en_pins>; |
| 18 |
pinctrl-names = "default"; |
| 19 |
#mux-control-cells = <0>; |
| 20 |
|
| 21 |
mux-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>, |
| 22 |
<&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; |
| 23 |
}; |
| 24 |
|
| 25 |
joystick_mux: adc-mux { |
| 26 |
compatible = "io-channel-mux"; |
| 27 |
io-channels = <&saradc 1>; |
| 28 |
io-channel-names = "parent"; |
| 29 |
#io-channel-cells = <1>; |
| 30 |
|
| 31 |
mux-controls = <&joystick_mux_controller>; |
| 32 |
channels = "0", "1", "2", "3"; |
| 33 |
}; |
| 34 |
|
| 35 |
analog_sticks: adc-joystick { |
| 36 |
compatible = "adc-joystick"; |
| 37 |
io-channels = <&joystick_mux 0>, |
| 38 |
<&joystick_mux 1>, |
| 39 |
<&joystick_mux 2>, |
| 40 |
<&joystick_mux 3>; |
| 41 |
poll-interval = <60>; |
| 42 |
#address-cells = <1>; |
| 43 |
#size-cells = <0>; |
| 44 |
|
| 45 |
axis@0 { |
| 46 |
reg = <0>; |
| 47 |
abs-flat = <10>; |
| 48 |
abs-fuzz = <10>; |
| 49 |
abs-range = <180 800>; |
| 50 |
linux,code = <ABS_X>; |
| 51 |
}; |
| 52 |
|
| 53 |
axis@1 { |
| 54 |
reg = <1>; |
| 55 |
abs-flat = <10>; |
| 56 |
abs-fuzz = <10>; |
| 57 |
abs-range = <180 800>; |
| 58 |
linux,code = <ABS_RX>; |
| 59 |
}; |
| 60 |
|
| 61 |
axis@2 { |
| 62 |
reg = <2>; |
| 63 |
abs-flat = <10>; |
| 64 |
abs-fuzz = <10>; |
| 65 |
abs-range = <180 800>; |
| 66 |
linux,code = <ABS_Y>; |
| 67 |
}; |
| 68 |
|
| 69 |
axis@3 { |
| 70 |
reg = <3>; |
| 71 |
abs-flat = <10>; |
| 72 |
abs-fuzz = <10>; |
| 73 |
abs-range = <180 800>; |
| 74 |
linux,code = <ABS_RY>; |
| 75 |
}; |
| 76 |
}; |
| 77 |
|
| 78 |
battery: battery { |
| 79 |
compatible = "simple-battery"; |
| 80 |
charge-full-design-microamp-hours = <4000000>; |
| 81 |
charge-term-current-microamp = <300000>; |
| 82 |
constant-charge-current-max-microamp = <2000000>; |
| 83 |
constant-charge-voltage-max-microvolt = <4200000>; |
| 84 |
factory-internal-resistance-micro-ohms = <180000>; |
| 85 |
voltage-max-design-microvolt = <4100000>; |
| 86 |
voltage-min-design-microvolt = <3500000>; |
| 87 |
|
| 88 |
ocv-capacity-celsius = <20>; |
| 89 |
ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, |
| 90 |
<3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, |
| 91 |
<3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, |
| 92 |
<3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, |
| 93 |
<3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, |
| 94 |
<3574170 0>; |
| 95 |
}; |
| 96 |
|
| 97 |
gpio-keys-vol { |
| 98 |
compatible = "gpio-keys"; |
| 99 |
autorepeat; |
| 100 |
pinctrl-0 = <&btn_pins_vol>; |
| 101 |
pinctrl-names = "default"; |
| 102 |
|
| 103 |
button-vol-down { |
| 104 |
gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; |
| 105 |
label = "VOLUMEDOWN"; |
| 106 |
linux,code = <KEY_VOLUMEDOWN>; |
| 107 |
}; |
| 108 |
|
| 109 |
button-volume-up { |
| 110 |
gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; |
| 111 |
label = "VOLUMEUP"; |
| 112 |
linux,code = <KEY_VOLUMEUP>; |
| 113 |
}; |
| 114 |
}; |
| 115 |
}; |
| 116 |
|
| 117 |
/* f1 and f2 conflict with volume buttons */ |
| 118 |
/delete-node/ &btn_f1; |
| 119 |
/delete-node/ &btn_f2; |
| 120 |
|
| 121 |
&builtin_gamepad { |
| 122 |
button-sw19 { |
| 123 |
gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; |
| 124 |
label = "SELECT"; |
| 125 |
linux,code = <BTN_SELECT>; |
| 126 |
}; |
| 127 |
/* note that TR2 and TL2 are swapped */ |
| 128 |
button-sw20 { |
| 129 |
gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; |
| 130 |
label = "TOP-RIGHT 2"; |
| 131 |
linux,code = <BTN_TR2>; |
| 132 |
}; |
| 133 |
button-sw21 { |
| 134 |
gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; |
| 135 |
label = "TOP-LEFT 2"; |
| 136 |
linux,code = <BTN_TL2>; |
| 137 |
}; |
| 138 |
button-sw22 { |
| 139 |
gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; |
| 140 |
label = "START"; |
| 141 |
linux,code = <BTN_START>; |
| 142 |
}; |
| 143 |
}; |
| 144 |
|
| 145 |
&internal_display { |
| 146 |
compatible = "elida,kd50t048a", "sitronix,st7701"; |
| 147 |
reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; |
| 148 |
IOVCC-supply = <&vcc_lcd>; |
| 149 |
VCC-supply = <&vcc_lcd>; |
| 150 |
}; |
| 151 |
|
| 152 |
&rk817_charger { |
| 153 |
monitored-battery = <&battery>; |
| 154 |
}; |
| 155 |
|
| 156 |
&pinctrl { |
| 157 |
btns { |
| 158 |
btn_pins: btn-pins { |
| 159 |
rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, |
| 160 |
<1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, |
| 161 |
<1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, |
| 162 |
<1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, |
| 163 |
<1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, |
| 164 |
<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, |
| 165 |
<1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, |
| 166 |
<1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, |
| 167 |
<2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, |
| 168 |
<2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, |
| 169 |
<2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, |
| 170 |
<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, |
| 171 |
<2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, |
| 172 |
<2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, |
| 173 |
<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, |
| 174 |
<3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, |
| 175 |
<3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, |
| 176 |
<3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; |
| 177 |
}; |
| 178 |
btn_pins_vol: btn-pins-vol { |
| 179 |
rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, |
| 180 |
<2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 181 |
}; |
| 182 |
}; |
| 183 |
|
| 184 |
joystick { |
| 185 |
mux_en_pins: mux-pins { |
| 186 |
rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>; |
| 187 |
}; |
| 188 |
}; |
| 189 |
}; |