devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Lucas Stach <l.stach@pengutronix.de>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	suzuki.poulose@arm.com, coresight@lists.linaro.org,
	imx@lists.linux.dev, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>, Marek Vasut <marex@denx.de>,
	Peng Fan <peng.fan@nxp.com>, Adam Ford <aford173@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>,
	Frank Li <Frank.Li@nxp.com>
Subject: Re: [PATCH 1/1] arm64: dts: imx8mp: remove arm, primecell-periphid at etm nodes
Date: Thu, 6 Jul 2023 12:06:19 +0100	[thread overview]
Message-ID: <49ef52b7-0269-898c-7cc2-096f2f1037fc@arm.com> (raw)
In-Reply-To: <0125c54fd1617f3f945bc3f4bbef5b914b701c24.camel@pengutronix.de>

On 2023-07-06 09:23, Lucas Stach wrote:
> Hi Alexander,
> 
> Am Donnerstag, dem 06.07.2023 um 07:06 +0200 schrieb Alexander Stein:
>> Hi Frank,
>>
>> Am Mittwoch, 5. Juli 2023, 22:59:53 CEST schrieb Frank Li:
>>> The reg size of etm nodes is incorrectly set to 64k instead of 4k. This
>>> leads to a crash when calling amba_read_periphid().  After corrected reg
>>> size, amba_read_periphid() retrieve the correct periphid.
>>> arm,primecell-periphid were removed from the etm nodes.
>>
>> So this means the reference manual is wrong here? It clearly states the size
>> is 64kiB. Reference Manual i.MX8MP Rev 1. 06/2021
>> On a side note: Is imx8mq affected by this as well? The DAP memory table lists
>> similar sizes in the RM .
>>
> Note that the 64K MMIO space per device is really an alignment thing.
> It's a recommendation from ARM to allow individual device MMIO regions
> to be mapped on kernels with 64K page size. Most of the time the real
> MMIO space occupied by the device is actually much smaller than 64K.

Indeed, it's quite common for TRM memory maps to be written in terms of 
the interconnect configuration, i.e. from the point of view of the 
interconnect itself, that whole range of address space is assigned to 
that peripheral, and it may even be true that the entire range is routed 
to the port where that peripheral is connected. However what's of more 
interest for DT is how much of that range the peripheral itself actually 
decodes.

Robin.

> 
> Regards,
> Lucas
> 
>> Best regards,
>> Alexander
>>
>>> Signed-off-by: Frank Li <Frank.Li@nxp.com>
>>> ---
>>>   arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++--------
>>>   1 file changed, 4 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
>>> cc406bb338fe..e0ca82ff6f15 100644
>>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> @@ -306,8 +306,7 @@ soc: soc@0 {
>>>
>>>   		etm0: etm@28440000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28440000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28440000 0x1000>;
>>>   			cpu = <&A53_0>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>> @@ -323,8 +322,7 @@ etm0_out_port: endpoint {
>>>
>>>   		etm1: etm@28540000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28540000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28540000 0x1000>;
>>>   			cpu = <&A53_1>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>> @@ -340,8 +338,7 @@ etm1_out_port: endpoint {
>>>
>>>   		etm2: etm@28640000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28640000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28640000 0x1000>;
>>>   			cpu = <&A53_2>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>> @@ -357,8 +354,7 @@ etm2_out_port: endpoint {
>>>
>>>   		etm3: etm@28740000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28740000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28740000 0x1000>;
>>>   			cpu = <&A53_3>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>
>>
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-07-06 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 20:59 [PATCH 1/1] arm64: dts: imx8mp: remove arm,primecell-periphid at etm nodes Frank Li
2023-07-06  5:06 ` [PATCH 1/1] arm64: dts: imx8mp: remove arm, primecell-periphid " Alexander Stein
2023-07-06  8:23   ` Lucas Stach
2023-07-06 11:06     ` Robin Murphy [this message]
2023-07-06 14:39       ` Frank Li
2023-07-07  5:34         ` Alexander Stein
2023-07-07  8:50           ` Robin Murphy
2023-07-07 12:25             ` Alexander Stein
2023-07-07  8:56           ` Lucas Stach
2023-07-17 14:11 ` [PATCH 1/1] arm64: dts: imx8mp: remove arm,primecell-periphid " Frank Li
2023-07-18  6:43 ` Shawn Guo

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=49ef52b7-0269-898c-7cc2-096f2f1037fc@arm.com \
    --to=robin.murphy@arm.com \
    --cc=Frank.Li@nxp.com \
    --cc=aford173@gmail.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=conor+dt@kernel.org \
    --cc=coresight@lists.linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=l.stach@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=suzuki.poulose@arm.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;
as well as URLs for NNTP newsgroup(s).