From 2be1153030523cecec5be952057bd5cdefa3c7ad Mon Sep 17 00:00:00 2001 From: Alin Jerpelea Date: Thu, 24 Oct 2019 14:26:02 +0000 Subject: [PATCH] Merged in alinjerpelea/nuttx (pull request #1061) boards: cxd56xx: spresense: cleanup and new defconfig * arch: cxd56xx: remove NVIC_SYSH redefinition The NVIC_SYSH is already defined in nvicpri.h Signed-off-by: Alin Jerpelea * boards: cxd56xx: spresense: configs: enable SPRESENSE_EXTENSION Enable high current mode for the Spresense Extension board on all examples that have SDCARD support Signed-off-by: Alin Jerpelea * boards: cxd56xx: spresense: ifdef SDCARD_TXS02612 The SD Card TXS02612 port expander is hosted on the Extension board and should not be enabled if the extension board is not prezent. Signed-off-by: Alin Jerpelea * boards: cxd56xx: spresense: configs: increase MQ_MAXMSGSIZE This change is needed by the display driver on spresense platform Signed-off-by: Alin Jerpelea * boards: cxd56xx: spresense: config: add lcd examples defconfig This is a configuration for the basic nx examples Signed-off-by: Alin Jerpelea Approved-by: Gregory Nutt --- arch/arm/include/cxd56xx/chip.h | 47 ------- boards/arm/cxd56xx/spresense/Kconfig | 2 + .../cxd56xx/spresense/configs/audio/defconfig | 1 + .../spresense/configs/camera/defconfig | 1 + .../spresense/configs/example_lcd/defconfig | 115 ++++++++++++++++++ .../cxd56xx/spresense/configs/lcd/defconfig | 3 +- .../cxd56xx/spresense/configs/lte/defconfig | 1 + .../cxd56xx/spresense/configs/mpy/defconfig | 1 + .../cxd56xx/spresense/configs/rndis/defconfig | 1 + .../spresense/configs/usbmsc/defconfig | 1 + .../spresense/configs/usbnsh/defconfig | 1 + .../cxd56xx/spresense/configs/wifi/defconfig | 1 + 12 files changed, 127 insertions(+), 48 deletions(-) create mode 100644 boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig diff --git a/arch/arm/include/cxd56xx/chip.h b/arch/arm/include/cxd56xx/chip.h index 84c6068048..c4b63b7ec5 100644 --- a/arch/arm/include/cxd56xx/chip.h +++ b/arch/arm/include/cxd56xx/chip.h @@ -52,51 +52,4 @@ #define NVIC_SYSH_PRIORITY_MAX CXD56M4_SYSH_PRIORITY_MAX #define NVIC_SYSH_PRIORITY_STEP CXD56M4_SYSH_PRIORITY_STEP -/* If CONFIG_ARMV7M_USEBASEPRI is selected, then interrupts will be disabled - * by setting the BASEPRI register to NVIC_SYSH_DISABLE_PRIORITY so that most - * interrupts will not have execution priority. SVCall must have execution - * priority in all cases. - * - * In the normal cases, interrupts are not nest-able and all interrupts run - * at an execution priority between NVIC_SYSH_PRIORITY_MIN and - * NVIC_SYSH_PRIORITY_MAX (with NVIC_SYSH_PRIORITY_MAX reserved for SVCall). - * - * If, in addition, CONFIG_ARCH_HIPRI_INTERRUPT is defined, then special - * high priority interrupts are supported. These are not "nested" in the - * normal sense of the word. These high priority interrupts can interrupt - * normal processing but execute outside of OS (although they can "get back - * into the game" via a PendSV interrupt). - * - * In the normal course of things, interrupts must occasionally be disabled - * using the up_irq_save() inline function to prevent contention in use of - * resources that may be shared between interrupt level and non-interrupt - * level logic. Now the question arises, if we are using - * CONFIG_ARCH_HIPRI_INTERRUPT=y, do we disable all interrupts except - * SVCall (we cannot disable SVCall interrupts). Or do we only disable the - * "normal" interrupts? - * - * If we are using the BASEPRI register to disable interrupts, then the - * answer is that we must disable ONLY the "normal interrupts". That - * is because we cannot disable SVCALL interrupts and we cannot permit - * SVCAll interrupts running at a higher priority than the high priority - * interrupts (otherwise, they will introduce jitter in the high priority - * interrupt response time.) - * - * Hence, if you need to disable the high priority interrupt, you will have - * to disable the interrupt either at the peripheral that generates the - * interrupt or at the NVIC. Disabling global interrupts via the BASEPRI - * register cannot effect high priority interrupts. - */ - -/* The high priority interrupt must be highest priority. This prevents - * SVCALL handling from adding jitter to high priority interrupt response. - * Disabling interrupts will disable all interrupts EXCEPT SVCALL and the - * high priority interrupts. - */ - -#define NVIC_SYSH_MAXNORMAL_PRIORITY (NVIC_SYSH_PRIORITY_MAX + 2 * NVIC_SYSH_PRIORITY_STEP) -#define NVIC_SYSH_HIGH_PRIORITY NVIC_SYSH_PRIORITY_MAX -#define NVIC_SYSH_DISABLE_PRIORITY NVIC_SYSH_MAXNORMAL_PRIORITY -#define NVIC_SYSH_SVCALL_PRIORITY (NVIC_SYSH_PRIORITY_MAX + 1 * NVIC_SYSH_PRIORITY_STEP) - #endif /* __ARCH_ARM_INCLUDE_CXD56XX_CHIP_H */ diff --git a/boards/arm/cxd56xx/spresense/Kconfig b/boards/arm/cxd56xx/spresense/Kconfig index b3cd531a79..30a1001ee2 100644 --- a/boards/arm/cxd56xx/spresense/Kconfig +++ b/boards/arm/cxd56xx/spresense/Kconfig @@ -25,6 +25,7 @@ config SPRESENSE_EXTENSION present, then the SPresense will need to run at a higher power mode, selected by this option. +if SPRESENSE_EXTENSION config SDCARD_TXS02612 bool "SD Card TXS02612 port expander with voltage level translation" default y @@ -47,6 +48,7 @@ config SDCARD_TXS02612_PORT1 endchoice # "TXS02612 port" endif # SDCARD_TXS02612 +endif # SPRESENSE_EXTENSION if LCD diff --git a/boards/arm/cxd56xx/spresense/configs/audio/defconfig b/boards/arm/cxd56xx/spresense/configs/audio/defconfig index ea699a6803..27d60ba0a3 100644 --- a/boards/arm/cxd56xx/spresense/configs/audio/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/audio/defconfig @@ -73,6 +73,7 @@ CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPECIFIC_DRIVERS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/camera/defconfig b/boards/arm/cxd56xx/spresense/configs/camera/defconfig index 67b13be261..ae9419cdf0 100644 --- a/boards/arm/cxd56xx/spresense/configs/camera/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/camera/defconfig @@ -72,6 +72,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig b/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig new file mode 100644 index 0000000000..6f0d5399c0 --- /dev/null +++ b/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig @@ -0,0 +1,115 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_CXD56_I2C0_SCUSEQ is not set +# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set +# CONFIG_MMCSD_SPI is not set +# CONFIG_MTD_SMART_WEAR_LEVEL is not set +# CONFIG_NXFONTS_DISABLE_16BPP is not set +# CONFIG_NX_DISABLE_16BPP is not set +# CONFIG_STANDARD_SERIAL is not set +CONFIG_ARCH="arm" +CONFIG_ARCH_BOARD="spresense" +CONFIG_ARCH_BOARD_SPRESENSE=y +CONFIG_ARCH_CHIP="cxd56xx" +CONFIG_ARCH_CHIP_CXD56XX=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARMV7M_USEBASEPRI=y +CONFIG_BOARD_LOOPSPERMSEC=5434 +CONFIG_BOOT_RUNFROMISRAM=y +CONFIG_BUILTIN=y +CONFIG_CDCACM=y +CONFIG_CDCACM_COMPOSITE=y +CONFIG_CLOCK_MONOTONIC=y +CONFIG_COMPOSITE_IAD=y +CONFIG_COMPOSITE_MSFT_OS_DESCRIPTORS=y +CONFIG_COMPOSITE_PRODUCTID=0x0bc2 +CONFIG_COMPOSITE_VENDORID=0x054c +CONFIG_COMPOSITE_VENDORSTR="Sony" +CONFIG_CXD56_BINARY=y +CONFIG_CXD56_DMAC_SPI4_RX=y +CONFIG_CXD56_DMAC_SPI4_TX=y +CONFIG_CXD56_I2C0=y +CONFIG_CXD56_I2C=y +CONFIG_CXD56_SDIO=y +CONFIG_CXD56_SPI5=y +CONFIG_CXD56_SPI=y +CONFIG_CXD56_USBDEV=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_EXAMPLES_NX=y +CONFIG_EXAMPLES_NXDEMO=y +CONFIG_EXAMPLES_NXHELLO=y +CONFIG_EXAMPLES_NXHELLO_BPP=16 +CONFIG_EXAMPLES_NXLINES=y +CONFIG_EXAMPLES_NXLINES_BPP=16 +CONFIG_EXAMPLES_NX_BPP=16 +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=64 +CONFIG_FS_FAT=y +CONFIG_FS_PROCFS=y +CONFIG_FS_PROCFS_REGISTER=y +CONFIG_FS_SMARTFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_I2C=y +CONFIG_LCD=y +CONFIG_LCD_ILI9340=y +CONFIG_LCD_ILI9340_IFACE0=y +CONFIG_MAX_TASKS=16 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_MMCSD=y +CONFIG_MMCSD_SDIO=y +CONFIG_MQ_MAXMSGSIZE=64 +CONFIG_MTD_BYTE_WRITE=y +CONFIG_MTD_PARTITION=y +CONFIG_MTD_SMART=y +CONFIG_MTD_SMART_ENABLE_CRC=y +CONFIG_MTD_SMART_SECTOR_SIZE=4096 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_READLINE=y +CONFIG_NX=y +CONFIG_NXFONT_SERIF22X29=y +CONFIG_NX_BLOCKING=y +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_PREALLOC_TIMERS=4 +CONFIG_PREALLOC_WDOGS=16 +CONFIG_RAM_SIZE=1572864 +CONFIG_RAM_START=0x0d000000 +CONFIG_READLINE_CMD_HISTORY=y +CONFIG_RR_INTERVAL=200 +CONFIG_RTC=y +CONFIG_RTC_DRIVER=y +CONFIG_SCHED_WAITPID=y +CONFIG_SDCLONE_DISABLE=y +CONFIG_SMARTFS_ALIGNED_ACCESS=y +CONFIG_SMARTFS_MAXNAMLEN=30 +CONFIG_SMARTFS_MULTI_ROOT_DIRS=y +CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y +CONFIG_START_DAY=6 +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2011 +CONFIG_SYSTEM_CDCACM=y +CONFIG_SYSTEM_CLE=y +CONFIG_SYSTEM_COMPOSITE=y +CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_NSH_CXXINITIALIZE=y +CONFIG_SYSTEM_USBMSC=y +CONFIG_UART1_SERIAL_CONSOLE=y +CONFIG_USBDEV=y +CONFIG_USBDEV_COMPOSITE=y +CONFIG_USBDEV_DMA=y +CONFIG_USBDEV_DUALSPEED=y +CONFIG_USBMSC=y +CONFIG_USBMSC_COMPOSITE=y +CONFIG_USBMSC_REMOVABLE=y +CONFIG_USER_ENTRYPOINT="spresense_main" diff --git a/boards/arm/cxd56xx/spresense/configs/lcd/defconfig b/boards/arm/cxd56xx/spresense/configs/lcd/defconfig index 3db9f4037e..1f5ed0895d 100644 --- a/boards/arm/cxd56xx/spresense/configs/lcd/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/lcd/defconfig @@ -34,7 +34,6 @@ CONFIG_CXD56_DMAC_SPI4_TX=y CONFIG_CXD56_I2C0=y CONFIG_CXD56_I2C=y CONFIG_CXD56_SDIO=y -CONFIG_CXD56_SPI4=y CONFIG_CXD56_SPI5=y CONFIG_CXD56_SPI=y CONFIG_CXD56_USBDEV=y @@ -57,6 +56,7 @@ CONFIG_MAX_TASKS=16 CONFIG_MAX_WDOGPARMS=2 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y +CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART=y @@ -82,6 +82,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/lte/defconfig b/boards/arm/cxd56xx/spresense/configs/lte/defconfig index 4c12df3e87..ab5e4b308c 100644 --- a/boards/arm/cxd56xx/spresense/configs/lte/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/lte/defconfig @@ -71,6 +71,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/mpy/defconfig b/boards/arm/cxd56xx/spresense/configs/mpy/defconfig index 49262769fe..a874b0cef6 100644 --- a/boards/arm/cxd56xx/spresense/configs/mpy/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/mpy/defconfig @@ -82,6 +82,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig index 5e685112bb..e7eff2c7b0 100644 --- a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig @@ -100,6 +100,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_STACK_COLORATION=y CONFIG_START_DAY=16 CONFIG_START_MONTH=7 diff --git a/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig b/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig index 7d1d954d3d..8bcfee48e1 100644 --- a/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig @@ -77,6 +77,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig b/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig index b5a464b42a..5caca3e168 100644 --- a/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig @@ -70,6 +70,7 @@ CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y CONFIG_SPI=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/arm/cxd56xx/spresense/configs/wifi/defconfig b/boards/arm/cxd56xx/spresense/configs/wifi/defconfig index 37b46f48be..69404e7f08 100644 --- a/boards/arm/cxd56xx/spresense/configs/wifi/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/wifi/defconfig @@ -97,6 +97,7 @@ CONFIG_SDCLONE_DISABLE=y CONFIG_SMARTFS_ALIGNED_ACCESS=y CONFIG_SMARTFS_MAXNAMLEN=30 CONFIG_SMARTFS_MULTI_ROOT_DIRS=y +CONFIG_SPRESENSE_EXTENSION=y CONFIG_STACK_COLORATION=y CONFIG_START_DAY=16 CONFIG_START_MONTH=7