From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
devel@driverdev.osuosl.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-sunxi@googlegroups.com, Hans Verkuil <hverkuil@xs4all.nl>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 07/15] arm64: dts: allwinner: h5: Add system-control node with SRAM C1
Date: Fri, 30 Nov 2018 14:26:34 +0100 [thread overview]
Message-ID: <82a1ef7ea170ba50f58f74e26dac6170ac87783f.camel@bootlin.com> (raw)
In-Reply-To: <CAGb2v65yNKnqbeQmUYjMzDtydYL=7kxmtPrAEEU9U=a5XbMiFg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4068 bytes --]
Hi,
On Fri, 2018-11-30 at 11:38 +0800, Chen-Yu Tsai wrote:
> On Fri, Nov 16, 2018 at 12:52 AM Chen-Yu Tsai <wens@csie.org> wrote:
> > On Thu, Nov 15, 2018 at 10:50 PM Paul Kocialkowski
> > <paul.kocialkowski@bootlin.com> wrote:
> > > Add the H5-specific system control node description to its device-tree
> > > with support for the SRAM C1 section, that will be used by the video
> > > codec node later on.
> > >
> > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > > ---
> > > arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 22 ++++++++++++++++++++
> > > 1 file changed, 22 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> > > index b41dc1aab67d..c2d14b22b8c1 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
> > > @@ -94,6 +94,28 @@
> > > };
> > >
> > > soc {
> > > + system-control@1c00000 {
> > > + compatible = "allwinner,sun50i-h5-system-control";
> > > + reg = <0x01c00000 0x1000>;
> > > + #address-cells = <1>;
> > > + #size-cells = <1>;
> > > + ranges;
> > > +
> > > + sram_c1: sram@1d00000 {
> > > + compatible = "mmio-sram";
> > > + reg = <0x01d00000 0x80000>;
> >
> > I'll try to check this one tomorrow.
> >
> > I did find something interesting on the H3: there also seems to be SRAM at
> > 0x01dc0000 to 0x01dcfeff , again mapped by the same bits as SRAM C1.
> >
> > And on the A33, the SRAM C1 range is 0x01d00000 to 0x01d478ff.
> >
> > This was found by mapping the SRAM to the CPU, then using devmem to poke
> > around the register range. If there's SRAM, the first read would typically
> > return random data, and a subsequent write to it would set some value that
> > would be read back correctly. If there's no SRAM, a read either returns 0x0
> > or some random data that can't be overwritten.
> >
> > You might want to check the other SoCs.
>
> This range seems to contain stuff other than SRAM, possibly fixed lookup
> tables. Since this is entirely unknown, lets just stick to the known full
> range instead.
Thanks for investigating all this!
I also conducted some tests and found that the H5 has its SRAM C1
(marked as SRAM C in the manual) at 0x18000. However for the A64, SRAM
C1 gets mapped to 0x1D00000. There is also SRAM C at 0x18000 but this
one seems unrelated to the VPU and only used by DE2 (as already
described in the A64 dt).
I share your conclusion that there seems to be more than SRAM in there.
Testing with devmem write/read on the start address was reliable as a
test, but some chunks in the range did not behave like SRAM (not the
same value read).
I agree that we should keep the known full range as there are lots of
unknowns here.
Cheers,
Paul
> ChenYu
>
> > > + #address-cells = <1>;
> > > + #size-cells = <1>;
> > > + ranges = <0 0x01d00000 0x80000>;
> > > +
> > > + ve_sram: sram-section@0 {
> > > + compatible = "allwinner,sun50i-h5-sram-c1",
> > > + "allwinner,sun4i-a10-sram-c1";
> > > + reg = <0x000000 0x80000>;
> > > + };
> > > + };
> > > + };
> > > +
> > > mali: gpu@1e80000 {
> > > compatible = "allwinner,sun50i-h5-mali", "arm,mali-450";
> > > reg = <0x01e80000 0x30000>;
> > > --
> > > 2.19.1
> > >
--
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-11-30 13:26 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 14:49 [PATCH 00/15] Cedrus support for the Allwinner H5 and A64 platforms Paul Kocialkowski
2018-11-15 14:49 ` [PATCH 01/15] ARM: dts: sun8i-a33: Remove heading 0 in video-codec unit address Paul Kocialkowski
2018-11-15 15:50 ` Chen-Yu Tsai
2018-11-16 9:59 ` Paul Kocialkowski
2018-11-15 14:50 ` [PATCH 02/15] ARM: dts: sun8i-h3: " Paul Kocialkowski
2018-11-15 15:50 ` Chen-Yu Tsai
2018-11-15 14:50 ` [PATCH 03/15] ARM: dts: sun8i-h3: Fix the system-control register range Paul Kocialkowski
2018-11-15 15:51 ` Chen-Yu Tsai
2018-11-15 14:50 ` [PATCH 04/15] soc: sunxi: sram: Enable EMAC clock access for H3 variant Paul Kocialkowski
2018-11-15 15:53 ` Chen-Yu Tsai
2018-11-15 14:50 ` [PATCH 05/15] dt-bindings: sram: sunxi: Add bindings for the H5 with SRAM C1 Paul Kocialkowski
2018-12-04 21:46 ` Rob Herring
2018-11-15 14:50 ` [PATCH 06/15] soc: sunxi: sram: Add support for the H5 SoC system control Paul Kocialkowski
2018-11-15 14:50 ` [PATCH 07/15] arm64: dts: allwinner: h5: Add system-control node with SRAM C1 Paul Kocialkowski
2018-11-15 16:52 ` Chen-Yu Tsai
2018-11-30 3:38 ` Chen-Yu Tsai
2018-11-30 13:26 ` Paul Kocialkowski [this message]
2018-11-15 14:50 ` [PATCH 08/15] ARM/arm64: sunxi: Move H3/H5 syscon label over to soc-specific nodes Paul Kocialkowski
2018-11-16 9:39 ` Maxime Ripard
2018-11-16 9:47 ` Chen-Yu Tsai
2018-11-16 9:56 ` Paul Kocialkowski
2018-11-16 16:39 ` Maxime Ripard
2018-11-15 14:50 ` [PATCH 09/15] dt-bindings: sram: sunxi: Add compatible for the A64 SRAM C1 Paul Kocialkowski
2018-12-04 21:47 ` Rob Herring
2018-11-15 14:50 ` [PATCH 10/15] arm64: dts: allwinner: a64: Add support for the SRAM C1 section Paul Kocialkowski
2018-11-15 16:39 ` Chen-Yu Tsai
2018-11-15 14:50 ` [PATCH 11/15] dt-bindings: media: cedrus: Add compatibles for the A64 and H5 Paul Kocialkowski
2018-12-04 21:47 ` Rob Herring
2018-11-15 14:50 ` [PATCH 12/15] media: cedrus: Add device-tree compatible and variant for H5 support Paul Kocialkowski
2018-11-15 14:50 ` [PATCH 13/15] media: cedrus: Add device-tree compatible and variant for A64 support Paul Kocialkowski
2018-11-15 14:50 ` [PATCH 14/15] arm64: dts: allwinner: h5: Add Video Engine and reserved memory node Paul Kocialkowski
2018-11-15 15:35 ` [linux-sunxi] " Chen-Yu Tsai
2018-11-30 13:16 ` Paul Kocialkowski
2018-11-15 14:50 ` [PATCH 15/15] arm64: dts: allwinner: a64: " Paul Kocialkowski
2018-11-16 9:41 ` Maxime Ripard
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=82a1ef7ea170ba50f58f74e26dac6170ac87783f.camel@bootlin.com \
--to=paul.kocialkowski@bootlin.com \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=wens@csie.org \
/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
all inboxes | Powered by JetHome®