2017-10-27 23:19:12 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) Bobby Noelte
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-26 11:06:34 +08:00
|
|
|
#include <st/f0/stm32f0.dtsi>
|
2018-02-10 07:31:00 +08:00
|
|
|
|
|
|
|
/ {
|
|
|
|
soc {
|
2019-02-13 01:10:08 +08:00
|
|
|
flash-controller@40022000 {
|
|
|
|
flash0: flash@8000000 {
|
|
|
|
erase-block-size = <2048>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-03-01 05:15:00 +08:00
|
|
|
timers2: timers@40000000 {
|
|
|
|
compatible = "st,stm32-timers";
|
|
|
|
reg = <0x40000000 0x400>;
|
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00000001>;
|
2020-06-18 23:38:18 +08:00
|
|
|
interrupts = <15 0>;
|
|
|
|
interrupt-names = "global";
|
2018-03-01 05:15:00 +08:00
|
|
|
status = "disabled";
|
|
|
|
label = "TIMERS_2";
|
|
|
|
|
|
|
|
pwm {
|
|
|
|
compatible = "st,stm32-pwm";
|
|
|
|
status = "disabled";
|
|
|
|
st,prescaler = <0>;
|
|
|
|
label = "PWM_2";
|
2020-04-23 22:10:12 +08:00
|
|
|
#pwm-cells = <3>;
|
2018-03-01 05:15:00 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-02-10 07:31:00 +08:00
|
|
|
spi2: spi@40003800 {
|
drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible
On stm32 spi devices, there are 2 main IP variants, with and w/o
fifo. Fifo is not really used today, but still there is some
additional code handling fifo. Today this code is protected under
Kconfig symbol SPI_STM32_HAS_FIFO.
This code carries redundant information vs dedicated compatible
"st,stm32-spi-fifo", which is provided as unique driver compatible
for devices supporting this IP as opposed to use of "st,stm32-spi"
when fifo is not supported.
Having these 2 compatibles defined exclusively is not convenient for
migration to DT_INST as DT_INST macros contain compatible string and
hence it cannot be used to provide common compatible code for devices
defining different compatibles.
Based on these observations, review stm32 spi devices compatible
declarations. Devices supporting fifo will now declare both
compatibles, as proposed by dt spec: "[compatible] property value
consists of a concatenated list of null terminated strings,
from most specific to most general". Hence field will now be:
"st,stm32-spi-fifo", "st,stm32-spi"
This way, fifo enabled stm32 spi devices will generate both:
DT_INST_STM32_SPI_FOO and DT_INST_STM32_SPI_FIFO_FOO
As well as:
DT_COMPAT_ST_STM32_SPI and DT_COMPAT_ST_STM32_SPI_FIFO
So, DT_INST_STM32_SPI_FOO could be used for device initialization.
Also DT_COMPAT_ST_STM32_SPI_FIFO could be used for FIFO handling
code inside driver. Hence use it to replace Kconfig symbol
SPI_STM32_HAS_FIFO.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-03-09 17:43:41 +08:00
|
|
|
compatible = "st,stm32-spi-fifo", "st,stm32-spi";
|
2018-02-10 07:31:00 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
reg = <0x40003800 0x400>;
|
2018-06-22 19:54:24 +08:00
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00004000>;
|
2018-02-10 07:31:00 +08:00
|
|
|
interrupts = <26 3>;
|
|
|
|
status = "disabled";
|
|
|
|
label = "SPI_2";
|
|
|
|
};
|
2017-11-23 18:31:59 +08:00
|
|
|
|
2018-04-24 21:32:10 +08:00
|
|
|
pinctrl: pin-controller@48000000 {
|
2017-11-23 18:31:59 +08:00
|
|
|
|
|
|
|
gpioe: gpio@48001000 {
|
|
|
|
compatible = "st,stm32-gpio";
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
reg = <0x48001000 0x400>;
|
2018-12-06 23:03:41 +08:00
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x00200000>;
|
2017-11-23 18:31:59 +08:00
|
|
|
label = "GPIOE";
|
|
|
|
};
|
|
|
|
};
|
2019-10-24 12:34:28 +08:00
|
|
|
|
2020-08-25 23:17:27 +08:00
|
|
|
dac1: dac@40007400 {
|
|
|
|
compatible = "st,stm32-dac";
|
|
|
|
reg = <0x40007400 0x400>;
|
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x20000000>;
|
|
|
|
status = "disabled";
|
|
|
|
label = "DAC_1";
|
|
|
|
#io-channel-cells = <1>;
|
|
|
|
};
|
|
|
|
|
2019-10-24 12:34:28 +08:00
|
|
|
dma1: dma@40020000 {
|
|
|
|
interrupts = <9 0 10 0 10 0 11 0 11 0 11 0 11 0>;
|
|
|
|
};
|
|
|
|
|
|
|
|
dma2: dma@40020400 {
|
2021-01-08 03:37:04 +08:00
|
|
|
compatible = "st,stm32-dma-v2";
|
2019-10-24 12:34:28 +08:00
|
|
|
#dma-cells = <4>;
|
|
|
|
reg = <0x40020400 0x400>;
|
|
|
|
interrupts = <9 0 10 0 10 0 11 0 11 0 11 0
|
|
|
|
11 0 10 0 10 0 11 0 11 0 11 0>;
|
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x2>;
|
|
|
|
status = "disabled";
|
|
|
|
label = "DMA_2";
|
|
|
|
};
|
2018-02-10 07:31:00 +08:00
|
|
|
};
|
|
|
|
};
|