2023-11-29 14:38:59

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v1 0/3] 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


Mao Jinlong (3):
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

arch/arm64/boot/dts/qcom/msm8996.dtsi | 26 ----------------------
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 ++++----------------
5 files changed, 26 insertions(+), 66 deletions(-)

--
2.41.0


2023-11-29 14:39:03

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property

The inport of funnel@3023000 connects to a source which is not supported
in current linux kernel. Remove the device tree node of funnel@3023000
to fix the warning. It will be added once the driver support to the
source is added to linux kernel.

Signed-off-by: Mao Jinlong <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 26 --------------------------
1 file changed, 26 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 6ba9da9e6a8b..e42c22b26adc 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2637,24 +2637,6 @@ funnel1_out: endpoint {
};
};

- funnel@3023000 {
- compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
- reg = <0x3023000 0x1000>;
-
- clocks = <&rpmcc RPM_QDSS_CLK>, <&rpmcc RPM_QDSS_A_CLK>;
- clock-names = "apb_pclk", "atclk";
-
-
- out-ports {
- port {
- funnel2_out: endpoint {
- remote-endpoint =
- <&merge_funnel_in2>;
- };
- };
- };
- };
-
funnel@3025000 {
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
reg = <0x3025000 0x1000>;
@@ -2681,14 +2663,6 @@ merge_funnel_in1: endpoint {
<&funnel1_out>;
};
};
-
- port@2 {
- reg = <2>;
- merge_funnel_in2: endpoint {
- remote-endpoint =
- <&funnel2_out>;
- };
- };
};

out-ports {
--
2.41.0

2023-11-29 14:39:11

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v1 3/3] arm64: dts: qcom: Fix coresight warnings in in-ports and out-ports

When a node is only one in port or one out port, address-cells and
size-cells are not required in in-ports and out-ports. And the number
and reg of the port need to be removed.

Signed-off-by: Mao Jinlong <[email protected]>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 5 +----
arch/arm64/boot/dts/qcom/sm8150.dtsi | 5 +----
arch/arm64/boot/dts/qcom/sm8250.dtsi | 24 ++++--------------------
3 files changed, 6 insertions(+), 28 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index bf5e6eb9d313..c4dbca4c15f2 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -3545,11 +3545,8 @@ etf_out: endpoint {
};

