Merge pull request #1872 from brooksytech/dev

Start support for RG351V
This commit is contained in:
Brooksytech 2023-08-04 14:18:55 -07:00 committed by GitHub
commit 0484731c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 304 additions and 55 deletions

View file

@ -0,0 +1,23 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_START"
DEVICE_BRIGHTNESS="128"
DEVICE_BATTERY_LED_STATUS=true
DEVICE_PWR_LED_GPIO="77"
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
UI_SERVICE="weston.service"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
DMC_FREQ=("/sys/devices/platform/dmc/devfreq/dmc")
EOF

View file

@ -0,0 +1,11 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi

View file

@ -0,0 +1,38 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
### Set a custom device so we don't clobber it.
set-audio set "CUSTOM (UNMANAGED)"
set-audio esset "Master"
cat <<EOF >/storage/.config/asound.conf
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}
EOF
#if [ ! -e "/storage/.config/asound.state" ]
#then
# cat <<EOF >/storage/.config/asound.state
#EOF
#fi

View file

@ -0,0 +1,46 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
#Set up gzdoom
if [ ! -d "/storage/.config/gzdoom/" ]; then
cp -rf /usr/config/gzdoom /storage/.config/
sed -i '/Joy7=/c\Joy7=togglemap' /storage/.config/gzdoom/gzdoom.ini
sed -i '/Joy8=/c\Joy8=menu_main' /storage/.config/gzdoom/gzdoom.ini
sed -i '/Axis0scale=/c\Axis0scale=-0.8' /storage/.config/gzdoom/gzdoom.ini
sed -i '/Axis1scale=/c\Axis1scale=-0.6' /storage/.config/gzdoom/gzdoom.ini
sed -i '/vid_defheight=/c\vid_defheight=320' /storage/.config/gzdoom/gzdoom.ini
sed -i '/vid_defwidth=/c\vid_defwidth=480' /storage/.config/gzdoom/gzdoom.ini
fi
#Map ppsspp controls
if grep RG351V -q "/stprage/.config/ppsspp/PSP/SYSTEM/controls.ini"
then
exit 1
else
cat <<EOF >/storage/.config/ppsspp/PSP/SYSTEM/controls.ini
#RG351V
[ControlMapping]
Up = 10-19
Down = 10-20
Left = 10-21
Right = 10-22
Circle = 10-189
Cross = 10-190
Square = 10-188
Triangle = 10-191
Start = 10-197
Select = 10-196
L = 10-193
R = 10-192
An.Up = 10-4002
An.Down = 10-4003
An.Left = 10-4000
An.Right = 10-4001
Fast-forward = 1-61
Pause = 10-106
Save State = 10-4010
Load State = 10-4008
EOF
fi

View file

@ -108,8 +108,10 @@ elif test \${hwrev} = 'v10-go3'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go3.dtb load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go3.dtb
elif test \${hwrev} = 'v10'; then elif test \${hwrev} = 'v10'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2.dtb load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2.dtb
else elif test \${hwrev} = 'rg351v'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351v.dtb load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351v.dtb
elif test \${hwrev} = 'rg351mp'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351mp.dtb
fi fi
booti \${loadaddr} - \${dtb_loadaddr} booti \${loadaddr} - \${dtb_loadaddr}

View file

@ -70,8 +70,10 @@ elif test \${hwrev} = 'v10-go3'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go3.dtb load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go3.dtb
elif test \${hwrev} = 'v10'; then elif test \${hwrev} = 'v10'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2.dtb load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2.dtb
else elif test \${hwrev} = 'rg351v'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351v.dtb load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351v.dtb
elif test \${hwrev} = 'rg351mp'; then
load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351mp.dtb
fi fi
booti \${loadaddr} - \${dtb_loadaddr} booti \${loadaddr} - \${dtb_loadaddr}

View file

@ -3368,7 +3368,7 @@ CONFIG_DRM_PANEL_ELIDA_KD35T133=y
# CONFIG_DRM_PANEL_LG_LB035Q02 is not set # CONFIG_DRM_PANEL_LG_LB035Q02 is not set
# CONFIG_DRM_PANEL_LG_LG4573 is not set # CONFIG_DRM_PANEL_LG_LG4573 is not set
# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set # CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set
config DRM_PANEL_NEWVISION_NV3051D=y CONFIG_DRM_PANEL_NEWVISION_NV3051D=y
# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set # CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set # CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set # CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set

