* [PATCH v2 0/2] Add R8A77980/Condor PCIe support
@ 2018-06-14 19:16 Sergei Shtylyov
2018-06-14 19:17 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add " Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sergei Shtylyov @ 2018-06-14 19:16 UTC (permalink / raw)
To: linux-arm-kernel
Hello!
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20180614v2-v4.17' tag. We're adding the R8A77980 PCIe related
device nodes and then enable PCIe on the Condor board. These patches depend
on the R8A77980 PCIe PHY driver support in order to work properly. Note that
in case the PCIe PHY driver is not enabled, the kernel will BUG() due to I/O
space page leak in the PCIe driver...
[1/2] arm64: dts: renesas: r8a77980: add PCIe support
[2/2] arm64: dts: renesas: condor: add PCIe support
WBR, Sergei
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add PCIe support 2018-06-14 19:16 [PATCH v2 0/2] Add R8A77980/Condor PCIe support Sergei Shtylyov @ 2018-06-14 19:17 ` Sergei Shtylyov 2018-06-20 8:49 ` Simon Horman 2018-06-14 19:19 ` [PATCH v2 2/2] arm64: dts: renesas: condor: " Sergei Shtylyov 2018-06-18 9:36 ` [PATCH v2 0/2] Add R8A77980/Condor " Simon Horman 2 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2018-06-14 19:17 UTC (permalink / raw) To: linux-arm-kernel Describe the PCIe PHY, PCIEC, and PCIe bus clock in the R8A77980 device tree. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- Changes in version 2: - merged in the PCIEC patch, renamed the patch, updated the description accordingly; - used R8A77980_PD_ALWAYS_ON in the "power-domains" props - mentioned Vladimir's original work and added his signoff. arch/arm64/boot/dts/renesas/r8a77980.dtsi | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) Index: renesas/arch/arm64/boot/dts/renesas/r8a77980.dtsi =================================================================== --- renesas.orig/arch/arm64/boot/dts/renesas/r8a77980.dtsi +++ renesas/arch/arm64/boot/dts/renesas/r8a77980.dtsi @@ -98,6 +98,13 @@ clock-frequency = <0>; }; + /* External PCIe clock - can be overridden by the board */ + pcie_bus_clk: pcie_bus { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + psci { compatible = "arm,psci-1.0", "arm,psci-0.2"; method = "smc"; @@ -402,6 +409,16 @@ status = "disabled"; }; + pcie_phy: pcie-phy at e65d0000 { + compatible = "renesas,r8a77980-pcie-phy"; + reg = <0 0xe65d0000 0 0x8000>; + #phy-cells = <0>; + clocks = <&cpg CPG_MOD 319>; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>; + resets = <&cpg 319>; + status = "disabled"; + }; + canfd: can at e66c0000 { compatible = "renesas,r8a77980-canfd", "renesas,rcar-gen3-canfd"; @@ -653,6 +670,38 @@ resets = <&cpg 408>; }; + pciec: pcie at fe000000 { + compatible = "renesas,pcie-r8a77980", + "renesas,pcie-rcar-gen3"; + 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 0x0100000 + 0x02000000 0 0xfe200000 0 0xfe200000 0 0x0200000 + 0x02000000 0 0x30000000 0 0x30000000 0 0x8000000 + 0x42000000 0 0x38000000 0 0x38000000 0 0x8000000 + >; + dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 + 0 0x80000000>; + interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 148 + IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>; + clock-names = "pcie", "pcie_bus"; + power-domains = <&sysc R8A77980_PD_ALWAYS_ON>; + resets = <&cpg 319>; + phys = <&pcie_phy>; + phy-names = "pcie"; + status = "disabled"; + }; + vspd0: vsp at fea20000 { compatible = "renesas,vsp2"; reg = <0 0xfea20000 0 0x5000>; ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add PCIe support 2018-06-14 19:17 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add " Sergei Shtylyov @ 2018-06-20 8:49 ` Simon Horman 0 siblings, 0 replies; 9+ messages in thread From: Simon Horman @ 2018-06-20 8:49 UTC (permalink / raw) To: linux-arm-kernel On Thu, Jun 14, 2018 at 10:17:46PM +0300, Sergei Shtylyov wrote: > Describe the PCIe PHY, PCIEC, and PCIe bus clock in the R8A77980 device > tree. > > Based on the original (and large) patch by Vladimir Barinov. > > Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> This looks good to me. Reviewed-by: Simon Horman <horms+renesas@verge.net.au> I am marking it as deferred pending acceptance of the renesas,r8a77980-pcie-phy binding. Please repost or otherwise ping me once that has happened. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] arm64: dts: renesas: condor: add PCIe support 2018-06-14 19:16 [PATCH v2 0/2] Add R8A77980/Condor PCIe support Sergei Shtylyov 2018-06-14 19:17 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add " Sergei Shtylyov @ 2018-06-14 19:19 ` Sergei Shtylyov 2018-06-18 9:36 ` [PATCH v2 0/2] Add R8A77980/Condor " Simon Horman 2 siblings, 0 replies; 9+ messages in thread From: Sergei Shtylyov @ 2018-06-14 19:19 UTC (permalink / raw) To: linux-arm-kernel Enable PCIe PHY and PCIEC and specify the PCIe bus clock for the Condor board. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- Changes in version 2: - mentioned Vladimir's original work and added his signoff; - refreshed the patch. arch/arm64/boot/dts/renesas/r8a77980-condor.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) Index: renesas/arch/arm64/boot/dts/renesas/r8a77980-condor.dts =================================================================== --- renesas.orig/arch/arm64/boot/dts/renesas/r8a77980-condor.dts +++ renesas/arch/arm64/boot/dts/renesas/r8a77980-condor.dts @@ -223,6 +223,18 @@ status = "okay"; }; +&pciec { + status = "okay"; +}; + +&pcie_bus_clk { + clock-frequency = <100000000>; +}; + +&pcie_phy { + status = "okay"; +}; + &pfc { avb_pins: avb { groups = "avb_mdio", "avb_rgmii"; ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/2] Add R8A77980/Condor PCIe support 2018-06-14 19:16 [PATCH v2 0/2] Add R8A77980/Condor PCIe support Sergei Shtylyov 2018-06-14 19:17 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add " Sergei Shtylyov 2018-06-14 19:19 ` [PATCH v2 2/2] arm64: dts: renesas: condor: " Sergei Shtylyov @ 2018-06-18 9:36 ` Simon Horman 2018-06-18 16:16 ` Sergei Shtylyov 2 siblings, 1 reply; 9+ messages in thread From: Simon Horman @ 2018-06-18 9:36 UTC (permalink / raw) To: linux-arm-kernel On Thu, Jun 14, 2018 at 10:16:32PM +0300, Sergei Shtylyov wrote: > Hello! > > Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's > 'renesas-devel-20180614v2-v4.17' tag. We're adding the R8A77980 PCIe related > device nodes and then enable PCIe on the Condor board. These patches depend > on the R8A77980 PCIe PHY driver support in order to work properly. Note that > in case the PCIe PHY driver is not enabled, the kernel will BUG() due to I/O > space page leak in the PCIe driver... Is that problem specific to the presence of PCIe nodes for condor/r8a77980 or is it also true of other (R-Car) boards where PCIe is enabled? Regardless, it sounds like these patches expose a kernel bug. Is it being fixed? > > [1/2] arm64: dts: renesas: r8a77980: add PCIe support > [2/2] arm64: dts: renesas: condor: add PCIe support > > WBR, Sergei > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/2] Add R8A77980/Condor PCIe support 2018-06-18 9:36 ` [PATCH v2 0/2] Add R8A77980/Condor " Simon Horman @ 2018-06-18 16:16 ` Sergei Shtylyov 2018-06-20 8:50 ` Simon Horman 0 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2018-06-18 16:16 UTC (permalink / raw) To: linux-arm-kernel On 06/18/2018 12:36 PM, Simon Horman wrote: >> Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's >> 'renesas-devel-20180614v2-v4.17' tag. We're adding the R8A77980 PCIe related >> device nodes and then enable PCIe on the Condor board. These patches depend >> on the R8A77980 PCIe PHY driver support in order to work properly. Note that >> in case the PCIe PHY driver is not enabled, the kernel will BUG() due to I/O >> space page leak in the PCIe driver... > > Is that problem specific to the presence of PCIe nodes for > condor/r8a77980 The nodes are safe unless they are enabled, so the Condor patch may be deferred untl I fix the PCI code. > condor/r8a77980 or is it also true of other (R-Car) boards where > PCIe is enabled? The leak happens every time the driver fails to probe later than pci_remap_iospace() is called but the BUG_ON() is only triggered by rhe 2nd try with EPROBE_DEFER returned previously. > Regardless, it sounds like these patches expose a kernel bug. > Is it being fixed? I'm working on a fix (which embraces several PCI drivers)... >> [1/2] arm64: dts: renesas: r8a77980: add PCIe support >> [2/2] arm64: dts: renesas: condor: add PCIe support WBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/2] Add R8A77980/Condor PCIe support 2018-06-18 16:16 ` Sergei Shtylyov @ 2018-06-20 8:50 ` Simon Horman 0 siblings, 0 replies; 9+ messages in thread From: Simon Horman @ 2018-06-20 8:50 UTC (permalink / raw) To: linux-arm-kernel On Mon, Jun 18, 2018 at 07:16:47PM +0300, Sergei Shtylyov wrote: > On 06/18/2018 12:36 PM, Simon Horman wrote: > > >> Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's > >> 'renesas-devel-20180614v2-v4.17' tag. We're adding the R8A77980 PCIe related > >> device nodes and then enable PCIe on the Condor board. These patches depend > >> on the R8A77980 PCIe PHY driver support in order to work properly. Note that > >> in case the PCIe PHY driver is not enabled, the kernel will BUG() due to I/O > >> space page leak in the PCIe driver... > > > > Is that problem specific to the presence of PCIe nodes for > > condor/r8a77980 > > The nodes are safe unless they are enabled, so the Condor patch may be > deferred untl I fix the PCI code. Understood. I would expect that given this is a but a fix would be backported to -stable in due course. But I agree its best to be cautious here. > > condor/r8a77980 or is it also true of other (R-Car) boards where > > PCIe is enabled? > > The leak happens every time the driver fails to probe later than > pci_remap_iospace() is called but the BUG_ON() is only triggered by rhe 2nd try > with EPROBE_DEFER returned previously. > > > Regardless, it sounds like these patches expose a kernel bug. > > Is it being fixed? > > I'm working on a fix (which embraces several PCI drivers)... > > >> [1/2] arm64: dts: renesas: r8a77980: add PCIe support > >> [2/2] arm64: dts: renesas: condor: add PCIe support > > WBR, Sergei > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/2] Add R8A77980/Condor PCIe support @ 2018-08-27 18:48 Sergei Shtylyov 2018-08-27 18:52 ` Sergei Shtylyov 0 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2018-08-27 18:48 UTC (permalink / raw) To: linux-arm-kernel Hello! Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's 'renesas-devel-20180827-v4.19-rc1' tag. We're adding the R8A77980 PCIe related device nodes and then enable PCIe on the Condor board. [1/2] arm64: dts: renesas: r8a77980: add PCIe support [2/2] arm64: dts: renesas: condor: add PCIe support WBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/2] Add R8A77980/Condor PCIe support 2018-08-27 18:48 Sergei Shtylyov @ 2018-08-27 18:52 ` Sergei Shtylyov 0 siblings, 0 replies; 9+ messages in thread From: Sergei Shtylyov @ 2018-08-27 18:52 UTC (permalink / raw) To: linux-arm-kernel v3, I meant to type... :-/ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-08-27 18:52 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-06-14 19:16 [PATCH v2 0/2] Add R8A77980/Condor PCIe support Sergei Shtylyov 2018-06-14 19:17 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77980: add " Sergei Shtylyov 2018-06-20 8:49 ` Simon Horman 2018-06-14 19:19 ` [PATCH v2 2/2] arm64: dts: renesas: condor: " Sergei Shtylyov 2018-06-18 9:36 ` [PATCH v2 0/2] Add R8A77980/Condor " Simon Horman 2018-06-18 16:16 ` Sergei Shtylyov 2018-06-20 8:50 ` Simon Horman -- strict thread matches above, loose matches on Subject: below -- 2018-08-27 18:48 Sergei Shtylyov 2018-08-27 18:52 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox