summaryrefslogtreecommitdiff
path: root/bsp/synwit/swm341-mini/board/Kconfig
blob: 17bbcdfd84f49aeafe979bf97416ccaf2bde5033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
menu "Hardware Drivers Config"

config SOC_SWM341
    bool
    select ARCH_ARM_CORTEX_M33
    select RT_USING_COMPONENTS_INIT
    select RT_USING_USER_MAIN
    default y

menu "On-chip Peripheral Drivers"

    menuconfig BSP_USING_UART
        bool "Enable UART"
        default y
        select RT_USING_SERIAL
        if BSP_USING_UART
            config BSP_USING_UART0
                bool "Enable UART0 (M0/RX,M1/TX)"
                default y
            config BSP_USING_UART1
                bool "Enable UART1 (D4/RX,D3/TX)"
                default n
            config BSP_USING_UART2
                bool "Enable UART2 (C1/RX,C0/TX)"
                default n
            config BSP_USING_UART3
                bool "Enable UART3 (C2/RX,C3/TX)"
                default n
        endif

    config BSP_USING_GPIO
        bool "Enable GPIO"
        select RT_USING_PIN
        default y

    menuconfig BSP_USING_ADC
        bool "Enable ADC"
        default n
        select RT_USING_ADC
        if BSP_USING_ADC
            config BSP_USING_ADC0
                bool "Enable ADC0"
                default n
                if BSP_USING_ADC0
                    config BSP_USING_ADC0_CHN0
                        bool "Enable ADC0_CHN0(C6)"
                        default n
                    config BSP_USING_ADC0_CHN1
                        bool "Enable ADC0_CHN1(C5)"
                        default n
                    config BSP_USING_ADC0_CHN2
                        bool "Enable ADC0_CHN2(C4)"
                        default n
                    config BSP_USING_ADC0_CHN3
                        bool "Enable ADC0_CHN3(C3)"
                        default n
                    config BSP_USING_ADC0_CHN4
                        bool "Enable ADC0_CHN4(C2)"
                        default n
                    config BSP_USING_ADC0_CHN5
                        bool "Enable ADC0_CHN5(C1)"
                        default n
                    config BSP_USING_ADC0_CHN6
                        bool "Enable ADC0_CHN6(C0)"
                        default n
                    config BSP_USING_ADC0_CHN7
                        bool "Enable ADC0_CHN7(A15)"
                        default n
          config BSP_USING_ADC0_CHN8
                        bool "Enable ADC0_CHN8(A14)"
                        default n
          config BSP_USING_ADC0_CHN9
                        bool "Enable ADC0_CHN9(A13)"
                        default n
          config BSP_USING_ADC0_CHN10
                        bool "Enable ADC0_CHN10(A12)"
                        default n
          config BSP_USING_ADC0_CHN11
                        bool "Enable ADC0_CHN11(A10)"
                        default n
                endif
            config BSP_USING_ADC1
                bool "Enable ADC1"
                default n
                if BSP_USING_ADC1
                    config BSP_USING_ADC1_CHN0
                        bool "Enable ADC1_CHN0(D1)"
                        default n
                    config BSP_USING_ADC1_CHN1
                        bool "Enable ADC1_CHN1(D0)"
                        default n
                    config BSP_USING_ADC1_CHN2
                        bool "Enable ADC1_CHN2(C13)"
                        default n
                    config BSP_USING_ADC1_CHN3
                        bool "Enable ADC1_CHN3(C12)"
                        default n
                    config BSP_USING_ADC1_CHN4
                        bool "Enable ADC1_CHN4(C11)"
                        default n
                    config BSP_USING_ADC1_CHN5
                        bool "Enable ADC1_CHN5(C10)"
                        default n
                    config BSP_USING_ADC1_CHN6
                        bool "Enable ADC1_CHN6(C9)"
                        default n
                endif
        endif

    config BSP_USING_DAC
        bool "Enable DAC"
        select RT_USING_DAC
        default n

    menuconfig BSP_USING_CAN
        bool "Enable CAN"
        default n
        select RT_USING_CAN
        if BSP_USING_CAN
            config BSP_USING_CAN0
                bool "Enable CAN0(TX/B4,RX/B5)"
                default n
            config BSP_USING_CAN1
                bool "Enable CAN1(TX/B2,RX/B3)"
                default n
        endif

    menuconfig BSP_USING_TIM
        bool "Enable CLOCK_TIMER"
        default n
        select RT_USING_CLOCK_TIME
        if BSP_USING_TIM
            config BSP_USING_TIM0
                bool "Enable TIM0"
                default n
            config BSP_USING_TIM1
                bool "Enable TIM1"
                default n
            config BSP_USING_TIM2
                bool "Enable TIM2"
                default n
            config BSP_USING_TIM3
                bool "Enable TIM3"
                default n
            config BSP_USING_TIM4
                bool "Enable TIM4"
                default n

            config BSP_USING_BTIM0
                bool "Enable BTIM0"
                default n
            config BSP_USING_BTIM1
                bool "Enable BTIM1"
                default n
            config BSP_USING_BTIM2
                bool "Enable BTIM2"
                default n
            config BSP_USING_BTIM3
                bool "Enable BTIM3"
                default n
            config BSP_USING_BTIM4
                bool "Enable BTIM4"
                default n
            config BSP_USING_BTIM5
                bool "Enable BTIM5"
                default n
            config BSP_USING_BTIM6
                bool "Enable BTIM6"
                default n
            config BSP_USING_BTIM7
                bool "Enable BTIM7"
                default n
            config BSP_USING_BTIM8
                bool "Enable BTIM8"
                default n
            config BSP_USING_BTIM9
                bool "Enable BTIM9"
                default n
            config BSP_USING_BTIM10
                bool "Enable BTIM10"
                default n
            config BSP_USING_BTIM11
                bool "Enable BTIM11"
                default n
        endif

    menuconfig BSP_USING_SOFT_I2C
        bool "Enable software I2C (swi2c)"
        default n
        select RT_USING_I2C
        select RT_USING_SOFT_I2C
        if BSP_USING_SOFT_I2C
        menuconfig BSP_USING_SOFT_I2C0
            bool "Enable software I2C0 Bus (swi2c0)"
            default n
            select RT_USING_SOFT_I2C0
            if BSP_USING_SOFT_I2C0
                config RT_SOFT_I2C0_SCL_PIN
                    int "swi2c0 SCL pin number"
                    default 1
                config RT_SOFT_I2C0_SDA_PIN
                    int "swi2c0 SDA pin number"
                    default 0
            endif

        menuconfig BSP_USING_SOFT_I2C1
            bool "Enable software I2C1 Bus (swi2c1)"
            default n
            select RT_USING_SOFT_I2C1
            if BSP_USING_SOFT_I2C1
                config RT_SOFT_I2C1_SCL_PIN
                    int "swi2c1 SCL pin number"
                    default 37
                config RT_SOFT_I2C1_SDA_PIN
                    int "swi2c1 SDA pin number"
                    default 36
            endif
        endif
    menuconfig BSP_USING_PWM
        bool "Enable PWM"
        default n
        select RT_USING_PWM
        if BSP_USING_PWM
        comment "Notice: PWMA,PWMAN,PWMB,PWMBN are all channel0,the performance is the same"
        config BSP_USING_PWM0
            bool "Enable PWM0"
            default n
            if BSP_USING_PWM0
                config BSP_USING_PWM0A
                    bool "Enable PWM0A (M1)"
                    default n
                config BSP_USING_PWM0AN
                    bool "Enable PWM0AN (M4)"
                    default n
                config BSP_USING_PWM0B
                    bool "Enable PWM0B (M2)"
                    default n
                config BSP_USING_PWM0BN
                    bool "Enable PWM0BN (M5)"
                    default n
            endif
        config BSP_USING_PWM1
            bool "Enable PWM1"
            default n
            if BSP_USING_PWM1
                config BSP_USING_PWM1A
                    bool "Enable PWM1A (M3)"
                    default n
                config BSP_USING_PWM1AN
                    bool "Enable PWM1AN (M6)"
                    default n
                config BSP_USING_PWM1B
                    bool "Enable PWM1B (D9)"
                    default n
                config BSP_USING_PWM1BN
                    bool "Enable PWM1BN (D8)"
                    default n
            endif
        config BSP_USING_PWM2
            bool "Enable PWM2"
            default n
            if BSP_USING_PWM2
                config BSP_USING_PWM2A
                    bool "Enable PWM2A (M12)"
                    default n
                config BSP_USING_PWM2AN
                    bool "Enable PWM2AN (M9)"
                    default n
                config BSP_USING_PWM2B
                    bool "Enable PWM2B (M11)"
                    default n
                config BSP_USING_PWM2BN
                    bool "Enable PWM2BN (M8)"
                    default n
            endif
        config BSP_USING_PWM3
            bool "Enable PWM3"
            default n
            if BSP_USING_PWM3
                config BSP_USING_PWM3A
                    bool "Enable PWM3A (C2)"
                    default n
                config BSP_USING_PWM3AN
                    bool "Enable PWM3AN (C3)"
                    default n
                config BSP_USING_PWM3B
                    bool "Enable PWM3B (B1)"
                    default n
                config BSP_USING_PWM3BN
                    bool "Enable PWM3BN (B0)"
                    default n
            endif
        config BSP_USING_PWM4
            bool "Enable PWM4"
            default n
            if BSP_USING_PWM4
                config BSP_USING_PWM4A
                    bool "Enable PWM4A (B15)"
                    default n
                config BSP_USING_PWM4AN
                    bool "Enable PWM4AN (B14) NOTICE:SWDIO"
                    default n
                config BSP_USING_PWM4B
                    bool "Enable PWM4B (B13)"
                    default n
                config BSP_USING_PWM4BN
                    bool "Enable PWM4BN (B12) NOTICE:SWDCK"
                    default n
            endif
        endif

    config BSP_USING_RTC
        bool "Enable RTC"
        select RT_USING_RTC
        default n

    menuconfig BSP_USING_SPI
        bool "Enable SPI BUS"
        default n
        select RT_USING_SPI
        if BSP_USING_SPI
            config BSP_USING_SPI0
                bool "Enable SPI0 BUS(CS/M3,MISO/M4,MOSI/M5,CLK/M2)"
                default n
            config BSP_USING_SPI1
                bool "Enable SPI1 BUS(CS/B5,MISO/B3,MOSI/B4,CLK/B2)"
                default n
        endif

    config BSP_USING_WDT
        bool "Enable Watchdog Timer"
        select RT_USING_WDT
        default n

    config BSP_USING_CRC
        bool "Enable CRC"
        select RT_USING_HWCRYPTO
        select RT_HWCRYPTO_USING_CRC
        default n
    config BSP_USING_RNG
        bool "Enable RNG  (Random Number Generator)"
        select RT_USING_HWCRYPTO
        select RT_HWCRYPTO_USING_RNG
        default n

    config BSP_USING_SDIO
        bool "Enable SDCARD (sdio)"
        select RT_USING_SDIO
        select RT_USING_DFS
        select RT_USING_DFS_ELMFAT
        default n

    menuconfig BSP_USING_SDRAM
        bool "Enable SDRAM"
        select RT_USING_MEMHEAP
        select RT_USING_MEMHEAP_AS_HEAP
        select RT_USING_MEMHEAP_AUTO_BINDING
        default n
        if BSP_USING_SDRAM
            config BSP_SDRAM_SIZE
            hex "SDRAM size"
            default 0x800000
        endif

    menuconfig BSP_USING_GT9147
        bool "Enable gt9147(use swi2c0)"
        select RT_USING_TOUCH
        select RT_TOUCH_PIN_IRQ
        select RT_USING_I2C
        select BSP_USING_SOFT_I2C
        select BSP_USING_SOFT_I2C0
        select PKG_USING_GT9147
        select PKG_USING_GT9147_LATEST_VERSION
        default n
        if BSP_USING_GT9147
            config GT9147_RST_PIN
                int "GT9147 rst pin number"
                range 0 111
                default 39
            config GT9147_IRQ_PIN
                int "GT9147 irq pin number"
                range 0 111
                default 48
        endif
    menuconfig BSP_USING_RGB_LCD
        bool "Enable RGB LCD"
        select BSP_USING_SDRAM
        default n
        if BSP_USING_RGB_LCD
            config BSP_USING_LVGL
                bool "Enable LVGL for LCD"
                select PKG_USING_LVGL
                default n
        endif

    config RT_SOFT_I2C0_HAS_PIN_DEFAULT
        bool
        default y if RT_USING_SOFT_I2C0

    config RT_SOFT_I2C0_SCL_PIN_DEFAULT
        int
        default 1 if RT_USING_SOFT_I2C0

    config RT_SOFT_I2C0_SDA_PIN_DEFAULT
        int
        default 0 if RT_USING_SOFT_I2C0

endmenu

menu "Onboard Peripheral Drivers"

endmenu

menu "Offboard Peripheral Drivers"

endmenu

    config RT_SOFT_I2C1_HAS_PIN_DEFAULT
        bool
        default y if RT_USING_SOFT_I2C1

    config RT_SOFT_I2C1_SCL_PIN_DEFAULT
        int
        default 37 if RT_USING_SOFT_I2C1

    config RT_SOFT_I2C1_SDA_PIN_DEFAULT
        int
        default 36 if RT_USING_SOFT_I2C1

endmenu