mirror of
https://github.com/Fishwaldo/meta-riscv.git
synced 2025-03-15 19:41:42 +00:00
Ptv (#1)
* initial ptv config * Latest Updates: * Move Charger Driver over to TI BQ25890 driver from mainline (and backport from 6.5 release) * Fix up BQ25890 to work with the SC89890H which is in the PtV * Drop vendor es8316 patches and backport es8316 patches from 6.5 * Update DT file for - New Charger Driver, with battery and charger profiles derived from PT2 - Fix rfkill for BT/Wifi (was using incorrect GPIO and radio-type - change hall sensors to emit SW_LID event - add simple-battery profile from PT2 (needs a audit of used params tho) - Fix Camera Flash Entry - Fix backlight off by setting PullDown Mode on Backlight GPIO - Start work on es8316 dt entry. - add speaker_amp entry to turn on/off speakers when not used - add audio routing and widgets based on PineBook Pro * Update PtV kernel and new image layout specifically for PtV
This commit is contained in:
parent
2a27909f0d
commit
8ab08c866b
6 changed files with 2709 additions and 8 deletions
28
conf/machine/pinetabv.conf
Normal file
28
conf/machine/pinetabv.conf
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: PineTabV
|
||||||
|
#@SOC: StarFive JH7110
|
||||||
|
#@DESCRIPTION: Machine configuration for the PineTabV board
|
||||||
|
|
||||||
|
require conf/machine/JH7110.inc
|
||||||
|
|
||||||
|
EXTRA_IMAGEDEPENDS:remove = "u-boot-starfive"
|
||||||
|
|
||||||
|
RISCV_SBI_FDT = "pine64_pinetabv.dtb"
|
||||||
|
|
||||||
|
KERNEL_DEVICETREE = "starfive/jh7110-pine64-pinetabv.dtb"
|
||||||
|
|
||||||
|
UBOOT_MACHINE = "pine64_pinetabv_defconfig"
|
||||||
|
UBOOT_DTB_BINARY = "pine64_pinetabv.dtb"
|
||||||
|
|
||||||
|
IMAGE_BOOT_FILES = " \
|
||||||
|
fitImage-star64-image-initramfs-pinetabv-pinetabv;${KERNEL_IMAGETYPE} \
|
||||||
|
uEnv.txt \
|
||||||
|
"
|
||||||
|
|
||||||
|
## wic default support
|
||||||
|
WKS_FILE_DEPENDS = " \
|
||||||
|
e2fsprogs-native \
|
||||||
|
bmap-tools-native \
|
||||||
|
"
|
||||||
|
|
||||||
|
WKS_FILE = "pinetabv.wks"
|
File diff suppressed because it is too large
Load diff
32
recipes-bsp/u-boot/u-boot-starfive/uEnv-pinetabv.txt
Normal file
32
recipes-bsp/u-boot/u-boot-starfive/uEnv-pinetabv.txt
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# This is the sample jh7110_uEnv.txt file for starfive visionfive U-boot
|
||||||
|
# The current convention (SUBJECT TO CHANGE) is that this file
|
||||||
|
# will be loaded from the third partition on the
|
||||||
|
# MMC card.
|
||||||
|
#devnum=1
|
||||||
|
partnum=3
|
||||||
|
|
||||||
|
# The FIT file to boot from
|
||||||
|
fitfile=fitImage
|
||||||
|
|
||||||
|
# for debugging boot
|
||||||
|
bootargs_ext=if test ${devnum} = 0; then setenv bootargs "earlyprintk console=tty1 console=ttyS0,115200 rootwait earlycon=sbi root=/dev/mmcblk0p4"; else setenv bootargs "earlyprintk console=tty1 console=ttyS0,115200 rootwait earlycon=sbi root=/dev/mmcblk1p4"; fi;
|
||||||
|
#bootargs=earlyprintk console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk1p4
|
||||||
|
|
||||||
|
# for addr info
|
||||||
|
fileaddr=0xa0000000
|
||||||
|
fdtaddr=0x46000000
|
||||||
|
# boot Linux flat or compressed 'Image' stored at 'kernel_addr_r'
|
||||||
|
kernel_addr_r=0x40200000
|
||||||
|
irdaddr=46100000
|
||||||
|
irdsize=5f00000
|
||||||
|
|
||||||
|
# Use the FDT in the FIT image..
|
||||||
|
setupfdt1=fdt addr ${fdtaddr}; fdt resize;
|
||||||
|
|
||||||
|
setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
|
||||||
|
|
||||||
|
setupfdt2=fdt set /chosen bootargs "${bootargs}";
|
||||||
|
|
||||||
|
bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done
|
||||||
|
|
||||||
|
boot2=run bootargs_ext; mmc dev ${devnum}; fatload mmc ${devnum}:${partnum} ${fileaddr} ${fitfile}; bootm start ${fileaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${fileaddr}; run chipa_set_linux; run cpu_vol_set; echo "Booting kernel in"; booti ${kernel_addr_r} ${irdaddr}:${filesize} ${fdtaddr}
|
|
@ -9,6 +9,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||||
|
|
||||||
BRANCH:visionfive2 = "JH7110_VisionFive2_devel"
|
BRANCH:visionfive2 = "JH7110_VisionFive2_devel"
|
||||||
BRANCH:star64 = "Star64"
|
BRANCH:star64 = "Star64"
|
||||||
|
BRANCH:pinetabv = "Star64"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/starfive-tech/u-boot.git;protocol=https;branch=${BRANCH} \
|
SRC_URI = "git://github.com/starfive-tech/u-boot.git;protocol=https;branch=${BRANCH} \
|
||||||
file://tftp-mmc-boot.txt \
|
file://tftp-mmc-boot.txt \
|
||||||
|
@ -16,21 +17,24 @@ SRC_URI = "git://github.com/starfive-tech/u-boot.git;protocol=https;branch=${BRA
|
||||||
|
|
||||||
SRC_URI:star64 = "git://github.com/Fishwaldo/u-boot.git;protocol=https;branch=${BRANCH} \
|
SRC_URI:star64 = "git://github.com/Fishwaldo/u-boot.git;protocol=https;branch=${BRANCH} \
|
||||||
file://tftp-mmc-boot.txt \
|
file://tftp-mmc-boot.txt \
|
||||||
|
file://uEnv-star64.txt \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRC_URI:pinetabv = "git://github.com/Fishwaldo/u-boot.git;protocol=https;branch=${BRANCH} \
|
||||||
|
file://0001-add-initial-pinetabv-config.patch \
|
||||||
|
file://tftp-mmc-boot.txt \
|
||||||
|
file://uEnv-pinetabv.txt \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI:append:visionfive2 = " \
|
SRC_URI:append:visionfive2 = " \
|
||||||
file://uEnv-visionfive2.txt \
|
file://uEnv-visionfive2.txt \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI:append:star64 = " \
|
|
||||||
file://uEnv-star64.txt \
|
|
||||||
"
|
|
||||||
|
|
||||||
|
|
||||||
# tag VF2_v3.0.4
|
# tag VF2_v3.0.4
|
||||||
SRCREV:visionfive2 = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
|
SRCREV:visionfive2 = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
|
||||||
SRCREV:star64 = "172b47f62039605d6806fa96bd403c21cda28996"
|
SRCREV:star64 = "172b47f62039605d6806fa96bd403c21cda28996"
|
||||||
|
SRCREV:pinetabv = "172b47f62039605d6806fa96bd403c21cda28996"
|
||||||
|
|
||||||
DEPENDS:append = " u-boot-tools-native"
|
DEPENDS:append = " u-boot-tools-native"
|
||||||
|
|
||||||
|
@ -59,6 +63,13 @@ do_deploy:append:star64() {
|
||||||
ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out
|
ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_deploy:append:pinetabv() {
|
||||||
|
install -m 644 ${WORKDIR}/uEnv-pinetabv.txt ${DEPLOYDIR}/uEnv.txt
|
||||||
|
spl_tool -c -f ${DEPLOYDIR}/${SPL_IMAGE}
|
||||||
|
ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out
|
||||||
|
ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "jh7110"
|
COMPATIBLE_MACHINE = "jh7110"
|
||||||
|
|
||||||
|
|
|
@ -10,21 +10,25 @@ SRCREV = "${AUTOREV}"
|
||||||
# pin srcrev for now to have a fixed target
|
# pin srcrev for now to have a fixed target
|
||||||
# release VF2_v2.11.5
|
# release VF2_v2.11.5
|
||||||
SRCREV:visionfive2 = "d9eee31aaec51ade1641391836c1f07dd2151a4a"
|
SRCREV:visionfive2 = "d9eee31aaec51ade1641391836c1f07dd2151a4a"
|
||||||
SRCREV:star64 = "765947eacb2408a3a232cbe8093bf28a991f3c35"
|
SRCREV:star64 = "6463c8e29d5ccd0d9d60d5e34f320ef61e5d260d"
|
||||||
|
SRCREV:pinetabv = "6463c8e29d5ccd0d9d60d5e34f320ef61e5d260d"
|
||||||
|
|
||||||
BRANCH = "visionfive"
|
BRANCH = "visionfive"
|
||||||
BRANCH:visionfive2 = "JH7110_VisionFive2_devel"
|
BRANCH:visionfive2 = "JH7110_VisionFive2_devel"
|
||||||
BRANCH:star64 = "Star64_devel"
|
BRANCH:star64 = "Star64_devel"
|
||||||
|
BRANCH:pinetabv = "Star64_devel"
|
||||||
|
|
||||||
FORK ?= "starfive-tech"
|
FORK ?= "starfive-tech"
|
||||||
FORK:star64 ?= "Fishwaldo"
|
FORK:star64 ?= "Fishwaldo"
|
||||||
|
FORK:pinetabv ?= "Fishwaldo"
|
||||||
|
|
||||||
REPO ?= "linux"
|
REPO ?= "linux"
|
||||||
REPO:star64 ?= "Star64_linux"
|
REPO:star64 ?= "Star64_linux"
|
||||||
|
REPO:pinetabv ?= "Star64_linux"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/${FORK}/${REPO}.git;protocol=https;branch=${BRANCH} \
|
SRC_URI = "git://github.com/${FORK}/${REPO}.git;protocol=https;branch=${BRANCH} \
|
||||||
file://modules.cfg \
|
file://modules.cfg \
|
||||||
"
|
"
|
||||||
SRC_URI:append:beaglev-starlight-jh7100 = " \
|
SRC_URI:append:beaglev-starlight-jh7100 = " \
|
||||||
file://extra.cfg \
|
file://extra.cfg \
|
||||||
"
|
"
|
||||||
|
@ -39,12 +43,13 @@ SRC_URI:append:jh7110 = " \
|
||||||
LINUX_VERSION ?= "6.2.0"
|
LINUX_VERSION ?= "6.2.0"
|
||||||
LINUX_VERSION:visionfive2 = "5.15.0"
|
LINUX_VERSION:visionfive2 = "5.15.0"
|
||||||
LINUX_VERSION:star64 = "5.15.115"
|
LINUX_VERSION:star64 = "5.15.115"
|
||||||
|
LINUX_VERSION:pinetabv = "5.15.115"
|
||||||
LINUX_VERSION_EXTENSION:append:beaglev-starlight-jh7100 = "-starlight"
|
LINUX_VERSION_EXTENSION:append:beaglev-starlight-jh7100 = "-starlight"
|
||||||
|
|
||||||
KBUILD_DEFCONFIG:beaglev-starlight-jh7100 = "starfive_jh7100_fedora_defconfig"
|
KBUILD_DEFCONFIG:beaglev-starlight-jh7100 = "starfive_jh7100_fedora_defconfig"
|
||||||
KBUILD_DEFCONFIG:visionfive = "visionfive_defconfig"
|
KBUILD_DEFCONFIG:visionfive = "visionfive_defconfig"
|
||||||
KBUILD_DEFCONFIG:visionfive2 = "starfive_visionfive2_defconfig"
|
KBUILD_DEFCONFIG:visionfive2 = "starfive_visionfive2_defconfig"
|
||||||
KBUILD_DEFCONFIG:star64 = "pine64_star64_defconfig"
|
KBUILD_DEFCONFIG:star64 = "pine64_star64_defconfig"
|
||||||
|
KBUILD_DEFCONFIG:pinetabv = "pine64_pinetabv_defconfig"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "(beaglev-starlight-jh7100|visionfive|jh7110)"
|
COMPATIBLE_MACHINE = "(beaglev-starlight-jh7100|visionfive|jh7110)"
|
||||||
|
|
21
wic/pinetabv.wks
Normal file
21
wic/pinetabv.wks
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# short-description: Create a bootable SD card/EMMC image for Pine64 PineTabv board
|
||||||
|
# long-description:
|
||||||
|
# Create a bootable image that can be written onto a SD card using dd for use
|
||||||
|
# with Pine64 PineTabv
|
||||||
|
#
|
||||||
|
# Factory u-boot expects the /boot partition to be at position 3, so create 2 empty partitions at the start of the Image
|
||||||
|
# PineTabV is not setup to load uboot from a SD Card, only SPI or UART, so we skip installing spl/u-boot
|
||||||
|
#
|
||||||
|
# The disk layout used is:
|
||||||
|
# --------------- --------------
|
||||||
|
# | boot | rootfs |
|
||||||
|
# --------------- --------------
|
||||||
|
# ^ ^
|
||||||
|
# | |
|
||||||
|
# 0 300MiB + rootfs + IMAGE_EXTRA_SPACE
|
||||||
|
#
|
||||||
|
part emtpy1 --source empty --ondisk mmcblk --size="2048k" --label emtpy1
|
||||||
|
part empty2 --source empty --ondisk mmcblk --size="2048k" --label empty2
|
||||||
|
part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --use-uuid --part-name boot --part-type EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 --align 4096 --size 292M
|
||||||
|
part /root --source rootfs --ondisk mmcblk --fstype=ext4 --part-name root --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --active --label root --align 4096
|
||||||
|
bootloader --ptable gpt
|
Loading…
Add table
Reference in a new issue