Kconfig.projbuild 10.0 KB

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