commit
545b144ee9
14 changed files with 3533 additions and 48 deletions
|
@ -0,0 +1,111 @@
|
|||
frameskip_type = 2
|
||||
frameskip_value = 1
|
||||
safe_frameskip = 0
|
||||
show_frame_counter = 0
|
||||
screen_orientation = 1
|
||||
screen_swap = 0
|
||||
savestate_number = 0
|
||||
fast_forward = 0
|
||||
enable_sound = 1
|
||||
clock_speed = 0
|
||||
threaded_3d = 0
|
||||
mirror_touch = 0
|
||||
compress_savestates = 1
|
||||
savestate_snapshot = 1
|
||||
unzip_roms = 0
|
||||
preload_roms = 0
|
||||
backup_in_savestates = 1
|
||||
ignore_gamecard_limit = 0
|
||||
frame_interval = 0
|
||||
trim_roms = 0
|
||||
fix_main_2d_screen = 0
|
||||
disable_edge_marking = 0
|
||||
interframe_blend = 0
|
||||
hires_3d = 1
|
||||
use_rtc_custom_time = 0
|
||||
rtc_custom_time = 0
|
||||
rtc_system_time = 0
|
||||
slot2_device_type = 0
|
||||
rumble_frames = 3
|
||||
firmware.username = Dr DraStic
|
||||
firmware.language = 1
|
||||
firmware.favorite_color = 0
|
||||
firmware.birthday_month = 1
|
||||
firmware.birthday_day = 1
|
||||
enable_cheats = 1
|
||||
controls_a[CONTROL_INDEX_UP] = 338
|
||||
controls_a[CONTROL_INDEX_DOWN] = 337
|
||||
controls_a[CONTROL_INDEX_LEFT] = 336
|
||||
controls_a[CONTROL_INDEX_RIGHT] = 335
|
||||
controls_a[CONTROL_INDEX_A] = 32
|
||||
controls_a[CONTROL_INDEX_B] = 480
|
||||
controls_a[CONTROL_INDEX_X] = 122
|
||||
controls_a[CONTROL_INDEX_Y] = 120
|
||||
controls_a[CONTROL_INDEX_L] = 481
|
||||
controls_a[CONTROL_INDEX_R] = 99
|
||||
controls_a[CONTROL_INDEX_START] = 13
|
||||
controls_a[CONTROL_INDEX_SELECT] = 485
|
||||
controls_a[CONTROL_INDEX_HINGE] = 104
|
||||
controls_a[CONTROL_INDEX_TOUCH_CURSOR_UP] = 65535
|
||||
controls_a[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 65535
|
||||
controls_a[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 65535
|
||||
controls_a[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 65535
|
||||
controls_a[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 65535
|
||||
controls_a[CONTROL_INDEX_MENU] = 109
|
||||
controls_a[CONTROL_INDEX_SAVE_STATE] = 318
|
||||
controls_a[CONTROL_INDEX_LOAD_STATE] = 320
|
||||
controls_a[CONTROL_INDEX_FAST_FORWARD] = 8
|
||||
controls_a[CONTROL_INDEX_SWAP_SCREENS] = 115
|
||||
controls_a[CONTROL_INDEX_SWAP_ORIENTATION_A] = 97
|
||||
controls_a[CONTROL_INDEX_SWAP_ORIENTATION_B] = 100
|
||||
controls_a[CONTROL_INDEX_LOAD_GAME] = 65535
|
||||
controls_a[CONTROL_INDEX_QUIT] = 65535
|
||||
controls_a[CONTROL_INDEX_FAKE_MICROPHONE] = 65535
|
||||
controls_a[CONTROL_INDEX_UI_UP] = 338
|
||||
controls_a[CONTROL_INDEX_UI_DOWN] = 337
|
||||
controls_a[CONTROL_INDEX_UI_LEFT] = 336
|
||||
controls_a[CONTROL_INDEX_UI_RIGHT] = 335
|
||||
controls_a[CONTROL_INDEX_UI_SELECT] = 13
|
||||
controls_a[CONTROL_INDEX_UI_BACK] = 8
|
||||
controls_a[CONTROL_INDEX_UI_EXIT] = 27
|
||||
controls_a[CONTROL_INDEX_UI_PAGE_UP] = 331
|
||||
controls_a[CONTROL_INDEX_UI_PAGE_DOWN] = 334
|
||||
controls_a[CONTROL_INDEX_UI_SWITCH] = 481
|
||||
controls_b[CONTROL_INDEX_UP] = 1036
|
||||
controls_b[CONTROL_INDEX_DOWN] = 1037
|
||||
controls_b[CONTROL_INDEX_LEFT] = 1038
|
||||
controls_b[CONTROL_INDEX_RIGHT] = 1039
|
||||
controls_b[CONTROL_INDEX_A] = 1025
|
||||
controls_b[CONTROL_INDEX_B] = 1026
|
||||
controls_b[CONTROL_INDEX_X] = 1024
|
||||
controls_b[CONTROL_INDEX_Y] = 1027
|
||||
controls_b[CONTROL_INDEX_L] = 1028
|
||||
controls_b[CONTROL_INDEX_R] = 1029
|
||||
controls_b[CONTROL_INDEX_START] = 1033
|
||||
controls_b[CONTROL_INDEX_SELECT] = 1032
|
||||
controls_b[CONTROL_INDEX_HINGE] = 65535
|
||||
controls_b[CONTROL_INDEX_TOUCH_CURSOR_UP] = 1219
|
||||
controls_b[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 1155
|
||||
controls_b[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 1218
|
||||
controls_b[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 1154
|
||||
controls_b[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 1035
|
||||
controls_b[CONTROL_INDEX_MENU] = 1040
|
||||
controls_b[CONTROL_INDEX_SAVE_STATE] = 65535
|
||||
controls_b[CONTROL_INDEX_LOAD_STATE] = 65535
|
||||
controls_b[CONTROL_INDEX_FAST_FORWARD] = 65535
|
||||
controls_b[CONTROL_INDEX_SWAP_SCREENS] = 65535
|
||||
controls_b[CONTROL_INDEX_SWAP_ORIENTATION_A] = 1031
|
||||
controls_b[CONTROL_INDEX_SWAP_ORIENTATION_B] = 1030
|
||||
controls_b[CONTROL_INDEX_LOAD_GAME] = 65535
|
||||
controls_b[CONTROL_INDEX_QUIT] = 65535
|
||||
controls_b[CONTROL_INDEX_FAKE_MICROPHONE] = 65535
|
||||
controls_b[CONTROL_INDEX_UI_UP] = 1036
|
||||
controls_b[CONTROL_INDEX_UI_DOWN] = 1037
|
||||
controls_b[CONTROL_INDEX_UI_LEFT] = 1038
|
||||
controls_b[CONTROL_INDEX_UI_RIGHT] = 1039
|
||||
controls_b[CONTROL_INDEX_UI_SELECT] = 1025
|
||||
controls_b[CONTROL_INDEX_UI_BACK] = 1026
|
||||
controls_b[CONTROL_INDEX_UI_EXIT] = 1024
|
||||
controls_b[CONTROL_INDEX_UI_PAGE_UP] = 1029
|
||||
controls_b[CONTROL_INDEX_UI_PAGE_DOWN] = 1028
|
||||
controls_b[CONTROL_INDEX_UI_SWITCH] = 1027
|
|
@ -0,0 +1,670 @@
|
|||
# Mupen64Plus Configuration File
|
||||
# This file is automatically read and written by the Mupen64Plus Core library
|
||||
|
||||
[64DD]
|
||||
|
||||
# Filename of the 64DD IPL ROM
|
||||
IPL-ROM = ""
|
||||
# Filename of the disk to load into Disk Drive
|
||||
Disk = ""
|
||||
|
||||
|
||||
[Audio-SDL]
|
||||
|
||||
# Mupen64Plus SDL Audio Plugin config parameter version number
|
||||
Version = 1.000000
|
||||
# Frequency which is used if rom doesn't want to change it
|
||||
DEFAULT_FREQUENCY = 33600
|
||||
# Swaps left and right channels
|
||||
SWAP_CHANNELS = False
|
||||
# Size of primary buffer in output samples. This is where audio is loaded after it's extracted from n64's memory.
|
||||
PRIMARY_BUFFER_SIZE = 16384
|
||||
# Fullness level target for Primary audio buffer, in equivalent output samples. This value must be larger than the SECONDARY_BUFFER_SIZE. Decreasing this value will reduce audio latency but requires a faster PC to avoid choppiness. Increasing this will increase audio latency but reduce the chance of drop-outs.
|
||||
PRIMARY_BUFFER_TARGET = 2048
|
||||
# Size of secondary buffer in output samples. This is SDL's hardware buffer. The SDL documentation states that this should be a power of two between 512 and 8192.
|
||||
SECONDARY_BUFFER_SIZE = 1024
|
||||
# Audio resampling algorithm. src-sinc-best-quality, src-sinc-medium-quality, src-sinc-fastest, src-zero-order-hold, src-linear, speex-fixed-{10-0}, trivial
|
||||
RESAMPLE = "trivial"
|
||||
# Volume control type: 1 = SDL (only affects Mupen64Plus output) 2 = OSS mixer (adjusts master PC volume)
|
||||
VOLUME_CONTROL_TYPE = 1
|
||||
# Percentage change each time the volume is increased or decreased
|
||||
VOLUME_ADJUST = 5
|
||||
# Default volume when a game is started. Only used if VOLUME_CONTROL_TYPE is 1
|
||||
VOLUME_DEFAULT = 100
|
||||
# Synchronize Video/Audio
|
||||
AUDIO_SYNC = False
|
||||
|
||||
|
||||
[Core]
|
||||
|
||||
# Mupen64Plus Core config parameter set version number. Please don't change this version number.
|
||||
Version = 1.010000
|
||||
# Draw on-screen display if True, otherwise don't draw OSD
|
||||
OnScreenDisplay = True
|
||||
# Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more
|
||||
R4300Emulator = 2
|
||||
# Disable compiled jump commands in dynamic recompiler (should be set to False)
|
||||
NoCompiledJump = False
|
||||
# Disable 4MB expansion RAM pack. May be necessary for some games
|
||||
DisableExtraMem = False
|
||||
# Increment the save state slot after each save operation
|
||||
AutoStateSlotIncrement = False
|
||||
# Activate the R4300 debugger when ROM execution begins, if core was built with Debugger support
|
||||
EnableDebugger = False
|
||||
# Save state slot (0-9) to use when saving/loading the emulator state
|
||||
CurrentStateSlot = 0
|
||||
# Path to directory where screenshots are saved. If this is blank, the default value of ${UserDataPath}/screenshot will be used
|
||||
ScreenshotPath = "/storage/roms/n64"
|
||||
# Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of ${UserDataPath}/save will be used
|
||||
SaveStatePath = "/storage/roms/n64"
|
||||
# Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of ${UserDataPath}/save will be used
|
||||
SaveSRAMPath = "/storage/roms/n64"
|
||||
# Path to a directory to search when looking for shared data files
|
||||
SharedDataPath = "/tmp/mupen64plussa"
|
||||
# Force number of cycles per emulated instruction
|
||||
CountPerOp = 0
|
||||
# Randomize PI/SI Interrupt Timing
|
||||
RandomizeInterrupt = True
|
||||
# Duration of SI DMA (-1: use per game settings)
|
||||
SiDmaDuration = -1
|
||||
# Gameboy Camera Video Capture backend
|
||||
GbCameraVideoCaptureBackend1 = ""
|
||||
# Disk Save Format (0: Full Disk Copy (*.ndr/*.d6r), 1: RAM Area Only (*.ram))
|
||||
SaveDiskFormat = 1
|
||||
|
||||
|
||||
[CoreEvents]
|
||||
|
||||
# Mupen64Plus CoreEvents config parameter set version number. Please don't change this version number.
|
||||
Version = 1.000000
|
||||
# SDL keysym for stopping the emulator
|
||||
Kbd Mapping Stop = 27
|
||||
# SDL keysym for switching between fullscreen/windowed modes
|
||||
Kbd Mapping Fullscreen = 0
|
||||
# SDL keysym for saving the emulator state
|
||||
Kbd Mapping Save State = 286
|
||||
# SDL keysym for loading the emulator state
|
||||
Kbd Mapping Load State = 288
|
||||
# SDL keysym for advancing the save state slot
|
||||
Kbd Mapping Increment Slot = 0
|
||||
# SDL keysym for resetting the emulator
|
||||
Kbd Mapping Reset = 290
|
||||
# SDL keysym for slowing down the emulator
|
||||
Kbd Mapping Speed Down = 291
|
||||
# SDL keysym for speeding up the emulator
|
||||
Kbd Mapping Speed Up = 292
|
||||
# SDL keysym for taking a screenshot
|
||||
Kbd Mapping Screenshot = 293
|
||||
# SDL keysym for pausing the emulator
|
||||
Kbd Mapping Pause = 112
|
||||
# SDL keysym for muting/unmuting the sound
|
||||
Kbd Mapping Mute = 109
|
||||
# SDL keysym for increasing the volume
|
||||
Kbd Mapping Increase Volume = 93
|
||||
# SDL keysym for decreasing the volume
|
||||
Kbd Mapping Decrease Volume = 91
|
||||
# SDL keysym for temporarily going really fast
|
||||
Kbd Mapping Fast Forward = 102
|
||||
# SDL keysym for advancing by one frame when paused
|
||||
Kbd Mapping Frame Advance = 47
|
||||
# SDL keysym for pressing the game shark button
|
||||
Kbd Mapping Gameshark = 103
|
||||
# Joystick event string for stopping the emulator
|
||||
Joy Mapping Stop = "J0B12/B13"
|
||||
# Joystick event string for switching between fullscreen/windowed modes
|
||||
Joy Mapping Fullscreen = ""
|
||||
# Joystick event string for saving the emulator state
|
||||
Joy Mapping Save State = "J0B12/B5"
|
||||
# Joystick event string for loading the emulator state
|
||||
Joy Mapping Load State = "J0B12/B4"
|
||||
# Joystick event string for advancing the save state slot
|
||||
Joy Mapping Increment Slot = ""
|
||||
# Joystick event string for resetting the emulator
|
||||
Joy Mapping Reset = ""
|
||||
# Joystick event string for slowing down the emulator
|
||||
Joy Mapping Speed Down = ""
|
||||
# Joystick event string for speeding up the emulator
|
||||
Joy Mapping Speed Up = ""
|
||||
# Joystick event string for taking a screenshot
|
||||
Joy Mapping Screenshot = ""
|
||||
# Joystick event string for pausing the emulator
|
||||
Joy Mapping Pause = "J0B12/B0"
|
||||
# Joystick event string for muting/unmuting the sound
|
||||
Joy Mapping Mute = ""
|
||||
# Joystick event string for increasing the volume
|
||||
Joy Mapping Increase Volume = ""
|
||||
# Joystick event string for decreasing the volume
|
||||
Joy Mapping Decrease Volume = ""
|
||||
# Joystick event string for fast-forward
|
||||
Joy Mapping Fast Forward = "J0B12/B14"
|
||||
# Joystick event string for advancing by one frame when paused
|
||||
Joy Mapping Frame Advance = ""
|
||||
# Joystick event string for pressing the game shark button
|
||||
Joy Mapping Gameshark = ""
|
||||
# SDL keysym for save slot 0
|
||||
Kbd Mapping Slot 0 = 48
|
||||
# SDL keysym for save slot 1
|
||||
Kbd Mapping Slot 1 = 49
|
||||
# SDL keysym for save slot 2
|
||||
Kbd Mapping Slot 2 = 50
|
||||
# SDL keysym for save slot 3
|
||||
Kbd Mapping Slot 3 = 51
|
||||
# SDL keysym for save slot 4
|
||||
Kbd Mapping Slot 4 = 52
|
||||
# SDL keysym for save slot 5
|
||||
Kbd Mapping Slot 5 = 53
|
||||
# SDL keysym for save slot 6
|
||||
Kbd Mapping Slot 6 = 54
|
||||
# SDL keysym for save slot 7
|
||||
Kbd Mapping Slot 7 = 55
|
||||
# SDL keysym for save slot 8
|
||||
Kbd Mapping Slot 8 = 56
|
||||
# SDL keysym for save slot 9
|
||||
Kbd Mapping Slot 9 = 57
|
||||
|
||||
|
||||
[Input-SDL-Control1]
|
||||
|
||||
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
|
||||
version = 2.000000
|
||||
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
|
||||
mode = 2
|
||||
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
|
||||
device = 0
|
||||
# SDL joystick name (or Keyboard)
|
||||
name = "xu10_joypad"
|
||||
# Specifies whether this controller is 'plugged in' to the simulated N64
|
||||
plugged = True
|
||||
# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak
|
||||
plugin = 2
|
||||
# If True, then mouse buttons may be used with this controller
|
||||
mouse = False
|
||||
# Scaling factor for mouse movements. For X, Y axes.
|
||||
MouseSensitivity = "2.00,2.00"
|
||||
# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes.
|
||||
AnalogDeadzone = "0,0"
|
||||
# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value
|
||||
AnalogPeak = "32768,32768"
|
||||
# Digital button configuration mappings
|
||||
plugged = True
|
||||
mouse = False
|
||||
AnalogDeadzone = 0,0
|
||||
AnalogPeak = 32768,32768
|
||||
DPad R = button(15)
|
||||
DPad L = button(14)
|
||||
DPad D = button(13)
|
||||
DPad U = button(12)
|
||||
Start = button(9)
|
||||
Z Trig = button(4)
|
||||
B Button = button(3)
|
||||
A Button = button(0)
|
||||
C Button R = axis(2+)
|
||||
C Button L = axis(2-)
|
||||
C Button D = axis(3+)
|
||||
C Button U = axis(3-)
|
||||
R Trig = button(5)
|
||||
L Trig = button(6)
|
||||
Mempak switch =
|
||||
Rumblepak switch =
|
||||
# Analog axis configuration mappings
|
||||
X Axis = axis(0-,0+)
|
||||
Y Axis = axis(1-,1+)
|
||||
|
||||
[Input-SDL-Control2]
|
||||
|
||||
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
|
||||
version = 2.000000
|
||||
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
|
||||
mode = 2
|
||||
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
|
||||
device = -1
|
||||
# SDL joystick name (or Keyboard)
|
||||
name = ""
|
||||
# Specifies whether this controller is 'plugged in' to the simulated N64
|
||||
plugged = False
|
||||
# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak
|
||||
plugin = 2
|
||||
# If True, then mouse buttons may be used with this controller
|
||||
mouse = False
|
||||
# Scaling factor for mouse movements. For X, Y axes.
|
||||
MouseSensitivity = "2.00,2.00"
|
||||
# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes.
|
||||
AnalogDeadzone = "4096,4096"
|
||||
# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value
|
||||
AnalogPeak = "32768,32768"
|
||||
# Digital button configuration mappings
|
||||
DPad R = ""
|
||||
DPad L = ""
|
||||
DPad D = ""
|
||||
DPad U = ""
|
||||
Start = ""
|
||||
Z Trig = ""
|
||||
B Button = ""
|
||||
A Button = ""
|
||||
C Button R = ""
|
||||
C Button L = ""
|
||||
C Button D = ""
|
||||
C Button U = ""
|
||||
R Trig = ""
|
||||
L Trig = ""
|
||||
Mempak switch = ""
|
||||
Rumblepak switch = ""
|
||||
# Analog axis configuration mappings
|
||||
X Axis = ""
|
||||
Y Axis = ""
|
||||
|
||||
|
||||
[Input-SDL-Control3]
|
||||
|
||||
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
|
||||
version = 2.000000
|
||||
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
|
||||
mode = 2
|
||||
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
|
||||
device = -1
|
||||
# SDL joystick name (or Keyboard)
|
||||
name = ""
|
||||
# Specifies whether this controller is 'plugged in' to the simulated N64
|
||||
plugged = False
|
||||
# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak
|
||||
plugin = 2
|
||||
# If True, then mouse buttons may be used with this controller
|
||||
mouse = False
|
||||
# Scaling factor for mouse movements. For X, Y axes.
|
||||
MouseSensitivity = "2.00,2.00"
|
||||
# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes.
|
||||
AnalogDeadzone = "4096,4096"
|
||||
# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value
|
||||
AnalogPeak = "32768,32768"
|
||||
# Digital button configuration mappings
|
||||
DPad R = ""
|
||||
DPad L = ""
|
||||
DPad D = ""
|
||||
DPad U = ""
|
||||
Start = ""
|
||||
Z Trig = ""
|
||||
B Button = ""
|
||||
A Button = ""
|
||||
C Button R = ""
|
||||
C Button L = ""
|
||||
C Button D = ""
|
||||
C Button U = ""
|
||||
R Trig = ""
|
||||
L Trig = ""
|
||||
Mempak switch = ""
|
||||
Rumblepak switch = ""
|
||||
# Analog axis configuration mappings
|
||||
X Axis = ""
|
||||
Y Axis = ""
|
||||
|
||||
|
||||
[Input-SDL-Control4]
|
||||
|
||||
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
|
||||
version = 2.000000
|
||||
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
|
||||
mode = 2
|
||||
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
|
||||
device = -1
|
||||
# SDL joystick name (or Keyboard)
|
||||
name = ""
|
||||
# Specifies whether this controller is 'plugged in' to the simulated N64
|
||||
plugged = False
|
||||
# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak
|
||||
plugin = 2
|
||||
# If True, then mouse buttons may be used with this controller
|
||||
mouse = False
|
||||
# Scaling factor for mouse movements. For X, Y axes.
|
||||
MouseSensitivity = "2.00,2.00"
|
||||
# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes.
|
||||
AnalogDeadzone = "4096,4096"
|
||||
# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value
|
||||
AnalogPeak = "32768,32768"
|
||||
# Digital button configuration mappings
|
||||
DPad R = ""
|
||||
DPad L = ""
|
||||
DPad D = ""
|
||||
DPad U = ""
|
||||
Start = ""
|
||||
Z Trig = ""
|
||||
B Button = ""
|
||||
A Button = ""
|
||||
C Button R = ""
|
||||
C Button L = ""
|
||||
C Button D = ""
|
||||
C Button U = ""
|
||||
R Trig = ""
|
||||
L Trig = ""
|
||||
Mempak switch = ""
|
||||
Rumblepak switch = ""
|
||||
# Analog axis configuration mappings
|
||||
X Axis = ""
|
||||
Y Axis = ""
|
||||
|
||||
|
||||
[Rsp-HLE]
|
||||
|
||||
# Mupen64Plus RSP HLE Plugin config parameter version number
|
||||
Version = 1.000000
|
||||
# Path to a RSP plugin which will be used when encountering an unknown ucode.You can disable this by letting an empty string.
|
||||
RspFallback = ""
|
||||
# Send display lists to the graphics plugin
|
||||
DisplayListToGraphicsPlugin = True
|
||||
# Send audio lists to the audio plugin
|
||||
AudioListToAudioPlugin = False
|
||||
|
||||
|
||||
[Transferpak]
|
||||
|
||||
# Filename of the GB ROM to load into transferpak 1
|
||||
GB-rom-1 = ""
|
||||
# Filename of the GB RAM to load into transferpak 1
|
||||
GB-ram-1 = ""
|
||||
# Filename of the GB ROM to load into transferpak 2
|
||||
GB-rom-2 = ""
|
||||
# Filename of the GB RAM to load into transferpak 2
|
||||
GB-ram-2 = ""
|
||||
# Filename of the GB ROM to load into transferpak 3
|
||||
GB-rom-3 = ""
|
||||
# Filename of the GB RAM to load into transferpak 3
|
||||
GB-ram-3 = ""
|
||||
# Filename of the GB ROM to load into transferpak 4
|
||||
GB-rom-4 = ""
|
||||
# Filename of the GB RAM to load into transferpak 4
|
||||
GB-ram-4 = ""
|
||||
|
||||
|
||||
[UI-Console]
|
||||
|
||||
# Mupen64Plus UI-Console config parameter set version number. Please don't change this version number.
|
||||
Version = 1.000000
|
||||
# Directory in which to search for plugins
|
||||
PluginDir = "/usr/local/lib/mupen64plus"
|
||||
# Filename of video plugin
|
||||
VideoPlugin = "mupen64plus-video-rice"
|
||||
# Filename of audio plugin
|
||||
AudioPlugin = "mupen64plus-audio-sdl.so"
|
||||
# Filename of input plugin
|
||||
InputPlugin = "mupen64plus-input-sdl.so"
|
||||
# Filename of RSP plugin
|
||||
RspPlugin = "mupen64plus-rsp-hle.so"
|
||||
|
||||
|
||||
[Video-General]
|
||||
|
||||
# Width of output window or fullscreen width
|
||||
ScreenWidth = 427
|
||||
# Height of output window or fullscreen height
|
||||
ScreenHeight = 320
|
||||
# Use fullscreen mode if True, or windowed mode if False
|
||||
Fullscreen = True
|
||||
# If true, activate the SDL_GL_SWAP_CONTROL attribute
|
||||
VerticalSync = True
|
||||
# Rotate screen contents: 0=0 degree, 1=90 degree, 2 = 180 degree, 3=270 degree
|
||||
Rotate = 0
|
||||
|
||||
[Video-GLideN64]
|
||||
|
||||
###### Hardware Compatibility ######
|
||||
# Leave enabled unless a mobile gpu doesn't support it.
|
||||
EnableFragmentDepthWrite = 1
|
||||
# Hardware per pixel lighting, supposedly good for GLES3.1 devices or higher.
|
||||
EnableHWLighting = 0
|
||||
|
||||
###### Enhancements #######
|
||||
# Internal render resoluton rather than output. So 2 x 240p is 480p, etc.
|
||||
UseNativeResolutionFactor = 1
|
||||
# Enable/Disable MultiSampling (0=off, 2,4,8,16=quality)
|
||||
MultiSampling = 0
|
||||
# Enable/Disable Fast Approximate Anti-Aliasing FXAA
|
||||
FXAA = 0
|
||||
# Max level of Anisotropic Filtering, 0 for off
|
||||
anisotropy = 0
|
||||
# Bilinear filtering mode (0=N64 3point, 1=standard)
|
||||
# @rishooty: best to use this at 1x native res, any higher turn it off.
|
||||
bilinearMode = 1
|
||||
|
||||
###### Compatibility ######
|
||||
# Make texrect coordinates continuous to avoid black lines between them. (0=Off/default, 1=Auto, 2=Force)
|
||||
CorrectTexrectCoords = 1
|
||||
# Copy auxiliary buffers to RDRAM (default: 0)
|
||||
EnableCopyAuxiliaryToRDRAM = 1
|
||||
# Render 2D texrects in native resolution to fix misalignment between parts of 2D image. (0=Off/default, 1=Optimized, 2=Unoptimized)")
|
||||
EnableNativeResTexrects = 1
|
||||
|
||||
###### Other ######
|
||||
# Enable threaded video backend at the cost of input lag
|
||||
ThreadedVideo = 1
|
||||
# Screen aspect ratio (0=stretch, 1=force 4:3, 2=force 16:9, 3=adjust)
|
||||
AspectRatio = 1
|
||||
# Display On-screen FPS
|
||||
ShowFPS = False
|
||||
|
||||
[Video-Glide64mk2]
|
||||
|
||||
# Enable full-scene anti-aliasing by setting this to a value greater than 1
|
||||
wrpAntiAliasing = 0
|
||||
# Card ID
|
||||
card_id = 0
|
||||
# If true, use polygon offset values specified below
|
||||
force_polygon_offset = False
|
||||
# Specifies a scale factor that is used to create a variable depth offset for each polygon
|
||||
polygon_offset_factor = 0.000000
|
||||
# Is multiplied by an implementation-specific value to create a constant depth offset
|
||||
polygon_offset_units = 0.000000
|
||||
# Vertical sync
|
||||
vsync = True
|
||||
# TODO:ssformat
|
||||
ssformat = False
|
||||
# Display performance stats (add together desired flags): 1=FPS counter, 2=VI/s counter, 4=% speed, 8=FPS transparent
|
||||
show_fps = 0
|
||||
# Clock enabled
|
||||
clock = False
|
||||
# Clock is 24-hour
|
||||
clock_24_hr = True
|
||||
# Wrapper resolution
|
||||
wrpResolution = 0
|
||||
# Wrapper VRAM
|
||||
wrpVRAM = 0
|
||||
# Wrapper FBO
|
||||
wrpFBO = True
|
||||
# Wrapper Anisotropic Filtering
|
||||
wrpAnisotropic = True
|
||||
# Texture Enhancement: Smooth/Sharpen Filters
|
||||
ghq_fltr = 0
|
||||
# Texture Compression: 0 for S3TC, 1 for FXT1
|
||||
ghq_cmpr = 0
|
||||
# Texture Enhancement: More filters
|
||||
ghq_enht = 0
|
||||
# Hi-res texture pack format (0 for none, 1 for Rice)
|
||||
ghq_hirs = 1
|
||||
# Compress texture cache with S3TC or FXT1
|
||||
ghq_enht_cmpr = False
|
||||
# Tile textures (saves memory but could cause issues)
|
||||
ghq_enht_tile = 0
|
||||
# Force 16bpp textures (saves ram but lower quality)
|
||||
ghq_enht_f16bpp = False
|
||||
# Compress texture cache
|
||||
ghq_enht_gz = True
|
||||
# Don't enhance textures for backgrounds
|
||||
ghq_enht_nobg = False
|
||||
# Enable S3TC and FXT1 compression
|
||||
ghq_hirs_cmpr = False
|
||||
# Tile hi-res textures (saves memory but could cause issues)
|
||||
ghq_hirs_tile = False
|
||||
# Force 16bpp hi-res textures (saves ram but lower quality)
|
||||
ghq_hirs_f16bpp = False
|
||||
# Compress hi-res texture cache
|
||||
ghq_hirs_gz = True
|
||||
# Alternative CRC calculation -- emulates Rice bug
|
||||
ghq_hirs_altcrc = True
|
||||
# Save tex cache to disk
|
||||
ghq_cache_save = True
|
||||
# Texture Cache Size (MB)
|
||||
ghq_cache_size = 128
|
||||
# Use full alpha channel -- could cause issues for some tex packs
|
||||
ghq_hirs_let_texartists_fly = False
|
||||
# Dump textures
|
||||
ghq_hirs_dump = False
|
||||
# Alternate texture size method: -1=Game default, 0=disable. 1=enable
|
||||
alt_tex_size = -1
|
||||
# Use first SETTILESIZE only: -1=Game default, 0=disable. 1=enable
|
||||
use_sts1_only = -1
|
||||
# Use spheric mapping only: -1=Game default, 0=disable. 1=enable
|
||||
force_calc_sphere = -1
|
||||
# Force positive viewport: -1=Game default, 0=disable. 1=enable
|
||||
correct_viewport = -1
|
||||
# Force texrect size to integral value: -1=Game default, 0=disable. 1=enable
|
||||
increase_texrect_edge = -1
|
||||
# Reduce fillrect size by 1: -1=Game default, 0=disable. 1=enable
|
||||
decrease_fillrect_edge = -1
|
||||
# Enable perspective texture correction emulation: -1=Game default, 0=disable. 1=enable
|
||||
texture_correction = -1
|
||||
# Set special scale for PAL games: -1=Game default, 0=disable. 1=enable
|
||||
pal230 = -1
|
||||
# 3DFX Dithered alpha emulation mode: -1=Game default, >=0=dithered alpha emulation mode
|
||||
stipple_mode = -1
|
||||
# 3DFX Dithered alpha pattern: -1=Game default, >=0=pattern used for dithered alpha emulation
|
||||
stipple_pattern = -1
|
||||
# Check microcode each frame: -1=Game default, 0=disable. 1=enable
|
||||
force_microcheck = -1
|
||||
# Force 0xb5 command to be quad, not line 3D: -1=Game default, 0=disable. 1=enable
|
||||
force_quad3d = -1
|
||||
# Enable near z clipping: -1=Game default, 0=disable. 1=enable
|
||||
clip_zmin = -1
|
||||
# Enable far plane clipping: -1=Game default, 0=disable. 1=enable
|
||||
clip_zmax = -1
|
||||
# Use fast CRC algorithm: -1=Game default, 0=disable. 1=enable
|
||||
fast_crc = -1
|
||||
# Adjust screen aspect for wide screen mode: -1=Game default, 0=disable. 1=enable
|
||||
adjust_aspect = -1
|
||||
# Force strict check in Depth buffer test: -1=Game default, 0=disable. 1=enable
|
||||
zmode_compare_less = -1
|
||||
# Apply alpha dither regardless of alpha_dither_mode: -1=Game default, 0=disable. 1=enable
|
||||
old_style_adither = -1
|
||||
# Scale vertex z value before writing to depth buffer: -1=Game default, 0=disable. 1=enable
|
||||
n64_z_scale = -1
|
||||
# Fast texrect rendering with hwfbe: -1=Game default, 0=disable. 1=enable
|
||||
optimize_texrect = -1
|
||||
# Do not copy auxiliary frame buffers: -1=Game default, 0=disable. 1=enable
|
||||
ignore_aux_copy = -1
|
||||
# Clear auxiliary texture frame buffers: -1=Game default, 0=disable. 1=enable
|
||||
hires_buf_clear = -1
|
||||
# Read alpha from framebuffer: -1=Game default, 0=disable. 1=enable
|
||||
fb_read_alpha = -1
|
||||
# Handle unchanged fb: -1=Game default, 0=disable. 1=enable
|
||||
useless_is_useless = -1
|
||||
# Set frambuffer CRC mode: -1=Game default, 0=disable CRC, 1=fast CRC, 2=safe CRC
|
||||
fb_crc_mode = -1
|
||||
# Filtering mode: -1=Game default, 0=automatic, 1=force bilinear, 2=force point sampled
|
||||
filtering = -1
|
||||
# Fog: -1=Game default, 0=disable. 1=enable
|
||||
fog = -1
|
||||
# Buffer clear on every frame: -1=Game default, 0=disable. 1=enable
|
||||
buff_clear = -1
|
||||
# Buffer swapping method: -1=Game default, 0=swap buffers when vertical interrupt has occurred, 1=swap buffers when set of conditions is satisfied. Prevents flicker on some games, 2=mix of first two methods
|
||||
swapmode = -1
|
||||
# Aspect ratio: -1=Game default, 0=Force 4:3, 1=Force 16:9, 2=Stretch, 3=Original
|
||||
aspect = -1
|
||||
# LOD calculation: -1=Game default, 0=disable. 1=fast, 2=precise
|
||||
lodmode = -1
|
||||
# Smart framebuffer: -1=Game default, 0=disable. 1=enable
|
||||
fb_smart = -1
|
||||
# Hardware frame buffer emulation: -1=Game default, 0=disable. 1=enable
|
||||
fb_hires = -1
|
||||
# Read framebuffer every frame (may be slow use only for effects that need it e.g. Banjo Kazooie, DK64 transitions): -1=Game default, 0=disable. 1=enable
|
||||
fb_read_always = -1
|
||||
# Render N64 frame buffer as texture: -1=Game default, 0=disable, 1=mode1, 2=mode2
|
||||
read_back_to_screen = -1
|
||||
# Show images written directly by CPU: -1=Game default, 0=disable. 1=enable
|
||||
detect_cpu_write = -1
|
||||
# Get frame buffer info: -1=Game default, 0=disable. 1=enable
|
||||
fb_get_info = -1
|
||||
# Enable software depth render: -1=Game default, 0=disable. 1=enable
|
||||
fb_render = -1
|
||||
# If true, skip up to maxframeskip frames to maintain clock schedule; if false, skip exactly maxframeskip frames
|
||||
autoframeskip = False
|
||||
# If autoframeskip is true, skip up to this many frames to maintain clock schedule; if autoframeskip is false, skip exactly this many frames
|
||||
maxframeskip = 0
|
||||
|
||||
|
||||
[Video-Rice]
|
||||
|
||||
# Hack to accomodate widescreen devices
|
||||
ResolutionWidth = 480
|
||||
# Mupen64Plus Rice Video Plugin config parameter version number
|
||||
Version = 1
|
||||
# Frame Buffer Emulation (0=ROM default, 1=disable)
|
||||
FrameBufferSetting = 0
|
||||
# Frequency to write back the frame buffer (0=every frame, 1=every other frame, etc)
|
||||
FrameBufferWriteBackControl = 0
|
||||
# Render-to-texture emulation (0=none, 1=ignore, 2=normal, 3=write back, 4=write back and reload)
|
||||
RenderToTexture = 0
|
||||
# Control when the screen will be updated (0=ROM default, 1=VI origin update, 2=VI origin change, 3=CI change, 4=first CI change, 5=first primitive draw, 6=before screen clear, 7=after screen drawn)
|
||||
ScreenUpdateSetting = 4
|
||||
# Force to use normal alpha blender
|
||||
NormalAlphaBlender = False
|
||||
# Use a faster algorithm to speed up texture loading and CRC computation
|
||||
FastTextureLoading = False
|
||||
# Use different texture coordinate clamping code
|
||||
AccurateTextureMapping = True
|
||||
# Force emulated frame buffers to be in N64 native resolution
|
||||
InN64Resolution = False
|
||||
# Try to reduce Video RAM usage (should never be used)
|
||||
SaveVRAM = False
|
||||
# Enable this option to have better render-to-texture quality
|
||||
DoubleSizeForSmallTxtrBuf = False
|
||||
# Force to use normal color combiner
|
||||
DefaultCombinerDisable = False
|
||||
# Enable game-specific settings from INI file
|
||||
EnableHacks = True
|
||||
# If enabled, graphics will be drawn in WinFrame mode instead of solid and texture mode
|
||||
WinFrameMode = False
|
||||
# N64 Texture Memory Full Emulation (may fix some games, may break others)
|
||||
FullTMEMEmulation = False
|
||||
# Enable vertex clipper for fog operations
|
||||
OpenGLVertexClipper = False
|
||||
# Enable/Disable SSE optimizations for capable CPUs
|
||||
EnableSSE = True
|
||||
# If this option is enabled, the plugin will skip every other frame
|
||||
SkipFrame = False
|
||||
# If enabled, texture enhancement will be done only for TxtRect ucode
|
||||
TexRectOnly = False
|
||||
# If enabled, texture enhancement will be done only for textures width+height<=128
|
||||
SmallTextureOnly = False
|
||||
# Select hi-resolution textures based only on the CRC and ignore format+size information (Glide64 compatibility)
|
||||
LoadHiResCRCOnly = True
|
||||
# Enable hi-resolution texture file loading
|
||||
LoadHiResTextures = False
|
||||
# Enable texture dumping
|
||||
DumpTexturesToFiles = False
|
||||
# Display On-screen FPS
|
||||
ShowFPS = False
|
||||
# Use Mipmapping? 0=no, 1=nearest, 2=bilinear, 3=trilinear
|
||||
Mipmapping = 2
|
||||
# Enable, Disable fog generation (0=Disable, 1=Enable)
|
||||
FogMethod = 1
|
||||
# Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering)
|
||||
ForceTextureFilter = 0
|
||||
# Primary texture enhancement filter (0=None, 1=2X, 2=2XSAI, 3=HQ2X, 4=LQ2X, 5=HQ4X, 6=Sharpen, 7=Sharpen More, 8=External, 9=Mirrored)
|
||||
TextureEnhancement = 0
|
||||
# Secondary texture enhancement filter (0 = none, 1-4 = filtered)
|
||||
TextureEnhancementControl = 0
|
||||
# Color bit depth to use for textures (0=default, 1=32 bits, 2=16 bits)
|
||||
TextureQuality = 0
|
||||
# Z-buffer depth (only 16 or 32)
|
||||
OpenGLDepthBufferSetting = 16
|
||||
# Enable/Disable MultiSampling (0=off, 2,4,8,16=quality)
|
||||
MultiSampling = 0
|
||||
# Color bit depth for rendering window (0=32 bits, 1=16 bits)
|
||||
ColorQuality = 1
|
||||
# OpenGL level to support (0=auto, 1=OGL_FRAGMENT_PROGRAM)
|
||||
OpenGLRenderSetting = 0
|
||||
# Enable/Disable Anisotropic Filtering for Mipmapping (0=no filtering, 2-16=quality). This is uneffective if Mipmapping is 0. If the given value is to high to be supported by your graphic card, the value will be the highest value your graphic card can support. Better result with Trilinear filtering
|
||||
AnisotropicFiltering = 0
|
||||
# If true, use polygon offset values specified below
|
||||
ForcePolygonOffset = False
|
||||
# Specifies a scale factor that is used to create a variable depth offset for each polygon
|
||||
PolygonOffsetFactor = 0.000000
|
||||
# Is multiplied by an implementation-specific value to create a constant depth offset
|
||||
PolygonOffsetUnits = 0.000000
|
|
@ -6,3 +6,4 @@
|
|||
1900c3ea010000000100000001010000,odroidgo3_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b12,start:b13,dpleft:b10,dpdown:b9,dpright:b11,dpup:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b15,rightstick:b16,leftx:a0,lefty:a1,rightx:a2,righty:a3,
|
||||
19009b4d4b4800000111000000020000,retrogame_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,
|
||||
19009b4d4b4800000111000000010000,retrogame_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,
|
||||
19009321b0c300000002000010000000,XU10 Gamepad,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b16,start:b9,dpleft:b14,dpdown:b13,dpright:b15,dpup:b12,leftshoulder:b4,lefttrigger:b7,rightshoulder:b5,righttrigger:b6,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
input_device = "XU10 Gamepad"
|
||||
input_driver = "udev"
|
||||
input_device_display_name = "MagicX XU10 Gamepad"
|
||||
|
||||
input_b_btn = "1"
|
||||
input_a_btn = "2"
|
||||
input_x_btn = "3"
|
||||
input_y_btn = "0"
|
||||
input_l_btn = "4"
|
||||
input_r_btn = "5"
|
||||
input_l2_btn = "7"
|
||||
input_r2_btn = "6"
|
||||
|
||||
input_up_btn = "12"
|
||||
input_down_btn = "13"
|
||||
input_left_btn = "14"
|
||||
input_right_btn = "15"
|
||||
|
||||
input_select_btn = "8"
|
||||
input_start_btn = "9"
|
||||
|
||||
input_l3_btn = "10"
|
||||
input_r3_btn = "11"
|
||||
|
||||
input_l_x_plus_axis = "+0"
|
||||
input_l_x_minus_axis = "-0"
|
||||
input_l_y_plus_axis = "+1"
|
||||
input_l_y_minus_axis = "-1"
|
||||
|
||||
input_r_x_plus_axis = "+2"
|
||||
input_r_x_minus_axis = "-2"
|
||||
input_r_y_plus_axis = "+3"
|
||||
input_r_y_minus_axis = "-3"
|
||||
|
||||
|
||||
# Hotkeys
|
||||
input_enable_hotkey_btn = "16"
|
||||
input_exit_emulator_btn = "9"
|
||||
|
||||
input_screenshot_btn = "0"
|
||||
input_pause_toggle_btn = "1"
|
||||
input_menu_toggle_btn = "2"
|
||||
input_fps_toggle_btn = "3"
|
||||
|
||||
input_state_slot_increase_btn = "7"
|
||||
input_state_slot_decrease_btn = "6"
|
||||
|
||||
input_load_state_btn = "4"
|
||||
input_save_state_btn = "5"
|
||||
|
||||
input_rewind_btn = "10"
|
||||
input_toggle_fast_forward_btn = "11"
|
|
@ -0,0 +1,15 @@
|
|||
#!/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="SPK"
|
||||
DEVICE_PLAYBACK_PATH_HP="HP"
|
||||
DEVICE_BRIGHTNESS="128"
|
||||
DEVICE_BATTERY_LED_STATUS="true"
|
||||
DEVICE_PWR_LED_GPIO="77"
|
||||
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
|
||||
EOF
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2022-present JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
#Set mupen64-plus-sa config for XU10
|
||||
if [ ! -d "/storage/.config/mupen64plus" ]; then
|
||||
mkdir -p "/storage/.config/mupen64plus/"
|
||||
cp -r /usr/local/share/mupen64plus/mupen64plus.cfg* /storage/.config/mupen64plus/
|
||||
fi
|
||||
if [ -f "/storage/.config/mupen64plus/mupen64plus.cfg.xut" ]; then
|
||||
rm /storage/.config/mupen64plus/mupen64plus.cfg
|
||||
mv /storage/.config/mupen64plus/mupen64plus.cfg.xut /storage/.config/mupen64plus/mupen64plus.cfg
|
||||
fi
|
||||
|
||||
#Set drastic-sa config for XU10
|
||||
if [ ! -d "/storage/.config/drastic" ]; then
|
||||
mkdir -p "/storage/.config/drastic"
|
||||
cp -r "/usr/config/drastic" "/storage/.config/"
|
||||
fi
|
||||
if [ -f "/storage/.config/drastic/config/drastic.cfg.xut" ]; then
|
||||
rm /storage/.config/drastic/config/drastic.cfg
|
||||
mv /storage/.config/drastic/config/drastic.cfg.xut /storage/.config/drastic/config/drastic.cfg
|
||||
fi
|
||||
|
||||
#Set up gzdoom
|
||||
if [ ! -d "/storage/.config/gzdoom/" ]; then
|
||||
sed -i '/vid_defheight=/c\vid_defheight=480' /storage/.config/gzdoom/gzdoom.ini
|
||||
sed -i '/vid_defwidth=/c\vid_defwidth=640' /storage/.config/gzdoom/gzdoom.ini
|
||||
fi
|
||||
|
||||
#Map ppsspp controls
|
||||
if grep XU10 -q "/storage/.config/ppsspp/PSP/SYSTEM/controls.ini"
|
||||
then
|
||||
exit 1
|
||||
else
|
||||
cat <<EOF >/storage/.config/ppsspp/PSP/SYSTEM/controls.ini
|
||||
#XU10
|
||||
[ControlMapping]
|
||||
Up = 10-19
|
||||
Down = 10-20
|
||||
Left = 10-21
|
||||
Right = 10-22
|
||||
Circle = 10-190
|
||||
Cross = 10-189
|
||||
Square = 10-191
|
||||
Triangle = 10-188
|
||||
Start = 10-197
|
||||
Select = 10-196
|
||||
L = 10-194
|
||||
R = 10-195
|
||||
An.Up = 10-4003
|
||||
An.Down = 10-4002
|
||||
An.Left = 10-4001
|
||||
An.Right = 10-4000
|
||||
Pause = 10-109,10-104,1-111
|
||||
RightAn.Up = 10-4007
|
||||
RightAn.Down = 10-4006
|
||||
RightAn.Left = 10-4005
|
||||
RightAn.Right = 10-4004
|
||||
EOF
|
||||
fi
|
|
@ -1267,4 +1267,31 @@
|
|||
<input name="x" type="button" id="2" value="1" />
|
||||
<input name="y" type="button" id="3" value="1" />
|
||||
</inputConfig>
|
||||
<inputConfig type="joystick" deviceName="XU10 Gamepad" deviceGUID="19009321b0c300000002000010000000">
|
||||
<input name="a" type="button" id="2" value="1" />
|
||||
<input name="b" type="button" id="1" value="1" />
|
||||
<input name="down" type="button" id="13" value="1" />
|
||||
<input name="hotkeyenable" type="button" id="16" value="1" />
|
||||
<input name="left" type="button" id="14" value="1" />
|
||||
<input name="leftanalogdown" type="axis" id="1" value="1" />
|
||||
<input name="leftanalogleft" type="axis" id="0" value="-1" />
|
||||
<input name="leftanalogright" type="axis" id="0" value="1" />
|
||||
<input name="leftanalogup" type="axis" id="1" value="-1" />
|
||||
<input name="leftshoulder" type="button" id="4" value="1" />
|
||||
<input name="leftthumb" type="button" id="10" value="1" />
|
||||
<input name="lefttrigger" type="button" id="7" value="1" />
|
||||
<input name="right" type="button" id="15" value="1" />
|
||||
<input name="rightanalogdown" type="axis" id="3" value="1" />
|
||||
<input name="rightanalogleft" type="axis" id="2" value="-1" />
|
||||
<input name="rightanalogright" type="axis" id="2" value="1" />
|
||||
<input name="rightanalogup" type="axis" id="3" value="-1" />
|
||||
<input name="rightshoulder" type="button" id="5" value="1" />
|
||||
<input name="rightthumb" type="button" id="11" value="1" />
|
||||
<input name="righttrigger" type="button" id="6" value="1" />
|
||||
<input name="select" type="button" id="8" value="1" />
|
||||
<input name="start" type="button" id="9" value="1" />
|
||||
<input name="up" type="button" id="12" value="1" />
|
||||
<input name="x" type="button" id="3" value="1" />
|
||||
<input name="y" type="button" id="0" value="1" />
|
||||
</inputConfig>
|
||||
</inputList>
|
||||
|
|
|
@ -25,6 +25,8 @@ elif test ${hwrev} = 'rg351v'; then
|
|||
load mmc 1:1 ${dtb_loadaddr} rk3326-anbernic-rg351v.dtb
|
||||
elif test ${hwrev} = 'rg351mp'; then
|
||||
load mmc 1:1 ${dtb_loadaddr} rk3326-anbernic-rg351mp.dtb
|
||||
elif test ${hwrev} = 'xu10'; then
|
||||
load mmc 1:1 ${dtb_loadaddr} rk3326-magicx-xu10.dtb
|
||||
fi
|
||||
|
||||
booti ${loadaddr} - ${dtb_loadaddr}
|
||||
|
|
|
@ -2175,6 +2175,7 @@ CONFIG_JOYSTICK_ADC=y
|
|||
CONFIG_JOYSTICK_ODROIDGO2=y
|
||||
CONFIG_JOYSTICK_ODROIDGO2_V11=y
|
||||
CONFIG_JOYSTICK_ODROIDGO3=y
|
||||
CONFIG_JOYSTICK_XU10=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-odroid-go2" "rk3326-odroid-go2-v11" "rk3326-odroid-go3" "rk3326-powkiddy-rgb10")
|
||||
DEVICE_DTB=("rk3326-anbernic-rg351m" "rk3326-anbernic-rg351v" "rk3326-odroid-go2" "rk3326-odroid-go2-v11" "rk3326-odroid-go3" "rk3326-powkiddy-rgb10" "rk3326-magicx-xu10")
|
||||
UBOOT_DTB="${DEVICE_DTB[0]}"
|
||||
UBOOT_CONFIG="odroidgoa_defconfig"
|
||||
PKG_SOC="px30"
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boot/dts/rockchip/Makefile
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2024-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-01-10 20:03:39.806929259 +0000
|
||||
@@ -9,9 +9,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-ro
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2024-01-17 03:47:10.074350115 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2024-01-17 04:01:50.682844812 +0000
|
||||
@@ -9,9 +9,12 @@ 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-rg35vm.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351v.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
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb
|
||||
|
@ -14,8 +15,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-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-01-10 19:55:05.178272962 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-01-17 03:47:10.078350209 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/px30.dtsi 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -114,27 +114,11 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
@ -101,8 +102,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/px30.dtsi linux/arch/arm64/bo
|
|||
};
|
||||
};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-10 19:57:50.882416102 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-17 03:47:10.078350209 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -12,6 +12,25 @@
|
||||
model = "Anbernic RG351M";
|
||||
compatible = "anbernic,rg351m", "rockchip,rk3326";
|
||||
|
@ -155,7 +156,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts li
|
|||
+};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 2024-01-10 19:58:33.223462336 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -0,0 +1,124 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
|
@ -281,9 +282,860 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts li
|
|||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-magicx-xu10.dts 2024-01-18 16:30:20.464866143 -0500
|
||||
@@ -0,0 +1,848 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 Hardkernel Co., Ltd
|
||||
+ * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
|
||||
+ * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <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 = "MagicX XU10";
|
||||
+ compatible = "magicx,xu10", "rockchip,rk3326";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon=uart8250,mmio32,0xff160000 swiotlb=1 console=ttyFIQ0 rw root=PARTUUID=614e0000-0000 rootwait";
|
||||
+ };
|
||||
+
|
||||
+ fiq-debugger {
|
||||
+ compatible = "rockchip,fiq-debugger";
|
||||
+ rockchip,serial-id = <2>;
|
||||
+ rockchip,wake-irq = <0>;
|
||||
+ /* If enable uart uses irq instead of fiq */
|
||||
+ rockchip,irq-mode-enable = <0>;
|
||||
+ rockchip,baudrate = <115200>; /* Only 115200 and 1500000 */
|
||||
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart2m1_xfer>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ backlight: backlight {
|
||||
+ compatible = "pwm-backlight";
|
||||
+ power-supply = <&vcc_bl>;
|
||||
+ pwms = <&pwm1 0 62745 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 = <128>;
|
||||
+ };
|
||||
+
|
||||
+ joypad: xu10-joypad {
|
||||
+ compatible = "xu10-joypad";
|
||||
+
|
||||
+ joypad-name = "XU10 Gamepad";
|
||||
+ joypad-product = <0x0200>;
|
||||
+ joypad-revision = <0x0010>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+ /*
|
||||
+ - xu10-joypad sysfs list -
|
||||
+ * for poll device interval(ms)
|
||||
+ /sys/devices/platform/odroidgo3_joypad/poll_interval [rw]
|
||||
+ ex) echo 20 > poll_interval
|
||||
+ * for button-adc-fuzz
|
||||
+ /sys/devices/platform/odroidgo3_joypad/adc_fuzz [r]
|
||||
+ * for button-adc-flat
|
||||
+ /sys/devices/platform/odroidgo3_joypad/adc_flat [r]
|
||||
+
|
||||
+ * for report control(1:enable, 0:disable)
|
||||
+ /sys/devices/platform/odroidgo3_joypad/enable [rw]
|
||||
+ * for adc calibration value setup(current adcs value -> cal value)
|
||||
+ /sys/devices/platform/odroidgo3_joypad/adc_cal [rw]
|
||||
+ ex) echo 0 > adc_cal
|
||||
+ * for amux data debug
|
||||
+ * Joypad driver is disabled when using this sysfs.
|
||||
+ /sys/devices/platform/odroidgo3_joypad/amux_debug [rw]
|
||||
+ ex) echo 0 > amux_debug --> select amux channel
|
||||
+ ex) cat amux_debug --> get adc data of seleted channel
|
||||
+ */
|
||||
+
|
||||
+ /* gpio pincontrol setup */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&btn_pins>;
|
||||
+
|
||||
+ /* Analog mux define */
|
||||
+ io-channel-names = "joy_left", "joy_right";
|
||||
+ io-channels = <&saradc 1>, <&saradc 2>;
|
||||
+
|
||||
+ /* adc mux channel count */
|
||||
+ amux-count = <4>;
|
||||
+
|
||||
+ /* adc mux select(a,b) gpio */
|
||||
+ amux-a-gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>;
|
||||
+ amux-b-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ /* adc mux enable gpio */
|
||||
+ amux-en-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ /* adc calculate scale */
|
||||
+ button-adc-scale = <2>;
|
||||
+
|
||||
+ /* adc deadzone range */
|
||||
+ button-adc-deadzone = <180>;
|
||||
+
|
||||
+ /*
|
||||
+ specifies fuzz value that is used to filter noise from
|
||||
+ the event stream.
|
||||
+ */
|
||||
+ button-adc-fuzz = <32>;
|
||||
+ button-adc-flat = <32>;
|
||||
+
|
||||
+ /*
|
||||
+ Analog Stick data tuning value(precent)
|
||||
+ p = positive direction, n = negative direction
|
||||
+ report value = (real_adc_data * tuning_value) / 100
|
||||
+ */
|
||||
+ abs_x-p-tuning = <200>;
|
||||
+ abs_x-n-tuning = <200>;
|
||||
+
|
||||
+ abs_y-p-tuning = <200>;
|
||||
+ abs_y-n-tuning = <200>;
|
||||
+
|
||||
+ abs_rx-p-tuning = <200>;
|
||||
+ abs_rx-n-tuning = <200>;
|
||||
+
|
||||
+ abs_ry-p-tuning = <200>;
|
||||
+ abs_ry-n-tuning = <200>;
|
||||
+
|
||||
+ /* poll device interval (ms), adc read interval */
|
||||
+ poll-interval = <10>;
|
||||
+ btn-lr-to-absx;
|
||||
+ btn-ud-to-absy;
|
||||
+
|
||||
+ /* gpio button auto repeat set value : default disable */
|
||||
+ /*
|
||||
+ autorepeat;
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ *** MagicX XU10 - layoout ***
|
||||
+ |-------------------------------|
|
||||
+ | sw14 sw17 sw16 sw15 |
|
||||
+ |-----|-------------------|-----|
|
||||
+ | | | |
|
||||
+ |vol+ | | sw13|
|
||||
+ |vol- | | |
|
||||
+ | | LCD Display | |
|
||||
+ | | | |
|
||||
+ | | | |
|
||||
+ | |-------------------| |
|
||||
+ | sw9 sw10 |
|
||||
+ | |
|
||||
+ | sw1 sw7 |
|
||||
+ | sw3 sw4 sw8 sw6 |
|
||||
+ | sw2 sw5 |
|
||||
+ | |
|
||||
+ | sw11 sw12 |
|
||||
+ | |
|
||||
+ |-------|---------------|-------|
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ joypad driver is poll-device driver.
|
||||
+ poll-device is does not support wakeup-source.
|
||||
+ */
|
||||
+
|
||||
+ sw1 {
|
||||
+ gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO DPAD-UP";
|
||||
+ linux,code = <BTN_DPAD_UP>; // 0x220
|
||||
+ };
|
||||
+ sw2 {
|
||||
+ gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO DPAD-DOWN";
|
||||
+ linux,code = <BTN_DPAD_DOWN>; // 0x221
|
||||
+ };
|
||||
+ sw3 {
|
||||
+ gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO DPAD-LEFT";
|
||||
+ linux,code = <BTN_DPAD_LEFT>; // 0x222
|
||||
+ };
|
||||
+ sw4 {
|
||||
+ gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO DPAD-RIGHT";
|
||||
+ linux,code = <BTN_DPAD_RIGHT>; // 0x223
|
||||
+ };
|
||||
+ sw5 {
|
||||
+ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-A";
|
||||
+ linux,code = <BTN_SOUTH>; // 0x130
|
||||
+ };
|
||||
+ sw6 {
|
||||
+ gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-B";
|
||||
+ linux,code = <BTN_EAST>; // 0x131
|
||||
+ };
|
||||
+ sw7 {
|
||||
+ gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-Y";
|
||||
+ linux,code = <BTN_NORTH>; // 0x133
|
||||
+ };
|
||||
+ sw8 {
|
||||
+ gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-X";
|
||||
+ linux,code = <BTN_WEST>; // 0x134
|
||||
+ };
|
||||
+ sw9 {
|
||||
+ gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-SELECT";
|
||||
+ linux,code = <BTN_SELECT>; // 0x13a
|
||||
+ };
|
||||
+ sw10 {
|
||||
+ gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-START";
|
||||
+ linux,code = <BTN_START>; // 0x13b
|
||||
+ };
|
||||
+ sw11 {
|
||||
+ gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-THUMBL";
|
||||
+ linux,code = <BTN_THUMBL>; // 0x13d
|
||||
+ };
|
||||
+ sw12 {
|
||||
+ gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-THUMBR";
|
||||
+ linux,code = <BTN_THUMBR>; // 0x13e
|
||||
+ };
|
||||
+ sw13 {
|
||||
+ gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-G";
|
||||
+ linux,code = <BTN_TRIGGER_HAPPY1>; // 0x2c0
|
||||
+ };
|
||||
+ sw14 {
|
||||
+ gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-LEFT";
|
||||
+ linux,code = <BTN_TL>; // 0x136
|
||||
+ };
|
||||
+ sw15 {
|
||||
+ gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-RIGHT";
|
||||
+ linux,code = <BTN_TR>; // 0x137
|
||||
+ };
|
||||
+ sw16 {
|
||||
+ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-RIGHT2";
|
||||
+ linux,code = <BTN_TR2>; // 0x139
|
||||
+ };
|
||||
+ sw17 {
|
||||
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO BTN-LEFT2";
|
||||
+ linux,code = <BTN_TL2>; // 0x138
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ battery: battery {
|
||||
+ compatible = "simple-battery";
|
||||
+ charge-full-design-microamp-hours = <3000000>;
|
||||
+ charge-term-current-microamp = <300000>;
|
||||
+ constant-charge-current-max-microamp = <2000000>;
|
||||
+ constant-charge-voltage-max-microvolt = <4200000>;
|
||||
+ factory-internal-resistance-micro-ohms = <134000>;
|
||||
+ voltage-max-design-microvolt = <4100000>;
|
||||
+ voltage-min-design-microvolt = <3500000>;
|
||||
+
|
||||
+ ocv-capacity-celsius = <20>;
|
||||
+ ocv-capacity-table-0 =
|
||||
+ <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>,
|
||||
+ <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>,
|
||||
+ <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>,
|
||||
+ <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>,
|
||||
+ <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>,
|
||||
+ <3574170 0>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys-vol {
|
||||
+ compatible = "gpio-keys";
|
||||
+ autorepeat;
|
||||
+ pinctrl-0 = <&btn_pins_vol>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ button-vol-down {
|
||||
+ gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>;
|
||||
+ label = "VOLUMEDOWN";
|
||||
+ linux,code = <KEY_VOLUMEDOWN>;
|
||||
+ };
|
||||
+
|
||||
+ button-vol-up {
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ label = "VOLUMEUP";
|
||||
+ linux,code = <KEY_VOLUMEUP>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* led-1 is wired directly to output of always-on regulator */
|
||||
+
|
||||
+ leds: gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&led_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ green_led: led-0 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ default-state = "on";
|
||||
+ function = LED_FUNCTION_POWER;
|
||||
+ gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ amber_led: led-1 {
|
||||
+ color = <LED_COLOR_ID_AMBER>;
|
||||
+ function = LED_FUNCTION_CHARGING;
|
||||
+ gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
+ retain-state-suspended;
|
||||
+ };
|
||||
+
|
||||
+ red_led: led-2 {
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ default-state = "off";
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
+ gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk817-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "rk817_int";
|
||||
+ 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", "Speaker";
|
||||
+ simple-audio-card,routing =
|
||||
+ "MICL", "Mic Jack",
|
||||
+ "Headphones", "HPOL",
|
||||
+ "Headphones", "HPOR",
|
||||
+ "Speaker", "SPKO";
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&rk817>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s1_2ch>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ 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_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&usb_midu>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&dmc {
|
||||
+ center-supply = <&vdd_logic>;
|
||||
+};
|
||||
+
|
||||
+&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 = "magicx,xu10-panel", "sitronix,st7703";
|
||||
+ iovcc-supply = <&vcc_lcd>;
|
||||
+ vdd-supply = <&vcc_lcd>;
|
||||
+ reg = <0>;
|
||||
+ backlight = <&backlight>;
|
||||
+ reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ port {
|
||||
+ mipi_in_panel: endpoint {
|
||||
+ remote-endpoint = <&mipi_out_panel>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&dsi_dphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&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", "xin32k";
|
||||
+ 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>;
|
||||
+ vcc9-supply = <&usb_midu>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-min-microvolt = <950000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_dvp:LDO_REG1 {
|
||||
+ regulator-name = "vcc3v0_dvp";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-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 = <4700000>;
|
||||
+ regulator-max-microvolt = <5400000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ rk817_charger: charger {
|
||||
+ monitored-battery = <&battery>;
|
||||
+ rockchip,resistor-sense-micro-ohms = <10000>;
|
||||
+ rockchip,sleep-enter-current-microamp = <300000>;
|
||||
+ rockchip,sleep-filter-current-microamp = <100000>;
|
||||
+ };
|
||||
+
|
||||
+ rk817_codec: codec {
|
||||
+ rockchip,mic-in-differential;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* I2S 1 Channel Used Header(P2):1(GPIO2.C3),2(.C2), 3(.C1), 4(.C5), 5(.C4) */
|
||||
+&i2s1_2ch {
|
||||
+ status = "okay";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ vccio1-supply = <&vcc_1v8>;
|
||||
+ vccio2-supply = <&vccio_sd>;
|
||||
+ vccio3-supply = <&vcc3v0_dvp>;
|
||||
+ vccio4-supply = <&vcc_3v0>;
|
||||
+ vccio5-supply = <&vcc_3v0>;
|
||||
+ vccio6-supply = <&vcc_3v0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&isp {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&isp_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc3v0_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v0_pmu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&csi_dphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ card-detect-delay = <200>;
|
||||
+ cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> ff370000 PD_SDCARD 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;
|
||||
+ supports-sd;
|
||||
+ card-detect-delay = <200>;
|
||||
+ cd-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ u2phy_host: host-port {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ u2phy_otg: otg-port {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* FIQ Header(P2): 2(RXD:GPIO2.B4),3(TXD:.B6) */
|
||||
+&uart2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart2m1_xfer>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb20_otg {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&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_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <2 RK_PA1 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>,
|
||||
+ <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>,
|
||||
+ <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ btn_pins_vol: btn-pins-vol {
|
||||
+ rockchip,pins =
|
||||
+ <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
+ <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ headphone {
|
||||
+ hp_det: hp-det {
|
||||
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-led {
|
||||
+ led_pins: led-pins {
|
||||
+ rockchip,pins =
|
||||
+ <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <0 RK_PC7 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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-10 19:59:41.145131899 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-17 03:47:10.078350209 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -25,93 +25,40 @@
|
||||
compatible = "pwm-backlight";
|
||||
power-supply = <&vcc_bl>;
|
||||
|
@ -440,8 +1292,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi linux/a
|
|||
#clock-cells = <1>;
|
||||
#sound-dai-cells = <0>;
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-10 20:01:08.035253734 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-17 03:47:10.078350209 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -16,31 +16,187 @@
|
||||
mmc1 = &sdio;
|
||||
};
|
||||
|
@ -723,8 +1575,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts lin
|
|||
<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
<2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-10 20:00:44.034669037 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-17 03:47:10.078350209 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -12,30 +12,175 @@
|
||||
model = "ODROID-GO Advance";
|
||||
compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
|
||||
|
@ -957,8 +1809,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts linux/a
|
|||
+ };
|
||||
+};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-10 19:42:04.449146579 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-10 20:02:06.604676346 +0000
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-17 03:47:10.078350209 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -12,67 +12,196 @@
|
||||
model = "ODROID-GO Super";
|
||||
compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326";
|
||||
|
@ -1268,7 +2120,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts linux/a
|
|||
};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 2024-01-10 20:02:43.061559086 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 2024-01-17 03:59:58.108276677 +0000
|
||||
@@ -0,0 +1,280 @@
|
||||
+// 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-10 19:42:04.985158299 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-10 20:29:27.560112603 +0000
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-17 03:47:11.674388741 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-17 04:02:49.500183606 +0000
|
||||
@@ -107,6 +107,8 @@ static int kd35t133_unprepare(struct drm
|
||||
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-10 19:42:04.985158299 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-10 21:11:01.498070258 +0000
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-17 03:47:11.678388835 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-17 04:02:49.500183606 +0000
|
||||
@@ -28,6 +28,7 @@ struct nv3051d_panel_info {
|
||||
unsigned int num_modes;
|
||||
u16 width_mm, height_mm;
|
||||
|
@ -63,3 +63,557 @@ diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/driv
|
|||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match);
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-17 13:11:54.938356637 -0500
|
||||
+++ linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-17 12:48:04.770060000 -0500
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <linux/media-bus-format.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
-#include <linux/of.h>
|
||||
+#include <linux/of_device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <video/display_timing.h>
|
||||
@@ -46,6 +46,7 @@
|
||||
#define ST7703_CMD_SETIO 0xC7
|
||||
#define ST7703_CMD_SETCABC 0xC8
|
||||
#define ST7703_CMD_SETPANEL 0xCC
|
||||
+#define ST7703_CMD_UNKNOWN_C6 0xC6
|
||||
#define ST7703_CMD_SETGAMMA 0xE0
|
||||
#define ST7703_CMD_SETEQ 0xE3
|
||||
#define ST7703_CMD_SETGIP1 0xE9
|
||||
@@ -77,6 +78,14 @@ static inline struct st7703 *panel_to_st
|
||||
return container_of(panel, struct st7703, panel);
|
||||
}
|
||||
|
||||
+#define dsi_generic_write_seq(dsi, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
static int jh057n_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
@@ -86,27 +95,27 @@ static int jh057n_init_sequence(struct s
|
||||
* resemble the ST7703 but the number of parameters often don't match
|
||||
* so it's likely a clone.
|
||||
*/
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETEXTC,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETEXTC,
|
||||
0xF1, 0x12, 0x83);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
0x73, 0x73, 0x50, 0x50, 0x00, 0x00, 0x08, 0x70,
|
||||
0x00);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0x30);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0x30);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
0x07, 0x07, 0x0B, 0x0B, 0x03, 0x0B, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETBGP, 0x08, 0x08);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETBGP, 0x08, 0x08);
|
||||
msleep(20);
|
||||
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
0x82, 0x10, 0x06, 0x05, 0x9E, 0x0A, 0xA5, 0x12,
|
||||
0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
@@ -115,7 +124,7 @@ static int jh057n_init_sequence(struct s
|
||||
0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
@@ -124,7 +133,7 @@ static int jh057n_init_sequence(struct s
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0A,
|
||||
0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41, 0x37,
|
||||
0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10, 0x11,
|
||||
0x18, 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41,
|
||||
@@ -159,6 +168,15 @@ static const struct st7703_panel_desc jh
|
||||
.init_sequence = jh057n_init_sequence,
|
||||
};
|
||||
|
||||
+#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
+
|
||||
static int xbd599_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
@@ -168,9 +186,9 @@ static int xbd599_init_sequence(struct s
|
||||
*/
|
||||
|
||||
/* Magic sequence to unlock user commands below. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xF1, 0x12, 0x83);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xF1, 0x12, 0x83);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
|
||||
0x33, /* 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) */
|
||||
@@ -182,14 +200,14 @@ static int xbd599_init_sequence(struct s
|
||||
0x44, 0x25, 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02,
|
||||
0x4F, 0x11, 0x00, 0x00, 0x37);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT,
|
||||
0x25, /* PCCS = 2, ECP_DC_DIV = 1/4 HSYNC */
|
||||
0x22, /* DT = 15ms XDK_ECP = x2 */
|
||||
0x20, /* PFM_DC_DIV = /1 */
|
||||
0x03 /* ECP_SYNC_EN = 1, VGX_SYNC_EN = 1 */);
|
||||
|
||||
/* RGB I/F porch timing */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
0x10, /* VBP_RGB_GEN */
|
||||
0x10, /* VFP_RGB_GEN */
|
||||
0x05, /* DE_BP_RGB_GEN */
|
||||
@@ -200,7 +218,7 @@ static int xbd599_init_sequence(struct s
|
||||
0x00, 0x00);
|
||||
|
||||
/* Source driving settings. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
0x73, /* N_POPON */
|
||||
0x73, /* N_NOPON */
|
||||
0x50, /* I_POPON */
|
||||
@@ -212,19 +230,19 @@ static int xbd599_init_sequence(struct s
|
||||
0x00 /* Undocumented */);
|
||||
|
||||
/* NVDDD_SEL = -1.8V, VDDD_SEL = out of range (possibly 1.9V?) */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
+ 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);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
|
||||
/* Set display resolution. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP,
|
||||
0xF0, /* NL = 240 */
|
||||
0x12, /* RES_V_LSB = 0, BLK_CON = VSSD,
|
||||
* RESO_SEL = 720RGB
|
||||
@@ -234,7 +252,7 @@ static int xbd599_init_sequence(struct s
|
||||
* ISC = 0 frames
|
||||
*/);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
0x00, /* PNOEQ */
|
||||
0x00, /* NNOEQ */
|
||||
0x0B, /* PEQGND */
|
||||
@@ -254,9 +272,10 @@ static int xbd599_init_sequence(struct s
|
||||
* ESD_DET_TIME_SEL = 0 frames
|
||||
*/);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x01, 0x00, 0xFF, 0xFF, 0x00);
|
||||
+ /* Undocumented command. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_C6, 0x01, 0x00, 0xFF, 0xFF, 0x00);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
|
||||
0x74, /* VBTHS, VBTLS: VGH = 17V, VBL = -11V */
|
||||
0x00, /* FBOFF_VGH = 0, FBOFF_VGL = 0 */
|
||||
0x32, /* VRP */
|
||||
@@ -274,19 +293,20 @@ static int xbd599_init_sequence(struct s
|
||||
0x77 /* VGH3_R_DIV, VGL3_R_DIV (4.5MHz) */);
|
||||
|
||||
/* Reference voltage. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP,
|
||||
0x07, /* VREF_SEL = 4.2V */
|
||||
0x07 /* NVREF_SEL = 4.2V */);
|
||||
+ msleep(20);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM,
|
||||
0x2C, /* VCOMDC_F = -0.67V */
|
||||
0x2C /* VCOMDC_B = -0.67V */);
|
||||
|
||||
/* Undocumented command. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
|
||||
/* This command is to set forward GIP timing. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12,
|
||||
0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
@@ -297,7 +317,7 @@ static int xbd599_init_sequence(struct s
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
/* This command is to set backward GIP timing. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
@@ -308,7 +328,7 @@ static int xbd599_init_sequence(struct s
|
||||
0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
/* Adjust the gamma characteristics of the panel. */
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
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
|
||||
.init_sequence = xbd599_init_sequence,
|
||||
};
|
||||
|
||||
-static int rg353v2_init_sequence(struct st7703 *ctx)
|
||||
+#define dsi_generic_write_seq(dsi, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
+static int rg351v2_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
||||
@@ -349,44 +377,44 @@ static int rg353v2_init_sequence(struct
|
||||
* Init sequence was supplied by the panel vendor.
|
||||
*/
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETAPID, 0x00, 0x00, 0x00,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETAPID, 0x00, 0x00, 0x00,
|
||||
0xda, 0x80);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x00, 0x13, 0x70);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x00, 0x13, 0x70);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28,
|
||||
0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
|
||||
0xf0, 0x63);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
|
||||
0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x44, 0x25, 0x00, 0x90, 0x0a,
|
||||
0x00, 0x00, 0x01, 0x4f, 0x01, 0x00, 0x00, 0x37);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x47);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x47);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50,
|
||||
0x00, 0x00, 0x12, 0x50, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x53, 0xc0, 0x32,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x53, 0xc0, 0x32,
|
||||
0x32, 0x77, 0xe1, 0xdd, 0xdd, 0x77, 0x77, 0x33,
|
||||
0x33);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x82, 0x00, 0xbf, 0xff,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x82, 0x00, 0xbf, 0xff,
|
||||
0x00, 0xff);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETIO, 0xb8, 0x00, 0x0a, 0x00,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETIO, 0xb8, 0x00, 0x0a, 0x00,
|
||||
0x00, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCABC, 0x10, 0x40, 0x1e,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCABC, 0x10, 0x40, 0x1e,
|
||||
0x02);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x07, 0x0d,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x07, 0x0d,
|
||||
0x37, 0x35, 0x3f, 0x41, 0x44, 0x06, 0x0c, 0x0d,
|
||||
0x0f, 0x11, 0x10, 0x12, 0x14, 0x1a, 0x00, 0x07,
|
||||
0x0d, 0x37, 0x35, 0x3f, 0x41, 0x44, 0x06, 0x0c,
|
||||
0x0d, 0x0f, 0x11, 0x10, 0x12, 0x14, 0x1a);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b,
|
||||
0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0xc0, 0x10);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x02, 0x00,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x02, 0x00,
|
||||
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
|
||||
0x18, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x97, 0x0a, 0x82, 0x02,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x97, 0x0a, 0x82, 0x02,
|
||||
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
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_EF, 0xff, 0xff, 0x01);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_EF, 0xff, 0xff, 0x01);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static const struct drm_display_mode rg353v2_mode = {
|
||||
+static const struct drm_display_mode rg351v2_mode = {
|
||||
.hdisplay = 640,
|
||||
.hsync_start = 640 + 40,
|
||||
.hsync_end = 640 + 40 + 2,
|
||||
@@ -424,15 +452,117 @@ static const struct drm_display_mode rg3
|
||||
.height_mm = 57,
|
||||
};
|
||||
|
||||
-static const struct st7703_panel_desc rg353v2_desc = {
|
||||
- .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,
|
||||
+ .init_sequence = rg351v2_init_sequence,
|
||||
+};
|
||||
+
|
||||
+static int xu10_init_sequence(struct st7703 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ /*
|
||||
+ * Init sequence was supplied by the panel vendor.
|
||||
+ */
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETAPID, 0x00, 0x00, 0x00,
|
||||
+ 0xda, 0x80);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x00, 0x03, 0xf0);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28,
|
||||
+ 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x8e, 0x8e);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x22,
|
||||
+ 0xf0, 0x13);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
|
||||
+ 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x44, 0x25, 0x00, 0x90, 0x0a,
|
||||
+ 0x00, 0x00, 0x01, 0x4f, 0x01, 0x00, 0x00, 0x37);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x47);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50,
|
||||
+ 0x00, 0x00, 0x12, 0x70, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x53, 0x00, 0x32,
|
||||
+ 0x32, 0x77, 0xd1, 0xcc, 0xcc, 0x77, 0x77, 0x33,
|
||||
+ 0x33);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x82, 0x00, 0xbf, 0xff,
|
||||
+ 0x00, 0xff);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETIO, 0xb8, 0x00, 0x0a, 0x00,
|
||||
+ 0x00, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCABC, 0x10, 0x40, 0x1e,
|
||||
+ 0x02);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x06, 0x0a,
|
||||
+ 0x2a, 0x3d, 0x3f, 0x3b, 0x37, 0x06, 0x0b, 0x0c,
|
||||
+ 0x10, 0x11, 0x10, 0x13, 0x12, 0x18, 0x00, 0x06,
|
||||
+ 0x0a, 0x2a, 0x3d, 0x3f, 0x3b, 0x37, 0x06, 0x0b,
|
||||
+ 0x0c, 0x10, 0x11, 0x10, 0x13, 0x12, 0x18);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b,
|
||||
+ 0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
+ 0xc0, 0x10);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x02, 0x00,
|
||||
+ 0x00, 0xb0, 0xb1, 0x11, 0x31, 0x23, 0x28, 0x80,
|
||||
+ 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);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x97, 0x0a, 0x82, 0x02,
|
||||
+ 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x81, 0x88, 0xba, 0x17, 0x53, 0x88, 0x88, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x80, 0x88, 0xba, 0x06, 0x42,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x23, 0x00,
|
||||
+ 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);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_EF, 0xff, 0xff, 0x01, 0x05, 0x96, 0x01, 0x11, 0x05, 0x78, 0x01, 0x29);
|
||||
+ //dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_EF, 0xff, 0xff, 0x01);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_display_mode xu10_mode = {
|
||||
+ .hdisplay = 640,
|
||||
+ .hsync_start = 640 + 120,
|
||||
+ .hsync_end = 640 + 120 + 10,
|
||||
+ .htotal = 640 + 120 + 10 + 120,
|
||||
+ .vdisplay = 480,
|
||||
+ .vsync_start = 480 + 17,
|
||||
+ .vsync_end = 480 + 17 + 4,
|
||||
+ .vtotal = 480 + 17 + 4 + 13,
|
||||
+ .clock = 27438,
|
||||
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+ .width_mm = 70,
|
||||
+ .height_mm = 52,
|
||||
+};
|
||||
+
|
||||
+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,
|
||||
+ .init_sequence = xu10_init_sequence,
|
||||
};
|
||||
|
||||
+#define dsi_generic_write_seq(dsi, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
static int rgb30panel_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
@@ -446,31 +576,31 @@ static int rgb30panel_init_sequence(stru
|
||||
mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
msleep(250);
|
||||
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9,
|
||||
0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x44, 0x25, 0x00, 0x90, 0x0a, 0x00,
|
||||
0x00, 0x01, 0x4f, 0x01, 0x00, 0x00, 0x37);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22, 0xf0,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22, 0xf0,
|
||||
0x63);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28,
|
||||
0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50,
|
||||
0x00, 0x00, 0x12, 0x70, 0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x46);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x3c, 0x12, 0x30);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x46);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x3c, 0x12, 0x30);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b,
|
||||
0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0xc0, 0x10);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x36, 0x00, 0x32,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x36, 0x00, 0x32,
|
||||
0x32, 0x77, 0xf1, 0xcc, 0xcc, 0x77, 0x77, 0x33,
|
||||
0x33);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x88, 0x88);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x0a, 0x10,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x88, 0x88);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x0a, 0x10,
|
||||
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 +609,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);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x96, 0x12, 0x01, 0x01,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x96, 0x12, 0x01, 0x01,
|
||||
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 +618,7 @@ static int rgb30panel_init_sequence(stru
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x40, 0xa1, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00);
|
||||
- mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x0a, 0x0f,
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x0a, 0x0f,
|
||||
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 +797,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");
|
||||
- mipi_dsi_generic_write_seq(dsi, ST7703_CMD_ALL_PIXEL_ON);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_ALL_PIXEL_ON);
|
||||
msleep(val * 1000);
|
||||
/* Reset the panel to get video back */
|
||||
drm_panel_disable(&ctx->panel);
|
||||
@@ -783,7 +913,8 @@ static void st7703_remove(struct mipi_ds
|
||||
}
|
||||
|
||||
static const struct of_device_id st7703_of_match[] = {
|
||||
- { .compatible = "anbernic,rg353v-panel-v2", .data = &rg353v2_desc },
|
||||
+ { .compatible = "magicx,xu10-panel", .data = &xu10_desc },
|
||||
+ { .compatible = "anbernic,rg351v-panel-v2", .data = &rg351v2_desc },
|
||||
{ .compatible = "powkiddy,rgb30-panel", .data = &rgb30panel_desc },
|
||||
{ .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc },
|
||||
{ .compatible = "xingbangda,xbd599", .data = &xbd599_desc },
|
||||
@@ -802,6 +933,6 @@ static struct mipi_dsi_driver st7703_dri
|
||||
};
|
||||
module_mipi_dsi_driver(st7703_driver);
|
||||
|
||||
-MODULE_AUTHOR("Guido Günther <agx@sigxcpu.org>");
|
||||
+MODULE_AUTHOR("Guido Gأ¼nther <agx@sigxcpu.org>");
|
||||
MODULE_DESCRIPTION("DRM driver for Sitronix ST7703 based MIPI DSI panels");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,7 @@
|
|||
diff --git a/cmd/hwrev.c b/cmd/hwrev.c
|
||||
index 640397e1cb..f11de075e4 100644
|
||||
--- a/cmd/hwrev.c
|
||||
+++ b/cmd/hwrev.c
|
||||
@@ -34,6 +34,16 @@ int do_hwrev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
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,
|
||||
env_set("hwrev", "v10-go3");
|
||||
env_set("dtb_name", "rk3326-odroidgo3-linux.dtb");
|
||||
}
|
||||
|
@ -15,6 +14,11 @@ index 640397e1cb..f11de075e4 100644
|
|||
+ else if (check_range(140, 190, hwrev_adc)) {
|
||||
+ env_set("hwrev", "rg351mp");
|
||||
+ env_set("dtb_name", "rk3326-anbernic-rg351mp.dtb");
|
||||
+ }
|
||||
+ /* XU10 */
|
||||
+ else if (check_range(1000, 1050, hwrev_adc)) {
|
||||
+ env_set("hwrev", "xu10");
|
||||
+ env_set("dtb_name", "rk3326-magicx-xu10.dtb");
|
||||
+ }
|
||||
/* engineer samples */
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue