mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2024-12-27 11:08:21 +01:00
add overlay for vc4-kms-waveshare-28dpi
This commit is contained in:
parent
1642c8f7d4
commit
9180aef180
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* vc4-kms-waveshare-28dpi-overlay.dts
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
fragment@0 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
pwm_pins: pwm_pins {
|
||||
brcm,pins = <18>;
|
||||
brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
brcm,pull = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&pwm>;
|
||||
frag1: __overlay__ {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
//#gpio-cells = <2>;
|
||||
/* Panel backlight through PWM0_0 on GPIO18 */
|
||||
backlight_lvds: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 10000000>;
|
||||
brightness-levels = <0 1000>;
|
||||
num-interpolated-steps = <1000>;
|
||||
default-brightness-level = <1000>;
|
||||
};
|
||||
|
||||
panel: panel {
|
||||
reg = <0>;
|
||||
compatible = "panel-dpi";
|
||||
backlight = <&backlight_lvds>;
|
||||
|
||||
width-mm = <154>;
|
||||
height-mm = <86>;
|
||||
bus-format = <0x1015>;
|
||||
|
||||
timing: panel-timing {
|
||||
clock-frequency = <28000000>;
|
||||
hactive = <480>;
|
||||
hfront-porch = <26>;
|
||||
hsync-len = <16>;
|
||||
hback-porch = <10>;
|
||||
hsync-active = <0>;
|
||||
vactive = <640>;
|
||||
vfront-porch = <25>;
|
||||
vsync-len = <10>;
|
||||
vback-porch = <16>;
|
||||
vsync-active = <0>;
|
||||
|
||||
de-active = <1>;
|
||||
pixelclk-active = <1>;
|
||||
};
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&dpi>;
|
||||
dpi_node: __overlay__ {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
|
||||
/* refer to /home/pi/linux/arch/arm/boot/dts/bcm270x.dtsi
|
||||
* for the pin multiplex setting
|
||||
*/
|
||||
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
|
||||
|
||||
port {
|
||||
dpi_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -5,15 +5,16 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
|
||||
inherit devicetree
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
SRC_URI = " file://dts/ads1115-i2c-gpio.dts "
|
||||
SRC_URI = " file://dts/ads1115-i2c-gpio.dts file://vc4-kms-waveshare-28dpi.dts "
|
||||
|
||||
S = "${WORKDIR}/dts"
|
||||
DT_FILES = "ads1115-i2c-gpio.dtbo"
|
||||
DT_FILES = "ads1115-i2c-gpio.dtbo vc4-kms-waveshare-28dpi.dtbo"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi.*"
|
||||
|
||||
do_deploy:append () {
|
||||
install -d ${DEPLOY_DIR_IMAGE}
|
||||
install -m 0755 ${B}/vc4-kms-waveshare-28dpi.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-waveshare-28dpi.dtbo
|
||||
install -m 0755 ${B}/ads1115-i2c-gpio.dtbo ${DEPLOY_DIR_IMAGE}/ads1115-i2c-gpio.dtbo
|
||||
install -m 0755 ${THISDIR}/files/vc4-kms-DPI-28inch.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-DPI-28inch.dtbo
|
||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b-4b.dtbo
|
||||
|
@ -1,6 +1,6 @@
|
||||
inherit extrausers
|
||||
|
||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/dpi24.dtbo overlays/vc4-kms-dpi-generic.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/vc4-kms-DPI-28inch.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/vc4-kms-waveshare-28dpi.dtbo overlays/dpi24.dtbo overlays/vc4-kms-dpi-generic.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/vc4-kms-DPI-28inch.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||
|
||||
|
||||
EXTRA_USERS_PARAMS = "usermod -p BJpK8ADNDLsGg root; \
|
||||
|
Loading…
Reference in New Issue
Block a user