Remove all USB and CDC ACM configuration in favor of common configuraiton. Do not adapt board-specific configurations such as unknown PID/VID or string descriptors. There is no justification for using them on specific boards, and we do not have formal approval to use them in the project tree. Also, we need more uniform configuration, since the main reason for enabling CDC ACM here is to allow users to run examples like hello_world right out of the box. Of course, anyone is free to customize these settings in their fork or downstream project. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
253 lines
5.5 KiB
Text
253 lines
5.5 KiB
Text
/*
|
|
* Copyright (c) 2024 Charles Dias <charlesdias.cd@outlook.com>
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include <st/h7/stm32h743Xi.dtsi>
|
|
#include <st/h7/stm32h743vitx-pinctrl.dtsi>
|
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
|
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
|
|
|
|
/ {
|
|
model = "WeAct Studio MiniSTM32H743 Core Board";
|
|
compatible = "weact,mini-stm32h743";
|
|
|
|
chosen {
|
|
zephyr,sram = &sram0;
|
|
zephyr,flash = &flash0;
|
|
zephyr,display = &st7735r_160x80;
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
user_led: led {
|
|
gpios = <&gpioe 3 GPIO_ACTIVE_HIGH>;
|
|
label = "User LED";
|
|
};
|
|
};
|
|
|
|
gpio_keys {
|
|
compatible = "gpio-keys";
|
|
user_button: button {
|
|
label = "User PB";
|
|
gpios = <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
|
zephyr,code = <INPUT_KEY_0>;
|
|
};
|
|
};
|
|
|
|
mipi_dbi_st7735r_160x80 {
|
|
compatible = "zephyr,mipi-dbi-spi";
|
|
spi-dev = <&spi4>;
|
|
dc-gpios = <&gpioe 13 GPIO_ACTIVE_HIGH>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
st7735r_160x80: st7735r@0 {
|
|
compatible = "sitronix,st7735r";
|
|
mipi-max-frequency = <20000000>;
|
|
mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
|
|
reg = <0>;
|
|
width = <160>;
|
|
height = <80>;
|
|
inversion-on;
|
|
rgb-is-inverted;
|
|
x-offset = <1>;
|
|
y-offset = <26>;
|
|
pwctr1 = [A2 02 84];
|
|
pwctr2 = [C5];
|
|
pwctr3 = [0A 00];
|
|
pwctr4 = [8A 2A];
|
|
pwctr5 = [8A EE];
|
|
invctr = <7>;
|
|
frmctr1 = [01 2C 2D];
|
|
frmctr2 = [01 2C 2D];
|
|
frmctr3 = [01 2C 2D 01 2C 2D];
|
|
vmctr1 = <14>;
|
|
gamctrp1 = [02 1C 07 12 37 32 29 2D 29 25 2B 39 00 01 03 10];
|
|
gamctrn1 = [03 1D 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10];
|
|
colmod = <5>;
|
|
/* Set D3 (RGB) bit to 1. LV_COLOR_16_SWAP is enabled by default */
|
|
madctl = <120>; /* Set to <184> to rotate the image 180 degrees. */
|
|
caset = [00 01 00 a0];
|
|
raset = [00 1a 00 69];
|
|
};
|
|
};
|
|
|
|
aliases {
|
|
led0 = &user_led;
|
|
sw0 = &user_button;
|
|
watchdog0 = &iwdg;
|
|
sdhc0 = &sdmmc1;
|
|
};
|
|
|
|
dcmi_camera_connector: connector_dcmi_camera {
|
|
compatible = "weact,dcmi-camera-connector";
|
|
#gpio-cells = <2>;
|
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
|
gpio-map-pass-thru = <0 0x3f>;
|
|
|
|
gpio-map = <3 0 &gpiob 9 0>, /* DVP_SDA (I2C1_SDA) */
|
|
<5 0 &gpiob 8 0>, /* DVP_SCL (I2C1_SCL) */
|
|
<7 0 &gpiob 7 0>, /* DVP_VSYNC */
|
|
<8 0 &gpioa 7 0>, /* DVP_PWDN */
|
|
<9 0 &gpioa 4 0>, /* DVP_HSYNC */
|
|
<12 0 &gpioe 6 0>, /* DVP_D7 */
|
|
<13 0 &gpioa 8 0>, /* DVP_XCLK (RCC_MCO1) */
|
|
<14 0 &gpioe 5 0>, /* DVP_D6 */
|
|
<16 0 &gpiod 3 0>, /* DVP_D5 */
|
|
<17 0 &gpioa 6 0>, /* DVP_PCLK */
|
|
<18 0 &gpioe 4 0>, /* DVP_D4 */
|
|
<19 0 &gpioc 6 0>, /* DVP_D0 */
|
|
<20 0 &gpioe 1 0>, /* DVP_D3 */
|
|
<21 0 &gpioc 7 0>, /* DVP_D1 */
|
|
<22 0 &gpioe 0 0>; /* DVP_D2 */
|
|
};
|
|
};
|
|
|
|
&clk_lsi {
|
|
status = "okay";
|
|
};
|
|
|
|
&clk_hsi48 {
|
|
status = "okay";
|
|
};
|
|
|
|
&clk_hse {
|
|
clock-frequency = <DT_FREQ_M(25)>;
|
|
status = "okay";
|
|
};
|
|
|
|
&pll {
|
|
div-m = <5>;
|
|
mul-n = <96>;
|
|
div-p = <2>;
|
|
div-q = <10>;
|
|
div-r = <2>;
|
|
clocks = <&clk_hse>;
|
|
status = "okay";
|
|
};
|
|
|
|
&rcc {
|
|
clocks = <&pll>;
|
|
clock-frequency = <DT_FREQ_M(240)>;
|
|
d1cpre = <1>;
|
|
hpre = <2>;
|
|
d1ppre = <1>;
|
|
d2ppre1 = <1>;
|
|
d2ppre2 = <1>;
|
|
d3ppre = <1>;
|
|
};
|
|
|
|
&sdmmc1 {
|
|
pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
|
|
&sdmmc1_d2_pc10 &sdmmc1_d3_pc11
|
|
&sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>;
|
|
pinctrl-names = "default";
|
|
cd-gpios = <&gpiod 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
status = "okay";
|
|
};
|
|
|
|
zephyr_udc0: &usbotg_fs {
|
|
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
};
|
|
|
|
#include <../boards/common/usb/cdc_acm_serial.dtsi>
|
|
|
|
&quadspi {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&quadspi_clk_pb2 &quadspi_bk1_ncs_pb6
|
|
&quadspi_bk1_io0_pd11 &quadspi_bk1_io1_pd12
|
|
&quadspi_bk1_io2_pe2 &quadspi_bk1_io3_pd13>;
|
|
flash-id = <1>;
|
|
status = "okay";
|
|
|
|
w25q64_qspi: qspi-nor-flash@90000000 {
|
|
compatible = "st,stm32-qspi-nor";
|
|
reg = <0x90000000 DT_SIZE_M(8)>; /* 64 Mbits */
|
|
qspi-max-frequency = <40000000>;
|
|
status = "okay";
|
|
spi-bus-width = <4>;
|
|
writeoc = "PP_1_1_4";
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
slot0_partition: partition@0 {
|
|
reg = <0x00000000 DT_SIZE_M(8)>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&spi1 {
|
|
pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pd7>;
|
|
cs-gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
w25q64_spi: spi-nor-flash@0 {
|
|
compatible = "jedec,spi-nor";
|
|
reg = <0>;
|
|
spi-max-frequency = <40000000>;
|
|
size = <DT_SIZE_M(64)>; /* 64 Mbits */
|
|
status = "okay";
|
|
jedec-id = [ef 40 17];
|
|
has-dpd;
|
|
t-enter-dpd = <3500>;
|
|
t-exit-dpd = <3500>;
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
storage_partition: partition@0 {
|
|
label = "storage";
|
|
reg = <0x00000000 DT_SIZE_M(8)>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&gpioe {
|
|
status = "okay";
|
|
|
|
lcd_led {
|
|
gpio-hog;
|
|
gpios = <10 GPIO_ACTIVE_LOW>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
&spi4 {
|
|
pinctrl-0 = <&spi4_sck_pe12 &spi4_mosi_pe14>;
|
|
cs-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
};
|
|
|
|
&rng {
|
|
status = "okay";
|
|
};
|
|
|
|
&backup_sram {
|
|
status = "okay";
|
|
};
|
|
|
|
&iwdg1 {
|
|
status = "okay";
|
|
};
|
|
|
|
zephyr_camera_i2c: &i2c1 {
|
|
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
zephyr_camera_dvp: &dcmi {
|
|
pinctrl-0 = <&dcmi_hsync_pa4 &dcmi_pixclk_pa6 &dcmi_vsync_pb7
|
|
&dcmi_d0_pc6 &dcmi_d1_pc7 &dcmi_d2_pe0 &dcmi_d3_pe1
|
|
&dcmi_d4_pe4 &dcmi_d5_pd3 &dcmi_d6_pe5 &dcmi_d7_pe6>;
|
|
pinctrl-names = "default";
|
|
};
|