View file

@ -1,6 +1,6 @@
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boot/dts/rockchip/Makefile diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boot/dts/rockchip/Makefile
--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2023-05-30 16:56:56.010868963 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2023-08-03 08:24:19.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/Makefile 2023-08-04 16:55:20.877879413 +0000
@@ -7,7 +7,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-ev @@ -7,7 +7,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-ev
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb
@ -14,8 +14,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi linux/arch/arm64/boot/dts/rockchip/px30.dtsi diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi linux/arch/arm64/boot/dts/rockchip/px30.dtsi
--- linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi 2023-05-30 16:56:56.022869345 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi 2023-08-03 08:24:19.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2023-05-30 19:10:46.414821208 +0000 +++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2023-08-04 16:55:20.877879413 +0000
@@ -114,12 +114,6 @@ @@ -114,12 +114,6 @@
compatible = "operating-points-v2"; compatible = "operating-points-v2";
opp-shared; opp-shared;
@ -173,8 +173,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi linux/arch/arm64/bo
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2023-08-04 18:50:02.589594754 +0000
@@ -0,0 +1,57 @@ @@ -0,0 +1,58 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/* +/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2019 Hardkernel Co., Ltd
@ -221,6 +221,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts li
+ compatible = "elida,kd35t133"; + compatible = "elida,kd35t133";
+ iovcc-supply = <&vcc_lcd>; + iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>; + vdd-supply = <&vcc_lcd>;
+ rotation = <270>;
+}; +};
+ +
+&pwm0 { +&pwm0 {
@ -232,9 +233,9 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts li
+ //rockchip,resistor-sense-micro-ohms = <0>; + //rockchip,resistor-sense-micro-ohms = <0>;
+ monitored-battery = <&battery>; + monitored-battery = <&battery>;
+}; +};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351p.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351p.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351p.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351p.dts 2023-08-04 18:29:32.912721771 +0000
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/* +/*
@ -279,7 +280,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts li
+/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */
+ +
+&internal_display { +&internal_display {
+ compatible = "anbernic,rg353p-panel", "newvision,nv3051d"; + compatible = "anbernic,rg351v-panel", "newvision,nv3051d";
+ iovcc-supply = <&vcc_lcd>; + iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>; + vdd-supply = <&vcc_lcd>;
+}; +};
@ -293,10 +294,99 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts li
+ rockchip,resistor-sense-micro-ohms = <0>; + rockchip,resistor-sense-micro-ohms = <0>;
+ monitored-battery = <&battery>; + monitored-battery = <&battery>;
+}; +};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 2023-08-04 19:10:59.622486606 +0000
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd
+ * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
+ * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com>
+ */
+
+/dts-v1/;
+#include "rk3326-odroid-go.dtsi"
+
+/ {
+ model = "Anbernic RG351V";
+ compatible = "anbernic,rg351v", "rockchip,rk3326";
+
+ gpio-keys-vol {
+ compatible = "gpio-keys";
+ autorepeat;
+ pinctrl-0 = <&btn_pins_vol>;
+ pinctrl-names = "default";
+
+ button-vol-down {
+ gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEDOWN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+
+ button-volume-up {
+ gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEUP";
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <3500000>;
+ charge-term-current-microamp = <350000>;
+ constant-charge-current-max-microamp = <2000000>;
+ constant-charge-voltage-max-microvolt = <4200000>;
+ factory-internal-resistance-micro-ohms = <180000>;
+ voltage-max-design-microvolt = <4100000>;
+ voltage-min-design-microvolt = <3500000>;
+
+ ocv-capacity-celsius = <20>;
+ ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>,
+ <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>,
+ <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>,
+ <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>,
+ <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>,
+ <3574170 0>;
+ };
+
+ vibrator {
+ compatible = "pwm-vibrator";
+ pwms = <&pwm0 0 1000000 0>;
+ pwm-names = "enable";
+ };
+};
+
+/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */
+
+&internal_display {
+ compatible = "anbernic,rg351v-panel", "newvision,nv3051d";
+ iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>;
+};
+
+&pwm0 {
+ status = "okay";
+};
+
+&rk817_charger {
+ /* This device does not have a current sense resistor */
+ rockchip,resistor-sense-micro-ohms = <0>;
+ monitored-battery = <&battery>;
+};
+
+&pinctrl {
+ btns {
+ btn_pins_vol: btn-pins-vol {
+ rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2023-08-04 18:52:52.277556396 +0000
@@ -0,0 +1,567 @@ @@ -0,0 +1,566 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/* +/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2019 Hardkernel Co., Ltd
@ -486,7 +576,6 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/a
+ reg = <0>; + reg = <0>;
+ backlight = <&backlight>; + backlight = <&backlight>;
+ reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
+ rotation = <270>;
+ +
+ port { + port {
+ mipi_in_panel: endpoint { + mipi_in_panel: endpoint {
@ -866,8 +955,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/a
+}; +};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2023-08-04 18:51:03.271015664 +0000
@@ -0,0 +1,299 @@ @@ -0,0 +1,300 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/* +/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2019 Hardkernel Co., Ltd
@ -1098,6 +1187,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts lin
+ compatible = "elida,kd35t133"; + compatible = "elida,kd35t133";
+ iovcc-supply = <&vcc_lcd>; + iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>; + vdd-supply = <&vcc_lcd>;
+ rotation = <270>;
+}; +};
+ +
+&rk817 { +&rk817 {
@ -1168,8 +1258,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts lin
+ }; + };
+}; +};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2023-05-30 16:56:56.022869345 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2023-08-03 08:24:19.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2023-08-04 18:51:46.908034443 +0000
@@ -2,55 +2,185 @@ @@ -2,55 +2,185 @@
/* /*
* Copyright (c) 2019 Hardkernel Co., Ltd * Copyright (c) 2019 Hardkernel Co., Ltd
@ -1394,7 +1484,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/a
battery: battery { battery: battery {
compatible = "simple-battery"; compatible = "simple-battery";
@@ -63,606 +193,42 @@ @@ -63,606 +193,43 @@
voltage-min-design-microvolt = <3500000>; voltage-min-design-microvolt = <3500000>;
ocv-capacity-celsius = <20>; ocv-capacity-celsius = <20>;
@ -1934,6 +2024,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/a
+ compatible = "elida,kd35t133"; + compatible = "elida,kd35t133";
+ iovcc-supply = <&vcc_lcd>; + iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>; + vdd-supply = <&vcc_lcd>;
+ rotation = <270>;
}; };
-&uart2 { -&uart2 {
@ -2028,8 +2119,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/a
}; };
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2023-05-30 17:52:01.798714782 +0000 +++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2023-08-04 18:52:27.908989606 +0000
@@ -0,0 +1,283 @@ @@ -0,0 +1,284 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/* +/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2019 Hardkernel Co., Ltd
@ -2279,6 +2370,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/a
+ reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
+ IOVCC-supply = <&vcc_lcd>; + IOVCC-supply = <&vcc_lcd>;
+ VCC-supply = <&vcc_lcd>; + VCC-supply = <&vcc_lcd>;
+ rotation = <270>;
+}; +};
+ +
+&rk817_charger { +&rk817_charger {
@ -2314,8 +2406,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/a
+ }; + };
+}; +};
diff -rupN linux.orig/drivers/devfreq/Kconfig linux/drivers/devfreq/Kconfig diff -rupN linux.orig/drivers/devfreq/Kconfig linux/drivers/devfreq/Kconfig
--- linux.orig/drivers/devfreq/Kconfig 2023-05-30 16:57:00.495011796 +0000 --- linux.orig/drivers/devfreq/Kconfig 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/devfreq/Kconfig 2023-05-30 17:52:02.026721867 +0000 +++ linux/drivers/devfreq/Kconfig 2023-08-04 16:55:20.877879413 +0000
@@ -142,6 +142,12 @@ config ARM_RK3399_DMC_DEVFREQ @@ -142,6 +142,12 @@ config ARM_RK3399_DMC_DEVFREQ
It sets the frequency for the memory controller and reads the usage counts It sets the frequency for the memory controller and reads the usage counts
from hardware. from hardware.
@ -2330,8 +2422,8 @@ diff -rupN linux.orig/drivers/devfreq/Kconfig linux/drivers/devfreq/Kconfig
tristate "sun8i/sun50i MBUS DEVFREQ Driver" tristate "sun8i/sun50i MBUS DEVFREQ Driver"
depends on ARCH_SUNXI || COMPILE_TEST depends on ARCH_SUNXI || COMPILE_TEST
diff -rupN linux.orig/drivers/devfreq/Makefile linux/drivers/devfreq/Makefile diff -rupN linux.orig/drivers/devfreq/Makefile linux/drivers/devfreq/Makefile
--- linux.orig/drivers/devfreq/Makefile 2023-05-30 16:57:00.495011796 +0000 --- linux.orig/drivers/devfreq/Makefile 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/devfreq/Makefile 2023-05-30 17:52:02.030721991 +0000 +++ linux/drivers/devfreq/Makefile 2023-08-04 16:55:20.877879413 +0000
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx @@ -13,6 +13,7 @@ obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx
obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o
obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o
@ -2342,7 +2434,7 @@ diff -rupN linux.orig/drivers/devfreq/Makefile linux/drivers/devfreq/Makefile
diff -rupN linux.orig/drivers/devfreq/rockchip_bus.c linux/drivers/devfreq/rockchip_bus.c diff -rupN linux.orig/drivers/devfreq/rockchip_bus.c linux/drivers/devfreq/rockchip_bus.c
--- linux.orig/drivers/devfreq/rockchip_bus.c 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/drivers/devfreq/rockchip_bus.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/devfreq/rockchip_bus.c 2023-05-30 17:52:02.030721991 +0000 +++ linux/drivers/devfreq/rockchip_bus.c 2023-08-04 16:55:20.877879413 +0000
@@ -0,0 +1,258 @@ @@ -0,0 +1,258 @@
+// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0
+/* +/*
@ -2603,8 +2695,8 @@ diff -rupN linux.orig/drivers/devfreq/rockchip_bus.c linux/drivers/devfreq/rockc
+MODULE_AUTHOR("Tony Xie <tony.xie@rock-chips.com>"); +MODULE_AUTHOR("Tony Xie <tony.xie@rock-chips.com>");
+MODULE_DESCRIPTION("rockchip busfreq driver with devfreq framework"); +MODULE_DESCRIPTION("rockchip busfreq driver with devfreq framework");
diff -rupN linux.orig/drivers/gpu/drm/panel/Kconfig linux/drivers/gpu/drm/panel/Kconfig diff -rupN linux.orig/drivers/gpu/drm/panel/Kconfig linux/drivers/gpu/drm/panel/Kconfig
--- linux.orig/drivers/gpu/drm/panel/Kconfig 2023-05-30 16:57:09.483298097 +0000 --- linux.orig/drivers/gpu/drm/panel/Kconfig 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/gpu/drm/panel/Kconfig 2023-05-30 17:52:02.306730568 +0000 +++ linux/drivers/gpu/drm/panel/Kconfig 2023-08-04 16:55:20.877879413 +0000
@@ -296,6 +296,15 @@ config DRM_PANEL_NEC_NL8048HL11 @@ -296,6 +296,15 @@ config DRM_PANEL_NEC_NL8048HL11
panel (found on the Zoom2/3/3630 SDP boards). To compile this driver panel (found on the Zoom2/3/3630 SDP boards). To compile this driver
as a module, choose M here. as a module, choose M here.
@ -2622,8 +2714,8 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/Kconfig linux/drivers/gpu/drm/panel/
tristate "NewVision NV3052C RGB/SPI panel" tristate "NewVision NV3052C RGB/SPI panel"
depends on OF && SPI depends on OF && SPI
diff -rupN linux.orig/drivers/gpu/drm/panel/Makefile linux/drivers/gpu/drm/panel/Makefile diff -rupN linux.orig/drivers/gpu/drm/panel/Makefile linux/drivers/gpu/drm/panel/Makefile
--- linux.orig/drivers/gpu/drm/panel/Makefile 2023-05-30 16:57:09.483298097 +0000 --- linux.orig/drivers/gpu/drm/panel/Makefile 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/gpu/drm/panel/Makefile 2023-05-30 17:52:02.306730568 +0000 +++ linux/drivers/gpu/drm/panel/Makefile 2023-08-04 16:55:20.877879413 +0000
@@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1 @@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1
obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o
obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o
@ -2633,8 +2725,8 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/Makefile linux/drivers/gpu/drm/panel
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c diff -rupN linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c
--- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2023-05-30 16:57:09.503298734 +0000 --- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2023-05-30 17:52:02.310730693 +0000 +++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2023-08-04 16:55:20.877879413 +0000
@@ -51,14 +51,6 @@ static inline struct kd35t133 *panel_to_ @@ -51,14 +51,6 @@ static inline struct kd35t133 *panel_to_
return container_of(panel, struct kd35t133, panel); return container_of(panel, struct kd35t133, panel);
} }
@ -2697,8 +2789,8 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c linux/drivers
dev_dbg(dev, "Panel init sequence done\n"); dev_dbg(dev, "Panel init sequence done\n");
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
--- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2023-05-30 17:52:02.310730693 +0000 +++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2023-08-04 17:00:13.826040316 +0000
@@ -0,0 +1,504 @@ @@ -0,0 +1,518 @@
+// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0
+/* +/*
+ * NV3051D MIPI-DSI panel driver for Anbernic RG353x + * NV3051D MIPI-DSI panel driver for Anbernic RG353x
@ -2729,6 +2821,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
+ unsigned int num_modes; + unsigned int num_modes;
+ u16 width_mm, height_mm; + u16 width_mm, height_mm;
+ u32 bus_flags; + u32 bus_flags;
+ unsigned long mode_flags;
+}; +};
+ +
+struct panel_nv3051d { +struct panel_nv3051d {
@ -3086,8 +3179,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
+ +
+ dsi->lanes = 4; + dsi->lanes = 4;
+ dsi->format = MIPI_DSI_FMT_RGB888; + dsi->format = MIPI_DSI_FMT_RGB888;
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + dsi->mode_flags = ctx->panel_info->mode_flags;
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
+ +
+ drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs, + drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs,
+ DRM_MODE_CONNECTOR_DSI); + DRM_MODE_CONNECTOR_DSI);
@ -3181,10 +3273,24 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
+ .width_mm = 70, + .width_mm = 70,
+ .height_mm = 57, + .height_mm = 57,
+ .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET,
+};
+
+static const struct nv3051d_panel_info nv3051d_rg351v_info = {
+ .display_modes = nv3051d_rgxx3_modes,
+ .num_modes = ARRAY_SIZE(nv3051d_rgxx3_modes),
+ .width_mm = 70,
+ .height_mm = 57,
+ .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET |
+ MIPI_DSI_CLOCK_NON_CONTINUOUS,
+}; +};
+ +
+static const struct of_device_id newvision_nv3051d_of_match[] = { +static const struct of_device_id newvision_nv3051d_of_match[] = {
+ { .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info }, + { .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info },
+ { .compatible = "anbernic,rg351v-panel", .data = &nv3051d_rg351v_info },
+ { /* sentinel */ } + { /* sentinel */ }
+}; +};
+MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match); +MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match);
@ -3204,8 +3310,8 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
+MODULE_DESCRIPTION("DRM driver for Newvision NV3051D based MIPI DSI panels"); +MODULE_DESCRIPTION("DRM driver for Newvision NV3051D based MIPI DSI panels");
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7701.c linux/drivers/gpu/drm/panel/panel-sitronix-st7701.c diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7701.c linux/drivers/gpu/drm/panel/panel-sitronix-st7701.c
--- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7701.c 2023-05-30 16:57:09.583301282 +0000 --- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7701.c 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/gpu/drm/panel/panel-sitronix-st7701.c 2023-05-30 17:52:02.306730568 +0000 +++ linux/drivers/gpu/drm/panel/panel-sitronix-st7701.c 2023-08-04 16:55:20.877879413 +0000
@@ -19,6 +19,9 @@ @@ -19,6 +19,9 @@
/* Command2 BKx selection command */ /* Command2 BKx selection command */
@ -3521,8 +3627,8 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7701.c linux/driver
{ } { }
}; };
diff -rupN linux.orig/drivers/input/Kconfig linux/drivers/input/Kconfig diff -rupN linux.orig/drivers/input/Kconfig linux/drivers/input/Kconfig
--- linux.orig/drivers/input/Kconfig 2023-05-30 16:57:14.555459659 +0000 --- linux.orig/drivers/input/Kconfig 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/input/Kconfig 2023-05-30 17:52:02.366732433 +0000 +++ linux/drivers/input/Kconfig 2023-08-04 16:55:20.877879413 +0000
@@ -51,6 +51,19 @@ config INPUT_FF_MEMLESS @@ -51,6 +51,19 @@ config INPUT_FF_MEMLESS
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ff-memless. module will be called ff-memless.
@ -3544,8 +3650,8 @@ diff -rupN linux.orig/drivers/input/Kconfig linux/drivers/input/Kconfig
tristate "Sparse keymap support library" tristate "Sparse keymap support library"
help help
diff -rupN linux.orig/drivers/input/Makefile linux/drivers/input/Makefile diff -rupN linux.orig/drivers/input/Makefile linux/drivers/input/Makefile
--- linux.orig/drivers/input/Makefile 2023-05-30 16:57:14.559459786 +0000 --- linux.orig/drivers/input/Makefile 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/input/Makefile 2023-05-30 17:52:02.366732433 +0000 +++ linux/drivers/input/Makefile 2023-08-04 16:55:20.877879413 +0000
@@ -10,6 +10,7 @@ input-core-y := input.o input-compat.o i @@ -10,6 +10,7 @@ input-core-y := input.o input-compat.o i
input-core-y += touchscreen.o input-core-y += touchscreen.o
@ -3556,7 +3662,7 @@ diff -rupN linux.orig/drivers/input/Makefile linux/drivers/input/Makefile
obj-$(CONFIG_INPUT_VIVALDIFMAP) += vivaldi-fmap.o obj-$(CONFIG_INPUT_VIVALDIFMAP) += vivaldi-fmap.o
diff -rupN linux.orig/drivers/input/input-polldev.c linux/drivers/input/input-polldev.c diff -rupN linux.orig/drivers/input/input-polldev.c linux/drivers/input/input-polldev.c
--- linux.orig/drivers/input/input-polldev.c 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/drivers/input/input-polldev.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/input/input-polldev.c 2023-05-30 17:52:02.374732681 +0000 +++ linux/drivers/input/input-polldev.c 2023-08-04 16:55:20.877879413 +0000
@@ -0,0 +1,362 @@ @@ -0,0 +1,362 @@
+// SPDX-License-Identifier: GPL-2.0-only +// SPDX-License-Identifier: GPL-2.0-only
+/* +/*
@ -3921,8 +4027,8 @@ diff -rupN linux.orig/drivers/input/input-polldev.c linux/drivers/input/input-po
+} +}
+EXPORT_SYMBOL(input_unregister_polled_device); +EXPORT_SYMBOL(input_unregister_polled_device);
diff -rupN linux.orig/drivers/input/joystick/Kconfig linux/drivers/input/joystick/Kconfig diff -rupN linux.orig/drivers/input/joystick/Kconfig linux/drivers/input/joystick/Kconfig
--- linux.orig/drivers/input/joystick/Kconfig 2023-05-30 16:57:14.575460296 +0000 --- linux.orig/drivers/input/joystick/Kconfig 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/input/joystick/Kconfig 2023-05-30 17:52:02.366732433 +0000 +++ linux/drivers/input/joystick/Kconfig 2023-08-04 16:55:20.877879413 +0000
@@ -400,6 +400,21 @@ config JOYSTICK_N64 @@ -400,6 +400,21 @@ config JOYSTICK_N64
Say Y here if you want enable support for the four Say Y here if you want enable support for the four
built-in controller ports on the Nintendo 64 console. built-in controller ports on the Nintendo 64 console.
@ -3946,8 +4052,8 @@ diff -rupN linux.orig/drivers/input/joystick/Kconfig linux/drivers/input/joystic
tristate "Raspberry Pi Sense HAT joystick" tristate "Raspberry Pi Sense HAT joystick"
depends on INPUT && I2C depends on INPUT && I2C
diff -rupN linux.orig/drivers/input/joystick/Makefile linux/drivers/input/joystick/Makefile diff -rupN linux.orig/drivers/input/joystick/Makefile linux/drivers/input/joystick/Makefile
--- linux.orig/drivers/input/joystick/Makefile 2023-05-30 16:57:14.575460296 +0000 --- linux.orig/drivers/input/joystick/Makefile 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/input/joystick/Makefile 2023-05-30 17:52:02.366732433 +0000 +++ linux/drivers/input/joystick/Makefile 2023-08-04 16:55:20.877879413 +0000
@@ -25,6 +25,9 @@ obj-$(CONFIG_JOYSTICK_JOYDUMP) += joydu @@ -25,6 +25,9 @@ obj-$(CONFIG_JOYSTICK_JOYDUMP) += joydu
obj-$(CONFIG_JOYSTICK_MAGELLAN) += magellan.o obj-$(CONFIG_JOYSTICK_MAGELLAN) += magellan.o
obj-$(CONFIG_JOYSTICK_MAPLE) += maplecontrol.o obj-$(CONFIG_JOYSTICK_MAPLE) += maplecontrol.o
@ -3960,7 +4066,7 @@ diff -rupN linux.orig/drivers/input/joystick/Makefile linux/drivers/input/joysti
obj-$(CONFIG_JOYSTICK_QWIIC) += qwiic-joystick.o obj-$(CONFIG_JOYSTICK_QWIIC) += qwiic-joystick.o
diff -rupN linux.orig/drivers/input/joystick/odroidgo2-joypad.c linux/drivers/input/joystick/odroidgo2-joypad.c diff -rupN linux.orig/drivers/input/joystick/odroidgo2-joypad.c linux/drivers/input/joystick/odroidgo2-joypad.c
--- linux.orig/drivers/input/joystick/odroidgo2-joypad.c 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/drivers/input/joystick/odroidgo2-joypad.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/input/joystick/odroidgo2-joypad.c 2023-05-30 17:52:02.370732557 +0000 +++ linux/drivers/input/joystick/odroidgo2-joypad.c 2023-08-04 16:55:20.877879413 +0000
@@ -0,0 +1,878 @@ @@ -0,0 +1,878 @@
+/* +/*
+ * SARADC joystick & GPIO Button driver for Linux(Hardkernel ODROIDGO2-Advance) + * SARADC joystick & GPIO Button driver for Linux(Hardkernel ODROIDGO2-Advance)
@ -4842,7 +4948,7 @@ diff -rupN linux.orig/drivers/input/joystick/odroidgo2-joypad.c linux/drivers/in
+/*----------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------*/
diff -rupN linux.orig/drivers/input/joystick/odroidgo2-v11-joypad.c linux/drivers/input/joystick/odroidgo2-v11-joypad.c diff -rupN linux.orig/drivers/input/joystick/odroidgo2-v11-joypad.c linux/drivers/input/joystick/odroidgo2-v11-joypad.c
--- linux.orig/drivers/input/joystick/odroidgo2-v11-joypad.c 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/drivers/input/joystick/odroidgo2-v11-joypad.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/input/joystick/odroidgo2-v11-joypad.c 2023-05-30 17:52:02.370732557 +0000 +++ linux/drivers/input/joystick/odroidgo2-v11-joypad.c 2023-08-04 16:55:20.877879413 +0000
@@ -0,0 +1,878 @@ @@ -0,0 +1,878 @@
+/* +/*
+ * SARADC joystick & GPIO Button driver for Linux(Hardkernel ODROIDGO2-Advance) + * SARADC joystick & GPIO Button driver for Linux(Hardkernel ODROIDGO2-Advance)
@ -5724,7 +5830,7 @@ diff -rupN linux.orig/drivers/input/joystick/odroidgo2-v11-joypad.c linux/driver
+/*----------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------*/
diff -rupN linux.orig/drivers/input/joystick/odroidgo3-joypad.c linux/drivers/input/joystick/odroidgo3-joypad.c diff -rupN linux.orig/drivers/input/joystick/odroidgo3-joypad.c linux/drivers/input/joystick/odroidgo3-joypad.c
--- linux.orig/drivers/input/joystick/odroidgo3-joypad.c 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/drivers/input/joystick/odroidgo3-joypad.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/input/joystick/odroidgo3-joypad.c 2023-05-30 17:52:02.370732557 +0000 +++ linux/drivers/input/joystick/odroidgo3-joypad.c 2023-08-04 16:55:20.877879413 +0000
@@ -0,0 +1,1086 @@ @@ -0,0 +1,1086 @@
+/* +/*
+ * SARADC joystick & GPIO Button driver for Linux(Hardkernel ODROIDGO2-Advance) + * SARADC joystick & GPIO Button driver for Linux(Hardkernel ODROIDGO2-Advance)
@ -6813,8 +6919,8 @@ diff -rupN linux.orig/drivers/input/joystick/odroidgo3-joypad.c linux/drivers/in
+ +
+/*----------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------*/
diff -rupN linux.orig/drivers/power/supply/rk817_charger.c linux/drivers/power/supply/rk817_charger.c diff -rupN linux.orig/drivers/power/supply/rk817_charger.c linux/drivers/power/supply/rk817_charger.c
--- linux.orig/drivers/power/supply/rk817_charger.c 2023-05-30 16:57:27.007856300 +0000 --- linux.orig/drivers/power/supply/rk817_charger.c 2023-08-03 08:24:19.000000000 +0000
+++ linux/drivers/power/supply/rk817_charger.c 2023-05-30 17:52:02.642741010 +0000 +++ linux/drivers/power/supply/rk817_charger.c 2023-08-04 16:55:20.877879413 +0000
@@ -679,7 +679,7 @@ static enum power_supply_usb_type rk817_ @@ -679,7 +679,7 @@ static enum power_supply_usb_type rk817_
}; };
@ -6826,7 +6932,7 @@ diff -rupN linux.orig/drivers/power/supply/rk817_charger.c linux/drivers/power/s
.num_properties = ARRAY_SIZE(rk817_bat_props), .num_properties = ARRAY_SIZE(rk817_bat_props),
diff -rupN linux.orig/include/linux/input-polldev.h linux/include/linux/input-polldev.h diff -rupN linux.orig/include/linux/input-polldev.h linux/include/linux/input-polldev.h
--- linux.orig/include/linux/input-polldev.h 1970-01-01 00:00:00.000000000 +0000 --- linux.orig/include/linux/input-polldev.h 1970-01-01 00:00:00.000000000 +0000
+++ linux/include/linux/input-polldev.h 2023-05-30 17:52:02.878748343 +0000 +++ linux/include/linux/input-polldev.h 2023-08-04 16:55:20.877879413 +0000
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: GPL-2.0-only */ +/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _INPUT_POLLDEV_H +#ifndef _INPUT_POLLDEV_H

View file

@ -0,0 +1,21 @@
diff --git a/cmd/hwrev.c b/cmd/hwrev.c
index 640397e1cb..f11de075e4 100644
--- a/cmd/hwrev.c
+++ b/cmd/hwrev.c
@@ -34,6 +34,16 @@ int do_hwrev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
env_set("hwrev", "v10-go3");
env_set("dtb_name", "rk3326-odroidgo3-linux.dtb");
}
+ /* RG351V */
+ else if (check_range(490, 540, hwrev_adc)) {
+ env_set("hwrev", "rg351v");
+ env_set("dtb_name", "rk3326-anbernic-rg351v.dtb");
+ }
+ /* RG351MP */
+ else if (check_range(140, 190, hwrev_adc)) {
+ env_set("hwrev", "rg351mp");
+ env_set("dtb_name", "rk3326-anbernic-rg351mp.dtb");
+ }
/* engineer samples */
else {
env_set("hwrev", "v00");