[06/15] ARM: dts: r8a779x: fix PCI bus dtc warnings

Message ID 20170322020313.24338-6-robh@kernel.org
State Accepted
Commit f7d569c1e6a6fa731fc34083a9f0191b7360eeb1
Headers show
Series
  • [01/15] ARM: dts: alpine: fix PCIe node name
Related show

Commit Message

Rob Herring March 22, 2017, 2:03 a.m.
dtc recently added PCI bus checks. Fix these warnings.

Signed-off-by: Rob Herring <robh@kernel.org>

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org
---
Sub-arch maintainers, please apply to your trees unless arm-soc wants 
to take the whole lot.

 arch/arm/boot/dts/r8a7790.dtsi | 16 ++++++----------
 arch/arm/boot/dts/r8a7791.dtsi | 16 ++++++----------
 arch/arm/boot/dts/r8a7794.dtsi | 16 ++++++----------
 3 files changed, 18 insertions(+), 30 deletions(-)

-- 
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Geert Uytterhoeven March 22, 2017, 8:58 a.m. | #1
Hi Rob,

On Wed, Mar 22, 2017 at 3:03 AM, Rob Herring <robh@kernel.org> wrote:
> dtc recently added PCI bus checks. Fix these warnings.


It's always a good idea to put the warnings in the commit message:

arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,1 node name is not "pci" or "pcie"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,1 missing ranges for PCI bridge (or not a bridge)
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,1 incorrect #address-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,1 incorrect #size-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,1 missing bus-range for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,2 node name is not "pci" or "pcie"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,2 missing ranges for PCI bridge (or not a bridge)
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,2 incorrect #address-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,2 incorrect #size-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee090000/usb@0,2 missing bus-range for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,1 node name is not "pci" or "pcie"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,1 missing ranges for PCI bridge (or not a bridge)
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,1 incorrect #address-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,1 incorrect #size-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,1 missing bus-range for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,2 node name is not "pci" or "pcie"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,2 missing ranges for PCI bridge (or not a bridge)
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,2 incorrect #address-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,2 incorrect #size-cells for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node
/pci@ee0d0000/usb@0,2 missing bus-range for PCI bridge
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (unit_address_format):
Failed prerequisite 'pci_bridge'
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Failed
prerequisite 'pci_bridge'
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_bus_num):
Failed prerequisite 'pci_bridge'

The above indeed go away with your patch, but I don't know why ;-)

> Signed-off-by: Rob Herring <robh@kernel.org>

> Cc: Simon Horman <horms@verge.net.au>

> Cc: Magnus Damm <magnus.damm@gmail.com>

> Cc: linux-renesas-soc@vger.kernel.org

> ---

> Sub-arch maintainers, please apply to your trees unless arm-soc wants

> to take the whole lot.

>

>  arch/arm/boot/dts/r8a7790.dtsi | 16 ++++++----------

>  arch/arm/boot/dts/r8a7791.dtsi | 16 ++++++----------

>  arch/arm/boot/dts/r8a7794.dtsi | 16 ++++++----------

>  3 files changed, 18 insertions(+), 30 deletions(-)

>

> diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi

> index 6d10450de6d7..c16a37e9fb5d 100644

> --- a/arch/arm/boot/dts/r8a7790.dtsi

> +++ b/arch/arm/boot/dts/r8a7790.dtsi

> @@ -1598,16 +1598,14 @@

>                                  0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH

>                                  0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;

>

> -               usb@0,1 {

> +               usb@1,0 {

>                         reg = <0x800 0 0 0 0>;

> -                       device_type = "pci";

>                         phys = <&usb0 0>;

>                         phy-names = "usb";

>                 };


Both Documentation/devicetree/bindings/pci/pci.txt and ePAPR refer to
http://www.firmware.org/1275/bindings/pci/pci2_1.pdf
http://www.firmware.org/1275/practice/imap/imap0_9d.pdf
which no longer exist.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring March 22, 2017, 1:47 p.m. | #2
On Wed, Mar 22, 2017 at 3:58 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Rob,

>

> On Wed, Mar 22, 2017 at 3:03 AM, Rob Herring <robh@kernel.org> wrote:

>> dtc recently added PCI bus checks. Fix these warnings.

>

> It's always a good idea to put the warnings in the commit message:


Well, the warnings are a bit noisy in that they get repeated, can be
misleading, change as I fix problems (device nodes are not checked if
the bridge node fails), and most importantly I'm lazy having fixed
these treewide. Sub-arch maintainers are welcome to make better
patches. :)

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,1 node name is not "pci" or "pcie"

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,1 missing ranges for PCI bridge (or not a bridge)

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,1 incorrect #address-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,1 incorrect #size-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,1 missing bus-range for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,2 node name is not "pci" or "pcie"

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,2 missing ranges for PCI bridge (or not a bridge)

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,2 incorrect #address-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,2 incorrect #size-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee090000/usb@0,2 missing bus-range for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,1 node name is not "pci" or "pcie"

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,1 missing ranges for PCI bridge (or not a bridge)

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,1 incorrect #address-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,1 incorrect #size-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,1 missing bus-range for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,2 node name is not "pci" or "pcie"

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,2 missing ranges for PCI bridge (or not a bridge)

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,2 incorrect #address-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,2 incorrect #size-cells for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

> /pci@ee0d0000/usb@0,2 missing bus-range for PCI bridge

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (unit_address_format):

> Failed prerequisite 'pci_bridge'

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Failed

> prerequisite 'pci_bridge'

> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_bus_num):

> Failed prerequisite 'pci_bridge'

>

> The above indeed go away with your patch, but I don't know why ;-)


Most of these are because 'device_type = "pci";' should only be on PCI
bridges, not PCI devices.

>

>> Signed-off-by: Rob Herring <robh@kernel.org>

>> Cc: Simon Horman <horms@verge.net.au>

>> Cc: Magnus Damm <magnus.damm@gmail.com>

>> Cc: linux-renesas-soc@vger.kernel.org

>> ---

>> Sub-arch maintainers, please apply to your trees unless arm-soc wants

>> to take the whole lot.

>>

>>  arch/arm/boot/dts/r8a7790.dtsi | 16 ++++++----------

>>  arch/arm/boot/dts/r8a7791.dtsi | 16 ++++++----------

>>  arch/arm/boot/dts/r8a7794.dtsi | 16 ++++++----------

>>  3 files changed, 18 insertions(+), 30 deletions(-)

>>

>> diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi

>> index 6d10450de6d7..c16a37e9fb5d 100644

>> --- a/arch/arm/boot/dts/r8a7790.dtsi

>> +++ b/arch/arm/boot/dts/r8a7790.dtsi

>> @@ -1598,16 +1598,14 @@

>>                                  0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH

>>                                  0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;

>>

>> -               usb@0,1 {

>> +               usb@1,0 {

>>                         reg = <0x800 0 0 0 0>;

>> -                       device_type = "pci";

>>                         phys = <&usb0 0>;

>>                         phy-names = "usb";

>>                 };

>

> Both Documentation/devicetree/bindings/pci/pci.txt and ePAPR refer to

> http://www.firmware.org/1275/bindings/pci/pci2_1.pdf

> http://www.firmware.org/1275/practice/imap/imap0_9d.pdf

> which no longer exist.


Yeah, they are still out there. Just need to google "PCI supplement 1275". :)

I have the full archive saved off. I need to get them added to devicetree.org.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven March 22, 2017, 2:06 p.m. | #3
Hi Rob,

On Wed, Mar 22, 2017 at 2:47 PM, Rob Herring <robh@kernel.org> wrote:
> On Wed, Mar 22, 2017 at 3:58 AM, Geert Uytterhoeven

> <geert@linux-m68k.org> wrote:

>> On Wed, Mar 22, 2017 at 3:03 AM, Rob Herring <robh@kernel.org> wrote:

>>> dtc recently added PCI bus checks. Fix these warnings.

>>

