/* * Device Tree overlay for rpi-display by Watterott * */ /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__ { rpi_display_pins: rpi_display_pins { brcm,pins = <18 23 24 25>; brcm,function = <1 1 1 0>; /* out out out in */ brcm,pull = <0 0 0 2>; /* - - - up */ }; }; }; fragment@4 { target = <&spi0>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; rpidisplay: rpi-display@0{ compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <&rpi_display_pins>; spi-max-frequency = <32000000>; rotate = <270>; bgr; fps = <30>; buswidth = <8>; reset-gpios = <&gpio 23 1>; dc-gpios = <&gpio 24 0>; led-gpios = <&gpio 18 0>; debug = <0>; }; rpidisplay_ts: rpi-display-ts@1 { compatible = "ti,ads7846"; reg = <1>; spi-max-frequency = <2000000>; interrupts = <25 2>; /* high-to-low edge triggered */ interrupt-parent = <&gpio>; pendown-gpio = <&gpio 25 1>; ti,x-plate-ohms = /bits/ 16 <60>; ti,pressure-max = /bits/ 16 <255>; }; }; }; fragment@10 { target = <&rpidisplay>; __dormant__ { backlight = <&backlight_gpio>; }; }; fragment@11 { target-path = "/"; __dormant__ { backlight_gpio: backlight_gpio { compatible = "gpio-backlight"; gpios = <&gpio 18 0>; /* GPIO_ACTIVE_HIGH */ }; }; }; fragment@20 { target = <&rpidisplay>; __dormant__ { backlight = <&backlight_pwm>; }; }; fragment@21 { target-path = "/"; __dormant__ { backlight_pwm: backlight_pwm { compatible = "pwm-backlight"; brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>; default-brightness-level = <16>; pwms = <&pwm 0 200000>; }; }; }; fragment@22 { target = <&pwm>; __dormant__ { assigned-clock-rates = <1000000>; status = "okay"; }; }; fragment@23 { target = <&chosen>; __dormant__ { bootargs = "snd_bcm2835.enable_headphones=0"; }; }; __overrides__ { speed = <&rpidisplay>,"spi-max-frequency:0"; rotate = <&rpidisplay>,"rotate:0", /* fbtft */ <&rpidisplay>,"rotation:0"; /* drm */ fps = <&rpidisplay>,"fps:0"; debug = <&rpidisplay>,"debug:0"; xohms = <&rpidisplay_ts>,"ti,x-plate-ohms;0"; swapxy = <&rpidisplay_ts>,"ti,swap-xy?"; backlight = <&rpidisplay>,"led-gpios:4", <&rpi_display_pins>,"brcm,pins:0"; drm = <&rpidisplay>, "compatible=multi-inno,mi0283qt", <&rpidisplay>, "spi-max-frequency:0=70000000", <&rpidisplay>, "reset-gpios:8=0", /* GPIO_ACTIVE_HIGH */ <0>, "+10+11"; backlight-pwm = <0>, "-10-11+20+21+22+23", <&rpi_display_pins>, "brcm,function:0=2"; /* Alt5 */ }; };