RK3326: Add support for Powkiddy RGB20S handheld

This commit is contained in:
brooksytech 2024-01-30 03:55:37 +00:00 committed by fewtarius
parent bb3649da12
commit b671122eed
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
13 changed files with 2108 additions and 61 deletions

View file

@ -0,0 +1,111 @@
frameskip_type = 2
frameskip_value = 4
safe_frameskip = 0
show_frame_counter = 0
screen_orientation = 0
screen_swap = 0
savestate_number = 0
fast_forward = 0
enable_sound = 1
clock_speed = 0
threaded_3d = 0
mirror_touch = 0
compress_savestates = 1
savestate_snapshot = 1
unzip_roms = 0
preload_roms = 0
backup_in_savestates = 1
ignore_gamecard_limit = 0
frame_interval = 0
trim_roms = 0
fix_main_2d_screen = 0
disable_edge_marking = 0
interframe_blend = 0
hires_3d = 0
use_rtc_custom_time = 0
rtc_custom_time = 0
rtc_system_time = 0
slot2_device_type = 0
rumble_frames = 3
firmware.username = Dr DraStic
firmware.language = 1
firmware.favorite_color = 0
firmware.birthday_month = 1
firmware.birthday_day = 1
enable_cheats = 1
controls_a[CONTROL_INDEX_UP] = 1032
controls_a[CONTROL_INDEX_DOWN] = 1033
controls_a[CONTROL_INDEX_LEFT] = 1034
controls_a[CONTROL_INDEX_RIGHT] = 1035
controls_a[CONTROL_INDEX_A] = 1025
controls_a[CONTROL_INDEX_B] = 1024
controls_a[CONTROL_INDEX_X] = 1026
controls_a[CONTROL_INDEX_Y] = 1027
controls_a[CONTROL_INDEX_L] = 1028
controls_a[CONTROL_INDEX_R] = 1029
controls_a[CONTROL_INDEX_START] = 1037
controls_a[CONTROL_INDEX_SELECT] = 1036
controls_a[CONTROL_INDEX_HINGE] = 65535
controls_a[CONTROL_INDEX_TOUCH_CURSOR_UP] = 1219
controls_a[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 1155
controls_a[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 1218
controls_a[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 1154
controls_a[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 1039
controls_a[CONTROL_INDEX_MENU] = 1038
controls_a[CONTROL_INDEX_SAVE_STATE] = 1031
controls_a[CONTROL_INDEX_LOAD_STATE] = 1030
controls_a[CONTROL_INDEX_FAST_FORWARD] = 65535
controls_a[CONTROL_INDEX_SWAP_SCREENS] = 65535
controls_a[CONTROL_INDEX_SWAP_ORIENTATION_A] = 110
controls_a[CONTROL_INDEX_SWAP_ORIENTATION_B] = 112
controls_a[CONTROL_INDEX_LOAD_GAME] = 65535
controls_a[CONTROL_INDEX_QUIT] = 65535
controls_a[CONTROL_INDEX_FAKE_MICROPHONE] = 65535
controls_a[CONTROL_INDEX_UI_UP] = 1032
controls_a[CONTROL_INDEX_UI_DOWN] = 1033
controls_a[CONTROL_INDEX_UI_LEFT] = 1034
controls_a[CONTROL_INDEX_UI_RIGHT] = 1035
controls_a[CONTROL_INDEX_UI_SELECT] = 1025
controls_a[CONTROL_INDEX_UI_BACK] = 1026
controls_a[CONTROL_INDEX_UI_EXIT] = 1024
controls_a[CONTROL_INDEX_UI_PAGE_UP] = 65535
controls_a[CONTROL_INDEX_UI_PAGE_DOWN] = 65535
controls_a[CONTROL_INDEX_UI_SWITCH] = 65535
controls_b[CONTROL_INDEX_UP] = 1217
controls_b[CONTROL_INDEX_DOWN] = 1153
controls_b[CONTROL_INDEX_LEFT] = 1216
controls_b[CONTROL_INDEX_RIGHT] = 1152
controls_b[CONTROL_INDEX_A] = 65535
controls_b[CONTROL_INDEX_B] = 65535
controls_b[CONTROL_INDEX_X] = 65535
controls_b[CONTROL_INDEX_Y] = 65535
controls_b[CONTROL_INDEX_L] = 65535
controls_b[CONTROL_INDEX_R] = 65535
controls_b[CONTROL_INDEX_START] = 65535
controls_b[CONTROL_INDEX_SELECT] = 65535
controls_b[CONTROL_INDEX_HINGE] = 65535
controls_b[CONTROL_INDEX_TOUCH_CURSOR_UP] = 65535
controls_b[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 65535
controls_b[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 65535
controls_b[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 65535
controls_b[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 65535
controls_b[CONTROL_INDEX_MENU] = 65535
controls_b[CONTROL_INDEX_SAVE_STATE] = 65535
controls_b[CONTROL_INDEX_LOAD_STATE] = 65535
controls_b[CONTROL_INDEX_FAST_FORWARD] = 65535
controls_b[CONTROL_INDEX_SWAP_SCREENS] = 65535
controls_b[CONTROL_INDEX_SWAP_ORIENTATION_A] = 65535
controls_b[CONTROL_INDEX_SWAP_ORIENTATION_B] = 65535
controls_b[CONTROL_INDEX_LOAD_GAME] = 65535
controls_b[CONTROL_INDEX_QUIT] = 65535
controls_b[CONTROL_INDEX_FAKE_MICROPHONE] = 65535
controls_b[CONTROL_INDEX_UI_UP] = 1217
controls_b[CONTROL_INDEX_UI_DOWN] = 1153
controls_b[CONTROL_INDEX_UI_LEFT] = 1216
controls_b[CONTROL_INDEX_UI_RIGHT] = 1152
controls_b[CONTROL_INDEX_UI_SELECT] = 1037
controls_b[CONTROL_INDEX_UI_BACK] = 65535
controls_b[CONTROL_INDEX_UI_EXIT] = 1036
controls_b[CONTROL_INDEX_UI_PAGE_UP] = 65535
controls_b[CONTROL_INDEX_UI_PAGE_DOWN] = 65535
controls_b[CONTROL_INDEX_UI_SWITCH] = 65535

View file

@ -8,3 +8,4 @@
19009b4d4b4800000111000000010000,retrogame_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,
19009321b0c300000002000010000000,XU10 Gamepad,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b16,start:b9,dpleft:b14,dpdown:b13,dpright:b15,dpup:b12,leftshoulder:b4,lefttrigger:b7,rightshoulder:b5,righttrigger:b6,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,
190014b3010000009178000000050000,r33s_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b12,dpdown:b11,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,
1900e5914b4800007711000077010000,RGB20S Gamepad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b12,start:b13,dpleft:b10,dpdown:b9,dpright:b11,dpup:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b14,rightstick:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,

View file

@ -0,0 +1,44 @@
input_driver = "udev"
input_device = "RGB20S Gamepad"
input_device_display_name = "RGB20S Gamepad"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "12"
input_start_btn = "13"
input_a_btn = "1"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_r2_btn = "7"
input_l3_btn = "14"
input_r3_btn = "15"
input_up_btn = "8"
input_down_btn = "9"
input_left_btn = "10"
input_right_btn = "11"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+2"
input_r_x_minus_axis = "-2"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
# Hotkeys
input_enable_hotkey_btn = "12"
input_exit_emulator_btn = "13"
input_menu_toggle_btn = "2"
input_fps_toggle_btn = "3"
input_load_state_btn = "4"
input_save_state_btn = "5"
input_rewind_btn = "6"
input_toggle_fast_forward_btn = "7"

View file

@ -0,0 +1,14 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
cat <<EOF >/storage/.config/profile.d/001-device_config
# Device Features
DEVICE_VOLUMECTL="true"
DEVICE_POWER_LED="false"
DEVICE_PLAYBACK_PATH_SPK="HP"
DEVICE_PLAYBACK_PATH_HP="SPK"
DEVICE_BRIGHTNESS="128"
DEVICE_PWR_LED_GPIO="77"
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
EOF

View file

@ -0,0 +1,15 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
. /etc/profile
# Set export GPIO for Power LED
if [ ! -d "/sys/class/gpio/gpio${DEVICE_PWR_LED_GPIO}" ]; then
echo ${DEVICE_PWR_LED_GPIO} > /sys/class/gpio/export
fi
#Disable blue led on R33S
echo out >/sys/class/gpio/gpio${DEVICE_PWR_LED_GPIO}/direction
echo 1 >/sys/class/gpio/gpio${DEVICE_PWR_LED_GPIO}/value

View file

@ -0,0 +1,65 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2022-present JELOS (https://github.com/JustEnoughLinuxOS)
. /etc/profile
#Set mupen64-plus-sa config for RGB20S, can use same profile as OGS
if [ ! -d "/storage/.config/mupen64plus" ]; then
mkdir -p "/storage/.config/mupen64plus/"
cp -r /usr/local/share/mupen64plus/mupen64plus.cfg* /storage/.config/mupen64plus/
fi
if [ -f "/storage/.config/mupen64plus/mupen64plus.cfg.ogs" ]; then
rm /storage/.config/mupen64plus/mupen64plus.cfg
mv /storage/.config/mupen64plus/mupen64plus.cfg.ogs /storage/.config/mupen64plus/mupen64plus.cfg
fi
#Set drastic-sa config for RGB20S
if [ ! -d "/storage/.config/drastic" ]; then
mkdir -p "/storage/.config/drastic"
cp -r "/usr/config/drastic" "/storage/.config/"
fi
if [ -f "/storage/.config/drastic/config/drastic.cfg.rgb20s" ]; then
rm /storage/.config/drastic/config/drastic.cfg
mv /storage/.config/drastic/config/drastic.cfg.rgb20s /storage/.config/drastic/config/drastic.cfg
fi
#Set up gzdoom
if [ ! -d "/storage/.config/gzdoom/" ]; then
sed -i '/vid_defheight=/c\vid_defheight=640' /storage/.config/gzdoom/gzdoom.ini
sed -i '/vid_defwidth=/c\vid_defwidth=478' /storage/.config/gzdoom/gzdoom.ini
fi
#Map ppsspp controls
if grep RGB20S -q "/storage/.config/ppsspp/PSP/SYSTEM/controls.ini"
then
exit 1
else
cat <<EOF >/storage/.config/ppsspp/PSP/SYSTEM/controls.ini
#RGB20S
[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-4003
An.Down = 10-4002
An.Left = 10-4001
An.Right = 10-4000
Pause = 10-106
Save State = 10-4010
Load State = 10-4008
RightAn.Up = 10-4007
RightAn.Down = 10-4006
RightAn.Left = 10-4005
RightAn.Right = 10-4004
EOF
fi

View file

@ -1311,4 +1311,31 @@
<input name="x" type="button" id="2" value="1" />
<input name="y" type="button" id="3" value="1" />
</inputConfig>
<inputConfig type="joystick" deviceName="RGB20S Gamepad" deviceGUID="1900e5914b4800007711000077010000">
<input name="a" type="button" id="1" value="1" />
<input name="b" type="button" id="0" value="1" />
<input name="down" type="button" id="9" value="1" />
<input name="hotkeyenable" type="button" id="12" value="1" />
<input name="left" type="button" id="10" value="1" />
<input name="leftanalogdown" type="axis" id="1" value="1" />
<input name="leftanalogleft" type="axis" id="0" value="-1" />
<input name="leftanalogright" type="axis" id="0" value="1" />
<input name="leftanalogup" type="axis" id="1" value="-1" />
<input name="leftshoulder" type="button" id="4" value="1" />
<input name="leftthumb" type="button" id="14" value="1" />
<input name="lefttrigger" type="button" id="6" value="1" />
<input name="right" type="button" id="11" value="1" />
<input name="rightanalogdown" type="axis" id="3" value="1" />
<input name="rightanalogleft" type="axis" id="2" value="-1" />
<input name="rightanalogright" type="axis" id="2" value="1" />
<input name="rightanalogup" type="axis" id="3" value="-1" />
<input name="rightshoulder" type="button" id="5" value="1" />
<input name="rightthumb" type="button" id="15" value="1" />
<input name="righttrigger" type="button" id="7" value="1" />
<input name="select" type="button" id="12" value="1" />
<input name="start" type="button" id="13" value="1" />
<input name="up" type="button" id="8" value="1" />
<input name="x" type="button" id="2" value="1" />
<input name="y" type="button" id="3" value="1" />
</inputConfig>
</inputList>

View file

@ -24,7 +24,11 @@ elif test ${hwrev} = 'v10'; then
elif test ${hwrev} = 'rg351v'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-anbernic-rg351v.dtb
elif test ${hwrev} = 'r33s'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-gameconsole-r33s.dtb
if gpio input 11; then
load mmc 1:1 ${dtb_loadaddr} rk3326-powkiddy-rgb20s.dtb
else
load mmc 1:1 ${dtb_loadaddr} rk3326-gameconsole-r33s.dtb
fi
elif test ${hwrev} = 'xu10'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-magicx-xu10.dtb
fi

View file

@ -2175,6 +2175,7 @@ CONFIG_JOYSTICK_ADC=y
CONFIG_JOYSTICK_ODROIDGO2=y
CONFIG_JOYSTICK_ODROIDGO2_V11=y
CONFIG_JOYSTICK_ODROIDGO3=y
CONFIG_JOYSTICK_RGB20S=y
CONFIG_JOYSTICK_XU10=y
# CONFIG_JOYSTICK_SENSEHAT is not set
# CONFIG_INPUT_TABLET is not set

View file

@ -31,7 +31,7 @@
BOOTLOADER="u-boot"
TRUST_LABEL="trust"
PARTITION_TABLE="msdos"
DEVICE_DTB=("rk3326-anbernic-rg351m" "rk3326-anbernic-rg351v" "rk3326-gameconsole-r33s" "rk3326-odroid-go2" "rk3326-odroid-go2-v11" "rk3326-odroid-go3" "rk3326-powkiddy-rgb10" "rk3326-magicx-xu10")
DEVICE_DTB=("rk3326-anbernic-rg351m" "rk3326-anbernic-rg351v" "rk3326-gameconsole-r33s" "rk3326-odroid-go2" "rk3326-odroid-go2-v11" "rk3326-odroid-go3" "rk3326-powkiddy-rgb10" "rk3326-powkiddy-rgb20s" "rk3326-magicx-xu10")
UBOOT_DTB="${DEVICE_DTB[0]}"
UBOOT_CONFIG="odroidgoa_defconfig"
PKG_SOC="px30"

View file

@ -1,7 +1,7 @@
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 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-01-26 00:04:00.800624582 +0000
@@ -9,9 +9,13 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-ro
--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-01-29 06:17:10.562382315 +0000
@@ -9,9 +9,14 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-ro
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb
@ -12,12 +12,13 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-powkiddy-rgb10.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-powkiddy-rgb20s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
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 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-01-25 20:50:16.937337992 +0000
--- linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-01-29 05:08:22.844542450 +0000
@@ -114,32 +114,22 @@
compatible = "operating-points-v2";
opp-shared;
@ -116,8 +117,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
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-25 20:50:16.937337992 +0000
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-29 05:08:22.844542450 +0000
@@ -12,6 +12,25 @@
model = "Anbernic RG351M";
compatible = "anbernic,rg351m", "rockchip,rk3326";
@ -170,7 +171,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts li
+};
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 2024-01-25 20:50:16.937337992 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 2024-01-29 05:08:22.844542450 +0000
@@ -0,0 +1,124 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
@ -298,7 +299,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts li
+};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts 2024-01-28 16:55:43.716341633 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts 2024-01-29 05:08:22.844542450 +0000
@@ -0,0 +1,646 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
@ -948,7 +949,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts l
+};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts linux/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts 2024-01-25 20:50:16.937337992 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts 2024-01-29 05:08:22.844542450 +0000
@@ -0,0 +1,835 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
@ -1786,8 +1787,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts linux/
+ };
+};
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 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-25 20:50:16.937337992 +0000
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-29 05:08:22.844542450 +0000
@@ -25,93 +25,40 @@
compatible = "pwm-backlight";
power-supply = <&vcc_bl>;
@ -1944,8 +1945,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/a
#clock-cells = <1>;
#sound-dai-cells = <0>;
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 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-25 20:50:16.937337992 +0000
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-29 05:08:22.844542450 +0000
@@ -16,31 +16,187 @@
mmc1 = &sdio;
};
@ -2227,8 +2228,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts lin
<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
<2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
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 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-25 20:50:16.937337992 +0000
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-29 05:08:22.844542450 +0000
@@ -12,30 +12,175 @@
model = "ODROID-GO Advance";
compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
@ -2461,8 +2462,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
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-25 20:47:44.834049019 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-25 20:50:16.937337992 +0000
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-29 05:07:30.179290843 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-29 05:08:22.844542450 +0000
@@ -12,67 +12,196 @@
model = "ODROID-GO Super";
compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326";
@ -2772,7 +2773,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/a
};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 2024-01-25 20:50:16.937337992 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 2024-01-29 05:08:22.844542450 +0000
@@ -0,0 +1,280 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
@ -3054,3 +3055,347 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts lin
+ };
+ };
+};
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb20s.dts linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb20s.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb20s.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb20s.dts 2024-01-29 20:21:55.821942737 +0000
@@ -0,0 +1,340 @@
+// 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 = "Powkiddy RGB20S";
+ compatible = "powkiddy,rgb20s", "rockchip,rk3326";
+
+ aliases {
+ mmc0 = &sdio;
+ mmc1 = &sdmmc;
+ };
+
+ 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>;
+ };
+ };
+
+ joypad: rgb20s-joypad {
+ compatible = "rgb20s-joypad";
+
+ pwms = <&pwm0 0 200000000 0>;
+ pwm-names = "enable";
+ rumble-boost-weak = <0x0000>;
+ rumble-boost-strong = <0x0000>;
+
+ joypad-name = "RGB20S Gamepad";
+ joypad-product = <0x1177>;
+ joypad-revision = <0x0177>;
+
+ status = "okay";
+ /*
+ - odroidgo3-joypad sysfs list -
+ * for poll device interval(ms)
+ /sys/devices/platform/odroidgo3_joypad/poll_interval [rw]
+ ex) echo 20 > poll_interval
+ * for button-adc-fuzz
+ /sys/devices/platform/odroidgo3_joypad/adc_fuzz [r]
+ * for button-adc-flat
+ /sys/devices/platform/odroidgo3_joypad/adc_flat [r]
+
+ * for report control(1:enable, 0:disable)
+ /sys/devices/platform/odroidgo3_joypad/enable [rw]
+ * for adc calibration value setup(current adcs value -> cal value)
+ /sys/devices/platform/odroidgo3_joypad/adc_cal [rw]
+ ex) echo 0 > adc_cal
+
+ * for rumble period(ns)
+ /sys/devices/platform/odroidgo3_joypad/rumble_period
+ ex) echo 20000000 > rumble_duty_cycle
+ ex) cat rumble_duty_cycle -->get current duty cycle
+
+ * for rumble boost(0~65535)
+ /sys/devices/platform/odroidgo3_joypad/rumble_boost_weak
+ /sys/devices/platform/odroidgo3_joypad/rumble_boost_strong
+
+ * for amux data debug
+ * Joypad driver is disabled when using this sysfs.
+ /sys/devices/platform/odroidgo3_joypad/amux_debug [rw]
+ ex) echo 0 > amux_debug --> select amux channel
+ ex) cat amux_debug --> get adc data of seleted channel
+ */
+
+ /* gpio pincontrol setup */
+ pinctrl-names = "default";
+ pinctrl-0 = <&btn_pins>;
+ pinctrl-1 = <&pwm0_pin>;
+
+ /* Analog mux define */
+ io-channel-names = "amux_adc";
+ io-channels = <&saradc 1>;
+
+ /* adc mux channel count */
+ amux-count = <4>;
+ /* adc mux select(a,b) gpio */
+ amux-a-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
+ amux-b-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+ /* adc mux enable gpio */
+ amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
+
+ /* adc calculate scale */
+ button-adc-scale = <2>;
+
+ /* adc deadzone range */
+ button-adc-deadzone = <64>;
+
+ /*
+ specifies fuzz value that is used to filter noise from
+ the event stream.
+ */
+ button-adc-fuzz = <32>;
+ button-adc-flat = <32>;
+
+ /*
+ Analog Stick data tuning value(precent)
+ p = positive direction, n = negative direction
+ report value = (real_adc_data * tuning_value) / 100
+ */
+ abs_x-p-tuning = <200>;
+ abs_x-n-tuning = <200>;
+
+ abs_y-p-tuning = <200>;
+ abs_y-n-tuning = <200>;
+
+ abs_rx-p-tuning = <200>;
+ abs_rx-n-tuning = <200>;
+
+ abs_ry-p-tuning = <200>;
+ abs_ry-n-tuning = <200>;
+
+ /* poll device interval (ms), adc read interval */
+ poll-interval = <10>;
+
+ /* required for RG351MP */
+ invert-absx;
+ invert-absy;
+
+ /* gpio button auto repeat set value : default disable */
+ /*
+ autorepeat;
+ */
+
+ /*
+ joypad driver is poll-device driver.
+ poll-device is does not support wakeup-source.
+ */
+ sw1 {
+ gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-UP";
+ linux,code = <BTN_DPAD_UP>; // 0x220
+ };
+ sw2 {
+ gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-DOWN";
+ linux,code = <BTN_DPAD_DOWN>; // 0x221
+ };
+ sw3 {
+ gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-LEFT";
+ linux,code = <BTN_DPAD_LEFT>; // 0x222
+ };
+ sw4 {
+ gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-RIGHT";
+ linux,code = <BTN_DPAD_RIGHT>; // 0x223
+ };
+ sw5 {
+ gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "GPIO KEY BTN-A";
+ linux,code = <BTN_EAST>; // 0x131
+ };
+ sw6 {
+ gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-B";
+ linux,code = <BTN_SOUTH>; // 0x130
+ };
+ sw7 {
+ gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-Y";
+ linux,code = <BTN_WEST>; // 0x134
+ };
+ sw8 {
+ gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-X";
+ linux,code = <BTN_NORTH>; // 0x133
+ };
+ sw11 {
+ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "GPIO F3";
+ linux,code = <BTN_TRIGGER_HAPPY3>; // 0x2c2
+ };
+ sw12 {
+ gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
+ label = "GPIO F4";
+ linux,code = <BTN_TRIGGER_HAPPY4>; // 0x2c3
+ };
+ /*sw13 {
+ gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
+ label = "GPIO F5";
+ linux,code = <BTN_TRIGGER_HAPPY5>; // 0x2c4
+ };
+ sw14 {
+ gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO F6";
+ linux,code = <BTN_TRIGGER_HAPPY6>; // 0x13c
+ };*/
+ sw15 {
+ gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-LEFT";
+ linux,code = <BTN_TL>; // 0x02
+ };
+ sw16 {
+ gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-RIGHT";
+ linux,code = <BTN_TR>; // 0x05
+ };
+ sw19 {
+ gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
+ label = "GPIO F1";
+ linux,code = <BTN_TRIGGER_HAPPY1>;
+ };
+ sw20 {
+ gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-RIGHT2";
+ linux,code = <BTN_TR2>;
+ };
+ sw21 {
+ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-LEFT2";
+ linux,code = <BTN_TL2>;
+ };
+ sw22 {
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "GPIO F2";
+ linux,code = <BTN_TRIGGER_HAPPY2>;
+ };
+ };
+
+ 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>;
+ };
+};
+
+/* conflicts with pwm vibration motor */
+/delete-node/ &vcc_host;
+
+/* Device only has 1 LED compared to Odroid Go Advance */
+/delete-node/ &gpio_led;
+
+&internal_display {
+// compatible = "anbernic,rg351v-panel", "newvision,nv3051d";
+ compatible = "powkiddy,rk2023-panel", "newvision,nv3051d";
+ iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>;
+};
+
+&io_domains {
+ vccio1-supply = <&vccio_sd>;
+};
+
+/delete-node/ &pwm_led;
+
+&pwm0 {
+ status = "okay";
+};
+
+/delete-node/ &pwm3;
+
+&rk817_charger {
+ /* This device does not have a current sense resistor */
+ rockchip,resistor-sense-micro-ohms = <0>;
+ monitored-battery = <&battery>;
+};
+
+&sdio {
+ cap-sd-highspeed;
+ card-detect-delay = <200>;
+ cd-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_sd>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&vcc_sd {
+ regulator-max-microvolt = <3000000>;
+ regulator-min-microvolt = <1800000>;
+};
+
+&vccio_sd {
+ regulator-max-microvolt = <1800000>;
+};
+
+&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>;
+ };
+
+ btn_pins: btn-pins {
+ rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};

