All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
@ 2015-11-02 17:31 Phil Edworthy
  2015-11-03  8:01 ` Geert Uytterhoeven
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Phil Edworthy @ 2015-11-02 17:31 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 60 +++++++++++++++++++++++++++++++-
 1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index a433720..bd17f8e 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -74,6 +74,15 @@
 		clock-frequency = <0>;
 	};
 
+	/* External PCIe clock - can be overridden by the board */
+	pcie_bus_clk: pcie_bus_clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <100000000>;
+		clock-output-names = "pcie_bus";
+		status = "disabled";
+	};
+
 	soc {
 		compatible = "simple-bus";
 		interrupt-parent = <&gic>;
@@ -682,6 +691,55 @@
 				};
 			};
 		};
-	};
 
+		pciec0: pcie@fe000000 {
+			compatible = "renesas,pcie-r8a7795";
+			reg = <0 0xfe000000 0 0x80000>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
+				0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
+				0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
+				0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+			/* Map all possible DDR as inbound ranges */
+			dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
+			interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
+				<0 117 IRQ_TYPE_LEVEL_HIGH>,
+				<0 118 IRQ_TYPE_LEVEL_HIGH>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic 0 116 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
+			clock-names = "pcie", "pcie_bus";
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+
+		pciec1: pcie@ee800000 {
+			compatible = "renesas,pcie-r8a7795";
+			reg = <0 0xee800000 0 0x80000>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
+				0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
+				0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
+				0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+			/* Map all possible DDR as inbound ranges */
+			dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
+			interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>,
+				<0 149 IRQ_TYPE_LEVEL_HIGH>,
+				<0 150 IRQ_TYPE_LEVEL_HIGH>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic 0 148 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 318>, <&pcie_bus_clk>;
+			clock-names = "pcie", "pcie_bus";
+			power-domains = <&cpg>;
+			status = "disabled";
+		};
+	};
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
  2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
@ 2015-11-03  8:01 ` Geert Uytterhoeven
  2015-11-03  9:13 ` Phil Edworthy
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2015-11-03  8:01 UTC (permalink / raw)
  To: linux-sh

Hi Phil,

On Mon, Nov 2, 2015 at 6:31 PM, Phil Edworthy <phil.edworthy@renesas.com> wrote:
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -74,6 +74,15 @@
>                 clock-frequency = <0>;
>         };
>
> +       /* External PCIe clock - can be overridden by the board */
> +       pcie_bus_clk: pcie_bus_clk {
> +               compatible = "fixed-clock";
> +               #clock-cells = <0>;
> +               clock-frequency = <100000000>;
> +               clock-output-names = "pcie_bus";
> +               status = "disabled";
> +       };

This is generated by an external clock generator (9FGV0841AKILF on
Salvator-X). Hence I think it should be listed with a zero clock-frequency,
and be overridden in r8a7795-salvator-x.dts.

Hmm, that clock generator generates multiple clocks, so it should have a more
complex node. As PCIe always requires a 100 MHz external lock, I guess that's
why you modeled it that simpler way?

> @@ -682,6 +691,55 @@
>                                 };
>                         };
>                 };
> -       };
>
> +               pciec0: pcie@fe000000 {
> +                       compatible = "renesas,pcie-r8a7795";
> +                       reg = <0 0xfe000000 0 0x80000>;
> +                       #address-cells = <3>;
> +                       #size-cells = <2>;
> +                       bus-range = <0x00 0xff>;
> +                       device_type = "pci";
> +                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
> +                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
> +                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
> +                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
> +                       /* Map all possible DDR as inbound ranges */
> +                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
> +                       interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
> +                               <0 117 IRQ_TYPE_LEVEL_HIGH>,
> +                               <0 118 IRQ_TYPE_LEVEL_HIGH>;

As there are multiple interrupts, I recommend adding interrupt-names to the
DT bindings.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
  2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
  2015-11-03  8:01 ` Geert Uytterhoeven
@ 2015-11-03  9:13 ` Phil Edworthy
  2015-11-10  1:36 ` Simon Horman
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Phil Edworthy @ 2015-11-03  9:13 UTC (permalink / raw)
  To: linux-sh

