From 064f58e7aac5af690838a107c8543f60877bbf16 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Fri, 7 Aug 2020 18:50:23 +0200 Subject: [PATCH] boards/esp32: add ESP32-Ethernet-Kit v1.2 board --- boards/esp32-ethernet-kit-v1_0/doc_common.txt | 1 + boards/esp32-ethernet-kit-v1_2/Kconfig | 22 +++++ boards/esp32-ethernet-kit-v1_2/Makefile | 2 + boards/esp32-ethernet-kit-v1_2/Makefile.dep | 1 + .../esp32-ethernet-kit-v1_2/Makefile.features | 1 + .../esp32-ethernet-kit-v1_2/Makefile.include | 3 + boards/esp32-ethernet-kit-v1_2/doc.txt | 87 +++++++++++++++++++ cpu/esp32/Kconfig | 4 + 8 files changed, 121 insertions(+) create mode 100644 boards/esp32-ethernet-kit-v1_2/Kconfig create mode 100644 boards/esp32-ethernet-kit-v1_2/Makefile create mode 100644 boards/esp32-ethernet-kit-v1_2/Makefile.dep create mode 100644 boards/esp32-ethernet-kit-v1_2/Makefile.features create mode 100644 boards/esp32-ethernet-kit-v1_2/Makefile.include create mode 100644 boards/esp32-ethernet-kit-v1_2/doc.txt diff --git a/boards/esp32-ethernet-kit-v1_0/doc_common.txt b/boards/esp32-ethernet-kit-v1_0/doc_common.txt index c6833fef5e..2c8dc5bae8 100644 --- a/boards/esp32-ethernet-kit-v1_0/doc_common.txt +++ b/boards/esp32-ethernet-kit-v1_0/doc_common.txt @@ -35,6 +35,7 @@ Furthermore, some GPIOs are broken out for extension. The USB bridge based on FD There are different revisions of the board: - \ref boards_esp32_esp-ethernet-kit-v1_0 - \ref boards_esp32_esp-ethernet-kit-v1_1 +- \ref boards_esp32_esp-ethernet-kit-v1_2 ## Hardware    [[TOC](#toc)] diff --git a/boards/esp32-ethernet-kit-v1_2/Kconfig b/boards/esp32-ethernet-kit-v1_2/Kconfig new file mode 100644 index 0000000000..466524964e --- /dev/null +++ b/boards/esp32-ethernet-kit-v1_2/Kconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2020 HAW Hamburg +# Copyright (c) 2020 Google LLC +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "esp32-ethernet-kit-v1_2" if BOARD_ESP32_ETHERNET_KIT_V1_2 + +config BOARD_ESP32_ETHERNET_KIT_V1_2 + bool + default y + select BOARD_COMMON_ESP32 + select CPU_MODEL_ESP32_WROVER_E + select HAS_ESP_SPI_RAM + select HAS_PERIPH_ADC + select HAS_PERIPH_ETH + select HAS_PERIPH_I2C + select HAS_PERIPH_PWM + +source "$(RIOTBOARD)/common/esp32/Kconfig" diff --git a/boards/esp32-ethernet-kit-v1_2/Makefile b/boards/esp32-ethernet-kit-v1_2/Makefile new file mode 100644 index 0000000000..6540e80666 --- /dev/null +++ b/boards/esp32-ethernet-kit-v1_2/Makefile @@ -0,0 +1,2 @@ +DIRS = $(RIOTBOARD)/esp32-ethernet-kit-v1_0 +include $(RIOTBASE)/Makefile.base diff --git a/boards/esp32-ethernet-kit-v1_2/Makefile.dep b/boards/esp32-ethernet-kit-v1_2/Makefile.dep new file mode 100644 index 0000000000..a9e4aaaf8a --- /dev/null +++ b/boards/esp32-ethernet-kit-v1_2/Makefile.dep @@ -0,0 +1 @@ +include $(RIOTBOARD)/esp32-ethernet-kit-v1_0/Makefile.dep diff --git a/boards/esp32-ethernet-kit-v1_2/Makefile.features b/boards/esp32-ethernet-kit-v1_2/Makefile.features new file mode 100644 index 0000000000..bffae42372 --- /dev/null +++ b/boards/esp32-ethernet-kit-v1_2/Makefile.features @@ -0,0 +1 @@ +include $(RIOTBOARD)/esp32-ethernet-kit-v1_0/Makefile.features diff --git a/boards/esp32-ethernet-kit-v1_2/Makefile.include b/boards/esp32-ethernet-kit-v1_2/Makefile.include new file mode 100644 index 0000000000..9410f3e3ad --- /dev/null +++ b/boards/esp32-ethernet-kit-v1_2/Makefile.include @@ -0,0 +1,3 @@ + +INCLUDES += -I$(RIOTBOARD)/esp32-ethernet-kit-v1_0/include +include $(RIOTBOARD)/esp32-ethernet-kit-v1_0/Makefile.include diff --git a/boards/esp32-ethernet-kit-v1_2/doc.txt b/boards/esp32-ethernet-kit-v1_2/doc.txt new file mode 100644 index 0000000000..a7eab5668e --- /dev/null +++ b/boards/esp32-ethernet-kit-v1_2/doc.txt @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2018 Gunar Schorcht + * Copyright (C) 2020 Google LLC + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @defgroup boards_esp32_esp-ethernet-kit-v1_2 v1.2 Board + * @ingroup boards_esp32_esp-ethernet-kit + * @brief Support for for Espressif ESP32-Ethernet-Kit v1.2 + * @author Gunar Schorcht + * @author Erik Ekman + +## Table of Contents + +1. [Overview](#overview) +2. [Hardware](#hardware) + 1. [Board Configuration](#board_configuration) + 2. [Board Pinout](#pinout) +3. [Other Documentation Resources](#other-resources) + +## Overview    [[TOC](#toc)] + +The Espressif [ESP32-Ethernet-Kit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html) is a development board that uses the ESP32-WROVER-E module. Most important features of the board are + +- 100 Mbps Ethernet via IP101G PHY +- USB bridge with JTAG interface + +Furthermore, some GPIOs are broken out for extension. The USB bridge based on FDI FT2232HL provides a JTAG interface for OCD debugging through the USB interface. +For flashing and debugging the board, see \ref boards_esp32_esp-ethernet-kit common board documentation. + +## Hardware    [[TOC](#toc)] + +This section describes + +- the default [board configuration](#board_configuration), +- the [board pinout](#pinout). + +### Board Configuration    [[TOC](#toc)] + +ESP32-Ethernet-Kit v1.2 has the following on-board components + +- 100 Mbps Ethernet via IP101G PHY +- USB bridge with JTAG interface + +For detailed information about the configuration of ESP32 boards, see +section Peripherals in \ref esp32_riot. + +@note +Only a few GPIOs are broken out and available for external hardware on ESP32-Ethernet-Kit boards. Which GPIOs are available as peripherals depends on used modules. + +
+\anchor esp32_ethernet_kit_v1_2_table_board_configuration +Function | GPIOs | Remarks |Configuration +:---------------|:-------|:--------|:---------------------------------- +BTN0 | GPIO0 | not available if `esp_eth` is used | | +ADC | GPIO34, GPIO35, GPIO36, GPIO39 | | \ref esp32_adc_channels "ADC Channels" +DAC | - | | \ref esp32_dac_channels "DAC Channels" +PWM_DEV(0) | GPIO2, GPIO4 | | \ref esp32_pwm_channels "PWM Channels" +I2C_DEV(0):SDA | GPIO32 | | \ref esp32_i2c_interfaces "I2C Interfaces" +I2C_DEV(0):SCL | GPIO33 | | \ref esp32_i2c_interfaces "I2C Interfaces" +SPI_DEV(0):CLK | GPIO14 | HSPI is used | \ref esp32_spi_interfaces "SPI Interfaces" +SPI_DEV(0):MISO | GPIO12 | HSPI is used | \ref esp32_spi_interfaces "SPI Interfaces" +SPI_DEV(0):MOSI | GPIO13 | HSPI is used | \ref esp32_spi_interfaces "SPI Interfaces" +SPI_DEV(0):CS0 | GPIO15 | HSPI is used | \ref esp32_spi_interfaces "SPI Interfaces" +UART_DEV(0):TxD | GPIO1 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces" +UART_DEV(0):RxD | GPIO3 | Console (configuration is fixed) | \ref esp32_uart_interfaces "UART interfaces" +
+ +@note +- SPI_DEV(0) is not available if module `esp_jtag` is used. For the SPI_DEV(0) pins to work properly, the function switches (DIP switches) for the JTAG signals must be set to OFF. + +### Board Pinout    [[TOC](#toc)] + +The board schematic can be found [here](https://dl.espressif.com/dl/schematics/SCH_ESP32-Ethernet-Kit_A_V1.2_20200528.pdf). + +By default, only 4 bidirectional GPIO pins are unused: GPIO2, GPIO4, GPIO32, GPIO33. The suggested configuration is for PWM +and I2C, but they can also be used for SPI or another serial port. By disabling the JTAG interface on the board, +another 4 GPIOs can be made available (GPIO12, GPIO13, GPIO14, GPIO15). + +## Other Documentation Resources    [[TOC](#toc)] + +There is a comprehensive [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html) for the ESP32-Ethernet-Kit with a lot information about hardware configuration. + */ diff --git a/cpu/esp32/Kconfig b/cpu/esp32/Kconfig index a71aae7742..1ef66b43a5 100644 --- a/cpu/esp32/Kconfig +++ b/cpu/esp32/Kconfig @@ -32,6 +32,10 @@ config CPU_MODEL_ESP32_WROVER_B bool select CPU_FAM_ESP32 +config CPU_MODEL_ESP32_WROVER_E + bool + select CPU_FAM_ESP32 + config CPU_MODEL_ESP32_D0WD bool select CPU_FAM_ESP32