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

feat(boards): Update for mikoto board definition #1946

Merged
merged 15 commits into from
Dec 5, 2024

Conversation

zhiayang
Copy link
Contributor

@zhiayang zhiayang commented Oct 1, 2023

This PR updates the mikoto board definition to use Zephyr revisions, while adding support for new revisions (6.1+, 7.1+) that have incompatibilities/new hardware.

I only version mikoto with MAJOR.MINOR, so I've set the PATCH level to 0 for the zephyr overlay files. Unfortunately this breaks existing configs that use mikoto_520 as the board name. Is that a major issue?

Board/Shield Check-list

  • This board/shield is tested working on real hardware
  • Definitions follow the general style of other shields/boards upstream (Reference)
  • .zmk.yml metadata file added
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • General consistent formatting of DeviceTree files
  • Kconfig.defconfig file correctly wraps all configuration in conditional on the shield symbol
  • .conf file has optional extra features commented out
  • Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)

@zhiayang zhiayang marked this pull request as ready for review October 1, 2023 07:09
@caksoylar caksoylar added the board PRs and issues related to boards. label Oct 10, 2023
@zhiayang
Copy link
Contributor Author

a bunch of stuff came up, haven't had time to move this forward atm. though i will say that my changes work locally (ignoring any breaking changes).

@lesshonor lesshonor mentioned this pull request Jan 14, 2024
5 tasks
@zhiayang zhiayang requested a review from a team as a code owner February 9, 2024 16:31
@zhiayang
Copy link
Contributor Author

zhiayang commented Feb 9, 2024

had some time to pick this up again; so what i've changed now is:

  1. teach the schema about the new fields revisions and default_revision. in case you're curious about the regex, it comes from the zephyr docs; it handles LETTER, NUMBER, and MAJOR.MINOR.PATCH revisions.
  2. put back mikoto_520; it can still be used as in -DBOARD=mikoto_520, and i've tried my best to deduplicate the definitions and stuff.
  3. edit the setup script (only the bash one for now -- if this approach is OK-ed i'll update the powershell one too) to teach it about board revisions. Mikoto 5.20 is still in there, but i've marked it deprecated -- and the zmk metadata makes it alias [email protected].

basically, now we should handle the new cases (board@revision) for all boards that opt-in to this mechanism, and we keep compat with people using mikoto_520 in their repos.

EDIT: I've split out the non-mikoto stuff into a new PR #2157, which should be merged first. I'll rebase this on that after.

I've set up a test repo that builds both mikoto_520 and [email protected], and both work: https://github.com/zhiayang/zmk-test

@zhiayang zhiayang force-pushed the mikoto_7_1_0 branch 2 times, most recently from 57687c5 to efa9134 Compare March 11, 2024 02:06
app/build.sh Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this commit efa9134 included these three files (build.sh, uf2s) by accident.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, you're right. I'll clean this up after #2157 gets merged, thanks!

@zhiayang
Copy link
Contributor Author

aight, #2157 got merged so i'll pick this up in a bit

@medoix
Copy link

medoix commented Oct 9, 2024

@zhiayang the display adapter overlay also needs to be copied to mikoto.overlay for the nice!view and similar displays to work.

https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay

@zhiayang zhiayang requested a review from a team as a code owner November 17, 2024 13:49
@zhiayang
Copy link
Contributor Author

Okay, finally had time to catch up with this. Also realised that at least one store is selling v7.2 so I figured I had to get on this somewhat quickly.

Did testing locally, and was able to compile boards with both v5.20 and v7.2

@petejohanson
Copy link
Contributor

2. put back `mikoto_520`; it can still be used as in `-DBOARD=mikoto_520`, and i've tried my best to deduplicate the definitions and stuff.

It seems this got lost. I'm very happy to switch to using board versioning, but until we add ZMK versioning and want to have a breaking release, I'd request we not drop the mikoto_520 board ID completely.

@zhiayang
Copy link
Contributor Author

zhiayang commented Nov 19, 2024

Oops, guess I accidentally yeeted that. Will get on it.

EDIT: done; managed not to copy too much other than the _defconfig file.

@sebkinne
Copy link

@zhiayang - thank you for making the Mikoto, and for this PR!

I've tried building ZMK for my 7.2 with this branch, but it looks like there might be an issue with the MAX17048 config - ZMK battery reporting shows 0% (screen) or 100% (host OS) at all times.

I'm not familiar enough with ZMK to offer any suggestions, but figured I'd flag it before merging. I'll try and dig into it this weekend though!

@zhiayang
Copy link
Contributor Author

@sebkinne are you building with the board [email protected] ? Just using mikoto will get you 5.20 which doesn't have the fuel gauge IC enabled.

I'll do some testing this week, but my daily driver isn't the mikoto any more due to work wireless policies.

@sebkinne
Copy link

@zhiayang
Copy link
Contributor Author

Alright, I'll see about investigating it this week.

@zhiayang
Copy link
Contributor Author

@petejohanson seems like there's a nice ZEPHYR_BOARD_ALIASES feature that we can use to just alias mikoto_520 to mikoto, which just gets rid of the duplicated definitions and stuff entirely. Updated the PR to use that, lmk what you think?

A (probably non-issue) caveat: seems like you can't specify board revisions as the alias target (eg. I can't alias it to [email protected] directly), but it uses the default revision -- which is still 5.20 for now. We can probably change the default if/when we drop mikoto_520 entirely.

