2023-12-10 07:27:17

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v4 0/4] arm64: dts: qcom: Fix the warnings from coresight bindings

Fix all warnings in Qualcomm boards coming from Coresight bindings.

There are warnings below after running dtbs_check. The patches are
to fix them for Qcom boards.

funnel@3023000: 'in-ports' is a required property

etm@7c40000: 'out-ports' is a required property

etf@6047000: in-ports: '#address-cells', '#size-cells', 'port@1'
do not match any of the regexes: 'pinctrl-[0-9]+'

replicator@604a000: in-ports: '#address-cells', '#size-cells',
'port@1' do not match any of the regexes: 'pinctrl-[0-9]+'

funnel@6c2d000: out-ports: '#address-cells', '#size-cells' do not
match any of the regexes: 'pinctrl-[0-9]+'

Warning (graph_child_address): /soc@0/tpda@6004000/out-ports:
graph node has single child node 'port@0', #address-cells/#size-cells
are not necessary

Warning (graph_child_address): /soc@0/funnel@6005000/in-ports: graph
node has single child node 'port@0', #address-cells/#size-cells are
not necessary

Warning (graph_child_address): /soc@0/etf@6b05000/in-ports: graph node
has single child node 'port@0', #address-cells/#size-cells are not
necessary

Warning (graph_child_address): /soc@0/funnel@7810000/in-ports: graph
node has single child node 'port@0', #address-cells/#size-cells are
not necessary

Changes since V3:
1. Modify the indentation of dt binding smaple.

Changes since V2:
1. Remove qcom,inst-id for remote etm.
2. Modify the node name of remote etm dt node.
3. Add space between 'endpoint' and the opening brace.

Changes since V1:
1. Add new dt binding for remote etm.
2. Add new dt node modem-etm in msm8996.dtsi

Mao Jinlong (4):
dt-bindings: arm: Add remote etm dt-binding
arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property
arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property
arm64: dts: qcom: Fix coresight warnings in in-ports and out-ports

.../arm/qcom,coresight-remote-etm.yaml | 51 +++++++++++++++++++
arch/arm64/boot/dts/qcom/msm8996.dtsi | 21 ++++++++
arch/arm64/boot/dts/qcom/msm8998.dtsi | 32 +++++++-----
arch/arm64/boot/dts/qcom/sdm845.dtsi | 5 +-
arch/arm64/boot/dts/qcom/sm8150.dtsi | 5 +-
arch/arm64/boot/dts/qcom/sm8250.dtsi | 24 ++-------
6 files changed, 98 insertions(+), 40 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml

--
2.41.0


2023-12-10 07:27:19

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v4 1/4] dt-bindings: arm: Add remote etm dt-binding

Remote ETM(Embedded Trace Macrocell) is to capture information of
the executed processor instructions of remote processors like modem.
Add new coresight-remote-etm.yaml file describing the bindings
required to define coresight remote etm in the device trees.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Mao Jinlong <[email protected]>
---
.../arm/qcom,coresight-remote-etm.yaml | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml

diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml
new file mode 100644
index 000000000000..4fd5752978cd
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-remote-etm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Coresight Remote ETM(Embedded Trace Macrocell)
+
+maintainers:
+ - Jinlong Mao <[email protected]>
+ - Tao Zhang <[email protected]>
+
+description:
+ Support for ETM trace collection on remote processor using coresight
+ framework. Enabling this will allow turning on ETM tracing on remote
+ processor like modem processor via sysfs and collecting the trace
+ via coresight TMC sinks.
+
+properties:
+ compatible:
+ const: qcom,coresight-remote-etm
+
+ out-ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ additionalProperties: false
+
+ properties:
+ port:
+ description: Output connection to the CoreSight Trace bus.
+ $ref: /schemas/graph.yaml#/properties/port
+
+required:
+ - compatible
+ - out-ports
+
+additionalProperties: false
+
+examples:
+ - |
+ etm {
+ compatible = "qcom,coresight-remote-etm";
+
+ out-ports {
+ port {
+ modem_etm0_out_funnel_modem: endpoint {
+ remote-endpoint = <&funnel_modem_in_modem_etm0>;
+ };
+ };
+ };
+ };
+...
--
2.41.0

2023-12-10 07:27:32

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v4 3/4] arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property

out-ports is a required property for coresight ETM. Add out-ports for
ETM nodes to fix the warning.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Mao Jinlong <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8998.dtsi | 32 +++++++++++++++++----------
1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index b485bf925ce6..ebc5ba1b369e 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2031,9 +2031,11 @@ etm5: etm@7c40000 {

cpu = <&CPU4>;

- port {
- etm4_out: endpoint {
- remote-endpoint = <&apss_funnel_in4>;
+ out-ports {
+ port {
+ etm4_out: endpoint {
+ remote-endpoint = <&apss_funnel_in4>;
+ };
};
};
};
@@ -2048,9 +2050,11 @@ etm6: etm@7d40000 {

cpu = <&CPU5>;

- port {
- etm5_out: endpoint {
- remote-endpoint = <&apss_funnel_in5>;
+ out-ports {
+ port {
+ etm5_out: endpoint {
+ remote-endpoint = <&apss_funnel_in5>;
+ };
};
};
};
@@ -2065,9 +2069,11 @@ etm7: etm@7e40000 {

cpu = <&CPU6>;

- port {
- etm6_out: endpoint {
- remote-endpoint = <&apss_funnel_in6>;
+ out-ports {
+ port {
+ etm6_out: endpoint {
+ remote-endpoint = <&apss_funnel_in6>;
+ };
};
};
};
@@ -2082,9 +2088,11 @@ etm8: etm@7f40000 {

cpu = <&CPU7>;

- port {
- etm7_out: endpoint {
- remote-endpoint = <&apss_funnel_in7>;
+ out-ports {
+ port {
+ etm7_out: endpoint {
+ remote-endpoint = <&apss_funnel_in7>;
+ };
};
};
};
--
2.41.0

2023-12-17 17:36:43

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v4 0/4] arm64: dts: qcom: Fix the warnings from coresight bindings


On Sat, 09 Dec 2023 23:26:27 -0800, Mao Jinlong wrote:
> Fix all warnings in Qualcomm boards coming from Coresight bindings.
>
> There are warnings below after running dtbs_check. The patches are
> to fix them for Qcom boards.
>
> funnel@3023000: 'in-ports' is a required property
>
> [...]

Applied, thanks!

[2/4] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property
commit: 9a6fc510a6a3ec150cb7450aec1e5f257e6fc77b
[3/4] arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property
commit: ae5ee3562a2519214b12228545e88a203dd68bbd
[4/4] arm64: dts: qcom: Fix coresight warnings in in-ports and out-ports
commit: bdb6339fd46b8702ea7411b0b414587b86a40562

Best regards,
--
Bjorn Andersson <[email protected]>

2024-01-02 18:45:46

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: arm: Add remote etm dt-binding


On Sat, 09 Dec 2023 23:26:28 -0800, Mao Jinlong wrote:
> Remote ETM(Embedded Trace Macrocell) is to capture information of
> the executed processor instructions of remote processors like modem.
> Add new coresight-remote-etm.yaml file describing the bindings
> required to define coresight remote etm in the device trees.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Mao Jinlong <[email protected]>
> ---
> .../arm/qcom,coresight-remote-etm.yaml | 51 +++++++++++++++++++
> 1 file changed, 51 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml
>

Applied, thanks!

Bjorn, Really either you or the coresight maintainers should have taken
this, but they weren't Cc'ed.

Rob