Skip to content

dts: overlay: add support for various displays #853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@ dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pcf2127-rtc-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pcf8523-rtc-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
Expand Down
87 changes: 87 additions & 0 deletions arch/arm/boot/dts/hy28a-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* Device Tree overlay for HY28A display
*
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";

spidev@0{
status = "disabled";
};

spidev@1{
status = "disabled";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
hy28a_pins: hy28a_pins {
brcm,pins = <17 25 18>;
brcm,function = <0 1 1>; /* in out out */
};
};
};

fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;

hy28a: hy28a@0{
compatible = "ilitek,ili9320";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&hy28a_pins>;

spi-max-frequency = <32000000>;
spi-cpol;
spi-cpha;
rotate = <270>;
bgr;
fps = <50>;
buswidth = <8>;
startbyte = <0x70>;
reset-gpios = <&gpio 25 0>;
led-gpios = <&gpio 18 1>;
debug = <0>;
};

hy28a_ts: hy28a-ts@1 {
compatible = "ti,ads7846";
reg = <1>;

spi-max-frequency = <2000000>;
interrupts = <17 2>; /* high-to-low edge triggered */
interrupt-parent = <&gpio>;
pendown-gpio = <&gpio 17 0>;
ti,x-plate-ohms = /bits/ 16 <100>;
ti,pressure-max = /bits/ 16 <255>;
};
};
};
__overrides__ {
speed = <&hy28a>,"spi-max-frequency:0";
rotate = <&hy28a>,"rotate:0";
fps = <&hy28a>,"fps:0";
debug = <&hy28a>,"debug:0";
xohms = <&hy28a_ts>,"ti,x-plate-ohms;0";
resetgpio = <&hy28a>,"reset-gpios:4",
<&hy28a_pins>, "brcm,pins:1";
ledgpio = <&hy28a>,"led-gpios:4",
<&hy28a_pins>, "brcm,pins:2";
};
};
142 changes: 142 additions & 0 deletions arch/arm/boot/dts/hy28b-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*
* Device Tree overlay for HY28b display shield by Texy
*
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";

spidev@0{
status = "disabled";
};

spidev@1{
status = "disabled";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
hy28b_pins: hy28b_pins {
brcm,pins = <17 25 18>;
brcm,function = <0 1 1>; /* in out out */
};
};
};

fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;

hy28b: hy28b@0{
compatible = "ilitek,ili9325";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&hy28b_pins>;

spi-max-frequency = <48000000>;
spi-cpol;
spi-cpha;
rotate = <270>;
bgr;
fps = <50>;
buswidth = <8>;
startbyte = <0x70>;
reset-gpios = <&gpio 25 0>;
led-gpios = <&gpio 18 1>;

gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";

init = <0x10000e7 0x0010
0x1000000 0x0001
0x1000001 0x0100
0x1000002 0x0700
0x1000003 0x1030
0x1000004 0x0000
0x1000008 0x0207
0x1000009 0x0000
0x100000a 0x0000
0x100000c 0x0001
0x100000d 0x0000
0x100000f 0x0000
0x1000010 0x0000
0x1000011 0x0007
0x1000012 0x0000
0x1000013 0x0000
0x2000032
0x1000010 0x1590
0x1000011 0x0227
0x2000032
0x1000012 0x009c
0x2000032
0x1000013 0x1900
0x1000029 0x0023
0x100002b 0x000e
0x2000032
0x1000020 0x0000
0x1000021 0x0000
0x2000032
0x1000050 0x0000
0x1000051 0x00ef
0x1000052 0x0000
0x1000053 0x013f
0x1000060 0xa700
0x1000061 0x0001
0x100006a 0x0000
0x1000080 0x0000
0x1000081 0x0000
0x1000082 0x0000
0x1000083 0x0000
0x1000084 0x0000
0x1000085 0x0000
0x1000090 0x0010
0x1000092 0x0000
0x1000093 0x0003
0x1000095 0x0110
0x1000097 0x0000
0x1000098 0x0000
0x1000007 0x0133
0x1000020 0x0000
0x1000021 0x0000
0x2000064>;
debug = <0>;
};

hy28b_ts: hy28b-ts@1 {
compatible = "ti,ads7846";
reg = <1>;

spi-max-frequency = <2000000>;
interrupts = <17 2>; /* high-to-low edge triggered */
interrupt-parent = <&gpio>;
pendown-gpio = <&gpio 17 0>;
ti,x-plate-ohms = /bits/ 16 <100>;
ti,pressure-max = /bits/ 16 <255>;
};
};
};
__overrides__ {
speed = <&hy28b>,"spi-max-frequency:0";
rotate = <&hy28b>,"rotate:0";
fps = <&hy28b>,"fps:0";
debug = <&hy28b>,"debug:0";
xohms = <&hy28b_ts>,"ti,x-plate-ohms;0";
resetgpio = <&hy28b>,"reset-gpios:4",
<&hy28b_pins>, "brcm,pins:1";
ledgpio = <&hy28b>,"led-gpios:4",
<&hy28b_pins>, "brcm,pins:2";
};
};
94 changes: 94 additions & 0 deletions arch/arm/boot/dts/piscreen-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker
*
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";

spidev@0{
status = "disabled";
};

spidev@1{
status = "disabled";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
piscreen_pins: piscreen_pins {
brcm,pins = <17 25 24 22>;
brcm,function = <0 1 1 1>; /* in out out out */
};
};
};

fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;

piscreen: piscreen@0{
compatible = "ilitek,ili9486";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&piscreen_pins>;

spi-max-frequency = <32000000>;
rotate = <270>;
bgr;
fps = <30>;
buswidth = <8>;
regwidth = <16>;
reset-gpios = <&gpio 25 0>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 22 1>;
debug = <0>;

init = <0x10000b0 0x00
0x1000011
0x20000ff
0x100003a 0x55
0x1000036 0x28
0x10000c2 0x44
0x10000c5 0x00 0x00 0x00 0x00
0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00
0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
0x1000011
0x1000029>;
};

piscreen-ts@1 {
compatible = "ti,ads7846";
reg = <1>;

spi-max-frequency = <2000000>;
interrupts = <17 2>; /* high-to-low edge triggered */
interrupt-parent = <&gpio>;
pendown-gpio = <&gpio 17 0>;
ti,x-plate-ohms = /bits/ 16 <100>;
ti,pressure-max = /bits/ 16 <255>;
};
};
};
__overrides__ {
speed = <&piscreen>,"spi-max-frequency:0";
rotate = <&piscreen>,"rotate:0";
fps = <&piscreen>,"fps:0";
debug = <&piscreen>,"debug:0";
};
};
Loading