You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/10/03 20:01:40 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #1933: Add support to PSRAM using SPIRAM interface

Ouss4 commented on a change in pull request #1933:
URL: https://github.com/apache/incubator-nuttx/pull/1933#discussion_r499177166



##########
File path: arch/xtensa/src/esp32/Kconfig
##########
@@ -497,6 +517,114 @@ config ESP32_SPIFLASH_DEBUG
 
 endmenu # ESP32_SPIFLASH
 
+menu "SPI RAM Config"
+	depends on ESP32_SPIRAM
+
+choice SPIRAM_TYPE

Review comment:
       Please add ESP32_ prefix to these configs.

##########
File path: arch/xtensa/src/esp32/Kconfig
##########
@@ -497,6 +517,114 @@ config ESP32_SPIFLASH_DEBUG
 
 endmenu # ESP32_SPIFLASH
 
+menu "SPI RAM Config"
+	depends on ESP32_SPIRAM
+
+choice SPIRAM_TYPE
+	prompt "Type of SPI RAM chip in use"
+	default SPIRAM_TYPE_AUTO
+
+config SPIRAM_TYPE_AUTO
+	bool "Auto-detect"
+
+config SPIRAM_TYPE_ESPPSRAM32
+	bool "ESP-PSRAM32 or IS25WP032"
+
+config SPIRAM_TYPE_ESPPSRAM64
+	bool "ESP-PSRAM64 or LY68L6400"
+endchoice #SPIRAM_TYPE
+
+config SPIRAM_SIZE
+	int
+	default -1 if SPIRAM_TYPE_AUTO
+	default 4194304 if SPIRAM_TYPE_ESPPSRAM32
+	default 8388608 if SPIRAM_TYPE_ESPPSRAM64
+	default 0
+
+choice SPIRAM_SPEED
+	prompt "Set RAM clock speed"
+	default SPIRAM_SPEED_40M
+	help
+	    Select the speed for the SPI RAM chip.
+
+config SPIRAM_SPEED_40M
+	bool "40MHz clock speed"
+
+config SPIRAM_SPEED_80M
+	bool "80MHz clock speed"
+
+endchoice # SPIRAM_SPEED
+
+config SPIRAM_BOOT_INIT
+	bool "Initialize SPI RAM during startup"
+	default "y"
+	help
+	    If this is enabled, the SPI RAM will be enabled during initial
+	    boot. Unless you have specific requirements, you'll want to leave
+	    this enabled so memory allocated during boot-up can also be
+	    placed in SPI RAM.
+
+config SPIRAM_IGNORE_NOTFOUND
+	bool "Ignore PSRAM when not found"
+	default "n"
+	depends on SPIRAM_BOOT_INIT && !BOOT_SDRAM_DATA
+	help
+	    Normally, if psram initialization is enabled during compile time
+	    but not found at runtime, it is seen as an error making the CPU
+	    panic. If this is enabled, booting will complete but no PSRAM
+	    will be available.
+
+choice SPIRAM_USE
+	prompt "SPI RAM access method"
+	default SPIRAM_USE_MALLOC
+	help
+	    The SPI RAM can be accessed in multiple methods: by just having
+	    it available as an unmanaged memory region in the CPU's memory
+	    map, by integrating it in the heap as 'special' memory needing
+	    heap_caps_malloc to allocate, or by fully integrating it making
+	    malloc() also able to return SPI RAM pointers.
+
+config SPIRAM_USE_MEMMAP
+	bool "Integrate RAM into memory map"
+
+config SPIRAM_USE_CAPS_ALLOC
+	bool "Make RAM allocatable using heap_caps_malloc(..., MALLOC_CAP_SPIRAM)"

Review comment:
       I don't think this is used.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org