/* * Copyright (c) 2021 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #include "glove80.dtsi" #include "glove80_rh-pinctrl.dtsi" #include / { model = "glove80_rh"; compatible = "glove80_rh"; chosen { zmk,underglow = &led_strip; zmk,backlight = &back_led_backlight; zmk,battery = &vbatt; }; back_led_backlight: pwmleds { compatible = "pwm-leds"; pwm_led_0 { pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; }; }; // Node name must match original "EXT_POWER" label to preserve user settings. EXT_POWER { compatible = "zmk,ext-power-generic"; control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ init-delay-ms = <100>; }; vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; }; }; &spi3 { compatible = "nordic,nrf-spim"; status = "okay"; pinctrl-0 = <&spi3_default>; pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ spi-max-frequency = <4000000>; /* WS2812 */ chain-length = <40>; /* 40 keys have underglow at the moment */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; color-mapping = ; }; }; &pwm0 { status = "okay"; pinctrl-0 = <&pwm0_default>; pinctrl-1 = <&pwm0_sleep>; pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; pinctrl-0 = <&uart0_default>; pinctrl-1 = <&uart0_sleep>; pinctrl-names = "default", "sleep"; }; /* For right hand, the columns are offset by 7 */ &default_transform { col-offset = <7>; }; &kscan0 { row-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW1 , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW2 , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW3 , <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW4 , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW5 , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW6 ; col-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH> // RH Thumb , <&gpio1 4 GPIO_ACTIVE_HIGH> // RH COL1 , <&gpio0 2 GPIO_ACTIVE_HIGH> // RH COL2 , <&gpio1 7 GPIO_ACTIVE_HIGH> // RH COL3 , <&gpio1 5 GPIO_ACTIVE_HIGH> // RH COL4 , <&gpio1 3 GPIO_ACTIVE_HIGH> // RH COL5 , <&gpio1 1 GPIO_ACTIVE_HIGH> // RH COL6 ; };