aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/boards
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2024-08-08 16:26:38 -0600
committerPete Johanson <[email protected]>2024-09-05 12:22:08 -0600
commite0339a2a57c33b86e351f31b04345ee8c984b075 (patch)
tree5a68dd9603796b25c4906df8fe3c6c7569f25089 /app/boards
parentb84436e61176b653d08a0584ab2177fae95194e4 (diff)
downloadzmk-e0339a2a57c33b86e351f31b04345ee8c984b075.tar.gz
zmk-e0339a2a57c33b86e351f31b04345ee8c984b075.zip
feat: Add shared layout .dtsi files to promote reuse.
* Add Corne and Ferris shared layouts, and update the respective shields to use them. * Add a sample Hummingbird physical layout for testing posix xiao. * Add Sofle physical layout as an additional reference.
Diffstat (limited to 'app/boards')
-rw-r--r--app/boards/arm/bdn9/bdn9_rev2.keymap2
-rw-r--r--app/boards/arm/ferris/ferris_rev02.dts10
-rw-r--r--app/boards/arm/ferris/ferris_rev02.keymap2
-rw-r--r--app/boards/shields/corne/corne.dtsi14
-rw-r--r--app/boards/shields/cradio/cradio.dtsi7
-rw-r--r--app/boards/shields/hummingbird/hummingbird.overlay49
-rw-r--r--app/boards/shields/sofle/sofle.dtsi6
-rw-r--r--app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi11
-rw-r--r--app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi7
-rw-r--r--app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi8
10 files changed, 100 insertions, 16 deletions
diff --git a/app/boards/arm/bdn9/bdn9_rev2.keymap b/app/boards/arm/bdn9/bdn9_rev2.keymap
index 1e2c192dd6..0f522492ce 100644
--- a/app/boards/arm/bdn9/bdn9_rev2.keymap
+++ b/app/boards/arm/bdn9/bdn9_rev2.keymap
@@ -4,6 +4,8 @@
* SPDX-License-Identifier: MIT
*/
+#undef ZMK_BEHAVIORS_KEEP_ALL
+
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/arm/ferris/ferris_rev02.dts
index a0e28f0383..235a92e458 100644
--- a/app/boards/arm/ferris/ferris_rev02.dts
+++ b/app/boards/arm/ferris/ferris_rev02.dts
@@ -10,6 +10,12 @@
#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/cuddlykeyboards/ferris.dtsi>
+
+&cuddlykeyboards_ferris_layout {
+ transform = <&transform>;
+};
+
/ {
model = "Ferris rev0.2";
compatible = "ferris,rev02", "st,stm32f072";
@@ -18,7 +24,6 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan;
- zmk,matrix-transform = &transform;
/* TODO: Enable once we support the IC for underglow
zmk,underglow = &led_strip;
*/
@@ -114,6 +119,9 @@ zephyr_udc0: &usb {
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default";
+
+ // Overridden to lower RAM usage.
+ num-bidir-endpoints = <4>;
};
&clk_hsi {
diff --git a/app/boards/arm/ferris/ferris_rev02.keymap b/app/boards/arm/ferris/ferris_rev02.keymap
index b7668416b3..bc0a235614 100644
--- a/app/boards/arm/ferris/ferris_rev02.keymap
+++ b/app/boards/arm/ferris/ferris_rev02.keymap
@@ -4,6 +4,8 @@
* SPDX-License-Identifier: MIT
*/
+#undef ZMK_BEHAVIORS_KEEP_ALL
+
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi
index e1edcce81e..e4339e617d 100644
--- a/app/boards/shields/corne/corne.dtsi
+++ b/app/boards/shields/corne/corne.dtsi
@@ -6,11 +6,21 @@
#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/foostan/corne.dtsi>
+
+&foostan_corne_6col_layout {
+ transform = <&default_transform>;
+};
+
+&foostan_corne_5col_layout {
+ transform = <&five_column_transform>;
+};
+
/ {
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan0;
- zmk,matrix-transform = &default_transform;
+ zmk,physical-layout = &foostan_corne_6col_layout;
};
default_transform: keymap_transform_0 {
@@ -36,7 +46,7 @@ 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)
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
-// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
+// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = <
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(0,10)
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(1,10)
diff --git a/app/boards/shields/cradio/cradio.dtsi b/app/boards/shields/cradio/cradio.dtsi
index b510c636f6..c2947e5585 100644
--- a/app/boards/shields/cradio/cradio.dtsi
+++ b/app/boards/shields/cradio/cradio.dtsi
@@ -5,12 +5,15 @@
*/
#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/cuddlykeyboards/ferris.dtsi>
-/ {
+&cuddlykeyboards_ferris_layout {
+ transform = <&default_transform>;
+};
+/ {
chosen {
zmk,kscan = &kscan0;
- zmk,matrix-transform = &default_transform;
};
default_transform: keymap_transform_0 {
diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay
index 2474d089df..b077804e5b 100644
--- a/app/boards/shields/hummingbird/hummingbird.overlay
+++ b/app/boards/shields/hummingbird/hummingbird.overlay
@@ -6,12 +6,11 @@
#include <dt-bindings/zmk/matrix_transform.h>
+#include <physical_layouts.dtsi>
+
/ {
chosen {
zmk,kscan = &kscan0;
- zmk,matrix-transform = &default_transform;
- /delete-property/ zephyr,console;
- /delete-property/ zephyr,shell-uart;
};
default_transform: keymap_transform_0 {
@@ -51,7 +50,45 @@
;
};
-};
-&xiao_spi { status = "disabled"; };
-&xiao_serial { status = "disabled"; };
+ layout_0: layout_0 {
+ compatible = "zmk,physical-layout";
+ display-name = "Default";
+
+ transform = <&default_transform>;
+
+ keys // w h x y rot rx ry
+ = <&key_physical_attrs 100 100 0 75 0 0 0>
+ , <&key_physical_attrs 100 100 100 25 0 0 0>
+ , <&key_physical_attrs 100 100 200 0 0 0 0>
+ , <&key_physical_attrs 100 100 300 25 0 0 0>
+ , <&key_physical_attrs 100 100 400 75 0 0 0>
+ , <&key_physical_attrs 100 100 600 75 0 0 0>
+ , <&key_physical_attrs 100 100 700 25 0 0 0>
+ , <&key_physical_attrs 100 100 800 0 0 0 0>
+ , <&key_physical_attrs 100 100 900 25 0 0 0>
+ , <&key_physical_attrs 100 100 1000 75 0 0 0>
+ , <&key_physical_attrs 100 100 0 175 0 0 0>
+ , <&key_physical_attrs 100 100 100 125 0 0 0>
+ , <&key_physical_attrs 100 100 200 100 0 0 0>
+ , <&key_physical_attrs 100 100 300 125 0 0 0>
+ , <&key_physical_attrs 100 100 400 175 0 0 0>
+ , <&key_physical_attrs 100 100 600 175 0 0 0>
+ , <&key_physical_attrs 100 100 700 125 0 0 0>
+ , <&key_physical_attrs 100 100 800 100 0 0 0>
+ , <&key_physical_attrs 100 100 900 125 0 0 0>
+ , <&key_physical_attrs 100 100 1000 175 0 0 0>
+ , <&key_physical_attrs 100 100 100 225 0 0 0>
+ , <&key_physical_attrs 100 100 200 200 0 0 0>
+ , <&key_physical_attrs 100 100 300 225 0 0 0>
+ , <&key_physical_attrs 100 100 700 225 0 0 0>
+ , <&key_physical_attrs 100 100 800 200 0 0 0>
+ , <&key_physical_attrs 100 100 900 225 0 0 0>
+ , <&key_physical_attrs 100 100 325 350 0 0 0>
+ , <&key_physical_attrs 100 100 425 375 0 0 0>
+ , <&key_physical_attrs 100 100 575 375 0 0 0>
+ , <&key_physical_attrs 100 100 675 350 0 0 0>
+ ;
+ };
+
+};
diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi
index ef89e4a592..9527f26bc7 100644
--- a/app/boards/shields/sofle/sofle.dtsi
+++ b/app/boards/shields/sofle/sofle.dtsi
@@ -5,12 +5,16 @@
*/
#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/josefadamcik/sofle.dtsi>
+
+&josefadamcik_sofle_layout {
+ transform = <&default_transform>;
+};
/ {
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan0;
- zmk,matrix-transform = &default_transform;
};
default_transform: keymap_transform_0 {
diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi
index 56833b629c..d63cdf2140 100644
--- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi
+++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi
@@ -6,11 +6,20 @@
#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/foostan/corne.dtsi>
+
+&foostan_corne_6col_layout {
+ transform = <&default_transform>;
+};
+
+&foostan_corne_5col_layout {
+ transform = <&five_column_transform>;
+};
+
/ {
chosen {
zephyr,display = &oled;
- zmk,matrix-transform = &default_transform;
};
default_transform: keymap_transform_0 {
diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi
index 2586b0c024..e360528f34 100644
--- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi
+++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi
@@ -6,11 +6,16 @@
#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/josefadamcik/sofle.dtsi>
+
+&josefadamcik_sofle_layout {
+ transform = <&default_transform>;
+};
+
/ {
chosen {
zephyr,display = &oled;
- zmk,matrix-transform = &default_transform;
};
default_transform: keymap_transform_0 {
diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi
index 883636debb..4e1a0a97df 100644
--- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi
+++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi
@@ -6,11 +6,15 @@
#include <dt-bindings/zmk/matrix_transform.h>
-/ {
+#include <layouts/cuddlykeyboards/ferris.dtsi>
+
+&cuddlykeyboards_ferris_layout {
+ transform = <&default_transform>;
+};
+/ {
chosen {
zephyr,display = &oled;
- zmk,matrix-transform = &default_transform;
};
default_transform: keymap_transform_0 {