|
| 1 | +/* |
| 2 | + * Copyright (c) 2024 STMicroelectronics |
| 3 | + * Copyright (c) 2025 JB-Lighting Lichtanlagentechnik |
| 4 | + * |
| 5 | + * SPDX-License-Identifier: Apache-2.0 |
| 6 | + */ |
| 7 | + |
| 8 | +/dts-v1/; |
| 9 | +#include <st/h7rs/stm32h7s3X8.dtsi> |
| 10 | +#include <st/h7/stm32h7s3l8hx-pinctrl.dtsi> |
| 11 | +#include "arduino_r3_connector.dtsi" |
| 12 | +#include <zephyr/dt-bindings/input/input-event-codes.h> |
| 13 | + |
| 14 | +/ { |
| 15 | + chosen { |
| 16 | + zephyr,console = &usart3; |
| 17 | + zephyr,shell-uart = &usart3; |
| 18 | + zephyr,dtcm = &dtcm; |
| 19 | + zephyr,sram = &sram0; |
| 20 | + zephyr,canbus = &fdcan1; |
| 21 | + }; |
| 22 | + |
| 23 | + leds: leds { |
| 24 | + compatible = "gpio-leds"; |
| 25 | + |
| 26 | + green_led: led_1 { |
| 27 | + gpios = <&gpiod 10 GPIO_ACTIVE_HIGH>; |
| 28 | + label = "User LD1"; |
| 29 | + }; |
| 30 | + |
| 31 | + yellow_led: led_2 { |
| 32 | + gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>; |
| 33 | + label = "User LD2"; |
| 34 | + }; |
| 35 | + |
| 36 | + red_led: led_3 { |
| 37 | + gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; |
| 38 | + label = "User LD3"; |
| 39 | + }; |
| 40 | + }; |
| 41 | + |
| 42 | + gpio_keys { |
| 43 | + compatible = "gpio-keys"; |
| 44 | + |
| 45 | + user_button: button_0 { |
| 46 | + label = "User"; |
| 47 | + gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; |
| 48 | + zephyr,code = <INPUT_KEY_0>; |
| 49 | + }; |
| 50 | + }; |
| 51 | + |
| 52 | + aliases { |
| 53 | + led0 = &green_led; |
| 54 | + led1 = &yellow_led; |
| 55 | + led2 = &red_led; |
| 56 | + sw0 = &user_button; |
| 57 | + watchdog0 = &iwdg; |
| 58 | + spi-flash0 = &mx25uw25645; |
| 59 | + }; |
| 60 | + |
| 61 | + ext_memory: memory@70000000 { |
| 62 | + compatible = "zephyr,memory-region"; |
| 63 | + reg = <0x70000000 DT_SIZE_M(32)>; |
| 64 | + zephyr,memory-region = "EXTMEM"; |
| 65 | + zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_FLASH)>; |
| 66 | + }; |
| 67 | +}; |
| 68 | + |
| 69 | +&clk_hse { |
| 70 | + clock-frequency = <DT_FREQ_M(24)>; |
| 71 | + status = "okay"; |
| 72 | +}; |
| 73 | + |
| 74 | +&clk_lse { |
| 75 | + status = "okay"; |
| 76 | +}; |
| 77 | + |
| 78 | +&pll { |
| 79 | + div-m = <12>; |
| 80 | + mul-n = <200>; |
| 81 | + div-p = <2>; |
| 82 | + div-q = <2>; |
| 83 | + div-r = <2>; |
| 84 | + div-s = <2>; |
| 85 | + div-t = <2>; |
| 86 | + clocks = <&clk_hse>; |
| 87 | + status = "okay"; |
| 88 | +}; |
| 89 | + |
| 90 | +/* PLL2 for clocking the xspi peripheral */ |
| 91 | +&pll2 { |
| 92 | + div-m = <12>; |
| 93 | + mul-n = <200>; |
| 94 | + div-p = <2>; |
| 95 | + div-q = <2>; |
| 96 | + div-r = <2>; |
| 97 | + div-s = <2>; |
| 98 | + div-t = <2>; |
| 99 | + clocks = <&clk_hse>; |
| 100 | + status = "okay"; |
| 101 | +}; |
| 102 | + |
| 103 | +&rcc { |
| 104 | + clocks = <&pll>; |
| 105 | + clock-frequency = <DT_FREQ_M(200)>; |
| 106 | + dcpre = <1>; |
| 107 | + hpre = <1>; |
| 108 | + ppre1 = <2>; |
| 109 | + ppre2 = <2>; |
| 110 | + ppre4 = <2>; |
| 111 | + ppre5 = <2>; |
| 112 | +}; |
| 113 | + |
| 114 | +&pwr { |
| 115 | + power-supply = "ldo"; |
| 116 | +}; |
| 117 | + |
| 118 | +&usart1 { |
| 119 | + pinctrl-0 = <&usart1_tx_pb14 &usart1_rx_pa10>; |
| 120 | + pinctrl-names = "default"; |
| 121 | + current-speed = <115200>; |
| 122 | + status = "okay"; |
| 123 | +}; |
| 124 | + |
| 125 | +&usart3 { |
| 126 | + pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; |
| 127 | + pinctrl-names = "default"; |
| 128 | + current-speed = <115200>; |
| 129 | + status = "okay"; |
| 130 | +}; |
| 131 | + |
| 132 | +&iwdg { |
| 133 | + status = "okay"; |
| 134 | +}; |
| 135 | + |
| 136 | +&wwdg { |
| 137 | + status = "okay"; |
| 138 | +}; |
| 139 | + |
| 140 | +&adc1 { |
| 141 | + pinctrl-0 = <&adc1_inp15_pa3>; /* Arduino A0 */ |
| 142 | + pinctrl-names = "default"; |
| 143 | + st,adc-clock-source = "SYNC"; |
| 144 | + st,adc-prescaler = <4>; |
| 145 | + status = "okay"; |
| 146 | +}; |
| 147 | + |
| 148 | +&spi1 { |
| 149 | + status = "okay"; |
| 150 | + pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>; |
| 151 | + pinctrl-names = "default"; |
| 152 | + cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 153 | +}; |
| 154 | + |
| 155 | +&i2c1 { |
| 156 | + pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; |
| 157 | + pinctrl-names = "default"; |
| 158 | + status = "okay"; |
| 159 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 160 | +}; |
| 161 | + |
| 162 | +&fdcan1 { |
| 163 | + pinctrl-0 = <&fdcan1_rx_pd0 &fdcan1_tx_pd1>; |
| 164 | + pinctrl-names = "default"; |
| 165 | + clocks = <&rcc STM32_CLOCK(APB1_2, 8)>, |
| 166 | + <&rcc STM32_SRC_HSE FDCAN_SEL(0)>; |
| 167 | + status = "okay"; |
| 168 | +}; |
| 169 | + |
| 170 | +&mac { |
| 171 | + pinctrl-0 = <ð_rmii_rxd0_pg4 |
| 172 | + ð_rmii_rxd1_pg5 |
| 173 | + ð_rmii_ref_clk_pb6 |
| 174 | + ð_rmii_crs_dv_pa7 |
| 175 | + ð_rmii_tx_en_pg11 |
| 176 | + ð_rmii_txd0_pg13 |
| 177 | + ð_rmii_txd1_pg12>; |
| 178 | + pinctrl-names = "default"; |
| 179 | + phy-connection-type = "rmii"; |
| 180 | + phy-handle = <ð_phy>; |
| 181 | + status = "okay"; |
| 182 | +}; |
| 183 | + |
| 184 | +&mdio { |
| 185 | + pinctrl-0 = <ð_mdio_pa2 ð_mdc_pg6>; |
| 186 | + pinctrl-names = "default"; |
| 187 | + status = "okay"; |
| 188 | + |
| 189 | + eth_phy: ethernet-phy@0 { |
| 190 | + compatible = "ethernet-phy"; |
| 191 | + reg = <0x00>; |
| 192 | + }; |
| 193 | +}; |
| 194 | + |
| 195 | +&xspi2 { |
| 196 | + pinctrl-0 = <&xspim_p2_clk_pn6 &xspim_p2_ncs1_pn1 |
| 197 | + &xspim_p2_io0_pn2 &xspim_p2_io1_pn3 |
| 198 | + &xspim_p2_io2_pn4 &xspim_p2_io3_pn5 |
| 199 | + &xspim_p2_io4_pn8 &xspim_p2_io5_pn9 |
| 200 | + &xspim_p2_io6_pn10 &xspim_p2_io7_pn11 |
| 201 | + &xspim_p2_dqs0_pn0>; |
| 202 | + pinctrl-names = "default"; |
| 203 | + |
| 204 | + status = "okay"; |
| 205 | + |
| 206 | + ext_flash_ctrl: xspi-nor-flash@0 { |
| 207 | + compatible = "st,stm32-xspi-nor"; |
| 208 | + reg = <0>; |
| 209 | + size = <DT_SIZE_M(256)>; /* 256Mbits */ |
| 210 | + ospi-max-frequency = <DT_FREQ_M(50)>; |
| 211 | + spi-bus-width = <XSPI_OCTO_MODE>; |
| 212 | + data-rate = <XSPI_DTR_TRANSFER>; |
| 213 | + four-byte-opcodes; |
| 214 | + status = "okay"; |
| 215 | + |
| 216 | + #address-cells = <1>; |
| 217 | + #size-cells = <1>; |
| 218 | + ranges = <0x0 0x70000000 DT_SIZE_M(32)>; |
| 219 | + |
| 220 | + ext_flash: mx25uw25645: xspi-nor-flash@0 { |
| 221 | + compatible = "soc-nv-flash"; |
| 222 | + reg = <0x0 DT_SIZE_M(32)>; |
| 223 | + write-block-size = <1>; |
| 224 | + erase-block-size = <DT_SIZE_K(4)>; |
| 225 | + |
| 226 | + partitions { |
| 227 | + compatible = "fixed-partitions"; |
| 228 | + #address-cells = <1>; |
| 229 | + #size-cells = <1>; |
| 230 | + }; |
| 231 | + }; |
| 232 | + }; |
| 233 | +}; |
0 commit comments