mbox series

[v3,0/4] Add support for PECI Nuvoton

Message ID 20230727202126.1477515-1-iwona.winiarska@intel.com
Headers show
Series Add support for PECI Nuvoton | expand

Message

Winiarska, Iwona July 27, 2023, 8:21 p.m. UTC
Hi!

The series adds support for PECI on Nuvoton-based BMC boards.
It is based on patches that were sent by Tomer Maimon from
Nuvoton [1].
Similar to Aspeed driver, unused (as in, default values were used in
all of the available DTS files) vendor-specific properties were
removed.
If there is a use-case for such properties, they can be added in
a separate series.

Thank you Tomer for testing this series on Nuvoton hardware [2].

Please note that PECI Nuvoton was previously submitted as part of PECI
subsystem series [3] that was never merged upstream.
It was never included in the current in-tree PECI subsystem [4].

[1] https://lore.kernel.org/openbmc/CAP6Zq1jnbQ8k9VEyf9WgVq5DRrEzf5V6kaYP30S7g9BV9jKtaQ@mail.gmail.com/
[2] https://lore.kernel.org/openbmc/CAP6Zq1h1if4hyubyh6N8EOdGOu+zp0qVUimF-9L2eXZ-QFAYjw@mail.gmail.com/
[3] https://lore.kernel.org/all/20191211194624.2872-1-jae.hyun.yoo@linux.intel.com/
[4] https://lore.kernel.org/all/20220208153639.255278-1-iwona.winiarska@intel.com/

Changes v2 -> v3:

* Fixed dt_binding_check error (Rob)

Changes v1 -> v2:

* Renamed binding filename to match compatible (Krzysztof)
* Removed period from the end of copyright (Paul)

Thanks
-Iwona

Iwona Winiarska (2):
  ARM: dts: nuvoton: Add PECI controller node
  arm64: dts: nuvoton: Add PECI controller node

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

 .../bindings/peci/nuvoton,npcm-peci.yaml      |  56 ++++
 .../dts/nuvoton/nuvoton-common-npcm7xx.dtsi   |   9 +
 .../dts/nuvoton/nuvoton-common-npcm8xx.dtsi   |   9 +
 drivers/peci/controller/Kconfig               |  16 +
 drivers/peci/controller/Makefile              |   1 +
 drivers/peci/controller/peci-npcm.c           | 298 ++++++++++++++++++
 6 files changed, 389 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/peci/nuvoton,npcm-peci.yaml
 create mode 100644 drivers/peci/controller/peci-npcm.c

Comments

Tomer Maimon Aug. 1, 2023, 8:40 a.m. UTC | #1
Hi Iwona,

I have done r-b, Just could you do a small modification

On Thu, 27 Jul 2023 at 23:23, Iwona Winiarska <iwona.winiarska@intel.com> wrote:
>
> Add PECI controller node with all required information.
>
> Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
> ---
>  arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi b/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> index c7b5ef15b716..cccc33441050 100644
> --- a/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> +++ b/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> @@ -220,6 +220,15 @@ kcs3: kcs3@0 {
>                                 };
>                         };
>
> +                       peci0: peci-controller@f0100000 {
Please modify the peci0 to peci we have only one PECI controller.
> +                               compatible = "nuvoton,npcm750-peci";
> +                               reg = <0xf0100000 0x200>;
> +                               interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
> +                               clocks = <&clk NPCM7XX_CLK_APB3>;
> +                               cmd-timeout-ms = <1000>;
> +                               status = "disabled";
> +                       };
> +
>                         spi0: spi@200000 {
>                                 compatible = "nuvoton,npcm750-pspi";
>                                 reg = <0x200000 0x1000>;
> --
> 2.40.1
>

Reviewed-by: Tomer Maimon <tmaimon77@gmail.com>

Thanks,

Tomer
Tomer Maimon Aug. 1, 2023, 8:43 a.m. UTC | #2
Hi Iwona,

I have done r-b, could you do a small modification

On Thu, 27 Jul 2023 at 23:23, Iwona Winiarska <iwona.winiarska@intel.com> wrote:
>
> Add PECI controller node with all required information.
>
> Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
> ---
>  arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi b/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
> index aa7aac8c3774..b8326bbe9fde 100644
> --- a/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
> +++ b/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
> @@ -68,6 +68,15 @@ apb {
>                         ranges = <0x0 0x0 0xf0000000 0x00300000>,
>                                 <0xfff00000 0x0 0xfff00000 0x00016000>;
>
> +                       peci0: peci-controller@100000 {
Please modify the peci0 to peci we have only one PECI controller.
> +                               compatible = "nuvoton,npcm845-peci";
> +                               reg = <0x100000 0x1000>;
> +                               interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
> +                               clocks = <&clk NPCM8XX_CLK_APB3>;
> +                               cmd-timeout-ms = <1000>;
> +                               status = "disabled";
> +                       };
> +
>                         timer0: timer@8000 {
>                                 compatible = "nuvoton,npcm845-timer";
>                                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> --
> 2.40.1
>

Reviewed-by: Tomer Maimon <tmaimon77@gmail.com>

Thanks,

Tomer
Winiarska, Iwona Aug. 1, 2023, 10:10 p.m. UTC | #3
On Tue, 2023-08-01 at 11:40 +0300, Tomer Maimon wrote:
> Hi Iwona,
> 
> I have done r-b, Just could you do a small modification
> 
> On Thu, 27 Jul 2023 at 23:23, Iwona Winiarska <iwona.winiarska@intel.com>
> wrote:
> > 
> > Add PECI controller node with all required information.
> > 
> > Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
> > ---
> >  arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> > b/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> > index c7b5ef15b716..cccc33441050 100644
> > --- a/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> > +++ b/arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi
> > @@ -220,6 +220,15 @@ kcs3: kcs3@0 {
> >                                 };
> >                         };
> > 
> > +                       peci0: peci-controller@f0100000 {
> Please modify the peci0 to peci we have only one PECI controller.

I'll fix up both DTS files while applying to peci-next.

Thanks
-Iwona

> > +                               compatible = "nuvoton,npcm750-peci";
> > +                               reg = <0xf0100000 0x200>;
> > +                               interrupts = <GIC_SPI 6
> > IRQ_TYPE_LEVEL_HIGH>;
> > +                               clocks = <&clk NPCM7XX_CLK_APB3>;
> > +                               cmd-timeout-ms = <1000>;
> > +                               status = "disabled";
> > +                       };
> > +
> >                         spi0: spi@200000 {
> >                                 compatible = "nuvoton,npcm750-pspi";
> >                                 reg = <0x200000 0x1000>;
> > --
> > 2.40.1
> > 
> 
> Reviewed-by: Tomer Maimon <tmaimon77@gmail.com>
> 
> Thanks,
> 
> Tomer