From patchwork Mon Nov 28 23:02:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 26973 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5997859wrr; Mon, 28 Nov 2022 15:07:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf46PcCUkBmmqt8uQpgkuuu+UF0qfGKaUlZcA+OP/61bed80yZp9tvog/I04A/HO+TVRVFym X-Received: by 2002:aa7:c042:0:b0:462:2f5a:8618 with SMTP id k2-20020aa7c042000000b004622f5a8618mr49750272edo.42.1669676832143; Mon, 28 Nov 2022 15:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676832; cv=none; d=google.com; s=arc-20160816; b=vfiR3rhO9C3Qyv+z/pEevbQyxp0xHXol315V4Kyz0LV/cBCPyHIRovajk70CGuA8ZP HWhpHED79Hw2pdha1AgqcIzfFN5jclkP7l0yvRLKDQk2cBrWxd9aOrqeGsi5O8B51cpW xTraJVtvNsN7spWZ078yVeIYuR4D+GYhkiITWIyj9ecFjkHGl6Xx0aBuziANzZ0Ijk0h ge1fOP6s7TxLHUSGle09GxikCW4kRX2U2ojBdyrkkZK+JbhWbshhyksubH1ttgwRze4x 5i0nBVYorsXzLDthLMolv5Xspl1yDqA9TgIcSJZKSUT0vVpypXHGyxA1J4xsEui0JZ2G bRLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature; bh=I+8ZPqA+Mk7OX+uGOemUMsAF9IijmZ08o+d7ve+/0GU=; b=EjoUmLy7xo4QZ7r3TKMaEfJ5pIph2b8xkUu8aduVtY6NyGNPrSaS5F2XshK9yHYMMt /Xw4WZkxfuvmDa8lc7SzCvMNJ9LUan+gO9H6Mk16WYTWMeIKCSY5ZQfRymBU31QfNoLT +BSab74lAD6FCxPDAnvnS6s9pdqxt0zs3ZLpS5HdfsRTUDJF4ecl5pEcYZ+yl2nu3bRl 5lKCd9ywvnr8m2I5TNSAtnJc39gnp56Jzx+6iuQ7ZiLAngRTEry0uwUlD9kaFLW9K40y iA/q5qohCo6oklzzlAJNQPCK0vBb38lfMUFd8Y0o+j986wlbpTNvgQcEj5H9N4bmNIQI gg1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=DLwNgOEx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc37-20020a17090716a500b007c00de4e8d5si3233432ejc.798.2022.11.28.15.06.47; Mon, 28 Nov 2022 15:07:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=DLwNgOEx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234454AbiK1XEm (ORCPT + 99 others); Mon, 28 Nov 2022 18:04:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234538AbiK1XE0 (ORCPT ); Mon, 28 Nov 2022 18:04:26 -0500 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E7F72C103; Mon, 28 Nov 2022 15:04:25 -0800 (PST) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ASLXlBX023374; Mon, 28 Nov 2022 23:03:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references; s=pps0720; bh=I+8ZPqA+Mk7OX+uGOemUMsAF9IijmZ08o+d7ve+/0GU=; b=DLwNgOExSocNtcwCbjyv8GGMIXwr5dCmDxABABlpSOHJMAVD6ANhydD1kcezuBXDX3s8 zCq2od0md3wLABiNvCW3y3rq/WWN3xcJK3RbNUIEK+1h/mrTNczag0DoXrQBFCWbNbft VMdybHuAd6n6kWEmWG2AKYsDvZkkrV0WbeWqiUhh3yW7PdyrzjJcNXAmumtUNIo8Vi/g kJJg2cNJcnxrbVbLBdw+e0VVzmxxhCGEeyv8yf2MPIo+KwGfHKg5P+m8HevE8KwyaY89 wEs466ctcwDdVSDAnbqk/14eCJSNy9sp8dNOIF6Ws3QZQKTv0srGHOfzAEYntJ8AY3vs 6g== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3m51axt8aq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 23:03:48 +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 4C4E0801ADE; Mon, 28 Nov 2022 23:03:48 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id BC40D8084C7; Mon, 28 Nov 2022 23:03:47 +0000 (UTC) From: nick.hawkins@hpe.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, verdun@hpe.com, nick.hawkins@hpe.com, corbet@lwn.net, linux@armlinux.org.uk, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/6] hwmon: (gxp-fan-ctrl) Add GXP fan controller Date: Mon, 28 Nov 2022 17:02:14 -0600 Message-Id: <20221128230219.39537-2-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128230219.39537-1-nick.hawkins@hpe.com> References: <20221128230219.39537-1-nick.hawkins@hpe.com> X-Proofpoint-GUID: MFB_z8x_8qqw3MuOVwI9mQf83Q3CSmHa X-Proofpoint-ORIG-GUID: MFB_z8x_8qqw3MuOVwI9mQf83Q3CSmHa X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_17,2022-11-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 phishscore=0 adultscore=0 clxscore=1011 suspectscore=0 mlxscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211280166 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750783053625093087?= X-GMAIL-MSGID: =?utf-8?q?1750783053625093087?= From: Nick Hawkins The GXP SoC can support up to 16 fans through the interface provided by the CPLD. The current support is limited to 8 fans. The fans speeds are controlled via 8 different PWMs which can vary in value from 0-255. The fans are also capable of reporting if they have failed to the CPLD which in turn reports the status to the GXP SoC. Signed-off-by: Nick Hawkins --- v2: *Changed number of supported fans from 16 to 8 in code *Remove last sentence of commit description *Removed support for fan[0-15]_input in code and documentation *Changed documentation to limit fan count to 7 *Changed documentation license *Removed PWM defines *Added gxp-fan-ctrl to hwmon's index.rst *Removed mutex *Added fan_enable support to report if the fan is enabled *Changed presents to present *Removed unnecessary () *Add comment for plreg reads and calculations *Add comment for the use of platform power state in code *Removed use of variable offsets and went with hardcoding instead *Rewrote driver to use devm_hwmon_device_register_with_info() *Remove unused header files *Fix GPL header *Changed module description *Add kfree in case of failure to get regmaps or resource --- Documentation/hwmon/gxp-fan-ctrl.rst | 28 +++ Documentation/hwmon/index.rst | 1 + drivers/hwmon/Kconfig | 9 + drivers/hwmon/Makefile | 1 + drivers/hwmon/gxp-fan-ctrl.c | 305 +++++++++++++++++++++++++++ 5 files changed, 344 insertions(+) create mode 100644 Documentation/hwmon/gxp-fan-ctrl.rst create mode 100644 drivers/hwmon/gxp-fan-ctrl.c diff --git a/Documentation/hwmon/gxp-fan-ctrl.rst b/Documentation/hwmon/gxp-fan-ctrl.rst new file mode 100644 index 000000000000..ae3397e81c04 --- /dev/null +++ b/Documentation/hwmon/gxp-fan-ctrl.rst @@ -0,0 +1,28 @@ +.. SPDX-License-Identifier: GPL-2.0-only + +Kernel driver gxp-fan-ctrl +========================== + +Supported chips: + + * HPE GXP SOC + +Author: Nick Hawkins + + +Description +----------- + +gxp-fan-ctrl is a driver which provides fan control for the hpe gxp soc. +The driver allows the gathering of fan status and the use of fan +PWM control. + + +Sysfs attributes +---------------- + +======================= =========================================================== +pwm[0-7] Fan 0 to 7 respective PWM value (0-255) +fan[0-7]_fault Fan 0 to 7 respective fault status: 1 fail, 0 ok +fan[0-7]_enable Fan 0 to 7 respective enabled status: 1 enabled, 0 disabled +======================= =========================================================== diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index f7113b0f8b2a..b319ab173d1d 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -73,6 +73,7 @@ Hardware Monitoring Kernel Drivers g762 gsc-hwmon gl518sm + gxp-fan-ctrl hih6130 ibmaem ibm-cffps diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index e70d9614bec2..9e0427f20141 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -705,6 +705,15 @@ config SENSORS_GPIO_FAN This driver can also be built as a module. If so, the module will be called gpio-fan. +config SENSORS_GXP_FAN_CTRL + tristate "HPE GXP fan controller" + depends on ARCH_HPE_GXP || COMPILE_TEST + help + If you say yes here you get support for GXP fan control functionality. + + The GXP controls fan function via the CPLD through the use of PWM + registers. This driver reports status and pwm setting of the fans. + config SENSORS_HIH6130 tristate "Honeywell Humidicon HIH-6130 humidity/temperature sensor" depends on I2C diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 007e829d1d0d..b474dcc708c4 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -83,6 +83,7 @@ obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o obj-$(CONFIG_SENSORS_GSC) += gsc-hwmon.o obj-$(CONFIG_SENSORS_GPIO_FAN) += gpio-fan.o +obj-$(CONFIG_SENSORS_GXP_FAN_CTRL) += gxp-fan-ctrl.o obj-$(CONFIG_SENSORS_HIH6130) += hih6130.o obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o obj-$(CONFIG_SENSORS_I5500) += i5500_temp.o diff --git a/drivers/hwmon/gxp-fan-ctrl.c b/drivers/hwmon/gxp-fan-ctrl.c new file mode 100644 index 000000000000..0b03d33a3a7b --- /dev/null +++ b/drivers/hwmon/gxp-fan-ctrl.c @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (C) 2022 Hewlett-Packard Enterprise Development Company, L.P. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define OFS_FAN_INST 0 /* Is 0 because plreg base will be set at INST */ +#define OFS_FAN_FAIL 2 /* Is 2 bytes after base */ +#define OFS_SEVSTAT 0 /* Is 0 because fn2 base will be set at SEVSTAT */ +#define POWER_BIT 24 + +struct gxp_fan_ctrl_drvdata { + struct device *dev; + struct device *hwmon_dev; + struct regmap *plreg_map; /* Programmable logic register regmap */ + struct regmap *fn2_map; /* Function 2 regmap */ + void __iomem *base; +}; + +static bool fan_installed(struct device *dev, int fan) +{ + struct gxp_fan_ctrl_drvdata *drvdata = dev_get_drvdata(dev); + u32 val; + + regmap_read(drvdata->plreg_map, OFS_FAN_INST, &val); + if (val & BIT(fan)) + return 1; + else + return 0; +} + +static long fan_failed(struct device *dev, int fan) +{ + struct gxp_fan_ctrl_drvdata *drvdata = dev_get_drvdata(dev); + u32 val; + + /* + * The offset for fan fail is 2 which is not word aligned. + * Read from fan installed which is 0 and shift value. + */ + + regmap_read(drvdata->plreg_map, OFS_FAN_INST, &val); + + if ((val >> (8 * OFS_FAN_FAIL)) & BIT(fan)) + return 1; + else + return 0; +} + +static long fan_enabled(struct device *dev, int fan) +{ + struct gxp_fan_ctrl_drvdata *drvdata = dev_get_drvdata(dev); + unsigned int reg; + + /* + * Check the power status as if the platform is off the value + * reported for the PWM will be incorrect. Report fan as + * disabled. + */ + regmap_read(drvdata->fn2_map, OFS_SEVSTAT, ®); + + /* If Fan is installed and the system is on it is enabled */ + if ((reg & BIT(POWER_BIT)) && fan_installed(dev, fan)) + return 1; + + /* Platform power is off, fan is disabled */ + return 0; +} + +static int gxp_pwm_write(struct device *dev, u32 attr, int channel, long val) +{ + struct gxp_fan_ctrl_drvdata *drvdata = dev_get_drvdata(dev); + + switch (attr) { + case hwmon_pwm_input: + if (val > 255) + return -EINVAL; + writeb(val, drvdata->base + channel); + return 0; + default: + return -EOPNOTSUPP; + } +} + +static int gxp_fan_ctrl_write(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long val) +{ + switch (type) { + case hwmon_pwm: + return gxp_pwm_write(dev, attr, channel, val); + default: + return -EOPNOTSUPP; + } +} + +static int gxp_fan_read(struct device *dev, u32 attr, int channel, long *val) +{ + switch (attr) { + case hwmon_fan_enable: + *val = fan_enabled(dev, channel); + return 0; + case hwmon_fan_fault: + *val = fan_failed(dev, channel); + return 0; + default: + return -EOPNOTSUPP; + } +} + +static int gxp_pwm_read(struct device *dev, u32 attr, int channel, long *val) +{ + struct gxp_fan_ctrl_drvdata *drvdata = dev_get_drvdata(dev); + unsigned int reg; + + /* + * Check the power status of the platform. If the platform is off + * the value reported for the PWM will be incorrect. In this case + * report a PWM of zero. + */ + regmap_read(drvdata->fn2_map, 0, ®); + if (reg & BIT(POWER_BIT)) { + /* If Fan present, then read it. */ + *val = fan_installed(dev, channel) ? readb(drvdata->base + channel) : 0; + } else { + *val = 0; + } + + return 0; +} + +static int gxp_fan_ctrl_read(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long *val) +{ + switch (type) { + case hwmon_fan: + return gxp_fan_read(dev, attr, channel, val); + case hwmon_pwm: + return gxp_pwm_read(dev, attr, channel, val); + default: + return -EOPNOTSUPP; + } +} + +static umode_t gxp_fan_ctrl_is_visible(const void *_data, + enum hwmon_sensor_types type, + u32 attr, int channel) +{ + umode_t mode = 0; + + switch (type) { + case hwmon_fan: + switch (attr) { + case hwmon_fan_enable: + case hwmon_fan_fault: + mode = 0444; + default: + break; + } + case hwmon_pwm: + switch (attr) { + case hwmon_pwm_input: + mode = 0644; + default: + break; + } + default: + break; + } + + return mode; +} + +static const struct hwmon_ops gxp_fan_ctrl_ops = { + .is_visible = gxp_fan_ctrl_is_visible, + .read = gxp_fan_ctrl_read, + .write = gxp_fan_ctrl_write, +}; + +static const struct hwmon_channel_info *gxp_fan_ctrl_info[] = { + HWMON_CHANNEL_INFO(fan, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE, + HWMON_F_FAULT | HWMON_F_ENABLE), + HWMON_CHANNEL_INFO(pwm, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE), + NULL +}; + +static const struct hwmon_chip_info gxp_fan_ctrl_chip_info = { + .ops = &gxp_fan_ctrl_ops, + .info = gxp_fan_ctrl_info, + +}; + +static struct regmap *gxp_fan_ctrl_init_regmap(struct platform_device *pdev, char *reg_name) +{ + struct regmap_config regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + }; + void __iomem *base; + + base = devm_platform_ioremap_resource_byname(pdev, reg_name); + if (IS_ERR(base)) + return ERR_CAST(base); + + regmap_config.name = reg_name; + + return devm_regmap_init_mmio(&pdev->dev, base, ®map_config); +} + +static int gxp_fan_ctrl_probe(struct platform_device *pdev) +{ + struct gxp_fan_ctrl_drvdata *drvdata; + struct resource *res; + struct device *dev = &pdev->dev; + int error; + + drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gxp_fan_ctrl_drvdata), + GFP_KERNEL); + if (!drvdata) + return -ENOMEM; + + drvdata->dev = &pdev->dev; + + platform_set_drvdata(pdev, drvdata); + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + drvdata->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(drvdata->base)) { + error = dev_err_probe(dev, PTR_ERR(drvdata->base), + "failed to map base\n"); + goto free_mem; + } + drvdata->plreg_map = gxp_fan_ctrl_init_regmap(pdev, "pl"); + if (IS_ERR(drvdata->plreg_map)) { + error = dev_err_probe(dev, PTR_ERR(drvdata->plreg_map), + "failed to map plreg_handle\n"); + goto free_mem; + } + + drvdata->fn2_map = gxp_fan_ctrl_init_regmap(pdev, "fn2"); + if (IS_ERR(drvdata->fn2_map)) { + error = dev_err_probe(dev, PTR_ERR(drvdata->fn2_map), + "failed to map fn2_handle\n"); + goto free_mem; + } + + drvdata->hwmon_dev = devm_hwmon_device_register_with_info(&pdev->dev, + "fan_ctrl", + drvdata, + &gxp_fan_ctrl_chip_info, + NULL); + + if (IS_ERR(drvdata->hwmon_dev)) { + error = dev_err_probe(dev, PTR_ERR(drvdata->hwmon_dev), + "failed to register fan ctrl\n"); + + goto free_mem; + } + + return 0; + +free_mem: + kfree(drvdata); + return error; +} + +static const struct of_device_id gxp_fan_ctrl_of_match[] = { + { .compatible = "hpe,gxp-fan-ctrl", }, + {}, +}; +MODULE_DEVICE_TABLE(of, gxp_fan_ctrl_of_match); + +static struct platform_driver gxp_fan_ctrl_driver = { + .probe = gxp_fan_ctrl_probe, + .driver = { + .name = "gxp-fan-ctrl", + .of_match_table = gxp_fan_ctrl_of_match, + }, +}; +module_platform_driver(gxp_fan_ctrl_driver); + +MODULE_AUTHOR("Nick Hawkins "); +MODULE_DESCRIPTION("HPE GXP fan controller"); +MODULE_LICENSE("GPL"); From patchwork Mon Nov 28 23:02:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 26972 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5997223wrr; Mon, 28 Nov 2022 15:06:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eq9sJl8kUaE6DC4XnmIBogOdmV2D3MmobjfgtkNKfPLQiBui7VymP93O7l/p58IOtVSi3 X-Received: by 2002:a63:230e:0:b0:470:86e3:b93e with SMTP id j14-20020a63230e000000b0047086e3b93emr30200550pgj.337.1669676775890; Mon, 28 Nov 2022 15:06:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676775; cv=none; d=google.com; s=arc-20160816; b=NwszpwMRSGxICl2qTrceGxcYPOhWBn5+mlzSIfo+fq94W1bsy3WevZODil+ybXJsW1 JdSZcWQuQ04zEo9C+Cgznx9KDclkiT3LWtBD3WFXXbYhwirNEcSFxZmUANCDvom5UXeQ aOzOoXgdDgIQVyny44q7QJLKbFHTjd2OqCQcAgdLTTJiIQftLP/A/YdpkvE6HiWkrQ2Q LLHkeNDj2Vo/YO6eeqTeQg0PVc5nyA6xH/XV5BlydVUAFtOWXQOotHZ3GjGTkgTIGSsz k7WuajvBpkXno1e1GqCjgPYTjDSftF0uHhALOr1Nng/JPWDjTo7OTcDKUUzqNNAmJkHu rm3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature; bh=qzkABfP+g0Wxt+cG6aV52+3v2poBBCO9AJCGAzw3bXg=; b=m8RWIfzUrNzSWIhNuZ7nyh4T9tSXDX1uMvLohWlkgCfVUMxilQY0ehnFOL9U0CDrlK TQ7JBYWy7tLIWfaVvkkZJiJJdhH3DEXXL6Eit2evT0pMlZxiTB1PKSYgkfiOlJRrtuur DKpsCEn3Lef/48tL3Y0nclVqLjzauFf7A0obt+ZqNrt9vKJpoYJZlmwvQ/KiC2SpqSnc IS+Y7GzSRbF6aeC4/mzBHmhJILdju1ASMpYaeyt/FHXeYXmvQUqoh7H8Nc+50F7ceFsq wafoiepePwfs5wa4S8tqGUJd8bBsp0AGELMox/vgHReQjEJON8BCw1/KUegc/TRIrFEL 5LXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=m7FesLKn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d188-20020a6336c5000000b00477cead7cd1si13687407pga.644.2022.11.28.15.06.03; Mon, 28 Nov 2022 15:06:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=m7FesLKn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234502AbiK1XEg (ORCPT + 99 others); Mon, 28 Nov 2022 18:04:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiK1XEZ (ORCPT ); Mon, 28 Nov 2022 18:04:25 -0500 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D64632B26B; Mon, 28 Nov 2022 15:04:24 -0800 (PST) Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ASM1tJI001979; Mon, 28 Nov 2022 23:03:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references; s=pps0720; bh=qzkABfP+g0Wxt+cG6aV52+3v2poBBCO9AJCGAzw3bXg=; b=m7FesLKn/jPrFzZ9Bkm6LPMADgBPlywEWo8+OTqmRJ/LPqyPXQoTm5FQs3HFew8tM/mC L8nJDZCgCHbmbZ1yB6DHiX3wrjAyAF8NQEdq3QJcTlAaXcpsp69oNp0xro7Jc6Bph4XO gkkMuKogMn/JTGtOXyJZmS/DLmgVAFhCn4PpDm2CFmrBbPCSVo4GQkkQIcwd+/2L6lVp Vk113zV45dgYMXYZKdmuGfcfOS/mCDqRYhQogIfvxy0EWZCVKDV4I12+G8NVor6rUxXw eab9eHu8+SH2YPiJGRL2N08mef774IS/EqrRw4+3mi3B4hjca1HFEEt91ogjdrA8xXW/ xQ== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3m50bd2smb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 23:03:49 +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 DE1A1801ACA; Mon, 28 Nov 2022 23:03:48 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id 501C280B37B; Mon, 28 Nov 2022 23:03:48 +0000 (UTC) From: nick.hawkins@hpe.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, verdun@hpe.com, nick.hawkins@hpe.com, corbet@lwn.net, linux@armlinux.org.uk, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/6] ABI: sysfs-class-hwmon: add a description for fanY_fault Date: Mon, 28 Nov 2022 17:02:15 -0600 Message-Id: <20221128230219.39537-3-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128230219.39537-1-nick.hawkins@hpe.com> References: <20221128230219.39537-1-nick.hawkins@hpe.com> X-Proofpoint-GUID: jBNy7-NfQBYFiY9H8tmybTqFfHqOlnyW X-Proofpoint-ORIG-GUID: jBNy7-NfQBYFiY9H8tmybTqFfHqOlnyW X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_17,2022-11-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211280166 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750782994726915477?= X-GMAIL-MSGID: =?utf-8?q?1750782994726915477?= From: Nick Hawkins The fans are capable of reporting a fault to the CPLD controller which then reports it to the GXP SoC via PLREGS. This patch enables hwmon to be able to report these failures up to the HOST OS. Signed-off-by: Nick Hawkins --- v2: *No change --- Documentation/ABI/testing/sysfs-class-hwmon | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-hwmon b/Documentation/ABI/testing/sysfs-class-hwmon index 7271781a23b2..638f4c6d4ec7 100644 --- a/Documentation/ABI/testing/sysfs-class-hwmon +++ b/Documentation/ABI/testing/sysfs-class-hwmon @@ -276,6 +276,15 @@ Description: RW +What: /sys/class/hwmon/hwmonX/fanY_fault +Description: + Reports if a fan has reported failure. + + - 1: Failed + - 0: Ok + + RO + What: /sys/class/hwmon/hwmonX/pwmY Description: Pulse width modulation fan control. From patchwork Mon Nov 28 23:02:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 26975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5998691wrr; Mon, 28 Nov 2022 15:08:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf7yPYZy6WmqgVgmBnzOXATuNm64RPiiY5RiX5BA8kSPJSGCBnMx0+RCRjRUEvbMlx7iinSv X-Received: by 2002:a05:6402:5011:b0:469:9c84:3bdd with SMTP id p17-20020a056402501100b004699c843bddmr9082576eda.302.1669676919676; Mon, 28 Nov 2022 15:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676919; cv=none; d=google.com; s=arc-20160816; b=FXT+r1CqXs3UijEwmhTwlm+djy3FMaFliCrn1zZj9NO215PjVwgY5C5Teu/jCUYIWc vYpi0knYYYYr7WIcThLzpCCgVk1eh8easTGipTwiuBrty2P8fANXQWlXp3Ep45IBelYD PBBJzQvaG2hpij5JyLwn8WEGcec1QxsmQV9G6+lU0VISslhCTIyGKufJR+YqqWR9MMex WqrwY6lhy8e5tfXijqtV79mWs6PQ4UQjQ92OaI7OetkR2G6V5R/2B35ylB4CLRvrlgSg HUr5giqrGweUMaq5dA7fxXKDBlgt9e7OgpDdDJUw3KgWJGA5MRLIKwagQREM2MSz3uzG 68Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=t31IEjcYchjEXWmt9ra1gXCpjlVEs+O+5Rxh/UM/zC4=; b=PH+m2J0jsR/l03rKgnHEuA2lQuVwzsO1Z6FTEEa2iD7h2jbJEotFnf1i7dSAC5/57D PBcMsk2LI16t8XvqdCiYzn8yWqp6tkJlVNjZa+amlDgd2As9Kq3ij3AW4Rz5qTJxKdiM widSM2hvzrkrl1FSiAxJDkVOh5a4c1nNmtkIWdm5kPA/EtilyrizMoqaYacKhf4hY63g Av1UNrDEpu5D4/jxpj306hd/TH3zhtNJjGaKgTfjPXK/fJ51246YLSvQLbOuWLHAgfKf kYYs1UIBA7yQA6ndkI+Uf/sHinBCYfuvTteWhrjJHgpyx+O4sWunxm3VNra+9zRcRStS ROpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=TqYixPXO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb12-20020a1709076d8c00b0078d1faeb619si11658280ejc.777.2022.11.28.15.08.15; Mon, 28 Nov 2022 15:08:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=TqYixPXO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234615AbiK1XEj (ORCPT + 99 others); Mon, 28 Nov 2022 18:04:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234454AbiK1XEZ (ORCPT ); Mon, 28 Nov 2022 18:04:25 -0500 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C6492BB31; Mon, 28 Nov 2022 15:04:25 -0800 (PST) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ASMgedY021876; Mon, 28 Nov 2022 23:03:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version; s=pps0720; bh=t31IEjcYchjEXWmt9ra1gXCpjlVEs+O+5Rxh/UM/zC4=; b=TqYixPXOg8tQOJbNmZI5LaMF1lIeLqJ3j67TY8KWEugA/8hXO8Vn2LOslCE/dO1L1kGR r6BAIpMBopqSjEn2Cve+FsYCsvjI8Wgcb1zN8JRjbtvTxownXLSZZdLToxWkFOOk5LKC e0c6iKaPyDfj3BPSiVxg/8f8TAMNtSTXEltfKdWFQL2IMyE5IDDAtXbC//NPxJ6svxuw TfyCcVrKoXC4tQw0T5IXnobOxQTRAysPTPn48rb/bdjok4/BQIf+qFbyV3lGy86i/eFJ Oe/ukFdUofTxe3OhZJxOFZ27ksSfwDJ0VwutWgrWSsiWgxd7E4KgaGqnyotIzq2ljXNF UQ== Received: from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3m50q92jsu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 23:03:50 +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 p1lg14878.it.hpe.com (Postfix) with ESMTPS id 77EDA2FB04; Mon, 28 Nov 2022 23:03:49 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id E2BF98084C7; Mon, 28 Nov 2022 23:03:48 +0000 (UTC) From: nick.hawkins@hpe.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, verdun@hpe.com, nick.hawkins@hpe.com, corbet@lwn.net, linux@armlinux.org.uk, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/6] dt-bindings: hwmon: Add hpe,gxp-fan-ctrl Date: Mon, 28 Nov 2022 17:02:16 -0600 Message-Id: <20221128230219.39537-4-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128230219.39537-1-nick.hawkins@hpe.com> References: <20221128230219.39537-1-nick.hawkins@hpe.com> X-Proofpoint-ORIG-GUID: A-Qb7R9fw52arUGo_SndxabU11Yzowe6 X-Proofpoint-GUID: A-Qb7R9fw52arUGo_SndxabU11Yzowe6 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_17,2022-11-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 suspectscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211280166 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750783145696752203?= X-GMAIL-MSGID: =?utf-8?q?1750783145696752203?= From: Nick Hawkins Create documentation for the binding to support control of the fans on HPE platforms. Signed-off-by: Nick Hawkins --- v2: *Changed plreg to pl *Changed fn2reg to reg *Edited descriptions for all registers *Changed fanctrl to fan-controller *Changed commit description --- .../bindings/hwmon/hpe,gxp-fan-ctrl.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/hpe,gxp-fan-ctrl.yaml diff --git a/Documentation/devicetree/bindings/hwmon/hpe,gxp-fan-ctrl.yaml b/Documentation/devicetree/bindings/hwmon/hpe,gxp-fan-ctrl.yaml new file mode 100644 index 000000000000..b4eb7460e277 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/hpe,gxp-fan-ctrl.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/hpe,gxp-fan-ctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HPE GXP Fan Controller + +maintainers: + - Nick Hawkins + +properties: + compatible: + const: hpe,gxp-fan-ctrl + + reg: + items: + - description: Fan controller PWM + - description: Programmable logic + - description: Function 2 + + reg-names: + items: + - const: base + - const: pl + - const: fn2 + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + fan-controller@1000c00 { + compatible = "hpe,gxp-fan-ctrl"; + reg = <0x1000c00 0x200>, <0xd1000000 0xff>, <0x80200000 0x100000>; + reg-names = "base", "pl", "fn2"; + }; From patchwork Mon Nov 28 23:02:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 26971 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5997104wrr; Mon, 28 Nov 2022 15:06:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf7xxXB+IPEpPXinG2yMn16YhjpKkxOTRlsPSeKI9Pp8Zr6mbxN9b8OpJSCCRISrXHK1k+/G X-Received: by 2002:a17:902:e84a:b0:186:6180:fb89 with SMTP id t10-20020a170902e84a00b001866180fb89mr33102261plg.142.1669676767111; Mon, 28 Nov 2022 15:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676767; cv=none; d=google.com; s=arc-20160816; b=ll7M6iOVgBufMK5YW5wyYM4uM/ueQ7F5n63Ohp2q83zwTlx+AEGojPH1mqyqubHGFb UahLh8p7jUArRKSRFRbHS7LajKkL7yDpM2iUK4n6jtmripa4DoWZFDQBQIxHZEhSI44I AOEKx4dLzgfCfwsrMu3HaK4Rc6RS00LxwuKU/tVO7dLoh9+VaF2NeJPGyhqobcVoC4jL MxxRCgY7uu48V2Dd0Xp8uQUpkbIsxn9wS1WUjp7W0q/YUpNHpI/GbdYL2vS3SeXA5dwq gbZKdPYHWY66dSC7bsmsSSn7fP0MBj0uBsiZ84OtDVpJxSgYIRFTOYJgdKW1AUqSBhp3 ftog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature; bh=2EwvxnnECyXPvCBRP6sXpubbFjN4xRKiPypMXMT50Pc=; b=us3ertZb6QzS+kJ/2DMOMdyB5chGQnM2+SiEdrsXsa+E3g0RdvUtMEY60swwpfio9Y SEvvHoHfwb9gpYRpQptYgKG9bCVVLBcdYVPKzjnc/L+Q4f8zKcgi+fu9XR47s/PJaS0c uL1RqRYKzWXHLl3WvQgZhAd02lOeRiEPRZZnmuV5xKnnmbpUxnxSQrcm0bglZb//e2Ov 4RTBzDtKcOUq9AL6K533mUEAYkVpFMhiHn7ljwl5JhnIFIs6e78taHhD23Db6Ro8ZykN W79jtaI/JWLM3rY3qdg8AUvZQysOS7721oo6Po7/R1e6mwPNArDvY0NBqU11+RD9mRGF JAAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=F43YjH3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a170902f64300b001893689660asi12315900plg.209.2022.11.28.15.05.53; Mon, 28 Nov 2022 15:06:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=F43YjH3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbiK1XE3 (ORCPT + 99 others); Mon, 28 Nov 2022 18:04:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234375AbiK1XEZ (ORCPT ); Mon, 28 Nov 2022 18:04:25 -0500 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5CF42B268; Mon, 28 Nov 2022 15:04:24 -0800 (PST) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ASLVwv6001323; Mon, 28 Nov 2022 23:03:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references; s=pps0720; bh=2EwvxnnECyXPvCBRP6sXpubbFjN4xRKiPypMXMT50Pc=; b=F43YjH3aXqyUGY48jU30AkHa0NDRb+ZBgsXaCIfmeKmqRf8Qyh+pWDImMz0aeBCUOsm/ UGfrHTA5xBUEckkh/JPeqBviygl/x/U23qH+75ALfgYHCj4LILKvzatgmLUa7WVLaNIC BpY2/S6H3aFbNTQh89tIPyGvwM57iXJPNjzCBT/ao1dOKde32Am4PuQWRj79/NiXLLu9 9pcDxZSYvzb+rNEF0k95AECqV1KZOvpXlFF19f0DUHIax7sPXnkjSiwHiuyHxxUdJ7ba hpxAWiE/Bj8Yy6pLZSE4Rg6seHVWnCOzJ7nf77QlmNQ5lhpIyLTNT3mb6Y/cp5Mke6jL 4g== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3m50q92jsy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 23:03:50 +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 p1lg14879.it.hpe.com (Postfix) with ESMTPS id 114252FCEF; Mon, 28 Nov 2022 23:03:50 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id 79D578001A7; Mon, 28 Nov 2022 23:03:49 +0000 (UTC) From: nick.hawkins@hpe.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, verdun@hpe.com, nick.hawkins@hpe.com, corbet@lwn.net, linux@armlinux.org.uk, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/6] ARM: dts: add GXP Support for fans and SPI Date: Mon, 28 Nov 2022 17:02:17 -0600 Message-Id: <20221128230219.39537-5-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128230219.39537-1-nick.hawkins@hpe.com> References: <20221128230219.39537-1-nick.hawkins@hpe.com> X-Proofpoint-ORIG-GUID: CyAsHaBxvAbu8xq0iCbJII-7Nsv25_oT X-Proofpoint-GUID: CyAsHaBxvAbu8xq0iCbJII-7Nsv25_oT X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_17,2022-11-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 suspectscore=0 impostorscore=0 mlxscore=0 mlxlogscore=764 priorityscore=1501 spamscore=0 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211280166 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750782985818692728?= X-GMAIL-MSGID: =?utf-8?q?1750782985818692728?= From: Nick Hawkins Reorganize the base address of AHB to accommodate the SPI and fan driver register requirements. Add the hpe,gxp-spifi and hpe,gxp-fan-ctrl compatibles. Add comments to make the register range more clear. Signed-off-by: Nick Hawkins --- v2: *Changed fn2reg to fn2 *Changed plreg to pl *Changed fanctrl to fan-controller *Adjusted base register range to elminate need for defines in code --- arch/arm/boot/dts/hpe-bmc-dl360gen10.dts | 58 +++++++++++++++++++++ arch/arm/boot/dts/hpe-gxp.dtsi | 64 +++++++++++++++++------- 2 files changed, 103 insertions(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts b/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts index 3a7382ce40ef..d49dcef95c5c 100644 --- a/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts +++ b/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts @@ -24,3 +24,61 @@ reg = <0x40000000 0x20000000>; }; }; + +&spifi { + status = "okay"; + flash@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + u-boot@0 { + label = "u-boot"; + reg = <0x0 0x60000>; + }; + + u-boot-env@60000 { + label = "u-boot-env"; + reg = <0x60000 0x20000>; + }; + + kernel@80000 { + label = "kernel"; + reg = <0x80000 0x4c0000>; + }; + + rofs@540000 { + label = "rofs"; + reg = <0x540000 0x1740000>; + }; + + rwfs@1c80000 { + label = "rwfs"; + reg = <0x1c80000 0x250000>; + }; + + section@1ed0000{ + label = "section"; + reg = <0x1ed0000 0x130000>; + }; + }; + }; + flash@1 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + host-prime@0 { + label = "host-prime"; + reg = <0x0 0x02000000>; + }; + + host-second@2000000 { + label = "host-second"; + reg = <0x02000000 0x02000000>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/hpe-gxp.dtsi b/arch/arm/boot/dts/hpe-gxp.dtsi index cf735b3c4f35..b73b22a93716 100644 --- a/arch/arm/boot/dts/hpe-gxp.dtsi +++ b/arch/arm/boot/dts/hpe-gxp.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Device Tree file for HPE GXP + * Device Tree for HPE */ /dts-v1/; @@ -52,76 +52,102 @@ cache-level = <2>; }; - ahb@c0000000 { + ahb@80000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges = <0x0 0xc0000000 0x30000000>; + ranges = <0x0 0x80000000 0xf000000>, /* 0x80000000 - 0x8f000000 */ + <0x40000000 0xc0000000 0x7fffffff>; /* 0xc0000000 - 0xffffffff */ dma-ranges; - vic0: interrupt-controller@eff0000 { + spifi: spi@40000200 { /* 0xc0000200 */ + compatible = "hpe,gxp-spifi"; + reg = <0x40000200 0x80>, <0x4000c000 0x100>, <0x78000000 0x7ff0000>; + interrupts = <20>; + interrupt-parent = <&vic0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + flash@0 { + reg = <0>; + compatible = "jedec,spi-nor"; + }; + + flash@1 { + reg = <1>; + compatible = "jedec,spi-nor"; + }; + }; + + vic0: interrupt-controller@4eff0000 { /* 0xceff0000 */ compatible = "arm,pl192-vic"; - reg = <0xeff0000 0x1000>; + reg = <0x4eff0000 0x1000>; interrupt-controller; #interrupt-cells = <1>; }; - vic1: interrupt-controller@80f00000 { + vic1: interrupt-controller@f00000 { /* 0x80f00000 */ compatible = "arm,pl192-vic"; - reg = <0x80f00000 0x1000>; + reg = <0xf00000 0x1000>; interrupt-controller; #interrupt-cells = <1>; }; - uarta: serial@e0 { + uarta: serial@400000e0 { /* 0xc00000e0 */ compatible = "ns16550a"; - reg = <0xe0 0x8>; + reg = <0x400000e0 0x8>; interrupts = <17>; interrupt-parent = <&vic0>; clock-frequency = <1846153>; reg-shift = <0>; }; - uartb: serial@e8 { + uartb: serial@400000e8 { /* 0xc00000e8 */ compatible = "ns16550a"; - reg = <0xe8 0x8>; + reg = <0x400000e8 0x8>; interrupts = <18>; interrupt-parent = <&vic0>; clock-frequency = <1846153>; reg-shift = <0>; }; - uartc: serial@f0 { + uartc: serial@400000f0 { /* 0xc00000f0 */ compatible = "ns16550a"; - reg = <0xf0 0x8>; + reg = <0x400000f0 0x8>; interrupts = <19>; interrupt-parent = <&vic0>; clock-frequency = <1846153>; reg-shift = <0>; }; - usb0: usb@efe0000 { + usb0: usb@4efe0000 { /* 0xcefe0000 */ compatible = "hpe,gxp-ehci", "generic-ehci"; - reg = <0xefe0000 0x100>; + reg = <0x4efe0000 0x100>; interrupts = <7>; interrupt-parent = <&vic0>; }; - st: timer@80 { + st: timer@40000080 { /* 0xc0000080 */ compatible = "hpe,gxp-timer"; - reg = <0x80 0x16>; + reg = <0x40000080 0x16>; interrupts = <0>; interrupt-parent = <&vic0>; clocks = <&iopclk>; clock-names = "iop"; }; - usb1: usb@efe0100 { + usb1: usb@4efe0100 { /* 0xcefe0100 */ compatible = "hpe,gxp-ohci", "generic-ohci"; - reg = <0xefe0100 0x110>; + reg = <0x4efe0100 0x110>; interrupts = <6>; interrupt-parent = <&vic0>; }; + + fan-controller@40000c10 { /* 0xc0000c10 */ + compatible = "hpe,gxp-fan-ctrl"; + reg = <0x40000c10 0x8>, <0x51000027 0x06>, <0x200070 0x04>; + reg-names = "base", "pl", "fn2"; + }; }; }; }; From patchwork Mon Nov 28 23:02:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 26976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5998983wrr; Mon, 28 Nov 2022 15:09:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7b9Cm4CoeRUpsXAektpKH4XjA3Qd0nhdhFB5cNZ6w2Lwsd+bAGHZ+qProlnlUQ3RubwsJR X-Received: by 2002:aa7:d7cc:0:b0:45b:4a4b:478c with SMTP id e12-20020aa7d7cc000000b0045b4a4b478cmr31454495eds.317.1669676953184; Mon, 28 Nov 2022 15:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676953; cv=none; d=google.com; s=arc-20160816; b=B6LlsLChRQHIeBg/Wi55Bc9qS5vlDbet3dws0Jt+88L5bUBNKCDaHU1/3cpRZo3eur xvtbKU9+rixfvUoxAoZD7jCIrJDVtBTfVjiGW10FDLqV/Gldz3ejen62Mxhirslad9Jd yXVXQ4paPLJPUApddRlI43Hlp0nj2aHVUtmBWrUqM2GUkbHSUgunSoDMjQXBlEvDpz+M SRYUoGnQ8dgg1B7OyKuudQ62SGkO5iwzYXUny/QJAqVEbt14VNX5jk20r7TZibz5D/3N ZwySu3APKSiehRNahMHR9ITpcF5boAz/PlSMc4YKopmU7qUEsvBvxLN1/ZCvpyJpy+Gg vvsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature; bh=DXAK1EaWRfw1oIJt4WdHECbM2ACqV+NVunoM9+Sh+lA=; b=AMZWBt9e8d4rAwpQuYXVODAnr37L28poB96LmPgbUpdeeA7hvn358/Tdf6V3pNXxav ffxNxh79EZbe82kpiH1HgdwcnphRUZF7W3bg7EeKPhUH+ytpOz+D8lyjhwoZOAWJUu7a tDGcRr7D1SVayVwAGVACf6uaOACQSVrzD8EJJEsI94VJCF3sV8kruoODmPx3wCLe7unP tX/SssJy2LL7d4d7S1bPnrZLDcOv74AD9lxWmF10bSTtOEMsabSR+zrNE9lNdKbbiEIz tfQfe8G2lFanCrkebFMmXWkmToRPZ7RFiPetMru4P4OtSapMO92jO4U1qU4K6ytgLk1V b+lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=A+rbnDfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i20-20020aa7dd14000000b00461dca37cd0si10401995edv.126.2022.11.28.15.08.49; Mon, 28 Nov 2022 15:09:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=A+rbnDfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234594AbiK1XEr (ORCPT + 99 others); Mon, 28 Nov 2022 18:04:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234540AbiK1XE0 (ORCPT ); Mon, 28 Nov 2022 18:04:26 -0500 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E6812C107; Mon, 28 Nov 2022 15:04:25 -0800 (PST) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ASLZhCR016778; Mon, 28 Nov 2022 23:03:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references; s=pps0720; bh=DXAK1EaWRfw1oIJt4WdHECbM2ACqV+NVunoM9+Sh+lA=; b=A+rbnDfzIGRi9ozR8DfWEaAB22pAewZyWA3DDvHoDjj2O30aF/gYU+I8ochKYMUjZVvj 6mGIdDk14oA1IvaD1n2Dd71ctzbTd4joRW4z47p2E2+SZGIKhxWTNVy42FhuBZ8DxeLC Ue8rBylNEPjMO3a+VE2dx6tsBdqXqb2rsd+AOaX0j/g7N/OESaeN47evx0EZ7JZwXsHt 3BAqHvEjM+5j9aSKZBGazA4l7W4ZMLFPuSucX02klPdQGn4IEtjGYkontmraqLus5AVY ch5FgQeXLgShTXHNi6tWSXHy8m8psKmnEZS7DvIe8NB0Q32CozUheEoCMsBUzqp6QSaX hQ== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3m51fra5j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 23:03:51 +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 A2481801743; Mon, 28 Nov 2022 23:03:50 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id 1083780D011; Mon, 28 Nov 2022 23:03:50 +0000 (UTC) From: nick.hawkins@hpe.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, verdun@hpe.com, nick.hawkins@hpe.com, corbet@lwn.net, linux@armlinux.org.uk, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/6] ARM: multi_v7_defconfig: Add GXP Fan and SPI support Date: Mon, 28 Nov 2022 17:02:18 -0600 Message-Id: <20221128230219.39537-6-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128230219.39537-1-nick.hawkins@hpe.com> References: <20221128230219.39537-1-nick.hawkins@hpe.com> X-Proofpoint-ORIG-GUID: Nu1l2obJ-VwT5txGTMIz7a4cdqwyuTQG X-Proofpoint-GUID: Nu1l2obJ-VwT5txGTMIz7a4cdqwyuTQG X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_17,2022-11-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211280166 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750783181174659545?= X-GMAIL-MSGID: =?utf-8?q?1750783181174659545?= From: Nick Hawkins In order for HPE platforms to be supported by linux on GXP it is necessary for there to be fan and spi driver support. There fan driver can support up to 16 fans that are driven by pwm through the CPLD. The SPI driver supports access to the core flash and bios part. The SPI driver spi-gxp was added previously to linux. Signed-off-by: Nick Hawkins --- v2: *No change --- arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 12b35008571f..92a854e7b01b 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -445,6 +445,7 @@ CONFIG_SPI_CADENCE=y CONFIG_SPI_DAVINCI=y CONFIG_SPI_FSL_QUADSPI=m CONFIG_SPI_GPIO=m +CONFIG_SPI_GXP=m CONFIG_SPI_FSL_DSPI=m CONFIG_SPI_OMAP24XX=y CONFIG_SPI_ORION=y @@ -535,6 +536,7 @@ CONFIG_SENSORS_NTC_THERMISTOR=m CONFIG_SENSORS_PWM_FAN=m CONFIG_SENSORS_RASPBERRYPI_HWMON=m CONFIG_SENSORS_INA2XX=m +CONFIG_SENSORS_GXP_FAN_CTRL=m CONFIG_CPU_THERMAL=y CONFIG_DEVFREQ_THERMAL=y CONFIG_IMX_THERMAL=y From patchwork Mon Nov 28 23:02:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawkins, Nick" X-Patchwork-Id: 26974 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5998121wrr; Mon, 28 Nov 2022 15:07:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Y31zn3Af4h7JvkNxZcCGM8mVfJvI6ZlV+Z4XUHhBUMKKMRpJs2Rpa0x1qqUY2jCg/Z7fI X-Received: by 2002:a17:90b:2711:b0:213:9b80:ceee with SMTP id px17-20020a17090b271100b002139b80ceeemr62836044pjb.243.1669676855415; Mon, 28 Nov 2022 15:07:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676855; cv=none; d=google.com; s=arc-20160816; b=OmdYV3momU1ORH6Pc7U3HOWiH5vCXPWNd0G8gciU0M55YpnQ7wTb+4ILeYA77wwIue MmO6XjbA5b3QAMUVAGximyQc5j+d1prFBRIoGdylTAAmMPxtoNTZUNohUtOwRThO1v3+ 9n+t1Hfoa4H9hpCUrI/MmpILeZ2vpSHAbnHPY97sRCTiaj01kXo3P1JwXzSo5Q3FIjxr on3UG9I28/NftmDgofhKvJlRvTJ+N38JUtLiU9hYlMaU3CYoHr3VbMV5N9pxubXfO0BX usMKhA2Qhy/dflF/d8o9458sv1LY0IPmLy7Y3KzsRnxyoz7NAptUXXwj6uBZVn4xsmu8 Xttw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature; bh=nfZUxtQGmgTd5ihJOCHHrl5PF/vDuIdrP8MQYcb5RsU=; b=IG9skOM8wO/oyLDQgV0Fy6rn7XtQf8szHfgt3d7MzM/v52cvScJBwdeoLBpqZgv1tT vPqbkJqK5hzpw5hOc08Ba3HUaM1E41aZkQEb7gTaDjd9mV6KiLWcTFWJ4gfIaCFU7fFM F6CJzS8/tIhCRQqmu+EVJWNRT9nroh8VOzV7XiNCUSPv+J+y9iWjh9u3CPbxNUvReQ2c VyWnxMGz4QjnkSrcuN91X9OfgjwiAX99sXp7MniTfIUiiu/aEs27k0tibjtEeCd7ANc+ jtU24NfGCYLeUldyDIvy4BJqpm1vikx43C+D0vfBls3T/o+i3RKcyZNAc7MGPyARt+aY ddKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=SSxAP57t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a170903228f00b00177fd8409b7si14803889plh.73.2022.11.28.15.07.21; Mon, 28 Nov 2022 15:07:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=SSxAP57t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233866AbiK1XEd (ORCPT + 99 others); Mon, 28 Nov 2022 18:04:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234335AbiK1XEZ (ORCPT ); Mon, 28 Nov 2022 18:04:25 -0500 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 015632BB0D; Mon, 28 Nov 2022 15:04:24 -0800 (PST) Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ASMCR1m017358; Mon, 28 Nov 2022 23:03:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references; s=pps0720; bh=nfZUxtQGmgTd5ihJOCHHrl5PF/vDuIdrP8MQYcb5RsU=; b=SSxAP57t+Q/sxkpP01TvGfTco675qOojopCfLEXGrYiWzz2OMur92C3XI/t4Yu2SSvTE dIOdFcmQem9lba0H8bJ64EIPurGuGjLWcABCD3LCA98GUi+HIb1/9v9UPrCgvsKroJNu dge3RNAKsSeCLTBpGOw6t3cpJzl2LBnxNw7qdObBDCoQm2XJ3LyVpwMkUdKhNUrmEVlx 4JcZHkL0tvpeTc8H0pe40aeYAjklR0YcBEWPO1gmA/ENlam/t8AjuwF4Y/jeExJ0YhI3 1GWRoIqpmsjrYoLc3p9aszfqgohCoozQLPDdQDV3BXORvtYvMXikJrJ6mDiPrjwMZtPV nQ== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3m4x6av7ph-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 23:03:52 +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 42183809F7B; Mon, 28 Nov 2022 23:03:51 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id A448480C99C; Mon, 28 Nov 2022 23:03:50 +0000 (UTC) From: nick.hawkins@hpe.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, verdun@hpe.com, nick.hawkins@hpe.com, corbet@lwn.net, linux@armlinux.org.uk, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 6/6] MAINTAINERS: add gxp fan controller and documents Date: Mon, 28 Nov 2022 17:02:19 -0600 Message-Id: <20221128230219.39537-7-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128230219.39537-1-nick.hawkins@hpe.com> References: <20221128230219.39537-1-nick.hawkins@hpe.com> X-Proofpoint-GUID: 661kpNRkmluiBqVMUTIXXRKPjhcQDylI X-Proofpoint-ORIG-GUID: 661kpNRkmluiBqVMUTIXXRKPjhcQDylI X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_17,2022-11-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211280166 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750783078735155549?= X-GMAIL-MSGID: =?utf-8?q?1750783078735155549?= From: Nick Hawkins Add the gxp-fan-ctrl.c and gxp-fan-ctrl.rst in hwmon driver/documentation. Signed-off-by: Nick Hawkins --- v2: *Added missing gxp-fan-ctrl.yaml --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 56ff555ed5a4..00b6ed6dd5cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2177,13 +2177,16 @@ ARM/HPE GXP ARCHITECTURE M: Jean-Marie Verdun M: Nick Hawkins S: Maintained +F: Documentation/hwmon/gxp-fan-ctrl.rst F: Documentation/devicetree/bindings/arm/hpe,gxp.yaml +F: Documentation/devicetree/bindings/hwmon/hpe,gxp-fan-ctrl.yaml F: Documentation/devicetree/bindings/spi/hpe,gxp-spifi.yaml F: Documentation/devicetree/bindings/timer/hpe,gxp-timer.yaml F: arch/arm/boot/dts/hpe-bmc* F: arch/arm/boot/dts/hpe-gxp* F: arch/arm/mach-hpe/ F: drivers/clocksource/timer-gxp.c +F: drivers/hwmon/gxp-fan-ctrl.c F: drivers/spi/spi-gxp.c F: drivers/watchdog/gxp-wdt.c