-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
shield: m5stack m5dial #80778
base: main
Are you sure you want to change the base?
shield: m5stack m5dial #80778
Conversation
69c3d15
to
c66a0f0
Compare
c66a0f0
to
5186eb3
Compare
5186eb3
to
a0c6663
Compare
M5Dial is an IoT development board based on m5stack_stamps3. It features an LCD screen, touch interface, a rotary button, an RTC and a piezo beeper. Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
Default main-stack size of m5stack_stamps3 is not sufficient. Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
a0c6663
to
759ff44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this proposal.
Before getting into the details of the PR itself I would like to raise a discussion
regarding the use of a shield for this devkit.
It's true that the M5Dial is built around the M5 Stamp3 board, but the compleete
solution looks more like a devkit than a shield.
https://docs.m5stack.com/en/core/M5Dial
https://docs.m5stack.com/en/core/stamps3
As a versatile embedded development board, M5Dial integrates the necessary features and sensors for various smart home control applications. It features a 1.28-inch round TFT touchscreen, a rotary encoder, an RFID detection module, an RTC circuit, a buzzer, and under-screen buttons, enabling users to easily implement a wide range of creative projects.
Some of the reasons why this looks more like a devkit, and therefore should be implemented as a board, and not a shield to be used with existing board:
- the shield cannot be purchased alone, nor used together with another board
- the M5dial itself seems to be intended as a complete stand-alone kit (like a Thingy)
Afaict the shield and board are tightly integrated in their functionality. - I believe users buying and developing for the M5Dial will see this as an integrated product and therefore look for a corresponding board in Zephyr, and not see this as a M5 Stamp3 board with a shield.
@tejlmand I initially had a PR for a separate devkit (#67065). There we came to the conclusion it's better to implement the m5dial as a shield. When implementing m5dial as a separate devkit you basically need to make a copy of the stamps3 board and adjust all perihperals. |
Hm, I see that. I wonder why you only had @kartben added as reviewer on that PR, was it perhaps opened as draft ?
which actually is true for many devkits that are based on same SoC. I try to see this from developer's view point. Would I consider this a devkit and thus look in the boards section ? I see that @kartben comment here relates to a potential use of the dial on another board: #67065 (comment) But from what I can tell, using the dial on another board is not officially supported, nor pin compatible with the other stamp core modules I just browsed here https://docs.m5stack.com/en/products. So for now I see little reason or value in creating this as a shield, but would like to hear if there are other / better arguments to why it should be a shield. Comments @kartben ? |
oh, and by the way a very common and proposed way to create a new board, ref:
|
Yes, it was a draft at that time.
I am getting confused now. Maybe let's clarify the buildup of M5stack-Dial. The M5Stack-dial is physically including a M5Stack-StampS3 module (see https://shop.m5stack.com/cdn/shop/files/4_ae790f23-43de-4348-9df0-fa37c1c47dd2_1200x1200.webp?v=1696659474 for reference). For me the definition of a board meanwhile is quite simple: If it directly features a microcontroller it is a board. If it utilizes an existing module or board and only consists of peripherals it's a shield. If e.g. M5Stack decides to release a new Stamp-Module that is pin-compatible but maybe features a different controller, the M5dial shield may work without modification. If we maintain the M5Dial as a board we may need to create a separate board for this new combination. |
Correct, and I also mentioned that here: #80778 (review)
If just the world was this simple.
and in Zephyr there are more boards like this. |
I could argue, that the examples you referred to above are quite more complex than the m5dial. And to my quick research they are also no not reused in zephyr. You may find examples and arguments for both solutions. Don't get me wrong. I initially created a board for the m5dial and switched to a shield. So I see both sides.
You definitely have a point here On the other hand, I don't like the redundance. There are two additional hardware solutions in my backlog that also used the StampS3:
|
I see you followed the approach implementing the cardputer as shield as well. |
The Icarus SoM exists both as the independent SoM and the devkit, so I would say that use-case is more or less the same as the M5Dial:
I think we agree a lot on this. The more re-use we can have, the better. A board can be extended by creating new variants out-of-tree with: #72857 In case we had the board inherit feature in place already, would you then had preferred such inherit solution over the shield approach ?
I think we both do, so thanks for the discussion 👍 |
as a side-note, with introduction of HWMv2 we actually aimed for more reuse and reduction of files needed when introducing HWMv2, but had to walk-back on part of the solution for unforeseen reasons, #71149 Plan is still to allow the intended re-use but in slightly adjusted way. |
@tejlmand To me this is a recommendation that applies well to out-of-tree (or at least downstream) users, but that shouldn't be the norm for in-tree boards. Do we really want all the "dev kits" sharing a same "motherboard" to duplicate everything? It simply becomes unmanageable to make sure a bug fix or improvement on said motherboard is properly applied everywhere, does it not?
Yes, that's a fair point, hence why we need a shield model sooner than later. To me, the "board catalog" should shortly evolve into a "board + shield catalog" (in fact I already have tried it in a model-less fashion and it works really well, it's just that I don't want to deploy it as-is since the "guesses" being made on the shields' metadata due to not having a real model can sometimes lead to errors).
I think it is important that physical components that can be interfaced with a board using an abstracted out connector (Uno, Feather, ... but also more bespoke connectors like the many we have for e.g. parallel displays or, here, the "bespoke" stamp-s3-with-1.27-header-pins) are described as shields, as the composability this brings is important. Yes, the M5Dial may not be bought on its own today but I wouldn't be surprised if that's the case in the future or if M5 releases ex. an RP2040 STAMP that's pin compatible. Or, in any case, one may always want to create their own board that has a compatible connector, and they should be able to do so. BTW another, maybe better, example of something from the M5 portfolio that def. should be a shield although it feels like it could be a board is: https://docs.m5stack.com/en/app/Atom%20JoyStick |
rotary_left: rotary_left { | ||
label = "rotary left"; | ||
gpios = <&m5stack_stamps3_header 20 GPIO_ACTIVE_LOW>; | ||
zephyr,code = <INPUT_KEY_LEFT>; | ||
}; | ||
|
||
rotary_right: rotary_right { | ||
label = "rotary right"; | ||
gpios = <&m5stack_stamps3_header 22 GPIO_ACTIVE_LOW>; | ||
zephyr,code = <INPUT_KEY_RIGHT>; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#67253 (comment) this still applies
I believe I already made my opinion clear here: #80778 (comment) I referred to the first try of merging / inherit files which we had to roll-back, see: #80778 (comment) I asked a question, for which no answer has been given:
as for the other example:
Yes, I agree, this is a better example. I wonder if we should have a dedicated task (or part of #69548 / #55637) to support a board to always include a shield. But based on the comment in #80778 (comment) |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Add support for M5Stack-Dial shield