/* * Copyright (c) 2020 Taylor Glaeser * * SPDX-License-Identifier: MIT */ /dts-v1/; #include / { model = "Paw"; compatible = "paw"; chosen { zephyr,code-partition = &code_partition; // zephyr,console = &uart0; //zephyr,bt-mon-uart = &uart0; //zephyr,bt-c2h-uart = &uart0; zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; zmk,underglow = &led_strip; }; kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; label = "KSCAN"; input-gpios = <&gpio0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpio0 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpio0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> ; }; /* leds { compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; label = "Blue LED"; }; }; */ }; &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; mosi-pin = <22>; // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. sck-pin = <6>; miso-pin = <7>; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ spi-max-frequency = <4000000>; /* WS2812 */ chain-length = <4>; /* number of LEDs */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; }; }; &gpio0 { status = "okay"; }; &gpio1 { status = "okay"; }; &i2c0 { compatible = "nordic,nrf-twi"; sda-pin = <17>; scl-pin = <20>; }; &uart0 { compatible = "nordic,nrf-uarte"; status = "okay"; current-speed = <115200>; tx-pin = <39>; rx-pin = <34>; rts-pin = <33>; cts-pin = <12>; }; &usbd { status = "okay"; }; &flash0 { /* * For more information, see: * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html */ partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; boot_partition: partition@0 { label = "adafruit_boot"; reg = <0x000000000 0x0000C000>; }; code_partition: partition@26000 { label = "code_partition"; reg = <0x00026000 0x000d2000>; }; /* * The flash starting at 0x000f8000 and ending at * 0x000fffff is reserved for use by the application. */ /* * Storage partition will be used by FCB/LittleFS/NVS * if enabled. */ storage_partition: partition@f8000 { label = "storage"; reg = <0x000f8000 0x00008000>; }; }; };