From patchwork Fri Mar 9 05:13:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 883475 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=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="koid6wz8"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zyFxH3Y7nz9sbF for ; Fri, 9 Mar 2018 16:17:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbeCIFOn (ORCPT ); Fri, 9 Mar 2018 00:14:43 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:33528 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088AbeCIFOl (ORCPT ); Fri, 9 Mar 2018 00:14:41 -0500 Received: by mail-pl0-f68.google.com with SMTP id c11-v6so4702197plo.0 for ; Thu, 08 Mar 2018 21:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=GuiwtQ5JeT0cI123IWnqHupSb0F5z2t/2r8hZz7ZcRs=; b=koid6wz85HGCLS9EwlV7pLvAbpzxceHLy4ZmFiMV1ZK22lLQw8dFOhLUNfKRmlreU/ RcySunk+479qT9ePepDrA00zjynjDSbG9edru+LD84LBvcqA0zGq+3cS1dmw/eaRSsS+ QW3HiEbQxhvlqcac6VXeJnZwxur3VUP9dXAfw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GuiwtQ5JeT0cI123IWnqHupSb0F5z2t/2r8hZz7ZcRs=; b=sVaXBV5AwVvfTu1BA+seuQhRDqZ9s6GIw/ybZAmJRS+3KFG6/igDgXnlheGNf00uJc zh4oDSdMH12qbqJd7znUjtLMo8584xXZ1gg9hnOZO1dioUNU4iIEMGI014elgbPdE6ec ir5lxDIu8plVO5kWu0gsZFi3caTW/RmeVOadP+yro8yuDynwQiL59opQGUJqQI3Ktv1Z aIk5Ixsi0ppEW83MKe7BpRfKZ7i12fQ9NgGIaXthumO3VciDDInDYMHPK8vWI2c4AQ3c xY3CzlvZbGcm6MZJgItg+uvX8o2fXEx08xH6fOcoyytbNO4I1O/r9mLsq+w7y7yjzAP3 jQ2A== X-Gm-Message-State: APf1xPB7LjrhGQF21q5HL1Eiirp7c9Qe2ERlYEymOBCcragoR0zpiRwO f7Ga7hOA/mXzhHqHaUXii5zl X-Google-Smtp-Source: AG47ELtoFXgH34XFGi+WWc70BBo5EwmqkHtMQMRr/SsbTPcPwvCuEpaTxDujKI8syJWiHnV/GjMLUQ== X-Received: by 2002:a17:902:1e4:: with SMTP id b91-v6mr26045292plb.438.1520572481241; Thu, 08 Mar 2018 21:14:41 -0800 (PST) Received: from localhost.localdomain ([2405:204:7081:af21:ac40:fc54:f562:4008]) by smtp.gmail.com with ESMTPSA id i186sm635182pfg.25.2018.03.08.21.14.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 21:14:40 -0800 (PST) From: Manivannan Sadhasivam To: linus.walleij@linaro.org, robh+dt@kernel.org, afaerber@suse.de Cc: liuwei@actions-semi.com, mp-cs@actions-semi.com, 96boards@ucrobotics.com, devicetree@vger.kernel.org, andy.shevchenko@gmail.com, daniel.thompson@linaro.org, amit.kucheria@linaro.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, hzhang@ucrobotics.com, bdong@ucrobotics.com, manivannanece23@gmail.com, Manivannan Sadhasivam Subject: [PATCH v5 0/9] Add Actions Semi S900 pinctrl and gpio support Date: Fri, 9 Mar 2018 10:43:36 +0530 Message-Id: <20180309051345.1011-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.14.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This patchset adds pinctrl and gpio support for Actions Semi S900 SoC. Pinctrl and gpio subsystems share the common set of register range but implemented as individual drivers for making it less complex. Pinmux functions are only accessible for pin groups while pinconf parameters are available for both pin groups and individual pins. gpio-line-names has been added for the Bubblegum-96 board matching the 96Boards CE specification v1.0. Both pinctrl and gpio drivers are verified using the Bubblegum-96 board. This patchset depends on the clock driver which is still under review: https://lkml.org/lkml/2018/2/9/831 There is also S500 pinctrl and gpio driver developed by Andreas Farber independently to this patchset. https://github.com/afaerber/linux/commits/bg96-next If this patchseries seems to be good enough to add base OWL pinctrl and gpio support. Then, we may decide on adding S500 support on top of this later by reusing the pinctrl definitions from Andreas. Thanks, Mani Changes in v5: * Removed alias for gpio nodes * Removed duplicate address from gpio nodes and modified the driver accordingly * Used ngpios property for specifying number of gpios per bank * Used generic gpio node name in DT and binding * Modified pinctrl driver to save space * Dropped pinctrl bindings patch since it got applied * Added Reviewed-by tags from Linus for DT and platform Kconfig changes Changes in v4: * Incorporated Andy's review for pinctrl driver * Used _relaxed functions for pinctrl driver * Added Andy's Reviewed-by tag for gpio driver * Added (back) Rob's Reviewed-by tag for pinctrl bindings Changes in v3: * Simplified owl_gpio_set_reg() with _relaxed functions * Added interrupt controller properties to gpio node bindings as suggested by Rob * Minor code cleanups Changes in v2: * Implemented each GPIO bank as its own gpio-controller * Added gpio-ranges property * Modified pin group to follow pad names instead of register names * Incorporated review comments from Andy * Incorporated review comments from Andreas * Fixed the MODULE_LICENSE with respect to SPDX tag * Added Reviewed by tag from Rob for pinctrl binding Manivannan Sadhasivam (9): arm64: dts: actions: Add pinctrl node for S900 arm64: actions: Enable PINCTRL in platforms Kconfig pinctrl: actions: Add Actions S900 pinctrl driver dt-bindings: gpio: Add gpio nodes for Actions S900 SoC arm64: dts: actions: Add S900 gpio nodes arm64: dts: actions: Add gpio line names to Bubblegum-96 board gpio: Add gpio driver for Actions OWL S900 SoC MAINTAINERS: Add reviewer for ACTIONS platforms MAINTAINERS: Add Actions Semi S900 pinctrl and gpio entries .../devicetree/bindings/gpio/actions,owl-gpio.txt | 90 + MAINTAINERS | 5 + arch/arm64/Kconfig.platforms | 1 + arch/arm64/boot/dts/actions/s900-bubblegum-96.dts | 195 ++ arch/arm64/boot/dts/actions/s900.dtsi | 60 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-owl.c | 172 ++ drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/actions/Kconfig | 12 + drivers/pinctrl/actions/Makefile | 2 + drivers/pinctrl/actions/pinctrl-owl.c | 579 ++++++ drivers/pinctrl/actions/pinctrl-owl.h | 142 ++ drivers/pinctrl/actions/pinctrl-s900.c | 1861 ++++++++++++++++++++ 15 files changed, 3130 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/actions,owl-gpio.txt create mode 100644 drivers/gpio/gpio-owl.c create mode 100644 drivers/pinctrl/actions/Kconfig create mode 100644 drivers/pinctrl/actions/Makefile create mode 100644 drivers/pinctrl/actions/pinctrl-owl.c create mode 100644 drivers/pinctrl/actions/pinctrl-owl.h create mode 100644 drivers/pinctrl/actions/pinctrl-s900.c