@zhiayang
Copy link
Contributor Author

@sebkinne It took a while, but I managed to get around to looking at this. Turns out I just forgot to enable the gpio pull-ups. It works on my side, could you test on your end? Thanks!

@sebkinne
Copy link

sebkinne commented Dec 1, 2024

Thanks @zhiayang - that worked like a charm!

Copy link
Contributor

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@petejohanson petejohanson merged commit b26058b into zmkfirmware:main Dec 5, 2024
24 checks passed
autoferrit added a commit to SpaceRockMedia/zmk that referenced this pull request Dec 7, 2024
…johanson/zmk into petejohanson-feat/pointers-with-input-processors

* 'feat/pointers-with-input-processors' of github.com:petejohanson/zmk: (186 commits)
  docs: Add initial pointer docs.
  feat: Add input split support.
  feat(mouse): Add mouse move and scroll support
  feat(boards): Update for mikoto board definition (zmkfirmware#1946)
  refactor(Kconfig): Extracted designer defaults out into new files (zmkfirmware#2537)
  chore(main): release 0.1.0 (zmkfirmware#2657)
  docs: Create a Hardware Integration index page (zmkfirmware#2634)
  docs: Mention combos in reset behaviors (zmkfirmware#2677)
  fix(boards): Disable uart serial node in Xiao BLE by default (zmkfirmware#2672)
  chore(deps): bump the prod-other-minor-patch group across 1 directory with 2 updates
  feat(boards): Add glove80 nexus node for extension GPIO. (zmkfirmware#2594)
  docs: Move defines to the end in layer behaviors (zmkfirmware#2639)
  docs: Update new-shield.mdx (zmkfirmware#2664)
  docs(ci): Netlify ignore command to check branch (zmkfirmware#2659)
  chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /docs
  feat(ci): Add release-please automation with VERSION (zmkfirmware#2622)
  docs: Remove dangling 0 in sticky keys docs
  fix: include a header file for RC macros (zmkfirmware#2649)
  feat(drivers): Support init high/low in 595 driver
  docs: touchups on the soft off information for improved clarity. (zmkfirmware#2647)
  ...
autoferrit added a commit to SpaceRockMedia/zmk that referenced this pull request Dec 7, 2024
…fingerpunch

* petejohanson-feat/pointers-with-input-processors: (186 commits)
  docs: Add initial pointer docs.
  feat: Add input split support.
  feat(mouse): Add mouse move and scroll support
  feat(boards): Update for mikoto board definition (zmkfirmware#1946)
  refactor(Kconfig): Extracted designer defaults out into new files (zmkfirmware#2537)
  chore(main): release 0.1.0 (zmkfirmware#2657)
  docs: Create a Hardware Integration index page (zmkfirmware#2634)
  docs: Mention combos in reset behaviors (zmkfirmware#2677)
  fix(boards): Disable uart serial node in Xiao BLE by default (zmkfirmware#2672)
  chore(deps): bump the prod-other-minor-patch group across 1 directory with 2 updates
  feat(boards): Add glove80 nexus node for extension GPIO. (zmkfirmware#2594)
  docs: Move defines to the end in layer behaviors (zmkfirmware#2639)
  docs: Update new-shield.mdx (zmkfirmware#2664)
  docs(ci): Netlify ignore command to check branch (zmkfirmware#2659)
  chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /docs
  feat(ci): Add release-please automation with VERSION (zmkfirmware#2622)
  docs: Remove dangling 0 in sticky keys docs
  fix: include a header file for RC macros (zmkfirmware#2649)
  feat(drivers): Support init high/low in 595 driver
  docs: touchups on the soft off information for improved clarity. (zmkfirmware#2647)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board PRs and issues related to boards.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants