[U-Boot] [PATCH v7] ARM: am335x: Add phyCORE AM335x R2 support

Marek Vasut marex at denx.de
Mon Jun 3 17:08:32 UTC 2019


On 6/3/19 3:31 PM, Parthiban Nallathambi wrote:
> From: Niel Fourie <lusus at 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 at denx.de>
> Signed-off-by: Parthiban Nallathambi <pn at denx.de>
> Reviewed-by: Heiko Schocher <hs at denx.de>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> Tested-by: Marek Vasut <marex at 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


More information about the U-Boot mailing list