Kconfig 10.6 KB
Newer Older
T
tanek liang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
mainmenu "RT-Thread Configuration"

config $BSP_DIR
    string
    option env="BSP_ROOT"
    default "."

config $RTT_DIR
    string
    option env="RTT_ROOT"
    default "../.."

config $PKGS_DIR
    string
    option env="PKGS_ROOT"
    default "packages"

18 19
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
T
tanek liang 已提交
20

21 22
config SOC_IMXRT1052
    bool 
23 24 25
    select ARCH_ARM_CORTEX_M7
    default y

26 27 28 29 30 31 32 33 34
# RT1050 board select!
choice
    prompt "RT1050 Board select"
    default BOARD_RT1050_EVK
    config BOARD_RT1050_EVK
        bool "RT1050_EVK"
    config BOARD_RT1050_FIRE
        bool "RT1050_FIRE"
endchoice
35

36
menu "RT1050 Bsp Config" 
37

38
menu "Select uart drivers"
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
    config RT_USING_UART1
        bool "Using uart1"
        select RT_USING_SERIAL
        default y 
    config RT_USING_UART2
        bool "Using uart2"
        select RT_USING_SERIAL
        default n 
    config RT_USING_UART3
        bool "Using uart3"
        select RT_USING_SERIAL
        default n 
    config RT_USING_UART4
        bool "Using uart4"
        select RT_USING_SERIAL
        default n 
    config RT_USING_UART5
        bool "Using uart5"
        select RT_USING_SERIAL
        default n 
    config RT_USING_UART6
        bool "Using uart6"
        select RT_USING_SERIAL
        default n 
    config RT_USING_UART7
        bool "Using uart7"
        select RT_USING_SERIAL
        default n 
    config RT_USING_UART8
        bool "Using uart8"
        select RT_USING_SERIAL
        default n 
endmenu

73
menu "Select spi bus and dev drivers"
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
    choice 
        prompt "SPI bus clock source"
        default LPSPI_CLK_SOURCE_FROM_PLL3PFD1

        config LPSPI_CLK_SOURCE_FROM_PLL3PFD1
            bool "PLL3PFD1"
        config LPSPI_CLK_SOURCE_FROM_PLL3PFD0
            bool "PLL3PFD0"
        config LPSPI_CLK_SOURCE_FROM_PLL2
            bool "PLL2"
        config LPSPI_CLK_SOURCE_FROM_PLL2PFD2
            bool "PLL2PFD2"
    endchoice
    config LPSPI_CLK_SOURCE
        int
        default 0 if LPSPI_CLK_SOURCE_FROM_PLL3PFD1
        default 1 if LPSPI_CLK_SOURCE_FROM_PLL3PFD0
        default 2 if LPSPI_CLK_SOURCE_FROM_PLL2
        default 3 if LPSPI_CLK_SOURCE_FROM_PLL2PFD2

    config LPSPI_CLK_SOURCE_DIVIDER
        int "SPI bus clock source divider"
B
balanceTWK 已提交
96
        range 1 8
97
        default 8
98

99 100 101 102
    config RT_USING_SPIBUS1
        bool "Using spi1 bus"
        select RT_USING_SPI
        default n 
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
    choice
        prompt "spi1 bus sck io choice"
        default LPSPI1_SCK_GPIO_1
        depends on RT_USING_SPIBUS1
        config LPSPI1_SCK_GPIO_1
            bool "GPIO_EMC_27"
        config LPSPI1_SCK_GPIO_2
            bool "GPIO_SD_B0_00"
    endchoice
    choice
        prompt "spi1 bus sdo io choice"
        default LPSPI1_SDO_GPIO_1
        depends on RT_USING_SPIBUS1
        config LPSPI1_SDO_GPIO_1
            bool "GPIO_EMC_28"
        config LPSPI1_SDO_GPIO_2
            bool "GPIO_SD_B0_02"
    endchoice
    choice
        prompt "spi1 bus sdi io choice"
        default LPSPI1_SDI_GPIO_1
        depends on RT_USING_SPIBUS1
        config LPSPI1_SDI_GPIO_1
            bool "GPIO_EMC_29"
        config LPSPI1_SDI_GPIO_2
            bool "GPIO_SD_B0_03"
    endchoice

