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

board: m5stack_m5dial: Add support for M5Dial IoT devkit #67065

Closed
wants to merge 1 commit into from

Conversation

MrMarteng
Copy link
Collaborator

Adding support for M5stack M5Dial IoT development kit.

M5Dial features 1,28" round display, rotary button, beeper, touch-screen, real-time-clock and a NFC/RFID reader.

@MrMarteng
Copy link
Collaborator Author

MrMarteng commented Dec 29, 2023

This PR depends on #67012

Support for m5dial still in progress.

@MrMarteng
Copy link
Collaborator Author

@kartben Maybe your are interested in supporting me again? ;-)

@kartben
Copy link
Collaborator

kartben commented Dec 29, 2023

@kartben Maybe your are interested in supporting me again? ;-)

I saw your other PR with the display driver so I was totally gonna ask you when the M5Dial board definition was gonna come 😬

Adding support for M5stack M5Dial IoT development kit.

M5Dial features 1,28" round display, rotary button,
beeper, touch-screen, real-time-clock.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
@kartben
Copy link
Collaborator

kartben commented Jan 1, 2024

It feels to me that it would be better to handle the M5Dial as a shield, with the StampS3 defined separately as an actual board. This way one could use M5Dial with e.g. a StampC3, or any other board with a compatible TBD "M5 stamp connector", and we would actually offer proper support for bare StampS3?

@MrMarteng
Copy link
Collaborator Author

It feels to me that it would be better to handle the M5Dial as a shield, with the StampS3 defined separately as an actual board. This way one could use M5Dial with e.g. a StampC3, or any other board with a compatible TBD "M5 stamp connector", and we would actually offer proper support for bare StampS3?

🤔 maybe your are right. I am having a look into that. Support for StampS3 is on the way as well. Another holiday week ahead 😏

@kartben
Copy link
Collaborator

kartben commented Jan 1, 2024

🤔 maybe your are right. I am having a look into that. Support for StampS3 is on the way as well. Another holiday week ahead 😏

Eheh, very nice!
Note that I need to finish the work on https://github.com/kartben/zephyr/tree/m5stack_atomlite at some point (I think only the README might be missing IIRC), so if you were also planning on adding Atom Lite you might want to hold off ;-)

@MrMarteng
Copy link
Collaborator Author

MrMarteng commented Jan 2, 2024

🤔 maybe your are right. I am having a look into that. Support for StampS3 is on the way as well. Another holiday week ahead 😏

Eheh, very nice!
Note that I need to finish the work on https://github.com/kartben/zephyr/tree/m5stack_atomlite at some point (I think only the README might be missing IIRC), so if you were also planning on adding Atom Lite you might want to hold off ;-)

I just added a pr for the atomS3lite recently (#67084).

@MrMarteng MrMarteng force-pushed the m5tack_m5dial branch 2 times, most recently from 210f22a to 9286669 Compare January 4, 2024 18:55
@MrMarteng
Copy link
Collaborator Author

M5Dial support has been reworked via shield instead of a separate board: #67253

@MrMarteng MrMarteng closed this Jan 5, 2024
Comment on lines +24 to +27
:align: center
:alt: M5Stack M5Dial

M5Stack M5Dial
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:align: center
:alt: M5Stack M5Dial
M5Stack M5Dial
:align: center
:alt: M5Stack M5Dial
M5Stack M5Dial

Comment on lines +44 to +54
rotary_left: rotary_left {
label = "rotary left";
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_LEFT>;
};

rotary_right: rotary_right {
label = "rotary right";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_RIGHT>;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

You may use gpio-qdec, I think.

	qdec {
		compatible = "gpio-qdec";
		gpios = <&m5stack_stamps3_header 20 GPIO_ACTIVE_LOW>,
		        <&m5stack_stamps3_header 22 GPIO_ACTIVE_LOW>;
		steps-per-period = <4>;
		zephyr,axis = <INPUT_REL_WHEEL>;
		sample-time-us = <2000>;
		idle-timeout-ms = <200>;
	};

Also works as an lvgl encoder input

	lvgl_encoder_input {
		compatible = "zephyr,lvgl-encoder-input";
		rotation-input-code = <INPUT_REL_WHEEL>;
		button-input-code = <INPUT_KEY_0>;
	};

@kartben
Copy link
Collaborator

kartben commented Feb 20, 2024

@MrMarteng not a full review, just a comment as I just spent some time playing with the M5Dial today :) Also used @joelguittet's work for pwm backlight control
https://github.com/kartben/zephyr/tree/m5dial_demo

@kartben
Copy link
Collaborator

kartben commented Feb 21, 2024

Lol I posted on the wrong PR :) will move to the other one, as it applies anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants