Skip to content

Commit bb2974f

Browse files
committed
Merge tag 'hisi-drivers-for-6.6' of https://github.com/hisilicon/linux-hisi into soc/drivers
HiSilicon driver updates for v6.6 - Add HCCS driver for HiSilicon Kunpeng SoC and document the sysfs description * tag 'hisi-drivers-for-6.6' of https://github.com/hisilicon/linux-hisi: doc: soc: hisilicon: Add Kunpeng HCCS driver documentation soc: hisilicon: add sysfs entry to query information of HCCS soc: hisilicon: Support HCCS driver on Kunpeng SoC Link: https://lore.kernel.org/r/64D605DE.2070303@hisilicon.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 8bb5c5f + b51022b commit bb2974f

File tree

8 files changed

+1578
-0
lines changed

8 files changed

+1578
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
What: /sys/devices/platform/HISI04Bx:00/chipX/all_linked
2+
What: /sys/devices/platform/HISI04Bx:00/chipX/linked_full_lane
3+
What: /sys/devices/platform/HISI04Bx:00/chipX/crc_err_cnt
4+
Date: November 2023
5+
KernelVersion: 6.6
6+
Contact: Huisong Li <lihuisong@huawei.org>
7+
Description:
8+
The /sys/devices/platform/HISI04Bx:00/chipX/ directory
9+
contains read-only attributes exposing some summarization
10+
information of all HCCS ports under a specified chip.
11+
The X in 'chipX' indicates the Xth chip on platform.
12+
13+
There are following attributes in this directory:
14+
15+
================= ==== =========================================
16+
all_linked: (RO) if all enabled ports on this chip are
17+
linked (bool).
18+
linked_full_lane: (RO) if all linked ports on this chip are full
19+
lane (bool).
20+
crc_err_cnt: (RO) total CRC err count for all ports on this
21+
chip.
22+
================= ==== =========================================
23+
24+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/all_linked
25+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/linked_full_lane
26+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/crc_err_cnt
27+
Date: November 2023
28+
KernelVersion: 6.6
29+
Contact: Huisong Li <lihuisong@huawei.org>
30+
Description:
31+
The /sys/devices/platform/HISI04Bx:00/chipX/dieY/ directory
32+
contains read-only attributes exposing some summarization
33+
information of all HCCS ports under a specified die.
34+
The Y in 'dieY' indicates the hardware id of the die on chip who
35+
has chip id X.
36+
37+
There are following attributes in this directory:
38+
39+
================= ==== =========================================
40+
all_linked: (RO) if all enabled ports on this die are
41+
linked (bool).
42+
linked_full_lane: (RO) if all linked ports on this die are full
43+
lane (bool).
44+
crc_err_cnt: (RO) total CRC err count for all ports on this
45+
die.
46+
================= ==== =========================================
47+
48+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/type
49+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/lane_mode
50+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/enable
51+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/cur_lane_num
52+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/link_fsm
53+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/lane_mask
54+
What: /sys/devices/platform/HISI04Bx:00/chipX/dieY/hccsN/crc_err_cnt
55+
Date: November 2023
56+
KernelVersion: 6.6
57+
Contact: Huisong Li <lihuisong@huawei.org>
58+
Description:
59+
The /sys/devices/platform/HISI04Bx/chipX/dieX/hccsN/ directory
60+
contains read-only attributes exposing information about
61+
a HCCS port. The N value in 'hccsN' indicates this port id.
62+
The X in 'chipX' indicates the ID of the chip to which the
63+
HCCS port belongs. For example, X ranges from to 'n - 1' if the
64+
chip number on platform is n.
65+
The Y in 'dieY' indicates the hardware id of the die to which
66+
the hccs port belongs.
67+
Note: type, lane_mode and enable are fixed attributes on running
68+
platform.
69+
70+
The HCCS port have the following attributes:
71+
72+
============= ==== =============================================
73+
type: (RO) port type (string), e.g. HCCS-v1 -> H32
74+
lane_mode: (RO) the lane mode of this port (string), e.g. x8
75+
enable: (RO) indicate if this port is enabled (bool).
76+
cur_lane_num: (RO) current lane number of this port.
77+
link_fsm: (RO) link finite state machine of this port.
78+
lane_mask: (RO) current lane mask of this port, every bit
79+
indicates a lane.
80+
crc_err_cnt: (RO) CRC err count on this port.
81+
============= ==== =============================================

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9327,6 +9327,13 @@ W: https://www.hisilicon.com
93279327
F: Documentation/devicetree/bindings/i2c/hisilicon,ascend910-i2c.yaml
93289328
F: drivers/i2c/busses/i2c-hisi.c
93299329

9330+
HISILICON KUNPENG SOC HCCS DRIVER
9331+
M: Huisong Li <lihuisong@huawei.com>
9332+
S: Maintained
9333+
F: Documentation/ABI/testing/sysfs-devices-platform-kunpeng_hccs
9334+
F: drivers/soc/hisilicon/kunpeng_hccs.c
9335+
F: drivers/soc/hisilicon/kunpeng_hccs.h
9336+
93309337
HISILICON LPC BUS DRIVER
93319338
M: Jay Fang <f.fangjian@huawei.com>
93329339
S: Maintained

drivers/soc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ source "drivers/soc/bcm/Kconfig"
1010
source "drivers/soc/canaan/Kconfig"
1111
source "drivers/soc/fsl/Kconfig"
1212
source "drivers/soc/fujitsu/Kconfig"
13+
source "drivers/soc/hisilicon/Kconfig"
1314
source "drivers/soc/imx/Kconfig"
1415
source "drivers/soc/ixp4xx/Kconfig"
1516
source "drivers/soc/litex/Kconfig"

drivers/soc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj-$(CONFIG_MACH_DOVE) += dove/
1313
obj-y += fsl/
1414
obj-y += fujitsu/
1515
obj-$(CONFIG_ARCH_GEMINI) += gemini/
16+
obj-y += hisilicon/
1617
obj-y += imx/
1718
obj-y += ixp4xx/
1819
obj-$(CONFIG_SOC_XWAY) += lantiq/

drivers/soc/hisilicon/Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
3+
menu "Hisilicon SoC drivers"
4+
depends on ARCH_HISI || COMPILE_TEST
5+
6+
config KUNPENG_HCCS
7+
tristate "HCCS driver on Kunpeng SoC"
8+
depends on ACPI
9+
depends on ARM64 || COMPILE_TEST
10+
help
11+
The Huawei Cache Coherence System (HCCS) is a multi-chip
12+
interconnection bus protocol.
13+
The performance of application may be affected if some HCCS
14+
ports are not in full lane status, have a large number of CRC
15+
errors and so on.
16+
17+
Say M here if you want to include support for querying the
18+
health status and port information of HCCS on Kunpeng SoC.
19+
20+
endmenu

drivers/soc/hisilicon/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
obj-$(CONFIG_KUNPENG_HCCS) += kunpeng_hccs.o

0 commit comments

Comments
 (0)