/* * Device Tree overlay for PiScreen2 3.5" TFT with resistive touch by Ozzmaker.com * */ /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835"; fragment@0 { target = <&spi0>; __overlay__ { status = "okay"; }; }; fragment@1 { target = <&spidev0>; __overlay__ { status = "disabled"; }; }; fragment@2 { target = <&spidev1>; __overlay__ { status = "disabled"; }; }; fragment@3 { target = <&gpio>; __overlay__ { piscreen2_pins: piscreen2_pins { brcm,pins = <17 25 24 22>; brcm,function = <0 1 1 1>; /* in out out out */ }; }; }; fragment@4 { target = <&spi0>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; piscreen2: piscreen2@0{ compatible = "ilitek,ili9486"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <&piscreen2_pins>; bgr; spi-max-frequency = <64000000>; rotate = <90>; fps = <30>; buswidth = <8>; regwidth = <16>; txbuflen = <32768>; 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 0x10000c0 0x11 0x09 0x10000c1 0x41 0x10000c5 0x00 0x00 0x00 0x00 0x10000b6 0x00 0x02 0x10000f7 0xa9 0x51 0x2c 0x2 0x10000be 0x00 0x04 0x10000e9 0x00 0x1000011 0x1000029>; }; piscreen2_ts: piscreen2-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,swap-xy; ti,x-plate-ohms = /bits/ 16 <100>; ti,pressure-max = /bits/ 16 <255>; }; }; }; __overrides__ { speed = <&piscreen2>,"spi-max-frequency:0"; rotate = <&piscreen2>,"rotate:0"; fps = <&piscreen2>,"fps:0"; debug = <&piscreen2>,"debug:0"; xohms = <&piscreen2_ts>,"ti,x-plate-ohms;0"; }; };