Kconfig.projbuild 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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_KSZ8041
  51. bool "KSZ8041"
  52. help
  53. The KSZ8041 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  54. Goto https://www.microchip.com/wwwproducts/en/KSZ8041 for more information about it.
  55. config EXAMPLE_ETH_PHY_KSZ8081
  56. bool "KSZ8081"
  57. help
  58. The KSZ8081 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  59. Goto https://www.microchip.com/wwwproducts/en/KSZ8081 for more information about it.
  60. endchoice # EXAMPLE_ETH_PHY_MODEL
  61. config EXAMPLE_ETH_MDC_GPIO
  62. int "SMI MDC GPIO number"
  63. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  64. default 23
  65. help
  66. Set the GPIO number used by SMI MDC.
  67. config EXAMPLE_ETH_MDIO_GPIO
  68. int "SMI MDIO GPIO number"
  69. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  70. default 18
  71. help
  72. Set the GPIO number used by SMI MDIO.
  73. config EXAMPLE_ETH_PHY_RST_GPIO
  74. int "PHY Reset GPIO number"
  75. range -1 EXAMPLE_GPIO_RANGE_MAX
  76. default 5
  77. help
  78. Set the GPIO number used to reset PHY chip.
  79. Set to -1 to disable PHY chip hardware reset.
  80. config EXAMPLE_ETH_PHY_ADDR
  81. int "PHY Address"
  82. range 0 31
  83. default 1
  84. help
  85. Set PHY address according your board schematic.
  86. endif # EXAMPLE_USE_INTERNAL_ETHERNET
  87. config EXAMPLE_USE_SPI_ETHERNET
  88. bool "SPI Ethernet"
  89. default y
  90. select ETH_USE_SPI_ETHERNET
  91. help
  92. Use external SPI-Ethernet module(s).
  93. if EXAMPLE_USE_SPI_ETHERNET
  94. config EXAMPLE_SPI_ETHERNETS_NUM
  95. int "Number of SPI Ethernet modules to use at a time"
  96. range 1 2
  97. default 1
  98. help
  99. Set the number of SPI Ethernet modules you want to use at a time. Multiple SPI modules can be connected
  100. to one SPI interface and can be separately accessed based on state of associated Chip Select (CS).
  101. choice EXAMPLE_ETHERNET_TYPE_SPI
  102. prompt "Ethernet SPI"
  103. default EXAMPLE_USE_W5500
  104. help
  105. Select which kind of Ethernet will be used in the example.
  106. config EXAMPLE_USE_DM9051
  107. bool "DM9051 Module"
  108. select ETH_SPI_ETHERNET_DM9051
  109. help
  110. Select external SPI-Ethernet module (DM9051).
  111. config EXAMPLE_USE_KSZ8851SNL
  112. bool "KSZ8851SNL Module"
  113. select ETH_SPI_ETHERNET_KSZ8851SNL
  114. help
  115. Select external SPI-Ethernet module (KSZ8851SNL).
  116. config EXAMPLE_USE_W5500
  117. bool "W5500 Module"
  118. select ETH_SPI_ETHERNET_W5500
  119. help
  120. Select external SPI-Ethernet module (W5500).
  121. endchoice
  122. config EXAMPLE_ETH_SPI_HOST
  123. int "SPI Host Number"
  124. range 0 2
  125. default 1
  126. help
  127. Set the SPI host used to communicate with the SPI Ethernet Controller.
  128. config EXAMPLE_ETH_SPI_SCLK_GPIO
  129. int "SPI SCLK GPIO number"
  130. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  131. default 14 if IDF_TARGET_ESP32
  132. default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  133. default 6 if IDF_TARGET_ESP32C3
  134. help
  135. Set the GPIO number used by SPI SCLK.
  136. config EXAMPLE_ETH_SPI_MOSI_GPIO
  137. int "SPI MOSI GPIO number"
  138. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  139. default 13 if IDF_TARGET_ESP32
  140. default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  141. default 7 if IDF_TARGET_ESP32C3
  142. help
  143. Set the GPIO number used by SPI MOSI.
  144. config EXAMPLE_ETH_SPI_MISO_GPIO
  145. int "SPI MISO GPIO number"
  146. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  147. default 12 if IDF_TARGET_ESP32
  148. default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  149. default 2 if IDF_TARGET_ESP32C3
  150. help
  151. Set the GPIO number used by SPI MISO.
  152. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  153. int "SPI clock speed (MHz)"
  154. range 5 80
  155. default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3
  156. default 36 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  157. help
  158. Set the clock speed (MHz) of SPI interface.
  159. config EXAMPLE_ETH_SPI_CS0_GPIO
  160. int "SPI CS0 GPIO number for SPI Ethernet module #1"
  161. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  162. default 15 if IDF_TARGET_ESP32
  163. default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  164. help
  165. Set the GPIO number used by SPI CS0, i.e. Chip Select associated with the first SPI Eth module).
  166. config EXAMPLE_ETH_SPI_CS1_GPIO
  167. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  168. int "SPI CS1 GPIO number for SPI Ethernet module #2"
  169. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  170. default 32 if IDF_TARGET_ESP32
  171. default 7 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  172. default 8 if IDF_TARGET_ESP32C3
  173. help
  174. Set the GPIO number used by SPI CS1, i.e. Chip Select associated with the second SPI Eth module.
  175. config EXAMPLE_ETH_SPI_INT0_GPIO
  176. int "Interrupt GPIO number SPI Ethernet module #1"
  177. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  178. default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  179. help
  180. Set the GPIO number used by the first SPI Ethernet module interrupt line.
  181. config EXAMPLE_ETH_SPI_INT1_GPIO
  182. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  183. int "Interrupt GPIO number SPI Ethernet module #2"
  184. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  185. default 33 if IDF_TARGET_ESP32
  186. default 5 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  187. help
  188. Set the GPIO number used by the second SPI Ethernet module interrupt line.
  189. config EXAMPLE_ETH_SPI_PHY_RST0_GPIO
  190. int "PHY Reset GPIO number of SPI Ethernet Module #1"
  191. range -1 EXAMPLE_GPIO_RANGE_MAX
  192. default -1
  193. help
  194. Set the GPIO number used to reset PHY chip on the first SPI Ethernet module.
  195. Set to -1 to disable PHY chip hardware reset.
  196. config EXAMPLE_ETH_SPI_PHY_RST1_GPIO
  197. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  198. int "PHY Reset GPIO number of SPI Ethernet Module #2"
  199. range -1 EXAMPLE_GPIO_RANGE_MAX
  200. default -1
  201. help
  202. Set the GPIO number used to reset PHY chip on the second SPI Ethernet module.
  203. Set to -1 to disable PHY chip hardware reset.
  204. config EXAMPLE_ETH_SPI_PHY_ADDR0
  205. int "PHY Address of SPI Ethernet Module #1"
  206. range 0 31
  207. default 1
  208. help
  209. Set the first SPI Ethernet module PHY address according your board schematic.
  210. config EXAMPLE_ETH_SPI_PHY_ADDR1
  211. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  212. int "PHY Address of SPI Ethernet Module #2"
  213. range 0 31
  214. default 1
  215. help
  216. Set the second SPI Ethernet module PHY address according your board schematic.
  217. endif # EXAMPLE_USE_SPI_ETHERNET
  218. endmenu