>> It's always a good idea to put the warnings in the commit message:

>

> Well, the warnings are a bit noisy in that they get repeated, can be

> misleading, change as I fix problems (device nodes are not checked if

> the bridge node fails), and most importantly I'm lazy having fixed

> these treewide. Sub-arch maintainers are welcome to make better

> patches. :)

>

>> arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_bridge): Node

>> /pci@ee090000/usb@0,1 node name is not "pci" or "pcie"


[...]

>> The above indeed go away with your patch, but I don't know why ;-)

>

> Most of these are because 'device_type = "pci";' should only be on PCI

> bridges, not PCI devices.


Thanks, retrying...

arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Node
/pci@ee090000/usb@0,1 PCI unit address format error, expected "1,0"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Node
/pci@ee090000/usb@0,2 PCI unit address format error, expected "2,0"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Node
/pci@ee0d0000/usb@0,1 PCI unit address format error, expected "1,0"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Node
/pci@ee0d0000/usb@0,2 PCI unit address format error, expected "2,0"
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_bus_num):
Node /pci@ee0d0000/usb@0,1 PCI bus number 0 out of range, expected (2
- 2)
arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_bus_num):
Node /pci@ee0d0000/usb@0,2 PCI bus number 0 out of range, expected (2
- 2)

OK, without 'device_type = "pci"' it makes much more sense...

>> Both Documentation/devicetree/bindings/pci/pci.txt and ePAPR refer to

>> http://www.firmware.org/1275/bindings/pci/pci2_1.pdf

>> http://www.firmware.org/1275/practice/imap/imap0_9d.pdf

>> which no longer exist.

>

> Yeah, they are still out there. Just need to google "PCI supplement 1275". :)

>

> I have the full archive saved off. I need to get them added to devicetree.org.


Having working links in the DT bindings would be great.

BTW, seems like I still have an offline copy of v2.0 of the PCI spec in
PostScript format, from my CHRP days[*], when hard disks where smaller
than CD-Rs ;-)

[*] I never managed to memorize the PCI DT bindings, though.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman March 24, 2017, 7:06 a.m. | #4
On Tue, Mar 21, 2017 at 09:03:04PM -0500, Rob Herring wrote:
> dtc recently added PCI bus checks. Fix these warnings.

> 

> Signed-off-by: Rob Herring <robh@kernel.org>

> Cc: Simon Horman <horms@verge.net.au>

> Cc: Magnus Damm <magnus.damm@gmail.com>

> Cc: linux-renesas-soc@vger.kernel.org

> ---

> Sub-arch maintainers, please apply to your trees unless arm-soc wants 

> to take the whole lot.


I would prefer to take these through my tree to reduce the chances of
conflicts emerging later.

Geert, are you happy with this patch and its changelog as-is?

> 

>  arch/arm/boot/dts/r8a7790.dtsi | 16 ++++++----------

>  arch/arm/boot/dts/r8a7791.dtsi | 16 ++++++----------

>  arch/arm/boot/dts/r8a7794.dtsi | 16 ++++++----------

>  3 files changed, 18 insertions(+), 30 deletions(-)

> 

> diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi

> index 6d10450de6d7..c16a37e9fb5d 100644

> --- a/arch/arm/boot/dts/r8a7790.dtsi

> +++ b/arch/arm/boot/dts/r8a7790.dtsi

> @@ -1598,16 +1598,14 @@

>  				 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH

>  				 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;

>  

