Skip to contentSkip to conversation

Add support for PECI Nuvoton

PATCH In review Tomer Maimon 2 participants 6 messages Jun 28, 2023 – Jul 2, 2023

Subsystems (3)
lore
Share & tools
lore

Tomer Maimon

author maintainer
#0 lore raw

cover Add support for PECI Nuvoton

This patch set adds NPCM PECI support for the Nuvoton NPCM Baseboard Management Controller (BMC).

The NPCM PECI has started the upstream process to Linux vanilla version 6.4 by Iwona Winiarska.

The NPCM PECI driver tested on Olympus(NPCM750) board.

Tomer Maimon (2):
dt-bindings: Add bindings for peci-npcm
peci: Add peci-npcm controller driver

 .../devicetree/bindings/peci/peci-npcm.yaml   |  58 ++++
 drivers/peci/controller/Kconfig               |  16 +
 drivers/peci/controller/Makefile              |   1 +
 drivers/peci/controller/peci-npcm.c           | 298 ++++++++++++++++++
 4 files changed, 373 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/peci/peci-npcm.yaml
 create mode 100644 drivers/peci/controller/peci-npcm.c
Signature · 1 line
2.33.0
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: Add bindings for peci-npcm

Add device tree bindings for the peci-npcm controller driver.

---
 .../devicetree/bindings/peci/peci-npcm.yaml   | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/peci/peci-npcm.yaml
Documentation/devicetree/bindings/peci/peci-npcm.yaml new file +58 -0
new file mode 100644
index 000000000000..f82a6ed3a3d3
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/peci/peci-npcm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton PECI Bus
+
+maintainers:
+  - Tomer Maimon <[email protected]>
+
+allOf:
+  - $ref: peci-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,npcm750-peci
+      - nuvoton,npcm845-peci
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    description:
+      Clock source for PECI controller. Should reference the APB
+      clock.
+    maxItems: 1
+
+  cmd-timeout-ms:
+    minimum: 1
+    maximum: 1000
+    default: 1000
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    peci-controller@f0100000 {
+      compatible = "nuvoton,npcm750-peci";
+      reg = <0xf0100000 0x200>;
+      interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&clk NPCM7XX_CLK_APB3>;
+      cmd-timeout-ms = <1000>;
+    };
+...
Signature · 1 line
2.33.0
author maintainer
#5 lore raw

PATCH 2/2 peci: Add peci-npcm controller driver

In reply to Tomer Maimon

Add support for Nuvoton NPCM BMC hardware to the Platform Environment Control Interface (PECI) subsystem.

---
 drivers/peci/controller/Kconfig     |  16 ++
 drivers/peci/controller/Makefile    |   1 +
 drivers/peci/controller/peci-npcm.c | 298 ++++++++++++++++++++++++++++
 3 files changed, 315 insertions(+)
 create mode 100644 drivers/peci/controller/peci-npcm.c
drivers/peci/controller/Kconfig +16 -0
index 2fc5e2abb74a..16d903e17d00 100644
@@ -16,3 +16,19 @@ config PECI_ASPEED
 
 	  This driver can also be built as a module. If so, the module will
 	  be called peci-aspeed.
+
+config PECI_NPCM
+	tristate "Nuvoton NPCM PECI support"
+	depends on ARCH_NPCM || COMPILE_TEST
+	depends on OF
+	select REGMAP_MMIO
+	help
+	  This option enables PECI controller driver for Nuvoton NPCM BMC SoCs.
+	  It allows BMC to discover devices connected to it and communicate with
+	  them using PECI protocol.
+
+	  Say Y here if you want support for the Platform Environment Control
+	  Interface (PECI) bus adapter driver on the Nuvoton NPCM SoCs.
+
+	  This support is also available as a module. If so, the module
+	  will be called peci-npcm.
drivers/peci/controller/Makefile +1 -0
index 022c28ef1bf0..e247449bb423 100644
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 obj-$(CONFIG_PECI_ASPEED)	+= peci-aspeed.o
+obj-$(CONFIG_PECI_NPCM)		+= peci-npcm.o
drivers/peci/controller/peci-npcm.c new file +298 -0

298 lines not on this page · raw message

Signature · 1 line
2.33.0
#2 lore raw

Re: [PATCH linux dev-6.1 v1 1/2] dt-bindings: Add bindings for peci-npcm

In reply to Tomer Maimon
Quoted 6 lines · Tomer Maimon

Add device tree bindings for the peci-npcm controller driver.

My patch tracker found it, but the commit msg suggests this is not for Linux. I mean, you did not intend this patch to be merged into Linux kernel, right? Cover letter does not explain here anything.

If so, please ignore.

If not and you actually added some dev-6.1 by mistake, then regular disclaimer follows:

A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least DT list (maybe more), so this won't be tested by our tools. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.

The sad part is that I already said it to Iwona. I wonder if all the comments were ignored or something was fixed?

Best regards,
Krzysztof

author maintainer
#3 lore raw

Re: [PATCH linux dev-6.1 v1 1/2] dt-bindings: Add bindings for peci-npcm

Hi Krzysztof,

This patch sends to the OpenBMC Linux kernel and not to the Linux kernel vanilla upstream, this is why I added in the message dev-6.1 and only send it to the OpenBMC mail list, please ignore it.
https://github.com/openbmc/linux

Thanks,

Tomer

Quoted 40 lines · Krzysztof Kozlowski
Quoted 6 lines · Tomer Maimon

Add device tree bindings for the peci-npcm controller driver.

My patch tracker found it, but the commit msg suggests this is not for Linux. I mean, you did not intend this patch to be merged into Linux kernel, right? Cover letter does not explain here anything.

If so, please ignore.

If not and you actually added some dev-6.1 by mistake, then regular disclaimer follows:

A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least DT list (maybe more), so this won't be tested by our tools. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.

The sad part is that I already said it to Iwona. I wonder if all the comments were ignored or something was fixed?

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH linux dev-6.1 v1 1/2] dt-bindings: Add bindings for peci-npcm

Quoted 7 lines · Tomer Maimon

Hi Krzysztof,

This patch sends to the OpenBMC Linux kernel and not to the Linux kernel vanilla upstream, this is why I added in the message dev-6.1 and only send it to the OpenBMC mail list, please ignore it.
https://github.com/openbmc/linux

Sure, no problem. Sorry for the noise.

Best regards,
Krzysztof