107 lines
3.1 KiB
Text
107 lines
3.1 KiB
Text
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include <rpi_pico/rp2040.dtsi>
|
|
#include <dt-bindings/zmk/matrix_transform.h>
|
|
|
|
/ {
|
|
model = "chameleon";
|
|
compatible = "chameleon";
|
|
|
|
chosen {
|
|
zephyr,sram = &sram0;
|
|
zephyr,flash = &flash0;
|
|
zephyr,console = &cdc_acm_uart;
|
|
zephyr,shell-uart = &cdc_acm_uart;
|
|
zephyr,code-partition = &code_partition;
|
|
zmk,kscan = &kscan0;
|
|
zmk,matrix_transform = &layout_grid_transform;
|
|
};
|
|
|
|
xtal_clk: xtal-clk {
|
|
compatible = "fixed-clock";
|
|
clock-frequency = <12000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
kscan0: kscan {
|
|
compatible = "zmk,kscan-gpio-matrix";
|
|
diode-direction = "col2row";
|
|
row-gpios
|
|
= <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 24 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
, <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
;
|
|
col-gpios
|
|
= <&gpio0 15 GPIO_ACTIVE_HIGH>
|
|
, <&gpio0 14 GPIO_ACTIVE_HIGH>
|
|
, <&gpio0 6 GPIO_ACTIVE_HIGH>
|
|
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
|
, <&gpio0 4 GPIO_ACTIVE_HIGH>
|
|
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
|
;
|
|
};
|
|
|
|
layout_grid_transform:
|
|
keymap_transform_0 {
|
|
compatible = "zmk,matrix-transform";
|
|
columns = <6>;
|
|
rows = <8>;
|
|
map = <
|
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0)
|
|
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0)
|
|
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(5,5) RC(5,4) RC(5,3) RC(5,2) RC(5,1) RC(5,0)
|
|
RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(7,5) RC(7,4) RC(7,3) RC(7,2) RC(7,1) RC(7,0)
|
|
>;
|
|
};
|
|
};
|
|
|
|
&usbd {
|
|
status = "okay";
|
|
cdc_acm_uart: cdc_acm_uart {
|
|
compatible = "zephyr,cdc-acm-uart";
|
|
};
|
|
};
|
|
|
|
|
|
|
|
&flash0 {
|
|
reg = <0x10000000 DT_SIZE_M(4)>;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
/* Reserved memory for the second stage bootloader */
|
|
second_stage_bootloader: partition@0 {
|
|
reg = <0x00000000 0x100>;
|
|
read-only;
|
|
};
|
|
|
|
/*
|
|
* Usable flash. Starts at 0x100, after the bootloader. The partition
|
|
* size is 16MB minus the 0x100 bytes taken by the bootloader.
|
|
*/
|
|
code_partition: partition@100 {
|
|
reg = <0x100 (DT_SIZE_M(4) - 0x100)>;
|
|
read-only;
|
|
};
|
|
};
|
|
};
|
|
|
|
&gpio0 {
|
|
status = "okay";
|
|
};
|
|
|