in-ports {
- #address-cells = <1>;
- #size-cells = <0>;

- port@1 {
- reg = <1>;
+ port {
etf_in: endpoint {
remote-endpoint =
<&merge_funnel_out>;
diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 97623af13464..7bae3bc6af06 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -2957,11 +2957,8 @@ replicator1_out: endpoint {
};

in-ports {
- #address-cells = <1>;
- #size-cells = <0>;

- port@1 {
- reg = <1>;
+ port {
replicator1_in: endpoint {
remote-endpoint = <&replicator_out1>;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index be970472f6c4..fa4e8887d53b 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3095,11 +3095,8 @@ tpda@6004000 {
clock-names = "apb_pclk";

out-ports {
- #address-cells = <1>;
- #size-cells = <0>;

- port@0 {
- reg = <0>;
+ port {
tpda_out_funnel_qatb: endpoint {
remote-endpoint = <&funnel_qatb_in_tpda>;
};
@@ -3142,11 +3139,7 @@ funnel_qatb_out_funnel_in0: endpoint {
};

in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
+ port {
funnel_qatb_in_tpda: endpoint {
remote-endpoint = <&tpda_out_funnel_qatb>;
};
@@ -3355,11 +3348,8 @@ etf_out: endpoint {
};

in-ports {
- #address-cells = <1>;
- #size-cells = <0>;

- port@0 {
- reg = <0>;
+ port {
etf_in_funnel_swao_out: endpoint {
remote-endpoint = <&funnel_swao_out_etf>;
};
@@ -3443,8 +3433,6 @@ funnel@6c2d000 {
clock-names = "apb_pclk";

out-ports {
- #address-cells = <1>;
- #size-cells = <0>;
port {
tpdm_mm_out_tpda9: endpoint {
remote-endpoint = <&tpda_9_in_tpdm_mm>;
@@ -3710,11 +3698,7 @@ funnel_apss_merg_out_funnel_in1: endpoint {
};

in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
+ port {
funnel_apss_merg_in_funnel_apss: endpoint {
remote-endpoint = <&funnel_apss_out_funnel_apss_merg>;
};
--
2.41.0

2023-11-30 08:56:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property

On 29/11/2023 15:38, Mao Jinlong wrote:
> The inport of funnel@3023000 connects to a source which is not supported
> in current linux kernel. Remove the device tree node of funnel@3023000
> to fix the warning. It will be added once the driver support to the
> source is added to linux kernel.

Thanks for the changes, but that's not correct reason to remove DTS
code. What kernel supports or not, should be irrelevant for the DTS. DTS
for example is used in other projects - did you check if they have the
same issues? Anyway, DTS describes the hardware, so how current kernel
support defines what is and what is not in the hardware?


Best regards,
Krzysztof

2023-11-30 09:04:14

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] arm64: dts: qcom: Fix coresight warnings in in-ports and out-ports

On 29/11/2023 15:38, Mao Jinlong wrote:
> When a node is only one in port or one out port, address-cells and
> size-cells are not required in in-ports and out-ports. And the number
> and reg of the port need to be removed.
>
> Signed-off-by: Mao Jinlong <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sdm845.dtsi | 5 +----
> arch/arm64/boot/dts/qcom/sm8150.dtsi | 5 +----
> arch/arm64/boot/dts/qcom/sm8250.dtsi | 24 ++++--------------------
> 3 files changed, 6 insertions(+), 28 deletions(-)
>

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-11-30 11:16:17

by Mao Jinlong

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property



On 11/30/2023 4:55 PM, Krzysztof Kozlowski wrote:
> On 29/11/2023 15:38, Mao Jinlong wrote:
>> The inport of funnel@3023000 connects to a source which is not supported
>> in current linux kernel. Remove the device tree node of funnel@3023000
>> to fix the warning. It will be added once the driver support to the
>> source is added to linux kernel.
>
> Thanks for the changes, but that's not correct reason to remove DTS
> code. What kernel supports or not, should be irrelevant for the DTS. DTS
> for example is used in other projects - did you check if they have the
> same issues? Anyway, DTS describes the hardware, so how current kernel
> support defines what is and what is not in the hardware?
>
>
> Best regards,
> Krzysztof

Hi Krzysztof,

The funnel dt node must have in-ports node. It is to describe the input
connection of funnel HW. But there is no dt_binding doc to describe the
DT node of the HW connected to funnel@3023000. So remove the funnel to
solve the warning as of now. The funnel will be added back once driver
and dt_binding are added for the HW.

Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml

Thanks
Jinlong Mao
>

2023-11-30 12:06:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property

On 30/11/2023 12:15, Jinlong Mao wrote:
>
>
> On 11/30/2023 4:55 PM, Krzysztof Kozlowski wrote:
>> On 29/11/2023 15:38, Mao Jinlong wrote:
>>> The inport of funnel@3023000 connects to a source which is not supported
>>> in current linux kernel. Remove the device tree node of funnel@3023000
>>> to fix the warning. It will be added once the driver support to the
>>> source is added to linux kernel.
>>
>> Thanks for the changes, but that's not correct reason to remove DTS
>> code. What kernel supports or not, should be irrelevant for the DTS. DTS
>> for example is used in other projects - did you check if they have the
>> same issues? Anyway, DTS describes the hardware, so how current kernel
>> support defines what is and what is not in the hardware?
>>
>>
>> Best regards,
>> Krzysztof
>
> Hi Krzysztof,
>
> The funnel dt node must have in-ports node. It is to describe the input
> connection of funnel HW. But there is no dt_binding doc to describe the
> DT node of the HW connected to funnel@3023000. So remove the funnel to
> solve the warning as of now. The funnel will be added back once driver
> and dt_binding are added for the HW.
>
> Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml

Why we cannot add now the binding for the connected hardware? It's not
really related to the driver.

Best regards,
Krzysztof

2023-11-30 13:13:19

by Mao Jinlong

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property



On 11/30/2023 8:06 PM, Krzysztof Kozlowski wrote:
> On 30/11/2023 12:15, Jinlong Mao wrote:
>>
>>
>> On 11/30/2023 4:55 PM, Krzysztof Kozlowski wrote:
>>> On 29/11/2023 15:38, Mao Jinlong wrote:
>>>> The inport of funnel@3023000 connects to a source which is not supported
>>>> in current linux kernel. Remove the device tree node of funnel@3023000
>>>> to fix the warning. It will be added once the driver support to the
>>>> source is added to linux kernel.
>>>
>>> Thanks for the changes, but that's not correct reason to remove DTS
>>> code. What kernel supports or not, should be irrelevant for the DTS. DTS
>>> for example is used in other projects - did you check if they have the
>>> same issues? Anyway, DTS describes the hardware, so how current kernel
>>> support defines what is and what is not in the hardware?
>>>
>>>
>>> Best regards,
>>> Krzysztof
>>
>> Hi Krzysztof,
>>
>> The funnel dt node must have in-ports node. It is to describe the input
>> connection of funnel HW. But there is no dt_binding doc to describe the
>> DT node of the HW connected to funnel@3023000. So remove the funnel to
>> solve the warning as of now. The funnel will be added back once driver
>> and dt_binding are added for the HW.
>>
>> Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
>
> Why we cannot add now the binding for the connected hardware? It's not
> really related to the driver.
>
> Best regards,
> Krzysztof

Do you mean yaml file can be added before the driver code is merged ?

Thanks
Jinlong Mao
>

2023-11-30 13:36:12

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property

On 30/11/2023 14:12, Jinlong Mao wrote:
>
>
> On 11/30/2023 8:06 PM, Krzysztof Kozlowski wrote:
>> On 30/11/2023 12:15, Jinlong Mao wrote:
>>>
>>>
>>> On 11/30/2023 4:55 PM, Krzysztof Kozlowski wrote:
>>>> On 29/11/2023 15:38, Mao Jinlong wrote:
>>>>> The inport of funnel@3023000 connects to a source which is not supported
>>>>> in current linux kernel. Remove the device tree node of funnel@3023000
>>>>> to fix the warning. It will be added once the driver support to the
>>>>> source is added to linux kernel.
>>>>
>>>> Thanks for the changes, but that's not correct reason to remove DTS
>>>> code. What kernel supports or not, should be irrelevant for the DTS. DTS
>>>> for example is used in other projects - did you check if they have the
>>>> same issues? Anyway, DTS describes the hardware, so how current kernel
>>>> support defines what is and what is not in the hardware?
>>>>
>>>>
>>>> Best regards,
>>>> Krzysztof
>>>
>>> Hi Krzysztof,
>>>
>>> The funnel dt node must have in-ports node. It is to describe the input
>>> connection of funnel HW. But there is no dt_binding doc to describe the
>>> DT node of the HW connected to funnel@3023000. So remove the funnel to
>>> solve the warning as of now. The funnel will be added back once driver
>>> and dt_binding are added for the HW.
>>>
>>> Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
>>
>> Why we cannot add now the binding for the connected hardware? It's not
>> really related to the driver.
>>
>> Best regards,
>> Krzysztof
>
> Do you mean yaml file can be added before the driver code is merged ?

Yes, the binding. YAML is only the language. We don't write YAMLs, we
write bindings.

Best regards,
Krzysztof

2023-11-30 13:38:11

by Mao Jinlong

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property



On 11/30/2023 9:35 PM, Krzysztof Kozlowski wrote:
> On 30/11/2023 14:12, Jinlong Mao wrote:
>>
>>
>> On 11/30/2023 8:06 PM, Krzysztof Kozlowski wrote:
>>> On 30/11/2023 12:15, Jinlong Mao wrote:
>>>>
>>>>
>>>> On 11/30/2023 4:55 PM, Krzysztof Kozlowski wrote:
>>>>> On 29/11/2023 15:38, Mao Jinlong wrote:
>>>>>> The inport of funnel@3023000 connects to a source which is not supported
>>>>>> in current linux kernel. Remove the device tree node of funnel@3023000
>>>>>> to fix the warning. It will be added once the driver support to the
>>>>>> source is added to linux kernel.
>>>>>
>>>>> Thanks for the changes, but that's not correct reason to remove DTS
>>>>> code. What kernel supports or not, should be irrelevant for the DTS. DTS
>>>>> for example is used in other projects - did you check if they have the
>>>>> same issues? Anyway, DTS describes the hardware, so how current kernel
>>>>> support defines what is and what is not in the hardware?
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Krzysztof
>>>>
>>>> Hi Krzysztof,
>>>>
>>>> The funnel dt node must have in-ports node. It is to describe the input
>>>> connection of funnel HW. But there is no dt_binding doc to describe the
>>>> DT node of the HW connected to funnel@3023000. So remove the funnel to
>>>> solve the warning as of now. The funnel will be added back once driver
>>>> and dt_binding are added for the HW.
>>>>
>>>> Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
>>>
>>> Why we cannot add now the binding for the connected hardware? It's not
>>> really related to the driver.
>>>
>>> Best regards,
>>> Krzysztof
>>
>> Do you mean yaml file can be added before the driver code is merged ?
>
> Yes, the binding. YAML is only the language. We don't write YAMLs, we
> write bindings.
>
> Best regards,
> Krzysztof

ok, Thanks. I will prepare the binding file.

Thanks
Jinlong Mao

>