commit
This commit is contained in:
parent
2f3a9e0c32
commit
a113a07f6d
4 changed files with 235 additions and 115 deletions
176
app/boards/arm/ahokore_v2/ahokore.dts
Normal file
176
app/boards/arm/ahokore_v2/ahokore.dts
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Pete Johanson, TJ Campie
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Ahokore";
|
||||||
|
compatible = "ahokore";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <10>;
|
||||||
|
rows = <4>;
|
||||||
|
map = <
|
||||||
|
|
||||||
|
// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW6 | SW7 | SW8 | SW9 | SW10 |
|
||||||
|
// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW16 | SW17 | SW18 | SW19 | SW20 |
|
||||||
|
// | SW21 | SW22 | SW23 | SW24 | SW25 | | SW26 | SW27 | SW28 | SW29 | SW30 |
|
||||||
|
// | SW31 | SW32 | SW33 | | SW34 | SW35 | SW36 |
|
||||||
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
|
||||||
|
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
|
||||||
|
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
||||||
|
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan_0 {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
col-gpios
|
||||||
|
= <&gpio0 10 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 9 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 6 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 4 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 2 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
|
||||||
|
row-gpios
|
||||||
|
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio1 00 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio1 03 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&gpio1 01 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
ext-power {
|
||||||
|
compatible = "zmk,ext-power-generic";
|
||||||
|
label = "EXT_POWER";
|
||||||
|
control-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt {
|
||||||
|
compatible = "zmk,battery-voltage-divider";
|
||||||
|
label = "BATTERY";
|
||||||
|
io-channels = <&adc 2>;
|
||||||
|
output-ohms = <2000000>;
|
||||||
|
full-ohms = <(2000000 + 806000)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <21>;
|
||||||
|
scl-pin = <19>;
|
||||||
|
|
||||||
|
oled: ssd1306@3c {
|
||||||
|
compatible = "solomon,ssd1306fb";
|
||||||
|
reg = <0x3c>;
|
||||||
|
label = "DISPLAY";
|
||||||
|
width = <128>;
|
||||||
|
height = <32>;
|
||||||
|
segment-offset = <0>;
|
||||||
|
page-offset = <0>;
|
||||||
|
display-offset = <0>;
|
||||||
|
multiplex-ratio = <31>;
|
||||||
|
segment-remap;
|
||||||
|
com-invdir;
|
||||||
|
com-sequential;
|
||||||
|
prechargep = <0x22>;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
status = "okay";
|
||||||
|
current-speed = <115200>;
|
||||||
|
tx-pin = <16>;
|
||||||
|
rx-pin = <14>;
|
||||||
|
rts-pin = <13>;
|
||||||
|
cts-pin = <15>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&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>;
|
||||||
|
|
||||||
|
sd_partition: partition@0 {
|
||||||
|
label = "softdevice";
|
||||||
|
reg = <0x00000000 0x00026000>;
|
||||||
|
};
|
||||||
|
code_partition: partition@26000 {
|
||||||
|
label = "code_partition";
|
||||||
|
reg = <0x00026000 0x000c6000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The flash starting at 0x000ec000 and ending at
|
||||||
|
* 0x000f3fff is reserved for use by the application.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Storage partition will be used by FCB/LittleFS/NVS
|
||||||
|
* if enabled.
|
||||||
|
*/
|
||||||
|
storage_partition: partition@ec000 {
|
||||||
|
label = "storage";
|
||||||
|
reg = <0x000ec000 0x00008000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot_partition: partition@f4000 {
|
||||||
|
label = "adafruit_boot";
|
||||||
|
reg = <0x000f4000 0x0000c000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
59
app/boards/arm/ahokore_v2/ahokore.keymap
Normal file
59
app/boards/arm/ahokore_v2/ahokore.keymap
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* 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>
|
||||||
|
#include <dt-bindings/zmk/ext_power.h>
|
||||||
|
|
||||||
|
#define DEFAULT 0
|
||||||
|
#define NUM_SYM 1
|
||||||
|
#define NAV 2
|
||||||
|
|
||||||
|
/ {
|
||||||
|
behaviors {
|
||||||
|
hm: homerow_mods {
|
||||||
|
compatible = "zmk,behavior-hold-tap";
|
||||||
|
label = "homerow mods";
|
||||||
|
#binding-cells = <2>;
|
||||||
|
tapping_term_ms = <225>;
|
||||||
|
flavor = "tap-preferred";
|
||||||
|
bindings = <&kp>, <&kp>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
||||||
|
&hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm RALT L &hm RGUI RET
|
||||||
|
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
|
||||||
|
&kp TAB < NAV RET < NUM_SYM SPACE < NAV RET
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
num_sym {
|
||||||
|
bindings = <
|
||||||
|
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp EQUAL &kp MINUS
|
||||||
|
&kp DEL &none &none &none &none &none &none &none &kp DOT &kp FSLH
|
||||||
|
&none &trans &trans &kp RET
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
nav {
|
||||||
|
bindings = <
|
||||||
|
&bt BT_CLR &bt BT_NXT &bt BT_PRV &none &none &none &none &kp UP &none &kp BSPC
|
||||||
|
&trans &trans &trans &trans &none &none &kp LEFT &kp DOWN &kp RIGHT &none
|
||||||
|
&ext_power EP_OFF &ext_power EP_ON &none &none &none &none &none &none &none &kp BSLH
|
||||||
|
&none &trans &trans &kp RET
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,115 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2020 Pete Johanson
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "nice!nano";
|
|
||||||
compatible = "nice,nano";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ext-power {
|
|
||||||
compatible = "zmk,ext-power-generic";
|
|
||||||
label = "EXT_POWER";
|
|
||||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "BATTERY";
|
|
||||||
io-channels = <&adc 2>;
|
|
||||||
output-ohms = <2000000>;
|
|
||||||
full-ohms = <(2000000 + 806000)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c0 {
|
|
||||||
compatible = "nordic,nrf-twi";
|
|
||||||
sda-pin = <17>;
|
|
||||||
scl-pin = <20>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart0 {
|
|
||||||
compatible = "nordic,nrf-uarte";
|
|
||||||
tx-pin = <6>;
|
|
||||||
rx-pin = <8>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&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>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "softdevice";
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
Loading…
Add table
Reference in a new issue