| /* |
| * Copyright (c) 2021 Linaro Limited |
| * Copyright (c) 2023 Thomas Stranger |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| #include <st/h5/stm32h563Xi.dtsi> |
| #include <st/h5/stm32h563zitx-pinctrl.dtsi> |
| #include "arduino_r3_connector.dtsi" |
| #include "st_morpho_connector.dtsi" |
| #include <zephyr/dt-bindings/input/input-event-codes.h> |
| |
| / { |
| leds: leds { |
| compatible = "gpio-leds"; |
| green_led_1: led_1 { |
| gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>; |
| label = "User LD1"; |
| }; |
| yellow_led_1: led_2 { |
| gpios = <&gpiof 4 GPIO_ACTIVE_HIGH>; |
| label = "User LD2"; |
| }; |
| red_led_1: led_3 { |
| gpios = <&gpiog 4 GPIO_ACTIVE_HIGH>; |
| label = "User LD3"; |
| }; |
| }; |
| |
| gpio_keys { |
| compatible = "gpio-keys"; |
| user_button: button { |
| label = "User"; |
| gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; |
| zephyr,code = <INPUT_KEY_0>; |
| }; |
| }; |
| |
| pwmleds: pwmleds { |
| compatible = "pwm-leds"; |
| status = "disabled"; |
| |
| pwm_led_1: green_led_1 { |
| pwms = <&pwm3 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>; |
| label = "green led"; |
| }; |
| }; |
| }; |
| |
| &clk_hse { |
| clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ |
| hse-bypass; |
| status = "okay"; |
| }; |
| |
| &clk_hsi48 { |
| status = "okay"; |
| }; |
| |
| &clk_lse { |
| status = "okay"; |
| }; |
| |
| &pll { |
| div-m = <2>; |
| mul-n = <120>; |
| div-p = <2>; |
| div-q = <3>; |
| div-r = <2>; |
| clocks = <&clk_hse>; |
| status = "okay"; |
| }; |
| |
| &i2c1 { |
| pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; |
| pinctrl-names = "default"; |
| status = "okay"; |
| }; |
| |
| &rcc { |
| clocks = <&pll>; |
| clock-frequency = <DT_FREQ_M(240)>; |
| ahb-prescaler = <1>; |
| apb1-prescaler = <2>; |
| apb2-prescaler = <1>; |
| apb3-prescaler = <2>; |
| }; |
| |
| &lpuart1 { |
| pinctrl-0 = <&lpuart1_tx_pb6 &lpuart1_rx_pb7>; |
| pinctrl-names = "default"; |
| current-speed = <115200>; |
| status = "okay"; |
| }; |
| |
| &usart3 { |
| pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; |
| pinctrl-names = "default"; |
| current-speed = <115200>; |
| status = "okay"; |
| }; |
| |
| &spi1 { |
| pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pg9 &spi1_mosi_pb5>; |
| pinctrl-names = "default"; |
| cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| status = "okay"; |
| }; |
| |
| &timers3 { |
| st,prescaler = <10000>; |
| status = "okay"; |
| |
| pwm3: pwm { |
| status = "okay"; |
| pinctrl-0 = <&tim3_ch3_pb0>; |
| pinctrl-names = "default"; |
| }; |
| }; |
| |
| &rtc { |
| clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00200000>, |
| <&rcc STM32_SRC_LSE RTC_SEL(1)>; |
| status = "okay"; |
| }; |
| |
| &iwdg { |
| status = "okay"; |
| }; |
| |
| &gpdma1 { |
| status = "okay"; |
| }; |
| |
| &gpdma2 { |
| status = "okay"; |
| }; |
| |
| &dac1 { |
| /* outputs only on 2 pins and pa4 is reserved for VBUS_SENSE */ |
| pinctrl-0 = <&dac1_out2_pa5>; /* Zio D13 (on CN7) */ |
| pinctrl-names = "default"; |
| status = "okay"; |
| }; |
| |
| &adc1 { |
| clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000400>, |
| <&rcc STM32_SRC_HCLK ADCDAC_SEL(0)>; |
| pinctrl-0 = <&adc1_inp3_pa6 &adc1_inp15_pa3>; /* Zio A0, Zio D35 */ |
| pinctrl-names = "default"; |
| st,adc-clock-source = <ASYNC>; |
| st,adc-prescaler = <6>; |
| status = "okay"; |
| }; |
| |
| &fdcan1 { |
| pinctrl-0 = <&fdcan1_rx_pd0 &fdcan1_tx_pd1>; |
| pinctrl-names = "default"; |
| clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000200>, |
| <&rcc STM32_SRC_PLL1_Q FDCAN_SEL(1)>; |
| clk-divider = <2>; |
| status = "okay"; |
| }; |
| |
| &flash0 { |
| partitions { |
| compatible = "fixed-partitions"; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| |
| boot_partition: partition@0 { |
| label = "mcuboot"; |
| reg = <0x00000000 DT_SIZE_K(64)>; |
| }; |
| slot0_partition: partition@10000 { |
| label = "image-0"; |
| reg = <0x00010000 DT_SIZE_K(960)>; |
| }; |
| slot1_partition: partition@100000 { |
| label = "image-1"; |
| reg = <0x00100000 DT_SIZE_K(960)>; |
| }; |
| storage_partition: partition@1f0000 { |
| label = "storage"; |
| reg = <0x001f0000 DT_SIZE_K(64)>; |
| }; |
| }; |
| }; |
| |
| zephyr_udc0: &usb { |
| pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; |
| pinctrl-names = "default"; |
| status = "okay"; |
| }; |
| |
| &vref { |
| status = "okay"; |
| }; |
| |
| &vbat { |
| status = "okay"; |
| }; |
| |
| &clk_lsi { |
| status = "okay"; |
| }; |
| |
| stm32_lp_tick_source: &lptim4 { |
| clocks = <&rcc STM32_CLOCK_BUS_APB3 0x2000>, |
| <&rcc STM32_SRC_LSI LPTIM4_SEL(4)>; |
| status = "okay"; |
| }; |