Testing
This commit is contained in:
parent
0d123adb0d
commit
78222f84d5
7 changed files with 298 additions and 0 deletions
7
app/boards/arm/retic1337_tkl/Kconfig
Normal file
7
app/boards/arm/retic1337_tkl/Kconfig
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# nRF52840-KEYBOARD board configuration
|
||||||
|
|
||||||
|
config BOARD_ENABLE_DCDC
|
||||||
|
bool "Enable DCDC mode"
|
||||||
|
select SOC_DCDC_NRF52X
|
||||||
|
default y
|
||||||
|
depends on BOARD_RETIC1337_TKL
|
5
app/boards/arm/retic1337_tkl/Kconfig.board
Normal file
5
app/boards/arm/retic1337_tkl/Kconfig.board
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# nRF52840-KEYBOARD board configuration
|
||||||
|
|
||||||
|
config BOARD_RETIC1337_TKL
|
||||||
|
bool "retic1337_tkl"
|
||||||
|
depends on SOC_NRF52840_QIAA
|
5
app/boards/arm/retic1337_tkl/board.cmake
Normal file
5
app/boards/arm/retic1337_tkl/board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
board_runner_args(pyocd "--target=nrf52840")
|
||||||
|
set(OPENOCD_NRF5_INTERFACE "cmsis-dap")
|
||||||
|
set(OPENOCD_NRF5_SUBFAMILY "nRF52840")
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
14
app/boards/arm/retic1337_tkl/readme.md
Normal file
14
app/boards/arm/retic1337_tkl/readme.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# [Makerdiary M60](https://wiki.makerdiary.com/m60)
|
||||||
|
|
||||||
|
A 60% ANSI keyboard designed and manufactured by Makerdiary.
|
||||||
|
http://makerdiary.com
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Per key RGB LED.
|
||||||
|
- Uses makerdiary M.2 nRF52840 module
|
||||||
|
- Matrix wiring
|
||||||
|
|
||||||
|
## Hardware Notes
|
||||||
|
|
||||||
|
https://wiki.makerdiary.com/m60/developer_guide/hardware/
|
214
app/boards/arm/retic1337_tkl/retic1337_tkl.dts
Normal file
214
app/boards/arm/retic1337_tkl/retic1337_tkl.dts
Normal file
|
@ -0,0 +1,214 @@
|
||||||
|
/*
|
||||||
|
* Cameron Banna 2020
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "retic1337_tkl";
|
||||||
|
compatible = "nordic,pca10056-dk";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,console = &uart0;
|
||||||
|
zephyr,shell-uart = &uart0;
|
||||||
|
zephyr,uart-mcumgr = &uart0;
|
||||||
|
zephyr,bt-mon-uart = &uart0;
|
||||||
|
zephyr,i2c0 = &i2c0;
|
||||||
|
zephyr,i2c_0 = &i2c0;
|
||||||
|
zephyr,bt-c2h-uart = &uart0;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,code-partition = &slot0_partition;
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
};
|
||||||
|
kscan0: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
|
||||||
|
diode-direction = "col2row";
|
||||||
|
row-gpios
|
||||||
|
= <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio0 24 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
col-gpios
|
||||||
|
= <&gpio1 14 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 12 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 26 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 25 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 4 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 8 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 6 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 20 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 7 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
encoder: encoder {
|
||||||
|
compatible = "alps,ec11";
|
||||||
|
label = "ENCODER";
|
||||||
|
a-gpios = <&gpio0 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
|
b-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
|
resolution = <2>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
ext-power {
|
||||||
|
compatible = "zmk,ext-power-generic";
|
||||||
|
label = "EXT_POWER";
|
||||||
|
control-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
sensors {
|
||||||
|
compatible = "zmk,keymap-sensors";
|
||||||
|
sensors = <&encoder>;
|
||||||
|
};
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
led0_blue: led_0 {
|
||||||
|
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||||
|
label = "Blue LED 0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pwmleds {
|
||||||
|
compatible = "pwm-leds";
|
||||||
|
pwm_led0_blue: pwm_led_0 {
|
||||||
|
pwms = <&pwm1 9>;
|
||||||
|
label = "Blue PWM LED 0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/* These aliases are provided for compatibility with samples */
|
||||||
|
aliases {
|
||||||
|
led0 = &led0_blue;
|
||||||
|
led0-blue = &led0_blue;
|
||||||
|
pwm-led0 = &pwm_led0_blue;
|
||||||
|
blue-pwm-led = &pwm_led0_blue;
|
||||||
|
i2c0 = &i2c0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uart";
|
||||||
|
current-speed = <115200>;
|
||||||
|
status = "okay";
|
||||||
|
tx-pin = <13>;
|
||||||
|
rx-pin = <32>;
|
||||||
|
rts-pin = <2>;
|
||||||
|
cts-pin = <3>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
status = "okay";
|
||||||
|
sda-pin = <21>;
|
||||||
|
scl-pin = <19>;
|
||||||
|
clock-frequency = < I2C_BITRATE_STANDARD >;
|
||||||
|
is31fl3733a: is31fl3733@50 {
|
||||||
|
compatible = "issi,is31fl3733";
|
||||||
|
label = "IS31FL3733A";
|
||||||
|
reg = <0x50>;
|
||||||
|
};
|
||||||
|
is31fl3733b: is31fl3733@53 {
|
||||||
|
compatible = "issi,is31fl3733";
|
||||||
|
label = "IS31FL3733B";
|
||||||
|
reg = <0x53>;
|
||||||
|
};
|
||||||
|
bq27441@55 {
|
||||||
|
compatible = "ti,bq274xx";
|
||||||
|
label = "BATTERY";
|
||||||
|
reg = <0x55>;
|
||||||
|
design-voltage = <3700>;
|
||||||
|
design-capacity = <900>;
|
||||||
|
taper-current = <45>;
|
||||||
|
terminate-voltage = <3000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
status = "okay";
|
||||||
|
sda-pin = <30>;
|
||||||
|
scl-pin = <31>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pwm0 {
|
||||||
|
status = "okay";
|
||||||
|
ch0-pin = <41>;
|
||||||
|
ch0-inverted;
|
||||||
|
};
|
||||||
|
|
||||||
|
&flash0 {
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
boot_partition: partition@0 {
|
||||||
|
label = "mcuboot";
|
||||||
|
reg = <0x000000000 0x0000C000>;
|
||||||
|
};
|
||||||
|
slot0_partition: partition@c000 {
|
||||||
|
label = "image-0";
|
||||||
|
reg = <0x0000C000 0x00067000>;
|
||||||
|
};
|
||||||
|
slot1_partition: partition@73000 {
|
||||||
|
label = "image-1";
|
||||||
|
reg = <0x00073000 0x00067000>;
|
||||||
|
};
|
||||||
|
scratch_partition: partition@da000 {
|
||||||
|
label = "image-scratch";
|
||||||
|
reg = <0x000da000 0x0001e000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbd {
|
||||||
|
compatible = "nordic,nrf-usbd";
|
||||||
|
status = "okay";
|
||||||
|
};
|
37
app/boards/arm/retic1337_tkl/retic1337_tkl.keymap
Normal file
37
app/boards/arm/retic1337_tkl/retic1337_tkl.keymap
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
ledmap {
|
||||||
|
compatible = "zmk,ledmap";
|
||||||
|
num_of_led = <108>;
|
||||||
|
ledmap = <1 0 3 5 7 9 11 13 15 65 0 67 69 71 73 75 77 79
|
||||||
|
17 20 22 24 26 28 30 80 81 82 83 84 85 0 86 87 88 90
|
||||||
|
19 21 23 25 27 29 31 96 98 100 102 104 106 0 108 109 110 92
|
||||||
|
34 36 38 40 42 44 46 97 99 101 103 105 0 0 107 0 0 0
|
||||||
|
35 0 37 39 41 43 45 47 112 113 114 115 0 0 119 0 111 0
|
||||||
|
49 51 53 0 0 0 0 57 0 0 0 62 116 118 121 123 125 127>;
|
||||||
|
};
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &none &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &none &kp F9 &kp F10 &kp F11 &kp F12 &kp PRSC &kp PAUS &kp SCLK
|
||||||
|
&kp TILDE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &none &kp BSPC &kp INS &kp HOME &kp PG_UP
|
||||||
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &none &kp BSLH &kp DELETE &kp END &kp PG_DN
|
||||||
|
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &none &none &kp RET &none &none &none
|
||||||
|
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &none &none &kp RSHFT &none &kp UP &none
|
||||||
|
&kp LCTRL &kp LGUI &kp LALT &none &none &none &none &kp SPACE &none &none &none &kp RALT &none &kp RGUI &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||||
|
>;
|
||||||
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
16
app/boards/arm/retic1337_tkl/retic1337_tkl.yaml
Normal file
16
app/boards/arm/retic1337_tkl/retic1337_tkl.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
identifier: RETIC1337_TKL
|
||||||
|
name: retic1337_tkl
|
||||||
|
type: keyboard
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- i2c
|
||||||
|
- kscan
|
||||||
|
|
Loading…
Add table
Reference in a new issue