diff mbox series

ARC: [plat-hsdk] Enable DW APB GPIO support

Message ID 20181023120919.11627-1-Eugeniy.Paltsev@synopsys.com
State New
Headers show
Series ARC: [plat-hsdk] Enable DW APB GPIO support | expand

Commit Message

Eugeniy Paltsev Oct. 23, 2018, 12:09 p.m. UTC
Enable GPIO support on HSDK. HSDK SoC includes Synopsys
DesignWare DW_apb_gpio IP with 24 GPIOs mapped onto port A.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
 arch/arc/boot/dts/hsdk.dts      | 15 +++++++++++++++
 arch/arc/configs/hsdk_defconfig |  3 +++
 2 files changed, 18 insertions(+)

Comments

Vineet Gupta Oct. 30, 2018, 5:25 p.m. UTC | #1
On 10/23/18 5:09 AM, Eugeniy Paltsev wrote:
> Enable GPIO support on HSDK. HSDK SoC includes Synopsys
> DesignWare DW_apb_gpio IP with 24 GPIOs mapped onto port A.
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

@Alexey, u happy with this ?

-Vineet

> ---
>  arch/arc/boot/dts/hsdk.dts      | 15 +++++++++++++++
>  arch/arc/configs/hsdk_defconfig |  3 +++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts
> index ef149f59929a..43f17b51ee89 100644
> --- a/arch/arc/boot/dts/hsdk.dts
> +++ b/arch/arc/boot/dts/hsdk.dts
> @@ -222,6 +222,21 @@
>  			bus-width = <4>;
>  			dma-coherent;
>  		};
> +
> +		gpio: gpio@3000 {
> +			compatible = "snps,dw-apb-gpio";
> +			reg = <0x3000 0x20>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			gpio_port_a: gpio-controller@0 {
> +				compatible = "snps,dw-apb-gpio-port";
> +				gpio-controller;
> +				#gpio-cells = <2>;
> +				snps,nr-gpios = <24>;
> +				reg = <0>;
> +			};
> +		};
>  	};
>  
>  	memory@80000000 {
> diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig
> index 1dec2b4bc5e6..eca10b8baea5 100644
> --- a/arch/arc/configs/hsdk_defconfig
> +++ b/arch/arc/configs/hsdk_defconfig
> @@ -45,6 +45,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
>  CONFIG_SERIAL_8250_DW=y
>  CONFIG_SERIAL_OF_PLATFORM=y
>  # CONFIG_HW_RANDOM is not set
> +CONFIG_GPIOLIB=y
> +CONFIG_GPIO_SYSFS=y
> +CONFIG_GPIO_DWAPB=y
>  # CONFIG_HWMON is not set
>  CONFIG_DRM=y
>  # CONFIG_DRM_FBDEV_EMULATION is not set
>
Alexey Brodkin Oct. 31, 2018, 6:59 p.m. UTC | #2
Hi Vineet,

On Tue, 2018-10-30 at 10:25 -0700, Vineet Gupta wrote:
> On 10/23/18 5:09 AM, Eugeniy Paltsev wrote:
> > Enable GPIO support on HSDK. HSDK SoC includes Synopsys
> > DesignWare DW_apb_gpio IP with 24 GPIOs mapped onto port A.
> > 
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> 
> @Alexey, u happy with this ?
> 
> -Vineet

Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
diff mbox series

Patch

diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts
index ef149f59929a..43f17b51ee89 100644
--- a/arch/arc/boot/dts/hsdk.dts
+++ b/arch/arc/boot/dts/hsdk.dts
@@ -222,6 +222,21 @@ 
 			bus-width = <4>;
 			dma-coherent;
 		};
+
+		gpio: gpio@3000 {
+			compatible = "snps,dw-apb-gpio";
+			reg = <0x3000 0x20>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			gpio_port_a: gpio-controller@0 {
+				compatible = "snps,dw-apb-gpio-port";
+				gpio-controller;
+				#gpio-cells = <2>;
+				snps,nr-gpios = <24>;
+				reg = <0>;
+			};
+		};
 	};
 
 	memory@80000000 {
diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig
index 1dec2b4bc5e6..eca10b8baea5 100644
--- a/arch/arc/configs/hsdk_defconfig
+++ b/arch/arc/configs/hsdk_defconfig
@@ -45,6 +45,9 @@  CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HW_RANDOM is not set
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_DWAPB=y
 # CONFIG_HWMON is not set
 CONFIG_DRM=y
 # CONFIG_DRM_FBDEV_EMULATION is not set