File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ menuconfig STM32_LTDC
8
8
default y
9
9
depends on DT_HAS_ST_STM32_LTDC_ENABLED
10
10
select USE_STM32_HAL_LTDC
11
+ select USE_STM32_HAL_RIF if SOC_SERIES_STM32N6X
11
12
select CACHE_MANAGEMENT if CPU_HAS_DCACHE
12
13
select PINCTRL
13
14
help
Original file line number Diff line number Diff line change @@ -311,6 +311,9 @@ static int stm32_ltdc_init(const struct device *dev)
311
311
int err ;
312
312
const struct display_stm32_ltdc_config * config = dev -> config ;
313
313
struct display_stm32_ltdc_data * data = dev -> data ;
314
+ #if defined(CONFIG_SOC_SERIES_STM32N6X )
315
+ RIMC_MasterConfig_t rimc = {0 };
316
+ #endif
314
317
315
318
/* Configure and set display on/off GPIO */
316
319
if (config -> disp_on_gpio .port ) {
@@ -436,6 +439,15 @@ static int stm32_ltdc_init(const struct device *dev)
436
439
return err ;
437
440
}
438
441
442
+ #if defined(CONFIG_SOC_SERIES_STM32N6X )
443
+ /* Configure RIF for LTDC layer 1 */
444
+ rimc .MasterCID = RIF_CID_1 ;
445
+ rimc .SecPriv = RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV ;
446
+ HAL_RIF_RIMC_ConfigMasterAttributes (RIF_MASTER_INDEX_LTDC1 , & rimc );
447
+ HAL_RIF_RISC_SetSlaveSecureAttributes (RIF_RISC_PERIPH_INDEX_LTDCL1 ,
448
+ RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV );
449
+ #endif
450
+
439
451
/* Disable layer 2, since it not used */
440
452
__HAL_LTDC_LAYER_DISABLE (& data -> hltdc , LTDC_LAYER_2 );
441
453
You can’t perform that action at this time.
0 commit comments