You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by an...@apache.org on 2021/05/05 16:22:22 UTC

[incubator-nuttx] branch master updated (8624f9a -> 92dba32)

This is an automated email from the ASF dual-hosted git repository.

antmerlino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 8624f9a  s32k1xx:flexcan Use inttypes in printing macro
     new cd603af  stm32f7:Allow for reuse of the OTG_ID GPIO
     new 92dba32  stm32h7:Allow for reuse of the OTG_ID GPIO

The 2 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:
 arch/arm/src/stm32f7/Kconfig        | 13 +++++++++++++
 arch/arm/src/stm32f7/stm32_otgdev.c |  6 +++++-
 arch/arm/src/stm32h7/Kconfig        | 13 +++++++++++++
 arch/arm/src/stm32h7/stm32_otgdev.c |  6 +++++-
 4 files changed, 36 insertions(+), 2 deletions(-)

[incubator-nuttx] 02/02: stm32h7:Allow for reuse of the OTG_ID GPIO

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

antmerlino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 92dba32c8c08b4512666159029cbcc189b5191d3
Author: David Sidrane <Da...@NscDg.com>
AuthorDate: Mon May 3 10:38:10 2021 -0700

    stm32h7:Allow for reuse of the OTG_ID GPIO
    
        Currently Nuttx doesn't seem to be any real support for OTG.
        In the future when OTG is supported. This Knob can be removed
        and drivers can enable their pin sets based on CONFIG_OTG.
        (Adding CONFIG_OTG at this time would be misleading.)
---
 arch/arm/src/stm32h7/Kconfig        | 13 +++++++++++++
 arch/arm/src/stm32h7/stm32_otgdev.c |  6 +++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32h7/Kconfig b/arch/arm/src/stm32h7/Kconfig
index 64d518f..ee9b516 100644
--- a/arch/arm/src/stm32h7/Kconfig
+++ b/arch/arm/src/stm32h7/Kconfig
@@ -843,6 +843,19 @@ config STM32H7_I2CTIMEOTICKS
 
 endmenu # "I2C Configuration"
 
+menu "OTG Configuration"
+	depends on STM32H7_OTGFS
+
+config OTG_ID_GPIO_DISABLE
+	bool "Disable the use of GPIO_OTG_ID pin."
+	default n
+	---help---
+		Disables/Enabled the use of GPIO_OTG_ID pin. This allows non OTG use
+		cases to reuse this GPIO pin and ensure it is not set incorrectlty
+		during OS boot.
+
+endmenu
+
 menu "SPI Configuration"
 	depends on STM32H7_SPI
 
diff --git a/arch/arm/src/stm32h7/stm32_otgdev.c b/arch/arm/src/stm32h7/stm32_otgdev.c
index adea1a1..c9ef115 100644
--- a/arch/arm/src/stm32h7/stm32_otgdev.c
+++ b/arch/arm/src/stm32h7/stm32_otgdev.c
@@ -5586,7 +5586,11 @@ void arm_usbinitialize(void)
 
   stm32_configgpio(GPIO_OTG_DM);
   stm32_configgpio(GPIO_OTG_DP);
-  stm32_configgpio(GPIO_OTG_ID);    /* Only needed for OTG */
+
+  /* Only needed for OTG */
+#  ifndef CONFIG_OTG_ID_GPIO_DISABLE
+  stm32_configgpio(GPIO_OTG_ID);
+#  endif
 
   /* SOF output pin configuration is configurable. */
 

[incubator-nuttx] 01/02: stm32f7:Allow for reuse of the OTG_ID GPIO

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

antmerlino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit cd603af95870d4c0b6df8fbbce3dfb15b0929c15
Author: David Sidrane <Da...@NscDg.com>
AuthorDate: Mon May 3 10:37:57 2021 -0700

    stm32f7:Allow for reuse of the OTG_ID GPIO
---
 arch/arm/src/stm32f7/Kconfig        | 13 +++++++++++++
 arch/arm/src/stm32f7/stm32_otgdev.c |  6 +++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32f7/Kconfig b/arch/arm/src/stm32f7/Kconfig
index b819744..9074db7 100644
--- a/arch/arm/src/stm32f7/Kconfig
+++ b/arch/arm/src/stm32f7/Kconfig
@@ -1734,6 +1734,19 @@ config STM32F7_SYSCFG_IOCOMPENSATION
 		The I/O compensation cell can be used only when the supply voltage ranges
 		from 2.4 to 3.6 V.
 
+menu "OTG Configuration"
+	depends on STM32F7_OTGFS
+
+config OTG_ID_GPIO_DISABLE
+	bool "Disable the use of GPIO_OTG_ID pin."
+	default n
+	---help---
+		Disables/Enabled the use of GPIO_OTG_ID pin. This allows non OTG use
+		cases to reuse this GPIO pin and ensure it is not set incorrectlty
+		during OS boot.
+
+endmenu
+
 menu "U[S]ART Configuration"
 	depends on STM32F7_USART
 
diff --git a/arch/arm/src/stm32f7/stm32_otgdev.c b/arch/arm/src/stm32f7/stm32_otgdev.c
index c719157..c4e6593 100644
--- a/arch/arm/src/stm32f7/stm32_otgdev.c
+++ b/arch/arm/src/stm32f7/stm32_otgdev.c
@@ -5726,7 +5726,11 @@ void arm_usbinitialize(void)
 
   stm32_configgpio(GPIO_OTG_DM);
   stm32_configgpio(GPIO_OTG_DP);
-  stm32_configgpio(GPIO_OTG_ID);        /* Only needed for OTG */
+
+  /* Only needed for OTG */
+#  ifndef CONFIG_OTG_ID_GPIO_DISABLE
+  stm32_configgpio(GPIO_OTG_ID);
+#  endif
 
   /* SOF output pin configuration is configurable. */