All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7] ARM: am335x: Add phyCORE AM335x R2 support
Date: Mon, 3 Jun 2019 19:08:32 +0200	[thread overview]
Message-ID: <c365eabc-884e-c627-358b-048b3df2e3d4@denx.de> (raw)
In-Reply-To: <20190603133117.525038-1-pn@denx.de>

On 6/3/19 3:31 PM, Parthiban Nallathambi wrote:
> From: Niel Fourie <lusus@denx.de>
> 
> Support for Phytech phyCORE AM335x R2 SOM (PCL060) on the Phytec
> phyBOARD-Wega AM335x.
> 
> CPU  : AM335X-GP rev 2.1
> Model: Phytec AM335x phyBOARD-WEGA
> DRAM:  256 MiB
> NAND:  256 MiB
> MMC:   OMAP SD/MMC: 0
> eth0: ethernet at 4a100000
> 
> Working:
>  - Eth0
>  - i2C
>  - MMC/SD
>  - NAND
>  - UART
>  - USB (host)
> 
> Device trees were taken from Linux mainline:
> commit 37624b58542f ("Linux 5.1-rc7")
> 
> Signed-off-by: Niel Fourie <lusus@denx.de>
> Signed-off-by: Parthiban Nallathambi <pn@denx.de>
> Reviewed-by: Heiko Schocher <hs@denx.de>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Tested-by: Marek Vasut <marex@denx.de>

[...]

> +static void scale_vcores_generic(int freq)
> +{
> +	int sil_rev, mpu_vdd;
> +
> +	/*
> +	 * We use a TPS65910 PMIC. For all  MPU frequencies we support we use a
> +	 * CORE voltage of 1.10V. For MPU voltage we need to switch based on
> +	 * the frequency we are running at.
> +	 */
> +	if (power_tps65910_init(0))
> +		return;

Did you verify that this does not silently fail ?

> +	/*
> +	 * Depending on MPU clock and PG we will need a different
> +	 * VDD to drive at that speed.
> +	 */
> +	sil_rev = readl(&cdev->deviceid) >> 28;
> +	mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev, freq);
> +
> +	/* Tell the TPS65910 to use i2c */
> +	tps65910_set_i2c_control();
> +
> +	/* First update MPU voltage. */
> +	if (tps65910_voltage_update(MPU, mpu_vdd))
> +		return;

And the other ones here too ? Because if they do, the CPU will suffer
undervolt and will be unstable, at least the models faster than 600 MHz.

> +	/* Second, update the CORE voltage. */
> +	if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0))
> +		return;
> +}

[...]


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-06-03 17:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 13:31 [U-Boot] [PATCH v7] ARM: am335x: Add phyCORE AM335x R2 support Parthiban Nallathambi
2019-06-03 17:08 ` Marek Vasut [this message]
2019-07-14 13:08 ` Tom Rini

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=c365eabc-884e-c627-358b-048b3df2e3d4@denx.de \
    --to=marex@denx.de \
    --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.