cutiepi-tablet: new device (MR 3737)
This adds initial support to CutiePi tablet, with basic peripherals, sound, touchscreen, and wireless support. Signed-off-by: Raffaele Tranquillini <raffaele.tranquillini@gmail.com> Add peripheral overlays Signed-off-by: Raffaele Tranquillini <raffaele.tranquillini@gmail.com> [ci:skip-build]: Already built successfully in CI
This commit is contained in:
parent
433e4155f1
commit
1bb85eecbd
10 changed files with 191 additions and 0 deletions
|
@ -0,0 +1 @@
|
||||||
|
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"
|
61
device/testing/device-cutiepi-tablet/APKBUILD
Normal file
61
device/testing/device-cutiepi-tablet/APKBUILD
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# Maintainer: Raffaele Tranquillini <raffaele.tranquillini@gmail.com>
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-cutiepi-tablet
|
||||||
|
pkgdesc="CutiePi Tablet"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="postmarketos-base raspberrypi-bootloader linux-rpi4"
|
||||||
|
makedepends="devicepkg-dev dtc"
|
||||||
|
install="$pkgname.post-install $pkgname.post-upgrade"
|
||||||
|
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||||
|
source="deviceinfo
|
||||||
|
mpu6050-i2c5-overlay.dts
|
||||||
|
backlight.rules
|
||||||
|
config.txt
|
||||||
|
usercfg.txt
|
||||||
|
cmdline.txt
|
||||||
|
95-vchiq-permissions.rules
|
||||||
|
"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
dtc -@ -I dts -O dtb -o mpu6050-i2c5.dtbo mpu6050-i2c5-overlay.dts
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
install -Dm644 "$srcdir"/config.txt "$pkgdir"/boot/config.txt
|
||||||
|
install -Dm644 "$srcdir"/usercfg.txt "$pkgdir"/boot/usercfg.txt
|
||||||
|
install -Dm644 "$srcdir"/cmdline.txt "$pkgdir"/boot/cmdline.txt
|
||||||
|
install -Dm644 "$srcdir"/mpu6050-i2c5.dtbo \
|
||||||
|
"$pkgdir"/boot/overlays/mpu6050-i2c5.dtbo
|
||||||
|
install -Dm644 "$srcdir"/95-vchiq-permissions.rules \
|
||||||
|
"$pkgdir"/etc/udev/rules.d/95-vchiq-permissions.rules
|
||||||
|
install -Dm644 "$srcdir"/backlight.rules \
|
||||||
|
"$pkgdir"/etc/udev/rules.d/backlight.rules
|
||||||
|
}
|
||||||
|
|
||||||
|
nonfree_firmware() {
|
||||||
|
pkgdesc="WiFi/Bluetooth firmware"
|
||||||
|
depends="linux-firmware-brcm"
|
||||||
|
mkdir -p "$subpkgdir"/lib/firmware/brcm
|
||||||
|
ln -s "/lib/firmware/brcm/brcmfmac43455-sdio.bin" \
|
||||||
|
"$subpkgdir"/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.bin
|
||||||
|
ln -s "/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt" \
|
||||||
|
"$subpkgdir"/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
6e7b92616b8cf8bc4752ab8dd48fa48c9b9c80cbd616b9e9ee9223eac8dcdcf1d5b2a6c4cc1ceb6d04ebe03702141735aa62109546226fc5de50d37ca5920c07 deviceinfo
|
||||||
|
afc9f83be2b4d089fa1e2c17f7fcfe7f5131233c5f3ff7bca1d95e080416088c5d2f65b7146021fca6eec492ad67961d1fb5ee58b02fb9ddfa7b5b2a586e238d mpu6050-i2c5-overlay.dts
|
||||||
|
9fbf1e8fcad332980b345b1a5eb0b92e752e6f5490027084f5d5713dc113ea20c71932a44ec5a0e077798fee99e52b8db13c8bb2cd263f4d39bfe9d27ca51b2d backlight.rules
|
||||||
|
26d14d996561ef29de965bdcd9e2ee93192e76c7ab08c805f71bab550d7c938248ca72c744c78f351791d3312751f60ed74b21ce3e16515ceff2a03e0f8e8c01 config.txt
|
||||||
|
2d69cf6b05c3a97dde203fd2b174e7817ac85680f8f5adc607bdb0e888dde3e448a5e91848c899ad49fe5f777facba0050ffa25402e5babd1992958bcbd92fd8 usercfg.txt
|
||||||
|
ae3de0b8fec07d3a283dc3c06bf8678eec1e65c9faf0b7f4fdc9fb92751e324d1f8e2fb224dbbf561b7e5a6fb34769bfa1657858375f74b101a130d78e0737e2 cmdline.txt
|
||||||
|
7e5505cb07d5b4a81bd28443d508336b5c547356538f1c06f91ed93ad0d7d456d4f74f1d24df5a2e08c17e74f0a66607352ac4874e967e9a91dfec9522d2d58d 95-vchiq-permissions.rules
|
||||||
|
"
|
4
device/testing/device-cutiepi-tablet/backlight.rules
Normal file
4
device/testing/device-cutiepi-tablet/backlight.rules
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="rpi_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||||
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="rpi_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||||
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="rpi_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/bl_power"
|
||||||
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="rpi_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/bl_power"
|
1
device/testing/device-cutiepi-tablet/cmdline.txt
Normal file
1
device/testing/device-cutiepi-tablet/cmdline.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
modules=loop,squashfs,sd-mod,usb-storage quiet dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1
|
17
device/testing/device-cutiepi-tablet/config.txt
Normal file
17
device/testing/device-cutiepi-tablet/config.txt
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
boot_delay=0
|
||||||
|
|
||||||
|
arm_control=0x200
|
||||||
|
arm_64bit=1
|
||||||
|
arm_boost=1
|
||||||
|
|
||||||
|
kernel=vmlinuz-rpi4
|
||||||
|
initramfs initramfs
|
||||||
|
|
||||||
|
dtoverlay=vc4-kms-v3d-pi4
|
||||||
|
max_framebuffers=2
|
||||||
|
|
||||||
|
display_auto_detect=1
|
||||||
|
camera_auto_detect=1
|
||||||
|
|
||||||
|
|
||||||
|
include usercfg.txt
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rc-update add swclock boot
|
|
@ -0,0 +1 @@
|
||||||
|
device-cutiepi-tablet.post-install
|
22
device/testing/device-cutiepi-tablet/deviceinfo
Normal file
22
device/testing/device-cutiepi-tablet/deviceinfo
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="CutiePi Tablet"
|
||||||
|
deviceinfo_manufacturer="CutiePi"
|
||||||
|
deviceinfo_codename="cutiepi-tablet"
|
||||||
|
deviceinfo_year="2021"
|
||||||
|
deviceinfo_modules_initfs="vc4"
|
||||||
|
deviceinfo_arch="aarch64"
|
||||||
|
deviceinfo_disable_dhcpd="true"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="tablet"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="1280"
|
||||||
|
deviceinfo_screen_height="720"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="none"
|
||||||
|
deviceinfo_boot_filesystem="fat16"
|
|
@ -0,0 +1,30 @@
|
||||||
|
// Definitions for MPU6050
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "brcm,bcm2835";
|
||||||
|
|
||||||
|
fragment@0 {
|
||||||
|
target = <&i2c5>;
|
||||||
|
__overlay__ {
|
||||||
|
#address-cells = <5>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <400000>;
|
||||||
|
|
||||||
|
mpu6050: mpu6050@68 {
|
||||||
|
compatible = "invensense,mpu6050";
|
||||||
|
reg = <0x68>;
|
||||||
|
interrupt-parent = <&gpio>;
|
||||||
|
interrupts = <4 1>;
|
||||||
|
mount-matrix = "1", "0", "0", "0", "-1", "0", "0", "0", "1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
__overrides__ {
|
||||||
|
interrupt = <&mpu6050>,"interrupts:0";
|
||||||
|
addr = <&mpu6050>,"reg:0";
|
||||||
|
};
|
||||||
|
};
|
51
device/testing/device-cutiepi-tablet/usercfg.txt
Normal file
51
device/testing/device-cutiepi-tablet/usercfg.txt
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# to take advantage of your high speed sd card
|
||||||
|
dtparam=sd_overclock=100
|
||||||
|
|
||||||
|
# have a properly sized image
|
||||||
|
disable_overscan=1
|
||||||
|
|
||||||
|
# for sound over HDMI
|
||||||
|
#hdmi_drive=2
|
||||||
|
|
||||||
|
# rotate the HDMI display
|
||||||
|
# 0 => no rotation
|
||||||
|
# 1 => 90 degrees clockwise
|
||||||
|
# 2 => 180 degrees clockwise
|
||||||
|
# 3 => 270 degrees clockwise
|
||||||
|
#display_hdmi_rotate=0
|
||||||
|
|
||||||
|
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||||
|
#dtparam=i2c_arm=on
|
||||||
|
#dtparam=i2s=on
|
||||||
|
#dtparam=spi=on
|
||||||
|
|
||||||
|
# Enable audio (loads snd_bcm2835)
|
||||||
|
#?dtparam=audio=on
|
||||||
|
|
||||||
|
# custom CVT mode for HDMI
|
||||||
|
# see https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
|
||||||
|
#hdmi_group=2
|
||||||
|
#hdmi_mode=87
|
||||||
|
#hdmi_cvt 800 480 60 6 0 0 0
|
||||||
|
|
||||||
|
# Automatically enable Bluetooth without having to use btattach
|
||||||
|
# Note that the Pi's Bluetooth interface is connected via hardware UART;
|
||||||
|
# if you intend to use it for other purposes (for example, serial debugging)
|
||||||
|
# comment out the line below.
|
||||||
|
#?dtparam=krnbt=on
|
||||||
|
|
||||||
|
[cm4]
|
||||||
|
dtoverlay=dwc2,dr_mode=host
|
||||||
|
otg_mode=1
|
||||||
|
avoid_warnings=2
|
||||||
|
dtparam=i2c_arm=on
|
||||||
|
dtoverlay=cutiepi-panel
|
||||||
|
enable_uart=1
|
||||||
|
dtoverlay=uart1
|
||||||
|
dtoverlay=i2c5,pins_10_11
|
||||||
|
dtoverlay=mpu6050-i2c5,interrupt=27
|
||||||
|
|
||||||
|
|
||||||
|
dtoverlay=ov5647
|
||||||
|
#?start_x=1
|
||||||
|
gpu_mem=256
|
Loading…
Reference in a new issue