From patchwork Wed Mar 28 17:46:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 132536 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp768920ljb; Wed, 28 Mar 2018 10:53:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx48QnpexMaKLIQSfi3XNRHq/E556zEq1gMPJAT0aGdBIMPhC0u5DGCvCJnfezY8w1FAHdhMh X-Received: by 10.99.37.70 with SMTP id l67mr3305632pgl.106.1522259624975; Wed, 28 Mar 2018 10:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522259624; cv=none; d=google.com; s=arc-20160816; b=NCbxUPuAPL56AJjeB/BUNSBqR+mqQ8XynUAhbyUv4+sU8wj6NAa1U5iDUzX/k0FGb0 x1pJFiyr8ygJSsTeMWGSabnlMkBMUXYYpkscskYKSymE2O/PXzPtK8t6iEgc8eUIZmuK mt3+cw6EnN7XBrsMVswYkAidrw0jLHOuyulUN6A9CIEZN1pksCipMchUFodkuvqvuRLE r01dLFVKYvfynyQytI9nlWqFiURFn2Z2tinlCN+fM/6AAcfn3uWFR68A0eyQXVKvyiYU sv9PFkUfExV4pTUNlrZPBNt4tAw7p8d1jg8EQtfGhX8nikWxc+41qg8bcMPPv/8R0Em8 duKw== 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=t/Til5Z0t2/GwPANG3Dczk7afCrr7tyT9skcotj3mr8=; b=0jG7Nt8qUH2M3S8jpfBzu0ocikS017QQ8s0JOFoorbXvefck7qE18UOj4xLbmIM/od ToKX7zLRDlCK8c+TzyCVOXstjPPHhREaXKgHNzUJu4bMGPgURTox/7N6UKqk1ctZmD/D +MdhxC2nXIDjXhuJ7obbj+hG4SF3BHwvJAy9sRvVQkjc1beYY3bnNc98x70vuXWJbmBx wnfyUjHwInRyUVZlxqPGYsRwy2BUgjkH01twdgeP43sJ6hwSwKmI/rDjQzFUcX1QiDl3 Mx568sDi9B70GrzAY2KQsrwKkI6WICxvxNUNeSZfal0V7nVxUaPb9ItG4cMYgjiEBLLa OgQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HUfjilDu; 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 z124si3098301pfb.188.2018.03.28.10.53.44; Wed, 28 Mar 2018 10:53:44 -0700 (PDT) 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=HUfjilDu; 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 S1752918AbeC1Rxn (ORCPT + 6 others); Wed, 28 Mar 2018 13:53:43 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:38470 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbeC1Rxm (ORCPT ); Wed, 28 Mar 2018 13:53:42 -0400 Received: by mail-pf0-f193.google.com with SMTP id y69so1306917pfb.5 for ; Wed, 28 Mar 2018 10:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=WC14llx+FmTq5j1ajLGHBWABZCasjWiylJhSk9p2j58=; b=HUfjilDuhkc0181veIrc2XUdHoOHpdeEkd/CkaH06bMOQZfoZHnYs3pgSjhTMUDKOe flC2Oami/f6ZQbQ1hN2FTOdYYewg6i2BTpei1ybVUE738BVRTr4FrrAq43eXbG/HiLf4 m+JKZfMDdXz+0BpPuWQDZQDrZLgW9dG61Gvok= 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=WC14llx+FmTq5j1ajLGHBWABZCasjWiylJhSk9p2j58=; b=uGwK6vyamBmvSdok392Me7ECcBLuCM6wVKue+X60u7aY8q2XVLTeb3VuvweCiJDsFc 9FqBRuVrkI0UyyP1GKNOeZa4cZzpXJFTLukBjCOkyXs7mc/ERB0ytMhWdLCmUv9cHCzp nrnJlidKhKorEBT3oY0Hfk1lj2JGe6lGsH6YSIlIea2HM9PASKtQ4wd1sAmuS4amdgrI aDSyvCXvxUy7ZXPazGZevhkdnvJym7NQok58yAgHtNhns3RGltTCxs+/WJnhpV0ZlxhO iJzIMrQx6mGts4PB7uS9x63f7eUS9sfbdX3MP06gDFaMDnG11fkR6spoSaN+7Um6djhv kF6Q== X-Gm-Message-State: AElRT7EodUW/TJ1gPnG+jWXV1uqJJ0OzUjfEiIDcD2bbGnnJuViUKAtX iljpkNeYxo3io6V0V2ovl97L X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr4751582pld.149.1522259621921; Wed, 28 Mar 2018 10:53:41 -0700 (PDT) Received: from localhost.localdomain ([2405:204:70c6:7103:1d04:9825:cfd:7751]) by smtp.gmail.com with ESMTPSA id j21sm7404446pgn.61.2018.03.28.10.53.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 10:53:41 -0700 (PDT) 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 v6 0/9] Add Actions Semi S900 pinctrl and gpio support Date: Wed, 28 Mar 2018 23:16:54 +0530 Message-Id: <20180328174703.19778-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 v6: * Changed owl_gpio_set_reg to owl_gpio_update_reg in gpio driver * Reused owl_gpio_update_reg in owl_gpio_set in gpio driver * Removed ngpio property from DT for nodes with 32 gpios * Fixed size values in DT for gpio nodes * Added Reviewed-by tags from Linus for adding gpio-line-names in DT 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 | 87 + MAINTAINERS | 5 + arch/arm64/Kconfig.platforms | 1 + arch/arm64/boot/dts/actions/s900-bubblegum-96.dts | 195 ++ arch/arm64/boot/dts/actions/s900.dtsi | 57 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-owl.c | 168 ++ 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, 3120 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