> -		usb@0,1 {

> +		usb@1,0 {

>  			reg = <0x800 0 0 0 0>;

> -			device_type = "pci";

>  			phys = <&usb0 0>;

>  			phy-names = "usb";

>  		};

>  

> -		usb@0,2 {

> +		usb@2,0 {

>  			reg = <0x1000 0 0 0 0>;

> -			device_type = "pci";

>  			phys = <&usb0 0>;

>  			phy-names = "usb";

>  		};

> @@ -1654,16 +1652,14 @@

>  				 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH

>  				 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;

>  

> -		usb@0,1 {

> -			reg = <0x800 0 0 0 0>;

> -			device_type = "pci";

> +		usb@1,0 {

> +			reg = <0x20800 0 0 0 0>;

>  			phys = <&usb2 0>;

>  			phy-names = "usb";

>  		};

>  

> -		usb@0,2 {

> -			reg = <0x1000 0 0 0 0>;

> -			device_type = "pci";

> +		usb@2,0 {

> +			reg = <0x21000 0 0 0 0>;

>  			phys = <&usb2 0>;

>  			phy-names = "usb";

>  		};

> diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi

> index 9f9e48511836..a1d8686eaea5 100644

> --- a/arch/arm/boot/dts/r8a7791.dtsi

> +++ b/arch/arm/boot/dts/r8a7791.dtsi

> @@ -1596,16 +1596,14 @@

>  				 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH

>  				 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;

>  

> -		usb@0,1 {

> +		usb@1,0 {

>  			reg = <0x800 0 0 0 0>;

> -			device_type = "pci";

>  			phys = <&usb0 0>;

>  			phy-names = "usb";

>  		};

>  

> -		usb@0,2 {

> +		usb@2,0 {

>  			reg = <0x1000 0 0 0 0>;

> -			device_type = "pci";

>  			phys = <&usb0 0>;

>  			phy-names = "usb";

>  		};

> @@ -1631,16 +1629,14 @@

>  				 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH

>  				 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;

>  

> -		usb@0,1 {

> -			reg = <0x800 0 0 0 0>;

> -			device_type = "pci";

> +		usb@1,0 {

> +			reg = <0x10800 0 0 0 0>;

>  			phys = <&usb2 0>;

>  			phy-names = "usb";

>  		};

>  

> -		usb@0,2 {

> -			reg = <0x1000 0 0 0 0>;

> -			device_type = "pci";

> +		usb@2,0 {

> +			reg = <0x11000 0 0 0 0>;

>  			phys = <&usb2 0>;

>  			phy-names = "usb";

>  		};

> diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi

> index 319c1069b7ee..c07495185cc4 100644

> --- a/arch/arm/boot/dts/r8a7794.dtsi

> +++ b/arch/arm/boot/dts/r8a7794.dtsi

> @@ -817,16 +817,14 @@

>  				 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH

>  				 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;

>  

> -		usb@0,1 {

> +		usb@1,0 {

>  			reg = <0x800 0 0 0 0>;

> -			device_type = "pci";

>  			phys = <&usb0 0>;

>  			phy-names = "usb";

>  		};

>  

> -		usb@0,2 {

> +		usb@2,0 {

>  			reg = <0x1000 0 0 0 0>;

> -			device_type = "pci";

>  			phys = <&usb0 0>;

>  			phy-names = "usb";

>  		};

> @@ -852,16 +850,14 @@

>  				 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH

>  				 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;

>  

> -		usb@0,1 {

> -			reg = <0x800 0 0 0 0>;

> -			device_type = "pci";

> +		usb@1,0 {

> +			reg = <0x10800 0 0 0 0>;

>  			phys = <&usb2 0>;

>  			phy-names = "usb";

>  		};

>  

> -		usb@0,2 {

> -			reg = <0x1000 0 0 0 0>;

> -			device_type = "pci";

> +		usb@2,0 {

> +			reg = <0x11000 0 0 0 0>;

>  			phys = <&usb2 0>;

>  			phy-names = "usb";

>  		};

> -- 

> 2.10.1

> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven March 24, 2017, 7:59 a.m. | #5
Hi Simon,

On Fri, Mar 24, 2017 at 8:06 AM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Mar 21, 2017 at 09:03:04PM -0500, Rob Herring wrote:

>> dtc recently added PCI bus checks. Fix these warnings.

>>

>> Signed-off-by: Rob Herring <robh@kernel.org>

>> Cc: Simon Horman <horms@verge.net.au>

>> Cc: Magnus Damm <magnus.damm@gmail.com>

>> Cc: linux-renesas-soc@vger.kernel.org

>> ---

>> Sub-arch maintainers, please apply to your trees unless arm-soc wants

>> to take the whole lot.

>

> I would prefer to take these through my tree to reduce the chances of

> conflicts emerging later.

>

> Geert, are you happy with this patch and its changelog as-is?


I'd use something like:

---8<----------
The bogus 'device_type = "pci"' confuses dtc, causing lots of totally
unrelated warnings.  After fixing that, real warnings like

    arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg):
Node /pci@ee090000/usb@0,1 PCI unit address format error, expected
"1,0"

are left.  Correct the unit-adresses and reg properties of the subnodes
to fix these.
---------->8---

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 6d10450de6d7..c16a37e9fb5d 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -1598,16 +1598,14 @@ 
 				 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
-		usb@0,1 {
+		usb@1,0 {
 			reg = <0x800 0 0 0 0>;
-			device_type = "pci";
 			phys = <&usb0 0>;
 			phy-names = "usb";
 		};
 
-		usb@0,2 {
+		usb@2,0 {
 			reg = <0x1000 0 0 0 0>;
-			device_type = "pci";
 			phys = <&usb0 0>;
 			phy-names = "usb";
 		};
@@ -1654,16 +1652,14 @@ 
 				 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
-		usb@0,1 {
-			reg = <0x800 0 0 0 0>;
-			device_type = "pci";
+		usb@1,0 {
+			reg = <0x20800 0 0 0 0>;
 			phys = <&usb2 0>;
 			phy-names = "usb";
 		};
 
-		usb@0,2 {
-			reg = <0x1000 0 0 0 0>;
-			device_type = "pci";
+		usb@2,0 {
+			reg = <0x21000 0 0 0 0>;
 			phys = <&usb2 0>;
 			phy-names = "usb";
 		};
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 9f9e48511836..a1d8686eaea5 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -1596,16 +1596,14 @@ 
 				 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
-		usb@0,1 {
+		usb@1,0 {
 			reg = <0x800 0 0 0 0>;
-			device_type = "pci";
 			phys = <&usb0 0>;
 			phy-names = "usb";
 		};
 
-		usb@0,2 {
+		usb@2,0 {
 			reg = <0x1000 0 0 0 0>;
-			device_type = "pci";
 			phys = <&usb0 0>;
 			phy-names = "usb";
 		};
@@ -1631,16 +1629,14 @@ 
 				 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
-		usb@0,1 {
-			reg = <0x800 0 0 0 0>;
-			device_type = "pci";
+		usb@1,0 {
+			reg = <0x10800 0 0 0 0>;
 			phys = <&usb2 0>;
 			phy-names = "usb";
 		};
 
-		usb@0,2 {
-			reg = <0x1000 0 0 0 0>;
-			device_type = "pci";
+		usb@2,0 {
+			reg = <0x11000 0 0 0 0>;
 			phys = <&usb2 0>;
 			phy-names = "usb";
 		};
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 319c1069b7ee..c07495185cc4 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -817,16 +817,14 @@ 
 				 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
-		usb@0,1 {
+		usb@1,0 {
 			reg = <0x800 0 0 0 0>;
-			device_type = "pci";
 			phys = <&usb0 0>;
 			phy-names = "usb";
 		};
 
-		usb@0,2 {
+		usb@2,0 {
 			reg = <0x1000 0 0 0 0>;
-			device_type = "pci";
 			phys = <&usb0 0>;
 			phy-names = "usb";
 		};
@@ -852,16 +850,14 @@ 
 				 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
-		usb@0,1 {
-			reg = <0x800 0 0 0 0>;
-			device_type = "pci";
+		usb@1,0 {
+			reg = <0x10800 0 0 0 0>;
 			phys = <&usb2 0>;
 			phy-names = "usb";
 		};
 
-		usb@0,2 {
-			reg = <0x1000 0 0 0 0>;
-			device_type = "pci";
+		usb@2,0 {
+			reg = <0x11000 0 0 0 0>;
 			phys = <&usb2 0>;
 			phy-names = "usb";
 		};