diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-03-26 14:22:51 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-05-18 11:27:12 +0300 |
commit | a0c9f747921c8a8858c6d60f6227f0f227222e25 (patch) | |
tree | e2a1e925d90e04a1c785a5e04025b116b15c9e6e | |
parent | be61bb42f9a29786004928c948eb0a66c2676a6c (diff) | |
download | linux-dt-a0c9f747921c8a8858c6d60f6227f0f227222e25.tar.gz |
Add DRA7xx EVM LCD overlays
Add DT overlays for DRA7xx EVMs to add LCD and touchscreen support.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | arch/arm/boot/dts/ti/dra71-evm-lcd-auo-g101evn01.0.dtso | 139 | ||||
-rw-r--r-- | arch/arm/boot/dts/ti/dra72-evm-touchscreen.dtso | 13 | ||||
-rw-r--r-- | arch/arm/boot/dts/ti/dra74-evm-touchscreen.dtso | 13 | ||||
-rw-r--r-- | arch/arm/boot/dts/ti/dra7x-evm-osd-lcd-common.dtso | 142 |
5 files changed, 315 insertions, 1 deletions
@@ -97,7 +97,14 @@ clean: @rm -f $(dtbo_tmp) $(dtbo_dst) # base-dtb,ovl1,ovl2... -dtb-tests-arm := dra76-evm.dtb,ti/dra76-evm-tfp410.dtbo +dtb-tests-arm := dra76-evm.dtb,ti/dra76-evm-tfp410.dtbo \ + dra71-evm.dtb,ti/dra71-evm-lcd-auo-g101evn01.0.dtbo \ + dra72-evm.dtb,ti/dra7x-evm-osd-lcd-common.dtbo,ti/dra72-evm-touchscreen.dtbo,ti/lcd-osd101t2045.dtbo \ + dra72-evm.dtb,ti/dra7x-evm-osd-lcd-common.dtbo,ti/dra72-evm-touchscreen.dtbo,ti/lcd-osd101t2587.dtbo \ + dra72-evm-revc.dtb,ti/dra7x-evm-osd-lcd-common.dtbo,ti/dra72-evm-touchscreen.dtbo,ti/lcd-osd101t2045.dtbo \ + dra72-evm-revc.dtb,ti/dra7x-evm-osd-lcd-common.dtbo,ti/dra72-evm-touchscreen.dtbo,ti/lcd-osd101t2587.dtbo \ + dra7-evm.dtb,ti/dra7x-evm-osd-lcd-common.dtbo,ti/dra74-evm-touchscreen.dtbo,ti/lcd-osd101t2045.dtbo \ + dra7-evm.dtb,ti/dra7x-evm-osd-lcd-common.dtbo,ti/dra74-evm-touchscreen.dtbo,ti/lcd-osd101t2587.dtbo dtb-tests-arm += \ am57xx-beagle-x15.dtb,ti/am57xx-evm-common.dtbo,ti/am57xx-evm.dtbo \ diff --git a/arch/arm/boot/dts/ti/dra71-evm-lcd-auo-g101evn01.0.dtso b/arch/arm/boot/dts/ti/dra71-evm-lcd-auo-g101evn01.0.dtso new file mode 100644 index 0000000..82d4ee3 --- /dev/null +++ b/arch/arm/boot/dts/ti/dra71-evm-lcd-auo-g101evn01.0.dtso @@ -0,0 +1,139 @@ +/dts-v1/; +/plugin/; +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/gpio/gpio.h> + +/ { + fragment@101 { + target-path = "/"; + + __overlay__ { + model = "TI DRA71 EVM-LCD-AUO-Display"; + + aliases { + display0 = "/display"; + display1 = "/connector"; + }; + + lcd_bl: backlight { + compatible = "led-backlight"; + leds = <&backlight_led>; + brightness-levels = <0 2 38 74 110 146 182 218 256>; + default-brightness-level = <8>; + }; + + lcd: display { + compatible = "auo,g101evn010"; + enable-gpios = <&pcf_lcd 13 GPIO_ACTIVE_LOW>; + backlight = <&lcd_bl>; + + port { + lcd_in: endpoint { + remote-endpoint = <&lvds_out>; + }; + }; + }; + + lvdsbridge { + compatible = "lvds-encoder"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + + port@1 { + reg = <1>; + lvds_out: endpoint { + remote-endpoint = <&lcd_in>; + }; + }; + + }; + }; + }; + }; +}; + +&pcf_gpio_21 { + p0 { + gpio-hog; + gpios = <0 GPIO_ACTIVE_HIGH>; + line-name = "sel_gpmc_ad_vid_s0"; + output-low; + }; + + p7 { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + line-name = "sel_gpmc_ad_vid_s2"; + output-high; + }; +}; + +&i2c1 { + #address-cells = <1>; + #size-cells = <0>; + + pcf_display_board: gpio@27 { + compatible = "nxp,pcf8575"; + #gpio-cells = <2>; + gpio-controller; + reg = <0x27>; + + p0 { + gpio-hog; + gpios = <0 GPIO_ACTIVE_LOW>; + line-name = "backlight-enable"; + output-high; + }; + }; + + tlc59108@40 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "ti,tlc59108"; + reg = <0x40>; + + backlight_led: bl@2 { + label = "backlight"; + reg = <0x2>; + }; + }; + + touchscreen: goodix-gt9271@14 { + compatible = "goodix,gt9271"; + interrupt-parent = <&gpio1>; + interrupts = <15 IRQ_TYPE_LEVEL_HIGH>; + irq-gpios = <&pcf_display_board 6 GPIO_ACTIVE_HIGH>; + reg = <0x14>; + reset-gpios = <&pcf_display_board 5 GPIO_ACTIVE_LOW>; + status = "okay"; + touchscreen-inverted-y; + touchscreen-size-x = <1280>; + touchscreen-size-y = <800>; + }; +}; + +&dss { + ports { + #address-cells = <1>; + #size-cells = <0>; + + dss_port: port@2 { + reg = <2>; + + dpi_out: endpoint { + data-lines = <24>; + remote-endpoint = <&lvds_in>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/ti/dra72-evm-touchscreen.dtso b/arch/arm/boot/dts/ti/dra72-evm-touchscreen.dtso new file mode 100644 index 0000000..ff46273 --- /dev/null +++ b/arch/arm/boot/dts/ti/dra72-evm-touchscreen.dtso @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/dts-v1/; +/plugin/; +#include <dt-bindings/interrupt-controller/irq.h> + +&touchscreen { + interrupt-parent = <&gpio1>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; +}; diff --git a/arch/arm/boot/dts/ti/dra74-evm-touchscreen.dtso b/arch/arm/boot/dts/ti/dra74-evm-touchscreen.dtso new file mode 100644 index 0000000..001d25b --- /dev/null +++ b/arch/arm/boot/dts/ti/dra74-evm-touchscreen.dtso @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/dts-v1/; +/plugin/; +#include <dt-bindings/interrupt-controller/irq.h> + +&touchscreen { + interrupt-parent = <&gpio1>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; +}; diff --git a/arch/arm/boot/dts/ti/dra7x-evm-osd-lcd-common.dtso b/arch/arm/boot/dts/ti/dra7x-evm-osd-lcd-common.dtso new file mode 100644 index 0000000..12347d1 --- /dev/null +++ b/arch/arm/boot/dts/ti/dra7x-evm-osd-lcd-common.dtso @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/dts-v1/; +/plugin/; +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + fragment@101 { + target-path = "/"; + + __overlay__ { + aliases { + display0 = "/display"; + display1 = "/connector"; + }; + + lcd_bl: backlight { + compatible = "led-backlight"; + leds = <&backlight_led>; + brightness-levels = <0 243 245 247 248 249 251 252 256>; + default-brightness-level = <5>; + }; + + tc358768_refclk: tc358768_refclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <20000000>; + }; + + v_1p2_d: fixedregulator-v_1p2_d { + /* Output of TPS74701 on the display board */ + compatible = "regulator-fixed"; + regulator-name = "V1p2D"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <&evm_5v0>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; +}; + +&pcf_lcd { + p13 { + gpio-hog; + gpios = <13 GPIO_ACTIVE_LOW>; + line-name = "backlight-enable"; + output-high; + }; +}; + +&i2c1 { + #address-cells = <1>; + #size-cells = <0>; + + dsi_bridge: tc358768@0e { + compatible = "toshiba,tc358768"; + reg = <0x0e>; + + clocks = <&tc358768_refclk>; + clock-names = "refclk"; + + /* GPIO line is inverted before going to the bridge */ + reset-gpios = <&pcf_display_board 0 GPIO_ACTIVE_HIGH>; + + vddc-supply = <&v_1p2_d>; + vddmipi-supply = <&v_1p2_d>; + vddio-supply = <&vsys_3v3>; + + dsi_bridge_ports: ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + rgb_in: endpoint { + remote-endpoint = <&dpi_out>; + data-lines = <24>; + }; + }; + }; + }; + + tlc59108: tlc59116@40 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "ti,tlc59108"; + reg = <0x40>; + + backlight_led: bl@2 { + label = "backlight"; + reg = <0x2>; + }; + }; + + pcf_display_board: gpio@27 { + compatible = "nxp,pcf8575"; + reg = <0x27>; + gpio-controller; + #gpio-cells = <2>; + }; + + touchscreen: edt-ft5506@38 { + status = "okay"; + compatible = "edt,edt-ft5506", "edt,edt-ft5x06"; + + reg = <0x38>; + + /* GPIO line is inverted before going to touch panel */ + reset-gpios = <&pcf_display_board 5 GPIO_ACTIVE_HIGH>; + + touchscreen-size-x = <1920>; + touchscreen-size-y = <1200>; + + wakeup-source; + }; +}; + +&dss { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dpi_out: endpoint { + remote-endpoint = <&rgb_in>; + data-lines = <24>; + }; + }; + + }; +}; |