Merge pull request #207 from fewtarius/dev

Add support for the Anbernic RG353P.
This commit is contained in:
fewtarius 2022-06-18 12:57:08 -04:00 committed by GitHub
commit 0316fed33a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 6833 additions and 50 deletions

View file

@ -45,6 +45,10 @@ RG351MP:
DEVICE=RG351MP ARCH=arm ./scripts/build_distro
DEVICE=RG351MP ARCH=aarch64 ./scripts/build_distro
RG353P:
DEVICE=RG353P ARCH=arm ./scripts/build_distro
DEVICE=RG353P ARCH=aarch64 ./scripts/build_distro
update:
DEVICE=RG552 ARCH=aarch64 ./scripts/update_packages

View file

@ -9,7 +9,7 @@ Just Enough Linux Operating System (JELOS) is a simple Linux distribution for AR
* Supports FAT32, ExFAT, and EXT4 file systems on devices with a second card slot.
* 2.4GHz and 5GHz 802.11 A/B/G/N/AC WIFI support.
* Online updates for easy access to stable or development builds.
* Supports Anbernic's RG552, RG503, RG351P/M, RG351MP, and RG351V.
* Supports Anbernic's RG552, RG503, RG353P, RG351P/M, RG351MP, and RG351V.
* Developed by a small, friendly community.
## Licenses

View file

@ -0,0 +1 @@
RG503

View file

