From patchwork Tue Jan 10 04:25:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clay Chang X-Patchwork-Id: 13094645 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B47FBC54EBE for ; Tue, 10 Jan 2023 04:25:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 92BCCC433F1; Tue, 10 Jan 2023 04:25:52 +0000 (UTC) Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id F3510C433F0; Tue, 10 Jan 2023 04:25:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org F3510C433F0 Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=hpe.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=hpe.com 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 30A3n9CS010209; Tue, 10 Jan 2023 04:25:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=bGTvQoYDlzWDjzwyojuOqg2J3s6qOsa62mcWyflaHSU=; b=m2NiAEXFcSCvLiqF1ivlkK00WWAPMPYZ88jmP04qub5AeStHhGAcE1bVLgrcROCSxnXs bJza3umrCG04borxGnjf568YcT3HvTQfF1dSohTzssmxaFvYNQjD2ScTyN8q5dPiZpwR ISTiTi+W/OYbwPwZi3qh9axQqbR/o8e3Fou3MUMD+YKc/XUGmGwZemkgGr8DwJ8X4yBu jRvdNEqxG2Kh7iex/y0yzXYvQSEulEjB1DY3KVpfBU2mjawDRKkIuLQnMlNvxPgoaJne skZqtUl4g72Mg/42jYQlQntMJyHiEUf/d+owhn/x9hi6zi+k7Ck69NGF2TSNqJa9u0uZ dA== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3n10eq054g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 04:25:46 +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 50331310DD; Tue, 10 Jan 2023 04:25:45 +0000 (UTC) Received: from openbmc-dev.hpecorp.net (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id AD4E780BA36; Tue, 10 Jan 2023 04:25:41 +0000 (UTC) From: clayc@hpe.com List-Id: To: linux-kernel@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, verdun@hpe.com, nick.hawkins@hpe.com, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@armlinux.org.uk, olof@lixom.net Cc: Clay Chang Subject: [PATCH 1/5] soc: hpe: Add GXP SROM Control Register Driver Date: Tue, 10 Jan 2023 12:25:29 +0800 Message-Id: <20230110042533.12894-2-clayc@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230110042533.12894-1-clayc@hpe.com> References: <20230110042533.12894-1-clayc@hpe.com> X-Proofpoint-GUID: Q-52ofkOBdfnLsGx71tk32l1kWgeUOd0 X-Proofpoint-ORIG-GUID: Q-52ofkOBdfnLsGx71tk32l1kWgeUOd0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_01,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 adultscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100026 From: Clay Chang The GXP SROM control register can be used to configure LPC related legacy I/O registers. Currently only the SROM RAM Offset Register (vromoff) is exported. The GXP SOCLIB is a common library used for creating the common "soc" class in the kernel. Signed-off-by: Clay Chang --- drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/hpe/Kconfig | 29 +++++++ drivers/soc/hpe/Makefile | 2 + drivers/soc/hpe/gxp-soclib.c | 17 +++++ drivers/soc/hpe/gxp-soclib.h | 9 +++ drivers/soc/hpe/gxp-srom.c | 141 +++++++++++++++++++++++++++++++++++ 7 files changed, 200 insertions(+) create mode 100644 drivers/soc/hpe/Kconfig create mode 100644 drivers/soc/hpe/Makefile create mode 100644 drivers/soc/hpe/gxp-soclib.c create mode 100644 drivers/soc/hpe/gxp-soclib.h create mode 100644 drivers/soc/hpe/gxp-srom.c diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig index 5dbb09f843f7..faff0f036b61 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -10,6 +10,7 @@ source "drivers/soc/bcm/Kconfig" source "drivers/soc/canaan/Kconfig" source "drivers/soc/fsl/Kconfig" source "drivers/soc/fujitsu/Kconfig" +source "drivers/soc/hpe/Kconfig" source "drivers/soc/imx/Kconfig" source "drivers/soc/ixp4xx/Kconfig" source "drivers/soc/litex/Kconfig" diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index fff513bd522d..d257b9d654b3 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MACH_DOVE) += dove/ obj-y += fsl/ obj-y += fujitsu/ obj-$(CONFIG_ARCH_GEMINI) += gemini/ +obj-$(CONFIG_ARCH_HPE) += hpe/ obj-y += imx/ obj-y += ixp4xx/ obj-$(CONFIG_SOC_XWAY) += lantiq/ diff --git a/drivers/soc/hpe/Kconfig b/drivers/soc/hpe/Kconfig new file mode 100644 index 000000000000..88f5d46b06b6 --- /dev/null +++ b/drivers/soc/hpe/Kconfig @@ -0,0 +1,29 @@ +# +# HPE GXP SoC drivers +# +menu "HPE GXP SoC drivers" + depends on ARCH_HPE || COMPILE_TEST + +config HPE_GXP_SOCLIB + bool "GXP Common SoC Library" + default y + depends on ARCH_HPE_GXP || COMPILE_TEST + help + This is for the common library for all HPE SoC drivers. It + creates the root soc class (/sys/class/soc) for all GXP SoC + drivers. It must be yes if any one of the GXP SoC drivers were + added, so the config of all GXP SoC drivers must select this. + + +config HPE_GXP_SROM + bool "GXP SROM Configuration Driver" + default y + depends on ARCH_HPE_GXP || COMPILE_TEST + select HPE_GXP_SOCLIB + help + Say yes here to add support for SROM Configuration. The GXP SROM + control register can be used to configure LPC related legacy I/O + registers. Currently only the SROM RAM Offset Register (vromoff) + is exported. + +endmenu diff --git a/drivers/soc/hpe/Makefile b/drivers/soc/hpe/Makefile new file mode 100644 index 000000000000..78de24ecb606 --- /dev/null +++ b/drivers/soc/hpe/Makefile @@ -0,0 +1,2 @@ +obj-$(CONFIG_HPE_GXP_SOCLIB) += gxp-soclib.o +obj-$(CONFIG_HPE_GXP_SROM) += gxp-srom.o diff --git a/drivers/soc/hpe/gxp-soclib.c b/drivers/soc/hpe/gxp-soclib.c new file mode 100644 index 000000000000..11b0afe09070 --- /dev/null +++ b/drivers/soc/hpe/gxp-soclib.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (C) 2023 Hewlett Packard Enteprise Development Company, L.P. */ + +#include +#include + +struct class *soc_class; + +static int __init gxp_soclib_init(void) +{ + soc_class = class_create(THIS_MODULE, "soc"); + if (IS_ERR(soc_class)) + return PTR_ERR(soc_class); + return 0; +} + +module_init(gxp_soclib_init); diff --git a/drivers/soc/hpe/gxp-soclib.h b/drivers/soc/hpe/gxp-soclib.h new file mode 100644 index 000000000000..eb0e72b67aee --- /dev/null +++ b/drivers/soc/hpe/gxp-soclib.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* Copyright (C) 2023 Hewlett Packard Enterprise Development Company, L.P. */ + +#ifndef __GXP_SOCLIB_H__ +#define __GXP_SOCLIB_H__ + +extern struct class *soc_class; + +#endif diff --git a/drivers/soc/hpe/gxp-srom.c b/drivers/soc/hpe/gxp-srom.c new file mode 100644 index 000000000000..5a8f005055cf --- /dev/null +++ b/drivers/soc/hpe/gxp-srom.c @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (C) 2023 Hewlett Packard Enterprise Development Company, L.P. */ + +#include +#include +#include +#include +#include +#include +#include + +#include "gxp-soclib.h" + +#define SROM_VROMOFF 0xf4 // 80fc_00f4 + +struct gxp_srom_drvdata { + struct platform_device *pdev; + struct device *dev; + void __iomem *base; + struct mutex mutex; +}; + +static ssize_t vromoff_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct gxp_srom_drvdata *drvdata = dev_get_drvdata(dev); + unsigned int value; + ssize_t ret; + + mutex_lock(&drvdata->mutex); + value = readl(drvdata->base + SROM_VROMOFF); + ret = sprintf(buf, "0x%08x", value); + mutex_unlock(&drvdata->mutex); + + return ret; +} + +static ssize_t vromoff_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct gxp_srom_drvdata *drvdata = dev_get_drvdata(dev); + unsigned int value; + int rc; + + rc = kstrtouint(buf, 0, &value); + if (rc < 0) + return -EINVAL; + + mutex_lock(&drvdata->mutex); + writel(value, drvdata->base + SROM_VROMOFF); + mutex_unlock(&drvdata->mutex); + + return count; +} +static DEVICE_ATTR_RW(vromoff); + +static struct attribute *srom_attrs[] = { + &dev_attr_vromoff.attr, + NULL, +}; +ATTRIBUTE_GROUPS(srom); + +static int sysfs_register(struct device *parent, + struct gxp_srom_drvdata *drvdata) +{ + struct device *dev; + + dev = device_create_with_groups(soc_class, parent, 0, + drvdata, srom_groups, "srom"); + if (IS_ERR(dev)) + return PTR_ERR(dev); + drvdata->dev = dev; + return 0; +} + +static int gxp_srom_probe(struct platform_device *pdev) +{ + struct gxp_srom_drvdata *drvdata; + struct resource *res; + int ret; + + drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gxp_srom_drvdata), + GFP_KERNEL); + if (!drvdata) + return -ENOMEM; + + drvdata->pdev = pdev; + platform_set_drvdata(pdev, drvdata); + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "no srom resource defined\n"); + ret = -ENODEV; + goto out; + } + + drvdata->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(drvdata->base)) { + dev_err(&pdev->dev, "ioremap_resource error\n"); + ret = PTR_ERR(drvdata->base); + goto ioremap_err; + } + + mutex_init(&drvdata->mutex); + + ret = sysfs_register(&pdev->dev, drvdata); + if (ret != 0) { + dev_err(&pdev->dev, "sysfs error\n"); + goto sysfs_err; + } + + dev_info(&pdev->dev, "initialized\n"); + return 0; + +sysfs_err: +ioremap_err: + platform_set_drvdata(pdev, NULL); +out: + if (drvdata) + devm_kfree(&pdev->dev, (void *)drvdata); + return ret; +} + +static const struct of_device_id gxp_srom_of_match[] = { + { .compatible = "hpe,gxp-srom" }, + {}, +}; +MODULE_DEVICE_TABLE(of, gxp_srom_of_match); + +static struct platform_driver gxp_srom_driver = { + .probe = gxp_srom_probe, + .driver = { + .name = "gxp-srom", + .of_match_table = of_match_ptr(gxp_srom_of_match), + }, +}; +module_platform_driver(gxp_srom_driver); + +MODULE_AUTHOR("Clay Chang "); +MODULE_DESCRIPTION("HPE GXP SROM Configuration Driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jan 10 04:25:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clay Chang X-Patchwork-Id: 13094646 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2FD89C54EBE for ; Tue, 10 Jan 2023 04:25:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id E9B5AC433F0; Tue, 10 Jan 2023 04:25:55 +0000 (UTC) Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id C4526C433EF; Tue, 10 Jan 2023 04:25:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org C4526C433EF Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=hpe.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=hpe.com 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 30A420Qa001958; Tue, 10 Jan 2023 04:25:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version; s=pps0720; bh=oq9Spv30hm8SaUzTPPi5vI+uunS5acQ6Opz1SF1gujU=; b=mtJhO8ZP67njkDfjhw0e33YhZqIaVZF+RC4Xi2XJGYpBFSih8HGHqmYAaRU1b1371UWG T+urH2FmLws7ZCz3cp8+zw+M9STNgee5dXUp+427n+qlcvuatzD6H4gv+NnYK7fVc8Ma 6DdBZoyt2kg55CBPQBEMhzZvQlSnSnuOhzwLRzUcnR32IVX4C+oXpzqpfbZJZ3Kco3cm ikfCKs+83v74usILCHHmfZYUMsuwxrLAD8uw36Lw0Ve626lxrXBkclJcp2z9UXAwtCNm LSZlFILGCGhN4Ovr4AvaC/PE3w7OZbXg58+JiaCL1qxV6tOfQtbZ4FLn5/mZ7ehuGJ4C Kw== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3n0vynsfnt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 04:25: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 p1lg14881.it.hpe.com (Postfix) with ESMTPS id 603088085F8; Tue, 10 Jan 2023 04:25:49 +0000 (UTC) Received: from openbmc-dev.hpecorp.net (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id BAD71800BB1; Tue, 10 Jan 2023 04:25:45 +0000 (UTC) From: clayc@hpe.com List-Id: To: linux-kernel@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, verdun@hpe.com, nick.hawkins@hpe.com, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@armlinux.org.uk, olof@lixom.net Cc: Clay Chang Subject: [PATCH 2/5] dt-bindings: soc: hpe: hpe,gxp-srom.yaml Date: Tue, 10 Jan 2023 12:25:30 +0800 Message-Id: <20230110042533.12894-3-clayc@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230110042533.12894-1-clayc@hpe.com> References: <20230110042533.12894-1-clayc@hpe.com> X-Proofpoint-GUID: G61yJjXjjmDKDYSUP-AaQHnd-F-X-MD8 X-Proofpoint-ORIG-GUID: G61yJjXjjmDKDYSUP-AaQHnd-F-X-MD8 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.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_01,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100026 From: Clay Chang Document binding to support SROM driver in GXP. Signed-off-by: Clay Chang --- .../bindings/soc/hpe/hpe,gxp-srom.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/hpe/hpe,gxp-srom.yaml diff --git a/Documentation/devicetree/bindings/soc/hpe/hpe,gxp-srom.yaml b/Documentation/devicetree/bindings/soc/hpe/hpe,gxp-srom.yaml new file mode 100644 index 000000000000..14ad97d595c8 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/hpe/hpe,gxp-srom.yaml @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/hpe/hpe,gxp-srom.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HPE GXP SoC SROM Control Register + +maintainers: + - Clay Chang + +description: |+ + The SROM control register can be used to configure LPC related legacy + I/O registers. + +properties: + compatible: + items: + - const: hpe,gxp-srom + + reg: + items: + - description: SROM LPC Configuration Registers + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + srom: srom@80fc0000 { + compatible = "hpe,gxp-srom"; + reg = <0x80fc0000 0x100>; + }; From patchwork Tue Jan 10 04:25:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clay Chang X-Patchwork-Id: 13094647 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 24A51C54EBE for ; Tue, 10 Jan 2023 04:26:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 0C6FBC433F2; Tue, 10 Jan 2023 04:26:00 +0000 (UTC) Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id E3302C433EF; Tue, 10 Jan 2023 04:25:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org E3302C433EF Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=hpe.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=hpe.com 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 30A3n9j9010124; Tue, 10 Jan 2023 04:25:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=uXvadRzdh452Znhi2px4eeo5gn0RKDj9w51c+kKDe0I=; b=CFZLnpONDrIgMQ7qNVCcp7Y2Jc7FOjlJK4P9zZ8IBzojWTQ3OlytCG17zQgrtcgTxng1 c2u6zArUKvGBPpq6tTtHRaUp9Q2aPNKqCgt8EC2S3vlkZqZS+pcWee2XhzkosCih6GsF mB+MqHsbG96tfDYHk3ZGKWGvQCyVm2DzU9tfO3hugySSplrS9UBGmBNo6ttn4ZlYPOlA sJY1OH+1z23XPGvh8/54bka/DcLi0v0FjmTzjpws4G22goVE8Y7WcncbJHLcg4zcMQ3a RJaJKPOanFbq/PTQlejiYq3gwLoSOO0Z6j6H4Vq0jDRxSEh9iUs/pe8LyZZyh51p7kqU 1Q== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3n10eq054y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 04:25:54 +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 7AE9A8085FF; Tue, 10 Jan 2023 04:25:53 +0000 (UTC) Received: from openbmc-dev.hpecorp.net (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id CCBE580BE24; Tue, 10 Jan 2023 04:25:49 +0000 (UTC) From: clayc@hpe.com List-Id: To: linux-kernel@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, verdun@hpe.com, nick.hawkins@hpe.com, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@armlinux.org.uk, olof@lixom.net Cc: Clay Chang Subject: [PATCH 3/5] ARM: dts: hpe: Add SROM Driver Date: Tue, 10 Jan 2023 12:25:31 +0800 Message-Id: <20230110042533.12894-4-clayc@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230110042533.12894-1-clayc@hpe.com> References: <20230110042533.12894-1-clayc@hpe.com> X-Proofpoint-GUID: WPa6vxRI7u8Jlhf1wRcVvTcernnNkHUe X-Proofpoint-ORIG-GUID: WPa6vxRI7u8Jlhf1wRcVvTcernnNkHUe X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_01,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxscore=0 phishscore=0 mlxlogscore=669 lowpriorityscore=0 spamscore=0 adultscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100026 From: Clay Chang Add SROM driver to the device tree. Also re-organize the AHB base address to accommodate the SROM driver register requirements. Add the hpe,gxp-srom compatible. Signed-off-by: Clay Chang --- arch/arm/boot/dts/hpe-gxp.dtsi | 41 +++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/hpe-gxp.dtsi b/arch/arm/boot/dts/hpe-gxp.dtsi index cf735b3c4f35..3e96941721d5 100644 --- a/arch/arm/boot/dts/hpe-gxp.dtsi +++ b/arch/arm/boot/dts/hpe-gxp.dtsi @@ -52,76 +52,81 @@ cache-level = <2>; }; - ahb@c0000000 { + ahb@80000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges = <0x0 0xc0000000 0x30000000>; + ranges = <0x0 0x80000000 0x7FFFFFFF>; dma-ranges; - vic0: interrupt-controller@eff0000 { + vic0: interrupt-controller@4eff0000 { compatible = "arm,pl192-vic"; - reg = <0xeff0000 0x1000>; + reg = <0x4eff0000 0x1000>; interrupt-controller; #interrupt-cells = <1>; }; - vic1: interrupt-controller@80f00000 { + vic1: interrupt-controller@f00000 { compatible = "arm,pl192-vic"; - reg = <0x80f00000 0x1000>; + reg = <0xf00000 0x1000>; interrupt-controller; #interrupt-cells = <1>; }; - uarta: serial@e0 { + uarta: serial@400000e0 { 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 { 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 { 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 { compatible = "hpe,gxp-ehci", "generic-ehci"; - reg = <0xefe0000 0x100>; + reg = <0x4efe0000 0x100>; interrupts = <7>; interrupt-parent = <&vic0>; }; - st: timer@80 { + st: timer@40000080 { 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 { compatible = "hpe,gxp-ohci", "generic-ohci"; - reg = <0xefe0100 0x110>; + reg = <0x4efe0100 0x110>; interrupts = <6>; interrupt-parent = <&vic0>; }; + + srom: srom@fc0000 { + compatible = "hpe,gxp-srom"; + reg = <0xfc0000 0x100>; + }; }; }; }; From patchwork Tue Jan 10 04:25:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clay Chang X-Patchwork-Id: 13094648 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 78A87C61DB3 for ; Tue, 10 Jan 2023 04:26:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 61DC8C433F0; Tue, 10 Jan 2023 04:26:04 +0000 (UTC) Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 57C90C433EF; Tue, 10 Jan 2023 04:26:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 57C90C433EF Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=hpe.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=hpe.com Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30A0nD1h003597; Tue, 10 Jan 2023 04:25:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=eJWRKFD9z7plkN6elhB+a1yxixq+W/JZIKNF2DtUM2M=; b=H1WPde8lyAy2Xb3TUkFlxhQVz6tAFkBPj2Fy0MeyyOfEQVNVi1t/Bu6SwgRpoH2OIb+f F+3c6vmNMLi6NJ3dp8rNYV6Q+07xeQ6x2fq4HqeYmp2Alao6LkE+YCKgRBdH4Hbwi/Ub KlLy1iR++MyIXusxvsWPysec0N//WUhUc4SHwtkpRhlh6gn/TCyKwyNoS5ydSJOJ4uve oaWTv6NdJu7Oy1DlyxkPN/oSgO3rMFfQwKWYob+RYhGDYwJQWxW+Y0B1k1+LKgKHpWRg 3wQHAsIrQr0tXJE1GAi2lzPQrcxgIGO3HkQtg8TWVIqyWrojlSsWvFun7U9B5pnlVPPe CA== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3n0wt814kb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 04:25:58 +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 9BE75310C4; Tue, 10 Jan 2023 04:25:57 +0000 (UTC) Received: from openbmc-dev.hpecorp.net (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id E80AF80C76A; Tue, 10 Jan 2023 04:25:53 +0000 (UTC) From: clayc@hpe.com List-Id: To: linux-kernel@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, verdun@hpe.com, nick.hawkins@hpe.com, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@armlinux.org.uk, olof@lixom.net Cc: Clay Chang Subject: [PATCH 4/5] ARM: multi_v7_defconfig: Add GXP SROM Driver Date: Tue, 10 Jan 2023 12:25:32 +0800 Message-Id: <20230110042533.12894-5-clayc@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230110042533.12894-1-clayc@hpe.com> References: <20230110042533.12894-1-clayc@hpe.com> X-Proofpoint-ORIG-GUID: NvDGkOUb1mry9b_b4wxgR0KE0AjaSFOw X-Proofpoint-GUID: NvDGkOUb1mry9b_b4wxgR0KE0AjaSFOw X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_01,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 bulkscore=0 phishscore=0 spamscore=0 suspectscore=0 clxscore=1015 mlxlogscore=634 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100026 From: Clay Chang Add the CONFIG_HPE_GXP_SROM and CONFIG_HPE_GXP_SOCLIB. Signed-off-by: Clay Chang --- 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 ee184eb37adc..f50a3731b84c 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -1254,3 +1254,5 @@ CONFIG_CMA_SIZE_MBYTES=64 CONFIG_PRINTK_TIME=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y +CONFIG_HPE_GXP_SOCLIB=m +CONFIG_HPE_GXP_SROM=m From patchwork Tue Jan 10 04:25:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clay Chang X-Patchwork-Id: 13094649 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DB17CC54EBE for ; Tue, 10 Jan 2023 04:26:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id AE94BC433F0; Tue, 10 Jan 2023 04:26:15 +0000 (UTC) Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 8075FC433D2; Tue, 10 Jan 2023 04:26:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 8075FC433D2 Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=hpe.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=hpe.com 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 309Nprnr016772; Tue, 10 Jan 2023 04:26:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=ON+ooHXKRcLz9a7mKEFwwAlWyLb4g7QY6+Wkhe/RFTY=; b=VutGmrP0WyLiEZRJ690R+rmi4jFdRmcYMU+0lEX+SEUU3WesbHRxhnKeJ64byhIJ5fUZ snDrKz6BcT5MxZUmoYB9KJjftxrb6KTwQW24dax2xZ9vDPSo7top05m2emKekp6dHluZ tDctxlqkMseRGSBT4q9Nle3Bdq8gISW8baK+HEgVQjR30Y9Vs5tfnOIhu1wN2Du+Dh/k r+C/XkknC8lDwVUptlytz7ISjYkUD9NcAbMfITF6Efh9LsbSgQK2zR1d9FnDLgrYsVFf 7lMLlMgiklY4AiATwRQ2qJBftpwQ5Z9TVz4WH73OwHct2cX+Yhm7kG8p/rmKBi3DrFMR Yw== Received: from p1lg14880.it.hpe.com (p1lg14880.it.hpe.com [16.230.97.201]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3n0vynsfpr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 04:26:09 +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 p1lg14880.it.hpe.com (Postfix) with ESMTPS id D214D807ECB; Tue, 10 Jan 2023 04:26:01 +0000 (UTC) Received: from openbmc-dev.hpecorp.net (unknown [16.231.227.36]) by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id 11D3180BE24; Tue, 10 Jan 2023 04:25:57 +0000 (UTC) From: clayc@hpe.com List-Id: To: linux-kernel@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, verdun@hpe.com, nick.hawkins@hpe.com, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@armlinux.org.uk, olof@lixom.net Cc: Clay Chang Subject: [PATCH 5/5] MAINTAINERS: Add maintainer of GXP SROM support Date: Tue, 10 Jan 2023 12:25:33 +0800 Message-Id: <20230110042533.12894-6-clayc@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230110042533.12894-1-clayc@hpe.com> References: <20230110042533.12894-1-clayc@hpe.com> X-Proofpoint-GUID: TC7f-ukkXfS1AGZjrSFi6v0Uc-bEsyGU X-Proofpoint-ORIG-GUID: TC7f-ukkXfS1AGZjrSFi6v0Uc-bEsyGU X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_01,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100026 From: Clay Chang Add Clay Chang as the maintainer of GXP SROM support. Signed-off-by: Clay Chang --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ea941dc469fa..164571ac1cc5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2279,14 +2279,22 @@ F: arch/arm/mach-sa1100/jornada720.c ARM/HPE GXP ARCHITECTURE M: Jean-Marie Verdun M: Nick Hawkins +M: Clay Chang S: Maintained F: Documentation/devicetree/bindings/arm/hpe,gxp.yaml +F: Documentation/devicetree/bindings/soc/hpe/ +F: Documentation/devicetree/bindings/soc/hpe/hpe,gxp-srom.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/soc/hpe/ +F: drivers/soc/hpe/Kconfig +F: drivers/soc/hpe/Makefile +F: drivers/soc/hpe/gxp-soclib.[ch] +F: drivers/soc/hpe/gxp-srom.c F: drivers/spi/spi-gxp.c F: drivers/watchdog/gxp-wdt.c