-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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-core2 module support #61812
board: m5stack-core2 module support #61812
Conversation
0b19436
to
8e7c9a3
Compare
9712dbe
to
30ee67a
Compare
Very cool! |
Can you describe this idea on more detail? Are you referring to the Module BUS M5 is offering (https://docs.m5stack.com/en/module/bus)? There are generally a lot of other functionalities missing yet (gauge, audio, ...). But I want to add additional functionality in future. |
I mean describing the pin headers similar to how it's done for say Arduino R3 headers, grove connectors, or Raspberry Pi 40-pin headers. You should be able to find examples easily by searching the code base. Thanks to this, shield definitions for M5Stack modules would conveniently be able to reference pins from the header, with Devicetree then automagically "routing" them to the corresponding pins of the ESP32. Plus you could also define aliases like m5stack_i2c or m5stack_spi. Here's the description of the pin mappings for the M5Stack Core2: https://static-cdn.m5stack.com/resource/docs/products/core/core2/core2_mbus_01.webp Hope this helps clarify! |
Thank you. I've understood and like the idea. I will add this functionality in a separate PR. |
30ee67a
to
e24ae3c
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.
I had a chance to test this PR with actual hardware (it's a very cool board!). Please see my comments.
regulator-init-microvolt = <2800000>; | ||
regulator-min-microvolt = <0>; | ||
regulator-max-microvolt = <2800000>; |
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.
i would align with the min/max values from the Arduino core: min = 2500mV, max = 3300mV
https://github.com/m5stack/M5Core2/blob/master/src/AXP192.cpp#L450-L453
In any case I should say it's pretty cool to be able to tinker with the regulator shell commands to set the brightness of the LCD or disable it altogether.
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.
fixed with laters commit
regulator-init-microvolt = <2800000>; | ||
regulator-min-microvolt = <0>; | ||
regulator-max-microvolt = <2800000>; | ||
regulator-boot-on; |
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.
not sure we want the LCD always on? Isn't the fact that a vin-supply is defined on the display node already enough to bind the status of the regulator to the status of the display? @gmarull
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.
I am actually no longer sure if the vin-supply binding to lcd_bg regulator is correct. Is vin-supply intended to control the regulator for the control logic? ili9xx driver is not supporting brightness control. Hence I guess the vin-supply setting does not have any effect. Only a few, very specific display driver (e.v. max7219) support backlight control yet.
17de9c0
to
87afcd0
Compare
Rebased to latest main. |
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.
This is good to go from my perspective! Thanks @MrMarteng!
Can't wait to get I2S support on ESP32 ;-)
Thanks.
Yes indeed ;-). And I would also love to see SMP working again to speed up graphical performance. |
@MrMarteng please address the |
@marekmatej Did you see my comment on the |
@MrMarteng sure, I did read it, but you probably missed my replies ;) |
I am really, sorry but I don't see your reply to my question. I also don't see any commend in the defconfig file Anyway. I will change to the |
@marekmatej FWIW "pending" means that you forgot to actually submit your review so only you can see this :) |
|
||
&flash0 { | ||
status = "okay"; | ||
reg = <0 0x400000>; |
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.
@marekmatej Are you ok with using
esp32_d0wd_v3
as the base?
Well, I cant force you to use predefined modules. But please remote the esp32s3_common.dtsi
and replace it with the generic esp32s3.dtsi
.
Also, please take a look at my other comments on the m5stac_core2_defconfig
.
*/ | ||
/dts-v1/; | ||
|
||
#include <espressif/esp32/esp32_common.dtsi> |
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.
#include <espressif/esp32/esp32_common.dtsi> | |
#include <espressif/esp32/esp32_d0wd_v3.dtsi> |
CONFIG_GEN_IRQ_VECTOR_TABLE=n | ||
|
||
CONFIG_MAIN_STACK_SIZE=4096 | ||
CONFIG_HEAP_MEM_POOL_SIZE=4096 |
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.
CONFIG_HEAP_MEM_POOL_SIZE=4096 |
CONFIG_GEN_ISR_TABLES=y | ||
CONFIG_XTENSA_USE_CORE_CRT1=n | ||
CONFIG_XTENSA_RESET_VECTOR=n | ||
CONFIG_GEN_IRQ_VECTOR_TABLE=n |
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.
CONFIG_GEN_ISR_TABLES=y | |
CONFIG_XTENSA_USE_CORE_CRT1=n | |
CONFIG_XTENSA_RESET_VECTOR=n | |
CONFIG_GEN_IRQ_VECTOR_TABLE=n |
ok I see, my bad folks! but there was a few comments that were submitted and visible, but not replied :) |
This Pull-Request enables support for the M5Stack Core2 hardware. The module features a LCD display, touchscreen, battery, USB-Port, 8MB RAM and 16MB Flash. Basic features are working. Please refere to the board documentation for details. Signed-off-by: Martin Kiepfer <[email protected]> gpio: gpio_axp192: fix dependecy between GET_DIRECTION and GET_CONFIG configuration Latest unit gpio get_direction unit test failes, as get_direction api internally requires get_config functionality. This commit fixes this dependecy. Signed-off-by: Martin Kiepfer <[email protected]>
This commit resolves an internal dependecy between GET_DIRECTION and GET_CONFIG configuration. GET_CONFIG api is internally needed by GET_DIRECTION api. Signed-off-by: Martin Kiepfer <[email protected]>
m5stack_core2 enables i2c by default for regulator usage which conflicts with the test and is therefore excluded from the test. Signed-off-by: Martin Kiepfer <[email protected]>
Basic pinout definition. Signed-off-by: Martin Kiepfer <[email protected]>
87afcd0
to
751dcc4
Compare
@marekmatej, @kartben Thank you both for the effort you put into this PR! |
This Pull-Request features support for the M5Stack Core2 hardware. The module features a LCD display, touchscreen, battery, USB-Port, 8MB RAM and 16MB Flash.
Basic features are working. See board documentation for details.
Signed-off-by: Martin Kiepfer [email protected]