From: Dave Stevenson Date: Thu, 2 Dec 2021 18:06:37 +0000 (+0000) Subject: dtoverlays: Add a generic DPI panel overlay for KMS X-Git-Tag: accepted/tizen/unified/20230118.172025~943 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a37d52467b63f854ff46be93b50c50ef13073af2;p=platform%2Fkernel%2Flinux-rpi.git dtoverlays: Add a generic DPI panel overlay for KMS Uses the "panel-dpi" compatible to set panel timings from DT. Signed-off-by: Dave Stevenson --- diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index a6b0d9e..1c0da56 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -232,6 +232,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ vc4-fkms-v3d.dtbo \ vc4-fkms-v3d-pi4.dtbo \ vc4-kms-dpi-at056tn53v1.dtbo \ + vc4-kms-dpi-generic.dtbo \ vc4-kms-dsi-7inch.dtbo \ vc4-kms-dsi-lt070me05000.dtbo \ vc4-kms-dsi-lt070me05000-v2.dtbo \ diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index bedb501..4ae0bc9 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -3563,6 +3563,34 @@ Load: dtoverlay=vc4-kms-dpi-at056tn53v1 Params: +Name: vc4-kms-dpi-generic +Info: Enable a generic DPI display under KMS. Default timings are for the + Adafruit Kippah with 800x480 panel and RGB666 (GPIOs 0-21) + Requires vc4-kms-v3d to be loaded. +Load: dtoverlay=vc4-kms-dpi-generic,= +Params: clock-frequency Display clock frequency (Hz) + hactive Horizontal active pixels + hfp Horizontal front porch + hsync Horizontal sync pulse width + hbp Horizontal back porch + vactive Vertical active lines + vfp Vertical front porch + vsync Vertical sync pulse width + vbp Vertical back porch + hsync-invert Horizontal sync active low + vsync-invert Vertical sync active low + de-invert Data Enable active low + pixclk-invert Negative edge pixel clock + width-mm Define the screen width in mm + height-mm Define the screen height in mm + rgb565 Change to RGB565 output on GPIOs 0-19 + rgb666-padhi Change to RGB666 output on GPIOs 0-9, 12-17, and + 20-25 + rgb888 Change to RGB888 output on GPIOs 0-27 + bus-format Override the bus format for a MEDIA_BUS_FMT_* + value. NB also overridden by rgbXXX overrides. + + Name: vc4-kms-dsi-7inch Info: Enable the Raspberry Pi DSI 7" screen. Includes the edt-ft5406 for the touchscreen element. diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts new file mode 100644 index 0000000..def1757 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts @@ -0,0 +1,92 @@ +/* + * vc4-kms-dpi-at056tn53v1-overlay.dts + */ + +/dts-v1/; +/plugin/; + +#include +#include + +/ { + compatible = "brcm,bcm2835"; + + fragment@0 { + target-path = "/"; + __overlay__ { + panel: panel { + compatible = "panel-dpi"; + + width-mm = <154>; + height-mm = <83>; + bus-format = <0x1009>; + + timing: panel-timing { + clock-frequency = <29500000>; + hactive = <800>; + hfront-porch = <24>; + hsync-len = <72>; + hback-porch = <96>; + hsync-active = <0>; + vactive = <480>; + vfront-porch = <3>; + vsync-len = <10>; + vback-porch = <7>; + vsync-active = <0>; + + 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"; + pinctrl-0 = <&dpi_18bit_gpio0>; + + port { + dpi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + }; + + __overrides__ { + clock-frequency = <&timing>, "clock-frequency:0"; + hactive = <&timing>, "hactive:0"; + hfp = <&timing>, "hfront-porch:0"; + hsync = <&timing>, "hsync-len:0"; + hbp = <&timing>, "hback-porch:0"; + vactive = <&timing>, "vactive:0"; + vfp = <&timing>, "vfront-porch:0"; + vsync = <&timing>, "vsync-len:0"; + vbp = <&timing>, "vback-porch:0"; + hsync-invert = <&timing>, "hsync-active:0=0"; + vsync-invert = <&timing>, "vsync-active:0=0"; + de-invert = <&timing>, "de-active:0=0"; + pixclk-invert = <&timing>, "pixelclk-active:0=0"; + + width-mm = <&panel>, "width-mm:0"; + height-mm = <&panel>, "height-mm:0"; + + rgb565 = <&panel>, "bus-format:0=0x1017", + <&dpi_node>, "pinctrl-0:0=",<&dpi_16bit_gpio0>; + rgb666-padhi = <&panel>, "bus-format:0=0x1015", + <&dpi_node>, "pinctrl-0:0=",<&dpi_18bit_cpadhi_gpio0>; + rgb888 = <&panel>, "bus-format:0=0x100a", + <&dpi_node>, "pinctrl-0:0=",<&dpi_gpio0>; + bus-format = <&panel>, "bus-format:0"; + }; +};