devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] coresight: adding basic support for Spreadtrum SC9836
@ 2015-03-24  5:48 Chunyan Zhang
       [not found] ` <1427176113-23411-1-git-send-email-zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Chunyan Zhang @ 2015-03-24  5:48 UTC (permalink / raw)
  To: arm, arnd
  Cc: mathieu.poirier, will.deacon, mark.rutland, robh+dt, pawel.moll,
	ijc+devicetree, galak, catalin.marinas, kaixu.xia, zhizhou.zhang,
	orsonzhai, zhang.lyra, devicetree, linux-arm-kernel, linux-kernel

Support only for ETB, FUNNEL, STM are included currently.
Support for ETM, TPIU and the replicator linked to it are not included in
this version patch.

Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
 arch/arm64/boot/dts/sprd/sc9836.dtsi | 57 ++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/sprd/sc9836.dtsi b/arch/arm64/boot/dts/sprd/sc9836.dtsi
index f92f1b4..2ca80f3 100644
--- a/arch/arm64/boot/dts/sprd/sc9836.dtsi
+++ b/arch/arm64/boot/dts/sprd/sc9836.dtsi
@@ -45,6 +45,63 @@
 		};
 	};
 
+	etb@10003000 {
+		compatible = "arm,coresight-etb10", "arm,primecell";
+		reg = <0 0x10003000 0 0x1000>;
+		arm,primecell-periphid = <0x0003b907>;
+		coresight-default-sink;
+		clocks = <&clk26mhz>;
+		clock-names = "apb_pclk";
+		port {
+			etb_in: endpoint {
+				slave-mode;
+				remote-endpoint = <&funnel_out_port0>;
+			};
+		};
+	};
+
+	funnel@10001000 {
+		compatible = "arm,coresight-funnel", "arm,primecell";
+		reg = <0 0x10001000 0 0x1000>;
+		clocks = <&clk26mhz>;
+		clock-names = "apb_pclk";
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			/* funnel output port */
+			port@0 {
+				reg = <0>;
+				funnel_out_port0: endpoint {
+					remote-endpoint = <&etb_in>;
+				};
+			};
+
+			/* funnel input port 0~3 is reserved for ETMs */
+			port@1 {
+				reg = <4>;
+				funnel_in_port4: endpoint {
+					slave-mode;
+					remote-endpoint = <&stm_out>;
+				};
+			};
+		};
+	};
+
+	stm@10006000 {
+		compatible = "arm,coresight-stm", "arm,primecell";
+		reg = <0 0x10006000 0 0x1000>,
+		      <0 0x01000000 0 0x180000>;
+		reg-names = "stm-base", "stm-stimulus-base";
+		clocks = <&clk26mhz>;
+		clock-names = "apb_pclk";
+		port {
+			stm_out: endpoint {
+				remote-endpoint = <&funnel_in_port4>;
+			};
+		};
+	};
+
 	gic: interrupt-controller@12001000 {
 		compatible = "arm,gic-400";
 		reg = <0 0x12001000 0 0x1000>,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] coresight: adding basic support for Spreadtrum SC9836
       [not found] ` <1427176113-23411-1-git-send-email-zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2015-03-24 15:08   ` Mathieu Poirier
       [not found]     ` <CANLsYkw+dzHU5QtqM-Pw8s-C-K4aqd0ATKd_SidwVf6uqyd9cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Poirier @ 2015-03-24 15:08 UTC (permalink / raw)
  To: Chunyan Zhang
  Cc: arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Arnd Bergmann,
	Will Deacon, Mark Rutland, Rob Herring, Paweł Moll,
	Ian Campbell, Kumar Gala, Catalin Marinas, Kaixu Xia, Zhizhou,
	orsonzhai-Re5JQEeQqe8AvxtiuMwx3w,
	zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 23 March 2015 at 23:48, Chunyan Zhang <zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> Support only for ETB, FUNNEL, STM are included currently.
