|
| 1 | +/* |
| 2 | + * Copyright (c) 2020 Pete Johanson |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: MIT |
| 5 | + */ |
| 6 | + |
| 7 | +#include <dt-bindings/zmk/matrix_transform.h> |
| 8 | + |
| 9 | +/ { |
| 10 | + chosen { |
| 11 | + zmk,kscan = &kscan0; |
| 12 | + zmk,matrix-transform = &default_transform; |
| 13 | + zephyr,code-partition = &code_partition; |
| 14 | + zephyr,sram = &sram0; |
| 15 | + zephyr,flash = &flash0; |
| 16 | + zephyr,console = &cdc_acm_uart; |
| 17 | + }; |
| 18 | + |
| 19 | + default_transform: keymap_transform_0 { |
| 20 | + compatible = "zmk,matrix-transform"; |
| 21 | + columns = <14>; |
| 22 | + rows = <6>; |
| 23 | + map = < |
| 24 | +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) |
| 25 | +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) |
| 26 | +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) |
| 27 | +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) |
| 28 | +RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,6) RC(1,6) RC(2,6) RC(2,7) RC(1,7) RC(0,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) |
| 29 | +RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(3,6) RC(4,6) RC(5,6) RC(5,7) RC(4,7) RC(3,7) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) |
| 30 | + >; |
| 31 | + }; |
| 32 | + |
| 33 | + kscan0: kscan { |
| 34 | + compatible = "zmk,kscan-gpio-matrix"; |
| 35 | + |
| 36 | + diode-direction = "row2col"; |
| 37 | + debounce-press-ms = <1>; |
| 38 | + debounce-release-ms = <25>; |
| 39 | + }; |
| 40 | + |
| 41 | +}; |
| 42 | + |
| 43 | +&adc { |
| 44 | + status = "okay"; |
| 45 | +}; |
| 46 | + |
| 47 | +&gpiote { |
| 48 | + status = "okay"; |
| 49 | +}; |
| 50 | + |
| 51 | +&gpio0 { |
| 52 | + status = "okay"; |
| 53 | +}; |
| 54 | + |
| 55 | +&gpio1 { |
| 56 | + status = "okay"; |
| 57 | +}; |
| 58 | + |
| 59 | +&usbd { |
| 60 | + status = "okay"; |
| 61 | + cdc_acm_uart: cdc_acm_uart { |
| 62 | + compatible = "zephyr,cdc-acm-uart"; |
| 63 | + }; |
| 64 | +}; |
| 65 | + |
| 66 | +&flash0 { |
| 67 | + /* |
| 68 | + * For more information, see: |
| 69 | + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html |
| 70 | + */ |
| 71 | + partitions { |
| 72 | + compatible = "fixed-partitions"; |
| 73 | + #address-cells = <1>; |
| 74 | + #size-cells = <1>; |
| 75 | + |
| 76 | + sd_partition: partition@0 { |
| 77 | + reg = <0x00000000 0x00026000>; |
| 78 | + }; |
| 79 | + code_partition: partition@26000 { |
| 80 | + reg = <0x00026000 0x000c6000>; |
| 81 | + }; |
| 82 | + |
| 83 | + /* |
| 84 | + * The flash starting at 0x000ec000 and ending at |
| 85 | + * 0x000f3fff is reserved for use by the application. |
| 86 | + */ |
| 87 | + |
| 88 | + /* |
| 89 | + * Storage partition will be used by FCB/LittleFS/NVS |
| 90 | + * if enabled. |
| 91 | + */ |
| 92 | + storage_partition: partition@ec000 { |
| 93 | + reg = <0x000ec000 0x00008000>; |
| 94 | + }; |
| 95 | + |
| 96 | + boot_partition: partition@f4000 { |
| 97 | + reg = <0x000f4000 0x0000c000>; |
| 98 | + }; |
| 99 | + }; |
| 100 | +}; |
0 commit comments