@ -19,6 +19,9 @@ pre_configure_target() {
if [[ "${DEVICE}" =~ RG351 ]]
then
AMIBERRY_PLATFORM="PLATFORM=RG351x"
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
AMIBERRY_PLATFORM="PLATFORM=RK3566"
else
AMIBERRY_PLATFORM="PLATFORM=${DEVICE}"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -14,8 +14,8 @@ diff -rupN amiberry.orig/Makefile amiberry/Makefile
-# RK3326 e.g. Odroid Go Advance - 32-bit userspace
-else ifneq (,$(findstring RK,$(PLATFORM)))
- CPPFLAGS += $(CPPFLAGS32) $(NEON_FLAGS)
+# Anbernic RG503
+else ifeq ($(PLATFORM),RG503)
+# Anbernic RG353P and RG503
+else ifeq ($(PLATFORM),RK3566)
+ CPUFLAGS = -mcpu=cortex-a55
+ CPPFLAGS += $(CPPFLAGS64) -mcpu=cortex-a55 -mtune=cortex-a55 -Ofast -ffast-math -DUSE_RENDER_THREAD
+ AARCH64 = 1

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -40,6 +40,9 @@ make_target() {
if [[ "${DEVICE}" =~ RG351 ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RG351x"
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RK3566"
else
PKG_MAKE_OPTS_TARGET+=" platform=${DEVICE}"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -5,7 +5,7 @@ diff -rupN dosbox-pure.orig/Makefile dosbox-pure/Makefile
LDFLAGS += $(CPUFLAGS) -shared
#LDFLAGS += -static-libstdc++ -static-libgcc #adds 1MB to output and still dynamically links against libc and libm
+ifneq (,$(findstring RG503,$(platform)))
+ifneq (,$(findstring RK3566,$(platform)))
+OUTNAME := dosbox_pure_libretro.so
+BUILD := RELEASE
+BUILDDIR := release

View file

@ -43,6 +43,9 @@ pre_make_target() {
if [[ "${DEVICE}" =~ RG351 ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RG351x"
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RK3566"
else
PKG_MAKE_OPTS_TARGET+=" platform=${DEVICE}"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -5,7 +5,7 @@ diff -rupN flycast.orig/Makefile flycast/Makefile
WITH_DYNAREC=arm
HAVE_GENERIC_JIT = 0
+else ifeq ($(platform), RG503)
+else ifeq ($(platform), RK3566)
+ EXT ?= so
+ TARGET := $(TARGET_NAME)_libretro.$(EXT)
+ SHARED += -shared -Wl,--version-script=link.T

View file

@ -44,6 +44,9 @@ then
if [[ "${DEVICE}" =~ RG351 ]]
then
make CC=${CC} platform=RG351x
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
make CC=${CC} platform=RK3566
else
make CC=${CC} platform=${DEVICE}
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -5,8 +5,8 @@ diff -rupN gpsp.orig/Makefile gpsp/Makefile
MMAP_JIT_CACHE = 1
HAVE_DYNAREC = 1
+# Anbernic RG503
+else ifeq ($(platform), RG503)
+# Anbernic RG353P
+else ifeq ($(platform), RK3566)
+ CPUFLAGS := -marm -march=armv8-a+crc+simd -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard -flto
+ CFLAGS := $(CPUFLAGS) -fpic -ffast-math -fno-rtti -fno-exceptions
+ TARGET := $(TARGET_NAME)_libretro.so

View file

@ -25,7 +25,7 @@ pre_configure_target() {
elif [[ "${DEVICE}" =~ RG552 ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RK3399"
elif [[ "${DEVICE}" =~ RG503 ]]
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RK3566"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -49,7 +49,7 @@ pre_configure_target() {
elif [[ "${DEVICE}" =~ RG552 ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RK3399"
elif [[ "${DEVICE}" =~ RG503 ]]
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RK3566"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -6,7 +6,7 @@ diff -rupN mupen64plus.orig/Makefile mupen64plus/Makefile
COREFLAGS += -DOS_LINUX
ASFLAGS = -f elf -d ELF_TYPE
+
+# Rockchip RK3326
+# Rockchip RK3566
+else ifneq (,$(findstring RK,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined -ldl
@ -15,7 +15,7 @@ diff -rupN mupen64plus.orig/Makefile mupen64plus/Makefile
+ ifneq (,$(findstring RK3399,$(platform)))
+ CPUFLAGS += -march=armv8-a -mtune=cortex-a72.cortex-a53
+ else ifneq (,$(findstring RK3566,$(platform)))
+ CPUFLAGS += -mtune=cortex-a55
+ CPUFLAGS += -march=armv8-a -mtune=cortex-a55
+ GLES = 1
+ endif
+ else ifneq (,$(findstring RK3288,$(platform)))

View file

@ -21,6 +21,9 @@ then
if [[ "${DEVICE}" =~ RG351 ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RG351x"
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RK3566"
else
PKG_MAKE_OPTS_TARGET=" platform=${DEVICE}"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -6,8 +6,8 @@ diff -rupN parallel-n64.orig/Makefile parallel-n64/Makefile
endif
+#######################################
+# Anbernic RG503
+else ifneq (,$(findstring RG503,$(platform)))
+# Anbernic RG353P
+else ifneq (,$(findstring RK3566,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ CPUFLAGS += -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ ASFLAGS += -D__ARM_NEON__ -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard

View file

@ -21,6 +21,9 @@ then
if [[ "${DEVICE}" =~ RG351 ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RG351x"
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RK3566"
else
PKG_MAKE_OPTS_TARGET=" platform=${DEVICE}"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -6,8 +6,8 @@ diff -rupN parallel-n64.orig/Makefile parallel-n64/Makefile
endif
+#######################################
+# Anbernic RG503
+else ifneq (,$(findstring RG503,$(platform)))
+# Anbernic RG353P
+else ifneq (,$(findstring RK3566,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ CPUFLAGS += -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ ASFLAGS += -D__ARM_NEON__ -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard

View file

@ -21,6 +21,9 @@ then
if [[ "${DEVICE}" =~ RG351 ]]
then
PKG_MAKE_OPTS_TARGET=" platform=RG351x"
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_MAKE_OPTS_TARGET+=" platform=RK3566"
else
PKG_MAKE_OPTS_TARGET=" platform=${DEVICE}"
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -6,8 +6,8 @@ diff -rupN parallel-n64.orig/Makefile parallel-n64/Makefile
endif
+#######################################
+# Anbernic RG503
+else ifneq (,$(findstring RG503,$(platform)))
+# Anbernic RG353P and RG503
+else ifneq (,$(findstring RK3566,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ CPUFLAGS += -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ ASFLAGS += -D__ARM_NEON__ -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard

View file

@ -20,6 +20,9 @@ make_target() {
if [[ "${DEVICE}" =~ RG351 ]]
then
make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=RG351x
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=RK3566
else
make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=${DEVICE}
fi

View file

@ -0,0 +1 @@
RG503

View file

@ -5,7 +5,7 @@ diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro
CFLAGS += -fomit-frame-pointer -ffast-math -DARM
CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53
+else ifeq ($(platform), RG503)
+else ifeq ($(platform), RK3566)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,-version-script=link.T

View file

@ -0,0 +1 @@
RG503

View file

@ -5,7 +5,7 @@ diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro
CFLAGS += -fomit-frame-pointer -ffast-math -DARM
CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53
+else ifeq ($(platform), RG503)
+else ifeq ($(platform), RK3566)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,-version-script=link.T

View file

@ -41,7 +41,7 @@ index 92d1a01..db4fec4 100644
// Button events
-#if defined(DEVICE_RG351P)
+#if defined(DEVICE_RG503)
+#if defined(DEVICE_RG353P)
+ #define BUTTON_PRESSED_UP event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 13
+ #define BUTTON_PRESSED_DOWN event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 14
+ #define BUTTON_PRESSED_LEFT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 15

View file

@ -0,0 +1 @@
RG503

View file

@ -19,7 +19,7 @@ PKG_CMAKE_OPTS_HOST="-DENABLE_STATIC=ON \
-DWITH_SIMD=OFF"
PKG_CMAKE_OPTS_TARGET="-DENABLE_STATIC=ON \
-DENABLE_SHARED=OFF \
-DENABLE_SHARED=ON \
-DWITH_JPEG8=ON"
if target_has_feature "(neon|sse)"; then

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1 @@
RG503

View file

@ -0,0 +1,57 @@
# Device definition file for the Anbernic RG503
# Device Features
DEVICE_HAS_FAN=false
DEVICE_FAKE_JACKSENSE=false
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_VOLUME_DEV="/dev/input/by-path/platform-gpio-keys-event"
DEVICE_CONTROLLER_DEV="/dev/input/by-path/platform-singleadc-joypad-event-joystick"
#DEVICE_HEADPHONE_DEV=""
DEVICE_BRIGHTNESS="75"
DISPLAY_ROTATED=false
SPLASH_LOADER="imagemagick"
# Kernel Modules
DEVICE_INTERNAL_WIFI=true
DEVICE_WIFI_MODULE="8821cs"
# GPIOS
DEVICE_WIFI="0"
#DEVICE_LED=""
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
#DEVICE_JACK=""
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Affinity
SLOW_CORES="taskset -c 0-3"
FAST_CORES="${SLOW_CORES}"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
# Controller
DEVICE_BTN_SOUTH="0" # B
DEVICE_BTN_EAST="1" # A
DEVICE_BTN_NORTH="2" # X
DEVICE_BTN_WEST="3" # Y
DEVICE_BTN_TL="4"
DEVICE_BTN_TR="5"
DEVICE_BTN_TL2="6"
DEVICE_BTN_TR2="7"
DEVICE_BTN_SELECT="8"
DEVICE_BTN_START="9"
DEVICE_BTN_MODE="10"
DEVICE_BTN_THUMBL="11"
DEVICE_BTN_THUMBR="12"
DEVICE_BTN_DPAD_UP="13"
DEVICE_BTN_DPAD_DOWN="14"
DEVICE_BTN_DPAD_LEFT="15"
DEVICE_BTN_DPAD_RIGHT="16"

View file

@ -0,0 +1 @@
SPLASH_LOADER="imagemagick"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,142 @@
################################################################################
# setup device defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
aarch64)
TARGET_KERNEL_ARCH="arm64"
TARGET_PATCH_ARCH="aarch64"
TARGET_CPU="cortex-a55"
TARGET_CPU_FLAGS="+crc+crypto+fp+simd"
TARGET_FPU="fp-armv8"
TARGET_FLOAT="hard"
TARGET_FEATURES="64bit"
;;
arm)
TARGET_KERNEL_ARCH="arm64"
TARGET_PATCH_ARCH="aarch64"
TARGET_CPU="cortex-a55"
TARGET_CPU_FLAGS="+crc"
TARGET_FPU="neon-fp-armv8"
TARGET_FLOAT="hard"
TARGET_FEATURES="32bit"
;;
esac
# Kernel target
DEVICE_NAME="RG353P"
KERNEL_TARGET="Image"
BOOTLOADER="u-boot"
PARTITION_TABLE="gpt"
DEVICE_DTB="rk3566-rg353p-linux"
UBOOT_DTB="rk3566"
UBOOT_CONFIG="rk3568_defconfig"
PKG_SOC="rk356x"
PKG_DATAFILE="$PKG_RKBIN/bin/rk35/rk3566_ddr_1056MHz_v1.08.bin"
PKG_LOADER="$PKG_RKBIN/bin/rk35/rk356x_spl_v1.11.bin"
PKG_LOAD_ADDR="0x0a100000"
BOOT_INI=false
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
KERNEL_MAKE_EXTRACMD+=" rockchip/${DEVICE_DTB}.dtb"
# Define the CPU
HW_CPU="Rockchip RK3566"
# Mali GPU family
MALI_FAMILY="bifrost-g52"
MALI_VERSION="g2p0"
OPENGLES="libmali"
GRAPHIC_DRIVERS=""
# kernel serial console
EXTRA_CMDLINE="quiet console=ttyS2,1500000 console=tty0 ssh consoleblank=0 systemd.show_status=0 loglevel=0 panic=20 video=HDMI-A-1:1280x720@60"
# additional packages to install
#ADDITIONAL_PACKAGES=""
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="misc-firmware wlan-firmware"
# additional drivers to install:
# for a list of additional drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS=""
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="no"
# driver addons to install:
# for a list of additinoal drivers see packages/linux-driver-addons
# Space separated list is supported,
DRIVER_ADDONS="" #dvb-latest
# debug tty path
DEBUG_TTY="/dev/ttyFIQ0"
# build and install PulseAudio support (yes / no)
PULSEAUDIO_SUPPORT="yes"
# build and install bluetooth support (yes / no)
BLUETOOTH_SUPPORT="no"
# build and install Avahi (Zeroconf) daemon (yes / no)
AVAHI_DAEMON="no"
# build with NFS support (mounting nfs shares via the OS) (yes / no)
NFS_SUPPORT="no"
# build with Samba Client support (mounting samba shares via the OS) (yes / no)
SAMBA_SUPPORT="no"
# build and install Samba Server (yes / no)
SAMBA_SERVER="yes"
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"
# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"
# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)
UDEVIL="yes"
# build and install exFAT fuse support (yes / no)
EXFAT="yes"
# build and install NTFS-3G fuse support (yes / no)
NTFS3G="no"
# build and install hfs filesystem utilities (yes / no)
HFSTOOLS="no"
# Support for partitioning and formating disks in initramfs (yes / no)
# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage
INITRAMFS_PARTED_SUPPORT="no"
# build with swap support (yes / no)
SWAP_SUPPORT="yes"
# swap support enabled per default (yes / no)
SWAP_ENABLED_DEFAULT="yes"
# swapfile size if SWAP_SUPPORT=yes in MB
SWAPFILESIZE="384"
# cron support (yes / no)
CRON_SUPPORT="no"
# Settings package name - blank if not required
DISTRO_PKG_SETTINGS=""
# htop tool (yes / no)
HTOP_TOOL="yes"

View file

@ -4,10 +4,10 @@
#
#
# Compiler: aarch64-libreelec-linux-gnueabi-gcc-10.3.0 (GCC) 10.3.0
# Compiler: aarch64-none-linux-gnu-gcc.real (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100300
CONFIG_GCC_VERSION=100301
CONFIG_CLANG_VERSION=0
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_IRQ_WORK=y
@ -125,6 +125,7 @@ CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_SOCK_CGROUP_DATA=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
@ -825,6 +826,7 @@ CONFIG_XFRM_USER=y
# CONFIG_XFRM_SUB_POLICY is not set
CONFIG_XFRM_MIGRATE=y
# CONFIG_XFRM_STATISTICS is not set
CONFIG_XFRM_IPCOMP=m
CONFIG_NET_KEY=m
CONFIG_NET_KEY_MIGRATE=y
CONFIG_INET=y
@ -834,43 +836,86 @@ CONFIG_IP_FIB_TRIE_STATS=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_ROUTE_CLASSID=y
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE_DEMUX=m
CONFIG_NET_IP_TUNNEL=m
# CONFIG_NET_IPGRE is not set
CONFIG_IP_MROUTE_COMMON=y
CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
# CONFIG_NET_IPVTI is not set
CONFIG_NET_UDP_TUNNEL=m
CONFIG_NET_FOU=m
# CONFIG_NET_FOU_IP_TUNNELS is not set
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
# CONFIG_INET_ESP_OFFLOAD is not set
CONFIG_INET_IPCOMP=m
CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_XFRM_MODE_BEET=m
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
# CONFIG_INET_UDP_DIAG is not set
# CONFIG_INET_RAW_DIAG is not set
# CONFIG_INET_DIAG_DESTROY is not set
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=m
CONFIG_TCP_CONG_CUBIC=m
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
# CONFIG_TCP_CONG_HSTCP is not set
# CONFIG_TCP_CONG_HYBLA is not set
# CONFIG_TCP_CONG_VEGAS is not set
# CONFIG_TCP_CONG_NV is not set
# CONFIG_TCP_CONG_SCALABLE is not set
# CONFIG_TCP_CONG_LP is not set
# CONFIG_TCP_CONG_VENO is not set
# CONFIG_TCP_CONG_YEAH is not set
# CONFIG_TCP_CONG_ILLINOIS is not set
# CONFIG_TCP_CONG_DCTCP is not set
# CONFIG_TCP_CONG_CDG is not set
# CONFIG_TCP_CONG_BBR is not set
CONFIG_DEFAULT_RENO=y
CONFIG_DEFAULT_TCP_CONG="reno"
# CONFIG_TCP_MD5SIG is not set
CONFIG_IPV6=m
CONFIG_IPV6_ROUTER_PREF=m
# CONFIG_IPV6_ROUTER_PREF is not set
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m
# CONFIG_INET6_ESP_OFFLOAD is not set
CONFIG_INET6_IPCOMP=m
CONFIG_IPV6_MIP6=m
CONFIG_IPV6_ILA=m
CONFIG_INET6_XFRM_TUNNEL=m
CONFIG_INET6_TUNNEL=m
CONFIG_INET6_XFRM_MODE_TRANSPORT=m
CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_INET6_XFRM_MODE_BEET=m
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
# CONFIG_IPV6_VTI is not set
CONFIG_IPV6_SIT=m
# CONFIG_IPV6_SIT_6RD is not set
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_GRE is not set
CONFIG_IPV6_FOU=m
CONFIG_IPV6_MULTIPLE_TABLES=y
# CONFIG_IPV6_SUBTREES is not set
CONFIG_IPV6_MROUTE=y
# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set
# CONFIG_IPV6_PIMSM_V2 is not set
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
CONFIG_NETWORK_SECMARK=y
@ -884,26 +929,34 @@ CONFIG_BRIDGE_NETFILTER=m
# Core Netfilter Configuration
#
CONFIG_NETFILTER_INGRESS=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_FAMILY_BRIDGE=y
CONFIG_NETFILTER_FAMILY_ARP=y
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
# CONFIG_NETFILTER_NETLINK_OSF is not set
CONFIG_NETFILTER_NETLINK_OSF=m
CONFIG_NF_CONNTRACK=m
CONFIG_NF_LOG_COMMON=m
# CONFIG_NF_LOG_NETDEV is not set
CONFIG_NETFILTER_CONNCOUNT=m
CONFIG_NF_CONNTRACK_MARK=y
# CONFIG_NF_CONNTRACK_SECMARK is not set
# CONFIG_NF_CONNTRACK_ZONES is not set
CONFIG_NF_CONNTRACK_PROCFS=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CONNTRACK_TIMEOUT=y
CONFIG_NF_CONNTRACK_TIMESTAMP=y
CONFIG_NF_CONNTRACK_LABELS=y
CONFIG_NF_CT_PROTO_DCCP=m
CONFIG_NF_CT_PROTO_SCTP=m
CONFIG_NF_CT_PROTO_UDPLITE=m
CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_GRE=m
CONFIG_NF_CT_PROTO_SCTP=y
CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_BROADCAST=m
CONFIG_NF_CONNTRACK_NETBIOS_NS=m
CONFIG_NF_CONNTRACK_SNMP=m
CONFIG_NF_CONNTRACK_PPTP=m
@ -911,19 +964,52 @@ CONFIG_NF_CONNTRACK_SANE=m
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CT_NETLINK=m
# CONFIG_NF_CT_NETLINK_TIMEOUT is not set
# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_NF_NAT_PROTO_DCCP=y
CONFIG_NF_NAT_PROTO_UDPLITE=y
CONFIG_NF_NAT_PROTO_SCTP=y
CONFIG_NF_NAT_AMANDA=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
CONFIG_NF_NAT_SIP=m
CONFIG_NF_NAT_TFTP=m
CONFIG_NF_NAT_REDIRECT=y
CONFIG_NETFILTER_SYNPROXY=m
CONFIG_NF_TABLES=m
# CONFIG_NF_TABLES_SET is not set
# CONFIG_NF_TABLES_INET is not set
# CONFIG_NF_TABLES_NETDEV is not set
# CONFIG_NFT_NUMGEN is not set
# CONFIG_NFT_CT is not set
# CONFIG_NFT_COUNTER is not set
# CONFIG_NFT_CONNLIMIT is not set
# CONFIG_NFT_LOG is not set
# CONFIG_NFT_LIMIT is not set
# CONFIG_NFT_MASQ is not set
# CONFIG_NFT_REDIR is not set
# CONFIG_NFT_NAT is not set
# CONFIG_NFT_TUNNEL is not set
# CONFIG_NFT_OBJREF is not set
# CONFIG_NFT_QUEUE is not set
# CONFIG_NFT_QUOTA is not set
# CONFIG_NFT_REJECT is not set
# CONFIG_NFT_COMPAT is not set
# CONFIG_NFT_HASH is not set
# CONFIG_NFT_SOCKET is not set
# CONFIG_NFT_OSF is not set
# CONFIG_NFT_TPROXY is not set
# CONFIG_NF_FLOW_TABLE is not set
CONFIG_NETFILTER_XTABLES=y
#
# Xtables combined modules
#
CONFIG_NETFILTER_XT_MARK=y
CONFIG_NETFILTER_XT_CONNMARK=y
CONFIG_NETFILTER_XT_CONNMARK=m
# CONFIG_NETFILTER_XT_SET is not set
#
# Xtables targets
@ -931,6 +1017,7 @@ CONFIG_NETFILTER_XT_CONNMARK=y
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
# CONFIG_NETFILTER_XT_TARGET_CT is not set
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HL=m
CONFIG_NETFILTER_XT_TARGET_HMARK=m
@ -942,10 +1029,13 @@ CONFIG_NETFILTER_XT_NAT=m
CONFIG_NETFILTER_XT_TARGET_NETMAP=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
CONFIG_NETFILTER_XT_TARGET_REDIRECT=m
CONFIG_NETFILTER_XT_TARGET_TEE=m
CONFIG_NETFILTER_XT_TARGET_TPROXY=m
# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
@ -973,6 +1063,7 @@ CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_HL=m
CONFIG_NETFILTER_XT_MATCH_IPCOMP=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
# CONFIG_NETFILTER_XT_MATCH_IPVS is not set
CONFIG_NETFILTER_XT_MATCH_L2TP=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
@ -983,9 +1074,11 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m
CONFIG_NETFILTER_XT_MATCH_OSF=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_POLICY=m
# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_QUOTA2=m
# CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG is not set
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_RECENT=m
@ -998,20 +1091,87 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m
CONFIG_IP_SET=m
CONFIG_IP_SET_MAX=256
# CONFIG_IP_SET_BITMAP_IP is not set
# CONFIG_IP_SET_BITMAP_IPMAC is not set
# CONFIG_IP_SET_BITMAP_PORT is not set
# CONFIG_IP_SET_HASH_IP is not set
# CONFIG_IP_SET_HASH_IPMARK is not set
# CONFIG_IP_SET_HASH_IPPORT is not set
# CONFIG_IP_SET_HASH_IPPORTIP is not set
# CONFIG_IP_SET_HASH_IPPORTNET is not set
# CONFIG_IP_SET_HASH_IPMAC is not set
# CONFIG_IP_SET_HASH_MAC is not set
# CONFIG_IP_SET_HASH_NETPORTNET is not set
# CONFIG_IP_SET_HASH_NET is not set
# CONFIG_IP_SET_HASH_NETNET is not set
# CONFIG_IP_SET_HASH_NETPORT is not set
# CONFIG_IP_SET_HASH_NETIFACE is not set
# CONFIG_IP_SET_LIST_SET is not set
CONFIG_IP_VS=m
# CONFIG_IP_VS_IPV6 is not set
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#
# CONFIG_IP_VS_PROTO_TCP is not set
# CONFIG_IP_VS_PROTO_UDP is not set
# CONFIG_IP_VS_PROTO_ESP is not set
# CONFIG_IP_VS_PROTO_AH is not set
# CONFIG_IP_VS_PROTO_SCTP is not set
#
# IPVS scheduler
#
# CONFIG_IP_VS_RR is not set
# CONFIG_IP_VS_WRR is not set
# CONFIG_IP_VS_LC is not set
# CONFIG_IP_VS_WLC is not set
# CONFIG_IP_VS_FO is not set
# CONFIG_IP_VS_OVF is not set
# CONFIG_IP_VS_LBLC is not set
# CONFIG_IP_VS_LBLCR is not set
# CONFIG_IP_VS_DH is not set
# CONFIG_IP_VS_SH is not set
# CONFIG_IP_VS_MH is not set
# CONFIG_IP_VS_SED is not set
# CONFIG_IP_VS_NQ is not set
#
# IPVS SH scheduler
#
CONFIG_IP_VS_SH_TAB_BITS=8
#
# IPVS MH scheduler
#
CONFIG_IP_VS_MH_TAB_INDEX=12
#
# IPVS application helper
#
# CONFIG_IP_VS_NFCT is not set
#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=m
# CONFIG_NF_SOCKET_IPV4 is not set
# CONFIG_NF_TPROXY_IPV4 is not set
# CONFIG_NF_DUP_IPV4 is not set
CONFIG_NF_SOCKET_IPV4=m
CONFIG_NF_TPROXY_IPV4=m
# CONFIG_NF_TABLES_IPV4 is not set
# CONFIG_NF_TABLES_ARP is not set
CONFIG_NF_DUP_IPV4=m
# CONFIG_NF_LOG_ARP is not set
# CONFIG_NF_LOG_IPV4 is not set
CONFIG_NF_LOG_IPV4=m
CONFIG_NF_REJECT_IPV4=m
CONFIG_NF_NAT_IPV4=m
CONFIG_NF_NAT_MASQUERADE_IPV4=m
CONFIG_NF_NAT_MASQUERADE_IPV4=y
CONFIG_NF_NAT_SNMP_BASIC=m
CONFIG_NF_NAT_PROTO_GRE=m
CONFIG_NF_NAT_PPTP=m
CONFIG_NF_NAT_H323=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_ECN=m
@ -1024,24 +1184,42 @@ CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_CLUSTERIP=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
# CONFIG_IP_NF_ARPFILTER is not set
# CONFIG_IP_NF_ARP_MANGLE is not set
#
# IPv6: Netfilter Configuration
#
# CONFIG_NF_SOCKET_IPV6 is not set
# CONFIG_NF_TPROXY_IPV6 is not set
CONFIG_NF_SOCKET_IPV6=m
CONFIG_NF_TPROXY_IPV6=m
# CONFIG_NF_TABLES_IPV6 is not set
CONFIG_NF_DUP_IPV6=m
CONFIG_NF_REJECT_IPV6=m
CONFIG_NF_LOG_IPV6=m
CONFIG_NF_NAT_IPV6=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_NF_DEFRAG_IPV6=y
# CONFIG_IP6_NF_MATCH_AH is not set
# CONFIG_IP6_NF_MATCH_EUI64 is not set
# CONFIG_IP6_NF_MATCH_FRAG is not set
# CONFIG_IP6_NF_MATCH_OPTS is not set
# CONFIG_IP6_NF_MATCH_HL is not set
# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
# CONFIG_IP6_NF_MATCH_MH is not set
# CONFIG_IP6_NF_MATCH_RT is not set
# CONFIG_IP6_NF_MATCH_SRH is not set
# CONFIG_IP6_NF_FILTER is not set
# CONFIG_IP6_NF_TARGET_SYNPROXY is not set
# CONFIG_IP6_NF_MANGLE is not set
# CONFIG_IP6_NF_RAW is not set
# CONFIG_IP6_NF_NAT is not set
CONFIG_NF_DEFRAG_IPV6=m
# CONFIG_NF_TABLES_BRIDGE is not set
# CONFIG_BRIDGE_NF_EBTABLES is not set
# CONFIG_BPFILTER is not set
# CONFIG_IP_DCCP is not set
@ -1050,14 +1228,14 @@ CONFIG_NF_DEFRAG_IPV6=y
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
CONFIG_STP=y
CONFIG_BRIDGE=y
CONFIG_STP=m
CONFIG_BRIDGE=m
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_HAVE_NET_DSA=y
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
CONFIG_LLC=y
CONFIG_LLC=m
# CONFIG_LLC2 is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
@ -1082,7 +1260,7 @@ CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_XPS=y
# CONFIG_CGROUP_NET_PRIO is not set
# CONFIG_CGROUP_NET_CLASSID is not set
CONFIG_CGROUP_NET_CLASSID=y
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y
# CONFIG_BPF_JIT is not set
@ -1183,6 +1361,7 @@ CONFIG_BT_MRVL_SDIO=y
# CONFIG_BT_MTKUART is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
@ -1233,7 +1412,9 @@ CONFIG_RFKILL_RK=y
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not set
# CONFIG_NET_IFE is not set
# CONFIG_LWTUNNEL is not set
CONFIG_LWTUNNEL=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_DST_CACHE=y
CONFIG_GRO_CELLS=y
# CONFIG_NET_DEVLINK is not set
CONFIG_MAY_USE_DEVLINK=y
@ -5555,7 +5736,7 @@ CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=y
# CONFIG_CRYPTO_MCRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
CONFIG_CRYPTO_AUTHENC=m
# CONFIG_CRYPTO_TEST is not set
CONFIG_CRYPTO_SIMD=y
# CONFIG_CRYPTO_CURVE25519 is not set
@ -5572,7 +5753,7 @@ CONFIG_CRYPTO_GCM=y
# CONFIG_CRYPTO_MORUS640 is not set
# CONFIG_CRYPTO_MORUS1280 is not set
CONFIG_CRYPTO_SEQIV=y
# CONFIG_CRYPTO_ECHAINIV is not set
CONFIG_CRYPTO_ECHAINIV=m
#
# Block modes
@ -5757,6 +5938,10 @@ CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y
CONFIG_REED_SOLOMON_DEC8=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT_MAP=y

View file

@ -30,7 +30,7 @@
KERNEL_TARGET="Image"
BOOTLOADER="u-boot"
PARTITION_TABLE="gpt"
DEVICE_DTB="rk3566"
DEVICE_DTB="rk3566-rg503-linux"
UBOOT_DTB="rk3566"
UBOOT_CONFIG="rk3568_defconfig"
PKG_SOC="rk356x"

View file

@ -26,10 +26,10 @@ elif [[ "${DEVICE}" =~ RG351 ]]
then
PKG_URL="https://github.com/JustEnoughLinuxOS/rg351x-kernel.git"
PKG_VERSION="0c4ffa0fe"
elif [[ "${DEVICE}" =~ RG503 ]]
elif [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_URL="https://github.com/JustEnoughLinuxOS/rk356x-kernel.git"
PKG_VERSION="7a64c50e6"
PKG_VERSION="61bd16d2a"
fi
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die

View file

@ -20,7 +20,7 @@ then
PKG_VERSION="9f8c2e3936"
fi
if [[ "${DEVICE}" =~ RG503 ]]
if [[ "${DEVICE}" =~ RG503 ]] || [[ "${DEVICE}" =~ RG353P ]]
then
PKG_URL="https://github.com/JustEnoughLinuxOS/rk356x-uboot.git"
PKG_VERSION="dfd1bcb"

View file

@ -0,0 +1,153 @@
diff --git a/drivers/video/drm/rockchip_panel.c b/drivers/video/drm/rockchip_panel.c
index 0428fc3..6e27364 100644
--- a/drivers/video/drm/rockchip_panel.c
+++ b/drivers/video/drm/rockchip_panel.c
@@ -129,7 +129,7 @@ static int rockchip_panel_parse_cmds(const u8 *data, int length,
return 0;
}
-/*
+
static void rockchip_panel_write_spi_cmds(struct rockchip_panel_priv *priv,
u8 type, int value)
{
@@ -156,92 +156,6 @@ static void rockchip_panel_write_spi_cmds(struct rockchip_panel_priv *priv,
}
dm_gpio_set_value(&priv->spi_cs_gpio, 1);
-}
-*/
-int cmd_init_code[30][32]={
- {0x0A1,0x100,0x100,0x100,0x100,0x100,0x100},
- {0x2C8},
- {0x0F0,0x15A,0x15A},
- {0x0F1,0x15A,0x15A},
- {0x0B0,0x102},
- {0x0F3,0x13B},
- {0x0F4,0x133,0x142,0x100,0x108},
- {0x0F5,0x100,0x106,0x126,0x135,0x103},
- {0x0F6,0x102},
- {0x0C6,0x10B,0x100,0x100,0x13C,0x100,0x122,0x100,0x100,0x100,0x100},
- {0x0F7,0x120},
- {0x0F5,0x100,0x106,0x127,0x135,0x103},
- {0x0B2,0x106,0x106,0x106,0x106},
- {0x0B1,0x107,0x100,0x110},
- {0x4F8,0x17F,0x17A,0x189,0x167,0x126,0x138,0x100,0x100,0x109,0x167,0x170,0x188,0x17A,0x176,0x105,0x109,0x123,0x123,0x123},
- {0x011},
- {0x2C8},
- {0x029},
- {0x2C8},
- {0x4B5,0x1FF,0x1EF,0x135,0x142,0x10D,0x1D7,0x1FF,0x107,0x1FF,0x1FF,0x1FD,0x100,0x101,0x1FF,0x105,0x112,0x10F,0x1FF,0x1FF,0x1FF,0x1FF},
- {0x0B4,0x115},
- {0x0B3,0x100},
- {0x4F9,0x101,0x19F,0x19F,0x1BE,0x1CF,0x1D7,0x1C9,0x1C2,0x1CB,0x1BB,0x1E1,0x1E3,0x1DE,0x1D6,0x1D0,0x1D3,0x1FA,0x1ED,0x1E6,0x12F,0x100,0x12F},
- {0x0F9,0x100},
- {0x026,0x100},
- {0x0B2,0x112},
- {0x011},
- {0x2C8},
- {0x029},
- {0x2C8},
-};
-
-
-
-static void rockchip_panel_write_spi_cmds_buffer(struct rockchip_panel_priv *priv)
-{
- int i,m,n;
- int value,value_hl;
-
- mdelay(150);
-
- for (m = 0; m < 30; m++) {
- dm_gpio_set_value(&priv->spi_cs_gpio, 0);
-
- if(cmd_init_code[m][0]& 0x400){
-
- value_hl=32;
- }else{
- value_hl=16;
-
- }
-
- for (n = 0; n < value_hl; n++) {
- value = cmd_init_code[m][n];
- if (value & 0x200)
- {
- mdelay(value & 0xFF);
- break;
- };
-
- for (i = 0; i < 9; i++) {
-
- if (value & 0x100)
- dm_gpio_set_value(&priv->spi_sdi_gpio, 1);
- else
- dm_gpio_set_value(&priv->spi_sdi_gpio, 0);
-
- dm_gpio_set_value(&priv->spi_scl_gpio, 0);
- udelay(10);
- dm_gpio_set_value(&priv->spi_scl_gpio, 1);
- value <<= 1;
- udelay(10);
- }
-
- }
-
- dm_gpio_set_value(&priv->spi_cs_gpio, 1);
- mdelay(1);
- }
- mdelay(150);
-
-
-
}
static int rockchip_panel_send_mcu_cmds(struct display_state *state,
@@ -273,12 +187,25 @@ static int rockchip_panel_send_spi_cmds(struct display_state *state,
{
struct rockchip_panel *panel = state_get_panel(state);
struct rockchip_panel_priv *priv = dev_get_priv(panel->dev);
-
+ int i;
if (!cmds)
return -EINVAL;
- rockchip_panel_write_spi_cmds_buffer(priv);
+ for (i = 0; i < cmds->cmd_cnt; i++) {
+ struct rockchip_cmd_desc *desc = &cmds->cmds[i];
+ int value = 0;
+
+ if (desc->header.payload_length == 2)
+ value = (desc->payload[0] << 8) | desc->payload[1];
+ else
+ value = desc->payload[0];
+ rockchip_panel_write_spi_cmds(priv,
+ desc->header.data_type, value);
+
+ if (desc->header.delay_ms)
+ mdelay(desc->header.delay_ms);
+ }
return 0;
}
@@ -341,17 +268,7 @@ static void panel_simple_prepare(struct rockchip_panel *panel)
regulator_set_enable(priv->power_supply, !plat->power_invert);
if (dm_gpio_is_valid(&priv->enable_gpio))
- {
- if (priv->cmd_type == CMD_TYPE_SPI){
- // dm_gpio_set_value(&priv->enable_gpio, 1);
- }else{
- // dm_gpio_set_value(&priv->enable_gpio, 0);
- }
-
- }
-
- dm_gpio_set_value(&priv->enable_gpio, 1);
- mdelay (50);
+ dm_gpio_set_value(&priv->enable_gpio, 1);
if (plat->delay.prepare)
mdelay(plat->delay.prepare);