131 132 133 134
    config RT_USING_SPIBUS2
        bool "Using spi2 bus"
        select RT_USING_SPI
        default n 
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
    choice
        prompt "spi2 bus sck io choice"
        default LPSPI2_SCK_GPIO_1
        depends on RT_USING_SPIBUS2
        config LPSPI2_SCK_GPIO_1
            bool "GPIO_SD_B1_07"
        config LPSPI2_SCK_GPIO_2
            bool "GPIO_EMC_00"
    endchoice
    choice
        prompt "spi2 bus sdo io choice"
        default LPSPI2_SDO_GPIO_1
        depends on RT_USING_SPIBUS2
        config LPSPI2_SDO_GPIO_1
            bool "GPIO_SD_B1_08"
        config LPSPI2_SDO_GPIO_2
            bool "GPIO_EMC_02"
    endchoice
    choice
        prompt "spi2 bus sdi io choice"
        default LPSPI2_SDI_GPIO_1
        depends on RT_USING_SPIBUS2
        config LPSPI2_SDI_GPIO_1
            bool "GPIO_SD_B1_09"
        config LPSPI2_SDI_GPIO_2
            bool "GPIO_EMC_03"
    endchoice

163 164 165 166
    config RT_USING_SPIBUS3
        bool "Using spi3 bus"
        select RT_USING_SPI
        default n 
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
    choice
        prompt "spi3 bus sck io choice"
        default LPSPI3_SCK_GPIO_1
        depends on RT_USING_SPIBUS3
        config LPSPI3_SCK_GPIO_1
            bool "GPIO_AD_B1_15"
        config LPSPI3_SCK_GPIO_2
            bool "GPIO_AD_B0_00"
    endchoice
    choice
        prompt "spi3 bus sdo io choice"
        default LPSPI3_SDO_GPIO_1
        depends on RT_USING_SPIBUS3
        config LPSPI3_SDO_GPIO_1
            bool "GPIO_AD_B1_14"
        config LPSPI3_SDO_GPIO_2
            bool "GPIO_AD_B0_01"
    endchoice
    choice
        prompt "spi3 bus sdi io choice"
        default LPSPI3_SDI_GPIO_1
        depends on RT_USING_SPIBUS3
        config LPSPI3_SDI_GPIO_1
            bool "GPIO_AD_B1_13"
        config LPSPI3_SDI_GPIO_2
            bool "GPIO_AD_B0_02"
    endchoice

195 196 197 198
    config RT_USING_SPIBUS4
        bool "Using spi4 bus"
        select RT_USING_SPI
        default y 
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
    choice
        prompt "spi4 bus sck io choice"
        default LPSPI4_SCK_GPIO_1
        depends on RT_USING_SPIBUS4
        config LPSPI4_SCK_GPIO_1
            bool "GPIO_B0_03"
        config LPSPI4_SCK_GPIO_2
            bool "GPIO_B1_07"
    endchoice
    choice
        prompt "spi4 bus sdo io choice"
        default LPSPI4_SDO_GPIO_1
        depends on RT_USING_SPIBUS4
        config LPSPI4_SDO_GPIO_1
            bool "GPIO_B0_02"
        config LPSPI4_SDO_GPIO_2
            bool "GPIO_B1_06"
    endchoice
    choice
        prompt "spi4 bus sdi io choice"
        default LPSPI4_SDI_GPIO_1
        depends on RT_USING_SPIBUS4
        config LPSPI4_SDI_GPIO_1
            bool "GPIO_B0_01"
        config LPSPI4_SDI_GPIO_2
            bool "GPIO_B1_05"
    endchoice
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

    config RT_USING_SPI_FLASH
        bool "Using spi flash with sfud"
        default n 
        select RT_USING_SPI
        select RT_USING_SFUD
        select RT_USING_PIN
    choice 
        prompt "SPI flash using spibus"
        default SPI_FLASH_USING_SPIBUS4
        depends on RT_USING_SPI_FLASH

        config SPI_FLASH_USING_SPIBUS1
            bool "spi1"
            select RT_USING_SPIBUS1
        config SPI_FLASH_USING_SPIBUS2
            bool "spi2"
            select RT_USING_SPIBUS2
        config SPI_FLASH_USING_SPIBUS3
            bool "spi3"
            select RT_USING_SPIBUS3
        config SPI_FLASH_USING_SPIBUS4
            bool "spi4"
            select RT_USING_SPIBUS4
    endchoice
    config SPI_FLASH_USING_SPIBUS_NAME
        string
        default "spi1" if SPI_FLASH_USING_SPIBUS1
        default "spi2" if SPI_FLASH_USING_SPIBUS2
        default "spi3" if SPI_FLASH_USING_SPIBUS3
        default "spi4" if SPI_FLASH_USING_SPIBUS4

    config SPI_FLASH_NAME
        string "SPI flash device name"
        default "flash0" 
        depends on RT_USING_SPI_FLASH

    config SPI_FLASH_USING_CS_PIN
        int "SPI flash cs pin index"
        default 79 
        range 1 127
        depends on RT_USING_SPI_FLASH
