diff mbox series

[OpenWrt-Devel] ramips: mt7621: Fix some cosmetic DTC warnings

Message ID 20180607173123.4427-1-rosenp@gmail.com
State Superseded
Headers show
Series [OpenWrt-Devel] ramips: mt7621: Fix some cosmetic DTC warnings | expand

Commit Message

Rosen Penev June 7, 2018, 5:31 p.m. UTC
Node /cpus/cpu@0 has a unit name, but no reg property
Node /cpus/cpu@1 has a unit name, but no reg property
Node /cpuintc@0 has a unit name, but no reg property
Node /cpuclock@0 has a unit name, but no reg property
Node /sysclock@0 has a unit name, but no reg property
Node /pcie@1e140000/pcie0 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie0 missing bus-range for PCI bridge
Node /pcie@1e140000/pcie1 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie1 missing bus-range for PCI bridge
Node /pcie@1e140000/pcie2 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie2 missing bus-range for PCI bridge

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 target/linux/ramips/dts/mt7621.dtsi | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

Comments

Daniel Golle June 7, 2018, 7:17 p.m. UTC | #1
On Thu, Jun 07, 2018 at 10:31:23AM -0700, Rosen Penev wrote:
> Node /cpus/cpu@0 has a unit name, but no reg property
> Node /cpus/cpu@1 has a unit name, but no reg property
> Node /cpuintc@0 has a unit name, but no reg property
> Node /cpuclock@0 has a unit name, but no reg property
> Node /sysclock@0 has a unit name, but no reg property
> Node /pcie@1e140000/pcie0 missing ranges for PCI bridge (or not a bridge)
> Node /pcie@1e140000/pcie0 missing bus-range for PCI bridge
> Node /pcie@1e140000/pcie1 missing ranges for PCI bridge (or not a bridge)
> Node /pcie@1e140000/pcie1 missing bus-range for PCI bridge
> Node /pcie@1e140000/pcie2 missing ranges for PCI bridge (or not a bridge)
> Node /pcie@1e140000/pcie2 missing bus-range for PCI bridge

Same here on MT7688AN, we need a sepearte fix for that as well...

> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  target/linux/ramips/dts/mt7621.dtsi | 25 ++++++++++++++++---------
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
> index daca857f60..59cd4fb171 100644
> --- a/target/linux/ramips/dts/mt7621.dtsi
> +++ b/target/linux/ramips/dts/mt7621.dtsi
> @@ -6,16 +6,23 @@
>  	compatible = "mediatek,mt7621-soc";
>  
>  	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
>  		cpu@0 {
> +			device_type = "cpu";
>  			compatible = "mips,mips1004Kc";
> +			reg = <0x0>;
>  		};
>  
>  		cpu@1 {
> +			device_type = "cpu";
>  			compatible = "mips,mips1004Kc";
> +			reg = <0x1>;
>  		};
>  	};
>  
> -	cpuintc: cpuintc@0 {
> +	cpuintc: cpuintc {
>  		#address-cells = <0>;
>  		#interrupt-cells = <1>;
>  		interrupt-controller;
> @@ -26,7 +33,7 @@
>  		serial0 = &uartlite;
>  	};
>  
> -	cpuclock: cpuclock@0 {
> +	cpuclock: cpuclock {
>  		#clock-cells = <0>;
>  		compatible = "fixed-clock";
>  
> @@ -34,7 +41,7 @@
>  		clock-frequency = <880000000>;
>  	};
>  
> -	sysclock: sysclock@0 {
> +	sysclock: sysclock {
>  		#clock-cells = <0>;
>  		compatible = "fixed-clock";
>  
> @@ -454,28 +461,28 @@
>  
>  		pcie0 {
>  			reg = <0x0000 0 0 0 0>;
> -
>  			#address-cells = <3>;
>  			#size-cells = <2>;
> -
> +			ranges;
> +			bus-range = <0 255>;
>  			device_type = "pci";
>  		};
>  
>  		pcie1 {
>  			reg = <0x0800 0 0 0 0>;
> -
>  			#address-cells = <3>;
>  			#size-cells = <2>;
> -
> +			ranges;
> +			bus-range = <0 255>;
>  			device_type = "pci";
>  		};
>  
>  		pcie2 {
>  			reg = <0x1000 0 0 0 0>;
> -
>  			#address-cells = <3>;
>  			#size-cells = <2>;
> -
> +			ranges;
> +			bus-range = <0 255>;
>  			device_type = "pci";
>  		};
>  	};
> -- 
> 2.17.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/listinfo/openwrt-devel
Rosen Penev June 7, 2018, 7:34 p.m. UTC | #2
On Thu, Jun 7, 2018 at 12:17 PM, Daniel Golle <daniel@makrotopia.org> wrote:
> On Thu, Jun 07, 2018 at 10:31:23AM -0700, Rosen Penev wrote:
>> Node /cpus/cpu@0 has a unit name, but no reg property
>> Node /cpus/cpu@1 has a unit name, but no reg property
>> Node /cpuintc@0 has a unit name, but no reg property
>> Node /cpuclock@0 has a unit name, but no reg property
>> Node /sysclock@0 has a unit name, but no reg property
>> Node /pcie@1e140000/pcie0 missing ranges for PCI bridge (or not a bridge)
>> Node /pcie@1e140000/pcie0 missing bus-range for PCI bridge
>> Node /pcie@1e140000/pcie1 missing ranges for PCI bridge (or not a bridge)
>> Node /pcie@1e140000/pcie1 missing bus-range for PCI bridge
>> Node /pcie@1e140000/pcie2 missing ranges for PCI bridge (or not a bridge)
>> Node /pcie@1e140000/pcie2 missing bus-range for PCI bridge
>
> Same here on MT7688AN, we need a sepearte fix for that as well...
I did mt7621 only since I can test. I imagine many more dtsi files are impacted.
>
>>
>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>> ---
>>  target/linux/ramips/dts/mt7621.dtsi | 25 ++++++++++++++++---------
>>  1 file changed, 16 insertions(+), 9 deletions(-)
>>
>> diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
>> index daca857f60..59cd4fb171 100644
>> --- a/target/linux/ramips/dts/mt7621.dtsi
>> +++ b/target/linux/ramips/dts/mt7621.dtsi
>> @@ -6,16 +6,23 @@
>>       compatible = "mediatek,mt7621-soc";
>>
>>       cpus {
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;
>> +
>>               cpu@0 {
>> +                     device_type = "cpu";
>>                       compatible = "mips,mips1004Kc";
>> +                     reg = <0x0>;
>>               };
>>
>>               cpu@1 {
>> +                     device_type = "cpu";
>>                       compatible = "mips,mips1004Kc";
>> +                     reg = <0x1>;
>>               };
>>       };
>>
>> -     cpuintc: cpuintc@0 {
>> +     cpuintc: cpuintc {
>>               #address-cells = <0>;
>>               #interrupt-cells = <1>;
>>               interrupt-controller;
>> @@ -26,7 +33,7 @@
>>               serial0 = &uartlite;
>>       };
>>
>> -     cpuclock: cpuclock@0 {
>> +     cpuclock: cpuclock {
>>               #clock-cells = <0>;
>>               compatible = "fixed-clock";
>>
>> @@ -34,7 +41,7 @@
>>               clock-frequency = <880000000>;
>>       };
>>
>> -     sysclock: sysclock@0 {
>> +     sysclock: sysclock {
>>               #clock-cells = <0>;
>>               compatible = "fixed-clock";
>>
>> @@ -454,28 +461,28 @@
>>
>>               pcie0 {
>>                       reg = <0x0000 0 0 0 0>;
>> -
>>                       #address-cells = <3>;
>>                       #size-cells = <2>;
>> -
>> +                     ranges;
>> +                     bus-range = <0 255>;
>>                       device_type = "pci";
>>               };
>>
>>               pcie1 {
>>                       reg = <0x0800 0 0 0 0>;
>> -
>>                       #address-cells = <3>;
>>                       #size-cells = <2>;
>> -
>> +                     ranges;
>> +                     bus-range = <0 255>;
>>                       device_type = "pci";
>>               };
>>
>>               pcie2 {
>>                       reg = <0x1000 0 0 0 0>;
>> -
>>                       #address-cells = <3>;
>>                       #size-cells = <2>;
>> -
>> +                     ranges;
>> +                     bus-range = <0 255>;
>>                       device_type = "pci";
>>               };
>>       };
>> --
>> 2.17.1
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/listinfo/openwrt-devel
Christian Lamparter June 7, 2018, 8:47 p.m. UTC | #3
On Thursday, June 7, 2018 7:31:23 PM CEST Rosen Penev wrote:
>                         device_type = "pci";

hm, just a heads-up: "device_type" have been mostly deprecated [0].

|The device_type property was used in IEEE 1275 to describe the device’s
|FCode programming model. Because |spec| does not |have FCode, new use
|of the property is deprecated, and it should be included only on *cpu*
|and *memory* nodes for compatibility with IEEE 1275–derived devicetrees.

so, if you want you can delete these 'device_type = "pci";'. 
(But you don't need to.)

Regards,
Christian

[0] <https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#device_type-deprecated>
Rosen Penev June 7, 2018, 8:49 p.m. UTC | #4
On Thu, Jun 7, 2018 at 1:47 PM, Christian Lamparter <chunkeey@gmail.com> wrote:
> On Thursday, June 7, 2018 7:31:23 PM CEST Rosen Penev wrote:
>>                         device_type = "pci";
>
> hm, just a heads-up: "device_type" have been mostly deprecated [0].
>
> |The device_type property was used in IEEE 1275 to describe the device’s
> |FCode programming model. Because |spec| does not |have FCode, new use
> |of the property is deprecated, and it should be included only on *cpu*
> |and *memory* nodes for compatibility with IEEE 1275–derived devicetrees.
>
> so, if you want you can delete these 'device_type = "pci";'.
> (But you don't need to.)
I will do so.
>
> Regards,
> Christian
>
> [0] <https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#device_type-deprecated>
>
>
diff mbox series

Patch

diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
index daca857f60..59cd4fb171 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -6,16 +6,23 @@ 
 	compatible = "mediatek,mt7621-soc";
 
 	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
 		cpu@0 {
+			device_type = "cpu";
 			compatible = "mips,mips1004Kc";
+			reg = <0x0>;
 		};
 
 		cpu@1 {
+			device_type = "cpu";
 			compatible = "mips,mips1004Kc";
+			reg = <0x1>;
 		};
 	};
 
-	cpuintc: cpuintc@0 {
+	cpuintc: cpuintc {
 		#address-cells = <0>;
 		#interrupt-cells = <1>;
 		interrupt-controller;
@@ -26,7 +33,7 @@ 
 		serial0 = &uartlite;
 	};
 
-	cpuclock: cpuclock@0 {
+	cpuclock: cpuclock {
 		#clock-cells = <0>;
 		compatible = "fixed-clock";
 
@@ -34,7 +41,7 @@ 
 		clock-frequency = <880000000>;
 	};
 
-	sysclock: sysclock@0 {
+	sysclock: sysclock {
 		#clock-cells = <0>;
 		compatible = "fixed-clock";
 
@@ -454,28 +461,28 @@ 
 
 		pcie0 {
 			reg = <0x0000 0 0 0 0>;
-
 			#address-cells = <3>;
 			#size-cells = <2>;
-
+			ranges;
+			bus-range = <0 255>;
 			device_type = "pci";
 		};
 
 		pcie1 {
 			reg = <0x0800 0 0 0 0>;
-
 			#address-cells = <3>;
 			#size-cells = <2>;
-
+			ranges;
+			bus-range = <0 255>;
 			device_type = "pci";
 		};
 
 		pcie2 {
 			reg = <0x1000 0 0 0 0>;
-
 			#address-cells = <3>;
 			#size-cells = <2>;
-
+			ranges;
+			bus-range = <0 255>;
 			device_type = "pci";
 		};
 	};