Skip to content

Commit c8affc7

Browse files
committed
rk3326: move dts from patches to plain files
1 parent 7c5d1d9 commit c8affc7

26 files changed

+6602
-5267
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/*
2+
This is a skeleton of joypad with 2 sticks and FN (MODE) button.
3+
Fits devices with 1 stick and 2 extra face buttons too.
4+
By including this ans setting I/O properties only,
5+
devices should get consistent controller id and mapping
6+
thus reusing non-game configs:
7+
* SDL gamecontrollerdb.txt
8+
* ES es_input.cfg
9+
* Retroarch gamepad
10+
*/
11+
12+
/ {
13+
joypad: retrogame_joypad_s2_f1 {
14+
/* These drivers emit the same button set which makes this skeleton ADC-agnostic */
15+
/* compatible = "rocknix-joypad"; */
16+
/* compatible = "rocknix-singleadc-joypad"; */
17+
18+
/* These are constants making Joystick Guid the same */
19+
joypad-name = "retrogame_joypad_s2_f1";
20+
joypad-vendor = <0x484B>;
21+
joypad-product = <0x1121>; /* 11 inherited, 2 for number of sticks, 1 for number of FN */
22+
joypad-revision = <0x0100>;
23+
24+
/* require explicit status = "okay"; */
25+
status = "disabled";
26+
27+
/* adc calculate scale */
28+
button-adc-scale = <2>;
29+
30+
/* adc deadzone range */
31+
button-adc-deadzone = <64>;
32+
33+
/*
34+
specifies fuzz value that is used to filter noise from
35+
the event stream.
36+
*/
37+
button-adc-fuzz = <32>;
38+
button-adc-flat = <32>;
39+
40+
/* poll device interval (ms), adc read interval */
41+
poll-interval = <10>;
42+
43+
/* gpio button auto repeat set value : default disable */
44+
/*
45+
autorepeat;
46+
*/
47+
48+
/* meaningful node names for easier use */
49+
up {
50+
label = "GPIO DPAD-UP";
51+
linux,code = <BTN_DPAD_UP>;
52+
};
53+
down {
54+
label = "GPIO DPAD-DOWN";
55+
linux,code = <BTN_DPAD_DOWN>;
56+
};
57+
left {
58+
label = "GPIO DPAD-LEFT";
59+
linux,code = <BTN_DPAD_LEFT>;
60+
};
61+
right {
62+
label = "GPIO DPAD-RIGHT";
63+
linux,code = <BTN_DPAD_RIGHT>;
64+
};
65+
66+
a {
67+
label = "GPIO BTN-A";
68+
linux,code = <BTN_EAST>;
69+
};
70+
b {
71+
label = "GPIO BTN-B";
72+
linux,code = <BTN_SOUTH>;
73+
};
74+
x {
75+
label = "GPIO BTN-X";
76+
linux,code = <BTN_NORTH>;
77+
};
78+
y {
79+
label = "GPIO BTN-Y";
80+
linux,code = <BTN_WEST>;
81+
};
82+
83+
select {
84+
label = "GPIO BTN_SELECT";
85+
linux,code = <BTN_SELECT>;
86+
};
87+
start {
88+
label = "GPIO BTN_START";
89+
linux,code = <BTN_START>;
90+
};
91+
mode {
92+
label = "GPIO BTN_F";
93+
linux,code = <BTN_MODE>;
94+
};
95+
96+
tl {
97+
label = "GPIO BTN_TL";
98+
linux,code = <BTN_TL>;
99+
};
100+
tr {
101+
label = "GPIO BTN_TR";
102+
linux,code = <BTN_TR>;
103+
};
104+
tl2 {
105+
label = "GPIO BTN_TL2";
106+
linux,code = <BTN_TL2>;
107+
};
108+
tr2 {
109+
label = "GPIO BTN_TR2";
110+
linux,code = <BTN_TR2>;
111+
};
112+
113+
thumbl {
114+
label = "GPIO BTN_THUMBL";
115+
linux,code = <BTN_THUMBL>;
116+
};
117+
thumbr {
118+
label = "GPIO BTN_THUMBR";
119+
linux,code = <BTN_THUMBR>;
120+
};
121+
};
122+
};
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 <maccraft123mc@gmail.com>
6+
*/
7+
8+
/dts-v1/;
9+
#include "rk3326-odroid-go.dtsi"
10+
11+
/ {
12+
model = "Anbernic RG351M";
13+
compatible = "anbernic,rg351m", "rockchip,rk3326";
14+
15+
battery: battery {
16+
compatible = "simple-battery";
17+
charge-full-design-microamp-hours = <3500000>;
18+
charge-term-current-microamp = <350000>;
19+
constant-charge-current-max-microamp = <2000000>;
20+
constant-charge-voltage-max-microvolt = <4200000>;
21+
factory-internal-resistance-micro-ohms = <180000>;
22+
voltage-max-design-microvolt = <4100000>;
23+
voltage-min-design-microvolt = <3500000>;
24+
25+
ocv-capacity-celsius = <20>;
26+
ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>,
27+
<3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>,
28+
<3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>,
29+
<3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>,
30+
<3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>,
31+
<3574170 0>;
32+
};
33+
34+
vibrator {
35+
compatible = "pwm-vibrator";
36+
pwms = <&pwm0 0 1000000 0>;
37+
pwm-names = "enable";
38+
};
39+
};
40+
41+
/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */
42+
43+
&internal_display {
44+
compatible = "elida,kd35t133";
45+
iovcc-supply = <&vcc_lcd>;
46+
vdd-supply = <&vcc_lcd>;
47+
rotation = <270>;
48+
};
49+
50+
&pwm0 {
51+
status = "okay";
52+
};
53+
54+
&rk817_charger {
55+
/* This device does not have a current sense resistor */
56+
//rockchip,resistor-sense-micro-ohms = <0>;
57+
monitored-battery = <&battery>;
58+
};

0 commit comments

Comments
 (0)