File tree Expand file tree Collapse file tree 9 files changed +76
-27
lines changed
Expand file tree Collapse file tree 9 files changed +76
-27
lines changed Original file line number Diff line number Diff line change 44if BOARD_WHKB_PRO2
55
66config ZMK_KEYBOARD_NAME
7- default "WHKB Pro2 Rev A "
7+ default "WHKB Pro2"
88
99config BOARD
1010 default "whkb_pro2"
Original file line number Diff line number Diff line change 1+ include (${ZEPHYR_BASE} /boards/common/uf2.board.cmake)
Original file line number Diff line number Diff line change 1+ board_check_revision(FORMAT LETTER
2+ DEFAULT_REVISION C
3+ )
Original file line number Diff line number Diff line change 1919 zephyr,console = &cdc_acm_uart;
2020 zmk,battery = &vbatt0;
2121 };
22-
23- vbatt0: vbatt0 {
24- compatible = "zmk,battery-voltage-divider";
25- io-channels = <&adc 1>; // P0.03
26- output-ohms = <2000000>;
27- full-ohms = <(1000000 + 2000000)>;
28- power-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; // P0.02
29- };
30-
31- hhkb_pro2_connector: hhkb_pro2_connector {
32- compatible = "zmk,hhkb-pro2-header";
33- #gpio-cells = <2>;
34- gpio-map-mask = <0xffffffff 0xffffffc0>;
35- gpio-map-pass-thru = <0 0x3f>;
36- gpio-map = <0 0 &gpio0 31 NRF_GPIO_DRIVE_S0H1>,
37- <1 0 &gpio0 4 0>,
38- <2 0 &gpio0 5 0>,
39- <3 0 &gpio0 22 0>,
40- <4 0 &gpio0 7 0>,
41- <5 0 &gpio1 9 0>,
42- <6 0 &gpio0 12 0>,
43- <7 0 &gpio0 23 0>,
44- <8 0 &gpio0 21 0>,
45- <9 0 &gpio0 19 0>;
46- };
4722};
4823
4924&adc {
5025 status = "okay";
5126};
5227
28+ &gpiote {
29+ status = "okay";
30+ };
31+
5332&gpio0 {
5433 status = "okay";
5534};
Original file line number Diff line number Diff line change 1+ CONFIG_ZMK_KEYBOARD_NAME="WHKB Pro2 Rev A"
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 The ZMK Contributors
3+ *
4+ * SPDX-License-Identifier: MIT
5+ */
6+
7+ #include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
8+
9+ / {
10+ vbatt0: vbatt0 {
11+ compatible = "zmk,battery-voltage-divider";
12+ io-channels = <&adc 1>; // P0.03
13+ output-ohms = <2000000>;
14+ full-ohms = <(1000000 + 2000000)>;
15+ power-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; // P0.02
16+ };
17+
18+ hhkb_pro2_connector: hhkb_pro2_connector {
19+ compatible = "zmk,hhkb-pro2-header";
20+ #gpio-cells = <2>;
21+ gpio-map-mask = <0xffffffff 0xffffffc0>;
22+ gpio-map-pass-thru = <0 0x3f>;
23+ gpio-map = <0 0 &gpio0 31 NRF_GPIO_DRIVE_S0H1>,
24+ <1 0 &gpio0 4 0>,
25+ <2 0 &gpio0 5 0>,
26+ <3 0 &gpio0 22 0>,
27+ <4 0 &gpio0 7 0>,
28+ <5 0 &gpio1 9 0>,
29+ <6 0 &gpio0 12 0>,
30+ <7 0 &gpio0 23 0>,
31+ <8 0 &gpio0 21 0>,
32+ <9 0 &gpio0 19 0>;
33+ };
34+ };
Original file line number Diff line number Diff line change 1+ CONFIG_ZMK_KEYBOARD_NAME="WHKB Pro2 Rev C"
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 The ZMK Contributors
3+ *
4+ * SPDX-License-Identifier: MIT
5+ */
6+
7+ #include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
8+
9+ / {
10+ vbatt0: vbatt0 {
11+ compatible = "zmk,battery-nrf-vddh";
12+ };
13+
14+ hhkb_pro2_connector: hhkb_pro2_connector {
15+ compatible = "zmk,hhkb-pro2-header";
16+ #gpio-cells = <2>;
17+ gpio-map-mask = <0xffffffff 0xffffffc0>;
18+ gpio-map-pass-thru = <0 0x3f>;
19+ gpio-map = <0 0 &gpio0 29 0>, // LDO_ENABLE
20+ <1 0 &gpio0 13 0>,
21+ <2 0 &gpio0 20 0>,
22+ <3 0 &gpio0 17 0>,
23+ <4 0 &gpio0 15 0>,
24+ <5 0 &gpio0 7 0>,
25+ <6 0 &gpio0 12 0>,
26+ <7 0 &gpio0 4 0>,
27+ <8 0 &gpio0 8 0>,
28+ <9 0 &gpio0 6 0>;
29+ };
30+ };
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ static const struct kscan_driver_api kscan_hhkb_pro2_api = {
235235 NULL, \
236236 &kscan_hhkb_pro2_data##inst, \
237237 &kscan_hhkb_pro2_config##inst, \
238- APPLICATION , \
238+ POST_KERNEL , \
239239 CONFIG_APPLICATION_INIT_PRIORITY, \
240240 &kscan_hhkb_pro2_api);
241241
You can’t perform that action at this time.
0 commit comments