From patchwork Wed Oct 3 22:53:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 978593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42QWXF4d67z9s7h for ; Thu, 4 Oct 2018 08:53:33 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725799AbeJDFn5 (ORCPT ); Thu, 4 Oct 2018 01:43:57 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:55265 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725723AbeJDFn4 (ORCPT ); Thu, 4 Oct 2018 01:43:56 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 42QWXC3WLBz1qtfD; Thu, 4 Oct 2018 00:53:31 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 42QWXC3MMvz1qr2c; Thu, 4 Oct 2018 00:53:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id KIufTzU8dkMx; Thu, 4 Oct 2018 00:53:30 +0200 (CEST) X-Auth-Info: hlggnN+E66fX//BACckd2zF8ltGLNm0WdAo/xc+KtdA= Received: from kurokawa.lan (ip-86-49-30-92.net.upcbroadband.cz [86.49.30.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 4 Oct 2018 00:53:30 +0200 (CEST) From: Marek Vasut To: linux-gpio@vger.kernel.org Cc: linus.walleij@linaro.org, dinguyen@kernel.org, Marek Vasut Subject: [PATCH] gpio: syscon: Add support for Altera FPGA manager GPIO Date: Thu, 4 Oct 2018 00:53:29 +0200 Message-Id: <20181003225329.21686-1-marex@denx.de> X-Mailer: git-send-email 2.18.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- drivers/gpio/gpio-syscon.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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);