From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Joel Stanley <joel@jms.id.au>
Cc: dri-devel@lists.freedesktop.org, linuxppc-dev@ozlabs.org,
airlied@redhat.com, "Y . C . Chen" <yc_chen@aspeedtech.com>,
eich@suse.come
Subject: Re: [PATCH 02/12] drm/ast: Handle configuration without P2A bridge
Date: Fri, 24 Feb 2017 13:32:50 +1100 [thread overview]
Message-ID: <1487903570.23576.252.camel@kernel.crashing.org> (raw)
In-Reply-To: <CACPK8XfqnCm7ufoXQhvpx3tbhcoJtrtEzxJFrhmY-Q4Oif5Q_Q@mail.gmail.com>
On Fri, 2017-02-24 at 12:51 +1030, Joel Stanley wrote:
>
> Are these properties supposed to repeat the prefix "ast,ast"?
>
> We've chosen aspeed as the vendor prefix for Aspeed stuff.
Sent my reply too early ... so yes, I can change that, our FW hasn't
merge the FW side yet. I'll respin now.
> > + if (mcr_scu_strap & 0x2000)
>
> This bit confused me. Bit 13 of the strap (SCU70) is the SPI mode.
The register is actually "MCR170: AST2000 Backward Compatible SCU
Hardware Strapping Value"
> > + ref_pll = 14318;
> > + else
> > + ref_pll = 12000;
> > +
> > + denum = mcr_scu_mpll & 0x1f;
> > + num = (mcr_scu_mpll & 0x3fe0) >> 5;
> > + dsel = (mcr_scu_mpll & 0xc000) >> 14;
>
> These calculations don't make sense for the ast2400 or ast2500.
They do if you look at this:
MCR120: AST2000 Backward Compatible SCU MPLL Parameter
It's not the SCU version of the register it's the MCU "copy" of it
that maintains some kind of legacy layout. Hence "mcr_scu" prefix
not "scu".
> > + switch (dsel) {
> > + case 3:
> > + div = 0x4;
> > + break;
> > + case 2:
> > + case 1:
> > + div = 0x2;
> > + break;
> > + default:
> > + div = 0x1;
> > + break;
> > }
> > + ast->mclk = ref_pll * (num + 2) / (denum + 2) * (div *
> > 1000);
> > return 0;
> > }
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Joel Stanley <joel@jms.id.au>
Cc: linuxppc-dev@ozlabs.org, eich@suse.come,
dri-devel@lists.freedesktop.org, airlied@redhat.com
Subject: Re: [PATCH 02/12] drm/ast: Handle configuration without P2A bridge
Date: Fri, 24 Feb 2017 13:32:50 +1100 [thread overview]
Message-ID: <1487903570.23576.252.camel@kernel.crashing.org> (raw)
In-Reply-To: <CACPK8XfqnCm7ufoXQhvpx3tbhcoJtrtEzxJFrhmY-Q4Oif5Q_Q@mail.gmail.com>
On Fri, 2017-02-24 at 12:51 +1030, Joel Stanley wrote:
>
> Are these properties supposed to repeat the prefix "ast,ast"?
>
> We've chosen aspeed as the vendor prefix for Aspeed stuff.
Sent my reply too early ... so yes, I can change that, our FW hasn't
merge the FW side yet. I'll respin now.
> > + if (mcr_scu_strap & 0x2000)
>
> This bit confused me. Bit 13 of the strap (SCU70) is the SPI mode.
The register is actually "MCR170: AST2000 Backward Compatible SCU
Hardware Strapping Value"
> > + ref_pll = 14318;
> > + else
> > + ref_pll = 12000;
> > +
> > + denum = mcr_scu_mpll & 0x1f;
> > + num = (mcr_scu_mpll & 0x3fe0) >> 5;
> > + dsel = (mcr_scu_mpll & 0xc000) >> 14;
>
> These calculations don't make sense for the ast2400 or ast2500.
They do if you look at this:
MCR120: AST2000 Backward Compatible SCU MPLL Parameter
It's not the SCU version of the register it's the MCU "copy" of it
that maintains some kind of legacy layout. Hence "mcr_scu" prefix
not "scu".
> > + switch (dsel) {
> > + case 3:
> > + div = 0x4;
> > + break;
> > + case 2:
> > + case 1:
> > + div = 0x2;
> > + break;
> > + default:
> > + div = 0x1;
> > + break;
> > }
> > + ast->mclk = ref_pll * (num + 2) / (denum + 2) * (div *
> > 1000);
> > return 0;
> > }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-02-24 2:33 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 22:53 [PATCH 01/12] drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-23 22:53 ` [PATCH 02/12] drm/ast: Handle configuration without P2A bridge Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:26 ` Benjamin Herrenschmidt
2017-02-24 2:26 ` Benjamin Herrenschmidt
2017-02-24 2:32 ` Benjamin Herrenschmidt [this message]
2017-02-24 2:32 ` Benjamin Herrenschmidt
2017-02-24 2:41 ` [PATCH v5 2/12] " Benjamin Herrenschmidt
2017-02-24 2:41 ` Benjamin Herrenschmidt
2017-02-24 2:43 ` Joel Stanley
2017-02-24 2:43 ` Joel Stanley
2017-02-24 7:06 ` [PATCH 02/12] " YC Chen
2017-02-24 7:06 ` YC Chen
2017-02-23 22:53 ` [PATCH 03/12] drm/ast: const'ify mode setting tables Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:21 ` Joel Stanley
2017-02-23 22:53 ` [PATCH 04/12] drm/ast: Remove spurrious include Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:24 ` Joel Stanley
2017-02-24 2:24 ` Joel Stanley
2017-02-23 22:53 ` [PATCH 05/12] drm/ast: Fix calculation of MCLK Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:24 ` Joel Stanley
2017-02-24 2:24 ` Joel Stanley
2017-02-24 2:38 ` Benjamin Herrenschmidt
2017-02-24 2:38 ` Benjamin Herrenschmidt
2017-02-24 3:12 ` Joel Stanley
2017-02-24 3:12 ` Joel Stanley
2017-02-24 7:06 ` YC Chen
2017-02-24 7:06 ` YC Chen
2017-02-23 22:53 ` [PATCH 06/12] drm/ast: Base support for AST2500 Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:22 ` Joel Stanley
2017-02-24 2:22 ` Joel Stanley
2017-02-23 22:53 ` [PATCH 07/12] drm/ast: Fixed vram size incorrect issue on POWER Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:24 ` Joel Stanley
2017-02-24 2:24 ` Joel Stanley
2017-02-24 7:07 ` YC Chen
2017-02-24 7:07 ` YC Chen
2017-02-23 22:53 ` [PATCH 08/12] drm/ast: Factor mmc_test code in POST code Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:21 ` Joel Stanley
2017-02-24 7:07 ` YC Chen
2017-02-24 7:07 ` YC Chen
2017-02-23 22:53 ` [PATCH 09/12] drm/ast: Rename ast_init_dram_2300 to ast_post_chip_2300 Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:21 ` Joel Stanley
2017-02-24 7:08 ` YC Chen
2017-02-24 7:08 ` YC Chen
2017-02-23 22:53 ` [PATCH 10/12] drm/ast: POST code for the new AST2500 Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:21 ` Joel Stanley
2017-02-23 22:53 ` [PATCH 11/12] drm/ast: Fix test for VGA enabled Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-23 23:24 ` Benjamin Herrenschmidt
2017-02-23 23:24 ` Benjamin Herrenschmidt
2017-02-24 7:09 ` YC Chen
2017-02-24 7:09 ` YC Chen
2017-02-23 22:53 ` [PATCH 12/12] drm/ast: Call open_key before enable_mmio in POST code Benjamin Herrenschmidt
2017-02-23 22:53 ` Benjamin Herrenschmidt
2017-02-24 2:21 ` Joel Stanley
2017-02-24 2:21 ` Joel Stanley
2017-02-24 7:09 ` YC Chen
2017-02-24 7:09 ` YC Chen
2017-02-23 23:07 ` [PATCH 01/12] drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS Benjamin Herrenschmidt
2017-02-23 23:07 ` Benjamin Herrenschmidt
2017-02-24 2:23 ` Joel Stanley
2017-02-24 2:23 ` Joel Stanley
2017-02-24 7:04 ` YC Chen
2017-02-24 7:04 ` YC Chen
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=1487903570.23576.252.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eich@suse.come \
--cc=joel@jms.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=yc_chen@aspeedtech.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 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.