> Support for ETM, TPIU and the replicator linked to it are not included in
> this version patch.
>
> Signed-off-by: Chunyan Zhang <zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  arch/arm64/boot/dts/sprd/sc9836.dtsi | 57 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 57 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/sprd/sc9836.dtsi b/arch/arm64/boot/dts/sprd/sc9836.dtsi
> index f92f1b4..2ca80f3 100644
> --- a/arch/arm64/boot/dts/sprd/sc9836.dtsi
> +++ b/arch/arm64/boot/dts/sprd/sc9836.dtsi
> @@ -45,6 +45,63 @@
>                 };
>         };
>
> +       etb@10003000 {
> +               compatible = "arm,coresight-etb10", "arm,primecell";
> +               reg = <0 0x10003000 0 0x1000>;
> +               arm,primecell-periphid = <0x0003b907>;

Specifying the primecell id in the device tree like this is usually to
avoid probing of the memory space by the AMBA mechanic when bus
components are discovered.  As such components are probed and
initialised when their drivers are registered with the diver core
later in the boot process.

Is there a good reason why this is done here?  Especially when the
funnel and STM don't specify their cell IDs in the DT.

> +               coresight-default-sink;

Please remove the above - this feature no longer exists.

> +               clocks = <&clk26mhz>;
> +               clock-names = "apb_pclk";
> +               port {
> +                       etb_in: endpoint {
> +                               slave-mode;
> +                               remote-endpoint = <&funnel_out_port0>;
> +                       };
> +               };
> +       };
> +
> +       funnel@10001000 {
> +               compatible = "arm,coresight-funnel", "arm,primecell";
> +               reg = <0 0x10001000 0 0x1000>;
> +               clocks = <&clk26mhz>;
> +               clock-names = "apb_pclk";
> +               ports {
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       /* funnel output port */
> +                       port@0 {
> +                               reg = <0>;
> +                               funnel_out_port0: endpoint {
> +                                       remote-endpoint = <&etb_in>;
> +                               };
> +                       };
> +
> +                       /* funnel input port 0~3 is reserved for ETMs */
> +                       port@1 {
> +                               reg = <4>;
> +                               funnel_in_port4: endpoint {
> +                                       slave-mode;
> +                                       remote-endpoint = <&stm_out>;
> +                               };
> +                       };
> +               };
> +       };
> +
> +       stm@10006000 {
> +               compatible = "arm,coresight-stm", "arm,primecell";
> +               reg = <0 0x10006000 0 0x1000>,
> +                     <0 0x01000000 0 0x180000>;
> +               reg-names = "stm-base", "stm-stimulus-base";
> +               clocks = <&clk26mhz>;
> +               clock-names = "apb_pclk";
> +               port {
> +                       stm_out: endpoint {
> +                               remote-endpoint = <&funnel_in_port4>;
> +                       };
> +               };
> +       };
> +
>         gic: interrupt-controller@12001000 {
>                 compatible = "arm,gic-400";
>                 reg = <0 0x12001000 0 0x1000>,
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] coresight: adding basic support for Spreadtrum SC9836
       [not found]     ` <CANLsYkw+dzHU5QtqM-Pw8s-C-K4aqd0ATKd_SidwVf6uqyd9cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-03-25 12:19       ` Chunyan Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Chunyan Zhang @ 2015-03-25 12:19 UTC (permalink / raw)
  To: Mathieu Poirier
  Cc: arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Arnd Bergmann,
	Will Deacon, Mark Rutland, Rob Herring, Paweł Moll,
	Ian Campbell, Kumar Gala, Catalin Marinas, Kaixu Xia, Zhizhou,
	Orson Zhai, Lyra Zhang,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Tue, Mar 24, 2015 at 11:08 PM, Mathieu Poirier
<mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> On 23 March 2015 at 23:48, Chunyan Zhang <zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>> Support only for ETB, FUNNEL, STM are included currently.
>> Support for ETM, TPIU and the replicator linked to it are not included in
>> this version patch.
>>
>> Signed-off-by: Chunyan Zhang <zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> ---
>>  arch/arm64/boot/dts/sprd/sc9836.dtsi | 57 ++++++++++++++++++++++++++++++++++++
>>  1 file changed, 57 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/sprd/sc9836.dtsi b/arch/arm64/boot/dts/sprd/sc9836.dtsi
>> index f92f1b4..2ca80f3 100644
>> --- a/arch/arm64/boot/dts/sprd/sc9836.dtsi
>> +++ b/arch/arm64/boot/dts/sprd/sc9836.dtsi
>> @@ -45,6 +45,63 @@
>>                 };
>>         };
>>
>> +       etb@10003000 {
>> +               compatible = "arm,coresight-etb10", "arm,primecell";
>> +               reg = <0 0x10003000 0 0x1000>;
>> +               arm,primecell-periphid = <0x0003b907>;
>
> Specifying the primecell id in the device tree like this is usually to
> avoid probing of the memory space by the AMBA mechanic when bus
> components are discovered.  As such components are probed and
> initialised when their drivers are registered with the diver core
> later in the boot process.
>
> Is there a good reason why this is done here?  Especially when the
> funnel and STM don't specify their cell IDs in the DT.

Actually today I found that is not a ETB but TMC, so if I didn't set
peripheral id for it in DT, it can't be initialized as ETB.

I will correct it to be a TMC in upcoming version patch.

>
>> +               coresight-default-sink;
>
> Please remove the above - this feature no longer exists.

ok, I will remove it in next version.

>
>> +               clocks = <&clk26mhz>;
>> +               clock-names = "apb_pclk";
>> +               port {
>> +                       etb_in: endpoint {
>> +                               slave-mode;
>> +                               remote-endpoint = <&funnel_out_port0>;
>> +                       };
>> +               };
>> +       };
>> +
>> +       funnel@10001000 {
>> +               compatible = "arm,coresight-funnel", "arm,primecell";
>> +               reg = <0 0x10001000 0 0x1000>;
>> +               clocks = <&clk26mhz>;
>> +               clock-names = "apb_pclk";
>> +               ports {
>> +                       #address-cells = <1>;
>> +                       #size-cells = <0>;
>> +
>> +                       /* funnel output port */
>> +                       port@0 {
>> +                               reg = <0>;
>> +                               funnel_out_port0: endpoint {
>> +                                       remote-endpoint = <&etb_in>;
>> +                               };
>> +                       };
>> +
>> +                       /* funnel input port 0~3 is reserved for ETMs */
>> +                       port@1 {
>> +                               reg = <4>;
>> +                               funnel_in_port4: endpoint {
>> +                                       slave-mode;
>> +                                       remote-endpoint = <&stm_out>;
>> +                               };
>> +                       };
>> +               };
>> +       };
>> +
>> +       stm@10006000 {
>> +               compatible = "arm,coresight-stm", "arm,primecell";
>> +               reg = <0 0x10006000 0 0x1000>,
>> +                     <0 0x01000000 0 0x180000>;
>> +               reg-names = "stm-base", "stm-stimulus-base";
>> +               clocks = <&clk26mhz>;
>> +               clock-names = "apb_pclk";
>> +               port {
>> +                       stm_out: endpoint {
>> +                               remote-endpoint = <&funnel_in_port4>;
>> +                       };
>> +               };
>> +       };
>> +
>>         gic: interrupt-controller@12001000 {
>>                 compatible = "arm,gic-400";
>>                 reg = <0 0x12001000 0 0x1000>,
>> --
>> 1.9.1
>>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] coresight: adding basic support for Spreadtrum SC9836
@ 2015-03-25 12:26 Chunyan Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Chunyan Zhang @ 2015-03-25 12:26 UTC (permalink / raw)
  To: arm, arnd
  Cc: mathieu.poirier, will.deacon, mark.rutland, robh+dt, pawel.moll,
	ijc+devicetree, galak, catalin.marinas, kaixu.xia, zhizhou.zhang,
	orsonzhai, zhang.lyra, devicetree, linux-arm-kernel, linux-kernel

