You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/01/18 22:31:50 UTC
[nuttx] 01/03: boards/arm/rp2040: move duplicate peripheral configs to common
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 5d0884441328a586befc92af9d2fd9503069f3a0
Author: Peter Bee <bi...@xiaomi.com>
AuthorDate: Wed Jan 18 16:05:04 2023 +0800
boards/arm/rp2040: move duplicate peripheral configs to common
Kconfigs with same names in different files could not be handled
correctly
Signed-off-by: Peter Bee <bi...@xiaomi.com>
---
boards/arm/rp2040/adafruit-feather-rp2040/Kconfig | 28 ---------------
boards/arm/rp2040/adafruit-kb2040/Kconfig | 28 ---------------
boards/arm/rp2040/common/Kconfig | 42 ++++++++++++++++++++++-
boards/arm/rp2040/raspberrypi-pico-w/Kconfig | 34 ++----------------
boards/arm/rp2040/raspberrypi-pico/Kconfig | 28 ---------------
5 files changed, 44 insertions(+), 116 deletions(-)
diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/Kconfig b/boards/arm/rp2040/adafruit-feather-rp2040/Kconfig
index 45616d3692..005f26d57d 100644
--- a/boards/arm/rp2040/adafruit-feather-rp2040/Kconfig
+++ b/boards/arm/rp2040/adafruit-feather-rp2040/Kconfig
@@ -5,32 +5,4 @@
if ARCH_BOARD_ADAFRUIT_FEATHER_RP2040
-config RP2040_LCD_SPI_CH
- int "RP2040 LCD SPI channel number"
- default 0
- range 0 1
- depends on LCD
- ---help---
- Select SPI channel number to use LCD display.
-
-config RP2040_ENC28J60_SPI_CH
- int "ENC28J60 SPI channel number"
- default 1
- range 0 1
- depends on ENC28J60
- ---help---
- Select SPI channel number to use ENC28J60 ethernet.
-
-config RP2040_ENC28J60_INTR_GPIO
- int "ENC28J60 interrupt GPIO pin assign"
- default -1
- range -1 29
- depends on ENC28J60
-
-config RP2040_ENC28J60_RESET_GPIO
- int "ENC28J60 reset GPIO pin assign (optional)"
- default -1
- range -1 29
- depends on ENC28J60
-
endif
diff --git a/boards/arm/rp2040/adafruit-kb2040/Kconfig b/boards/arm/rp2040/adafruit-kb2040/Kconfig
index 0b4e0518b9..0acee34886 100644
--- a/boards/arm/rp2040/adafruit-kb2040/Kconfig
+++ b/boards/arm/rp2040/adafruit-kb2040/Kconfig
@@ -5,32 +5,4 @@
if ARCH_BOARD_ADAFRUIT_KB2040
-config RP2040_LCD_SPI_CH
- int "RP2040 LCD SPI channel number"
- default 0
- range 0 1
- depends on LCD
- ---help---
- Select SPI channel number to use LCD display.
-
-config RP2040_ENC28J60_SPI_CH
- int "ENC28J60 SPI channel number"
- default 1
- range 0 1
- depends on ENC28J60
- ---help---
- Select SPI channel number to use ENC28J60 ethernet.
-
-config RP2040_ENC28J60_INTR_GPIO
- int "ENC28J60 interrupt GPIO pin assign"
- default -1
- range -1 29
- depends on ENC28J60
-
-config RP2040_ENC28J60_RESET_GPIO
- int "ENC28J60 reset GPIO pin assign (optional)"
- default -1
- range -1 29
- depends on ENC28J60
-
endif
diff --git a/boards/arm/rp2040/common/Kconfig b/boards/arm/rp2040/common/Kconfig
index 954b9c116f..396ca55d93 100644
--- a/boards/arm/rp2040/common/Kconfig
+++ b/boards/arm/rp2040/common/Kconfig
@@ -482,7 +482,7 @@ if RP2040_PWM7
endif # PWM_MULTICHAN && PWM_NCHANNELS > 1
endif # RP2040_PWM7
-
+
#####################################################################
# I2S Configuration
#####################################################################
@@ -540,3 +540,43 @@ if RP2040_FLASH_FILE_SYSTEM
This is the overall amount of flash memory on the board.
endif # RP2040_FLASH_FILE_SYSTEM
+
+#####################################################################
+# LCD Configuration
+#####################################################################
+
+if LCD
+
+ config RP2040_LCD_SPI_CH
+ int "RP2040 LCD SPI channel number"
+ default 0
+ range 0 1
+ ---help---
+ Select SPI channel number to use LCD display.
+
+endif # LCD
+
+#####################################################################
+# Ethernet Configuration
+#####################################################################
+
+if ENC28J60
+
+ config RP2040_ENC28J60_SPI_CH
+ int "ENC28J60 SPI channel number"
+ default 1
+ range 0 1
+ ---help---
+ Select SPI channel number to use ENC28J60 ethernet.
+
+ config RP2040_ENC28J60_INTR_GPIO
+ int "ENC28J60 interrupt GPIO pin assign"
+ default -1
+ range -1 29
+
+ config RP2040_ENC28J60_RESET_GPIO
+ int "ENC28J60 reset GPIO pin assign (optional)"
+ default -1
+ range -1 29
+
+endif # ENC28J60
diff --git a/boards/arm/rp2040/raspberrypi-pico-w/Kconfig b/boards/arm/rp2040/raspberrypi-pico-w/Kconfig
index 45927d1ba2..ab1ea1ef83 100644
--- a/boards/arm/rp2040/raspberrypi-pico-w/Kconfig
+++ b/boards/arm/rp2040/raspberrypi-pico-w/Kconfig
@@ -5,34 +5,6 @@
if ARCH_BOARD_RASPBERRYPI_PICO_W
-config RP2040_LCD_SPI_CH
- int "RP2040 LCD SPI channel number"
- default 0
- range 0 1
- depends on LCD
- ---help---
- Select SPI channel number to use LCD display.
-
-config RP2040_ENC28J60_SPI_CH
- int "ENC28J60 SPI channel number"
- default 1
- range 0 1
- depends on ENC28J60
- ---help---
- Select SPI channel number to use ENC28J60 ethernet.
-
-config RP2040_ENC28J60_INTR_GPIO
- int "ENC28J60 interrupt GPIO pin assign"
- default -1
- range -1 29
- depends on ENC28J60
-
-config RP2040_ENC28J60_RESET_GPIO
- int "ENC28J60 reset GPIO pin assign (optional)"
- default -1
- range -1 29
- depends on ENC28J60
-
menuconfig RP2040_INFINEON_CYW43439
bool "Has Infineon cyw43439 WiFi chip"
depends on IEEE80211_INFINEON_CYW43439
@@ -57,10 +29,10 @@ if RP2040_INFINEON_CYW43439
default 224190
---help---
This is the length of just the base firmware in the firmware file specified
- by the "Path to Infineon 43439 firmware file" configuration option.
-
+ by the "Path to Infineon 43439 firmware file" configuration option.
+
This length does not include the length of any padding nor the length of
- the appended clm_blob. If a clm_blob is present in the firmware file, this
+ the appended clm_blob. If a clm_blob is present in the firmware file, this
length will be less than the length of the whole file.
diff --git a/boards/arm/rp2040/raspberrypi-pico/Kconfig b/boards/arm/rp2040/raspberrypi-pico/Kconfig
index 45ebfcb330..df670914bb 100644
--- a/boards/arm/rp2040/raspberrypi-pico/Kconfig
+++ b/boards/arm/rp2040/raspberrypi-pico/Kconfig
@@ -5,32 +5,4 @@
if ARCH_BOARD_RASPBERRYPI_PICO
-config RP2040_LCD_SPI_CH
- int "RP2040 LCD SPI channel number"
- default 0
- range 0 1
- depends on LCD
- ---help---
- Select SPI channel number to use LCD display.
-
-config RP2040_ENC28J60_SPI_CH
- int "ENC28J60 SPI channel number"
- default 1
- range 0 1
- depends on ENC28J60
- ---help---
- Select SPI channel number to use ENC28J60 ethernet.
-
-config RP2040_ENC28J60_INTR_GPIO
- int "ENC28J60 interrupt GPIO pin assign"
- default -1
- range -1 29
- depends on ENC28J60
-
-config RP2040_ENC28J60_RESET_GPIO
- int "ENC28J60 reset GPIO pin assign (optional)"
- default -1
- range -1 29
- depends on ENC28J60
-
endif