.. | .. |
---|
49 | 49 | #include "stm32f429.dtsi" |
---|
50 | 50 | #include "stm32f429-pinctrl.dtsi" |
---|
51 | 51 | #include <dt-bindings/input/input.h> |
---|
| 52 | +#include <dt-bindings/interrupt-controller/irq.h> |
---|
| 53 | +#include <dt-bindings/gpio/gpio.h> |
---|
52 | 54 | |
---|
53 | 55 | / { |
---|
54 | 56 | model = "STMicroelectronics STM32F429i-DISCO board"; |
---|
.. | .. |
---|
59 | 61 | stdout-path = "serial0:115200n8"; |
---|
60 | 62 | }; |
---|
61 | 63 | |
---|
62 | | - memory { |
---|
| 64 | + memory@90000000 { |
---|
| 65 | + device_type = "memory"; |
---|
63 | 66 | reg = <0x90000000 0x800000>; |
---|
64 | 67 | }; |
---|
65 | 68 | |
---|
.. | .. |
---|
69 | 72 | |
---|
70 | 73 | leds { |
---|
71 | 74 | compatible = "gpio-leds"; |
---|
72 | | - red { |
---|
| 75 | + led-red { |
---|
73 | 76 | gpios = <&gpiog 14 0>; |
---|
74 | 77 | }; |
---|
75 | | - green { |
---|
| 78 | + led-green { |
---|
76 | 79 | gpios = <&gpiog 13 0>; |
---|
77 | 80 | linux,default-trigger = "heartbeat"; |
---|
78 | 81 | }; |
---|
.. | .. |
---|
105 | 108 | status = "okay"; |
---|
106 | 109 | }; |
---|
107 | 110 | |
---|
| 111 | +&i2c3 { |
---|
| 112 | + pinctrl-names = "default"; |
---|
| 113 | + pinctrl-0 = <&i2c3_pins>; |
---|
| 114 | + clock-frequency = <100000>; |
---|
| 115 | + status = "okay"; |
---|
| 116 | + |
---|
| 117 | + stmpe811@41 { |
---|
| 118 | + compatible = "st,stmpe811"; |
---|
| 119 | + reg = <0x41>; |
---|
| 120 | + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; |
---|
| 121 | + interrupt-parent = <&gpioa>; |
---|
| 122 | + /* 3.25 MHz ADC clock speed */ |
---|
| 123 | + st,adc-freq = <1>; |
---|
| 124 | + /* 12-bit ADC */ |
---|
| 125 | + st,mod-12b = <1>; |
---|
| 126 | + /* internal ADC reference */ |
---|
| 127 | + st,ref-sel = <0>; |
---|
| 128 | + /* ADC converstion time: 80 clocks */ |
---|
| 129 | + st,sample-time = <4>; |
---|
| 130 | + |
---|
| 131 | + stmpe_touchscreen { |
---|
| 132 | + compatible = "st,stmpe-ts"; |
---|
| 133 | + /* 8 sample average control */ |
---|
| 134 | + st,ave-ctrl = <3>; |
---|
| 135 | + /* 7 length fractional part in z */ |
---|
| 136 | + st,fraction-z = <7>; |
---|
| 137 | + /* |
---|
| 138 | + * 50 mA typical 80 mA max touchscreen drivers |
---|
| 139 | + * current limit value |
---|
| 140 | + */ |
---|
| 141 | + st,i-drive = <1>; |
---|
| 142 | + /* 1 ms panel driver settling time */ |
---|
| 143 | + st,settling = <3>; |
---|
| 144 | + /* 5 ms touch detect interrupt delay */ |
---|
| 145 | + st,touch-det-delay = <5>; |
---|
| 146 | + }; |
---|
| 147 | + |
---|
| 148 | + stmpe_adc { |
---|
| 149 | + compatible = "st,stmpe-adc"; |
---|
| 150 | + /* forbid to use ADC channels 3-0 (touch) */ |
---|
| 151 | + st,norequest-mask = <0x0F>; |
---|
| 152 | + }; |
---|
| 153 | + }; |
---|
| 154 | +}; |
---|
| 155 | + |
---|
| 156 | +<dc { |
---|
| 157 | + status = "okay"; |
---|
| 158 | + pinctrl-0 = <<dc_pins_b>; |
---|
| 159 | + pinctrl-names = "default"; |
---|
| 160 | + |
---|
| 161 | + port { |
---|
| 162 | + ltdc_out_rgb: endpoint { |
---|
| 163 | + remote-endpoint = <&panel_in_rgb>; |
---|
| 164 | + }; |
---|
| 165 | + }; |
---|
| 166 | +}; |
---|
| 167 | + |
---|
108 | 168 | &rtc { |
---|
109 | 169 | assigned-clocks = <&rcc 1 CLK_RTC>; |
---|
110 | 170 | assigned-clock-parents = <&rcc 1 CLK_LSI>; |
---|
111 | 171 | status = "okay"; |
---|
112 | 172 | }; |
---|
113 | 173 | |
---|
| 174 | +&spi5 { |
---|
| 175 | + status = "okay"; |
---|
| 176 | + pinctrl-0 = <&spi5_pins>; |
---|
| 177 | + pinctrl-names = "default"; |
---|
| 178 | + #address-cells = <1>; |
---|
| 179 | + #size-cells = <0>; |
---|
| 180 | + cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>, <&gpioc 2 GPIO_ACTIVE_LOW>; |
---|
| 181 | + |
---|
| 182 | + l3gd20: l3gd20@0 { |
---|
| 183 | + compatible = "st,l3gd20-gyro"; |
---|
| 184 | + spi-max-frequency = <10000000>; |
---|
| 185 | + st,drdy-int-pin = <2>; |
---|
| 186 | + interrupt-parent = <&gpioa>; |
---|
| 187 | + interrupts = <1 IRQ_TYPE_EDGE_RISING>, |
---|
| 188 | + <2 IRQ_TYPE_EDGE_RISING>; |
---|
| 189 | + reg = <0>; |
---|
| 190 | + status = "okay"; |
---|
| 191 | + }; |
---|
| 192 | + |
---|
| 193 | + display: display@1{ |
---|
| 194 | + /* Connect panel-ilitek-9341 to ltdc */ |
---|
| 195 | + compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341"; |
---|
| 196 | + reg = <1>; |
---|
| 197 | + spi-3wire; |
---|
| 198 | + spi-max-frequency = <10000000>; |
---|
| 199 | + dc-gpios = <&gpiod 13 0>; |
---|
| 200 | + port { |
---|
| 201 | + panel_in_rgb: endpoint { |
---|
| 202 | + remote-endpoint = <<dc_out_rgb>; |
---|
| 203 | + }; |
---|
| 204 | + }; |
---|
| 205 | + }; |
---|
| 206 | +}; |
---|
| 207 | + |
---|
114 | 208 | &usart1 { |
---|
115 | 209 | pinctrl-0 = <&usart1_pins_a>; |
---|
116 | 210 | pinctrl-names = "default"; |
---|