Support only for ETF, FUNNEL, STM are included currently.
Support for ETM, TPIU and the replicator linked to it are not included in
this version patch.

Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
 arch/arm64/boot/dts/sprd/sc9836.dtsi | 55 ++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/sprd/sc9836.dtsi b/arch/arm64/boot/dts/sprd/sc9836.dtsi
index f92f1b4..ee34e1a 100644
--- a/arch/arm64/boot/dts/sprd/sc9836.dtsi
+++ b/arch/arm64/boot/dts/sprd/sc9836.dtsi
@@ -45,6 +45,61 @@
 		};
 	};
 
+	etf@10003000 {
+		compatible = "arm,coresight-tmc", "arm,primecell";
+		reg = <0 0x10003000 0 0x1000>;
+		clocks = <&clk26mhz>;
+		clock-names = "apb_pclk";
+		port {
+			etf_in: endpoint {
+				slave-mode;
+				remote-endpoint = <&funnel_out_port0>;
+			};
+		};
+	};
+
+	funnel@10001000 {
+		compatible = "arm,coresight-funnel", "arm,primecell";
+		reg = <0 0x10001000 0 0x1000>;
+		clocks = <&clk26mhz>;
+		clock-names = "apb_pclk";
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			/* funnel output port */
+			port@0 {
+				reg = <0>;
+				funnel_out_port0: endpoint {
+					remote-endpoint = <&etf_in>;
+				};
+			};
+
+			/* funnel input port 0~3 is reserved for ETMs */
+			port@1 {
+				reg = <4>;
+				funnel_in_port4: endpoint {
+					slave-mode;
+					remote-endpoint = <&stm_out>;
+				};
+			};
+		};
+	};
+
+	stm@10006000 {
+		compatible = "arm,coresight-stm", "arm,primecell";
+		reg = <0 0x10006000 0 0x1000>,
+		      <0 0x01000000 0 0x180000>;
+		reg-names = "stm-base", "stm-stimulus-base";
+		clocks = <&clk26mhz>;
+		clock-names = "apb_pclk";
+		port {
+			stm_out: endpoint {
+				remote-endpoint = <&funnel_in_port4>;
+			};
+		};
+	};
+
 	gic: interrupt-controller@12001000 {
 		compatible = "arm,gic-400";
 		reg = <0 0x12001000 0 0x1000>,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-25 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 12:26 [PATCH] coresight: adding basic support for Spreadtrum SC9836 Chunyan Zhang
  -- strict thread matches above, loose matches on Subject: below --
2015-03-24  5:48 Chunyan Zhang
     [not found] ` <1427176113-23411-1-git-send-email-zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-03-24 15:08   ` Mathieu Poirier
     [not found]     ` <CANLsYkw+dzHU5QtqM-Pw8s-C-K4aqd0ATKd_SidwVf6uqyd9cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-25 12:19       ` Chunyan Zhang

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).