From patchwork Tue Apr 18 15:28:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 13215852 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 15514C77B7E for ; Tue, 18 Apr 2023 15:33:11 +0000 (UTC) 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qgsdOyLQHMo9Y3ww9V0DP5mP2lY2SatCKBspmh2r924=; b=G6PXtWqEvxjI/K mJp+KIs7F7MS0ew/dAslNEUc7ybbSed4rPVGu6F8onj37VnpgRDqZ6itpTfVhTsyAIs/1LSUs6ZlV pT1BwmGhFV2JL8yaV1pI5t8ZPBdnCNrx2TYx78EzNJ7Agmftv7YcQk22vhz6TOku1zBoGFj3yIEUY KA+nJ9YLow1eokh+sv8FLp46PtXJBlMqpNw/5OdUjYkrJbhcKBbUKWkGVK6zEYrMoKqKSuZiL6xZl iyJ03sex9SnH9ChTea60Y0bLjh7CEoZm4gYRiry/wvBiFm7Mxz1ePRe+BZoAjK2RGFZRWkQASt1QE /ecgc6DPFIdp09JAiEhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ponJZ-002c20-0I; Tue, 18 Apr 2023 15:32:17 +0000 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ponJI-002bqF-0D for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2023 15:32:03 +0000 Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33IEwHbH003070; Tue, 18 Apr 2023 15:31:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id; s=pps0720; bh=gNqosOg24PM4UxT4OZVIS4Pu6MOFBOrsEePLjXVlfzs=; b=aADRojhy1CmFqg7E8iP5GRiukGDVxEiEB8qTSIMT9njN61u6V9b7Rp4WB5ZGuh1s1FVC skUT8U0Ghjxik+3emBXyW/RgaRBjSmhH+4Kj+OPs88qKT7vslBWY3tkgx9HKMDesd46m 4aT7eYQSZf7iJMxxFzS5pz4JfgvKhrqv9Uh7bpS0D9mLwmHk9PTQvTjOfX3azI3Rr3yn 1OhnMIv/ezZW/uLSHKKqoss/rIxQZMcjowM9y+wN4NdPbDsXVuNgbN83+F97EWD+NT2S dRWMKHB3xS/z9+5m09VQ3WDyjMj0dwGfm+Weor58ADuHyiQezghFiQdyzeaqIR3WPu/Q 8w== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3q1wdw0b8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 15:31:35 +0000 Received: from p1lg14886.dc01.its.hpecorp.net (unknown [10.119.18.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14881.it.hpe.com (Postfix) with ESMTPS id 58087804797; Tue, 18 Apr 2023 15:31:35 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id 1C322816D3A; Tue, 18 Apr 2023 15:31:34 +0000 (UTC) From: nick.hawkins@hpe.com To: verdun@hpe.com, nick.hawkins@hpe.com, linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jdelvare@suse.com, linux@roeck-us.net, linux@armlinux.org.uk, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 0/9] ARM: Add GPIO and PSU Support Date: Tue, 18 Apr 2023 10:28:15 -0500 Message-Id: <20230418152824.110823-1-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 X-Proofpoint-ORIG-GUID: fw0a7pAlRw6CszdlX-kuU8qx3SuaT6MP X-Proofpoint-GUID: fw0a7pAlRw6CszdlX-kuU8qx3SuaT6MP X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-18_11,2023-04-18_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1011 suspectscore=0 mlxlogscore=845 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304180132 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230418_083200_123002_6FB2365C X-CRM114-Status: GOOD ( 16.00 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Nick Hawkins The GXP has multiple interfaces that provide I/O to it. There is GPIO coming from the host and from the cpld. Both of these interfaces are interruptable. The GXP is able to monitor PSU's via I2C. There is support for up to 8 PSUs. The GXP gets presence information from I/O with the cpld. The fan controller and the psu monitor consume I/O from the CPLD. Thus for the GXP to be able to report this GPIO to the OpenBMC stack calls have been enabled for the GPIO driver to use. Nick Hawkins (9): gpio: gxp: Add HPE GXP GPIO hwmon: (gxp_fan_ctrl) Give GPIO access to fan data hwmon: (gxp-psu) Add driver to read HPE PSUs dt-bindings: hwmon: Modify hpe,gxp-fan-ctrl dt-bindings: gpio: Add HPE GXP GPIO dt-bindings: hwmon: Add HPE GXP PSU Support ARM: dts: gxp: add psu, i2c, gpio ARM: multi_v7_defconfig: Add PSU, GPIO, and I2C MAINTAINERS: hpe: Add GPIO, PSU .../bindings/gpio/hpe,gxp-gpio.yaml | 137 +++ .../bindings/hwmon/hpe,gxp-fan-ctrl.yaml | 6 +- .../bindings/hwmon/hpe,gxp-psu.yaml | 45 + MAINTAINERS | 4 + arch/arm/boot/dts/hpe-bmc-dl360gen10.dts | 161 +++ arch/arm/boot/dts/hpe-gxp.dtsi | 197 ++- arch/arm/configs/multi_v7_defconfig | 5 +- drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-gxp.c | 1056 +++++++++++++++++ drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/gxp-fan-ctrl.c | 58 +- drivers/hwmon/gxp-psu.c | 773 ++++++++++++ 14 files changed, 2404 insertions(+), 59 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/hpe,gxp-gpio.yaml create mode 100644 Documentation/devicetree/bindings/hwmon/hpe,gxp-psu.yaml create mode 100644 drivers/gpio/gpio-gxp.c create mode 100644 drivers/hwmon/gxp-psu.c