All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>,
	<u-boot@lists.denx.de>
Cc: <michal.simek@xilinx.com>
Subject: Re: [PATCH] [ZynqMP] Writing correct value to ANALOG_BUS.
Date: Tue, 8 Jun 2021 09:17:07 +0200	[thread overview]
Message-ID: <59e1ee41-a38d-3479-8308-1262a1d505d4@xilinx.com> (raw)
In-Reply-To: <20210607175345.37227-1-adrian.fiergolski@fastree3d.com>



On 6/7/21 7:53 PM, Adrian Fiergolski wrote:
> The default register configuration after powerup for PSSYSMON_ANALOG_BUS
> register is incorrect. Hence, fix this in SPL by writing correct fixed
> value. It follows UG1085 chapter 'PS SYSMON Analog_Bus' and reflects commit
> sw_apps:zynq ("056ca65d44549ce27f716d423e8dfdefeee7440c")
> in Xilinx:embeddedsw[1].
> 
> [1] https://github.com/Xilinx/embeddedsw
> 
> Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
> 
> %% original patch: 0001-zynqmp-Writing-correct-value-to-ANALOG_BUS.patch

Remove this line it shouldn't be the part of the commit message.

> ---
>  arch/arm/mach-zynqmp/include/mach/hardware.h |  5 +++++
>  board/xilinx/zynqmp/zynqmp.c                 | 11 +++++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
> index a0acfa2ff1..4774ed4089 100644
> --- a/arch/arm/mach-zynqmp/include/mach/hardware.h
> +++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
> @@ -15,6 +15,11 @@
>  #define ZYNQMP_CRL_APB_BOOT_PIN_CTRL_OUT_EN_SHIFT	0
>  #define ZYNQMP_CRL_APB_BOOT_PIN_CTRL_OUT_VAL_SHIFT	8
>  
> +#define ZYNQMP_AMS_PS_SYSMON_BASEADDR      0XFFA50800
> +#define ZYNQMP_AMS_PS_SYSMON_ANALOG_BUS ((ZYNQMP_AMS_PS_SYSMON_BASEADDR) \
> +							    + 0x00000114)
> +#define ZYNQMP_PS_SYSMON_ANALOG_BUS_VAL 0x00003210
> +
>  #define PS_MODE0	BIT(0)
>  #define PS_MODE1	BIT(1)
>  #define PS_MODE2	BIT(2)
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 8acd871ec2..9e7475dfaa 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -272,6 +272,17 @@ int board_early_init_f(void)
>  
>  #if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
>  	ret = psu_init();
> +
> +	/*
> +	 * PS_SYSMON_ANALOG_BUS register determines mapping between SysMon
> +	 * supply sense channel to SysMon supply registers inside the IP.
> +	 * This register must be programmed to complete SysMon IP
> +	 * configuration. The default register configuration after
> +	 * power-up is incorrect. Hence, fix this by writing the
> +	 * correct value - 0x3210.
> +	 */
> +	writel(ZYNQMP_PS_SYSMON_ANALOG_BUS_VAL,
> +	       ZYNQMP_AMS_PS_SYSMON_ANALOG_BUS);
>  #endif
>  
>  	return ret;
> 


And please rebase this on the top of v2021.07-rc4 tag.

Thanks,
Michal

      reply	other threads:[~2021-06-08  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 17:53 [PATCH] [ZynqMP] Writing correct value to ANALOG_BUS Adrian Fiergolski
2021-06-08  7:17 ` Michal Simek [this message]

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=59e1ee41-a38d-3479-8308-1262a1d505d4@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=adrian.fiergolski@fastree3d.com \
    --cc=u-boot@lists.denx.de \
    /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.