268 269
endmenu

270
menu "Select i2c bus drivers"
B
balanceTWK 已提交
271 272 273 274 275

    config LPI2C_CLOCK_SOURCE_DIVIDER
        int "lpi2c bus clock source divider"
        range 1 64
        default 4
276
        
B
balanceTWK 已提交
277 278 279
    config RT_USING_I2C1
        bool "USING I2C1"
        select RT_USING_I2C
280
        default y 
281 282 283 284
        if RT_USING_I2C1
        config RT_USING_I2C1_BITOPS
        select RT_USING_I2C_BITOPS
        default n
B
balanceTWK 已提交
285
        bool "using simulate I2C1"
286
        endif
B
balanceTWK 已提交
287 288 289 290 291

    config RT_USING_I2C2
        bool "USING I2C2"
        select RT_USING_I2C
        default n 
292 293 294 295
        if RT_USING_I2C2
        config RT_USING_I2C2_BITOPS
        select RT_USING_I2C_BITOPS
        default n
B
balanceTWK 已提交
296
        bool "using simulate I2C2"
297
        endif
B
balanceTWK 已提交
298 299 300 301 302

    config RT_USING_I2C3
        bool "USING I2C3"
        select RT_USING_I2C
        default n 
303 304 305 306
        if RT_USING_I2C3
        config RT_USING_I2C3_BITOPS
        select RT_USING_I2C_BITOPS
        default n
B
balanceTWK 已提交
307
        bool "using simulate I2C3"
308
        endif
B
balanceTWK 已提交
309 310 311 312 313

    config RT_USING_I2C4
        bool "USING I2C4"
        select RT_USING_I2C
        default n 
314 315 316 317
        if RT_USING_I2C4
        config RT_USING_I2C4_BITOPS
        select RT_USING_I2C_BITOPS
        default n
B
balanceTWK 已提交
318
        bool "using simulate I2C4"
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
        endif
endmenu

menu "Select lcd driver"
    if RT_USING_LCD && BOARD_RT1050_EVK
    comment "Notice: Evk Board para: 480*272 4 4 8 2 40 10 106 45" 
    endif

    if RT_USING_LCD && BOARD_RT1050_FIRE
    comment "Notice: Fire Board para: 800*480 4 4 8 2 40 10 58 45" 
    endif

    config RT_USING_LCD
        bool "Using lcd"
        default n 

    config LCD_WIDTH
        int "Width pixel num"
        default 480 if BOARD_RT1050_EVK
        default 800 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_HEIGHT
        int "Height pixel num" 
        default 272 if BOARD_RT1050_EVK
        default 480 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_HFP
        int "HFP"
        default 4 if BOARD_RT1050_EVK
        default 4 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_VFP
        int "VFP"
        default 4 if BOARD_RT1050_EVK
        default 4 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_HBP
        int "HBP"
        default 8 if BOARD_RT1050_EVK
        default 8 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_VBP
        int "VBP"
        default 2 if BOARD_RT1050_EVK
        default 2 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_HSW
        int "HSW"
        default 40 if BOARD_RT1050_EVK
        default 40 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD
    config LCD_VSW
        int "VSW"
        default 10 if BOARD_RT1050_EVK
        default 10 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD 
    config LCD_BL_PIN
        int "Backlight pin index"
        default 106 if BOARD_RT1050_EVK
        default 58  if BOARD_RT1050_FIRE
        depends on RT_USING_LCD 
    config LCD_RST_PIN
        int "Reset pin index"
        default 45 if BOARD_RT1050_EVK
        default 45 if BOARD_RT1050_FIRE
        depends on RT_USING_LCD 
B
balanceTWK 已提交
385 386
endmenu

387
#menu "Select SDRAM driver"
388 389 390 391 392
    config RT_USING_SDRAM
        bool "Using sdram"
        default y 
#endmenu

393
#menu "Select RTC driver"
394 395 396 397 398
    config RT_USING_RTC_HP
        bool "Using hp rtc"
        select RT_USING_RTC
        default n 
#endmenu
399

400
if BOARD_RT1050_EVK
401 402 403 404 405 406 407 408 409 410 411
if RT_USING_USB_DEVICE
    choice
        prompt "select usb device controller"
        default RT_USING_EHCI0_AS_DEVICE

        config RT_USING_EHCI0_AS_DEVICE
            bool "set EHCI0 as device"
        config RT_USING_EHCI1_AS_DEVICE
            bool "set EHCI1 as device"
    endchoice
endif
412
endif
413

414
endmenu