All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Thomas <pthomas8589@gmail.com>
To: Manish Narani <manish.narani@xilinx.com>
Cc: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
	pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com,
	michal.simek@xilinx.com, Jisheng.Zhang@synaptics.com,
	olof@lixom.net, dinguyen@kernel.org, amit.kucheria@linaro.org,
	stefan.popa@analog.com, dmurphy@ti.com,
	marcus.folkesson@gmail.com, tmaimon77@gmail.com,
	ricardo@ribalda.com, xc-racer2@live.ca, contact@artur-rojek.eu,
	geert@linux-m68k.org, smohanad@codeaurora.org,
	charles-antoine.couret@essensium.com, stefan@agner.ch,
	max.krummenacher@toradex.com, lee.jones@linaro.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 3/3] arm64: zynqmp: DT: Add Xilinx AMS node
Date: Tue, 21 May 2019 09:26:44 -0400	[thread overview]
Message-ID: <CAD56B7dw4kTRuXeKXyT6KbEP9E=B=KqpamL14d96LjGgAfrbGQ@mail.gmail.com> (raw)
In-Reply-To: <1555943870-15353-4-git-send-email-manish.narani@xilinx.com>

Hi Manish,

Thank you for posting this! It is very much needed in the mainline
kernel, nice work.

On Mon, Apr 22, 2019 at 10:54 AM Manish Narani <manish.narani@xilinx.com> wrote:
>
> The Xilinx AMS includes an ADC as well as on-chip sensors that can be
> used to sample external and monitor on-die operating conditions, such as
> temperature and supply voltage levels.
>
> Signed-off-by: Manish Narani <manish.narani@xilinx.com>
> ---
>  arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> index 9aa6734..f776913 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> @@ -625,5 +625,31 @@
>                         reg = <0x0 0xfd4d0000 0x0 0x1000>;
>                         timeout-sec = <10>;
>                 };
> +
> +               xilinx_ams: ams@ffa50000 {
> +                       compatible = "xlnx,zynqmp-ams";
> +                       status = "disabled";
> +                       interrupt-parent = <&gic>;
> +                       interrupts = <0 56 4>;
> +                       interrupt-names = "ams-irq";
> +                       reg = <0x0 0xffa50000 0x0 0x800>;
> +                       reg-names = "ams-base";
> +                       #address-cells = <1>;
> +                       #size-cells = <1>;
> +                       #io-channel-cells = <1>;
> +                       ranges = <0 0 0xffa50800 0x800>;
> +
> +                       ams_ps: ams-ps@0,0 {
> +                               compatible = "xlnx,zynqmp-ams-ps";
> +                               status = "disabled";
> +                               reg = <0 0x400>;
> +                       };
> +
> +                       ams_pl: ams-pl@1,0 {
> +                               compatible = "xlnx,zynqmp-ams-pl";
> +                               status = "disabled";
> +                               reg = <0x400 0x400>;
> +                       };
> +               };
>         };
>  };
> --
> 2.1.1
>
I tested this with an older 4.18 kernel, and with a slightly different
devicetree (shown below) it seems to be working.

        xilinx_ams: ams@ffa50000 {
                compatible = "xlnx,zynqmp-ams";
                status = "okay";
                interrupt-parent = <&gic>;
                interrupts = <0 56 4>;
                interrupt-names = "ams-irq";
                reg = <0x0 0xffa50000 0x0 0x800>;
                reg-names = "ams-base";

                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                ams_ps: ams_ps@ffa50800 {
                        compatible = "xlnx,zynqmp-ams-ps";
                        reg = <0x0 0xffa50800 0x0 0x400>;
                };

                ams_pl: ams_pl@ffa50c00 {
                        compatible = "xlnx,zynqmp-ams-pl";
                        reg = <0x0 0xffa50c00 0x0 0x400>;
                };

Also I needed to have the clock defined "clocks = <&clk 70>;".

For the temperatures I get in_temp0_raw, in_temp1_raw and in_temp2 do
these correspond to channels 7,8 & 21 in the devicetree documentation?

thanks,
Paul

WARNING: multiple messages have this Message-ID (diff)
From: Paul Thomas <pthomas8589@gmail.com>
To: Manish Narani <manish.narani@xilinx.com>
Cc: mark.rutland@arm.com, charles-antoine.couret@essensium.com,
	tmaimon77@gmail.com, linux-iio@vger.kernel.org,
	xc-racer2@live.ca, stefan@agner.ch, pmeerw@pmeerw.net,
	lee.jones@linaro.org, marcus.folkesson@gmail.com,
	lars@metafoo.de, contact@artur-rojek.eu, ricardo@ribalda.com,
	michal.simek@xilinx.com, geert@linux-m68k.org,
	stefan.popa@analog.com, devicetree@vger.kernel.org,
	max.krummenacher@toradex.com, smohanad@codeaurora.org,
	robh+dt@kernel.org, dmurphy@ti.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	amit.kucheria@linaro.org, dinguyen@kernel.org,
	Jisheng.Zhang@synaptics.com, knaack.h@gmx.de, olof@lixom.net,
	jic23@kernel.org
Subject: Re: [PATCH v4 3/3] arm64: zynqmp: DT: Add Xilinx AMS node
Date: Tue, 21 May 2019 09:26:44 -0400	[thread overview]
Message-ID: <CAD56B7dw4kTRuXeKXyT6KbEP9E=B=KqpamL14d96LjGgAfrbGQ@mail.gmail.com> (raw)
In-Reply-To: <1555943870-15353-4-git-send-email-manish.narani@xilinx.com>

Hi Manish,

Thank you for posting this! It is very much needed in the mainline
kernel, nice work.

On Mon, Apr 22, 2019 at 10:54 AM Manish Narani <manish.narani@xilinx.com> wrote:
>
> The Xilinx AMS includes an ADC as well as on-chip sensors that can be
> used to sample external and monitor on-die operating conditions, such as
> temperature and supply voltage levels.
>
> Signed-off-by: Manish Narani <manish.narani@xilinx.com>
> ---
>  arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> index 9aa6734..f776913 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> @@ -625,5 +625,31 @@
>                         reg = <0x0 0xfd4d0000 0x0 0x1000>;
>                         timeout-sec = <10>;
>                 };
> +
> +               xilinx_ams: ams@ffa50000 {
> +                       compatible = "xlnx,zynqmp-ams";
> +                       status = "disabled";
> +                       interrupt-parent = <&gic>;
> +                       interrupts = <0 56 4>;
> +                       interrupt-names = "ams-irq";
> +                       reg = <0x0 0xffa50000 0x0 0x800>;
> +                       reg-names = "ams-base";
> +                       #address-cells = <1>;
> +                       #size-cells = <1>;
> +                       #io-channel-cells = <1>;
> +                       ranges = <0 0 0xffa50800 0x800>;
> +
> +                       ams_ps: ams-ps@0,0 {
> +                               compatible = "xlnx,zynqmp-ams-ps";
> +                               status = "disabled";
> +                               reg = <0 0x400>;
> +                       };
> +
> +                       ams_pl: ams-pl@1,0 {
> +                               compatible = "xlnx,zynqmp-ams-pl";
> +                               status = "disabled";
> +                               reg = <0x400 0x400>;
> +                       };
> +               };
>         };
>  };
> --
> 2.1.1
>
I tested this with an older 4.18 kernel, and with a slightly different
devicetree (shown below) it seems to be working.

        xilinx_ams: ams@ffa50000 {
                compatible = "xlnx,zynqmp-ams";
                status = "okay";
                interrupt-parent = <&gic>;
                interrupts = <0 56 4>;
                interrupt-names = "ams-irq";
                reg = <0x0 0xffa50000 0x0 0x800>;
                reg-names = "ams-base";

                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                ams_ps: ams_ps@ffa50800 {
                        compatible = "xlnx,zynqmp-ams-ps";
                        reg = <0x0 0xffa50800 0x0 0x400>;
                };

                ams_pl: ams_pl@ffa50c00 {
                        compatible = "xlnx,zynqmp-ams-pl";
                        reg = <0x0 0xffa50c00 0x0 0x400>;
                };

Also I needed to have the clock defined "clocks = <&clk 70>;".

For the temperatures I get in_temp0_raw, in_temp1_raw and in_temp2 do
these correspond to channels 7,8 & 21 in the devicetree documentation?

thanks,
Paul

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-05-21 13:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 14:37 [PATCH v4 0/3] Add Xilinx AMS Driver Manish Narani
2019-04-22 14:37 ` Manish Narani
2019-04-22 14:37 ` Manish Narani
2019-04-22 14:37 ` [PATCH v4 1/3] dt-bindings: iio: adc: Add Xilinx AMS binding documentation Manish Narani
2019-04-22 14:37   ` Manish Narani
2019-04-22 14:37   ` Manish Narani
2019-04-26 19:33   ` Rob Herring
2019-04-26 19:33     ` Rob Herring
2019-04-27 12:05     ` Jonathan Cameron
2019-04-27 12:05       ` Jonathan Cameron
2019-04-22 14:37 ` [PATCH v4 2/3] iio: adc: Add Xilinx AMS driver Manish Narani
2019-04-22 14:37   ` Manish Narani
2019-04-22 14:37   ` Manish Narani
2019-04-22 14:37 ` [PATCH v4 3/3] arm64: zynqmp: DT: Add Xilinx AMS node Manish Narani
2019-04-22 14:37   ` Manish Narani
2019-04-22 14:37   ` Manish Narani
2019-05-21 13:26   ` Paul Thomas [this message]
2019-05-21 13:26     ` Paul Thomas

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='CAD56B7dw4kTRuXeKXyT6KbEP9E=B=KqpamL14d96LjGgAfrbGQ@mail.gmail.com' \
    --to=pthomas8589@gmail.com \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=amit.kucheria@linaro.org \
    --cc=charles-antoine.couret@essensium.com \
    --cc=contact@artur-rojek.eu \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=dmurphy@ti.com \
    --cc=geert@linux-m68k.org \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=max.krummenacher@toradex.com \
    --cc=michal.simek@xilinx.com \
    --cc=olof@lixom.net \
    --cc=pmeerw@pmeerw.net \
    --cc=ricardo@ribalda.com \
    --cc=robh+dt@kernel.org \
    --cc=smohanad@codeaurora.org \
    --cc=stefan.popa@analog.com \
    --cc=stefan@agner.ch \
    --cc=tmaimon77@gmail.com \
    --cc=xc-racer2@live.ca \
    /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.