You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
336 lines
7.0 KiB
336 lines
7.0 KiB
/* |
|
* Copyright (c) 2020 Yestin Sun |
|
* |
|
* SPDX-License-Identifier: Apache-2.0 |
|
*/ |
|
|
|
#include <st/l5/stm32l562Xe.dtsi> |
|
#include <st/l5/stm32l562qeixq-pinctrl.dtsi> |
|
#include "arduino_r3_connector.dtsi" |
|
#include <zephyr/dt-bindings/input/input-event-codes.h> |
|
#include <zephyr/dt-bindings/memory-controller/stm32-fmc-nor-psram.h> |
|
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> |
|
|
|
/ { |
|
leds { |
|
compatible = "gpio-leds"; |
|
red_led_9: led_9 { |
|
gpios = <&gpiod 3 GPIO_ACTIVE_LOW>; |
|
label = "User LD9"; |
|
}; |
|
green_led_10: led_10 { |
|
gpios = <&gpiog 12 GPIO_ACTIVE_LOW>; |
|
label = "User LD10"; |
|
}; |
|
}; |
|
|
|
gpio_keys { |
|
compatible = "gpio-keys"; |
|
user_button: button { |
|
label = "User"; |
|
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; |
|
zephyr,code = <INPUT_KEY_0>; |
|
}; |
|
}; |
|
|
|
aliases { |
|
die-temp0 = &die_temp; |
|
volt-sensor0 = &vref; |
|
volt-sensor1 = &vbat; |
|
}; |
|
|
|
chosen { |
|
zephyr,bt-hci = &hci_spi; |
|
}; |
|
|
|
lvgl_pointer { |
|
compatible = "zephyr,lvgl-pointer-input"; |
|
input = <&ft5336>; |
|
invert-y; |
|
}; |
|
}; |
|
|
|
&fmc { |
|
pinctrl-0 = <&fmc_a0_pf0 &fmc_nce_pd7 &fmc_nwe_pd5 &fmc_noe_pd4 |
|
&fmc_d0_pd14 &fmc_d1_pd15 &fmc_d2_pd0 &fmc_d3_pd1 |
|
&fmc_d4_pe7 &fmc_d5_pe8 &fmc_d6_pe9 &fmc_d7_pe10 |
|
&fmc_d8_pe11 &fmc_d9_pe12 &fmc_d10_pe13 &fmc_d11_pe14 |
|
&fmc_d12_pe15 &fmc_d13_pd8 &fmc_d14_pd9 &fmc_d15_pd10>; |
|
pinctrl-names = "default"; |
|
status = "okay"; |
|
|
|
sram { |
|
compatible = "st,stm32-fmc-nor-psram"; |
|
|
|
#address-cells = <1>; |
|
#size-cells = <0>; |
|
|
|
bank@0 { |
|
reg = <0x0>; |
|
st,control = <STM32_FMC_DATA_ADDRESS_MUX_DISABLE |
|
STM32_FMC_MEMORY_TYPE_SRAM |
|
STM32_FMC_NORSRAM_MEM_BUS_WIDTH_16 |
|
STM32_FMC_BURST_ACCESS_MODE_DISABLE |
|
STM32_FMC_WAIT_SIGNAL_POLARITY_LOW |
|
STM32_FMC_WAIT_TIMING_BEFORE_WS |
|
STM32_FMC_WRITE_OPERATION_ENABLE |
|
STM32_FMC_WAIT_SIGNAL_DISABLE |
|
STM32_FMC_EXTENDED_MODE_DISABLE |
|
STM32_FMC_ASYNCHRONOUS_WAIT_DISABLE |
|
STM32_FMC_WRITE_BURST_DISABLE |
|
STM32_FMC_CONTINUOUS_CLOCK_SYNC_ONLY |
|
STM32_FMC_WRITE_FIFO_DISABLE |
|
STM32_FMC_PAGE_SIZE_NONE>; |
|
st,timing = <1 1 32 0 2 2 STM32_FMC_ACCESS_MODE_A>; |
|
|
|
fmc-mipi-dbi { |
|
compatible = "st,stm32-fmc-mipi-dbi"; |
|
reset-gpios = <&gpiof 14 GPIO_ACTIVE_LOW>; |
|
power-gpios = <&gpioh 0 GPIO_ACTIVE_LOW>; |
|
register-select-pin = <0>; |
|
#address-cells = <1>; |
|
#size-cells = <0>; |
|
st7789v: lcd-panel@0 { |
|
compatible = "sitronix,st7789v"; |
|
reg = <0>; |
|
mipi-mode = "MIPI_DBI_MODE_8080_BUS_16_BIT"; |
|
/* A write cycle should be 68ns */ |
|
mipi-max-frequency = <14705882>; |
|
width = <240>; |
|
height = <240>; |
|
x-offset = <0>; |
|
y-offset = <0>; |
|
vcom = <0x1F>; |
|
gctrl = <0x35>; |
|
vdvs = <0x20>; |
|
mdac = <0x00>; |
|
gamma = <0x01>; |
|
colmod = <0x05>; |
|
lcm = <0x2c>; |
|
porch-param = [0c 0c 00 33 33]; |
|
cmd2en-param = [5a 69 02 00]; |
|
pwctrl1-param = [a4 a1]; |
|
pvgam-param = [D0 08 11 08 0C 15 39 33 50 36 13 14 29 2D]; |
|
nvgam-param = [D0 08 10 08 06 06 39 44 51 0B 16 14 2F 31]; |
|
ram-param = [00 F0]; |
|
rgb-param = [40 02 14]; |
|
}; |
|
}; |
|
}; |
|
}; |
|
}; |
|
|
|
&clk_hsi48 { |
|
status = "okay"; |
|
}; |
|
|
|
&clk_msi { |
|
status = "okay"; |
|
msi-range = <6>; |
|
msi-pll-mode; |
|
}; |
|
|
|
&clk_lse { |
|
status = "okay"; |
|
}; |
|
|
|
&pll { |
|
div-m = <1>; |
|
mul-n = <55>; |
|
div-p = <7>; |
|
div-q = <2>; |
|
div-r = <2>; |
|
clocks = <&clk_msi>; |
|
status = "okay"; |
|
}; |
|
|
|
&rcc { |
|
clocks = <&pll>; |
|
clock-frequency = <DT_FREQ_M(110)>; |
|
ahb-prescaler = <1>; |
|
apb1-prescaler = <1>; |
|
apb2-prescaler = <1>; |
|
}; |
|
|
|
stm32_lp_tick_source: &lptim1 { |
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>, |
|
<&rcc STM32_SRC_LSE LPTIM1_SEL(3)>; |
|
status = "okay"; |
|
}; |
|
|
|
&usart1 { |
|
current-speed = <115200>; |
|
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; |
|
pinctrl-names = "default"; |
|
status = "okay"; |
|
}; |
|
|
|
&usart3 { |
|
pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>; |
|
pinctrl-names = "default"; |
|
current-speed = <115200>; |
|
status = "okay"; |
|
}; |
|
|
|
&i2c1 { |
|
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; |
|
pinctrl-names = "default"; |
|
status = "okay"; |
|
clock-frequency = <I2C_BITRATE_FAST>; |
|
|
|
lsm6dso: lsm6dso@6a { |
|
compatible = "st,lsm6dso"; |
|
reg = <0x6a>; |
|
irq-gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; |
|
}; |
|
|
|
ft5336: ft5336@38 { |
|
compatible = "focaltech,ft5336"; |
|
reg = <0x38>; |
|
int-gpios = <&gpiof 1 GPIO_ACTIVE_LOW>; |
|
reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>; |
|
}; |
|
}; |
|
|
|
&rng { |
|
status = "okay"; |
|
}; |
|
|
|
&spi1 { |
|
pinctrl-0 = <&spi1_sck_pg2 &spi1_miso_pg3 &spi1_mosi_pg4>; |
|
pinctrl-names = "default"; |
|
cs-gpios = <&gpiog 5 GPIO_ACTIVE_LOW>; |
|
status = "okay"; |
|
|
|
hci_spi: spbtle-rf@0 { |
|
compatible = "st,hci-spi-v1"; |
|
reg = <0>; |
|
irq-gpios = <&gpiog 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; |
|
reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>; |
|
spi-max-frequency = <DT_FREQ_M(2)>; |
|
spi-hold-cs; |
|
}; |
|
}; |
|
|
|
&octospi1 { |
|
pinctrl-0 = <&octospi1_clk_pa3 &octospi1_ncs_pa2 |
|
&octospi1_io0_pb1 &octospi1_io1_pb0 |
|
&octospi1_io2_pa7 &octospi1_io3_pa6 |
|
&octospi1_io4_pc1 &octospi1_io5_pc2 |
|
&octospi1_io6_pc3 &octospi1_io7_pc0 |
|
&octospi1_dqs_pb2>; |
|
pinctrl-names = "default"; |
|
|
|
status = "okay"; |
|
|
|
mx25lm51245: ospi-nor-flash@90000000 { |
|
compatible = "st,stm32-ospi-nor"; |
|
reg = <0x90000000 DT_SIZE_M(64)>; /* 512 Mbits */ |
|
ospi-max-frequency = <DT_FREQ_M(50)>; |
|
spi-bus-width = <OSPI_OPI_MODE>; |
|
data-rate = <OSPI_DTR_TRANSFER>; |
|
four-byte-opcodes; |
|
status = "okay"; |
|
sfdp-bfp = [ |
|
53 46 44 50 06 01 02 ff |
|
00 06 01 10 30 00 00 ff |
|
c2 00 01 04 10 01 00 ff |
|
84 00 01 02 c0 00 00 ff |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
e5 20 fb ff ff ff ff 1f |
|
44 eb 08 6b 08 3b 04 bb |
|
fe ff ff ff ff ff 00 ff |
|
ff ff 44 eb 0c 20 0f 52 |
|
10 d8 00 ff d6 49 c5 00 |
|
81 df 04 e3 44 03 67 38 |
|
30 b0 30 b0 f7 bd d5 5c |
|
4a 9e 29 ff f0 50 f9 85 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
00 00 00 00 00 00 00 00 |
|
7f ef ff ff 21 5c dc ff |
|
]; |
|
|
|
partitions { |
|
compatible = "fixed-partitions"; |
|
#address-cells = <1>; |
|
#size-cells = <1>; |
|
|
|
partition@0 { |
|
reg = <0x00000000 DT_SIZE_M(64)>; |
|
}; |
|
}; |
|
}; |
|
}; |
|
|
|
&timers2 { |
|
status = "okay"; |
|
|
|
pwm2: pwm { |
|
status = "okay"; |
|
pinctrl-0 = <&tim2_ch1_pa0>; |
|
pinctrl-names = "default"; |
|
}; |
|
}; |
|
|
|
&dac1 { |
|
status = "okay"; |
|
pinctrl-0 = <&dac1_out1_pa4>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&adc1 { |
|
pinctrl-0 = <&adc1_in13_pc4>; |
|
pinctrl-names = "default"; |
|
st,adc-clock-source = "SYNC"; |
|
st,adc-prescaler = <4>; |
|
status = "okay"; |
|
}; |
|
|
|
&die_temp { |
|
status = "okay"; |
|
}; |
|
|
|
&spi3 { |
|
pinctrl-0 = <&spi3_sck_pg9 &spi3_mosi_pb5 &spi3_miso_pb4>; |
|
pinctrl-names = "default"; |
|
cs-gpios = <&gpioe 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
|
status = "okay"; |
|
}; |
|
|
|
zephyr_udc0: &usb { |
|
pinctrl-0 = <&usb_dp_pa12 &usb_dm_pa11>; |
|
pinctrl-names = "default"; |
|
status = "okay"; |
|
}; |
|
|
|
&sdmmc1 { |
|
status = "okay"; |
|
disk-name = "SD"; |
|
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 = <&gpiof 2 GPIO_ACTIVE_LOW>; |
|
}; |
|
|
|
&vref { |
|
status = "okay"; |
|
}; |
|
|
|
&vbat { |
|
status = "okay"; |
|
};
|
|
|