SGkgR2VlcnQsDQoNCk9uIDAzIE5vdmVtYmVyIDIwMTUgMDg6MDEsIEdlZXJ0IHdyb3RlOg0KPiBP
biBNb24sIE5vdiAyLCAyMDE1IGF0IDY6MzEgUE0sIFBoaWwgRWR3b3J0aHkgPHBoaWwuZWR3b3J0
aHlAcmVuZXNhcy5jb20+DQo+IHdyb3RlOg0KPiA+IC0tLSBhL2FyY2gvYXJtNjQvYm9vdC9kdHMv
cmVuZXNhcy9yOGE3Nzk1LmR0c2kNCj4gPiArKysgYi9hcmNoL2FybTY0L2Jvb3QvZHRzL3JlbmVz
YXMvcjhhNzc5NS5kdHNpDQo+ID4gQEAgLTc0LDYgKzc0LDE1IEBADQo+ID4gICAgICAgICAgICAg
ICAgIGNsb2NrLWZyZXF1ZW5jeSA9IDwwPjsNCj4gPiAgICAgICAgIH07DQo+ID4NCj4gPiArICAg
ICAgIC8qIEV4dGVybmFsIFBDSWUgY2xvY2sgLSBjYW4gYmUgb3ZlcnJpZGRlbiBieSB0aGUgYm9h
cmQgKi8NCj4gPiArICAgICAgIHBjaWVfYnVzX2NsazogcGNpZV9idXNfY2xrIHsNCj4gPiArICAg
ICAgICAgICAgICAgY29tcGF0aWJsZSA9ICJmaXhlZC1jbG9jayI7DQo+ID4gKyAgICAgICAgICAg
ICAgICNjbG9jay1jZWxscyA9IDwwPjsNCj4gPiArICAgICAgICAgICAgICAgY2xvY2stZnJlcXVl
bmN5ID0gPDEwMDAwMDAwMD47DQo+ID4gKyAgICAgICAgICAgICAgIGNsb2NrLW91dHB1dC1uYW1l
cyA9ICJwY2llX2J1cyI7DQo+ID4gKyAgICAgICAgICAgICAgIHN0YXR1cyA9ICJkaXNhYmxlZCI7
DQo+ID4gKyAgICAgICB9Ow0KPiANCj4gVGhpcyBpcyBnZW5lcmF0ZWQgYnkgYW4gZXh0ZXJuYWwg
Y2xvY2sgZ2VuZXJhdG9yICg5RkdWMDg0MUFLSUxGIG9uDQo+IFNhbHZhdG9yLVgpLiBIZW5jZSBJ
IHRoaW5rIGl0IHNob3VsZCBiZSBsaXN0ZWQgd2l0aCBhIHplcm8gY2xvY2stZnJlcXVlbmN5LA0K
PiBhbmQgYmUgb3ZlcnJpZGRlbiBpbiByOGE3Nzk1LXNhbHZhdG9yLXguZHRzLg0KPiANCj4gSG1t
LCB0aGF0IGNsb2NrIGdlbmVyYXRvciBnZW5lcmF0ZXMgbXVsdGlwbGUgY2xvY2tzLCBzbyBpdCBz
aG91bGQgaGF2ZSBhIG1vcmUNCj4gY29tcGxleCBub2RlLiBBcyBQQ0llIGFsd2F5cyByZXF1aXJl
cyBhIDEwMCBNSHogZXh0ZXJuYWwgbG9jaywgSSBndWVzcyB0aGF0J3MNCj4gd2h5IHlvdSBtb2Rl
bGVkIGl0IHRoYXQgc2ltcGxlciB3YXk/DQpZZXMgYW5kIHRoZSBQQ0llIGRyaXZlciBkb2Vzbid0
IGNhcmUgd2hhdCB0aGUgY2xvY2sgcmF0ZSBpcy4gV2UgbmVlZCB0byBlbnN1cmUNCnRoYXQgdGhl
IGV4dGVybmFsIGNsb2NrIGlzIG9uLg0KDQo+ID4gQEAgLTY4Miw2ICs2OTEsNTUgQEANCj4gPiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07DQo+ID4gICAgICAgICAgICAgICAgICAg
ICAgICAgfTsNCj4gPiAgICAgICAgICAgICAgICAgfTsNCj4gPiAtICAgICAgIH07DQo+ID4NCj4g
PiArICAgICAgICAgICAgICAgcGNpZWMwOiBwY2llQGZlMDAwMDAwIHsNCj4gPiArICAgICAgICAg
ICAgICAgICAgICAgICBjb21wYXRpYmxlID0gInJlbmVzYXMscGNpZS1yOGE3Nzk1IjsNCj4gPiAr
ICAgICAgICAgICAgICAgICAgICAgICByZWcgPSA8MCAweGZlMDAwMDAwIDAgMHg4MDAwMD47DQo+
ID4gKyAgICAgICAgICAgICAgICAgICAgICAgI2FkZHJlc3MtY2VsbHMgPSA8Mz47DQo+ID4gKyAg
ICAgICAgICAgICAgICAgICAgICAgI3NpemUtY2VsbHMgPSA8Mj47DQo+ID4gKyAgICAgICAgICAg
ICAgICAgICAgICAgYnVzLXJhbmdlID0gPDB4MDAgMHhmZj47DQo+ID4gKyAgICAgICAgICAgICAg
ICAgICAgICAgZGV2aWNlX3R5cGUgPSAicGNpIjsNCj4gPiArICAgICAgICAgICAgICAgICAgICAg
ICByYW5nZXMgPSA8MHgwMTAwMDAwMCAwIDB4MDAwMDAwMDAgMCAweGZlMTAwMDAwIDAgMHgwMDEw
MDAwMA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwMDAwMCAwIDB4
ZmUyMDAwMDAgMCAweGZlMjAwMDAwIDAgMHgwMDIwMDAwMA0KPiA+ICsgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgMHgwMjAwMDAwMCAwIDB4MzAwMDAwMDAgMCAweDMwMDAwMDAwIDAgMHgw
ODAwMDAwMA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMDAwMCAw
IDB4MzgwMDAwMDAgMCAweDM4MDAwMDAwIDAgMHgwODAwMDAwMD47DQo+ID4gKyAgICAgICAgICAg
ICAgICAgICAgICAgLyogTWFwIGFsbCBwb3NzaWJsZSBERFIgYXMgaW5ib3VuZCByYW5nZXMgKi8N
Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICBkbWEtcmFuZ2VzID0gPDB4NDIwMDAwMDAgMCAw
eDQwMDAwMDAwIDAgMHg0MDAwMDAwMCAwDQo+IDB4NDAwMDAwMDA+Ow0KPiA+ICsgICAgICAgICAg
ICAgICAgICAgICAgIGludGVycnVwdHMgPSA8MCAxMTYgSVJRX1RZUEVfTEVWRUxfSElHSD4sDQo+
ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8MCAxMTcgSVJRX1RZUEVfTEVWRUxf
SElHSD4sDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8MCAxMTggSVJRX1RZ
UEVfTEVWRUxfSElHSD47DQo+IA0KPiBBcyB0aGVyZSBhcmUgbXVsdGlwbGUgaW50ZXJydXB0cywg
SSByZWNvbW1lbmQgYWRkaW5nIGludGVycnVwdC1uYW1lcyB0byB0aGUNCj4gRFQgYmluZGluZ3Mu
DQpJIGNvdWxkIGRvLCB0aG91Z2ggdW5mb3J0dW5hdGVseSB0aGUgaW50ZXJydXB0cyBhcmUgYSBi
aXQgb2YgYSBqdW1ibGUuIFRoZSBmaXJzdA0KY292ZXJzIE1TSSBhbmQgSU5UeCwgdGhlIHNlY29u
ZCBjb3ZlcnMgRE1BIGFuZCBNU0ksIHRoZSB0aGlyZCBpcyBhIG1peCBvZiBQTSwNCmVycm9ycyBh
bmQgTUFDIGNvbnRyb2wuDQoNClRoYW5rcw0KUGhpbA0K

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
  2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
  2015-11-03  8:01 ` Geert Uytterhoeven
  2015-11-03  9:13 ` Phil Edworthy
