mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
dtoverlays: Rework vc4-kms-dpi overlays to remove duplication
Removes all the common panel, dpi, and backlight configuration from the individual vc4-kms-dpi-* files into vc4-kms-dpi.dtsi. Creates a new vc4-kms-dpi-panel-overlay.dts for preconfigured panels, with overrides to enable the different panel configurations. Deprecates vc4-kms-dpi-at056tn53v1 as superceded by vc4-kms-dpi-panel. vc4-kms-kippah-7inch not deprecated for now as it is likely to be in wider use than at056tn53v1. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
@@ -232,8 +232,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
|
||||
upstream-pi4.dtbo \
|
||||
vc4-fkms-v3d.dtbo \
|
||||
vc4-fkms-v3d-pi4.dtbo \
|
||||
vc4-kms-dpi-at056tn53v1.dtbo \
|
||||
vc4-kms-dpi-generic.dtbo \
|
||||
vc4-kms-dpi-panel.dtbo \
|
||||
vc4-kms-dsi-7inch.dtbo \
|
||||
vc4-kms-dsi-lt070me05000.dtbo \
|
||||
vc4-kms-dsi-lt070me05000-v2.dtbo \
|
||||
|
||||
@@ -3599,10 +3599,8 @@ Params: cma-512 CMA is 512MB (needs 1GB)
|
||||
|
||||
|
||||
Name: vc4-kms-dpi-at056tn53v1
|
||||
Info: Enable an Innolux 5.6in VGA TFT connected to DPI interface under KMS.
|
||||
Requires vc4-kms-v3d to be loaded.
|
||||
Load: dtoverlay=vc4-kms-dpi-at056tn53v1
|
||||
Params: <None>
|
||||
Info: This overlay is now deprecated - see vc4-kms-dpi-panel,at056tn53v1
|
||||
Load: <Deprecated>
|
||||
|
||||
|
||||
Name: vc4-kms-dpi-generic
|
||||
@@ -3652,6 +3650,33 @@ Params: clock-frequency Display clock frequency (Hz)
|
||||
(default 16).
|
||||
|
||||
|
||||
Name: vc4-kms-dpi-panel
|
||||
Info: Enable a preconfigured KMS DPI panel.
|
||||
Requires vc4-kms-v3d to be loaded.
|
||||
Load: dtoverlay=vc4-kms-dpi-panel,<param>=<val>
|
||||
Params: at056tn53v1 Enable an Innolux 5.6in VGA TFT
|
||||
kippah-7inch Enable an Adafruit Kippah with 7inch panel.
|
||||
backlight-gpio Defines a GPIO to be used for backlight control
|
||||
(default of none).
|
||||
backlight-pwm Defines a PWM channel to be used for backlight
|
||||
control (default of none). NB Disables audio
|
||||
headphone output as that also uses PWM.
|
||||
backlight-pwm-chan Choose channel on &pwm node for backlight
|
||||
control.
|
||||
(default 0).
|
||||
backlight-pwm-gpio GPIO pin to be used for the PWM backlight. See
|
||||
pwm-2chan for valid options.
|
||||
(default 18 - note this can only work with
|
||||
rgb666-padhi).
|
||||
backlight-pwm-func Pin function of GPIO used for the PWM
|
||||
backlight.
|
||||
See pwm-2chan for valid options.
|
||||
(default 2).
|
||||
backlight-def-brightness
|
||||
Set the default brightness. Normal range 1-16.
|
||||
(default 16).
|
||||
|
||||
|
||||
Name: vc4-kms-dsi-7inch
|
||||
Info: Enable the Raspberry Pi DSI 7" screen.
|
||||
Includes the edt-ft5406 for the touchscreen element.
|
||||
|
||||
@@ -151,6 +151,10 @@
|
||||
bcm2711;
|
||||
};
|
||||
|
||||
vc4-kms-dpi-at056tn53v1 {
|
||||
deprecated = "use vc4-kms-dpi-panel,at056tn53v1";
|
||||
};
|
||||
|
||||
vc4-kms-v3d {
|
||||
bcm2835;
|
||||
bcm2711 = "vc4-kms-v3d-pi4";
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* vc4-kms-dpi-at056tn53v1-overlay.dts
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
panel: panel {
|
||||
compatible = "innolux,at056tn53v1", "simple-panel";
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&dpi>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
|
||||
|
||||
port {
|
||||
dpi_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -5,16 +5,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
#include "vc4-kms-dpi.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target-path = "/";
|
||||
target = <&panel>;
|
||||
__overlay__ {
|
||||
panel: panel {
|
||||
compatible = "panel-dpi";
|
||||
|
||||
width-mm = <154>;
|
||||
@@ -37,92 +35,13 @@
|
||||
de-active = <1>;
|
||||
pixelclk-active = <1>;
|
||||
};
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&dpi>;
|
||||
dpi_node: __overlay__ {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
__overlay__ {
|
||||
pinctrl-0 = <&dpi_18bit_gpio0>;
|
||||
|
||||
port {
|
||||
dpi_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&panel>;
|
||||
__dormant__ {
|
||||
backlight = <&backlight>;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target-path = "/";
|
||||
__dormant__ {
|
||||
backlight: backlight {
|
||||
compatible = "gpio-backlight";
|
||||
gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&panel>;
|
||||
__dormant__ {
|
||||
backlight = <&backlight_pwm>;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@5 {
|
||||
target-path = "/";
|
||||
__dormant__ {
|
||||
backlight_pwm: backlight_pwm {
|
||||
compatible = "pwm-backlight";
|
||||
brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>;
|
||||
default-brightness-level = <16>;
|
||||
pwms = <&pwm 0 200000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@6 {
|
||||
target = <&pwm>;
|
||||
__dormant__ {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
assigned-clock-rates = <1000000>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@7 {
|
||||
target = <&gpio>;
|
||||
__dormant__ {
|
||||
pwm_pins: pwm_pins {
|
||||
brcm,pins = <18>;
|
||||
brcm,function = <2>; /* Alt5 */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@8 {
|
||||
target = <&audio>;
|
||||
__dormant__ {
|
||||
brcm,disable-headphones;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -151,12 +70,5 @@
|
||||
rgb888 = <&panel>, "bus-format:0=0x100a",
|
||||
<&dpi_node>, "pinctrl-0:0=",<&dpi_gpio0>;
|
||||
bus-format = <&panel>, "bus-format:0";
|
||||
backlight-gpio = <0>, "+2+3",
|
||||
<&backlight>, "gpios:4";
|
||||
backlight-pwm = <0>, "+4+5+6+7+8";
|
||||
backlight-pwm-chan = <&backlight_pwm>, "pwms:4";
|
||||
backlight-pwm-gpio = <&pwm_pins>, "brcm,pins:0";
|
||||
backlight-pwm-func = <&pwm_pins>, "brcm,function:0";
|
||||
backlight-def-brightness = <&backlight_pwm>, "default-brightness-level:0";
|
||||
};
|
||||
};
|
||||
|
||||
62
arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts
Normal file
62
arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* vc4-kms-dpi-panel-overlay.dts
|
||||
* Support for any predefined DPI panel.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include "vc4-kms-dpi.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target = <&panel>;
|
||||
__dormant__ {
|
||||
compatible = "innolux,at056tn53v1", "simple-panel";
|
||||
};
|
||||
};
|
||||
fragment@1 {
|
||||
target = <&panel>;
|
||||
__dormant__ {
|
||||
compatible = "ontat,yx700wv03", "simple-panel";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@90 {
|
||||
target = <&dpi>;
|
||||
__dormant__ {
|
||||
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
|
||||
};
|
||||
};
|
||||
fragment@91 {
|
||||
target = <&dpi>;
|
||||
__dormant__ {
|
||||
pinctrl-0 = <&dpi_18bit_gpio0>;
|
||||
};
|
||||
};
|
||||
fragment@92 {
|
||||
target = <&dpi>;
|
||||
__dormant__ {
|
||||
pinctrl-0 = <&dpi_gpio0>;
|
||||
};
|
||||
};
|
||||
fragment@93 {
|
||||
target = <&dpi>;
|
||||
__dormant__ {
|
||||
pinctrl-0 = <&dpi_16bit_cpadhi_gpio0>;
|
||||
};
|
||||
};
|
||||
fragment@94 {
|
||||
target = <&dpi>;
|
||||
__dormant__ {
|
||||
pinctrl-0 = <&dpi_16bit_gpio0>;
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
at056tn53v1 = <0>, "+0+90";
|
||||
kippah-7inch = <0>, "+1+91";
|
||||
};
|
||||
};
|
||||
109
arch/arm/boot/dts/overlays/vc4-kms-dpi.dtsi
Normal file
109
arch/arm/boot/dts/overlays/vc4-kms-dpi.dtsi
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* vc4-kms-dpi.dtsi
|
||||
*/
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
|
||||
/ {
|
||||
fragment@100 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
panel: panel {
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@101 {
|
||||
target = <&dpi>;
|
||||
dpi_node: __overlay__ {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
|
||||
port {
|
||||
dpi_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@102 {
|
||||
target = <&panel>;
|
||||
__dormant__ {
|
||||
backlight = <&backlight>;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@103 {
|
||||
target-path = "/";
|
||||
__dormant__ {
|
||||
backlight: backlight {
|
||||
compatible = "gpio-backlight";
|
||||
gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@104 {
|
||||
target = <&panel>;
|
||||
__dormant__ {
|
||||
backlight = <&backlight_pwm>;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@105 {
|
||||
target-path = "/";
|
||||
__dormant__ {
|
||||
backlight_pwm: backlight_pwm {
|
||||
compatible = "pwm-backlight";
|
||||
brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>;
|
||||
default-brightness-level = <16>;
|
||||
pwms = <&pwm 0 200000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@106 {
|
||||
target = <&pwm>;
|
||||
__dormant__ {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
assigned-clock-rates = <1000000>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@107 {
|
||||
target = <&gpio>;
|
||||
__dormant__ {
|
||||
pwm_pins: pwm_pins {
|
||||
brcm,pins = <18>;
|
||||
brcm,function = <2>; /* Alt5 */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@108 {
|
||||
target = <&audio>;
|
||||
__dormant__ {
|
||||
brcm,disable-headphones;
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
backlight-gpio = <0>, "+102+103",
|
||||
<&backlight>, "gpios:4";
|
||||
backlight-pwm = <0>, "+104+105+106+107+108";
|
||||
backlight-pwm-chan = <&backlight_pwm>, "pwms:4";
|
||||
backlight-pwm-gpio = <&pwm_pins>, "brcm,pins:0";
|
||||
backlight-pwm-func = <&pwm_pins>, "brcm,function:0";
|
||||
backlight-def-brightness = <&backlight_pwm>, "default-brightness-level:0";
|
||||
};
|
||||
};
|
||||
@@ -1,43 +1,26 @@
|
||||
/*
|
||||
* vc4-kms-v3d-overlay.dts
|
||||
* vc4-kms-kippah-7inch-overlay.dts
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
#include "vc4-kms-dpi.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target-path = "/";
|
||||
target = <&panel>;
|
||||
__overlay__ {
|
||||
panel: panel {
|
||||
compatible = "ontat,yx700wv03", "simple-panel";
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&dpi>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&dpi_18bit_gpio0>;
|
||||
|
||||
port {
|
||||
dpi_out: endpoint@0 {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user