From patchwork Thu Oct 8 13:05:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Povlsen X-Patchwork-Id: 11822933 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97F4E6CA for ; Thu, 8 Oct 2020 13:05:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 608902083B for ; Thu, 8 Oct 2020 13:05:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KqJOxgqa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="kkO91+qo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 608902083B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=kMCTYrjL+Vcb6znhjuvXUaHytxPiK7SUHlLZ73uXRJ8=; b=KqJOxgqadybfHX7kgVJlJkisMu bTzNjE3jQ/Yj+MXX59pfq2VolxC0VznrEiqhReegXcDfMDC/lC05Glk47cLjtLjMIDzkk7VjmLCGt ejq9EagYT3ban5phymxQzJphb76gFI9FIqTMNHwgXXzUMfr/chusG61ljHGsaAoyDXIfGPc38wTXw 1XsfQ9GN/JnmFtsxmuxHHfH6mN6rQH7cHTHZRD1tz/4fGdXLqXbVh1/iR2Y5H36D0sQQv14sR7eSZ SZuHaj2goTyCZJNDOA3BTRsheINuN3E+F2xXo1hYc9pS0HmiDUmhk0Ra5ADYepUMv4TIg5F5R4zYo WOR5n7Ow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQVbu-0007xH-2v; Thu, 08 Oct 2020 13:05:30 +0000 Received: from esa5.microchip.iphmx.com ([216.71.150.166]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQVbr-0007wL-8O for linux-arm-kernel@lists.infradead.org; Thu, 08 Oct 2020 13:05:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1602162327; x=1633698327; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9GFFb9L2XzgUgsFOeudZEQsFIoN33NW0oarxi224QDE=; b=kkO91+qoVY8ZzK+b/ODZouy+Egr/tzUDfDIN7d3UZlaLFOtZLd+nSRPg R3IMR5Mhjqqic6WL7vrBXUoxm0OLRYzGSLlNbehagUcqzA1HkpSpS4I5J JrDW6OQLirnOLN9o7YtTaQ1YHmkXA/rVVuemUXw86WIEF+QJx4ZP8Jm/8 s7g0DlyP3l/W24b1Qc78Pg5Y0F0RlnvYXp2OYY33ASQ4YK/zGtFSNr51k Mlfx5yzKhUm4ujls+c0dtvIRMjRy798Chg8IDlPmUPTunSVTMo9/T+8Z2 lnVARICJ8UV+Q4ZOUfz45VhoUVbSOVk6y5EBRiFm/kMiSDv+To8iun07F Q==; IronPort-SDR: ThkiY8+hMWSka3fMBOvGwsQzUna2DkYVJukGXpP+7HVh30aLLBAbw3dTQhmY6UzxaztEjwKKM1 wn0AI6nwad1GLz2a9L6pCT+XhXwuiQJgQzCzCE4ntKgm8D3jttAMbiZTTUg+nIWuHrA+v/XU4O fDTzbLWd7qdE5sCcBPNdkajASuYNKOBkI9Ggkb4l2Ul8/XtHaV7l4DKOeyRtHBHHLsf0S+4PET mAqYgggIDbyYb76yi7jYRxJIKGJIo2Zcijpx4KdzaDHMAwyXkC+ogppx24SvmC6pLoCPhgJB+o CRs= X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="93868367" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Oct 2020 06:05:24 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 8 Oct 2020 06:04:57 -0700 Received: from soft-dev10.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 8 Oct 2020 06:05:21 -0700 From: Lars Povlsen To: Linus Walleij Subject: [PATCH v5 0/3] pinctrl: Adding support for Microchip/Microsemi serial GPIO controller Date: Thu, 8 Oct 2020 15:05:12 +0200 Message-ID: <20201008130515.2385825-1-lars.povlsen@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201008_090527_480888_FF0A9E74 X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.150.166 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [216.71.150.166 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Belloni , linux-kernel@vger.kernel.org, Microchip Linux Driver Support , linux-gpio@vger.kernel.org, Lars Povlsen , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The series add support for the serial GPIO controller used by Microchip Sparx5, as well as (MSCC) ocelot/jaguar2 SoCs. v5 changes (driver comments from Linus): - Collect bank data in sgpio_bank struct - Add is_input boolean to sgpio_bank struct - Use single-bit bitmasks in sgpio_output_set() and sgpio_output_get() - Eliminate superfluous struct pinctrl_dev *pctl_dev in bank data - Fix wrong ngpio consistency check v4 changes (binding comments from Rob): - microchip,sgpio-port-ranges changed to uint32-matrix so tuples can be represented properly. - gpio controller node name changed to "gpio@[0-1]" - whitespace fixes - DT files updated as per schema changes v3 changes: - Renamed all usage of "mchp" abbrevation with "microchip". - Split the in/output directions into (two) separate banks. - Eliminated the bindings include file (from above) - Changed SPDX license to "GPL-2.0-or-later" - Change -ENOTSUPP to -EOPNOTSUPP - Minor type/symbol naming changes v2 changes: - Adds both in and output modes. - Use direct adressing of the individual banks (#gpio-cells = <4>), also osoleting need for addressing macros in bindings include file. - Property 'microchip,sgpio-ports' (uint32, bitmask) replaced by proper range set (array of [start,end]) 'microchip,sgpio-port-ranges'. - Fixes whitespace issues in Kconfig file Lars Povlsen (3): dt-bindings: pinctrl: Add bindings for pinctrl-microchip-sgpio driver pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO arm64: dts: sparx5: Add SGPIO devices .../pinctrl/microchip,sparx5-sgpio.yaml | 140 ++++ MAINTAINERS | 1 + arch/arm64/boot/dts/microchip/sparx5.dtsi | 91 +++ .../boot/dts/microchip/sparx5_pcb125.dts | 5 + .../dts/microchip/sparx5_pcb134_board.dtsi | 258 +++++++ .../dts/microchip/sparx5_pcb135_board.dtsi | 55 ++ drivers/pinctrl/Kconfig | 18 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-microchip-sgpio.c | 665 ++++++++++++++++++ 9 files changed, 1234 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml create mode 100644 drivers/pinctrl/pinctrl-microchip-sgpio.c --- 2.25.1