nokia-argon: new device (Nokia 8110 4G) (MR 3527)

Initial Nokia 8110 4G port with close-to-mainline kernel.

[ci:skip-build] Already built fine on CI in MR
This commit is contained in:
Affe Null 2022-10-14 13:42:16 +02:00 committed by Alexey Minnekhanov
parent f27500700e
commit cb8105ee14
No known key found for this signature in database
GPG key ID: 6FE3B029D9D9FAFF
5 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1 @@
/lib/firmware/nokia,argon-gc9305-v2-panel.bin

View file

@ -0,0 +1,54 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-nokia-argon
pkgdesc="Nokia 8110 4G"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="GPL-2.0-only"
arch="armv7"
options="!check !archcheck"
depends="
linux-postmarketos-qcom-msm8909
mkbootimg
postmarketos-base
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
makedepends="devicepkg-dev mipi-dbi-cmd"
source="
nokia,argon-gc9305-v2-panel.txt
00-nokia-argon-display.files
deviceinfo
"
build() {
devicepkg_build $startdir $pkgname
mkdir -p "$builddir"
mipi-dbi-cmd "$builddir"/nokia,argon-gc9305-v2-panel.bin \
"$srcdir"/nokia,argon-gc9305-v2-panel.txt
}
package() {
devicepkg_package $startdir $pkgname
# Package display init sequence
install -Dm644 "$builddir"/nokia,argon-gc9305-v2-panel.bin -t \
"$pkgdir"/lib/firmware/
install -Dm644 "$srcdir"/00-nokia-argon-display.files -t \
"$pkgdir"/etc/postmarketos-mkinitfs/files/
}
nonfree_firmware() {
pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
depends="
firmware-qcom-adreno-a300
msm-firmware-loader
firmware-nokia-argon-venus
firmware-nokia-argon-wcnss-nv
"
mkdir "$subpkgdir"
}
sha512sums="
dd82fd4732694a24c91339b5c5fbb0bf485b3b2da3c17c11b72a02e90e9827c367504c99894556dd8273f927408cdb187325e5f3b9ea9e4a82e3cb3798cb2816 nokia,argon-gc9305-v2-panel.txt
66302bb5d83c4ba155ff62405fb9a374ab76e1912411310b1ad75e00c216b6868da4e2b6f3987c97146389aa44b2b2c26f0ca0819566be45c9d0d2dd1d3b72f1 00-nokia-argon-display.files
149457297bc797e789c635cbd32bbd8b2dd5fd01bb9b92e301ee57dc22d0e3530684fdaaf5236e4136b86a30b35b9eed733634028f135f5fbb2b398e59d66cfa deviceinfo
"

View file

@ -0,0 +1,36 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Nokia 8110 4G"
deviceinfo_manufacturer="Nokia"
deviceinfo_codename="nokia-argon"
deviceinfo_year="2018"
deviceinfo_dtb="qcom-msm8905-nokia-argon"
deviceinfo_append_dtb="true"
deviceinfo_arch="armv7"
deviceinfo_swap_size_recommended="512"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="240"
deviceinfo_screen_height="320"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_header_version="0"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02700000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x02500000"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,34 @@
# Based on arch/arm/boot/dts/argon/spi-panel-gc9305-v2-qvga-cmd from
# the downstream kernel, which is:
# Copyright (c) 2017, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
# only version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
command 0x36 0x00
command 0x3a 0x55 # format: 65K 16bit
command 0x35 0x00 # TE v-blanking
command 0xb2 0x0c 0x0c 0x00 0x33 0x33 # porch setting
command 0xb7 0x75 # gate control VGH VGL
command 0xbb 0x34 # Vcoms setting 1.4v
command 0xc0 0x2c # LCM control
command 0xc2 0x01 # VDV VRH COMMAND ENABLE
command 0xc3 0x0d # VRH SET
command 0xc4 0x20 # VDV SET
command 0xc6 0xef # frame rate
command 0x44 0x00 0x00 # SET TEARING SCAN LINE
command 0xd0 0xa4 0xa1 # power control 1
# gamma
command 0xe0 0xd0 0x02 0x09 0x0d 0x0e 0x19 0x30 0x51 0x43 0x09 0x14 0x13 0x18 0x21
command 0xe1 0xd0 0x02 0x09 0x0d 0x0d 0x18 0x32 0x46 0x42 0x09 0x13 0x13 0x17 0x21
command 0x11 # sleep out
delay 120
command 0x29 # display on

View file

@ -0,0 +1,35 @@
pkgname=firmware-nokia-argon
pkgver=17.00.17.01
pkgrel=0
pkgdesc="Firmware for Nokia 8110 4G"
url="https://storage.abscue.de/private/zImage/$pkgname-$pkgver/"
arch="armv7"
license="custom"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
subpackages="$pkgname-venus:venus_package $pkgname-wcnss-nv:wcnss_nv_package"
source="$url/$pkgname.tar.gz"
_fwsrc="$srcdir/firmware-nokia-argon"
_fwdir="/lib/firmware/postmarketos"
package() {
mkdir -p "$pkgdir"
}
venus_package() {
pkgdesc="Nokia 8110 4G video encoder/decoder firmware"
# venus.mbn already exists and doesn't differ from the file produced
# by pil-squasher
install -Dm644 "$_fwsrc"/venus.mbn -t "$subpkgdir/$_fwdir"/qcom/venus-3.0/
}
wcnss_nv_package() {
pkgdesc="Nokia 8110 4G WiFi/BT firmware configuration"
install -Dm644 "$_fwsrc"/wlan/prima/WCNSS_qcom_wlan_nv.bin -t \
"$subpkgdir/$_fwdir"/wlan/prima/
}
sha512sums="
ee59cb7018212ff5dfffeaced34120f6856fb8ff4279319e8551c28864e1c050e352cb34c0200e068cd6f514f9135cf0884ba064982ef5f2896c1b24f9a4c4fa firmware-nokia-argon.tar.gz
"