mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Marc Gonzalez <marc.w.gonzalez@free.fr>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Jiucheng Xu <jiucheng.xu@amlogic.com>
Cc: AML <linux-amlogic@lists.infradead.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Chris Healy <healych@amazon.com>, Will Deacon <will@kernel.org>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Pierre-Hugues Husson <phh@phh.me>
Subject: Re: Conflict between video-lut and pmu on meson-g12
Date: Wed, 1 Mar 2023 14:28:40 +0100	[thread overview]
Message-ID: <c3b9c231-10ef-ef69-c702-9e1052b8e704@free.fr> (raw)
In-Reply-To: <CAFBinCBb_5KChqD6wqj_MFxEH_hxL_U3nnA=+1AR8dhdQQVCzw@mail.gmail.com>

On 28/02/2023 22:49, Martin Blumenstingl wrote:

> While thinking more about this - I think the whole .dtsi code should
> be improved. Both of the PMU IO regions are part of the &dmc region.
> So I think &pmu should be moved inside &dmc (with the offsets adjusted
> accordingly of course).
> 
> Also I think the dt-bindings are incomplete: according to the driver
> code we're using XTAL as input clock.
> But this is not described anywhere in the dt-bindings.
> dt-bindings should always describe the hardware. The driver can decide
> not to use it but the bindings must always be complete.
> And with this comes the question: is the DMC PLL specific to the PMU
> or is it shared with something else (e.g. the actual memory
> controller)? On the 32-bit SoCs (Meson8b/S805 for example) there's a
> whole DDR clock controller (used by the DDR memory controller), so I'm
> wondering if these newer SoCs are still following that approach.

FWIW, the vendor device-tree specifies the following nodes:
https://android.googlesource.com/kernel/arm64/+/f5269100977385d1fd4a5ef68e49631892cf4fe4/arch/arm64/boot/dts/amlogic/g12a_s905x2_u215.dts

	canvas {
		compatible = "amlogic, meson, canvas";
		dev_name = "amlogic-canvas";
		status = "okay";
		reg = <0x0 0xff638000 0x0 0x2000>;
		phandle = <0x111>;
	};

	codec_io {
		compatible = "amlogic, codec_io";
		status = "okay";
		#address-cells = <0x2>;
		#size-cells = <0x2>;
		ranges;
		phandle = <0x112>;
		[...]
		io_dmc_base {
			reg = <0x0 0xff638000 0x0 0x2000>;
		};
	};

	ddr_bandwidth {
		compatible = "amlogic, ddr-bandwidth";
		status = "okay";
		reg = <0x0 0xff638000 0x0 0x100 0x0 0xff638c00 0x0 0x100>;
		sec_base = <0xff639000>;
		interrupts = <0x0 0x34 0x1>;
		interrupt-names = "ddr_bandwidth";
	};


I don't understand how it's possible to have 3 overlapping ranges?
Unless the respective drivers know to map only specific ranges?


Regarding your DMC (DDR memory controller) clock question,
clock tree seems to be:
24 MHz XTAL feeds DDR_PLL block,
which outputs DDR_CLK pulse for the DMC.


Something I do not understand is that the datasheet states:
DMC unsecure register. Base address 0xFF638000.
Offset 0 = AM_DDR_PLL_CNTL0
Offset 4 = AM_DDR_PLL_CNTL1
...

And then also states:
The following registers' base address is 0xff638000.
Offset 0 = DMC_REQ_CTRL
Offset 4 = DMC_SOFT_RST
...

And these two register sets have nothing in common
(except the SAME base address...)

https://android.googlesource.com/kernel/arm64/+/f5269100977385d1fd4a5ef68e49631892cf4fe4/include/linux/amlogic/media/registers/regs/dmc_regs.h

Is there perhaps a typo in one of the base addresses?


Regards.

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2023-03-01 13:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 16:48 Marc Gonzalez
2023-02-28 21:04 ` Martin Blumenstingl
2023-02-28 21:49   ` Martin Blumenstingl
2023-03-01  7:36     ` Jiucheng Xu
2023-03-01 13:28     ` Marc Gonzalez [this message]
2023-03-09  9:48       ` Marc Gonzalez
2023-03-09 21:36         ` Martin Blumenstingl
2023-03-23 16:12           ` [PATCH] arm64: dts: meson-g12-common: specify full DMC range Marc Gonzalez
2023-03-23 16:23             ` [PATCH] perf/amlogic: resolve conflict between canvas & pmu Marc Gonzalez
2023-03-25 20:54               ` Martin Blumenstingl
2023-03-27  7:48                 ` Neil Armstrong
2023-03-25 20:43             ` [PATCH] arm64: dts: meson-g12-common: specify full DMC range Martin Blumenstingl

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=c3b9c231-10ef-ef69-c702-9e1052b8e704@free.fr \
    --to=marc.w.gonzalez@free.fr \
    --cc=healych@amazon.com \
    --cc=jbrunet@baylibre.com \
    --cc=jiucheng.xu@amlogic.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=phh@phh.me \
    --cc=will@kernel.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®