Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR X11 |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 2 | /* |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 3 | * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com> |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 4 | * |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
| 8 | #include "stm32f746.dtsi" |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 9 | #include "stm32f746-pinctrl.dtsi" |
| 10 | #include <dt-bindings/input/input.h> |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 11 | #include <dt-bindings/interrupt-controller/irq.h> |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 12 | |
| 13 | / { |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 14 | model = "STMicroelectronics STM32746g-EVAL board"; |
| 15 | compatible = "st,stm32746g-eval", "st,stm32f746"; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 16 | |
| 17 | chosen { |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 18 | bootargs = "root=/dev/ram"; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 19 | stdout-path = "serial0:115200n8"; |
| 20 | }; |
| 21 | |
Patrice Chotard | 61c88ac | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 22 | memory@c0000000 { |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 23 | device_type = "memory"; |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 24 | reg = <0xc0000000 0x2000000>; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | aliases { |
| 28 | serial0 = &usart1; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 29 | }; |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 30 | |
| 31 | leds { |
| 32 | compatible = "gpio-leds"; |
Patrice Chotard | 61c88ac | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 33 | led-green { |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 34 | gpios = <&gpiof 10 1>; |
| 35 | linux,default-trigger = "heartbeat"; |
| 36 | }; |
Patrice Chotard | 61c88ac | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 37 | led-orange { |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 38 | gpios = <&stmfx_pinctrl 17 1>; |
| 39 | }; |
Patrice Chotard | 61c88ac | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 40 | led-red { |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 41 | gpios = <&gpiob 7 1>; |
| 42 | }; |
Patrice Chotard | 61c88ac | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 43 | led-blue { |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 44 | gpios = <&stmfx_pinctrl 19 1>; |
| 45 | }; |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 46 | }; |
| 47 | |
Patrice Chotard | 9f603e2 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 48 | gpio-keys { |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 49 | compatible = "gpio-keys"; |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 50 | autorepeat; |
Patrice Chotard | 9f603e2 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 51 | button-0 { |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 52 | label = "Wake up"; |
| 53 | linux,code = <KEY_WAKEUP>; |
| 54 | gpios = <&gpioc 13 0>; |
| 55 | }; |
| 56 | }; |
| 57 | |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 58 | joystick { |
| 59 | compatible = "gpio-keys"; |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 60 | pinctrl-0 = <&joystick_pins>; |
| 61 | pinctrl-names = "default"; |
| 62 | button-0 { |
| 63 | label = "JoySel"; |
| 64 | linux,code = <KEY_ENTER>; |
| 65 | interrupt-parent = <&stmfx_pinctrl>; |
| 66 | interrupts = <0 IRQ_TYPE_EDGE_FALLING>; |
| 67 | }; |
| 68 | button-1 { |
| 69 | label = "JoyDown"; |
| 70 | linux,code = <KEY_DOWN>; |
| 71 | interrupt-parent = <&stmfx_pinctrl>; |
| 72 | interrupts = <1 IRQ_TYPE_EDGE_FALLING>; |
| 73 | }; |
| 74 | button-2 { |
| 75 | label = "JoyLeft"; |
| 76 | linux,code = <KEY_LEFT>; |
| 77 | interrupt-parent = <&stmfx_pinctrl>; |
| 78 | interrupts = <2 IRQ_TYPE_EDGE_FALLING>; |
| 79 | }; |
| 80 | button-3 { |
| 81 | label = "JoyRight"; |
| 82 | linux,code = <KEY_RIGHT>; |
| 83 | interrupt-parent = <&stmfx_pinctrl>; |
| 84 | interrupts = <3 IRQ_TYPE_EDGE_FALLING>; |
| 85 | }; |
| 86 | button-4 { |
| 87 | label = "JoyUp"; |
| 88 | linux,code = <KEY_UP>; |
| 89 | interrupt-parent = <&stmfx_pinctrl>; |
| 90 | interrupts = <4 IRQ_TYPE_EDGE_FALLING>; |
| 91 | }; |
| 92 | }; |
| 93 | |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 94 | usbotg_hs_phy: usb-phy { |
| 95 | #phy-cells = <0>; |
| 96 | compatible = "usb-nop-xceiv"; |
| 97 | clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>; |
| 98 | clock-names = "main_clk"; |
| 99 | }; |
| 100 | |
| 101 | mmc_vcard: mmc_vcard { |
| 102 | compatible = "regulator-fixed"; |
| 103 | regulator-name = "mmc_vcard"; |
| 104 | regulator-min-microvolt = <3300000>; |
| 105 | regulator-max-microvolt = <3300000>; |
| 106 | }; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | &clk_hse { |
| 110 | clock-frequency = <25000000>; |
| 111 | }; |
| 112 | |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 113 | &crc { |
| 114 | status = "okay"; |
| 115 | }; |
| 116 | |
| 117 | &i2c1 { |
| 118 | pinctrl-0 = <&i2c1_pins_b>; |
| 119 | pinctrl-names = "default"; |
| 120 | i2c-scl-rising-time-ns = <185>; |
| 121 | i2c-scl-falling-time-ns = <20>; |
| 122 | status = "okay"; |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 123 | |
| 124 | stmfx: stmfx@42 { |
| 125 | compatible = "st,stmfx-0300"; |
| 126 | reg = <0x42>; |
| 127 | interrupts = <8 IRQ_TYPE_EDGE_RISING>; |
| 128 | interrupt-parent = <&gpioi>; |
| 129 | |
Patrice Chotard | 61c88ac | 2020-11-06 08:11:58 +0100 | [diff] [blame] | 130 | stmfx_pinctrl: pinctrl { |
Patrick Delaunay | e07a86b | 2019-11-06 16:16:32 +0100 | [diff] [blame] | 131 | compatible = "st,stmfx-0300-pinctrl"; |
| 132 | gpio-controller; |
| 133 | #gpio-cells = <2>; |
| 134 | interrupt-controller; |
| 135 | #interrupt-cells = <2>; |
| 136 | gpio-ranges = <&stmfx_pinctrl 0 0 24>; |
| 137 | |
| 138 | joystick_pins: joystick { |
| 139 | pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; |
| 140 | drive-push-pull; |
| 141 | bias-pull-up; |
| 142 | }; |
| 143 | }; |
| 144 | }; |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 145 | }; |
| 146 | |
| 147 | &rtc { |
| 148 | status = "okay"; |
| 149 | }; |
| 150 | |
| 151 | &sdio1 { |
| 152 | status = "okay"; |
| 153 | vmmc-supply = <&mmc_vcard>; |
| 154 | broken-cd; |
| 155 | pinctrl-names = "default", "opendrain"; |
| 156 | pinctrl-0 = <&sdio_pins_a>; |
| 157 | pinctrl-1 = <&sdio_pins_od_a>; |
| 158 | bus-width = <4>; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 159 | }; |
| 160 | |
Patrice Chotard | 9f603e2 | 2022-09-23 13:20:33 +0200 | [diff] [blame] | 161 | &timers5 { |
| 162 | /* Override timer5 to act as clockevent */ |
| 163 | compatible = "st,stm32-timer"; |
| 164 | interrupts = <50>; |
| 165 | status = "okay"; |
| 166 | /delete-property/#address-cells; |
| 167 | /delete-property/#size-cells; |
| 168 | /delete-property/clock-names; |
| 169 | /delete-node/pwm; |
| 170 | /delete-node/timer@4; |
| 171 | }; |
| 172 | |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 173 | &usart1 { |
| 174 | pinctrl-0 = <&usart1_pins_a>; |
| 175 | pinctrl-names = "default"; |
| 176 | status = "okay"; |
| 177 | }; |
| 178 | |
Patrice Chotard | fe63d3c | 2019-02-19 16:49:05 +0100 | [diff] [blame] | 179 | &usbotg_hs { |
| 180 | dr_mode = "otg"; |
| 181 | phys = <&usbotg_hs_phy>; |
| 182 | phy-names = "usb2-phy"; |
| 183 | pinctrl-0 = <&usbotg_hs_pins_a>; |
| 184 | pinctrl-names = "default"; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 185 | status = "okay"; |
Patrice Chotard | d0d6451 | 2018-02-16 13:27:03 +0100 | [diff] [blame] | 186 | }; |