@ 2015-11-10  1:36 ` Simon Horman
  2015-11-10  9:15 ` Phil Edworthy
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2015-11-10  1:36 UTC (permalink / raw)
  To: linux-sh

On Tue, Nov 03, 2015 at 09:13:09AM +0000, Phil Edworthy wrote:
> Hi Geert,
> 
> On 03 November 2015 08:01, Geert wrote:
> > On Mon, Nov 2, 2015 at 6:31 PM, Phil Edworthy <phil.edworthy@renesas.com>
> > wrote:
> > > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > > @@ -74,6 +74,15 @@
> > >                 clock-frequency = <0>;
> > >         };
> > >
> > > +       /* External PCIe clock - can be overridden by the board */
> > > +       pcie_bus_clk: pcie_bus_clk {
> > > +               compatible = "fixed-clock";
> > > +               #clock-cells = <0>;
> > > +               clock-frequency = <100000000>;
> > > +               clock-output-names = "pcie_bus";
> > > +               status = "disabled";
> > > +       };
> > 
> > This is generated by an external clock generator (9FGV0841AKILF on
> > Salvator-X). Hence I think it should be listed with a zero clock-frequency,
> > and be overridden in r8a7795-salvator-x.dts.
> > 
> > Hmm, that clock generator generates multiple clocks, so it should have a more
> > complex node. As PCIe always requires a 100 MHz external lock, I guess that's
> > why you modeled it that simpler way?
> Yes and the PCIe driver doesn't care what the clock rate is. We need to ensure
> that the external clock is on.
> 
> > > @@ -682,6 +691,55 @@
> > >                                 };
> > >                         };
> > >                 };
> > > -       };
> > >
> > > +               pciec0: pcie@fe000000 {
> > > +                       compatible = "renesas,pcie-r8a7795";
> > > +                       reg = <0 0xfe000000 0 0x80000>;
> > > +                       #address-cells = <3>;
> > > +                       #size-cells = <2>;
> > > +                       bus-range = <0x00 0xff>;
> > > +                       device_type = "pci";
> > > +                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
> > > +                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
> > > +                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
> > > +                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
> > > +                       /* Map all possible DDR as inbound ranges */
> > > +                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0
> > 0x40000000>;
> > > +                       interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
> > > +                               <0 117 IRQ_TYPE_LEVEL_HIGH>,
> > > +                               <0 118 IRQ_TYPE_LEVEL_HIGH>;
> > 
> > As there are multiple interrupts, I recommend adding interrupt-names to the
> > DT bindings.
> I could do, though unfortunately the interrupts are a bit of a jumble. The first
> covers MSI and INTx, the second covers DMA and MSI, the third is a mix of PM,
> errors and MAC control.

I still think we need to use named interrupts.
Even if coming up with names for them is a bit of a challenge.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
  2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
                   ` (2 preceding siblings ...)
  2015-11-10  1:36 ` Simon Horman
@ 2015-11-10  9:15 ` Phil Edworthy
  2016-01-15 10:42 ` Geert Uytterhoeven
  2016-02-10  8:01 ` Geert Uytterhoeven
  5 siblings, 0 replies; 7+ messages in thread
From: Phil Edworthy @ 2015-11-10  9:15 UTC (permalink / raw)
  To: linux-sh

Hi Simon,

On 10 November 2015 01:37, Simon wrote:
> On Tue, Nov 03, 2015 at 09:13:09AM +0000, Phil Edworthy wrote:
> > Hi Geert,
> >
> > On 03 November 2015 08:01, Geert wrote:
> > > On Mon, Nov 2, 2015 at 6:31 PM, Phil Edworthy
> <phil.edworthy@renesas.com>
> > > wrote:
> > > > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > > > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > > > @@ -74,6 +74,15 @@
> > > >                 clock-frequency = <0>;
> > > >         };
> > > >
> > > > +       /* External PCIe clock - can be overridden by the board */
> > > > +       pcie_bus_clk: pcie_bus_clk {
> > > > +               compatible = "fixed-clock";
> > > > +               #clock-cells = <0>;
> > > > +               clock-frequency = <100000000>;
> > > > +               clock-output-names = "pcie_bus";
> > > > +               status = "disabled";
> > > > +       };
> > >
> > > This is generated by an external clock generator (9FGV0841AKILF on
> > > Salvator-X). Hence I think it should be listed with a zero clock-frequency,
> > > and be overridden in r8a7795-salvator-x.dts.
> > >
> > > Hmm, that clock generator generates multiple clocks, so it should have a more
> > > complex node. As PCIe always requires a 100 MHz external lock, I guess that's
> > > why you modeled it that simpler way?
> > Yes and the PCIe driver doesn't care what the clock rate is. We need to ensure
> > that the external clock is on.
> >
> > > > @@ -682,6 +691,55 @@
> > > >                                 };
> > > >                         };
> > > >                 };
> > > > -       };
> > > >
> > > > +               pciec0: pcie@fe000000 {
> > > > +                       compatible = "renesas,pcie-r8a7795";
> > > > +                       reg = <0 0xfe000000 0 0x80000>;
> > > > +                       #address-cells = <3>;
> > > > +                       #size-cells = <2>;
> > > > +                       bus-range = <0x00 0xff>;
> > > > +                       device_type = "pci";
> > > > +                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
> > > > +                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
> > > > +                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
> > > > +                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
> > > > +                       /* Map all possible DDR as inbound ranges */
> > > > +                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0
> > > 0x40000000>;
> > > > +                       interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
> > > > +                               <0 117 IRQ_TYPE_LEVEL_HIGH>,
> > > > +                               <0 118 IRQ_TYPE_LEVEL_HIGH>;
> > >
> > > As there are multiple interrupts, I recommend adding interrupt-names to the
> > > DT bindings.
> > I could do, though unfortunately the interrupts are a bit of a jumble. The first
> > covers MSI and INTx, the second covers DMA and MSI, the third is a mix of PM,
> > errors and MAC control.
> 
> I still think we need to use named interrupts.
> Even if coming up with names for them is a bit of a challenge.
Of course, if I add interrupt names to the DT bindings they will have to be optional
since there are Gen2 devices that already use the existing bindings. I'll add this to
to todo list...

Thanks
Phil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
  2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
                   ` (3 preceding siblings ...)
  2015-11-10  9:15 ` Phil Edworthy
@ 2016-01-15 10:42 ` Geert Uytterhoeven
  2016-02-10  8:01 ` Geert Uytterhoeven
  5 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2016-01-15 10:42 UTC (permalink / raw)
  To: linux-sh

On Mon, Nov 2, 2015 at 6:31 PM, Phil Edworthy <phil.edworthy@renesas.com> wrote:
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -682,6 +691,55 @@
>                                 };
>                         };
>                 };
> -       };
>
> +               pciec0: pcie@fe000000 {
> +                       compatible = "renesas,pcie-r8a7795";
> +                       reg = <0 0xfe000000 0 0x80000>;
> +                       #address-cells = <3>;
> +                       #size-cells = <2>;
> +                       bus-range = <0x00 0xff>;
> +                       device_type = "pci";
> +                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
> +                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
> +                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
> +                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
> +                       /* Map all possible DDR as inbound ranges */
> +                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
> +                       interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
> +                               <0 117 IRQ_TYPE_LEVEL_HIGH>,
> +                               <0 118 IRQ_TYPE_LEVEL_HIGH>;

<GIC_SPI ...> (x3)

> +                       #interrupt-cells = <1>;
> +                       interrupt-map-mask = <0 0 0 0>;
> +                       interrupt-map = <0 0 0 0 &gic 0 116 IRQ_TYPE_LEVEL_HIGH>;

... &gic GIC_SPI ...

> +                       clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
> +                       clock-names = "pcie", "pcie_bus";
> +                       power-domains = <&cpg>;
> +                       status = "disabled";
> +               };
> +
> +               pciec1: pcie@ee800000 {
> +                       compatible = "renesas,pcie-r8a7795";
> +                       reg = <0 0xee800000 0 0x80000>;
> +                       #address-cells = <3>;
> +                       #size-cells = <2>;
> +                       bus-range = <0x00 0xff>;
> +                       device_type = "pci";
> +                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
> +                               0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
> +                               0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
> +                               0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
> +                       /* Map all possible DDR as inbound ranges */
> +                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
> +                       interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>,
> +                               <0 149 IRQ_TYPE_LEVEL_HIGH>,
> +                               <0 150 IRQ_TYPE_LEVEL_HIGH>;

<GIC_SPI ...> (x3)

> +                       #interrupt-cells = <1>;
> +                       interrupt-map-mask = <0 0 0 0>;
> +                       interrupt-map = <0 0 0 0 &gic 0 148 IRQ_TYPE_LEVEL_HIGH>;

... &gic GIC_SPI ...

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes
  2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
                   ` (4 preceding siblings ...)
  2016-01-15 10:42 ` Geert Uytterhoeven
@ 2016-02-10  8:01 ` Geert Uytterhoeven
  5 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2016-02-10  8:01 UTC (permalink / raw)
  To: linux-sh

On Mon, Nov 2, 2015 at 6:31 PM, Phil Edworthy <phil.edworthy@renesas.com> wrote:
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -74,6 +74,15 @@
>                 clock-frequency = <0>;
>         };
>
> +       /* External PCIe clock - can be overridden by the board */
> +       pcie_bus_clk: pcie_bus_clk {

Please drop the "_clk" suffix from the device node's name.

> +               compatible = "fixed-clock";
> +               #clock-cells = <0>;
> +               clock-frequency = <100000000>;
> +               clock-output-names = "pcie_bus";

The "clock-output-names" property is optional and not needed. Please drop it,
the clock will be named after the device node's name.

> +               status = "disabled";
> +       };

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-10  8:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02 17:31 [PATCH 2/3] arm64: renesas: r8a7795: Add PCIe nodes Phil Edworthy
2015-11-03  8:01 ` Geert Uytterhoeven
2015-11-03  9:13 ` Phil Edworthy
2015-11-10  1:36 ` Simon Horman
2015-11-10  9:15 ` Phil Edworthy
2016-01-15 10:42 ` Geert Uytterhoeven
2016-02-10  8:01 ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.