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: 131076 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp572858lja; Thu, 8 Mar 2018 21:14:44 -0800 (PST) X-Google-Smtp-Source: AG47ELvZnY69QBMainlyYbljomNz9xuaR4UXE4FYM4Xc7+tbjePZDBrS/PA2DQSe8cOmWcItKC7h X-Received: by 2002:a17:902:724a:: with SMTP id c10-v6mr26143203pll.98.1520572484223; Thu, 08 Mar 2018 21:14:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520572484; cv=none; d=google.com; s=arc-20160816; b=glMHk6UsGs2qpF2dOh1iX8dJJFJb4lLnuNcbiasUoKUrNihgLKebRz5nxY2peBgPGL 6SCfOsjlCuHJwgyu2fz4LEwDex29FLCdo0T2UJiPhTN8KWw4WUEP5KOAvqks6zyd4jbd lysCyaZqA16wfgphplirSJYz2Oq37bPKT7bI6tpSYVzbBkrLGYL+EJVVX8+zyldg3gMN 0aWNzt9O8k2UZKeavpAKvT5GI4ntL7VNS7S76iMPQDRPlXJLD2XfE+HZKirpe+jdG8Dz oB7PeWE3NcacE11fPK5ZY6XJSvcjGkW8IYT/nnAM4426K9DA3VseQe46e6WvVlLWI9DW 9VBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=WvdTaK3BXPIFY4ZpR1/8Y2eAGucN9qGrFIqmarxaTEA=; b=YG6CzuqNy5DF4xIG/upASfA6Y3BXF/FrnemJSGvXAFxx2AYeChbukR+E3WtkrOQE15 rvNxCih5tXzg+Czi5G+VD96LvpugZsS2XnvIe55BeHkhJ/IobMbvoJhUS3rX1/gpZ9F+ o6hHpDjcvCqijAjPSR3ej24a3sJtZE0p9jMgNCHgwCF8Tw5jX1rdyPLyWhMjNX/0nob0 LRZ4NiF/NoUdgmQsqsdpGbTLXcLqZ6VIj9ti+9CZI6N9rTH7MFfYmyQJxPCz1vjDc+IA 2lsob+a4V/GtFxF6/z8ZPNOvgDQCvxFyk3hqOH4y9gso0jjshgfY9xMjKQL4ohpUqeNA 6N2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=koid6wz8; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si238664pfg.288.2018.03.08.21.14.44; Thu, 08 Mar 2018 21:14:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=koid6wz8; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751101AbeCIFOn (ORCPT + 6 others); Fri, 9 Mar 2018 00:14:43 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46679 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbeCIFOl (ORCPT ); Fri, 9 Mar 2018 00:14:41 -0500 Received: by mail-pl0-f66.google.com with SMTP id y8-v6so4665720pll.13 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=HJUrkLltZf2nQPOeehGYmlu+RDpsxz2xfxUVSlBfpmiFUnDTqitGvFeIRw5frBs+OD Mnyg+2dNsTj5vFCK5Ueu8nlDEZldZBqQX4+LqMGV3CqtXps3bOdNuTeU2PntZJSqtugP KtJuhWMTSeuRZs5hiZFF5GDNsiaGq+Fapy/KSFoZqbxat5pv/5ilmUb1O99Vu5G5sE4Z CNUdVC7bNQBWSdCjCTdhCSPy/MgKfYEPKnS+Vj2+G7GqtXGvf/cDdwpOQbEXGQD/7p1A A4XS2k6U1v8bRjop0fffTc7nihWD2Nor7xOjoozZrWE5bcn2v57CA7LVZHjecy1on23N izew== X-Gm-Message-State: APf1xPC64265zGXBSBMCvEsZLu0xm2Y65waoCm251pWkhnBNb3rfEen8 hvdhp2YyI0LsqIjIIU/mvPmq 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html