From nobody Tue Jun 30 04:37:55 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42D5CC433F5 for ; Tue, 25 Jan 2022 19:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbiAYTuq (ORCPT ); Tue, 25 Jan 2022 14:50:46 -0500 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:40604 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbiAYTuh (ORCPT ); Tue, 25 Jan 2022 14:50:37 -0500 Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20PHvuEn017965; Tue, 25 Jan 2022 19:49:26 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=uSiic+G4KhrXQ5HrF4JYmEfAa7l8WKXVXcPEhJuJ20o=; b=KS6QI8WT5F64c4DtOq+AGzUeTUheZA/lO7xRRenHX5JTkQtlrShHBo3aTsPjSjqkzuNN cw9yug64KIrt0aUowoa6kajOBpcqp5M1NDm5Rd1r45BUiHnml/a5+/EhaPMWXtY3ChlI iIKUjHpyPUn5DhmtjJ7FyHLd0TotGpM+MopVL/X1/4eDEqD1MJjM37ck0hXT/GxSGaSv Zgg7WVqvNANQwbc7kjrACljUb9PtdgwMYDXALR5UKRE/nsrfmdi1ZSkA3m4Oy40EtWAm U/cuVQ/MNJdzSkJIIHQ3oXaufMZxErtOXbmjrt6xi+MfFJE64b3VzWz2LCbQQzdVncW9 8g== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3dt6cdr4dj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jan 2022 19:49:26 +0000 Received: from hpe.com (unknown [16.100.173.53]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 1800362; Tue, 25 Jan 2022 19:49:23 +0000 (UTC) From: nick.hawkins@hpe.com To: verdun@hpe.com Cc: nick.hawkins@hpe.com, Rob Herring , Russell King , Krzysztof Kozlowski , Shawn Guo , Stanislav Jakubek , Sam Ravnborg , Linus Walleij , Hao Fang , Arnd Bergmann , "Russell King (Oracle)" , Geert Uytterhoeven , Mark Rutland , Ard Biesheuvel , Anshuman Khandual , Lukas Bulwahn , Masahiro Yamada , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] Adding architectural support for HPE's GXP BMC. This is the first of a series of patches to support HPE's BMC with Linux Kernel. Date: Tue, 25 Jan 2022 13:46:00 -0600 Message-Id: <20220125194609.32314-1-nick.hawkins@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-Proofpoint-ORIG-GUID: 5LdpoTWob_GNTvIOtpzu0JtcOAcnu-GF X-Proofpoint-GUID: 5LdpoTWob_GNTvIOtpzu0JtcOAcnu-GF X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-25_04,2022-01-25_02,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 malwarescore=0 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 clxscore=1011 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201250119 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Nick Hawkins Signed-off-by: Nick Hawkins --- .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 8 + arch/arm/Kconfig | 2 + arch/arm/boot/dts/gxp.dts | 700 ++++++++++++++++++ arch/arm/configs/gxp_defconfig | 243 ++++++ arch/arm/mach-hpe/Kconfig | 20 + arch/arm/mach-hpe/Makefile | 1 + arch/arm/mach-hpe/gxp.c | 63 ++ 8 files changed, 1039 insertions(+) create mode 100644 arch/arm/boot/dts/gxp.dts create mode 100644 arch/arm/configs/gxp_defconfig create mode 100644 arch/arm/mach-hpe/Kconfig create mode 100644 arch/arm/mach-hpe/Makefile create mode 100644 arch/arm/mach-hpe/gxp.c diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Docum= entation/devicetree/bindings/vendor-prefixes.yaml index 294093d45a23..e8b0ec874aed 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -515,6 +515,8 @@ patternProperties: description: Jiangsu HopeRun Software Co., Ltd. "^hp,.*": description: Hewlett Packard + "^hpe,.*": + description: Hewlett Packard Enterprise "^hsg,.*": description: HannStar Display Co. "^holtek,.*": diff --git a/MAINTAINERS b/MAINTAINERS index ea3e6c914384..007d99734dd1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8382,6 +8382,14 @@ L: linux-efi@vger.kernel.org S: Maintained F: block/partitions/efi.* =20 +GXP ARCHITECTURE +M: Jean-Marie Verdun +M: Nick Hawkins +S: Maintained +F: arch/arm/boot/dts/gxp.dts +F: arch/arm/configs/gxp_defconfig +F: arch/arm/mach-hpe/gxp.c + H8/300 ARCHITECTURE M: Yoshinori Sato L: uclinux-h8-devel@lists.sourceforge.jp (moderated for non-subscribers) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fabe39169b12..d428d0d35889 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -708,6 +708,8 @@ source "arch/arm/mach-vt8500/Kconfig" =20 source "arch/arm/mach-zynq/Kconfig" =20 +source "arch/arm/mach-hpe/Kconfig" + # ARMv7-M architecture config ARCH_LPC18XX bool "NXP LPC18xx/LPC43xx" diff --git a/arch/arm/boot/dts/gxp.dts b/arch/arm/boot/dts/gxp.dts new file mode 100644 index 000000000000..7bd814ecaaee --- /dev/null +++ b/arch/arm/boot/dts/gxp.dts @@ -0,0 +1,700 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree file for HPE GXP + */ + +/dts-v1/; +/ { + #address-cells =3D <1>; + #size-cells =3D <1>; + compatible =3D "HPE,GXP"; + model =3D "GXP"; + + chosen { + bootargs =3D "earlyprintk console=3DttyS0,115200 user_debug=3D31"; + }; + + aliases { + }; + + memory@40000000 { + device_type =3D "memory"; + reg =3D <0x40000000 0x20000000>; + }; + + ahb@80000000 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges; + + vic0: vic@ceff0000 { + compatible =3D "arm,pl192-vic"; + interrupt-controller; + reg =3D <0xceff0000 0x1000>; + #interrupt-cells =3D <1>; + }; + + vic1: vic@80f00000 { + compatible =3D "arm,pl192-vic"; + interrupt-controller; + reg =3D <0x80f00000 0x1000>; + #interrupt-cells =3D <1>; + }; + + timer0: timer@c0000080 { + compatible =3D "hpe,gxp-timer"; + reg =3D <0xc0000080 0x1>, <0xc0000094 0x01>, <0xc0000088 0x08>; + interrupts =3D <0>; + interrupt-parent =3D <&vic0>; + clock-frequency =3D <400000000>; + }; + + watchdog: watchdog@c0000090 { + compatible =3D "hpe,gxp-wdt"; + reg =3D <0xc0000090 0x02>, <0xc0000096 0x01>; + }; + + uartc: serial@c00000f0 { + compatible =3D "ns16550a"; + reg =3D <0xc00000f0 0x8>; + interrupts =3D <19>; + interrupt-parent =3D <&vic0>; + clock-frequency =3D <1846153>; + reg-shift =3D <0>; + }; + + uarta: serial@c00000e0 { + compatible =3D "ns16550a"; + reg =3D <0xc00000e0 0x8>; + interrupts =3D <17>; + interrupt-parent =3D <&vic0>; + clock-frequency =3D <1846153>; + reg-shift =3D <0>; + }; + + uartb: serial@c00000e8 { + compatible =3D "ns16550a"; + reg =3D <0xc00000e8 0x8>; + interrupts =3D <18>; + interrupt-parent =3D <&vic0>; + clock-frequency =3D <1846153>; + reg-shift =3D <0>; + }; + + vuart_a_cfg: vuarta_cfg@80fc0230 { + compatible =3D "hpe,gxp-vuarta_cfg", "simple-mfd", "syscon"; + reg =3D <0x80fc0230 0x100>; + reg-io-width =3D <1>; + }; + + vuart_a: vuart_a@80fd0200 { + compatible =3D "hpe,gxp-vuart"; + reg =3D <0x80fd0200 0x100>; + interrupts =3D <2>; + interrupt-parent =3D <&vic1>; + clock-frequency =3D <1846153>; + reg-shift =3D <0>; + status =3D "okay"; + serial-line =3D <3>; + vuart_cfg =3D <&vuart_a_cfg>; + }; + + usb0: ehci@cefe0000 { + compatible =3D "generic-ehci"; + reg =3D <0xcefe0000 0x100>; + interrupts =3D <7>; + interrupt-parent =3D <&vic0>; + }; + + usb1: ohci@cefe0100 { + compatible =3D "generic-ohci"; + reg =3D <0xcefe0100 0x110>; + interrupts =3D <6>; + interrupt-parent =3D <&vic0>; + }; + + spifi0: spifi@c0000200 { + compatible =3D "hpe,gxp-spifi"; + reg =3D <0xc0000200 0x80>, <0xc000c000 0x100>, <0xf8000000 0x8000000>; + interrupts =3D <20>; + interrupt-parent =3D <&vic0>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + bmc@0 { + label =3D "bmc"; + reg =3D <0x0 0x2000000>; + }; + u-boot@0 { + label =3D "u-boot"; + reg =3D <0x0 0x60000>; + }; + u-boot-env@60000 { + label =3D "u-boot-env"; + reg =3D <0x60000 0x20000>; + }; + kernel@80000 { + label =3D "kernel"; + reg =3D <0x80000 0x4c0000>; + }; + rofs@540000 { + label =3D "rofs"; + reg =3D <0x540000 0x1740000>; + }; + rwfs@1c80000 { + label =3D "rwfs"; + reg =3D <0x1c80000 0x250000>; + }; + section@1edf000{ + label =3D "section"; + reg =3D <0x1ed0000 0x130000>; + }; + }; + }; + + flash@1 { + compatible =3D "jedec,spi-nor"; + reg =3D <1>; + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + host-prime@0 { + label =3D "host-prime"; + reg =3D <0x0 0x02000000>; + }; + host-second@0 { + label =3D "host-second"; + reg =3D <0x02000000 0x02000000>; + }; + }; + }; + }; + + sram@d0000000 { + compatible =3D "mtd-ram"; + reg =3D <0xd0000000 0x80000>; + bank-width =3D <1>; + erase-size =3D<1>; + partition@0 { + label =3D "host-reserved"; + reg =3D <0x0 0x10000>; + }; + partition@10000 { + label =3D "nvram"; + reg =3D <0x10000 0x70000>; + }; + }; + + srom@80fc0000 { + compatible =3D "hpe,gxp-srom", "simple-mfd", "syscon"; + reg =3D <0x80fc0000 0x100>; + }; + + vrom@58000000 { + compatible =3D "mtd-ram"; + bank-width =3D <4>; + reg =3D <0x58000000 0x4000000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + partition@0 { + label =3D "vrom-prime"; + reg =3D <0x0 0x2000000>; + }; + partition@2000000 { + label =3D "vrom-second"; + reg =3D <0x2000000 0x2000000>; + }; + }; + + i2cg: i2cg@c00000f8 { + compatible =3D "syscon"; + reg =3D <0xc00000f8 0x08>; + }; + + i2c0: i2c@c0002000 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002000 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c1: i2c@c0002100 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002100 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c2: i2c@c0002200 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002200 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + 24c02@50 { + compatible =3D "atmel,24c02"; + pagesize =3D <8>; + reg =3D <0x50>; + }; + }; + + i2c3: i2c@c0002300 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002300 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c4: i2c@c0002400 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002400 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c5: i2c@c0002500 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002500 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + }; + + i2c6: i2c@c0002600 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002600 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c7: i2c@c0002700 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002700 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + psu1: psu@58 { + compatible =3D "hpe,gxp-psu"; + reg =3D <0x58>; + }; + + psu2: psu@59 { + compatible =3D "hpe,gxp-psu"; + reg =3D <0x59>; + }; + }; + + i2c8: i2c@c0002800 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002800 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c9: i2c@c0002900 { + compatible =3D "hpe,gxp-i2c"; + reg =3D <0xc0002900 0x70>; + interrupts =3D <9>; + interrupt-parent =3D <&vic0>; + i2cg-handle =3D <&i2cg>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2cmux@4 { + compatible =3D "i2c-mux-reg"; + i2c-parent =3D <&i2c4>; + reg =3D <0xd1000074 1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + i2c4@1 { + reg =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c4@3 { + reg =3D <3>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c4@4 { + reg =3D <4>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + }; + + i2cmux@6 { + compatible =3D "i2c-mux-reg"; + i2c-parent =3D <&i2c6>; + reg =3D <0xd1000076 1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + i2c6@1 { + reg =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c6@2 { + reg =3D <2>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c6@3 { + reg =3D <3>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c6@4 { + reg =3D <4>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c6@5 { + reg =3D <5>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + }; + + mdio0: mdio@c0004080 { + compatible =3D "hpe,gxp-umac-mdio"; + reg =3D <0xc0004080 0x10>; + #address-cells =3D <1>; + #size-cells =3D <0>; + ext_phy0: ethernt-phy@0 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + phy-mode =3D "sgmii"; + reg =3D <0>; + }; + }; + + mdio1: mdio@c0005080 { + compatible =3D "hpe,gxp-umac-mdio"; + reg =3D <0xc0005080 0x10>; + #address-cells =3D <1>; + #size-cells =3D <0>; + int_phy0: ethernt-phy@0 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + phy-mode =3D "gmii"; + reg =3D <0>; + }; + int_phy1: ethernt-phy@1 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + phy-mode =3D "gmii"; + reg =3D <1>; + }; + }; + + umac0: umac@c0004000 { + compatible =3D "hpe, gxp-umac"; + reg =3D <0xc0004000 0x80>; + interrupts =3D <10>; + interrupt-parent =3D <&vic0>; + mac-address =3D [94 18 82 16 04 d8]; + phy-handle =3D <&ext_phy0>; + int-phy-handle =3D <&int_phy0>; + }; + + umac1: umac@c0005000 { + compatible =3D "hpe, gxp-umac"; + use-ncsi; + reg =3D <0xc0005000 0x80>; + interrupts =3D <11>; + interrupt-parent =3D <&vic0>; + mac-address =3D [94 18 82 16 04 d9]; + phy-handle =3D <&int_phy1>; + }; + + kcs_conf: kcs_conf@80fc0430 { + compatible =3D "hpe,gxp-kcs-bmc-cfg", "simple-mfd", "syscon"; + reg =3D <0x80fc0430 0x100>; + }; + + kcs_reg: kcs_reg@080fd0400 { + compatible =3D "hpe,gxp-kcs-bmc"; + reg =3D <0x80fd0400 0x8>; + interrupts =3D <6>; + interrupt-parent =3D <&vic1>; + kcs_chan =3D <1>; + status =3D "okay"; + kcs-bmc-cfg =3D <&kcs_conf>; + }; + + thumbnail: thumbnail@c0000500 { + compatible =3D "hpe,gxp-thumbnail"; + reg =3D <0xc0000500 0x20>; + bits-per-pixel =3D <32>; + width =3D <800>; + height =3D <600>; + }; + + xreg: xreg@d1000000 { + compatible =3D "hpe,gxp-xreg", "simple-mfd", "syscon"; + reg =3D <0xd1000000 0xFF>; + interrupts =3D <26>; + interrupt-parent =3D <&vic0>; + #gpio-cells =3D <2>; + gpio-line-names =3D + "", "", "", "", "", "", "POWER", "HEARTBEAT", "FAN1_INST", "FAN2_INST", + "FAN3_INST", "FAN4_INST", "FAN5_INST", "FAN6_INST", "FAN7_INST", + "FAN8_INST", "FAN9_INST", "FAN10_INST", "FAN11_INST", "FAN12_INST", + "FAN13_INST", "FAN14_INST", "FAN15_INST", "FAN16_INST", "FAN1_FAIL", + "FAN2_FAIL", "FAN3_FAIL", "FAN4_FAIL", "FAN5_FAIL", "FAN6_FAIL", + "FAN7_FAIL", "FAN8_FAIL", "FAN9_FAIL", "FAN10_FAIL", "FAN11_FAIL", + "FAN12_FAIL", "FAN13_FAIL", "FAN14_FAIL", "FAN15_FAIL", "FAN16_FAIL", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "IDENTIFY", "HEALTH_RED", "HEALTH_AMBER", + "POWER_BUTTON", "", "SIO_POWER_GOOD", "NMI_BUTTON", "RESET_BUTTON", + "SIO_S5", "SIO_ONCONTROL", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", ""; + }; + + fanctrl: fanctrl@c1000c00 { + compatible =3D "hpe,gxp-fan-ctrl"; + reg =3D <0xc1000c00 0x200>; + xreg_handle =3D <&xreg>; + fn2_handle =3D <&fn2>; + }; + + fn2: fn2@80200000 { + compatible =3D "hpe,gxp-fn2", "simple-mfd", "syscon"; + reg =3D <0x80200000 0x100000>; + xreg_handle =3D <&xreg>; + interrupts =3D <0>; + interrupt-parent =3D <&vic1>; + #gpio-cells =3D <2>; + gpio-line-names =3D + "POWER_OUT", "PS_PWROK", "PCIERST", "POST_COMPLETE", "", "", "", "", ""= , "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", ""; + chif { + compatible =3D "hpe,gxp-chif"; + interrupts =3D <12>; + }; + }; + + csm: csm@80000000 { + compatible =3D "hpe,gxp-csm", "simple-mfd", "syscon"; + reg =3D <0x80000000 0x400>; + }; + + gpio: gpio@0 { + compatible =3D "hpe,gxp-gpio"; + #gpio-cells =3D <2>; + csm_handle =3D <&csm>; + vuhc0_handle =3D <&vuhc0>; + gpio-line-names =3D + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "RESET_OUT", "NMI_OUT", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", ""; + }; + + leds: leds { + compatible =3D "gpio-leds"; + + power { + gpios =3D <&xreg 6 0>; + default-state =3D "off"; + }; + + heartbeat { + gpios =3D <&xreg 7 0>; + default-state =3D "off"; + }; + + identify { + gpios =3D <&xreg 56 0>; + default-state =3D "off"; + }; + + health_red { + gpios =3D <&xreg 57 0>; + default-state =3D "off"; + }; + + health_amber { + gpios =3D <&xreg 58 0>; + default-state =3D "off"; + }; + }; + + xreg_kyes: xreg_keys { + compatible =3D "gpio-keys-polled"; + poll-interval =3D <100>; + + IdButton { + label =3D "ID Button"; + linux,code =3D <200>; + gpios =3D <&xreg 60 1>; + }; + }; + + vuhc: vuhc { + compatible =3D "gpio-keys-polled"; + poll-interval =3D <100>; + + PortOwner@0 { + label =3D "Port Owner"; + linux,code =3D <200>; + gpios =3D <&gpio 250 1>; + }; + + PortOwner@1 { + label =3D "Port Owner"; + linux,code =3D <201>; + gpios =3D <&gpio 251 1>; + }; + }; + + vuhc0: vuhc@80400080 { + compatible =3D "syscon"; + reg =3D <0x80400000 0x80>; + }; + + udcg: udcg@80400800 { + compatible =3D "syscon"; + reg =3D <0x80400800 0x200>; + }; + + udc0: udc@80401000 { + compatible =3D "hpe, gxp-udc"; + reg =3D <0x80401000 0x1000>; + interrupts =3D <13>; + interrupt-parent =3D <&vic1>; + vdevnum =3D <0>; + fepnum =3D <7>; + udcg-handle =3D <&udcg>; + }; + + udc1: udc@80402000 { + compatible =3D "hpe, gxp-udc"; + reg =3D <0x80402000 0x1000>; + interrupts =3D <13>; + interrupt-parent =3D <&vic1>; + vdevnum =3D <1>; + fepnum =3D <7>; + udcg-handle =3D <&udcg>; + }; + + coretemp: coretemp@c0000130 { + compatible =3D "hpe,gxp-coretemp"; + reg =3D <0xc0000130 0x8>; + }; + + syspower: syspower { + compatible =3D "hpe,gxp-power"; + psu_phandle =3D <&psu1>, <&psu2>; + }; + + peci: peci@80000400 { + compatible =3D "hpe,gxp-peci"; + reg =3D <0x80000400 0x200>; + interrupts =3D <22>; + interrupt-parent =3D <&vic1>; + }; + }; + + clocks { + osc: osc { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-output-names =3D "osc"; + clock-frequency =3D <33333333>; + }; + + iopclk: iopclk { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clocks =3D <&osc>; + clock-out-put-names =3D "iopclk"; + clock-frequency =3D <400000000>; + }; + + memclk: memclk { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clocks =3D <&osc>; + clock-out-put-names =3D "memclk"; + clock-frequency =3D <800000000>; + }; + }; +}; diff --git a/arch/arm/configs/gxp_defconfig b/arch/arm/configs/gxp_defconfig new file mode 100644 index 000000000000..f37c6630e06d --- /dev/null +++ b/arch/arm/configs/gxp_defconfig @@ -0,0 +1,243 @@ +CONFIG_KERNEL_XZ=3Dy +CONFIG_DEFAULT_HOSTNAME=3D"gxp" +CONFIG_SYSVIPC=3Dy +CONFIG_NO_HZ=3Dy +CONFIG_HIGH_RES_TIMERS=3Dy +CONFIG_BSD_PROCESS_ACCT=3Dy +CONFIG_BSD_PROCESS_ACCT_V3=3Dy +CONFIG_LOG_BUF_SHIFT=3D18 +CONFIG_CFS_BANDWIDTH=3Dy +CONFIG_RT_GROUP_SCHED=3Dy +CONFIG_CGROUP_FREEZER=3Dy +CONFIG_CGROUP_DEVICE=3Dy +CONFIG_CGROUP_CPUACCT=3Dy +CONFIG_NAMESPACES=3Dy +CONFIG_SCHED_AUTOGROUP=3Dy +CONFIG_RELAY=3Dy +CONFIG_BLK_DEV_INITRD=3Dy +CONFIG_CC_OPTIMIZE_FOR_SIZE=3Dy +CONFIG_KALLSYMS_ALL=3Dy +CONFIG_EMBEDDED=3Dy +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=3Dy +CONFIG_ARCH_MULTI_V6=3Dy +CONFIG_ARCH_HPE=3Dy +CONFIG_ARCH_HPE_GXP=3Dy +CONFIG_SECCOMP=3Dy +# CONFIG_ATAGS is not set +CONFIG_ZBOOT_ROM_TEXT=3D0x0 +CONFIG_ZBOOT_ROM_BSS=3D0x0 +# CONFIG_SUSPEND is not set +CONFIG_JUMP_LABEL=3Dy +# CONFIG_STRICT_KERNEL_RWX is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_KSM=3Dy +CONFIG_CLEANCACHE=3Dy +CONFIG_NET=3Dy +CONFIG_PACKET=3Dy +CONFIG_PACKET_DIAG=3Dy +CONFIG_UNIX=3Dy +CONFIG_UNIX_DIAG=3Dy +CONFIG_XFRM_USER=3Dy +CONFIG_XFRM_STATISTICS=3Dy +CONFIG_INET=3Dy +CONFIG_VLAN_8021Q=3Dy +CONFIG_NETLINK_DIAG=3Dy +CONFIG_NET_NCSI=3Dy +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=3Dy +CONFIG_DEVTMPFS_MOUNT=3Dy +# CONFIG_STANDALONE is not set +CONFIG_MTD=3Dy +CONFIG_MTD_BLOCK=3Dy +CONFIG_MTD_PHYSMAP=3Dy +CONFIG_MTD_PHYSMAP_OF=3Dy +CONFIG_MTD_PLATRAM=3Dy +CONFIG_MTD_SPI_NOR=3Dy +CONFIG_SPI_GXP_SPIFI=3Dy +CONFIG_BLK_DEV_NULL_BLK=3Dy +CONFIG_BLK_DEV_LOOP=3Dy +CONFIG_BLK_DEV_NBD=3Dy +CONFIG_BLK_DEV_RAM=3Dy +CONFIG_EEPROM_AT24=3Dy +CONFIG_SCSI=3Dy +CONFIG_BLK_DEV_SD=3Dy +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=3Dy +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_AURORA is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CADENCE is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_CORTINA is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_GOOGLE is not set +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_MICROSEMI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_NI is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_SOCIONEXT is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_XILINX is not set +CONFIG_UMAC=3Dy +# CONFIG_USB_NET_DRIVERS is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_LEDS is not set +CONFIG_INPUT_EVDEV=3Dy +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=3Dy +CONFIG_KEYBOARD_GPIO_POLLED=3Dy +# CONFIG_INPUT_MOUSE is not set +CONFIG_SERIO_LIBPS2=3Dy +CONFIG_VT_HW_CONSOLE_BINDING=3Dy +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=3Dy +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=3Dy +CONFIG_SERIAL_8250_NR_UARTS=3D6 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3D6 +CONFIG_SERIAL_8250_EXTENDED=3Dy +CONFIG_SERIAL_8250_SHARE_IRQ=3Dy +CONFIG_SERIAL_8250_GXP_VUART=3Dy +CONFIG_SERIAL_OF_PLATFORM=3Dy +CONFIG_TTY_PRINTK=3Dy +CONFIG_IPMI_HANDLER=3Dy +CONFIG_IPMI_DEVICE_INTERFACE=3Dy +CONFIG_IPMI_SI=3Dy +CONFIG_IPMI_SSIF=3Dy +CONFIG_HPE_KCS_IPMI_BMC=3Dy +CONFIG_HW_RANDOM_TIMERIOMEM=3Dy +CONFIG_I2C_CHARDEV=3Dy +CONFIG_I2C_GXP=3Dy +CONFIG_I2C_SLAVE=3Dy +CONFIG_I2C_SLAVE_EEPROM=3Dy +CONFIG_SPI=3Dy +CONFIG_GPIOLIB=3Dy +CONFIG_GPIO_SYSFS=3Dy +CONFIG_GPIO_GXP=3Dy +CONFIG_SENSORS_EMC1403=3Dy +CONFIG_SENSORS_GXP_FAN_CTRL=3Dy +CONFIG_SENSORS_GXP_CORETEMP=3Dy +CONFIG_SENSORS_GXP_PSU=3Dy +CONFIG_SENSORS_GXP_POWER=3Dy +CONFIG_WATCHDOG=3Dy +CONFIG_GXP_WATCHDOG=3Dy +CONFIG_MFD_SYSCON=3Dy +CONFIG_FB=3Dy +CONFIG_FB_THUMBNAIL=3Dy +CONFIG_FB_SIMPLE=3Dy +CONFIG_USB=3Dy +CONFIG_USB_ANNOUNCE_NEW_DEVICES=3Dy +CONFIG_USB_EHCI_HCD=3Dy +CONFIG_USB_EHCI_ROOT_HUB_TT=3Dy +CONFIG_USB_OHCI_HCD=3Dy +CONFIG_USB_OHCI_HCD_PLATFORM=3Dy +CONFIG_USB_STORAGE=3Dy +CONFIG_USB_GADGET=3Dy +CONFIG_USB_GXP_UDC=3Dy +CONFIG_USB_CONFIGFS=3Dy +CONFIG_USB_CONFIGFS_SERIAL=3Dy +CONFIG_USB_CONFIGFS_ACM=3Dy +CONFIG_USB_CONFIGFS_OBEX=3Dy +CONFIG_USB_CONFIGFS_NCM=3Dy +CONFIG_USB_CONFIGFS_ECM=3Dy +CONFIG_USB_CONFIGFS_ECM_SUBSET=3Dy +CONFIG_USB_CONFIGFS_RNDIS=3Dy +CONFIG_USB_CONFIGFS_EEM=3Dy +CONFIG_USB_CONFIGFS_MASS_STORAGE=3Dy +CONFIG_USB_CONFIGFS_F_LB_SS=3Dy +CONFIG_USB_CONFIGFS_F_FS=3Dy +CONFIG_USB_CONFIGFS_F_HID=3Dy +CONFIG_USB_CONFIGFS_F_PRINTER=3Dy +CONFIG_NEW_LEDS=3Dy +CONFIG_LEDS_CLASS=3Dy +CONFIG_LEDS_GPIO=3Dy +CONFIG_LEDS_TRIGGERS=3Dy +CONFIG_LEDS_TRIGGER_TIMER=3Dy +CONFIG_LEDS_TRIGGER_ONESHOT=3Dy +CONFIG_LEDS_TRIGGER_MTD=3Dy +CONFIG_LEDS_TRIGGER_HEARTBEAT=3Dy +CONFIG_LEDS_TRIGGER_CPU=3Dy +CONFIG_LEDS_TRIGGER_GPIO=3Dy +CONFIG_LEDS_TRIGGER_DEFAULT_ON=3Dy +CONFIG_LEDS_TRIGGER_TRANSIENT=3Dy +CONFIG_LEDS_TRIGGER_PANIC=3Dy +# CONFIG_VIRTIO_MENU is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_HPE_GXP_XREG=3Dy +CONFIG_HPE_GXP_FN2=3Dy +CONFIG_HPE_GXP_CSM=3Dy +CONFIG_HPE_GXP_SROM=3Dy +CONFIG_FANOTIFY=3Dy +CONFIG_OVERLAY_FS=3Dy +CONFIG_OVERLAY_FS_REDIRECT_DIR=3Dy +CONFIG_TMPFS=3Dy +CONFIG_TMPFS_POSIX_ACL=3Dy +CONFIG_JFFS2_FS=3Dy +# CONFIG_JFFS2_FS_WRITEBUFFER is not set +CONFIG_JFFS2_SUMMARY=3Dy +CONFIG_JFFS2_FS_XATTR=3Dy +# CONFIG_JFFS2_FS_POSIX_ACL is not set +# CONFIG_JFFS2_FS_SECURITY is not set +CONFIG_SQUASHFS=3Dy +CONFIG_SQUASHFS_XZ=3Dy +CONFIG_SQUASHFS_4K_DEVBLK_SIZE=3Dy +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS_CODEPAGE_437=3Dy +CONFIG_NLS_ASCII=3Dy +CONFIG_NLS_ISO8859_1=3Dy +CONFIG_NLS_UTF8=3Dy +CONFIG_CRYPTO_CCM=3Dy +CONFIG_CRYPTO_GCM=3Dy +CONFIG_CRYPTO_CRC32C=3Dy +CONFIG_CRYPTO_ARC4=3Dy +CONFIG_CRYPTO_DEFLATE=3Dy +CONFIG_CRYPTO_LZO=3Dy +CONFIG_CRYPTO_ZSTD=3Dy +CONFIG_CRYPTO_USER_API_HASH=3Dy +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC16=3Dy +# CONFIG_XZ_DEC_ARM is not set +# CONFIG_XZ_DEC_ARMTHUMB is not set +CONFIG_DMA_API_DEBUG=3Dy +CONFIG_PRINTK_TIME=3Dy +CONFIG_BOOT_PRINTK_DELAY=3Dy +CONFIG_DYNAMIC_DEBUG=3Dy +CONFIG_DEBUG_INFO=3Dy +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_MAGIC_SYSRQ=3Dy +CONFIG_PANIC_ON_OOPS=3Dy +CONFIG_FUNCTION_PROFILER=3Dy +CONFIG_STACK_TRACER=3Dy +CONFIG_SCHED_TRACER=3Dy +CONFIG_STRICT_DEVMEM=3Dy +CONFIG_DEBUG_USER=3Dy +CONFIG_DEBUG_LL=3Dy +CONFIG_DEBUG_LL_UART_8250=3Dy +CONFIG_DEBUG_UART_PHYS=3D0xC00000F0 +CONFIG_DEBUG_UART_VIRT=3D0xF00000F0 +CONFIG_DEBUG_UART_8250_SHIFT=3D0 +CONFIG_EARLY_PRINTK=3Dy +CONFIG_TEST_KSTRTOX=3Dy diff --git a/arch/arm/mach-hpe/Kconfig b/arch/arm/mach-hpe/Kconfig new file mode 100644 index 000000000000..9b27f97c6536 --- /dev/null +++ b/arch/arm/mach-hpe/Kconfig @@ -0,0 +1,20 @@ +menuconfig ARCH_HPE + bool "HPE SoC support" + help + This enables support for HPE ARM based SoC chips +if ARCH_HPE + +config ARCH_HPE_GXP + bool "HPE GXP SoC" + select ARM_VIC + select PINCTRL + select IRQ_DOMAIN + select GENERIC_IRQ_CHIP + select MULTI_IRQ_HANDLER + select SPARSE_IRQ + select CLKSRC_MMIO + depends on ARCH_MULTI_V7 + help + Support for GXP SoCs + +endif diff --git a/arch/arm/mach-hpe/Makefile b/arch/arm/mach-hpe/Makefile new file mode 100644 index 000000000000..8b0a91234df4 --- /dev/null +++ b/arch/arm/mach-hpe/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_ARCH_HPE_GXP) +=3D gxp.o diff --git a/arch/arm/mach-hpe/gxp.c b/arch/arm/mach-hpe/gxp.c new file mode 100644 index 000000000000..b58f25fbae5a --- /dev/null +++ b/arch/arm/mach-hpe/gxp.c @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (C) 2022 Hewlett-Packard Enterprise Development Company, L.P. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + +#include +#include +#include +#include +#include +#include +#include + +#define IOP_REGS_PHYS_BASE 0xc0000000 +#define IOP_REGS_VIRT_BASE 0xf0000000 +#define IOP_REGS_SIZE (240*SZ_1M) + +#define IOP_EHCI_USBCMD 0x0efe0010 + +static struct map_desc gxp_io_desc[] __initdata =3D { + { + .virtual =3D (unsigned long)IOP_REGS_VIRT_BASE, + .pfn =3D __phys_to_pfn(IOP_REGS_PHYS_BASE), + .length =3D IOP_REGS_SIZE, + .type =3D MT_DEVICE, + }, +}; + +void __init gxp_map_io(void) +{ + iotable_init(gxp_io_desc, ARRAY_SIZE(gxp_io_desc)); +} + +static void __init gxp_dt_init(void) +{ + //reset EHCI host controller for clear start + __raw_writel(0x00080002, + (void __iomem *)(IOP_REGS_VIRT_BASE + IOP_EHCI_USBCMD)); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static void gxp_restart(enum reboot_mode mode, const char *cmd) +{ + pr_info("gpx restart"); + __raw_writel(1, (void __iomem *) IOP_REGS_VIRT_BASE); +} + +static const char * const gxp_board_dt_compat[] =3D { + "HPE,GXP", + NULL, +}; + +DT_MACHINE_START(GXP_DT, "HPE GXP") + .init_machine =3D gxp_dt_init, + .map_io =3D gxp_map_io, + .restart =3D gxp_restart, + .dt_compat =3D gxp_board_dt_compat, +MACHINE_END --=20 2.17.1