You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2023/03/01 08:21:25 UTC
[nuttx] branch master updated (05801f9fec -> 8c7fc2c175)
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from 05801f9fec CI: Free space on worker building container
new 4a405ca107 boards: spresense: Remove wrong build condition
new b60fbefabe boards: spresense: Support using GPIO for power control
new 5b3496fb7b boards: spresense: Add configuration for eMMC power control
new 96da997b23 boards: spresense: Add board function for eMMC finalization
new 56d43a4a1d boards: spresense: Add eMMC power-on wait time
new 171f8a731c boards: spresense: Remove duplicate definitions
new 9717f48a18 boards: spresense: Support eMMC late initialization
new 1ce5dd948e boards: spresense: Add eMMC initialization into bringup function
new 8c7fc2c175 boards: spresense: Add LCD support on LTE board
The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
boards/arm/cxd56xx/common/src/cxd56_emmcdev.c | 57 +++++++++++++++++++++-
boards/arm/cxd56xx/spresense/Kconfig | 31 +++++++++++-
boards/arm/cxd56xx/spresense/include/board.h | 24 +++++++++
.../arm/cxd56xx/spresense/include/cxd56_emmcdev.h | 1 +
boards/arm/cxd56xx/spresense/include/cxd56_power.h | 18 ++-----
boards/arm/cxd56xx/spresense/src/Make.defs | 2 -
boards/arm/cxd56xx/spresense/src/cxd56_bringup.c | 10 ++++
boards/arm/cxd56xx/spresense/src/cxd56_power.c | 12 +++++
8 files changed, 137 insertions(+), 18 deletions(-)
[nuttx] 06/09: boards: spresense: Remove duplicate definitions
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 171f8a731c51a015ff550f7e0e8ba3b72690416c
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:29:46 2023 +0900
boards: spresense: Remove duplicate definitions
Remove duplicate definitions are defined in board.h.
---
boards/arm/cxd56xx/spresense/include/cxd56_power.h | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/boards/arm/cxd56xx/spresense/include/cxd56_power.h b/boards/arm/cxd56xx/spresense/include/cxd56_power.h
index f34ca80dbb..ca3e49193f 100644
--- a/boards/arm/cxd56xx/spresense/include/cxd56_power.h
+++ b/boards/arm/cxd56xx/spresense/include/cxd56_power.h
@@ -29,20 +29,6 @@
#include <stdbool.h>
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#define PMIC_NONE (0)
-#define PMIC_TYPE_LSW (1u << 8)
-#define PMIC_TYPE_GPO (1u << 9)
-#define PMIC_TYPE_DDCLDO (1u << 10)
-#define PMIC_GET_TYPE(v) ((v) & 0xff00)
-#define PMIC_GET_CH(v) ((v) & 0x00ff)
-#define PMIC_LSW(n) (PMIC_TYPE_LSW | (1u << (n)))
-#define PMIC_GPO(n) (PMIC_TYPE_GPO | (1u << (n)))
-#define PMIC_DDCLDO(n) (PMIC_TYPE_DDCLDO | (1u << (n)))
-
/****************************************************************************
* Public Types
****************************************************************************/
@@ -62,6 +48,10 @@ extern "C"
#define EXTERN extern
#endif
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
/****************************************************************************
* Name: board_pmic_read
*
[nuttx] 05/09: boards: spresense: Add eMMC power-on wait time
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 56d43a4a1d258c5c9560564db6e14596df6fe6b6
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:29:24 2023 +0900
boards: spresense: Add eMMC power-on wait time
Add 10msec wait time before eMMC device is powered on.
---
boards/arm/cxd56xx/common/src/cxd56_emmcdev.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c b/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c
index 28acb2fe97..b808b7a27c 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c
@@ -30,6 +30,7 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/board.h>
+#include <nuttx/signal.h>
#include <nuttx/fs/fs.h>
#include <arch/board/board.h>
#include "cxd56_emmc.h"
@@ -42,6 +43,10 @@
# define CONFIG_SFC_DEVNO 0
#endif
+/* EMMC power-on time in ms */
+
+#define EMMC_POWER_ON_WAIT_MSEC 10
+
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -67,12 +72,19 @@ int board_emmc_initialize(void)
return -ENODEV;
}
+ if (POWER_EMMC != PMIC_NONE)
+ {
+ /* Wait time until eMMC device is turned power on */
+
+ nxsig_usleep(EMMC_POWER_ON_WAIT_MSEC * USEC_PER_MSEC);
+ }
+
/* Initialize the eMMC device */
ret = cxd56_emmcinitialize();
if (ret < 0)
{
- ferr("ERROR: Failed to initialize eMMC. %d\n ", ret);
+ ferr("ERROR: Failed to initialize eMMC. %d\n", ret);
return -ENODEV;
}
[nuttx] 08/09: boards: spresense: Add eMMC initialization into bringup function
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1ce5dd948e446e039deebdb704298698c9efc714
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:30:28 2023 +0900
boards: spresense: Add eMMC initialization into bringup function
Add eMMC initialization into bringup function.
---
boards/arm/cxd56xx/spresense/src/cxd56_bringup.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c b/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c
index 43b61ac0d1..2f2e02e799 100644
--- a/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c
+++ b/boards/arm/cxd56xx/spresense/src/cxd56_bringup.c
@@ -440,6 +440,16 @@ int cxd56_bringup(void)
board_automount_initialize();
#endif
+#if defined(CONFIG_CXD56_EMMC) && !defined(CONFIG_CXD56_EMMC_LATE_INITIALIZE)
+ /* Mount the eMMC block driver */
+
+ ret = board_emmc_initialize();
+ if (ret < 0)
+ {
+ _err("ERROR: Failed to initialize eMMC: %d\n", ret);
+ }
+#endif
+
#ifdef CONFIG_CPUFREQ_RELEASE_LOCK
/* Enable dynamic clock control and CPU clock down for power saving */
[nuttx] 02/09: boards: spresense: Support using GPIO for power control
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit b60fbefabecdfd4eb0aefdd68a62fd7995730089
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:28:13 2023 +0900
boards: spresense: Support using GPIO for power control
Introduce CHIP_TYPE_GPIO to allow GPIO to be used for power control.
---
boards/arm/cxd56xx/spresense/include/board.h | 3 +++
boards/arm/cxd56xx/spresense/src/cxd56_power.c | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/boards/arm/cxd56xx/spresense/include/board.h b/boards/arm/cxd56xx/spresense/include/board.h
index 53d3ec20e7..aa385c46a0 100644
--- a/boards/arm/cxd56xx/spresense/include/board.h
+++ b/boards/arm/cxd56xx/spresense/include/board.h
@@ -29,6 +29,7 @@
#include <nuttx/irq.h>
#include <sys/boardctl.h>
#include <stdbool.h>
+#include <arch/chip/pin.h>
#include "board_lcdpins.h"
@@ -166,11 +167,13 @@
#define PMIC_TYPE_LSW (1u << 8)
#define PMIC_TYPE_GPO (1u << 9)
#define PMIC_TYPE_DDCLDO (1u << 10)
+#define CHIP_TYPE_GPIO (1u << 11)
#define PMIC_GET_TYPE(v) ((v) & 0xff00)
#define PMIC_GET_CH(v) ((v) & 0x00ff)
#define PMIC_LSW(n) (PMIC_TYPE_LSW | (1u << (n)))
#define PMIC_GPO(n) (PMIC_TYPE_GPO | (1u << (n)))
#define PMIC_DDCLDO(n) (PMIC_TYPE_DDCLDO | (1u << (n)))
+#define CHIP_GPIO(n) (CHIP_TYPE_GPIO | (n))
enum board_power_device
{
diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_power.c b/boards/arm/cxd56xx/spresense/src/cxd56_power.c
index 32dafde225..3c596ceedd 100644
--- a/boards/arm/cxd56xx/spresense/src/cxd56_power.c
+++ b/boards/arm/cxd56xx/spresense/src/cxd56_power.c
@@ -200,6 +200,9 @@ int board_power_control(int target, bool en)
pfunc = cxd56_pmic_set_ddc_ldo;
break;
#endif /* CONFIG_CXD56_PMIC */
+ case CHIP_TYPE_GPIO:
+ board_gpio_write(PMIC_GET_CH(target), en ? 1 : 0);
+ break;
default:
break;
}
@@ -253,6 +256,10 @@ int board_power_control_tristate(int target, int value)
usleep(1);
}
}
+ else if (PMIC_GET_TYPE(target) == CHIP_TYPE_GPIO)
+ {
+ board_gpio_write(PMIC_GET_CH(target), value);
+ }
else
{
en = value ? true : false;
@@ -274,6 +281,7 @@ bool board_power_monitor(int target)
{
bool ret = false;
bool (*pfunc)(uint8_t chset) = NULL;
+ int status;
switch (PMIC_GET_TYPE(target))
{
@@ -288,6 +296,10 @@ bool board_power_monitor(int target)
pfunc = cxd56_pmic_get_ddc_ldo;
break;
#endif /* CONFIG_CXD56_PMIC */
+ case CHIP_TYPE_GPIO:
+ status = board_gpio_read(PMIC_GET_CH(target));
+ ret = (status == 1);
+ break;
default:
break;
}
[nuttx] 04/09: boards: spresense: Add board function for eMMC finalization
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 96da997b234cd12d5c5391a8a1cd01710bf89386
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:29:03 2023 +0900
boards: spresense: Add board function for eMMC finalization
- Un-mount the FAT filesystem for eMMC
- Un-initialize eMMC driver
- Turn off the eMMC device
---
boards/arm/cxd56xx/common/src/cxd56_emmcdev.c | 43 ++++++++++++++++++++++
.../arm/cxd56xx/spresense/include/cxd56_emmcdev.h | 1 +
2 files changed, 44 insertions(+)
diff --git a/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c b/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c
index 03925c5b2a..28acb2fe97 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c
@@ -24,6 +24,8 @@
#include <nuttx/config.h>
+#include <sys/mount.h>
+
#include <stdio.h>
#include <errno.h>
#include <debug.h>
@@ -84,3 +86,44 @@ int board_emmc_initialize(void)
return ret;
}
+
+/****************************************************************************
+ * Name: board_emmc_finalize
+ *
+ * Description:
+ * Finalize the eMMC device and umount the file system.
+ *
+ ****************************************************************************/
+
+int board_emmc_finalize(void)
+{
+ int ret;
+
+ /* Un-mount the eMMC device */
+
+ ret = nx_umount2("/mnt/emmc", MNT_DETACH);
+ if (ret < 0)
+ {
+ ferr("ERROR: Failed to umount the eMMC. %d\n", ret);
+ return ret;
+ }
+
+ /* Uninitialize the eMMC device */
+
+ ret = cxd56_emmcuninitialize();
+ if (ret < 0)
+ {
+ ferr("ERROR: Failed to uninitialize eMMC. %d\n", ret);
+ return ret;
+ }
+
+ /* Power off the eMMC device */
+
+ ret = board_power_control(POWER_EMMC, false);
+ if (ret)
+ {
+ ferr("ERROR: Failed to power off eMMC. %d\n", ret);
+ }
+
+ return ret;
+}
diff --git a/boards/arm/cxd56xx/spresense/include/cxd56_emmcdev.h b/boards/arm/cxd56xx/spresense/include/cxd56_emmcdev.h
index f0f24f1a2b..a5d3ebf311 100644
--- a/boards/arm/cxd56xx/spresense/include/cxd56_emmcdev.h
+++ b/boards/arm/cxd56xx/spresense/include/cxd56_emmcdev.h
@@ -60,6 +60,7 @@ extern "C"
#ifdef CONFIG_CXD56_EMMC
int board_emmc_initialize(void);
+int board_emmc_finalize(void);
#endif
#undef EXTERN
[nuttx] 09/09: boards: spresense: Add LCD support on LTE board
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 8c7fc2c1755c64272fd89516503717b0b467ff32
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:30:50 2023 +0900
boards: spresense: Add LCD support on LTE board
Add a configuration to use SPI3 on LTE extension board for LCD.
---
boards/arm/cxd56xx/spresense/Kconfig | 8 +++++++-
boards/arm/cxd56xx/spresense/include/board.h | 15 +++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/boards/arm/cxd56xx/spresense/Kconfig b/boards/arm/cxd56xx/spresense/Kconfig
index ff2960348e..dbb7c793e7 100644
--- a/boards/arm/cxd56xx/spresense/Kconfig
+++ b/boards/arm/cxd56xx/spresense/Kconfig
@@ -497,6 +497,12 @@ choice
prompt "LCD SPI connection"
default LCD_ON_EXTENSION_BOARD
+config LCD_ON_LTE_EXTENSION_BOARD
+ bool "LTE extension board: SPI3"
+ select CXD56_SPI3
+ ---help---
+ Display connected to LTE extension board.
+
config LCD_ON_EXTENSION_BOARD
bool "Extension board: SPI4"
select CXD56_SPI4
@@ -609,7 +615,7 @@ endchoice
endif
-if LCD_ON_EXTENSION_BOARD
+if LCD_ON_EXTENSION_BOARD || LCD_ON_LTE_EXTENSION_BOARD
choice
prompt "LCD ILI934x RST Pin selection"
diff --git a/boards/arm/cxd56xx/spresense/include/board.h b/boards/arm/cxd56xx/spresense/include/board.h
index e19782e6fe..72e4e7e4bb 100644
--- a/boards/arm/cxd56xx/spresense/include/board.h
+++ b/boards/arm/cxd56xx/spresense/include/board.h
@@ -239,6 +239,21 @@ enum board_power_device
#define DISPLAY_DMA_TX_MAXSIZE (192000)
#define DISPLAY_DMA_RX_MAXSIZE (192000)
+#elif defined(CONFIG_LCD_ON_LTE_EXTENSION_BOARD)
+
+/* Display connected to LTE extension board. */
+
+#define DISPLAY_SPI 3
+
+/* Specify invalid channels because DMA cannot be used */
+
+#define DISPLAY_DMA_TXCH (-1)
+#define DISPLAY_DMA_RXCH (-1)
+#define DISPLAY_DMA_TXCH_CFG (-1)
+#define DISPLAY_DMA_RXCH_CFG (-1)
+#define DISPLAY_DMA_TX_MAXSIZE (192000)
+#define DISPLAY_DMA_RX_MAXSIZE (192000)
+
#else /* Display is connected through extension board. */
#define DISPLAY_SPI 4
[nuttx] 03/09: boards: spresense: Add configuration for eMMC power control
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 5b3496fb7be86a22b6dc54e0414d676987a89eca
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:28:35 2023 +0900
boards: spresense: Add configuration for eMMC power control
Update Kconfig to add eMMC power pin selection.
---
boards/arm/cxd56xx/spresense/Kconfig | 15 +++++++++++++++
boards/arm/cxd56xx/spresense/include/board.h | 6 ++++++
2 files changed, 21 insertions(+)
diff --git a/boards/arm/cxd56xx/spresense/Kconfig b/boards/arm/cxd56xx/spresense/Kconfig
index fc0fe123a1..0e9e415470 100644
--- a/boards/arm/cxd56xx/spresense/Kconfig
+++ b/boards/arm/cxd56xx/spresense/Kconfig
@@ -809,4 +809,19 @@ config CXD56_SDCARD_AUTOMOUNT_UDELAY
endif # CXD56_SDCARD_AUTOMOUNT
+choice
+ prompt "eMMC Power Pin selection"
+ default CXD56_EMMC_POWER_PIN_NONE
+
+config CXD56_EMMC_POWER_PIN_NONE
+ bool "None"
+
+config CXD56_EMMC_POWER_PIN_I2S0_BCK
+ bool "Use PIN I2S0_BCK"
+
+config CXD56_EMMC_POWER_PIN_UART2_CTS
+ bool "Use PIN UART2_CTS"
+
+endchoice
+
endif
diff --git a/boards/arm/cxd56xx/spresense/include/board.h b/boards/arm/cxd56xx/spresense/include/board.h
index aa385c46a0..e19782e6fe 100644
--- a/boards/arm/cxd56xx/spresense/include/board.h
+++ b/boards/arm/cxd56xx/spresense/include/board.h
@@ -201,7 +201,13 @@ enum board_power_device
POWER_BTBLE = PMIC_NONE,
POWER_SENSOR = PMIC_NONE,
+#if defined(CONFIG_CXD56_EMMC_POWER_PIN_I2S0_BCK)
+ POWER_EMMC = CHIP_GPIO(PIN_I2S0_BCK),
+#elif defined(CONFIG_CXD56_EMMC_POWER_PIN_UART2_CTS)
+ POWER_EMMC = CHIP_GPIO(PIN_UART2_CTS),
+#else
POWER_EMMC = PMIC_NONE,
+#endif
POWER_LTE = PMIC_GPO(2),
};
[nuttx] 07/09: boards: spresense: Support eMMC late initialization
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9717f48a18e0eca9ddd20bcbfdcd3f6811e27bc0
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:30:06 2023 +0900
boards: spresense: Support eMMC late initialization
Support eMMC late initialization to initialize eMMC from user application.
---
boards/arm/cxd56xx/spresense/Kconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/boards/arm/cxd56xx/spresense/Kconfig b/boards/arm/cxd56xx/spresense/Kconfig
index 0e9e415470..ff2960348e 100644
--- a/boards/arm/cxd56xx/spresense/Kconfig
+++ b/boards/arm/cxd56xx/spresense/Kconfig
@@ -765,6 +765,14 @@ config CXD56_LTE_LATE_INITIALIZE
endif # CXD56_LTE
+config CXD56_EMMC_LATE_INITIALIZE
+ bool "eMMC driver late initialize"
+ default n
+ depends on CXD56_EMMC
+ ---help---
+ eMMC driver can be initialized on an application code after system booted up
+ by enabling this configuration switch.
+
config CXD56_BINARY
bool "spk binary format"
default n
[nuttx] 01/09: boards: spresense: Remove wrong build condition
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4a405ca1072f4698362d7184bc79287f9dcf246c
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Mar 1 14:27:44 2023 +0900
boards: spresense: Remove wrong build condition
Remove wrong build condition and always build cxd56_gpioif.c.
---
boards/arm/cxd56xx/spresense/src/Make.defs | 2 --
1 file changed, 2 deletions(-)
diff --git a/boards/arm/cxd56xx/spresense/src/Make.defs b/boards/arm/cxd56xx/spresense/src/Make.defs
index b13f155bd1..99c0281ab2 100644
--- a/boards/arm/cxd56xx/spresense/src/Make.defs
+++ b/boards/arm/cxd56xx/spresense/src/Make.defs
@@ -43,9 +43,7 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += cxd56_buttons.c
endif
-ifeq ($(CONFIG_CXD56_GPIO_IRQ),y)
CSRCS += cxd56_gpioif.c
-endif
ifeq ($(CONFIG_CXD56_PWM),y)
CSRCS += cxd56_pwm.c