1/* 2 * Copyright (c) 2020, Linaro Ltd. 3 * Copyright (c) 2022, Esco Medical ApS 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 * 7 * Application overlay for testing driver builds 8 * 9 * Names in this file should be chosen in a way that won't conflict 10 * with real-world devicetree nodes, to allow these tests to run on 11 * (and be extended to test) real hardware. 12 */ 13 14#include <freq.h> 15#include <zephyr/dt-bindings/led/led.h> 16 17/ { 18 test { 19 #address-cells = <1>; 20 #size-cells = <1>; 21 22 test_gpio: gpio@deadbeef { 23 compatible = "vnd,gpio"; 24 gpio-controller; 25 reg = <0xdeadbeef 0x1000>; 26 #gpio-cells = <0x2>; 27 status = "okay"; 28 }; 29 30 test_spi: spi@33334444 { 31 #address-cells = <1>; 32 #size-cells = <0>; 33 compatible = "vnd,spi"; 34 reg = <0x33334444 0x1000>; 35 status = "okay"; 36 clock-frequency = <DT_FREQ_M(2)>; 37 38 cs-gpios = <&test_gpio 0 0>, 39 <&test_gpio 0 0>, 40 <&test_gpio 0 0>, 41 <&test_gpio 0 0>; 42 43 test_spi_tlc5971: tlc5971@0 { 44 status = "okay"; 45 compatible = "ti,tlc59711", "ti,tlc5971"; 46 spi-max-frequency = <DT_FREQ_M(1)>; 47 reg = <0x0>; 48 chain-length = <8>; // two TLC5971 devices 49 color-mapping = <LED_COLOR_ID_BLUE>, 50 <LED_COLOR_ID_GREEN>, 51 <LED_COLOR_ID_RED>; 52 }; 53 54 test_spi_apa102: apa102@1 { 55 compatible = "apa,apa102"; 56 reg = <0x1>; 57 spi-max-frequency = <5250000>; 58 chain-length = <4>; 59 color-mapping = <LED_COLOR_ID_BLUE 60 LED_COLOR_ID_GREEN 61 LED_COLOR_ID_RED>; 62 }; 63 64 test_spi_lpd8806: lpd8806@2 { 65 compatible = "greeled,lpd8806"; 66 reg = <0x2>; 67 spi-max-frequency = <2000000>; 68 chain-length = <1>; 69 color-mapping = <LED_COLOR_ID_RED 70 LED_COLOR_ID_GREEN 71 LED_COLOR_ID_BLUE>; 72 }; 73 74 test_spi_ws2812: ws2812@3 { 75 compatible = "worldsemi,ws2812-spi"; 76 reg = <0x3>; 77 spi-max-frequency = <2000000>; 78 79 chain-length = <1>; 80 color-mapping = <LED_COLOR_ID_GREEN>, 81 <LED_COLOR_ID_RED>, 82 <LED_COLOR_ID_BLUE>; 83 spi-one-frame = <1>; 84 spi-zero-frame = <2>; 85 }; 86 }; 87 }; 88}; 89