diff mbox series

[v7,4/7] arm64: dts: qcom: ipq9574: Reorder reg and reg-names

Message ID 20250122063411.3503097-5-quic_varada@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add PCIe support for Qualcomm IPQ5332 | expand

Commit Message

Varadarajan Narayanan Jan. 22, 2025, 6:34 a.m. UTC
The 'reg' & 'reg-names' constraints used in the bindings and dtsi
are different resulting in dt_bindings_check errors. Re-order
them to address following errors.

	arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb: pcie@20000000: reg-names:0: 'parf' was expected

Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 52 +++++++++++++++++----------
 1 file changed, 34 insertions(+), 18 deletions(-)

Comments

Konrad Dybcio Jan. 27, 2025, 10:33 a.m. UTC | #1
On 22.01.2025 7:34 AM, Varadarajan Narayanan wrote:
> The 'reg' & 'reg-names' constraints used in the bindings and dtsi
> are different resulting in dt_bindings_check errors. Re-order
> them to address following errors.
> 
> 	arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb: pcie@20000000: reg-names:0: 'parf' was expected
> 
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/ipq9574.dtsi | 52 +++++++++++++++++----------
>  1 file changed, 34 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> index 942290028972..d27c55c7f6e4 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> @@ -876,12 +876,16 @@ frame@b128000 {
>  
>  		pcie1: pcie@10000000 {
>  			compatible = "qcom,pcie-ipq9574";
> -			reg =  <0x10000000 0xf1d>,
> -			       <0x10000f20 0xa8>,
> -			       <0x10001000 0x1000>,
> -			       <0x000f8000 0x4000>,
> -			       <0x10100000 0x1000>;
> -			reg-names = "dbi", "elbi", "atu", "parf", "config";
> +			reg = <0x000f8000 0x4000>,
> +			      <0x10000000 0xf1d>,
> +			      <0x10000f20 0xa8>,
> +			      <0x10001000 0x1000>,
> +			      <0x10100000 0x1000>;

The unit address (the one after '@' in the node definition) is supposed to
match the first 'reg' entry. So you need to update that and reorder the
nodes accordingly.

Krzysztof, is this acceptable to pick up given the reg entries are being
shuffled around?

Konrad
Krzysztof Kozlowski Feb. 3, 2025, 4:27 p.m. UTC | #2
On 27/01/2025 11:33, Konrad Dybcio wrote:
> On 22.01.2025 7:34 AM, Varadarajan Narayanan wrote:
>> The 'reg' & 'reg-names' constraints used in the bindings and dtsi
>> are different resulting in dt_bindings_check errors. Re-order
>> them to address following errors.
>>
>> 	arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb: pcie@20000000: reg-names:0: 'parf' was expected
>>
>> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
>> ---
>>  arch/arm64/boot/dts/qcom/ipq9574.dtsi | 52 +++++++++++++++++----------
>>  1 file changed, 34 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> index 942290028972..d27c55c7f6e4 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> @@ -876,12 +876,16 @@ frame@b128000 {
>>  
>>  		pcie1: pcie@10000000 {
>>  			compatible = "qcom,pcie-ipq9574";
>> -			reg =  <0x10000000 0xf1d>,
>> -			       <0x10000f20 0xa8>,
>> -			       <0x10001000 0x1000>,
>> -			       <0x000f8000 0x4000>,
>> -			       <0x10100000 0x1000>;
>> -			reg-names = "dbi", "elbi", "atu", "parf", "config";
>> +			reg = <0x000f8000 0x4000>,
>> +			      <0x10000000 0xf1d>,
>> +			      <0x10000f20 0xa8>,
>> +			      <0x10001000 0x1000>,
>> +			      <0x10100000 0x1000>;
> 
> The unit address (the one after '@' in the node definition) is supposed to
> match the first 'reg' entry. So you need to update that and reorder the
> nodes accordingly.
> 
> Krzysztof, is this acceptable to pick up given the reg entries are being
> shuffled around?

Uh, no, this leads to warnings.

BTW, I really hope tools were being used to spot that, not maintainers
like you or me.

But this is anyway old patchset whose newer version was rejected. There
is just to many wrong things happening in the process - now one more:
not running standard tests on this.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 942290028972..d27c55c7f6e4 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -876,12 +876,16 @@  frame@b128000 {
 
 		pcie1: pcie@10000000 {
 			compatible = "qcom,pcie-ipq9574";
-			reg =  <0x10000000 0xf1d>,
-			       <0x10000f20 0xa8>,
-			       <0x10001000 0x1000>,
-			       <0x000f8000 0x4000>,
-			       <0x10100000 0x1000>;
-			reg-names = "dbi", "elbi", "atu", "parf", "config";
+			reg = <0x000f8000 0x4000>,
+			      <0x10000000 0xf1d>,
+			      <0x10000f20 0xa8>,
+			      <0x10001000 0x1000>,
+			      <0x10100000 0x1000>;
+			reg-names = "parf",
+				    "dbi",
+				    "elbi",
+				    "atu",
+				    "config";
 			device_type = "pci";
 			linux,pci-domain = <1>;
 			bus-range = <0x00 0xff>;
@@ -956,12 +960,16 @@  pcie1: pcie@10000000 {
 
 		pcie3: pcie@18000000 {
 			compatible = "qcom,pcie-ipq9574";
-			reg =  <0x18000000 0xf1d>,
-			       <0x18000f20 0xa8>,
-			       <0x18001000 0x1000>,
-			       <0x000f0000 0x4000>,
-			       <0x18100000 0x1000>;
-			reg-names = "dbi", "elbi", "atu", "parf", "config";
+			reg = <0x000f0000 0x4000>,
+			      <0x18000000 0xf1d>,
+			      <0x18000f20 0xa8>,
+			      <0x18001000 0x1000>,
+			      <0x18100000 0x1000>;
+			reg-names = "parf",
+				    "dbi",
+				    "elbi",
+				    "atu",
+				    "config";
 			device_type = "pci";
 			linux,pci-domain = <3>;
 			bus-range = <0x00 0xff>;
@@ -1036,12 +1044,16 @@  pcie3: pcie@18000000 {
 
 		pcie2: pcie@20000000 {
 			compatible = "qcom,pcie-ipq9574";
-			reg =  <0x20000000 0xf1d>,
+			reg =  <0x00088000 0x4000>,
+			       <0x20000000 0xf1d>,
 			       <0x20000f20 0xa8>,
 			       <0x20001000 0x1000>,
-			       <0x00088000 0x4000>,
 			       <0x20100000 0x1000>;
-			reg-names = "dbi", "elbi", "atu", "parf", "config";
+			reg-names = "parf",
+				    "dbi",
+				    "elbi",
+				    "atu",
+				    "config";
 			device_type = "pci";
 			linux,pci-domain = <2>;
 			bus-range = <0x00 0xff>;
@@ -1116,12 +1128,16 @@  pcie2: pcie@20000000 {
 
 		pcie0: pci@28000000 {
 			compatible = "qcom,pcie-ipq9574";
-			reg =  <0x28000000 0xf1d>,
+			reg =  <0x00080000 0x4000>,
+			       <0x28000000 0xf1d>,
 			       <0x28000f20 0xa8>,
 			       <0x28001000 0x1000>,
-			       <0x00080000 0x4000>,
 			       <0x28100000 0x1000>;
-			reg-names = "dbi", "elbi", "atu", "parf", "config";
+			reg-names = "parf",
+				    "dbi",
+				    "elbi",
+				    "atu",
+				    "config";
 			device_type = "pci";
 			linux,pci-domain = <0>;
 			bus-range = <0x00 0xff>;