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