Added initial support for the M5Stack Cardputer shield for M5 Stamp S3. The following features are supported: - uSD - st7789 LCD - Analog input from VBAT - I2C on the grove connector Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
144 lines
2.4 KiB
Plaintext
144 lines
2.4 KiB
Plaintext
/*
|
|
* Copyright (c) 2025 Linaro Limited
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/ {
|
|
zephyr,user {
|
|
io-channels = <&adc0 9>;
|
|
};
|
|
|
|
aliases {
|
|
/delete-property/ led-strip;
|
|
};
|
|
|
|
chosen {
|
|
zephyr,display = &st7789v;
|
|
};
|
|
|
|
mipi_dbi {
|
|
compatible = "zephyr,mipi-dbi-spi";
|
|
spi-dev = <&spi2>;
|
|
dc-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
|
|
reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
|
write-only;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
st7789v: st7789v@0 {
|
|
compatible = "sitronix,st7789v";
|
|
reg = <0>;
|
|
mipi-max-frequency = <20000000>;
|
|
|
|
width = <135>;
|
|
height = <240>;
|
|
x-offset = <53>;
|
|
y-offset = <40>;
|
|
|
|
vcom = <0x28>;
|
|
gctrl = <0x35>;
|
|
vrhs = <0x10>;
|
|
vdvs = <0x20>;
|
|
mdac = <0x00>;
|
|
gamma = <0x01>;
|
|
colmod = <0x55>;
|
|
lcm = <0x2c>;
|
|
porch-param = [0c 0c 00 33 33];
|
|
cmd2en-param = [5a 69 02 00];
|
|
pwctrl1-param = [a4 a1];
|
|
pvgam-param = [d0 00 02 07 0a 28 32 44 42 06 0e 12 14 17];
|
|
nvgam-param = [d0 00 02 07 0a 28 31 54 47 0e 1c 17 1b 1e];
|
|
ram-param = [00 F0];
|
|
rgb-param = [40 02 14];
|
|
mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
|
|
};
|
|
};
|
|
};
|
|
|
|
/delete-node/ &status_rgb_led;
|
|
|
|
&pinctrl {
|
|
spim2_default: spim2_default {
|
|
group1 {
|
|
pinmux = <SPIM2_SCLK_GPIO36>,
|
|
<SPIM2_CSEL_GPIO37>;
|
|
};
|
|
|
|
group2 {
|
|
pinmux = <SPIM2_MOSI_GPIO35>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
spim3_default: spim3_default {
|
|
group1 {
|
|
pinmux = <SPIM3_SCLK_GPIO40>,
|
|
<SPIM3_MISO_GPIO39>;
|
|
};
|
|
|
|
group2 {
|
|
pinmux = <SPIM3_MOSI_GPIO14>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
i2c1_default: i2c1_default {
|
|
group1 {
|
|
pinmux = <I2C1_SDA_GPIO1>,
|
|
<I2C1_SCL_GPIO2>;
|
|
bias-pull-up;
|
|
drive-open-drain;
|
|
output-high;
|
|
};
|
|
};
|
|
};
|
|
|
|
&adc0 {
|
|
status = "okay";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
channel@9 {
|
|
reg = <9>;
|
|
zephyr,gain = "ADC_GAIN_1_4";
|
|
zephyr,reference = "ADC_REF_INTERNAL";
|
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
|
zephyr,resolution = <12>;
|
|
};
|
|
};
|
|
|
|
&spi3 {
|
|
status = "okay";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
status = "okay";
|
|
pinctrl-0 = <&spim3_default>;
|
|
pinctrl-names = "default";
|
|
clock-frequency = <25000000>;
|
|
cs-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; /* TF-CARD */
|
|
|
|
sd0: sd@0 {
|
|
compatible = "zephyr,sdhc-spi-slot";
|
|
reg = <0>;
|
|
status = "okay";
|
|
spi-max-frequency = <25000000>;
|
|
|
|
mmc {
|
|
compatible = "zephyr,sdmmc-disk";
|
|
disk-name = "SD";
|
|
status = "okay";
|
|
};
|
|
};
|
|
};
|
|
|
|
&gpio1 {
|
|
status = "okay";
|
|
|
|
lcd-backlight {
|
|
gpio-hog;
|
|
gpios = <6 GPIO_ACTIVE_HIGH>;
|
|
output-high;
|
|
};
|
|
};
|