Skip to content

Commit

Permalink
sam9x75_curiosity: add support for New Vision LVDS display panel
Browse files Browse the repository at this point in the history
add support for New Vision LVDS display panel overlay and ensure that
the Generic LVDS panel driver is enabled in the Linux configuration
(i.e. set DRM_PANEL_LVDS=Y)

Signed-off-by: Sandeep Sheriker M <[email protected]>
Acked-by: Cristian Birsan <[email protected]>
  • Loading branch information
sandeep2081 authored and cristibirsan committed Nov 22, 2024
1 parent dd16c9f commit 4c6f612
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sam9x75_curiosity.its
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@
};
};

fdt_lvds_panel_newvision {
description = "Device Tree blob for New Vision Display Panel";
data = /incbin/("./sam9x75_curiosity/sam9x75_curiosity_lvds_newvision_display.dtbo");
type = "flat_dt";
arch = "arm";
compression = "none";
load = <0x23110000>;
hash-1 {
algo = "crc32";
};
hash-2 {
algo = "sha1";
};
};

fdt_gmac_lan8840 {
description = "Device Tree blob for LAN8840 RGMII PHY overlay";
data = /incbin/("./sam9x75_curiosity/sam9x75_curiosity_gmac_lan8840.dtbo");
Expand Down Expand Up @@ -235,6 +250,11 @@
fdt = "fdt_lvds_panel";
};

lvds_newvision {
description = "FDT overlay blob for New Vision LVDS Display Panel";
fdt = "fdt_lvds_panel_newvision";
};

ksz9131 {
description = "FDT overlay blob for KSZ9131 RGMII PHY Daughter Card";
fdt = "fdt_gmac_lan8840";
Expand Down
138 changes: 138 additions & 0 deletions sam9x75_curiosity/sam9x75_curiosity_lvds_newvision_display.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Device Tree file for SAM9X75 Curiosity board overlay blob
* for Promate 10.1 LVDS Display Panel
*
* Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
* Author: Sandeep Sheriker M <[email protected]>
*
*/
/dts-v1/;
/plugin/;

#include <dt-bindings/clock/at91.h>
#include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/gpio/gpio.h>

&{/} {
mic23150_reg: mic23150_regulator {
compatible = "regulator-fixed";
regulator-name = "panel-power-supply";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&pioC 30 GPIO_ACTIVE_HIGH>; /* LCD_MODULE_ENABLE */
enable-active-high;
status = "okay";
};

lvds_panel_bl: backlight {
compatible = "pwm-backlight";
pwms = <&pwm0 0 1000000 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm>;
brightness-levels = <0 32 64 128 256 512 1024>;
default-brightness-level = <6>;
status="okay";
};

panel {
/* LVDS Display panel Promate 10.1 */
compatible = "panel-lvds";
backlight = <&lvds_panel_bl>;
power-supply = <&mic23150_reg>;
width-mm = <216>;
height-mm = <135>;
data-mapping = "vesa-24";
status="okay";
#address-cells = <1>;
#size-cells = <0>;

panel-timing {
clock-frequency = <65000000>;
hactive = <1280>;
vactive = <800>;
hfront-porch = <48>;
hback-porch = <80>;
hsync-len = <32>;
vfront-porch = <8>;
vback-porch = <16>;
vsync-len = <8>;
};

port@0 {
reg = <0>;
panel_in: endpoint {
remote-endpoint = <&lvds_out_panel>;
};
};
};
};

&pwm0 {
status = "okay";
};

&i2c6 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
atmel_mxt_ts@4a {
compatible = "atmel,atmel_mxt_ts";
reg = <0x4a>;
interrupt-parent = <&pioA>;
interrupts = <20 0x8>; /* MXT_IRQ_PA20 */
vdda-supply = <&mic23150_reg>;
status = "okay";
};
};

&hlcdc {
clocks = <&pmc PMC_TYPE_PERIPHERAL 25>, <&pmc PMC_TYPE_CORE PMC_LVDSPLL>, <&clk32k 1>;
clock-names = "periph_clk", "lvds_pll_clk", "slow_clk";
status="okay";

hlcdc-display-controller {
port@0 {
#address-cells = <1>;
#size-cells = <0>;
hlcdc_panel_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&lvds_in_lcdc>;
};
};
};

hlcdc_pwm: hlcdc-pwm {
status = "disabled";
};
};

&lvds_controller {
status = "okay";

ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_in_lcdc: endpoint {
remote-endpoint = <&hlcdc_panel_output>;
};
};

port@1 {
reg = <1>;
lvds_out_panel: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};

&pinctrl {
pwm {
pinctrl_pwm: pwm_bl {
atmel,pins = <AT91_PIOC 18 AT91_PERIPH_C AT91_PINCTRL_NONE>;
};
};
};

0 comments on commit 4c6f612

Please sign in to comment.