mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Weitzel <J.Weitzel@phytec.de>
To: vj <vicencb@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 14/14] Add support for Archos G9 tablet
Date: Mon, 22 Oct 2012 08:50:58 +0200	[thread overview]
Message-ID: <1350888658.3205.1.camel@lws-weitzel> (raw)
In-Reply-To: <CAAMcf8AymQQ6oXJJfFgAkm4oKkMyZfuczq+7y7MrPA5gOUYjbg@mail.gmail.com>

Am Sonntag, den 21.10.2012, 03:00 +0200 schrieb vj:
> On Fri, Oct 19, 2012 at 1:10 PM, Jan Weitzel <J.Weitzel@phytec.de> wrote:
> >> diff --git a/arch/arm/boards/archosg9/lowlevel.c b/arch/arm/boards/archosg9/lowlevel.c
> >> new file mode 100644
> >> index 0000000..fa5be1d
> >> --- /dev/null
> >> +++ b/arch/arm/boards/archosg9/lowlevel.c
> >> @@ -0,0 +1,79 @@
> >> +/*
> >> + * This program is free software; you can redistribute it and/or
> >> + * modify it under the terms of the GNU General Public License as
> >> + * published by the Free Software Foundation; either version 2 of
> >> + * the License, or (at your option) any later version.
> >> + *
> >> + * This program is distributed in the hope that it will be useful,
> >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> >> + * GNU General Public License for more details.
> >> + */
> >> +
> >> +#include <common.h>
> >> +#include <io.h>
> >> +#include <init.h>
> >> +#include <mach/omap4-mux.h>
> >> +#include <mach/omap4-silicon.h>
> >> +#include <mach/omap4-clock.h>
> >> +#include <mach/syslib.h>
> >> +#include <asm/barebox-arm.h>
> >> +#include <asm/barebox-arm-head.h>
> >> +#include "mux.h"
> >> +
> >> +#define TPS62361_VSEL0_GPIO    7
> >> +
> >> +static const struct ddr_regs ddr_regs_400_mhz_2cs = {
> >> +     .tim1         = 0x10EB0662,
> >> +     .tim2         = 0x20370DD2,
> >> +     .tim3         = 0x00B1C33F,
> >> +     .phy_ctrl_1   = 0x849FF408,
> >> +     .ref_ctrl     = 0x00000618,
> >> +     .config_init  = 0x80000EB9,
> >> +     .config_final = 0x80001AB9,
> >> +     .zq_config    = 0xD00B3215,
> >> +     .mr1          = 0x83,
> >> +     .mr2          = 0x4
> >> +};
> >> +
> >> +static noinline void archosg9_init_lowlevel(void)
> >> +{
> >> +     struct dpll_param core = OMAP4_CORE_DPLL_PARAM_19M2_DDR400;
> >> +     struct dpll_param mpu = OMAP4_MPU_DPLL_PARAM_19M2_MPU600;
> > This if OPP100 for 4430, for 4460 OPP100 defines 700MHz.
> >> +     struct dpll_param iva = OMAP4_IVA_DPLL_PARAM_19M2;
> >> +     struct dpll_param per = OMAP4_PER_DPLL_PARAM_19M2;
> >> +     struct dpll_param abe = OMAP4_ABE_DPLL_PARAM_19M2;
> >> +     struct dpll_param usb = OMAP4_USB_DPLL_PARAM_19M2;
> >> +
> >> +     writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
> >> +
> >> +     /* Configure all DPLL's at 100% OPP */
> >> +     omap4_configure_mpu_dpll(&mpu);
> >> +     omap4_configure_iva_dpll(&iva);
> >> +     omap4_configure_per_dpll(&per);
> >> +     omap4_configure_abe_dpll(&abe);
> >> +     omap4_configure_usb_dpll(&usb);
> >> +
> >> +     /* Enable all clocks */
> >> +     omap4_enable_all_clocks();
> >> +
> >> +     set_muxconf_regs();
> >> +
> >> +     omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
> >> +
> >> +     /* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
> >> +     omap4_scale_vcores(TPS62361_VSEL0_GPIO);
> > According to TIs DM the sequence for going into a higher OPP is to first
> > raise the voltage. I saw this is also wrong on pandaboard.
> > They also say rise core freq before mpu freq so the order should be
> > omap4_scale_vcores
> > omap4_ddr_init
> > omap4_configure_mpu_dpll
> >
> > I'll fix and test the order on PCM049
> >
> > Jan
> 
> The only way I could make it work on archosG9 is with this order:
>   set_muxconf_regs();
>   writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
>   omap4_enable_all_clocks();
>   omap4_scale_vcores(TPS62361_VSEL0_GPIO);
>   omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
>   omap4_configure_mpu_dpll(&mpu);
>   ...
I think you need al least omap4_enable_gpio1_wup_clocks for using TPS62361_VSEL0_GPIO.

Jan
> Is this correct? That is, enable_all_clocks can be done before scale_vcores?
> It will depend on the default clock frequencies, I think.
> 
> Vicente



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

  reply	other threads:[~2012-10-22  6:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 22:55 [PATCH 00/14] archosg9: add support for tablet Vicente
2012-10-08 22:55 ` [PATCH 01/14] twl6030: add debug info Vicente
2012-10-08 22:55 ` [PATCH 02/14] omap4: add rename definitions to match datasheet Vicente
2012-10-08 22:55 ` [PATCH 03/14] ARM: import irq handling from linux Vicente
2012-10-08 22:55 ` [PATCH 04/14] ARM: ensure irqs are disabled Vicente
2012-10-08 22:55 ` [PATCH 05/14] omap: revert gpiolib Vicente
2012-10-08 22:55 ` [PATCH 06/14] omap4: add usb boot source Vicente
2012-10-08 22:55 ` [PATCH 07/14] bootm: close open files Vicente
2012-10-08 22:55 ` [PATCH 08/14] uimage: improve transfer speed Vicente
2012-10-08 22:55 ` [PATCH 09/14] fs: improve robustness Vicente
2012-10-08 22:55 ` [PATCH 10/14] omap4: add support for booting cpu from usb Vicente
2012-10-08 22:55 ` [PATCH 11/14] omap4: add serial communications over usb boot Vicente
2012-10-08 22:55 ` [PATCH 12/14] omap4: add filesystem support " Vicente
2012-10-08 22:55 ` [PATCH 13/14] omap4: add support for loading second stage from usb Vicente
2012-10-08 22:55 ` [PATCH 14/14] Add support for Archos G9 tablet Vicente
2012-10-19 11:10   ` Jan Weitzel
2012-10-21  1:00     ` vj
2012-10-22  6:50       ` Jan Weitzel [this message]
2012-10-10  7:40 ` [PATCH 00/14] archosg9: add support for tablet Sascha Hauer
     [not found]   ` <CAAMcf8D0Xn6aWztkD=8dnv3P1qxNgxSV-2Q37kGOaRsOQE7xVA@mail.gmail.com>
2012-10-10  9:32     ` Sascha Hauer
2012-10-12  1:12       ` vj
     [not found]       ` <CAAMcf8CLimKWZddBfctSCct0wOJOk7tgTJpM7m_w8h5dOQRt1Q@mail.gmail.com>
2012-10-12  8:39         ` Sascha Hauer

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=1350888658.3205.1.camel@lws-weitzel \
    --to=j.weitzel@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=vicencb@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox