All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] powerpc/85xx: DTS: Add CPLD definitions for P1021RDB Combo Board CPL Design
Date: Mon, 22 Aug 2022 12:00:56 -0500	[thread overview]
Message-ID: <20220822170056.GA4135542-robh@kernel.org> (raw)
In-Reply-To: <20220819084433.26011-1-pali@kernel.org>

On Fri, Aug 19, 2022 at 10:44:33AM +0200, Pali Rohár wrote:
> P1021RDB Combo Board CPLD Design is used on following Freescale boards:
> P1021RDB-PC, P1020RDB-PD, P1020MBG-PC, P1020UTM-PC and P2020RDB-PCA.
> 
> Add CPLD definitions for all these boards for which already exist DTS file.
> 
> CPLD has bank size 128kB, it is connected via CS3 on LBC and mapped to
> memory range 0xFFA00000~0xFFA1FFFF.
> 
> As CPLD firmware is common on all these boards, use just one compatible
> string "fsl,p1021rdb-pc-cpld".
> 
> In some DTS files is CPLD already defined, but definition is either
> incomplete or wrong. So fix it.
> 
> All these boards have via CPLD connected max6370 watchdog at offset 0x2
> with GPIO 11, status led at offset 0x8 and reset controller at offset 0xd.
> Additionally P1020MBG-PC and P1020RDB-PD boards have FXO led at offset 0x9
> and FXS leds at offset 0xa.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
>  arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi    | 92 +++++++++++++++++++
>  arch/powerpc/boot/dts/fsl/p1020mbg-pc_32b.dts |  6 +-
>  arch/powerpc/boot/dts/fsl/p1020mbg-pc_36b.dts |  6 +-
>  arch/powerpc/boot/dts/fsl/p1020rdb-pd.dts     | 44 +++++++--
>  arch/powerpc/boot/dts/fsl/p1020utm-pc.dtsi    | 37 ++++++++
>  arch/powerpc/boot/dts/fsl/p1020utm-pc_32b.dts |  4 +-
>  arch/powerpc/boot/dts/fsl/p1020utm-pc_36b.dts |  4 +-
>  arch/powerpc/boot/dts/fsl/p1021rdb-pc.dtsi    | 37 ++++++++
>  arch/powerpc/boot/dts/fsl/p1021rdb-pc_32b.dts |  5 +-
>  arch/powerpc/boot/dts/fsl/p1021rdb-pc_36b.dts |  5 +-
>  arch/powerpc/boot/dts/fsl/p2020rdb-pc.dtsi    | 33 ++++++-
>  11 files changed, 251 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi b/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
> index a24699cfea9c..c73996dcd809 100644
> --- a/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
> @@ -83,6 +83,95 @@
>  		compatible = "vitesse-7385";
>  		reg = <0x2 0x0 0x20000>;
>  	};
> +
> +	cpld@3,0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "fsl,p1021rdb-pc-cpld", "simple-bus", "syscon";
> +		reg = <0x3 0x0 0x20000>;
> +		ranges = <0x0 0x3 0x0 0x20000>;
> +
> +		watchdog@2 {
> +			compatible = "maxim,max6370";
> +			reg = <0x2 0x1>;
> +			gpios = <&gpio 11 1>;
> +		};
> +
> +		led@8 {

The register-bit-led schema says this should be 'led@8,0'. Did you 
run 'dtbs_check'? 

But that's going to conflict with what simple-bus schema says. I don't 
know that 'simple-bus' is really appropriate here. The CPLD isn't really 
just a bus. 'simple-mfd' is what's more commonly used with 'syscon'.


> +			compatible = "register-bit-led";
> +			reg = <0x8 0x1>;
> +			offset = <0x8>;
> +			mask = <0x1>;
> +			active-low;
> +			default-state = "keep";
> +			label = "status";
> +			function = "status";
> +			color = <6>; /* LED_COLOR_ID_YELLOW */
> +		};


WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/85xx: DTS: Add CPLD definitions for P1021RDB Combo Board CPL Design
Date: Mon, 22 Aug 2022 12:00:56 -0500	[thread overview]
Message-ID: <20220822170056.GA4135542-robh@kernel.org> (raw)
In-Reply-To: <20220819084433.26011-1-pali@kernel.org>

On Fri, Aug 19, 2022 at 10:44:33AM +0200, Pali Rohár wrote:
> P1021RDB Combo Board CPLD Design is used on following Freescale boards:
> P1021RDB-PC, P1020RDB-PD, P1020MBG-PC, P1020UTM-PC and P2020RDB-PCA.
> 
> Add CPLD definitions for all these boards for which already exist DTS file.
> 
> CPLD has bank size 128kB, it is connected via CS3 on LBC and mapped to
> memory range 0xFFA00000~0xFFA1FFFF.
> 
> As CPLD firmware is common on all these boards, use just one compatible
> string "fsl,p1021rdb-pc-cpld".
> 
> In some DTS files is CPLD already defined, but definition is either
> incomplete or wrong. So fix it.
> 
> All these boards have via CPLD connected max6370 watchdog at offset 0x2
> with GPIO 11, status led at offset 0x8 and reset controller at offset 0xd.
> Additionally P1020MBG-PC and P1020RDB-PD boards have FXO led at offset 0x9
> and FXS leds at offset 0xa.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
>  arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi    | 92 +++++++++++++++++++
>  arch/powerpc/boot/dts/fsl/p1020mbg-pc_32b.dts |  6 +-
>  arch/powerpc/boot/dts/fsl/p1020mbg-pc_36b.dts |  6 +-
>  arch/powerpc/boot/dts/fsl/p1020rdb-pd.dts     | 44 +++++++--
>  arch/powerpc/boot/dts/fsl/p1020utm-pc.dtsi    | 37 ++++++++
>  arch/powerpc/boot/dts/fsl/p1020utm-pc_32b.dts |  4 +-
>  arch/powerpc/boot/dts/fsl/p1020utm-pc_36b.dts |  4 +-
>  arch/powerpc/boot/dts/fsl/p1021rdb-pc.dtsi    | 37 ++++++++
>  arch/powerpc/boot/dts/fsl/p1021rdb-pc_32b.dts |  5 +-
>  arch/powerpc/boot/dts/fsl/p1021rdb-pc_36b.dts |  5 +-
>  arch/powerpc/boot/dts/fsl/p2020rdb-pc.dtsi    | 33 ++++++-
>  11 files changed, 251 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi b/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
> index a24699cfea9c..c73996dcd809 100644
> --- a/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
> @@ -83,6 +83,95 @@
>  		compatible = "vitesse-7385";
>  		reg = <0x2 0x0 0x20000>;
>  	};
> +
> +	cpld@3,0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "fsl,p1021rdb-pc-cpld", "simple-bus", "syscon";
> +		reg = <0x3 0x0 0x20000>;
> +		ranges = <0x0 0x3 0x0 0x20000>;
> +
> +		watchdog@2 {
> +			compatible = "maxim,max6370";
> +			reg = <0x2 0x1>;
> +			gpios = <&gpio 11 1>;
> +		};
> +
> +		led@8 {

The register-bit-led schema says this should be 'led@8,0'. Did you 
run 'dtbs_check'? 

But that's going to conflict with what simple-bus schema says. I don't 
know that 'simple-bus' is really appropriate here. The CPLD isn't really 
just a bus. 'simple-mfd' is what's more commonly used with 'syscon'.


> +			compatible = "register-bit-led";
> +			reg = <0x8 0x1>;
> +			offset = <0x8>;
> +			mask = <0x1>;
> +			active-low;
> +			default-state = "keep";
> +			label = "status";
> +			function = "status";
> +			color = <6>; /* LED_COLOR_ID_YELLOW */
> +		};


  reply	other threads:[~2022-08-22 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  8:44 [PATCH] powerpc/85xx: DTS: Add CPLD definitions for P1021RDB Combo Board CPL Design Pali Rohár
2022-08-22 17:00 ` Rob Herring [this message]
2022-08-22 17:00   ` Rob Herring
2022-08-22 18:30   ` Pali Rohár
2022-08-22 18:30     ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220822170056.GA4135542-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=pali@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.