Support Orange Pi RV

This commit is contained in:
baiywt
2024-05-24 20:52:08 +08:00
parent 6968742411
commit dc219a5b8c
59 changed files with 6115 additions and 694 deletions

Binary file not shown.

View File

@@ -391,6 +391,18 @@ prepare_board() {
gpio mode 28 up
gpio read 28
;;
orangepirv)
echo 30 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio30/direction
echo 0 > /sys/class/gpio/gpio30/value
sleep 1
echo 1 > /sys/class/gpio/gpio30/value
/usr/bin/brcm_patchram_plus -d --enable_hci --no2bytes --tosleep 200000 \
--baudrate 115200 --patchram /lib/firmware/BCM4345C5.hcd /dev/ttyS1 &
media-ctl --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/1920x1080]'
/opt/media-ctl-pipeline.sh -d /dev/media0 -i csiphy0 -s ISP0 -a start
/opt/ISP/stf_isp_ctrl -m imx219mipi -j 0 -a 1 &
;;
esac

View File

@@ -0,0 +1,6 @@
COGL_DRIVER=gles2
GST_GL_API=gles2
CLUTTER_PAINT="disable-clipped-redraws"
XWAYLAND_NO_GLAMOR=1
SDL_VIDEODRIVER=wayland
MESA_LOADER_DRIVER_OVERRIDE=pvr

View File

@@ -0,0 +1,8 @@
#!/bin/sh
# Copy firmware file to initrd
#
mkdir -p "${DESTDIR}"/lib/firmware
cp -rf /lib/firmware/rgx.* "${DESTDIR}"/lib/firmware
exit 0

View File

@@ -0,0 +1 @@
ENV{DEVNAME}=="/dev/dri/card1", TAG+="mutter-device-preferred-primary"

View File

@@ -0,0 +1,9 @@
ACTION=="remove", GOTO="permissions_end"
# VPU devices
KERNEL=="vdec", MODE="0660", GROUP="video"
KERNEL=="venc", MODE="0660", GROUP="video"
KERNEL=="jpu", MODE="0660", GROUP="video"
LABEL="permissions_end"

View File

@@ -0,0 +1,8 @@
#!/bin/bash
echo 30 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio30/direction
echo 0 > /sys/class/gpio/gpio30/value
sleep 1
echo 1 > /sys/class/gpio/gpio30/value
/usr/bin/brcm_patchram_plus -d --enable_hci --no2bytes --tosleep 200000 --baudrate 115200 --patchram /lib/firmware/BCM4345C5.hcd /dev/ttyS1 &

Binary file not shown.

BIN
external/packages/bsp/jh7110/usr/bin/memtester vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,19 @@
Section "OutputClass"
Identifier "Starfive Display"
MatchDriver "starfive"
Driver "modesetting"
Option "PrimaryGPU" "true"
#Option "AccelMethod" "no"
Option "SWcursor" "false"
Option "NoCursor" "true"
Option "ShadowFB" "true"
Option "Atomic" "true"
Option "DoubleShadow" "true"
Option "PageFlip" "true"
Option "VariableRefresh" "true"
Option "AsyncFlipSecondaries" "true"
EndSection
#Section "Extensions"
#Option "glx" "Disable"
#Option "Composite" "Disable"
#EndSection

View File

@@ -0,0 +1,66 @@
rename_audiojack_rule = {
matches = {
{
{ "api.alsa.card.name", "equals", "Starfive-PWMDAC-Sound-Card" },
},
},
apply_properties = {
["node.description"] = "Audio Jack",
},
}
rename_hdmi_audio_rule = {
matches = {
{
{"api.alsa.card.name", "equals", "Starfive-HDMI-Sound-Card"},
},
},
apply_properties = {
["node.description"] = "HDMI Audio",
},
}
rename_wm8960_rule = {
matches = {
{
{"api.alsa.card.name", "equals", "Starfive-WM8960-Sound-Card"},
},
},
apply_properties = {
["node.description"] = "WM8960 Audio",
},
}
table.insert(alsa_monitor.rules, rename_wm8960_rule)
table.insert(alsa_monitor.rules, rename_audiojack_rule)
table.insert(alsa_monitor.rules, rename_hdmi_audio_rule)
rename_audiojack_rule = {
matches = {
{
{ "api.alsa.card.name", "equals", "Starfive-PWMDAC-Sound-Card" },
},
},
apply_properties = {
["node.description"] = "Audio Jack",
},
}
rename_hdmi_audio_rule = {
matches = {
{
{"api.alsa.card.name", "equals", "Starfive-HDMI-Sound-Card"},
},
},
apply_properties = {
["node.description"] = "HDMI Audio",
},
}
rename_wm8960_rule = {
matches = {
{
{"api.alsa.card.name", "equals", "Starfive-WM8960-Sound-Card"},
},
},
apply_properties = {
["node.description"] = "WM8960 Audio",
},
}
table.insert(alsa_monitor.rules, rename_wm8960_rule)
table.insert(alsa_monitor.rules, rename_audiojack_rule)
table.insert(alsa_monitor.rules, rename_hdmi_audio_rule)