mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz
@ 2014-05-07 20:05 Lucas Stach
  2014-05-07 20:05 ` [PATCH 2/2] ARM: tegra30: ramp vdd_core to 1,2V Lucas Stach
  2014-05-08  7:36 ` [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2014-05-07 20:05 UTC (permalink / raw)
  To: barebox

It's not safe to ramp up the CPU clock speed to
1,4 GHz on all T30 SKUs, as this may result in failure
to start the kernel properly. Start CPU at 600 MHz,
which is safe even for the slowest SKUs.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/mach-tegra/tegra_avp_init.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra_avp_init.c b/arch/arm/mach-tegra/tegra_avp_init.c
index 1afea44..53e81d9 100644
--- a/arch/arm/mach-tegra/tegra_avp_init.c
+++ b/arch/arm/mach-tegra/tegra_avp_init.c
@@ -87,10 +87,10 @@ static struct pll_config pllx_config_table[][4] = {
 		{1000, 26, 0, 12},	/* OSC 26.0 MHz */
 	}, /* TEGRA 20 */
 	{
-		{862, 8,  0, 8},
-		{583, 8,  0, 4},
-		{700, 6,  0, 8},
-		{700, 13, 0, 8},
+		{600,  13, 0, 8 },
+		{500,  16, 0, 8 },
+		{600,  12, 0, 8 },
+		{600,  26, 0, 8 },
 	}, /* TEGRA 30 */
 };
 
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ARM: tegra30: ramp vdd_core to 1,2V
  2014-05-07 20:05 [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz Lucas Stach
@ 2014-05-07 20:05 ` Lucas Stach
  2014-05-08  7:36 ` [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2014-05-07 20:05 UTC (permalink / raw)
  To: barebox

This isn't much different from the default 1,16V
and I haven't seen this make a difference on any
board, but it seems to be required for some T30 SKUs.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/boards/nvidia-beaver/entry.c           |  1 +
 arch/arm/mach-tegra/include/mach/lowlevel-dvc.h | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/arch/arm/boards/nvidia-beaver/entry.c b/arch/arm/boards/nvidia-beaver/entry.c
index 25452a6..576fcb7 100644
--- a/arch/arm/boards/nvidia-beaver/entry.c
+++ b/arch/arm/boards/nvidia-beaver/entry.c
@@ -30,6 +30,7 @@ ENTRY_FUNCTION(start_nvidia_beaver, r0, r1, r2)
 	tegra_cpu_lowlevel_setup();
 
 	tegra_dvc_init();
+	tegra30_tps62366a_ramp_vddcore();
 	tegra30_tps65911_cpu_rail_enable();
 
 	fdt = (uint32_t)__dtb_tegra30_beaver_start - get_runtime_offset();
diff --git a/arch/arm/mach-tegra/include/mach/lowlevel-dvc.h b/arch/arm/mach-tegra/include/mach/lowlevel-dvc.h
index f7f6328..32f10d7 100644
--- a/arch/arm/mach-tegra/include/mach/lowlevel-dvc.h
+++ b/arch/arm/mach-tegra/include/mach/lowlevel-dvc.h
@@ -70,3 +70,21 @@ void tegra30_tps65911_cpu_rail_enable(void)
 	tegra_dvc_write_data(0x0127, TEGRA_I2C_SEND_2_BYTES);
 	tegra_ll_delay_usec(10 * 1000);
 }
+
+static inline __attribute__((always_inline))
+void tegra30_tps62366a_ramp_vddcore(void)
+{
+	tegra_dvc_write_addr(0xc0, 2);
+	/* set VDDcore to 1,2V */
+	tegra_dvc_write_data(0x4601, TEGRA_I2C_SEND_2_BYTES);
+	tegra_ll_delay_usec(1000);
+}
+
+static inline __attribute__((always_inline))
+void tegra30_tps62361b_ramp_vddcore(void)
+{
+	tegra_dvc_write_addr(0xc0, 2);
+	/* set VDDcore to 1,2V */
+	tegra_dvc_write_data(0x4603, TEGRA_I2C_SEND_2_BYTES);
+	tegra_ll_delay_usec(1000);
+}
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz
  2014-05-07 20:05 [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz Lucas Stach
  2014-05-07 20:05 ` [PATCH 2/2] ARM: tegra30: ramp vdd_core to 1,2V Lucas Stach
@ 2014-05-08  7:36 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2014-05-08  7:36 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, May 07, 2014 at 10:05:29PM +0200, Lucas Stach wrote:
> It's not safe to ramp up the CPU clock speed to
> 1,4 GHz on all T30 SKUs, as this may result in failure
> to start the kernel properly. Start CPU at 600 MHz,
> which is safe even for the slowest SKUs.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>

Applied both, thanks

Sascha

> ---
>  arch/arm/mach-tegra/tegra_avp_init.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-tegra/tegra_avp_init.c b/arch/arm/mach-tegra/tegra_avp_init.c
> index 1afea44..53e81d9 100644
> --- a/arch/arm/mach-tegra/tegra_avp_init.c
> +++ b/arch/arm/mach-tegra/tegra_avp_init.c
> @@ -87,10 +87,10 @@ static struct pll_config pllx_config_table[][4] = {
>  		{1000, 26, 0, 12},	/* OSC 26.0 MHz */
>  	}, /* TEGRA 20 */
>  	{
> -		{862, 8,  0, 8},
> -		{583, 8,  0, 4},
> -		{700, 6,  0, 8},
> -		{700, 13, 0, 8},
> +		{600,  13, 0, 8 },
> +		{500,  16, 0, 8 },
> +		{600,  12, 0, 8 },
> +		{600,  26, 0, 8 },
>  	}, /* TEGRA 30 */
>  };
>  
> -- 
> 1.9.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-08  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 20:05 [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz Lucas Stach
2014-05-07 20:05 ` [PATCH 2/2] ARM: tegra30: ramp vdd_core to 1,2V Lucas Stach
2014-05-08  7:36 ` [PATCH 1/2] ARM: tegra30: slow down CPU to 600 MHz Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox