/* * * Copyright (c) 2021 Darryl deHaan * SPDX-License-Identifier: MIT * */ #include "sofle.dtsi" /{ chosen { zmk,battery = &vbatt; }; kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; wakeup-source; diode-direction = "col2row"; row-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; col-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH> , <&gpio0 30 GPIO_ACTIVE_HIGH> , <&gpio0 21 GPIO_ACTIVE_HIGH> , <&gpio0 23 GPIO_ACTIVE_HIGH> , <&gpio0 22 GPIO_ACTIVE_HIGH> ; }; left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; a-gpios = <&gpio1 10 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; b-gpios = <&gpio1 14 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; resolution = <2>; status = "okay"; }; sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; }; ext-power { compatible = "zmk,ext-power-generic"; label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; init-delay-ms = <50>; }; vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; }; };