Skip to content

Commit

Permalink
Merge pull request #199 from hnez/panel-mipi-dbi
Browse files Browse the repository at this point in the history
meta-lxatac-software: panel-mipi-dbi: cleanups for upstreaming
  • Loading branch information
hnez authored Nov 1, 2024
2 parents 0584d3b + 294afc7 commit 0c7b9cf
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 50 deletions.
33 changes: 31 additions & 2 deletions meta-lxatac-software/classes/panel-mipi-dbi.bbclass
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# SPDX-License-Identifier: MIT
#
# Copyright Pengutronix <[email protected]>
#
# Class to generate firmware files for use with the `panel-mipi-dbi` Linux
# driver.
#
# The firmware source file contains a list of commands to send to the display
# controller in order to initialize it:
#
# $ cat shineworld,lh133k.txt
# command 0x11 # exit sleep mode
# delay 120
#
# # Enable color inversion
# command 0x21 # INVON
# ...
#
# A recipe to compile such a command list into a firmware blob for use with
# the `panel-mipi-dbi` driver looks something like this:
#
# $ cat panel-shineworld-lh133k.bb
# inherit panel-mipi-dbi
#
# SRC_URI = "file://${PANEL_FIRMWARE}"
#
# PANEL_FIRMWARE = "shineworld,lh133k.txt"
# ...

DEPENDS = "panel-mipi-dbi-native"

PANEL_FIRMWARE_BIN ?= "${@d.getVar('PANEL_FIRMWARE').removesuffix('.txt')}.bin"
Expand All @@ -6,13 +35,13 @@ do_configure[noexec] = "1"

do_compile () {
mipi-dbi-cmd \
"${WORKDIR}/${PANEL_FIRMWARE_BIN}" \
"${B}/${PANEL_FIRMWARE_BIN}" \
"${WORKDIR}/${PANEL_FIRMWARE}"
}

do_install () {
install -m 0644 -D \
"${WORKDIR}/${PANEL_FIRMWARE_BIN}" \
"${B}/${PANEL_FIRMWARE_BIN}" \
"${D}${nonarch_base_libdir}/firmware/${PANEL_FIRMWARE_BIN}"
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
SUMMARY = "Firmware file compiler for the panel-mipi-dbi display driver"
DESCRIPTION = "The panel-mipi-dbi Linux display driver allows using the same \
driver for most MIPI DBI based display panels. \
This means many displays attached via SPI, even if the \
datasheet does not explicitly mention DBI support. \
To do so it uses tiny firmware files that contain \
display/controller-specific initialization commands. \
The mipi-dbi-cmd tool compiles these firmware files from a \
text format to a firmware blob format."
HOMEPAGE = "https://github.com/notro/panel-mipi-dbi"
SECTION = "graphics"
LICENSE = "CC0-1.0"
LIC_FILES_CHKSUM = "file://mipi-dbi-cmd;beginline=4;endline=13;md5=5e3d3f14cc87aa9e8976d728520cbcae"
SRCREV = "1cbd40135a8c7f25d7b444a7fac77fd3c3ad471e"

SRC_URI = "git://github.com/notro/panel-mipi-dbi.git;protocol=https;branch=main"

S = "${WORKDIR}/git"

inherit native

do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install () {
install -D -p -m 0755 ${S}/mipi-dbi-cmd ${D}${bindir}/mipi-dbi-cmd
}

RDEPENDS:${PN} += "python3-native"
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
inherit panel-mipi-dbi

SUMMARY = "Shineworld Panel Configuration"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

PANEL_FIRMWARE = "shineworld,lh133k.txt"
SRC_URI = "file://${PANEL_FIRMWARE}"

inherit panel-mipi-dbi

0 comments on commit 0c7b9cf

Please sign in to comment.