View file

@ -1,7 +1,7 @@
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 2024-01-17 03:47:11.674388741 +0000
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-17 04:02:49.500183606 +0000
@@ -107,6 +107,8 @@ static int kd35t133_unprepare(struct drm
--- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-29 19:42:59.344227350 +0000
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-29 19:46:14.500635108 +0000
@@ -109,6 +109,8 @@ static int kd35t133_unprepare(struct drm
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vdd);
@ -11,17 +11,17 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c linux/drivers
return 0;
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 2024-01-17 03:47:11.678388835 +0000
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-17 04:02:49.500183606 +0000
--- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-29 19:42:59.344227350 +0000
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-29 21:01:52.715952484 +0000
@@ -28,6 +28,7 @@ struct nv3051d_panel_info {
unsigned int num_modes;
u16 width_mm, height_mm;
u32 bus_flags;
+ unsigned long mode_flags;
+ u32 mode_flags;
};
struct panel_nv3051d {
@@ -385,15 +386,7 @@ static int panel_nv3051d_probe(struct mi
@@ -387,15 +388,7 @@ static int panel_nv3051d_probe(struct mi
dsi->lanes = 4;
dsi->format = MIPI_DSI_FMT_RGB888;
@ -38,12 +38,24 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs,
DRM_MODE_CONNECTOR_DSI);
@@ -487,10 +480,24 @@ static const struct nv3051d_panel_info n
.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,
@@ -483,16 +476,57 @@ static const struct drm_display_mode nv3
},
};
-static const struct nv3051d_panel_info nv3051d_rgxx3_info = {
+static const struct drm_display_mode nv3051d_rk2023_modes[] = {
+ {
+ .hdisplay = 640,
+ .hsync_start = 640 + 48,
+ .hsync_end = 640 + 48 + 2,
+ .htotal = 640 + 48 + 2 + 47,
+ .vdisplay = 480,
+ .vsync_start = 480 + 2,
+ .vsync_end = 480 + 2 + 4,
+ .vtotal = 480 + 2 + 4 + 3,
+ .clock = 21600,
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+ }
+};
+
+static const struct nv3051d_panel_info nv3051d_rg351v_info = {
@ -54,17 +66,41 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
+ .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 nv3051d_panel_info nv3051d_rg353p_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,
+};
+
+static const struct nv3051d_panel_info nv3051d_rk2023_info = {
+ .display_modes = nv3051d_rk2023_modes,
+ .num_modes = ARRAY_SIZE(nv3051d_rk2023_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[] = {
{ .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info },
- { .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info },
+ { .compatible = "anbernic,rg351v-panel", .data = &nv3051d_rg351v_info },
+ { .compatible = "anbernic,rg353p-panel", .data = &nv3051d_rg353p_info },
+ { .compatible = "powkiddy,rk2023-panel", .data = &nv3051d_rk2023_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match);
--- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-17 13:11:54.938356637 -0500
+++ linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-21 10:26:31.549710031 -0500
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c
--- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-29 19:42:59.348227440 +0000
+++ linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-29 19:46:14.500635108 +0000
@@ -13,7 +13,7 @@
#include <linux/media-bus-format.h>
#include <linux/mod_devicetable.h>