-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(boards): Update for mikoto board definition #1946
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5c617c1
feat(boards): Preliminary update for mikoto board definition
zhiayang 8215c64
Flesh out 7.1 overlay with builtin max17048 dts node
zhiayang f646876
Remove commented out stuff
zhiayang 119b890
Set default revision to 5.20
zhiayang 3c95e0c
Rename files
zhiayang 38d47d1
update mikoto board defs
zhiayang cc063b7
add revision info to mikoto.zmk.yml
zhiayang 01c4620
remove extra files
zhiayang e7344de
change 7.1 to 7.2 since people are selling that one
zhiayang 7bc6938
fix nice_view_adapter support
zhiayang 7c25836
add missing revisions
zhiayang 2ceb737
add mikoto_520 board back
zhiayang a440fe6
use zephyr aliases to handle mikoto_520
zhiayang 0a1a3b6
update comment
zhiayang 1b87e2e
enable pull-ups for on-board i2c
zhiayang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
zhiayang marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.