Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | /*
* Copyright (c) 2021 Seagate Technology LLC
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/f0/stm32f070Xb.dtsi>
#include <st/f0/stm32f070cbtx-pinctrl.dtsi>
#include <dt-bindings/led/led.h>
#include <dt-bindings/led/seagate_legend_b1414.h>
/ {
chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
aliases {
watchdog0 = &iwdg;
};
board_id: brd-id {
compatible = "gpio-keys";
brd_id0: brd_id_0 {
label = "BRD_ID_0";
gpios = <&gpioc 13 0>;
};
brd_id1: brd_id_1 {
label = "BRD_ID_1";
gpios = <&gpioc 14 0>;
};
brd_id2: brd_id_2 {
label = "BRD_ID_2";
gpios = <&gpioc 15 0>;
};
};
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
current-speed = <115200>;
status = "okay";
};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
clock-frequency = <I2C_BITRATE_STANDARD>;
status = "okay";
};
&spi1 {
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
dmas = <&dma1 3 0x20440>, <&dma1 2 0x20480>;
dma-names = "tx", "rx";
status = "okay";
led_strip_spi: b1414@0 {
compatible = "everlight,b1414", "worldsemi,ws2812-spi";
label = "B1414";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <SPI_FREQ>;
/* B1414 */
spi-one-frame = <ONE_FRAME>;
spi-zero-frame = <ZERO_FRAME>;
color-mapping = <LED_COLOR_ID_RED>,
<LED_COLOR_ID_GREEN>,
<LED_COLOR_ID_BLUE>;
reset-delay = <250>;
};
};
&spi2 {
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>;
status = "okay";
spi_nor: spi_nor@0 {
status = "okay";
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <8000000>;
label = "SPI_FLASH_0";
size = <1048576>;
/*
* Main flash source
*
* Vendor : Puya
* Model : P25Q21H
* Total size : 256 KB
* Erase size : whole chip, 64 and 32 KB blocks, 4 KB sectors,
* 256 B pages
* Write size : up to 256 B (page size)
* Lifetime : 100K erase/program cycles on each sector/block
*/
jedec-id = [85 40 12];
/*
* Alternate flash source
*
* Vendor : Fudan
* Model : FM25F01B
* Total size : 128 KB
* Erase size : whole chip, 64 and 32 KB blocks, 4 KB sectors
* Write size : up to 256 B (page size)
* Lifetime : 100K erase/program cycles on each sector/block
*
* jedec-id = [a1 31 11];
*
* Model only found in first Jordan (2"5) EVT revision
*
* Vendor : Fudan
* Model : FM25F005
* Total size : 64 KB
* Erase size : whole chip, 64 and 32 KB blocks, 4 KB sectors
*
* jedec-id = [a1 31 10];
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
product_info: partition@0 {
label = "product-info";
reg = <0x00000000 0x1000>;
};
led_das: partition@10000 {
label = "led-das";
reg = <0x00001000 0x0000f000>;
};
};
};
};
&spi_nor {
status = "okay";
};
&dma1 {
status = "okay";
};
&timers3 {
pwm3: pwm {
pinctrl-0 = <&tim3_ch3_pb0>;
/*
* The maximum period needed on Legend devices for activity LED
* hardware blinking is 250ms (i.e. "error" fast blink at 4 Hz).
*
* We can use the following equation to compute the
* corresponding prescaler value:
*
* period_max = counter_size / cycles_per_second
*
* With:
*
* cycles_per_second = 48 MHz / (prescaler + 1)
* counter_size = 2^16
* period_max = 0.25
*
* Which gives:
*
* prescaler = 48 MHz * 0.25 / 2^16 + 1 = 182
*
* So any prescaler value above 182 is good for a 4 Hz hardware
* blinking. In addition the PWM frequency must be as high as
* possible to fool eyes and cameras with steady brightness
* levels.
*/
st,prescaler = <200>;
status = "disabled";
};
};
&gpiod {
status = "disabled";
};
&gpiof {
status = "disabled";
};
&iwdg {
status = "okay";
};
|