Kconfig.projbuild 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. menu "Example Configuration"
  2. orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
  3. config EXAMPLE_USE_INTERNAL_ETHERNET
  4. depends on IDF_TARGET_ESP32
  5. select ETH_USE_ESP32_EMAC
  6. bool "Internal EMAC"
  7. help
  8. Use internal Ethernet MAC controller.
  9. if EXAMPLE_USE_INTERNAL_ETHERNET
  10. choice EXAMPLE_ETH_PHY_MODEL
  11. prompt "Ethernet PHY Device"
  12. default EXAMPLE_ETH_PHY_IP101
  13. help
  14. Select the Ethernet PHY device to use in the example.
  15. config EXAMPLE_ETH_PHY_IP101
  16. bool "IP101"
  17. help
  18. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  19. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  20. config EXAMPLE_ETH_PHY_RTL8201
  21. bool "RTL8201/SR8201"
  22. help
  23. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  24. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  25. config EXAMPLE_ETH_PHY_LAN87XX
  26. bool "LAN87xx"
  27. help
  28. Below chips are supported:
  29. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  30. flexPWR® Technology.
  31. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  32. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  33. with HP Auto-MDIX and flexPWR® Technology.
  34. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  35. flexPWR® Technology.
  36. Goto https://www.microchip.com for more information about them.
  37. config EXAMPLE_ETH_PHY_DP83848
  38. bool "DP83848"
  39. help
  40. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  41. Goto http://www.ti.com/product/DP83848J for more information about it.
  42. config EXAMPLE_ETH_PHY_KSZ80XX
  43. bool "KSZ80xx"
  44. help
  45. With the KSZ80xx series, Microchip offers single-chip 10BASE-T/100BASE-TX
  46. Ethernet Physical Layer Tranceivers (PHY).
  47. The following chips are supported: KSZ8001, KSZ8021, KSZ8031, KSZ8041,
  48. KSZ8051, KSZ8061, KSZ8081, KSZ8091
  49. Goto https://www.microchip.com for more information about them.
  50. endchoice # EXAMPLE_ETH_PHY_MODEL
  51. config EXAMPLE_ETH_MDC_GPIO
  52. int "SMI MDC GPIO number"
  53. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  54. default 23
  55. help
  56. Set the GPIO number used by SMI MDC.
  57. config EXAMPLE_ETH_MDIO_GPIO
  58. int "SMI MDIO GPIO number"
  59. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  60. default 18
  61. help
  62. Set the GPIO number used by SMI MDIO.
  63. config EXAMPLE_ETH_PHY_RST_GPIO
  64. int "PHY Reset GPIO number"
  65. range -1 ENV_GPIO_OUT_RANGE_MAX
  66. default 5
  67. help
  68. Set the GPIO number used to reset PHY chip.
  69. Set to -1 to disable PHY chip hardware reset.
  70. config EXAMPLE_ETH_PHY_ADDR
  71. int "PHY Address"
  72. range 0 31
  73. default 1
  74. help
  75. Set PHY address according your board schematic.
  76. endif # EXAMPLE_USE_INTERNAL_ETHERNET
  77. config EXAMPLE_USE_SPI_ETHERNET
  78. bool "SPI Ethernet"
  79. default y
  80. select ETH_USE_SPI_ETHERNET
  81. help
  82. Use external SPI-Ethernet module(s).
  83. if EXAMPLE_USE_SPI_ETHERNET
  84. config EXAMPLE_SPI_ETHERNETS_NUM
  85. int "Number of SPI Ethernet modules to use at a time"
  86. range 1 2
  87. default 1
  88. help
  89. Set the number of SPI Ethernet modules you want to use at a time. Multiple SPI modules can be connected
  90. to one SPI interface and can be separately accessed based on state of associated Chip Select (CS).
  91. choice EXAMPLE_ETHERNET_TYPE_SPI
  92. prompt "Ethernet SPI"
  93. default EXAMPLE_USE_W5500
  94. help
  95. Select which kind of Ethernet will be used in the example.
  96. config EXAMPLE_USE_DM9051
  97. bool "DM9051 Module"
  98. select ETH_SPI_ETHERNET_DM9051
  99. help
  100. Select external SPI-Ethernet module (DM9051).
  101. config EXAMPLE_USE_KSZ8851SNL
  102. bool "KSZ8851SNL Module"
  103. select ETH_SPI_ETHERNET_KSZ8851SNL
  104. help
  105. Select external SPI-Ethernet module (KSZ8851SNL).
  106. config EXAMPLE_USE_W5500
  107. bool "W5500 Module"
  108. select ETH_SPI_ETHERNET_W5500
  109. help
  110. Select external SPI-Ethernet module (W5500).
  111. endchoice
  112. config EXAMPLE_ETH_SPI_HOST
  113. int "SPI Host Number"
  114. range 0 2
  115. default 1
  116. help
  117. Set the SPI host used to communicate with the SPI Ethernet Controller.
  118. config EXAMPLE_ETH_SPI_SCLK_GPIO
  119. int "SPI SCLK GPIO number"
  120. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  121. default 14 if IDF_TARGET_ESP32
  122. default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  123. default 6 if IDF_TARGET_ESP32C3
  124. help
  125. Set the GPIO number used by SPI SCLK.
  126. config EXAMPLE_ETH_SPI_MOSI_GPIO
  127. int "SPI MOSI GPIO number"
  128. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  129. default 13 if IDF_TARGET_ESP32
  130. default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  131. default 7 if IDF_TARGET_ESP32C3
  132. help
  133. Set the GPIO number used by SPI MOSI.
  134. config EXAMPLE_ETH_SPI_MISO_GPIO
  135. int "SPI MISO GPIO number"
  136. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  137. default 12 if IDF_TARGET_ESP32
  138. default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  139. default 2 if IDF_TARGET_ESP32C3
  140. help
  141. Set the GPIO number used by SPI MISO.
  142. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  143. int "SPI clock speed (MHz)"
  144. range 5 80
  145. default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3
  146. default 36 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  147. help
  148. Set the clock speed (MHz) of SPI interface.
  149. config EXAMPLE_ETH_SPI_CS0_GPIO
  150. int "SPI CS0 GPIO number for SPI Ethernet module #1"
  151. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  152. default 15 if IDF_TARGET_ESP32
  153. default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  154. help
  155. Set the GPIO number used by SPI CS0, i.e. Chip Select associated with the first SPI Eth module).
  156. config EXAMPLE_ETH_SPI_CS1_GPIO
  157. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  158. int "SPI CS1 GPIO number for SPI Ethernet module #2"
  159. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  160. default 32 if IDF_TARGET_ESP32
  161. default 7 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  162. default 8 if IDF_TARGET_ESP32C3
  163. help
  164. Set the GPIO number used by SPI CS1, i.e. Chip Select associated with the second SPI Eth module.
  165. config EXAMPLE_ETH_SPI_INT0_GPIO
  166. int "Interrupt GPIO number SPI Ethernet module #1"
  167. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  168. default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  169. help
  170. Set the GPIO number used by the first SPI Ethernet module interrupt line.
  171. config EXAMPLE_ETH_SPI_INT1_GPIO
  172. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  173. int "Interrupt GPIO number SPI Ethernet module #2"
  174. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  175. default 33 if IDF_TARGET_ESP32
  176. default 5 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  177. help
  178. Set the GPIO number used by the second SPI Ethernet module interrupt line.
  179. config EXAMPLE_ETH_SPI_PHY_RST0_GPIO
  180. int "PHY Reset GPIO number of SPI Ethernet Module #1"
  181. range -1 ENV_GPIO_OUT_RANGE_MAX
  182. default -1
  183. help
  184. Set the GPIO number used to reset PHY chip on the first SPI Ethernet module.
  185. Set to -1 to disable PHY chip hardware reset.
  186. config EXAMPLE_ETH_SPI_PHY_RST1_GPIO
  187. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  188. int "PHY Reset GPIO number of SPI Ethernet Module #2"
  189. range -1 ENV_GPIO_OUT_RANGE_MAX
  190. default -1
  191. help
  192. Set the GPIO number used to reset PHY chip on the second SPI Ethernet module.
  193. Set to -1 to disable PHY chip hardware reset.
  194. config EXAMPLE_ETH_SPI_PHY_ADDR0
  195. int "PHY Address of SPI Ethernet Module #1"
  196. range 0 31
  197. default 1
  198. help
  199. Set the first SPI Ethernet module PHY address according your board schematic.
  200. config EXAMPLE_ETH_SPI_PHY_ADDR1
  201. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  202. int "PHY Address of SPI Ethernet Module #2"
  203. range 0 31
  204. default 1
  205. help
  206. Set the second SPI Ethernet module PHY address according your board schematic.
  207. endif # EXAMPLE_USE_SPI_ETHERNET
  208. endmenu