Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pinctrl #12

Open
wants to merge 2 commits into
base: dao56
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions config/boards/arm/dao/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@
if BOARD_DAO_LEFT

config ZMK_KEYBOARD_NAME
default "Dao56"
default "Dao"

config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y

endif # BOARD_DAO_LEFT

if BOARD_DAO_RIGHT

config ZMK_KEYBOARD_NAME
default "Dao56 Right"

endif # BOARD_DAO_RIGHT


if BOARD_DAO_LEFT || BOARD_DAO_RIGHT

config BOARD
Expand All @@ -28,6 +20,7 @@ config ZMK_SPLIT
default y

config BT_CTLR

default BT

config ZMK_BATTERY_VOLTAGE_DIVIDER
Expand Down
5 changes: 1 addition & 4 deletions config/boards/arm/dao/board.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
5 changes: 5 additions & 0 deletions config/boards/arm/dao/dao.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y

# Increase transmit power level
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
38 changes: 18 additions & 20 deletions config/boards/arm/dao/dao.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


/ {
model = "dao";
model = "Dao";
compatible = "dao";

chosen {
Expand All @@ -23,8 +23,9 @@
zmk,battery = &vbatt;
};


default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <5>;

Expand All @@ -40,29 +41,37 @@
RC(3,3) RC(3,4) RC(3,5) RC(3,11) RC(3,10) RC(3,9)
>;
};

kscan0: kscan {
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";

wakeup-source;

diode-direction = "col2row";
row-gpios
= <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 24 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
, <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};

leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
};
};

vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "VBATT";
io-channels = <&adc 7>;
io-channels = <&adc 7>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 820000)>;
};

};


Expand All @@ -86,17 +95,6 @@
status = "okay";
};

&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <19>;
rx-pin = <21>;
rts-pin = <23>;
cts-pin = <25>;
};


&flash0 {
/*
* For more information, see:
Expand Down Expand Up @@ -135,4 +133,4 @@
reg = <0x000f4000 0x0000c000>;
};
};
};
};
2 changes: 1 addition & 1 deletion config/boards/arm/dao/dao.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
// | | | | | | | |
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset
&sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
&none &none &none &none &none &none &none &none &none &none &none &none
&trans &none &trans &trans &none &trans
Expand Down
14 changes: 14 additions & 0 deletions config/boards/arm/dao/dao.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
file_format: "1"
id: dao
name: Dao
url: https://github.com/yumagulovrn/dao-choc-ble
type: board
arch: arm
features:
- keys
outputs:
- usb
- ble
siblings:
- dao_left
- dao_right
8 changes: 3 additions & 5 deletions config/boards/arm/dao/dao_left_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Enable external crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y

# # Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y

Expand All @@ -40,5 +36,7 @@ CONFIG_BUILD_OUTPUT_UF2=y
# Increase transmit power level
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

CONFIG_ZMK_USB=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

CONFIG_PINCTRL=n
8 changes: 3 additions & 5 deletions config/boards/arm/dao/dao_right_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Enable external crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y

# # Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y

Expand All @@ -38,5 +34,7 @@ CONFIG_BUILD_OUTPUT_UF2=y
# Increase transmit power level
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

CONFIG_ZMK_USB=y
CONFIG_ZMK_USB=n
CONFIG_ZMK_BLE=y

CONFIG_PINCTRL=n
50 changes: 23 additions & 27 deletions config/dao.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>

#define DEF 0
#define LWR 1
#define RSE 2
#define ADJ 3

&lt {
quick_tap_ms = <200>;
};
&lt { quick_tap_ms = <200>; };

&mt {
quick_tap_ms = <200>;
};
&mt { quick_tap_ms = <200>; };

/ {
keymap {
Expand All @@ -33,11 +29,11 @@
// | RSE | SPC | LWR | | LWR | BKSP | RSE |

bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp LWIN &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RWIN RBKT
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &mt RCTRL SQT
&kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RALT BSLH
&lt 2 TAB &mt LSHFT SPACE &lt 1 RET &lt 1 ESC &mt RSHFT BSPC &lt 2 DEL
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp LWIN &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RWIN RBKT
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &mt RCTRL SQT
&kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RALT BSLH
&lt RSE TAB &kp SPACE &lt LWR RET &lt LWR ESC &mt RSHFT BSPC &lt RSE DEL
>;
};

Expand All @@ -49,11 +45,11 @@
// | GUI | | SPC | | ENT | | ALT |

bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp UNDER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &mt RGUI F12
&mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS
&mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
&lt 3 TAB &trans &trans &trans &trans &lt 3 DEL
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp UNDER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &mt RGUI F12
&mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS
&mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
&lt ADJ TAB &trans &trans &trans &trans &lt ADJ DEL
>;
};

Expand All @@ -65,11 +61,11 @@
// | | | ADJ | | ADJ | | |

bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CAPS &trans
&mt LCTRL EQUAL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP
&trans &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUSE_BREAK &trans
&trans &trans &lt 3 RET &lt 3 ESC &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CAPS &trans
&mt LCTRL EQUAL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP
&trans &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUSE_BREAK &trans
&trans &trans &lt ADJ RET &lt ADJ ESC &trans &trans
>;
};

Expand All @@ -81,11 +77,11 @@
// | | | | | | | |

bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
&none &none &none &none &none &none &none &none &none &none &none &none
&trans &none &trans &trans &none &trans
&none &none &none &none &none &none &none &none &none &none &none &none
&sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
&none &none &none &none &none &none &none &none &none &none &none &none
&trans &none &trans &trans &none &trans
>;
};
};
Expand Down