esp32s2: drivers: gpio: add gpio support
through the reuse of current gpio driver. Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
This commit is contained in:
parent
2c031caed0
commit
2689a6ee0a
|
@ -18,6 +18,9 @@ CONFIG_XTENSA_USE_CORE_CRT1=n
|
|||
CONFIG_PINMUX=y
|
||||
CONFIG_PINMUX_ESP32=y
|
||||
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_GPIO_ESP32=y
|
||||
|
||||
CONFIG_GEN_ISR_TABLES=y
|
||||
CONFIG_GEN_IRQ_VECTOR_TABLE=n
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
menuconfig GPIO_ESP32
|
||||
bool "ESP32 GPIO"
|
||||
depends on SOC_ESP32
|
||||
depends on SOC_ESP32 || SOC_ESP32S2
|
||||
help
|
||||
Enables the ESP32 GPIO driver
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <mem.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/esp32s2-xtensa-intmux.h>
|
||||
|
||||
/ {
|
||||
|
@ -52,6 +53,28 @@
|
|||
compatible = "espressif,esp32-pinmux";
|
||||
reg = <0x3f409000 0x94>;
|
||||
};
|
||||
|
||||
gpio0: gpio@3f404000 {
|
||||
compatible = "espressif,esp32-gpio";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
reg = <0x3f404000 0x800>;
|
||||
interrupts = <GPIO_INTR_SOURCE>;
|
||||
interrupt-parent = <&intc>;
|
||||
label = "GPIO_0";
|
||||
ngpios = <32>; /* 0..31 */
|
||||
};
|
||||
|
||||
gpio1: gpio@3f404800 {
|
||||
compatible = "espressif,esp32-gpio";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
reg = <0x3f404800 0x800>;
|
||||
interrupts = <GPIO_INTR_SOURCE>;
|
||||
interrupt-parent = <&intc>;
|
||||
label = "GPIO_1";
|
||||
ngpios = <22>; /* 32..53 */
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <soc/syscon_reg.h>
|
||||
#include <soc/system_reg.h>
|
||||
#include <soc/dport_access.h>
|
||||
#include <soc/soc_caps.h>
|
||||
#include <esp32s2/rom/ets_sys.h>
|
||||
#include <esp32s2/rom/spi_flash.h>
|
||||
#include <esp32s2/rom/cache.h>
|
||||
|
|
Loading…
Reference in New Issue