2022-03-11 09:21:34

by Jim Liu

[permalink] [raw]
Subject: [PATCH v1 1/3] dts: add Nuvoton sgpio feature

add Nuvoton sgpio feature

Signed-off-by: jimliu2 <[email protected]>
---
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
index 3696980a3da1..58f4b463c745 100644
--- a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
+++ b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
@@ -329,6 +329,36 @@
status = "disabled";
};

+ sgpio1: sgpio@101000 {
+ clocks = <&clk NPCM7XX_CLK_APB3>;
+ compatible = "nuvoton,npcm750-sgpio";
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&iox1_pins>;
+ bus-frequency = <16000000>;
+ nin_gpios = <64>;
+ nout_gpios = <64>;
+ reg = <0x101000 0x200>;
+ status = "disabled";
+ };
+
+ sgpio2: sgpio@102000 {
+ clocks = <&clk NPCM7XX_CLK_APB3>;
+ compatible = "nuvoton,npcm750-sgpio";
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&iox2_pins>;
+ bus-frequency = <16000000>;
+ nin_gpios = <64>;
+ nout_gpios = <64>;
+ reg = <0x102000 0x200>;
+ status = "disabled";
+ };
+
pwm_fan: pwm-fan-controller@103000 {
#address-cells = <1>;
#size-cells = <0>;
--
2.17.1


2022-03-11 17:16:15

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] dts: add Nuvoton sgpio feature

On 11/03/2022 07:09, jimliu2 wrote:
> add Nuvoton sgpio feature
>
> Signed-off-by: jimliu2 <[email protected]>
> ---
> arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
> index 3696980a3da1..58f4b463c745 100644
> --- a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
> +++ b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
> @@ -329,6 +329,36 @@
> status = "disabled";
> };
>
> + sgpio1: sgpio@101000 {

Generic node name.

> + clocks = <&clk NPCM7XX_CLK_APB3>;
> + compatible = "nuvoton,npcm750-sgpio";
> + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&iox1_pins>;
> + bus-frequency = <16000000>;
> + nin_gpios = <64>;
> + nout_gpios = <64>;
> + reg = <0x101000 0x200>;

In each node first goes compatible, then reg.

Best regards,
Krzysztof

2022-09-15 03:38:30

by Jim Liu

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] dts: add Nuvoton sgpio feature

Hi Krzysztof Kozlowski

Thanks for your review.
I am modifying this driver now, and i have some questions.

what's mean "Generic node name." ?
Nuvoton NPCM750 SGPIO module is base on serial to parallel IC (HC595)
and parallel to serial IC (HC165).
and dts node name is followed aspeed dts node name.

Could you give more information??

Best regards,
Jim

On Fri, Mar 11, 2022 at 5:18 PM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 11/03/2022 07:09, jimliu2 wrote:
> > add Nuvoton sgpio feature
> >
> > Signed-off-by: jimliu2 <[email protected]>
> > ---
> > arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 30 +++++++++++++++++++
> > 1 file changed, 30 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
> > index 3696980a3da1..58f4b463c745 100644
> > --- a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
> > +++ b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
> > @@ -329,6 +329,36 @@
> > status = "disabled";
> > };
> >
> > + sgpio1: sgpio@101000 {
>
> Generic node name.
>
> > + clocks = <&clk NPCM7XX_CLK_APB3>;
> > + compatible = "nuvoton,npcm750-sgpio";
> > + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&iox1_pins>;
> > + bus-frequency = <16000000>;
> > + nin_gpios = <64>;
> > + nout_gpios = <64>;
> > + reg = <0x101000 0x200>;
>
> In each node first goes compatible, then reg.
>
> Best regards,
> Krzysztof