gpio: syscon: Add support for Altera FPGA manager GPIO
diff mbox series

Message ID 20181003225329.21686-1-marex@denx.de
State New
Headers show
Series
  • gpio: syscon: Add support for Altera FPGA manager GPIO
Related show

Commit Message

Marek Vasut Oct. 3, 2018, 10:53 p.m. UTC
Add description of the GPI / GPO block in the Altera SoCFPGA FPGA manager.
The GPIO block in the FPGA manager has two 32bit registers, one for setting
32 GPOs and another one for reading 32 GPIs, both of which can be mapped to
separate physical pads.

Signed-off-by: Marek Vasut <marex@denx.de>
---
 drivers/gpio/gpio-syscon.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Linus Walleij Oct. 10, 2018, 8:36 a.m. UTC | #1
Hi Marek,

thanks for the patch, it looks fine per se, but

On Thu, Oct 4, 2018 at 12:53 AM Marek Vasut <marex@denx.de> wrote:

> +       {
> +               .compatible     = "altr,fpga-mgr-gpio",
> +               .data           = &altera_fpga_mgr_gpio,

git grep 'altr,fpga-mgr-gpio'

yields nothing?

Where are the bindings for this thing?

Yours,
Linus Walleij
Marek Vasut Oct. 10, 2018, 7:23 p.m. UTC | #2
On 10/10/2018 10:36 AM, Linus Walleij wrote:
> Hi Marek,

Hi!

> thanks for the patch, it looks fine per se, but
> 
> On Thu, Oct 4, 2018 at 12:53 AM Marek Vasut <marex@denx.de> wrote:
> 
>> +       {
>> +               .compatible     = "altr,fpga-mgr-gpio",
>> +               .data           = &altera_fpga_mgr_gpio,
> 
> git grep 'altr,fpga-mgr-gpio'
> 
> yields nothing?
> 
> Where are the bindings for this thing?

In your mailbox roughly about now. Thanks for the reminder :)
Dinh Nguyen Nov. 9, 2018, 4:09 p.m. UTC | #3
Hi!

On 10/10/18 2:23 PM, Marek Vasut wrote:
> On 10/10/2018 10:36 AM, Linus Walleij wrote:
>> Hi Marek,
> 
> Hi!
> 
>> thanks for the patch, it looks fine per se, but
>>
>> On Thu, Oct 4, 2018 at 12:53 AM Marek Vasut <marex@denx.de> wrote:
>>
>>> +       {
>>> +               .compatible     = "altr,fpga-mgr-gpio",
>>> +               .data           = &altera_fpga_mgr_gpio,
>>
>> git grep 'altr,fpga-mgr-gpio'
>>
>> yields nothing?
>>
>> Where are the bindings for this thing?
> 
> In your mailbox roughly about now. Thanks for the reminder :)
> 

Just wondering if this patch will get applied for v5.0? I've taken the
DTS patches for this.

Thanks,
Dinh
Linus Walleij Nov. 16, 2018, 10:04 p.m. UTC | #4
On Fri, Nov 9, 2018 at 5:09 PM Dinh Nguyen <dinguyen@kernel.org> wrote:

> Just wondering if this patch will get applied for v5.0? I've taken the
> DTS patches for this.

I have not seen an ACKed (by Rob Herring) patch for the DT bindings,
if I missed it, I am sorry :(

Please point it out if I should just apply it and this patch.

Yours,
Linus Walleij
Marek Vasut Nov. 17, 2018, 12:08 a.m. UTC | #5
On 11/09/2018 05:09 PM, Dinh Nguyen wrote:
> Hi!
> 
> On 10/10/18 2:23 PM, Marek Vasut wrote:
>> On 10/10/2018 10:36 AM, Linus Walleij wrote:
>>> Hi Marek,
>>
>> Hi!
>>
>>> thanks for the patch, it looks fine per se, but
>>>
>>> On Thu, Oct 4, 2018 at 12:53 AM Marek Vasut <marex@denx.de> wrote:
>>>
>>>> +       {
>>>> +               .compatible     = "altr,fpga-mgr-gpio",
>>>> +               .data           = &altera_fpga_mgr_gpio,
>>>
>>> git grep 'altr,fpga-mgr-gpio'
>>>
>>> yields nothing?
>>>
>>> Where are the bindings for this thing?
>>
>> In your mailbox roughly about now. Thanks for the reminder :)
>>
> 
> Just wondering if this patch will get applied for v5.0? I've taken the
> DTS patches for this.

The DT patch needs some adjustments, it's on my list, but didn't get
around to it yet.

Patch
diff mbox series

diff --git a/drivers/gpio/gpio-syscon.c b/drivers/gpio/gpio-syscon.c
index 7f3da34c7874..b90ee759d150 100644
--- a/drivers/gpio/gpio-syscon.c
+++ b/drivers/gpio/gpio-syscon.c
@@ -193,6 +193,13 @@  static const struct syscon_gpio_data keystone_dsp_gpio = {
 	.set		= keystone_gpio_set,
 };
 
+static const struct syscon_gpio_data altera_fpga_mgr_gpio = {
+	/* ARM Altera SoCFPGA FPGA manager GPIO block */
+	.compatible	= NULL,
+	.flags		= GPIO_SYSCON_FEAT_IN | GPIO_SYSCON_FEAT_OUT,
+	.bit_count	= 64,
+};
+
 static const struct of_device_id syscon_gpio_ids[] = {
 	{
 		.compatible	= "cirrus,ep7209-mctrl-gpio",
@@ -206,6 +213,10 @@  static const struct of_device_id syscon_gpio_ids[] = {
 		.compatible	= "rockchip,rk3328-grf-gpio",
 		.data		= &rockchip_rk3328_gpio_mute,
 	},
+	{
+		.compatible	= "altr,fpga-mgr-gpio",
+		.data		= &altera_fpga_mgr_gpio,
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(of, syscon_gpio_ids);