forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(boards): Update for mikoto board definition (zmkfirmware#1946)
* Set default revision to 5.20 * update mikoto board defs * add revision info to mikoto.zmk.yml * use zephyr aliases to handle mikoto_520 * enable pull-ups for on-board i2c
- Loading branch information
Showing
19 changed files
with
157 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# defines board aliases for shorter names (or for renaming boards) | ||
set(mikoto_520_BOARD_ALIAS "mikoto") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 2020 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
|
||
/ { | ||
pro_micro: connector { | ||
compatible = "arduino-pro-micro"; | ||
#gpio-cells = <2>; | ||
gpio-map-mask = <0xffffffff 0xffffffc0>; | ||
gpio-map-pass-thru = <0 0x3f>; | ||
gpio-map | ||
= <0 0 &gpio0 4 0> /* D0 */ | ||
, <1 0 &gpio0 8 0> /* D1 */ | ||
, <2 0 &gpio0 17 0> /* D2 */ | ||
, <3 0 &gpio0 20 0> /* D3 */ | ||
, <4 0 &gpio0 22 0> /* D4/A6 */ | ||
, <5 0 &gpio0 24 0> /* D5 */ | ||
, <6 0 &gpio1 8 0> /* D6/A7 */ | ||
, <7 0 &gpio1 2 0> /* D7 */ | ||
, <8 0 &gpio1 4 0> /* D8/A8 */ | ||
, <9 0 &gpio1 6 0> /* D9/A9 */ | ||
, <10 0 &gpio0 9 0> /* D10/A10 */ | ||
, <16 0 &gpio0 10 0> /* D16 */ | ||
, <14 0 &gpio1 13 0> /* D14 */ | ||
, <15 0 &gpio0 2 0> /* D15 */ | ||
, <18 0 &gpio0 29 0> /* D18/A0 */ | ||
, <19 0 &gpio0 31 0> /* D19/A1 */ | ||
, <20 0 &gpio0 25 0> /* D20/A2 */ | ||
, <21 0 &gpio0 11 0> /* D21/A3 */ | ||
; | ||
}; | ||
|
||
pro_micro_a: connector_a { | ||
compatible = "arduino-pro-micro"; | ||
#gpio-cells = <2>; | ||
gpio-map-mask = <0xffffffff 0xffffffc0>; | ||
gpio-map-pass-thru = <0 0x3f>; | ||
gpio-map | ||
= <0 0 &gpio0 29 0> /* D18/A0 */ | ||
, <1 0 &gpio0 31 0> /* D19/A1 */ | ||
, <2 0 &gpio0 25 0> /* D20/A2 */ | ||
, <3 0 &gpio0 11 0> /* D21/A3 */ | ||
, <6 0 &gpio0 22 0> /* D4/A6 */ | ||
, <7 0 &gpio1 8 0> /* D6/A7 */ | ||
, <8 0 &gpio1 4 0> /* D8/A8 */ | ||
, <9 0 &gpio1 6 0> /* D9/A9 */ | ||
, <10 0 &gpio0 9 0> /* D10/A10 */ | ||
; | ||
}; | ||
}; | ||
|
||
|
||
pro_micro_d: &pro_micro {}; | ||
pro_micro_i2c: &i2c0 {}; | ||
pro_micro_spi: &spi0 {}; | ||
pro_micro_serial: &uart0 {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
app/boards/arm/mikoto/mikoto_520.yaml → app/boards/arm/mikoto/mikoto.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
identifier: mikoto_520 | ||
name: mikoto_520 | ||
identifier: mikoto | ||
name: mikoto | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
|
10 changes: 8 additions & 2 deletions
10
app/boards/arm/mikoto/mikoto_520.zmk.yml → app/boards/arm/mikoto/mikoto.zmk.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
file_format: "1" | ||
id: mikoto_520 | ||
name: Mikoto 5.20 | ||
id: mikoto | ||
name: Mikoto | ||
type: board | ||
arch: arm | ||
outputs: | ||
- usb | ||
- ble | ||
url: https://github.com/zhiayang/mikoto | ||
exposes: [pro_micro] | ||
revisions: | ||
- "5.20" | ||
- "6.1" | ||
- "6.3" | ||
- "7.2" | ||
default_revision: "5.20" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include "mikoto-pinctrl.dtsi" | ||
#include "arduino_pro_micro_pins_v5.dtsi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include "mikoto-pinctrl.dtsi" | ||
#include "arduino_pro_micro_pins_v6.dtsi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_I2C=y | ||
CONFIG_ZMK_MAX17048=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include "mikoto-pinctrl.dtsi" | ||
#include "arduino_pro_micro_pins_v6.dtsi" | ||
|
||
&pinctrl { | ||
i2c1_default: i2c1_default { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 23)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 19)>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
i2c1_sleep: i2c1_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 23)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 19)>; | ||
low-power-enable; | ||
bias-pull-up; | ||
}; | ||
}; | ||
}; | ||
|
||
&i2c1 { | ||
status = "okay"; | ||
compatible = "nordic,nrf-twi"; | ||
pinctrl-0 = <&i2c1_default>; | ||
pinctrl-1 = <&i2c1_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
|
||
builtin_fuel_gauge: max17048@36 { | ||
compatible = "zmk,maxim-max17048"; | ||
status = "okay"; | ||
reg = <0x36>; | ||
}; | ||
}; | ||
|
||
/ { | ||
chosen { | ||
zmk,battery = &builtin_fuel_gauge; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
board_check_revision(FORMAT MAJOR.MINOR.PATCH | ||
DEFAULT_REVISION 5.20.0 | ||
VALID_REVISIONS | ||
5.20.0 # first public release | ||
6.1.0 6.3.0 # incompatible pinout change from v5+ | ||
7.2.0 # addition of MAX17048; compatible pinout with v6+ | ||
) |
File renamed without changes.