diff --git a/arch/arm/soc/arm/beetle/soc.h b/arch/arm/soc/arm/beetle/soc.h index 8bd2ee45984..b7949698fcd 100644 --- a/arch/arm/soc/arm/beetle/soc.h +++ b/arch/arm/soc/arm/beetle/soc.h @@ -100,12 +100,6 @@ /* System Control Register (SYSCON) */ #define __BEETLE_SYSCON ((volatile struct syscon *)_BEETLE_SYSCON_BASE) -/* CMSDK AHB General Purpose Input/Output (GPIO) */ -#define CMSDK_AHB_GPIO0 _BEETLE_GPIO0_BASE -#define CMSDK_AHB_GPIO1 _BEETLE_GPIO1_BASE -#define CMSDK_AHB_GPIO2 _BEETLE_GPIO2_BASE -#define CMSDK_AHB_GPIO3 _BEETLE_GPIO3_BASE - #endif /* !_ASMLANGUAGE */ #endif /* _ARM_BEETLE_SOC_H_ */ diff --git a/dts/arm/v2m_beetle.dts b/dts/arm/v2m_beetle.dts index 4a894302aff..05ae6de4bac 100644 --- a/dts/arm/v2m_beetle.dts +++ b/dts/arm/v2m_beetle.dts @@ -66,6 +66,30 @@ compatible = "arm,cmsdk-watchdog"; reg = <0x40008000 0x1000>; }; + + gpio0: gpio@40010000 { + compatible = "arm,cmsdk-gpio"; + reg = <0x40010000 0x1000>; + interrupts = ; + }; + + gpio1: gpio@40011000 { + compatible = "arm,cmsdk-gpio"; + reg = <0x40011000 0x1000>; + interrupts = ; + }; + + gpio2: gpio@40012000 { + compatible = "arm,cmsdk-gpio"; + reg = <0x40012000 0x1000>; + interrupts = ; + }; + + gpio3: gpio@40013000 { + compatible = "arm,cmsdk-gpio"; + reg = <0x40013000 0x1000>; + interrupts = ; + }; }; }; diff --git a/dts/arm/v2m_beetle.fixup b/dts/arm/v2m_beetle.fixup index 89fd110c47a..b96d42e823d 100644 --- a/dts/arm/v2m_beetle.fixup +++ b/dts/arm/v2m_beetle.fixup @@ -24,3 +24,12 @@ /* CMSDK APB Watchdog */ #define CMSDK_APB_WDOG ARM_CMSDK_WATCHDOG_40008000_BASE_ADDRESS_0 + +/* CMSDK AHB General Purpose Input/Output (GPIO) */ +#define CMSDK_AHB_GPIO0 ARM_CMSDK_GPIO_40010000_BASE_ADDRESS_0 + +#define CMSDK_AHB_GPIO1 ARM_CMSDK_GPIO_40011000_BASE_ADDRESS_0 + +#define CMSDK_AHB_GPIO2 ARM_CMSDK_GPIO_40012000_BASE_ADDRESS_0 + +#define CMSDK_AHB_GPIO3 ARM_CMSDK_GPIO_40013000_BASE_ADDRESS_0 diff --git a/dts/arm/yaml/arm,cmsdk-gpio.yaml b/dts/arm/yaml/arm,cmsdk-gpio.yaml new file mode 100644 index 00000000000..dfe65a7addd --- /dev/null +++ b/dts/arm/yaml/arm,cmsdk-gpio.yaml @@ -0,0 +1,27 @@ +--- +title: ARM CMSDK GPIO +id: arm,cmsdk-gpio +version: 0.1 + +description: > + This binding gives a base representation of the ARM CMSDK GPIO + +properties: + - compatible: + type: string + category: required + description: compatible strings + constraint: "arm,cmsdk-gpio" + + - reg: + type: array + description: mmio register space + generation: define + category: required + + - interrupts: + type: array + category: required + description: required interrupts + generation: define +...