From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B662C47082 for ; Tue, 8 Jun 2021 10:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3586160FF1 for ; Tue, 8 Jun 2021 10:27:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230382AbhFHK3M (ORCPT ); Tue, 8 Jun 2021 06:29:12 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:22630 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbhFHK3M (ORCPT ); Tue, 8 Jun 2021 06:29:12 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 158ABxpu009819; Tue, 8 Jun 2021 18:11:59 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from slee-VirtualBox.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Jun 2021 18:25:48 +0800 From: Steven Lee To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list CC: , , , Subject: [PATCH v5 00/10] ASPEED sgpio driver enhancement. Date: Tue, 8 Jun 2021 18:25:35 +0800 Message-ID: <20210608102547.4880-1-steven_lee@aspeedtech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 158ABxpu009819 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org AST2600 SoC has 2 SGPIO master interfaces one with 128 pins another one with 80 pins, AST2500/AST2400 SoC has 1 SGPIO master interface that supports up to 80 pins. In the current driver design, the max number of sgpio pins is hardcoded in macro MAX_NR_HW_SGPIO and the value is 80. For supporting sgpio master interfaces of AST2600 SoC, the patch series contains the following enhancement: - Convert txt dt-bindings to yaml. - Update aspeed-g6 dtsi to support the enhanced sgpio. - Define max number of gpio pins in ast2600 platform data. Old chip uses the original hardcoded value. - Support muiltiple SGPIO master interfaces. - Support up to 128 pins. - Support wdt reset tolerance. - Fix irq_chip issues which causes multiple sgpio devices use the same irq_chip data. - Replace all of_*() APIs with device_*(). Changes from v4: * Remove ngpios from dtsi * Add ast2400 and ast2500 platform data. * Remove unused macros. * Add ngpios check in a separate patch. * Fix coding style issues. Changes from v3: * Split dt-bindings patch to 2 patches * Rename ast2600-sgpiom1 compatible with ast2600-sgiom-128 * Rename ast2600-sgpiom2 compatible with ast2600-sgiom-80 * Correct the typo in commit messages. * Fix coding style issues. * Replace all of_*() APIs with device_*(). Changes from v2: * Remove maximum/minimum of ngpios from bindings. * Remove max-ngpios from bindings and dtsi. * Remove ast2400-sgpiom and ast2500-sgpiom compatibles from dts and driver. * Add ast2600-sgpiom1 and ast2600-sgpiom2 compatibles as their max number of available gpio pins are different. * Modify functions to pass aspeed_sgpio struct instead of passing max_ngpios. * Split sgpio driver patch to 3 patches Changes from v1: * Fix yaml format issues. * Fix issues reported by kernel test robot. Please help to review. Thanks, Steven Steven Lee (10): dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. dt-bindings: aspeed-sgpio: Add ast2600 sgpio compatibles. ARM: dts: aspeed-g6: Add SGPIO node. ARM: dts: aspeed-g5: Remove ngpios from sgpio node. gpio: gpio-aspeed-sgpio: Add AST2600 sgpio support gpio: gpio-aspeed-sgpio: Add AST2400 and AST2500 platform data. gpio: gpio-aspeed-sgpio: Add set_config function gpio: gpio-aspeed-sgpio: Move irq_chip to aspeed-sgpio struct gpio: gpio-aspeed-sgpio: Use generic device property APIs gpio: gpio-aspeed-sgpio: Return error if ngpios is not multiple of 8. .../bindings/gpio/aspeed,sgpio.yaml | 78 +++++++ .../devicetree/bindings/gpio/sgpio-aspeed.txt | 46 ---- arch/arm/boot/dts/aspeed-g5.dtsi | 1 - arch/arm/boot/dts/aspeed-g6.dtsi | 28 +++ drivers/gpio/gpio-aspeed-sgpio.c | 206 ++++++++++++------ 5 files changed, 248 insertions(+), 111 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml delete mode 100644 Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09152C47082 for ; Tue, 8 Jun 2021 11:16:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BCB4F60FDA for ; Tue, 8 Jun 2021 11:16:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCB4F60FDA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :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=WO7yvMnSvfLr/Jngik8deKO2xhDpjfT3+0kvcCHe1v4=; b=cE3/D4FtwO0xKb l5Bak5L3dQGB4jdqoLqX9DTEHCX1nNzKG3E8P7wFi/7PlQfmnJAkcgg0M6YFB01HRJBde4NU85Jml GCirlUiYIR0mZmiCMXYXWosBQ5p0VILDObs2eCv3Cky7691c6Nmfky361jV0pbCkl5S2uFVsnZPll C9alLcIUluB20lp7ZUsmhAitwr/0OgiJWasZYCL1b/T7a2gvMmrHkzBADvgdt7+ykkPsMpm2rYeHM uzjLr9nF0JXN3TX+roAC8prUnVuBqcT+P4I0NLBh8bUo7aTK5njxXm+kJTrLUOCoYtEUpRlCIxiJR gSXyEQTGaac3zAWa9oRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqZef-007u9v-E6; Tue, 08 Jun 2021 11:12:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqZKM-007mtC-9S for linux-arm-kernel@bombadil.infradead.org; Tue, 08 Jun 2021 10:51:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=oXQkD0DBoY5y6hIiz5rZLeOHQy3FLYfLuzScq5jv4No=; b=PhjmJ343PDS4sEr0VoN7LkmCUI EjtKcD+M9ozSYxZyPy7fFMSorvhhvepURUzMhUuT/Mt77SK8rLiune2u9+ZF5eVlWE/Iey8jaWWCc 5hScoy5P3rOoYcg25eVzdHlKEwXOeWlPeW9d2pM2XnWa4R/+IrK0HeuVTT+8vvcbOicCjlTjZpoGg NDMxnatZ9h2wLkXHrZP0oecZOV9tlvZSt2YV+/VZ5j+FAss+Uf66jmUJsgNIkD244FP+ZG/59q+mQ DDJfbW3pdZNjV6fex62sU37V3yHON3KF02RyPyha3NRqtzHN18jbORrHdUmtmjQIqiULyFcV+Gvj/ MagUV98g==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lqYwC-00Gosh-3n for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 10:26:38 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 158ABxpu009819; Tue, 8 Jun 2021 18:11:59 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from slee-VirtualBox.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Jun 2021 18:25:48 +0800 From: Steven Lee To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list CC: , , , Subject: [PATCH v5 00/10] ASPEED sgpio driver enhancement. Date: Tue, 8 Jun 2021 18:25:35 +0800 Message-ID: <20210608102547.4880-1-steven_lee@aspeedtech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 158ABxpu009819 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_112636_278515_D297DA5D X-CRM114-Status: GOOD ( 11.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org AST2600 SoC has 2 SGPIO master interfaces one with 128 pins another one with 80 pins, AST2500/AST2400 SoC has 1 SGPIO master interface that supports up to 80 pins. In the current driver design, the max number of sgpio pins is hardcoded in macro MAX_NR_HW_SGPIO and the value is 80. For supporting sgpio master interfaces of AST2600 SoC, the patch series contains the following enhancement: - Convert txt dt-bindings to yaml. - Update aspeed-g6 dtsi to support the enhanced sgpio. - Define max number of gpio pins in ast2600 platform data. Old chip uses the original hardcoded value. - Support muiltiple SGPIO master interfaces. - Support up to 128 pins. - Support wdt reset tolerance. - Fix irq_chip issues which causes multiple sgpio devices use the same irq_chip data. - Replace all of_*() APIs with device_*(). Changes from v4: * Remove ngpios from dtsi * Add ast2400 and ast2500 platform data. * Remove unused macros. * Add ngpios check in a separate patch. * Fix coding style issues. Changes from v3: * Split dt-bindings patch to 2 patches * Rename ast2600-sgpiom1 compatible with ast2600-sgiom-128 * Rename ast2600-sgpiom2 compatible with ast2600-sgiom-80 * Correct the typo in commit messages. * Fix coding style issues. * Replace all of_*() APIs with device_*(). Changes from v2: * Remove maximum/minimum of ngpios from bindings. * Remove max-ngpios from bindings and dtsi. * Remove ast2400-sgpiom and ast2500-sgpiom compatibles from dts and driver. * Add ast2600-sgpiom1 and ast2600-sgpiom2 compatibles as their max number of available gpio pins are different. * Modify functions to pass aspeed_sgpio struct instead of passing max_ngpios. * Split sgpio driver patch to 3 patches Changes from v1: * Fix yaml format issues. * Fix issues reported by kernel test robot. Please help to review. Thanks, Steven Steven Lee (10): dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. dt-bindings: aspeed-sgpio: Add ast2600 sgpio compatibles. ARM: dts: aspeed-g6: Add SGPIO node. ARM: dts: aspeed-g5: Remove ngpios from sgpio node. gpio: gpio-aspeed-sgpio: Add AST2600 sgpio support gpio: gpio-aspeed-sgpio: Add AST2400 and AST2500 platform data. gpio: gpio-aspeed-sgpio: Add set_config function gpio: gpio-aspeed-sgpio: Move irq_chip to aspeed-sgpio struct gpio: gpio-aspeed-sgpio: Use generic device property APIs gpio: gpio-aspeed-sgpio: Return error if ngpios is not multiple of 8. .../bindings/gpio/aspeed,sgpio.yaml | 78 +++++++ .../devicetree/bindings/gpio/sgpio-aspeed.txt | 46 ---- arch/arm/boot/dts/aspeed-g5.dtsi | 1 - arch/arm/boot/dts/aspeed-g6.dtsi | 28 +++ drivers/gpio/gpio-aspeed-sgpio.c | 206 ++++++++++++------ 5 files changed, 248 insertions(+), 111 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml delete mode 100644 Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel