lenovo-21bx: new device (MR 4392)
Co-authored-by: Clayton Craft <clayton@craftyguy.net> [ci:skip-build] already built successfully in CI
This commit is contained in:
parent
21301644fd
commit
7aa1013087
8 changed files with 6932 additions and 0 deletions
62
device/testing/device-lenovo-21bx/APKBUILD
Normal file
62
device/testing/device-lenovo-21bx/APKBUILD
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Maintainer: Konrad Dybcio <konradybcio@kernel.org>
|
||||
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-lenovo-21bx
|
||||
pkgdesc="Lenovo ThinkPad X13s"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck !strip"
|
||||
depends="
|
||||
linux-lenovo-21bx
|
||||
postmarketos-base
|
||||
systemd-boot
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
firmware.files
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-vulkan
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Firmware for Bluetooth, Modem, WiFi, etc."
|
||||
depends="
|
||||
bootmac
|
||||
linux-firmware-ath11k
|
||||
linux-firmware-qca
|
||||
linux-firmware-qcom
|
||||
pd-mapper
|
||||
pd-mapper-openrc
|
||||
"
|
||||
install="$subpkgname.post-install"
|
||||
|
||||
install -Dm644 "$srcdir/"/firmware.files \
|
||||
-t "$subpkgdir"/usr/share/mkinitfs/files/
|
||||
}
|
||||
|
||||
vulkan() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel vulkan-loader"
|
||||
depends="mesa-vulkan-freedreno"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8c8e03e6061e72305442b27f3f6e0d096d4d7257ee3e2a9edbf1d87e0baf43a70417784465cad480d7bb557b00f012293e1a748c436937587ba5c007834274dc deviceinfo
|
||||
84767961200e6c04928c34365d9c1daa7da90214690666f87e844f4a42d8f2abc551a4f353196babbabe6b3b4c0e754a2175e7a79d92d842804d6a31ef09410c modules-initfs
|
||||
38da7bcdd603335feed1de8b477a289c5f9765ca8ce566b4ee144b49c4763ce41050cf29696ad38f4254b0190a48948f16f936857693d2b30196341e81b0233f firmware.files
|
||||
"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
rc-update add -q pd-mapper boot
|
25
device/testing/device-lenovo-21bx/deviceinfo
Normal file
25
device/testing/device-lenovo-21bx/deviceinfo
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Lenovo ThinkPad X13s"
|
||||
deviceinfo_manufacturer="Lenovo"
|
||||
deviceinfo_codename="lenovo-21bx"
|
||||
deviceinfo_year="2022"
|
||||
deviceinfo_dtb="qcom/sc8280xp-lenovo-thinkpad-x13s"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_chassis="laptop"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
# most parameters from: https://github.com/jhovold/linux/wiki/X13s#kernel-command-line
|
||||
deviceinfo_kernel_cmdline="console=null iommu.passthrough=0 iommu.strict=0 pcie_aspm.policy=powersupersave clk_ignore_unused arm64.nopauth efi=noruntime"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_generate_systemd_boot="true"
|
||||
deviceinfo_boot_filesystem="fat32"
|
||||
deviceinfo_partition_type="gpt"
|
34
device/testing/device-lenovo-21bx/firmware.files
Normal file
34
device/testing/device-lenovo-21bx/firmware.files
Normal file
|
@ -0,0 +1,34 @@
|
|||
# note: some of these aren't actually required to boot or unlock FDE, but the
|
||||
# kernel has builtins (e.g. bluetooth, wifi) that fail to load if they aren't
|
||||
# available in the initramfs...
|
||||
|
||||
# Bluetooth
|
||||
/lib/firmware/qca/hpbtfw21.tlv
|
||||
/lib/firmware/qca/hpnv21.bin
|
||||
# TODO: not available yet in linux-firmware:
|
||||
#/lib/firmware/qca/hpnv21.8c
|
||||
|
||||
# GPU
|
||||
/lib/firmware/qcom/a660_gmu.bin
|
||||
/lib/firmware/qcom/a660_sqe.fw
|
||||
|
||||
# HW Video Decoding
|
||||
# TODO: not available yet in linux-firmware:
|
||||
#/lib/firmware/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn
|
||||
|
||||
# remoteproc
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/adspr.jsn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/adspua.jsn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/audioreach-tplg.bin
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/battmgr.jsn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/cdspr.jsn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/qccdsp8280.mbn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn
|
||||
/lib/firmware/qcom/sc8280xp/LENOVO/21BX/qcslpi8280.mbn
|
||||
|
||||
# Wi-Fi
|
||||
/lib/firmware/ath11k/WCN6855/hw2.1/amss.bin
|
||||
/lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
|
||||
/lib/firmware/ath11k/WCN6855/hw2.1/m3.bin
|
||||
/lib/firmware/ath11k/WCN6855/hw2.1/regdb.bin
|
27
device/testing/device-lenovo-21bx/modules-initfs
Normal file
27
device/testing/device-lenovo-21bx/modules-initfs
Normal file
|
@ -0,0 +1,27 @@
|
|||
# PCIe + NVMe
|
||||
nvme
|
||||
phy_qcom_qmp_pcie
|
||||
pcie_qcom
|
||||
|
||||
# Keyboard and mouse
|
||||
i2c_hid_of
|
||||
|
||||
# Keyboard, mouse, some on-board devices
|
||||
i2c_qcom_geni
|
||||
|
||||
# PWM, backlight
|
||||
leds_qcom_lpg
|
||||
pwm_bl
|
||||
|
||||
# Battery management, TCPM, remote DSPs
|
||||
qrtr
|
||||
pmic_glink_altmode
|
||||
|
||||
# USB-C
|
||||
gpio_sbu_mux
|
||||
phy_qcom_qmp_combo
|
||||
|
||||
# Display
|
||||
msm
|
||||
panel_edp
|
||||
phy_qcom_edp
|
|
@ -0,0 +1,70 @@
|
|||
Submitted upstream: https://lore.kernel.org/dri-devel/20231028021910.24031-1-clayton@craftyguy.net/
|
||||
|
||||
----------------
|
||||
|
||||
From 64dad9ae0e286d1fcfc3f7a9e315fb9ac18c5db1 Mon Sep 17 00:00:00 2001
|
||||
From: Clayton Craft <clayton@craftyguy.net>
|
||||
Date: Fri, 27 Oct 2023 18:14:43 -0700
|
||||
Subject: [PATCH] drm/panel-edp: Add timings for BOE NV133WUM-N63
|
||||
|
||||
This panel is found on laptops e.g., variants of the Thinkpad X13s.
|
||||
Configuration was collected from the panel's EDID.
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-edp.c | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
|
||||
index 95c8472d878a..5db283f014f3 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-edp.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-edp.c
|
||||
@@ -1204,6 +1204,29 @@ static const struct panel_desc boe_nv133fhm_n61 = {
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct drm_display_mode boe_nv133wum_n63_modes = {
|
||||
+ .clock = 157760,
|
||||
+ .hdisplay = 1920,
|
||||
+ .hsync_start = 1920 + 48,
|
||||
+ .hsync_end = 1920 + 48 + 32,
|
||||
+ .htotal = 1920 + 48 + 32 + 80,
|
||||
+ .vdisplay = 1200,
|
||||
+ .vsync_start = 1200 + 3,
|
||||
+ .vsync_end = 1200 + 3 + 6,
|
||||
+ .vtotal = 1200 + 3 + 6 + 31,
|
||||
+ .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+};
|
||||
+
|
||||
+static const struct panel_desc boe_nv133wum_n63 = {
|
||||
+ .modes = &boe_nv133wum_n63_modes,
|
||||
+ .num_modes = 1,
|
||||
+ .bpc = 8,
|
||||
+ .size = {
|
||||
+ .width = 286,
|
||||
+ .height = 179,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static const struct drm_display_mode boe_nv140fhmn49_modes[] = {
|
||||
{
|
||||
.clock = 148500,
|
||||
@@ -1723,6 +1746,9 @@ static const struct of_device_id platform_of_match[] = {
|
||||
}, {
|
||||
.compatible = "boe,nv133fhm-n62",
|
||||
.data = &boe_nv133fhm_n61,
|
||||
+ }, {
|
||||
+ .compatible = "boe,nv133wum-n63",
|
||||
+ .data = &boe_nv133wum_n63,
|
||||
}, {
|
||||
.compatible = "boe,nv140fhmn49",
|
||||
.data = &boe_nv140fhmn49,
|
||||
@@ -1852,6 +1878,7 @@ static const struct edp_panel_entry edp_panels[] = {
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x095f, &delay_200_500_e50, "NE135FBM-N41 v8.1"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x098d, &boe_nv110wtm_n61.delay, "NV110WTM-N61"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x09dd, &delay_200_500_e50, "NT116WHM-N21"),
|
||||
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0a1b, &delay_200_500_e50, "NV133WUM-N63"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0a5d, &delay_200_500_e50, "NV116WHM-N45"),
|
||||
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0ac5, &delay_200_500_e50, "NV116WHM-N4C"),
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
70
device/testing/linux-lenovo-21bx/APKBUILD
Normal file
70
device/testing/linux-lenovo-21bx/APKBUILD
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Maintainer: Konrad Dybcio <konradybcio@kernel.org>
|
||||
pkgname=linux-lenovo-21bx
|
||||
pkgver=6.6
|
||||
pkgrel=0
|
||||
pkgdesc="Lenovo ThinkPad X13s kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="lenovo-21bx"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip
|
||||
!check
|
||||
!tracedeps
|
||||
pmb:cross-native
|
||||
pmb:kconfigcheck-community
|
||||
pmb:kconfigcheck-uefi
|
||||
"
|
||||
makedepends="
|
||||
bash
|
||||
bison
|
||||
findutils
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
"
|
||||
|
||||
# Source
|
||||
_repository="linux"
|
||||
_commit="b0ec1511f2485329be05d8a5fc3e57a8f0896513" # wip/sc8280xp-v6.6
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/jhovold/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
0001-drm-panel-edp-Add-timings-for-BOE-NV133WUM-N63.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp "$srcdir/config-$_flavor.$arch" .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz.efi" \
|
||||
"$pkgdir/boot/vmlinuz"
|
||||
|
||||
make modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_PATH="$pkgdir"/boot/ \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_MOD_STRIP=1 \
|
||||
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
|
||||
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
||||
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
93f5e274f2c40a4cd87a921201116a8ab3ffb6ff8110dc73a6cbb7707b447d76a11bc89c17456fb9cf1c1e386c918777af61fa1690dfa6e171dbe2713b8ef606 linux-lenovo-21bx-b0ec1511f2485329be05d8a5fc3e57a8f0896513.tar.gz
|
||||
c3d62e8c0450f5f9ca313af5492fffef73422457414f231aee2c6a1a0f31b65a2dc19046df4a8a316e4fab8f2dfdfc6724987f7c374a49908059999886238204 config-lenovo-21bx.aarch64
|
||||
fac2fc6cd033c30d1abea6ac77c173945f77e7c3db9e547b6e2a68969e731d4d69f6093fbc3a0b7068dddffe224692edb7175a953bc28f9449b8018c91835d31 0001-drm-panel-edp-Add-timings-for-BOE-NV133WUM-N63.patch
|
||||
"
|
6641
device/testing/linux-lenovo-21bx/config-lenovo-21bx.aarch64
Normal file
6641
device/testing/linux-lenovo-21bx/config-lenovo-21bx.aarch64
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue