Merge pull request #2902 from brooksytech/dev
Start work on gameforce chi
This commit is contained in:
commit
8e54e54fb1
13 changed files with 2569 additions and 87 deletions
|
@ -0,0 +1,17 @@
|
|||
#!/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_VOLUME="100"
|
||||
DEVICE_BATTERY_LED_STATUS="true"
|
||||
DEVICE_PWR_LED_GPIO="77"
|
||||
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
|
||||
DEVICE_MMC_EJECT="false"
|
||||
EOF
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
/usr/bin/gameforce-chi-gamepad
|
|
@ -0,0 +1,50 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2022-present JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
. /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 RG351M -q "/stprage/.config/ppsspp/PSP/SYSTEM/controls.ini"
|
||||
then
|
||||
exit 1
|
||||
else
|
||||
cat <<EOF >/storage/.config/ppsspp/PSP/SYSTEM/controls.ini
|
||||
#RG351M
|
||||
[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
|
||||
RightAn.Up = 10-4007
|
||||
RightAn.Down = 10-4006
|
||||
RightAn.Left = 10-4005
|
||||
RightAn.Right = 10-4004
|
||||
EOF
|
||||
fi
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
cat <<EOF >/storage/.config/profile.d/050-modifiers
|
||||
DEVICE_FUNC_KEYA_MODIFIER="BTN_THUMBL"
|
||||
DEVICE_FUNC_KEYB_MODIFIER="BTN_THUMBR"
|
||||
EOF
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
#Set dummy key for RG351M/P
|
||||
cat <<EOF >/storage/.config/profile.d/100-jslisten-hotkey
|
||||
BTN_VOLBRIGHT_HOTKEY=16 # Select
|
||||
EOF
|
32
packages/kernel/drivers/RTL8723DS/package.mk
Normal file
32
packages/kernel/drivers/RTL8723DS/package.mk
Normal file
|
@ -0,0 +1,32 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="RTL8723DS"
|
||||
PKG_VERSION="52e593e8c889b68ba58bd51cbdbcad7fe71362e4"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_ARCH="aarch64 x86_64"
|
||||
PKG_SITE="https://github.com/lwfinger/rtl8723ds"
|
||||
PKG_URL="https://github.com/lwfinger/rtl8723ds/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain linux linux kernel-firmware"
|
||||
PKG_NEED_UNPACK="${LINUX_DEPENDS}"
|
||||
PKG_LONGDESC="Realtek RTL81xxEU Linux 3.x driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="make"
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make modules \
|
||||
ARCH=${TARGET_KERNEL_ARCH} \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \
|
||||
CONFIG_POWER_SAVING=y
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/
|
||||
cp *.ko ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless/
|
||||
}
|
|
@ -24,13 +24,12 @@ 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
|
||||
# if gpio input 11; then
|
||||
# load mmc 1:1 ${dtb_loadaddr} rk3326-powkiddy-rgb20s.dtb
|
||||
# else
|
||||
# load mmc 1:1 ${dtb_loadaddr} rk3326-powkiddy-rgb20s.dtb
|
||||
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
|
||||
elif test ${hwrev} = 'chi'; then
|
||||
load mmc 1:1 ${dtb_loadaddr} rk3326-gameforce-chi.dtb
|
||||
fi
|
||||
|
||||
booti ${loadaddr} - ${dtb_loadaddr}
|
||||
|
|
|
@ -2165,6 +2165,7 @@ CONFIG_JOYSTICK_ODROIDGO2_V11=y
|
|||
CONFIG_JOYSTICK_ODROIDGO3=y
|
||||
CONFIG_JOYSTICK_RGB20S=y
|
||||
CONFIG_JOYSTICK_XU10=y
|
||||
CONFIG_JOYSTICK_GAMEFORCE_CHI=y
|
||||
# CONFIG_JOYSTICK_SENSEHAT is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
|
|
|
@ -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-gameconsole-r36s" "rk3326-odroid-go2" "rk3326-odroid-go2-v11" "rk3326-odroid-go3" "rk3326-powkiddy-rgb10" "rk3326-powkiddy-rgb20s" "rk3326-magicx-xu10")
|
||||
DEVICE_DTB=("rk3326-anbernic-rg351m" "rk3326-anbernic-rg351v" "rk3326-gameconsole-r33s" "rk3326-gameconsole-r36s" "rk3326-gameforce-chi" "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"
|
||||
|
@ -84,7 +84,7 @@
|
|||
# for a list of additional drivers see packages/linux-drivers
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS="RTL8812AU RTL8814AU RTL8821AU RTL8821CU RTL88x2BU"
|
||||
ADDITIONAL_DRIVERS="RTL8812AU RTL8814AU RTL8821AU RTL8821CU RTL88x2BU RTL8723DS"
|
||||
|
||||
# build and install driver addons (yes / no)
|
||||
DRIVER_ADDONS_SUPPORT="no"
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-02-03 14:49:01.857898202 +0000
|
||||
@@ -9,9 +9,15 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-ro
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-02-17 06:35:22.915906533 +0000
|
||||
@@ -9,9 +9,16 @@ 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
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351v.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-gameconsole-r33s.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-gameconsole-r36s.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-gameforce-chi.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-magicx-xu10.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb
|
||||
|
@ -18,8 +19,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-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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-02-03 14:25:41.221185291 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -114,32 +114,22 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
@ -118,8 +119,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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-02-03 14:25:41.221185291 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -12,6 +12,25 @@
|
||||
model = "Anbernic RG351M";
|
||||
compatible = "anbernic,rg351m", "rockchip,rk3326";
|
||||
|
@ -172,7 +173,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-02-03 14:25:41.221185291 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -0,0 +1,124 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -300,7 +301,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-02-03 14:53:29.435899433 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r33s.dts 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -0,0 +1,117 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -421,7 +422,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-gameconsole-r36s.dts linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r36s.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r36s.dts 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r36s.dts 2024-02-03 14:56:33.563329307 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r36s.dts 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -0,0 +1,207 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -632,7 +633,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r36s.dts l
|
|||
+};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r3xs.dtsi linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r3xs.dtsi
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r3xs.dtsi 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r3xs.dtsi 2024-02-03 14:46:31.754519839 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r3xs.dtsi 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -0,0 +1,545 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -1179,9 +1180,828 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameconsole-r3xs.dtsi
|
|||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameforce-chi.dts linux/arch/arm64/boot/dts/rockchip/rk3326-gameforce-chi.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-gameforce-chi.dts 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-gameforce-chi.dts 2024-02-17 06:34:23.866426919 +0000
|
||||
@@ -0,0 +1,815 @@
|
||||
+// 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>
|
||||
+ * Copyright (c) 2024 Batocera https://github.com/batocera-linux/batocera.linux/blob/master/board/batocera/rockchip/rk3326/linux_patches/0002-rk3326-gameforce-dts.patch
|
||||
+ * Copyright (c) 2024 Juliano Dorigão <jdorigao@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include "rk3326.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Gameforce CHI";
|
||||
+ compatible = "gameforce,chi", "rockchip,rk3326";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ backlight: backlight {
|
||||
+ compatible = "pwm-backlight";
|
||||
+ power-supply = <&vcc_bl>;
|
||||
+ pwms = <&pwm1 0 25000 0>;
|
||||
+ brightness-levels = <
|
||||
+ 0 1 2 3 4 5 6 7
|
||||
+ 8 9 10 11 12 13 14 15
|
||||
+ 16 17 18 19 20 21 22 23
|
||||
+ 24 25 26 27 28 29 30 31
|
||||
+ 32 33 34 35 36 37 38 39
|
||||
+ 40 41 42 43 44 45 46 47
|
||||
+ 48 49 50 51 52 53 54 55
|
||||
+ 56 57 58 59 60 61 62 63
|
||||
+ 64 65 66 67 68 69 70 71
|
||||
+ 72 73 74 75 76 77 78 79
|
||||
+ 80 81 82 83 84 85 86 87
|
||||
+ 88 89 90 91 92 93 94 95
|
||||
+ 96 97 98 99 100 101 102 103
|
||||
+ 104 105 106 107 108 109 110 111
|
||||
+ 112 113 114 115 116 117 118 119
|
||||
+ 120 121 122 123 124 125 126 127
|
||||
+ 128 129 130 131 132 133 134 135
|
||||
+ 136 137 138 139 140 141 142 143
|
||||
+ 144 145 146 147 148 149 150 151
|
||||
+ 152 153 154 155 156 157 158 159
|
||||
+ 160 161 162 163 164 165 166 167
|
||||
+ 168 169 170 171 172 173 174 175
|
||||
+ 176 177 178 179 180 181 182 183
|
||||
+ 184 185 186 187 188 189 190 191
|
||||
+ 192 193 194 195 196 197 198 199
|
||||
+ 200 201 202 203 204 205 206 207
|
||||
+ 208 209 210 211 212 213 214 215
|
||||
+ 216 217 218 219 220 221 222 223
|
||||
+ 224 225 226 227 228 229 230 231
|
||||
+ 232 233 234 235 236 237 238 239
|
||||
+ 240 241 242 243 244 245 246 247
|
||||
+ 248 249 250 251 252 253 254 255>;
|
||||
+ default-brightness-level = <200>;
|
||||
+ };
|
||||
+
|
||||
+ adc-keys {
|
||||
+ compatible = "volume-keys";
|
||||
+ keyup-threshold-microvolt = <1800000>;
|
||||
+
|
||||
+ happy1-key {
|
||||
+ linux,code = <BTN_TRIGGER_HAPPY1>;
|
||||
+ label = "volume down";
|
||||
+ press-threshold-microvolt = <15000>;
|
||||
+ };
|
||||
+
|
||||
+ happy2-key {
|
||||
+ linux,code = <BTN_TRIGGER_HAPPY2>;
|
||||
+ label = "volume up";
|
||||
+ press-threshold-microvolt = <300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vibrators {
|
||||
+ compatible = "gpio,vibrators";
|
||||
+ vibrator0-gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
+ vibrator1-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ joypad: gameforce-gamepad {
|
||||
+ compatible = "gameforce-gamepad";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&btn_pins>;
|
||||
+
|
||||
+ io-channel-names = "joy_x", "joy_y", "volume-buttons";
|
||||
+ io-channels = <&saradc 0>, <&saradc 1>, <&saradc 2>;
|
||||
+
|
||||
+ button-adc-count = <2>;
|
||||
+ button-adc-scale = <2>;
|
||||
+ button-adc-deadzone = <20>;
|
||||
+
|
||||
+ button-adc-x-range = <1800>;
|
||||
+ button-adc-y-range = <1800>;
|
||||
+
|
||||
+ button-adc-fuzz = <32>;
|
||||
+ button-adc-flat = <32>;
|
||||
+
|
||||
+ poll-interval = <10>;
|
||||
+
|
||||
+ button-sw1 {
|
||||
+ gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
|
||||
+ label = "DPAD-UP";
|
||||
+ linux,code = <BTN_DPAD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw2 {
|
||||
+ gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
+ label = "DPAD-DOWN";
|
||||
+ linux,code = <BTN_DPAD_DOWN>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw3 {
|
||||
+ gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
|
||||
+ label = "DPAD-LEFT";
|
||||
+ linux,code = <BTN_DPAD_LEFT>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw4 {
|
||||
+ gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ label = "DPAD-RIGHT";
|
||||
+ linux,code = <BTN_DPAD_RIGHT>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw5 {
|
||||
+ gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-A";
|
||||
+ linux,code = <BTN_EAST>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw6 {
|
||||
+ gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-B";
|
||||
+ linux,code = <BTN_SOUTH>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw7 {
|
||||
+ gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-Y";
|
||||
+ linux,code = <BTN_WEST>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw8 {
|
||||
+ gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-X";
|
||||
+ linux,code = <BTN_NORTH>;
|
||||
+ };
|
||||
+
|
||||
+ btn_home: button-sw9 {
|
||||
+ gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-HOME";
|
||||
+ linux,code = <BTN_TRIGGER_HAPPY3>;
|
||||
+ };
|
||||
+
|
||||
+ btn_select: button-sw10 {
|
||||
+ gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-SET";
|
||||
+ linux,code = <BTN_SELECT>;
|
||||
+ };
|
||||
+
|
||||
+ btn_start: button-sw11 {
|
||||
+ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
+ label = "BTN-START";
|
||||
+ linux,code = <BTN_START>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw12 {
|
||||
+ gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
|
||||
+ label = "TOP-LEFT";
|
||||
+ linux,code = <BTN_TL>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw13 {
|
||||
+ gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ label = "TOP-LEFT2";
|
||||
+ linux,code = <BTN_TL2>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw14 {
|
||||
+ gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ label = "TOP-RIGHT";
|
||||
+ linux,code = <BTN_TR>;
|
||||
+ };
|
||||
+
|
||||
+ button-sw15 {
|
||||
+ gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
|
||||
+ label = "TOP-RIGHT2";
|
||||
+ linux,code = <BTN_TR2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds: gpio_leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "led_pins";
|
||||
+ pinctrl-0 = <&led_pins>;
|
||||
+
|
||||
+ heartbeat {
|
||||
+ label = "heartbeat";
|
||||
+ gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+
|
||||
+ red {
|
||||
+ label = "red";
|
||||
+ gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ green {
|
||||
+ label = "green";
|
||||
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ blue {
|
||||
+ label = "blue";
|
||||
+ gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk817-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "rk817_ext";
|
||||
+ simple-audio-card,aux-devs = <&spk_amp>;
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Microphone", "Mic Jack",
|
||||
+ "Headphone", "Headphones",
|
||||
+ "Speaker", "Internal Speakers";
|
||||
+ simple-audio-card,routing =
|
||||
+ "MICL", "Mic Jack",
|
||||
+ "Headphones", "HPOL",
|
||||
+ "Headphones", "HPOR",
|
||||
+ "Internal Speakers", "Speaker Amp OUTL",
|
||||
+ "Internal Speakers", "Speaker Amp OUTR",
|
||||
+ "Speaker Amp INL", "HPOL",
|
||||
+ "Speaker Amp INR", "HPOR";
|
||||
+ simple-audio-card,pin-switches = "Internal Speakers";
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&rk817>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s1_2ch>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spk_amp: audio-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-0 = <&spk_amp_enable_h>;
|
||||
+ pinctrl-names = "default";
|
||||
+ sound-name-prefix = "Speaker Amp";
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_pwrseq_pins>;
|
||||
+ reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ battery: battery {
|
||||
+ compatible = "simple-battery";
|
||||
+ charge-full-design-microamp-hours = <3000000>;
|
||||
+ charge-term-current-microamp = <300000>;
|
||||
+ constant-charge-current-max-microamp = <1500000>;
|
||||
+ constant-charge-voltage-max-microvolt = <4200000>;
|
||||
+ factory-internal-resistance-micro-ohms = <180000>;
|
||||
+ voltage-max-design-microvolt = <4100000>;
|
||||
+ voltage-min-design-microvolt = <3400000>;
|
||||
+
|
||||
+ 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>;
|
||||
+ };
|
||||
+
|
||||
+ vccsys: vccsys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v8_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3800000>;
|
||||
+ regulator-max-microvolt = <3800000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_host: vcc_host {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_host";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+
|
||||
+ gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&usb_midu>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cru {
|
||||
+ assigned-clocks = <&cru PLL_NPLL>,
|
||||
+ <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
|
||||
+ <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
|
||||
+ <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>;
|
||||
+
|
||||
+ assigned-clock-rates = <1188000000>,
|
||||
+ <200000000>, <200000000>,
|
||||
+ <150000000>, <150000000>,
|
||||
+ <100000000>, <200000000>;
|
||||
+};
|
||||
+
|
||||
+&display_subsystem {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dsi {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ mipi_out: port@1 {
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ mipi_out_panel: endpoint {
|
||||
+ remote-endpoint = <&mipi_in_panel>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ internal_display: panel@0 {
|
||||
+ compatible = "gameforce,chi-panel";
|
||||
+ reg = <0>;
|
||||
+ backlight = <&backlight>;
|
||||
+ reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
+ rotation = <0>;
|
||||
+ iovcc-supply = <&vcc_lcd>;
|
||||
+ vdd-supply = <&vcc_lcd>;
|
||||
+
|
||||
+ port {
|
||||
+ mipi_in_panel: endpoint {
|
||||
+ remote-endpoint = <&mipi_out_panel>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&dsi_dphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&emmc {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&sfc {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_logic>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-falling-time-ns = <16>;
|
||||
+ i2c-scl-rising-time-ns = <280>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk817: pmic@20 {
|
||||
+ compatible = "rockchip,rk817";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru SCLK_I2S1_OUT>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+ #clock-cells = <1>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+
|
||||
+ vcc1-supply = <&vccsys>;
|
||||
+ vcc2-supply = <&vccsys>;
|
||||
+ vcc3-supply = <&vccsys>;
|
||||
+ vcc4-supply = <&vccsys>;
|
||||
+ vcc5-supply = <&vccsys>;
|
||||
+ vcc6-supply = <&vccsys>;
|
||||
+ vcc7-supply = <&vcc_3v0>;
|
||||
+ vcc8-supply = <&vccsys>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-min-microvolt = <950000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <950000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_arm: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_arm";
|
||||
+ regulator-min-microvolt = <950000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <950000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v0: DCDC_REG4 {
|
||||
+ regulator-name = "vcc_3v0";
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: LDO_REG2 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_1v0: LDO_REG3 {
|
||||
+ regulator-name = "vdd_1v0";
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_pmu: LDO_REG4 {
|
||||
+ regulator-name = "vcc3v0_pmu";
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: LDO_REG6 {
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_bl: LDO_REG7 {
|
||||
+ regulator-name = "vcc_bl";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_lcd: LDO_REG8 {
|
||||
+ regulator-name = "vcc_lcd";
|
||||
+ regulator-min-microvolt = <2800000>;
|
||||
+ regulator-max-microvolt = <2800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <2800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ LDO_REG9 {
|
||||
+ /* unused */
|
||||
+ };
|
||||
+
|
||||
+ usb_midu: BOOST {
|
||||
+ regulator-name = "usb_midu";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5400000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk817_charger: charger {
|
||||
+ rockchip,resistor-sense-micro-ohms = <10000>;
|
||||
+ rockchip,sleep-enter-current-microamp = <300000>;
|
||||
+ rockchip,sleep-filter-current-microamp = <100000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+/* MIPI CSI I2C */
|
||||
+&i2c2 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+/* I2S 1 Channel Used */
|
||||
+&i2s1_2ch {
|
||||
+ status = "okay";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ vccio1-supply = <&vcc3v0_pmu>;
|
||||
+ vccio2-supply = <&vccio_sd>;
|
||||
+ vccio3-supply = <&vcc_3v0>;
|
||||
+ vccio4-supply = <&vcc_3v0>;
|
||||
+ vccio5-supply = <&vcc_3v0>;
|
||||
+ vccio6-supply = <&vcc_3v0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&isp_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc_1v8>;
|
||||
+ pmuio2-supply = <&vcc3v0_pmu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ supports-sd;
|
||||
+ card-detect-delay = <800>;
|
||||
+ ignore-pm-notify;
|
||||
+ cd-gpios = <&gpio0 RK_PA3 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";
|
||||
+};
|
||||
+
|
||||
+&sdio {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ disable-wp;
|
||||
+ supports-sdio;
|
||||
+ ignore-pm-notify;
|
||||
+ keep-power-in-suspend;
|
||||
+ non-removable;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rtl8723ds: wifi@1 {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi_chip_type = "realtek,rtl8723ds";
|
||||
+ WIFI,host_wake_irq = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ sdio_vref = <3300>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>;
|
||||
+ pinctrl-names = "default";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <108000000>;
|
||||
+ spi-rx-bus-width = <2>;
|
||||
+ spi-tx-bus-width = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ u2phy_host: host-port {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ u2phy_otg: otg-port {
|
||||
+ status = "disable";
|
||||
+ };
|
||||
+};
|
||||
+/*
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+*/
|
||||
+/* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_xfer &uart1_cts>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart2m1_xfer>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&rk817_charger {
|
||||
+ monitored-battery = <&battery>;
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ btns {
|
||||
+ 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>,
|
||||
+ <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <2 RK_PA0 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ audio-amplifier {
|
||||
+ spk_amp_enable_h: spk-amp-enable-h {
|
||||
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ headphone {
|
||||
+ hp_det: hp-det {
|
||||
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led_pins: led-pins {
|
||||
+ rockchip,pins = <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ dc_det: dc-det {
|
||||
+ rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ pmic_int: pmic-int {
|
||||
+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ soc_slppin_gpio: soc_slppin_gpio {
|
||||
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
|
||||
+ };
|
||||
+
|
||||
+ soc_slppin_rst: soc_slppin_rst {
|
||||
+ rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ soc_slppin_slp: soc_slppin_slp {
|
||||
+ rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ wifi_pwrseq_pins: wifi-pwrseq-pins {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
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-02-03 14:25:41.221185291 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts 2024-02-17 06:32:20.483322663 +0000
|
||||
@@ -0,0 +1,828 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -2012,8 +2832,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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-02-03 14:25:41.221185291 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-02-17 06:32:20.487322762 +0000
|
||||
@@ -25,93 +25,40 @@
|
||||
compatible = "pwm-backlight";
|
||||
power-supply = <&vcc_bl>;
|
||||
|
@ -2170,8 +2990,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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-02-03 14:25:41.221185291 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-02-17 06:32:20.487322762 +0000
|
||||
@@ -16,31 +16,187 @@
|
||||
mmc1 = &sdio;
|
||||
};
|
||||
|
@ -2453,8 +3273,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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-02-03 14:25:41.221185291 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-02-17 06:32:20.487322762 +0000
|
||||
@@ -12,30 +12,175 @@
|
||||
model = "ODROID-GO Advance";
|
||||
compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
|
||||
|
@ -2687,8 +3507,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-02-03 14:24:30.507369024 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-02-03 14:25:41.221185291 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-02-15 14:44:49.334307319 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-02-17 06:32:20.487322762 +0000
|
||||
@@ -12,67 +12,196 @@
|
||||
model = "ODROID-GO Super";
|
||||
compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326";
|
||||
|
@ -2998,7 +3818,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-02-03 14:25:41.221185291 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 2024-02-17 06:32:20.487322762 +0000
|
||||
@@ -0,0 +1,280 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -3282,7 +4102,7 @@ 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-02-03 14:25:41.221185291 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb20s.dts 2024-02-17 06:32:20.487322762 +0000
|
||||
@@ -0,0 +1,340 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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-29 19:42:59.344227350 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-29 19:46:14.500635108 +0000
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-02-15 14:44:51.546356020 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-02-15 15:05:47.414681181 +0000
|
||||
@@ -109,6 +109,8 @@ static int kd35t133_unprepare(struct drm
|
||||
regulator_disable(ctx->iovcc);
|
||||
regulator_disable(ctx->vdd);
|
||||
|
@ -11,8 +11,8 @@ 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-29 19:42:59.344227350 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-29 21:01:52.715952484 +0000
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-02-15 14:44:51.550356106 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-02-15 15:05:47.414681181 +0000
|
||||
@@ -28,6 +28,7 @@ struct nv3051d_panel_info {
|
||||
unsigned int num_modes;
|
||||
u16 width_mm, height_mm;
|
||||
|
@ -99,8 +99,8 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
|
|||
};
|
||||
MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match);
|
||||
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
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-02-15 14:44:51.554356195 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-02-15 15:10:41.576698949 +0000
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <linux/media-bus-format.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
@ -334,7 +334,193 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35,
|
||||
0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12,
|
||||
0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41,
|
||||
@@ -341,7 +361,15 @@ static const struct st7703_panel_desc xb
|
||||
@@ -333,6 +353,185 @@ static const struct drm_display_mode xbd
|
||||
.height_mm = 136,
|
||||
};
|
||||
|
||||
+
|
||||
+// Copyright (C) Batocera (https://github.com/batocera-linux/batocera.linux/blob/master/board/batocera/rockchip/rk3326/linux_patches/0001-gameforce-panel-st7703.patch)
|
||||
+static int gameforce_init_sequence(struct st7703 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ /*
|
||||
+ * Init sequence was supplied by the panel vendor.
|
||||
+ */
|
||||
+
|
||||
+ /* Magic sequence to unlock user commands below. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xF1, 0x12, 0x83);
|
||||
+ msleep(20);
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
|
||||
+ 0x31, /* VC_main = 0, Lane_Number = 3 (4 lanes) */
|
||||
+ 0x81, /* DSI_LDO_SEL = 1.7V, RTERM = 90 Ohm */
|
||||
+ 0x05, /* IHSRX = x6 (Low High Speed driving ability) */
|
||||
+ 0xF9, /* TX_CLK_SEL = fDSICLK/16 */
|
||||
+ 0x0E, /* HFP_OSC (min. HFP number in DSI mode) */
|
||||
+ 0x0E, /* HBP_OSC (min. HBP number in DSI mode) */
|
||||
+ /* The rest is undocumented in ST7703 datasheet */
|
||||
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x44, 0x25, 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02,
|
||||
+ 0x4F, 0xD1, 0x00, 0x00, 0x37);
|
||||
+
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25); /* PCCS = 2, ECP_DC_DIV = 1/4 HSYNC */
|
||||
+
|
||||
+ /* Undocumented command. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+
|
||||
+ /* RGB I/F porch timing */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
+ 0x0C, /* VBP_RGB_GEN */
|
||||
+ 0x10, /* VFP_RGB_GEN */
|
||||
+ 0x0A, /* DE_BP_RGB_GEN */
|
||||
+ 0x50, /* DE_FP_RGB_GEN */
|
||||
+ /* The rest is undocumented in ST7703 datasheet */
|
||||
+ 0x03, 0xFF,
|
||||
+ 0x00, 0x00,
|
||||
+ 0x00, 0x00);
|
||||
+
|
||||
+ /* Source driving settings. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
+ 0x73, /* N_POPON */
|
||||
+ 0x73, /* N_NOPON */
|
||||
+ 0x50, /* I_POPON */
|
||||
+ 0x50, /* I_NOPON */
|
||||
+ 0x00, /* SCR[31,24] */
|
||||
+ 0x00, /* SCR[23,16] */
|
||||
+ 0x08, /* SCR[15,8] */
|
||||
+ 0x70, /* SCR[7,0] */
|
||||
+ 0x00 /* Undocumented */);
|
||||
+
|
||||
+ /* NVDDD_SEL = -1.8V, VDDD_SEL = out of range (possibly 1.9V?) */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x46);
|
||||
+
|
||||
+ /*
|
||||
+ * SS_PANEL = 1 (reverse scan), GS_PANEL = 0 (normal scan)
|
||||
+ * REV_PANEL = 1 (normally black panel), BGR_PANEL = 1 (BGR)
|
||||
+ */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
+
|
||||
+ /* Zig-Zag Type C column inversion. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+
|
||||
+ /* Set display resolution. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP,
|
||||
+ 0x00, /* NL = 480 */
|
||||
+ 0x13, /* RES_V_LSB = 0, BLK_CON = VSSD,
|
||||
+ * RESO_SEL = 720RGB
|
||||
+ */
|
||||
+ 0xF0 /* WHITE_GND_EN = 1 (GND),
|
||||
+ * WHITE_FRAME_SEL = 7 frames,
|
||||
+ * ISC = 0 frames
|
||||
+ */);
|
||||
+
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
+ 0x07, /* PNOEQ */
|
||||
+ 0x07, /* NNOEQ */
|
||||
+ 0x0B, /* PEQGND */
|
||||
+ 0x0B, /* NEQGND */
|
||||
+ 0x03, /* PEQVCI */
|
||||
+ 0x0B, /* NEQVCI */
|
||||
+ 0x00, /* PEQVCI1 */
|
||||
+ 0x00, /* NEQVCI1 */
|
||||
+ 0x00, /* reserved */
|
||||
+ 0x00, /* reserved */
|
||||
+ 0xFF, /* reserved */
|
||||
+ 0x00, /* reserved */
|
||||
+ 0xC0, /* ESD_DET_DATA_WHITE = 1, ESD_WHITE_EN = 1 */
|
||||
+ 0x10 /* SLPIN_OPTION = 1 (no need vsync after sleep-in)
|
||||
+ * VEDIO_NO_CHECK_EN = 0
|
||||
+ * ESD_WHITE_GND_EN = 0
|
||||
+ * ESD_DET_TIME_SEL = 0 frames
|
||||
+ */);
|
||||
+
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
|
||||
+ 0x53, /* VBTHS, VBTLS: VGH = 17V, VBL = -11V */
|
||||
+ 0x00, /* FBOFF_VGH = 0, FBOFF_VGL = 0 */
|
||||
+ 0x1E, /* VRP */
|
||||
+ 0x1E, /* VRN */
|
||||
+ 0x77, /* reserved */
|
||||
+ 0xE1, /* APS = 1 (small),
|
||||
+ * VGL_DET_EN = 1, VGH_DET_EN = 1,
|
||||
+ * VGL_TURBO = 1, VGH_TURBO = 1
|
||||
+ */
|
||||
+ 0xCC, /* VGH1_L_DIV, VGL1_L_DIV (1.5MHz) */
|
||||
+ 0xDD, /* VGH1_R_DIV, VGL1_R_DIV (1.5MHz) */
|
||||
+ 0x67, /* VGH2_L_DIV, VGL2_L_DIV (2.6MHz) */
|
||||
+ 0x77, /* VGH2_R_DIV, VGL2_R_DIV (2.6MHz) */
|
||||
+ 0x33, /* VGH3_L_DIV, VGL3_L_DIV (4.5MHz) */
|
||||
+ 0x33 /* VGH3_R_DIV, VGL3_R_DIV (4.5MHz) */);
|
||||
+
|
||||
+ /* Reference voltage. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP,
|
||||
+ 0x10, /* VREF_SEL = 4.2V */
|
||||
+ 0x10 /* NVREF_SEL = 4.2V */);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM,
|
||||
+ 0x6C, /* VCOMDC_F = -0.67V */
|
||||
+ 0x7C /* VCOMDC_B = -0.67V */);
|
||||
+
|
||||
+ /* This command is to set forward GIP timing. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
+ 0x08, 0x00, 0x0E, 0x00, 0x00, 0xB0, 0xB1, 0x11,
|
||||
+ 0x31, 0x23, 0x28, 0x10, 0xB0, 0xB1, 0x27, 0x08,
|
||||
+ 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04,
|
||||
+ 0x02, 0x00, 0x00, 0x00, 0x88, 0x88, 0xBA, 0x60,
|
||||
+ 0x24, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x88, 0xBA, 0x71, 0x35, 0x18, 0x88, 0x88, 0x88,
|
||||
+ 0x88, 0x88, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
+
|
||||
+ /* This command is to set backward GIP timing. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
+ 0x97, 0x0A, 0x82, 0x02, 0x13, 0x07, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x88, 0xBA, 0x17,
|
||||
+ 0x53, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x81,
|
||||
+ 0x88, 0xBA, 0x06, 0x42, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x88, 0x88, 0x23, 0x10, 0x00, 0x02, 0x80, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
+
|
||||
+ /* Adjust the gamma characteristics of the panel. */
|
||||
+ mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
+ 0x00, 0x07, 0x0B, 0x27, 0x2D, 0x3F, 0x3B, 0x37,
|
||||
+ 0x05, 0x0A, 0x0B, 0x0F, 0x11, 0x0F, 0x12, 0x12,
|
||||
+ 0x18, 0x00, 0x07, 0x0B, 0x27, 0x2D, 0x3F, 0x3B,
|
||||
+ 0x37, 0x05, 0x0A, 0x0B, 0x0F, 0x11, 0x0F, 0x12,
|
||||
+ 0x12, 0x18);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_display_mode gameforce_mode = {
|
||||
+ .hdisplay = 640,
|
||||
+ .hsync_start = 640 + 120,
|
||||
+ .hsync_end = 640 + 120 + 120,
|
||||
+ .htotal = 640 + 120 + 120 + 120,
|
||||
+ .vdisplay = 480,
|
||||
+ .vsync_start = 480 + 13,
|
||||
+ .vsync_end = 480 + 13 + 17,
|
||||
+ .vtotal = 480 + 13 + 17 + 5,
|
||||
+ .clock = 30900,
|
||||
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+ .width_mm = 53,
|
||||
+ .height_mm = 71,
|
||||
+};
|
||||
+
|
||||
+static const struct st7703_panel_desc gameforce_desc = {
|
||||
+ .mode = &gameforce_mode,
|
||||
+ .lanes = 2,
|
||||
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM /*| MIPI_DSI_MODE_EOT_PACKET*/,
|
||||
+ .format = MIPI_DSI_FMT_RGB888,
|
||||
+ .init_sequence = gameforce_init_sequence,
|
||||
+};
|
||||
+
|
||||
static const struct st7703_panel_desc xbd599_desc = {
|
||||
.mode = &xbd599_mode,
|
||||
.lanes = 4,
|
||||
@@ -341,7 +540,15 @@ static const struct st7703_panel_desc xb
|
||||
.init_sequence = xbd599_init_sequence,
|
||||
};
|
||||
|
||||
|
@ -351,7 +537,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
||||
@@ -349,44 +377,44 @@ static int rg353v2_init_sequence(struct
|
||||
@@ -349,44 +556,44 @@ static int rg353v2_init_sequence(struct
|
||||
* Init sequence was supplied by the panel vendor.
|
||||
*/
|
||||
|
||||
|
@ -416,7 +602,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
0x00, 0xb0, 0xb1, 0x11, 0x31, 0x23, 0x28, 0x80,
|
||||
0xb0, 0xb1, 0x27, 0x08, 0x00, 0x04, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00,
|
||||
@@ -395,7 +423,7 @@ static int rg353v2_init_sequence(struct
|
||||
@@ -395,7 +602,7 @@ static int rg353v2_init_sequence(struct
|
||||
0x18, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00);
|
||||
|
@ -425,7 +611,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x81, 0x88, 0xba, 0x17, 0x53, 0x88, 0x88, 0x88,
|
||||
0x88, 0x88, 0x88, 0x80, 0x88, 0xba, 0x06, 0x42,
|
||||
@@ -404,12 +432,12 @@ static int rg353v2_init_sequence(struct
|
||||
@@ -404,12 +611,12 @@ static int rg353v2_init_sequence(struct
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00);
|
||||
|
@ -440,7 +626,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
.hdisplay = 640,
|
||||
.hsync_start = 640 + 40,
|
||||
.hsync_end = 640 + 40 + 2,
|
||||
@@ -424,15 +452,210 @@ static const struct drm_display_mode rg3
|
||||
@@ -424,15 +631,210 @@ static const struct drm_display_mode rg3
|
||||
.height_mm = 57,
|
||||
};
|
||||
|
||||
|
@ -448,13 +634,14 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
- .mode = &rg353v2_mode,
|
||||
+static const struct st7703_panel_desc rg351v2_desc = {
|
||||
+ .mode = &rg351v2_mode,
|
||||
+ .lanes = 4,
|
||||
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
+ MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM,
|
||||
+ .format = MIPI_DSI_FMT_RGB888,
|
||||
.lanes = 4,
|
||||
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM,
|
||||
.format = MIPI_DSI_FMT_RGB888,
|
||||
- .init_sequence = rg353v2_init_sequence,
|
||||
+ .init_sequence = rg351v2_init_sequence,
|
||||
+};
|
||||
+
|
||||
};
|
||||
|
||||
+static int xu10_init_sequence(struct st7703 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
@ -542,14 +729,13 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
+
|
||||
+static const struct st7703_panel_desc xu10_desc = {
|
||||
+ .mode = &xu10_mode,
|
||||
.lanes = 4,
|
||||
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM,
|
||||
.format = MIPI_DSI_FMT_RGB888,
|
||||
- .init_sequence = rg353v2_init_sequence,
|
||||
+ .lanes = 4,
|
||||
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
+ MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM,
|
||||
+ .format = MIPI_DSI_FMT_RGB888,
|
||||
+ .init_sequence = xu10_init_sequence,
|
||||
};
|
||||
|
||||
+};
|
||||
+
|
||||
+static int r36s_init_sequence(struct st7703 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
@ -654,7 +840,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
static int rgb30panel_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
@@ -446,31 +669,31 @@ static int rgb30panel_init_sequence(stru
|
||||
@@ -446,31 +848,31 @@ static int rgb30panel_init_sequence(stru
|
||||
mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
msleep(250);
|
||||
|
||||
|
@ -701,7 +887,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
0x0f, 0xa1, 0x80, 0x12, 0x31, 0x23, 0x47, 0x86,
|
||||
0xa1, 0x80, 0x47, 0x08, 0x00, 0x00, 0x0d, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
|
||||
@@ -479,7 +702,7 @@ static int rgb30panel_init_sequence(stru
|
||||
@@ -479,7 +881,7 @@ static int rgb30panel_init_sequence(stru
|
||||
0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00);
|
||||
|
@ -710,7 +896,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
0x01, 0x78, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x4f, 0x31, 0x8b, 0xa8, 0x31, 0x75, 0x88, 0x88,
|
||||
0x88, 0x88, 0x88, 0x4f, 0x20, 0x8b, 0xa8, 0x20,
|
||||
@@ -488,7 +711,7 @@ static int rgb30panel_init_sequence(stru
|
||||
@@ -488,7 +890,7 @@ static int rgb30panel_init_sequence(stru
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x40, 0xa1, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00);
|
||||
|
@ -719,7 +905,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
0x29, 0x3b, 0x3f, 0x42, 0x39, 0x06, 0x0d, 0x10,
|
||||
0x13, 0x15, 0x14, 0x15, 0x10, 0x17, 0x00, 0x0a,
|
||||
0x0f, 0x29, 0x3b, 0x3f, 0x42, 0x39, 0x06, 0x0d,
|
||||
@@ -667,7 +890,7 @@ static int allpixelson_set(void *data, u
|
||||
@@ -667,7 +1069,7 @@ static int allpixelson_set(void *data, u
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
||||
dev_dbg(ctx->dev, "Setting all pixels on\n");
|
||||
|
@ -728,7 +914,7 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
msleep(val * 1000);
|
||||
/* Reset the panel to get video back */
|
||||
drm_panel_disable(&ctx->panel);
|
||||
@@ -783,7 +1006,9 @@ static void st7703_remove(struct mipi_ds
|
||||
@@ -783,10 +1185,13 @@ static void st7703_remove(struct mipi_ds
|
||||
}
|
||||
|
||||
static const struct of_device_id st7703_of_match[] = {
|
||||
|
@ -739,7 +925,11 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/driver
|
|||
{ .compatible = "powkiddy,rgb30-panel", .data = &rgb30panel_desc },
|
||||
{ .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc },
|
||||
{ .compatible = "xingbangda,xbd599", .data = &xbd599_desc },
|
||||
@@ -802,6 +1027,6 @@ static struct mipi_dsi_driver st7703_dri
|
||||
+ { .compatible = "gameforce,chi-panel", .data = &gameforce_desc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st7703_of_match);
|
||||
@@ -802,6 +1207,6 @@ static struct mipi_dsi_driver st7703_dri
|
||||
};
|
||||
module_mipi_dsi_driver(st7703_driver);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
diff -rupN uboot.orig/cmd/hwrev.c uboot/cmd/hwrev.c
|
||||
--- uboot.orig/cmd/hwrev.c 2024-01-04 18:59:49.400779885 +0000
|
||||
+++ uboot/cmd/hwrev.c 2024-01-04 19:02:14.336283106 +0000
|
||||
@@ -34,6 +34,21 @@ int do_hwrev(cmd_tbl_t *cmdtp, int flag,
|
||||
diff -rupN u-boot.orig/cmd/hwrev.c u-boot/cmd/hwrev.c
|
||||
--- u-boot.orig/cmd/hwrev.c 2024-02-15 14:49:02.135798042 +0000
|
||||
+++ u-boot/cmd/hwrev.c 2024-02-15 14:54:37.885602790 +0000
|
||||
@@ -34,6 +34,26 @@ int do_hwrev(cmd_tbl_t *cmdtp, int flag,
|
||||
env_set("hwrev", "v10-go3");
|
||||
env_set("dtb_name", "rk3326-odroidgo3-linux.dtb");
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ diff -rupN uboot.orig/cmd/hwrev.c uboot/cmd/hwrev.c
|
|||
+ else if (check_range(1000, 1050, hwrev_adc)) {
|
||||
+ env_set("hwrev", "xu10");
|
||||
+ env_set("dtb_name", "rk3326-magicx-xu10.dtb");
|
||||
+ }
|
||||
+ /* CHI */
|
||||
+ else if (check_range(460, 489, hwrev_adc)) {
|
||||
+ env_set("hwrev", "chi");
|
||||
+ env_set("dtb_name", "rk3326-gameforce-chi.dtb");
|
||||
+ }
|
||||
/* engineer samples */
|
||||
else {
|
Loading…
Reference in a new issue