From fb359f576619940164ca2e770b49b7b34f13428e Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 20 Nov 2024 16:36:32 -0700 Subject: feat(boards): Add glove80 nexus node for extension GPIO. (#2594) Add generic extension nexus node for consistent GPIO access to the extension pins in a left/right agnostic way. --- app/boards/arm/glove80/glove80_lh.dts | 15 +++++++++++++++ app/boards/arm/glove80/glove80_rh.dts | 15 +++++++++++++++ app/dts/bindings/gpio/moergo,glove80-ext.yaml | 24 ++++++++++++++++++++++++ app/dts/bindings/vendor-prefixes.txt | 3 ++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 app/dts/bindings/gpio/moergo,glove80-ext.yaml diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/arm/glove80/glove80_lh.dts index 5ef5420712..2ed56688ac 100644 --- a/app/boards/arm/glove80/glove80_lh.dts +++ b/app/boards/arm/glove80/glove80_lh.dts @@ -36,6 +36,21 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; }; + + glove80_ext: connector { + compatible = "moergo,glove80-ext"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <1 0 &gpio0 22 0> /* EXT1 */ + , <2 0 &gpio0 21 0> /* EXT2 */ + , <3 0 &gpio0 24 0> /* EXT3 */ + , <4 0 &gpio0 20 0> /* EXT4 */ + , <5 0 &gpio0 25 0> /* EXT5 */ + , <6 0 &gpio1 00 0> /* EXT6 */ + ; + }; }; &spi3 { diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/arm/glove80/glove80_rh.dts index cc8104c7d9..7b54f62c85 100644 --- a/app/boards/arm/glove80/glove80_rh.dts +++ b/app/boards/arm/glove80/glove80_rh.dts @@ -37,6 +37,21 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; }; + + glove80_ext: connector { + compatible = "moergo,glove80-ext"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <1 0 &gpio0 21 0> /* EXT1 */ + , <2 0 &gpio0 24 0> /* EXT2 */ + , <3 0 &gpio0 20 0> /* EXT3 */ + , <4 0 &gpio0 25 0> /* EXT4 */ + , <5 0 &gpio0 22 0> /* EXT5 */ + , <6 0 &gpio1 00 0> /* EXT6 */ + ; + }; }; &spi3 { diff --git a/app/dts/bindings/gpio/moergo,glove80-ext.yaml b/app/dts/bindings/gpio/moergo,glove80-ext.yaml new file mode 100644 index 0000000000..ca438a1c1a --- /dev/null +++ b/app/dts/bindings/gpio/moergo,glove80-ext.yaml @@ -0,0 +1,24 @@ +# Copyright (C) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + GPIO pins exposed on the Glove80 internal extension header. + + See https://docs.moergo.com/glove80-user-guide/appendix-more-customizations/ + + Both sides of the Glove80 split keyboard expose a set of 6 extra GPIO pins + for customization, with different underlying nRF52 pins used on each side. + This nexus node allows referencing the pins generically without being tied + to a specific left/right side pin assignment. + + + - GND VEXT - + - VDDH EXT1 1 + 2 EXT2 EXT3 3 + 4 EXT4 EXT5 5 + 6 SWO_EXT6 RESET - + - SWDCLK SWDIO - + +compatible: "moergo,glove80-ext" + +include: [gpio-nexus.yaml, base.yaml] diff --git a/app/dts/bindings/vendor-prefixes.txt b/app/dts/bindings/vendor-prefixes.txt index 72066dfb94..889ba5842d 100644 --- a/app/dts/bindings/vendor-prefixes.txt +++ b/app/dts/bindings/vendor-prefixes.txt @@ -1 +1,2 @@ -zmk ZMK Project \ No newline at end of file +zmk ZMK Project +moergo MoErgo \ No newline at end of file -- cgit v1.2.3