linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window
@ 2019-05-17 16:11 Heinrich Schuchardt
  2019-05-17 20:08 ` Gregory CLEMENT
  2019-05-20 15:54 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2019-05-17 16:11 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King
  Cc: Mark Rutland, devicetree, Heinrich Schuchardt, linux-kernel,
	Rob Herring, linux-arm-kernel

Running a graphics adapter on the MACCHIATObin fails due to an
insufficently sized memory window.

Enlarge the memory window for the PCIe slot to 512 MiB.

With the patch I am able to use a GT710 graphics adapter with 1 GB onboard
memory.

These are the mapped memory areas that the graphics adapter is actually
using:

Region 0: Memory at cc000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at c0000000 (64-bit, prefetchable) [size=128M]
Region 3: Memory at c8000000 (64-bit, prefetchable) [size=32M]
Region 5: I/O ports at 1000 [size=128]
Expansion ROM at ca000000 [disabled] [size=512K]

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 329f8ceeebea..205071b45a32 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -184,6 +184,8 @@
 	num-lanes = <4>;
 	num-viewport = <8>;
 	reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>;
+	ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
+		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;
 	status = "okay";
 };

--
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window
  2019-05-17 16:11 [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window Heinrich Schuchardt
@ 2019-05-17 20:08 ` Gregory CLEMENT
  2019-05-17 20:55   ` Heinrich Schuchardt
  2019-05-20 15:54 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Gregory CLEMENT @ 2019-05-17 20:08 UTC (permalink / raw)
  To: Heinrich Schuchardt, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Russell King
  Cc: Mark Rutland, devicetree, Heinrich Schuchardt, linux-kernel,
	Rob Herring, Thomas Petazzoni, linux-arm-kernel

Hi Heinrich Schuchardt,

> Running a graphics adapter on the MACCHIATObin fails due to an
> insufficently sized memory window.
I think "insufficient" is enough or I miss something.

>
> Enlarge the memory window for the PCIe slot to 512 MiB.
>
> With the patch I am able to use a GT710 graphics adapter with 1 GB onboard
> memory.
>
> These are the mapped memory areas that the graphics adapter is actually
> using:
>
> Region 0: Memory at cc000000 (32-bit, non-prefetchable) [size=16M]
> Region 1: Memory at c0000000 (64-bit, prefetchable) [size=128M]
> Region 3: Memory at c8000000 (64-bit, prefetchable) [size=32M]
> Region 5: I/O ports at 1000 [size=128]
> Expansion ROM at ca000000 [disabled] [size=512K]

From my point of view this patch is correct, I don't think it is a
problem to map more memory. So I applied on it mvebu/dt64.

But I add also Thomas in CC who know better the PCIe support on mvebu/

Thanks,

Gregory


>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> index 329f8ceeebea..205071b45a32 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> @@ -184,6 +184,8 @@
>  	num-lanes = <4>;
>  	num-viewport = <8>;
>  	reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>;
> +	ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
> +		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;
>  	status = "okay";
>  };
>
> --
> 2.20.1
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window
  2019-05-17 20:08 ` Gregory CLEMENT
@ 2019-05-17 20:55   ` Heinrich Schuchardt
  2019-05-17 21:26     ` Gregory CLEMENT
  0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2019-05-17 20:55 UTC (permalink / raw)
  To: Gregory CLEMENT, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Russell King
  Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
	Thomas Petazzoni, linux-arm-kernel

On 5/17/19 10:08 PM, Gregory CLEMENT wrote:
> Hi Heinrich Schuchardt,
>
>> Running a graphics adapter on the MACCHIATObin fails due to an
>> insufficently sized memory window.
> I think "insufficient" is enough or I miss something.

Thanks for reviewing. Do I have to resend with corrected wording?

>
>>
>> Enlarge the memory window for the PCIe slot to 512 MiB.
>>
>> With the patch I am able to use a GT710 graphics adapter with 1 GB onboard
>> memory.
>>
>> These are the mapped memory areas that the graphics adapter is actually
>> using:
>>
>> Region 0: Memory at cc000000 (32-bit, non-prefetchable) [size=16M]
>> Region 1: Memory at c0000000 (64-bit, prefetchable) [size=128M]
>> Region 3: Memory at c8000000 (64-bit, prefetchable) [size=32M]
>> Region 5: I/O ports at 1000 [size=128]
>> Expansion ROM at ca000000 [disabled] [size=512K]
>
>>From my point of view this patch is correct, I don't think it is a
> problem to map more memory. So I applied on it mvebu/dt64.
>

To which repository are your referring?

Best regards

Heinrich

> But I add also Thomas in CC who know better the PCIe support on mvebu/
>
> Thanks,
>
> Gregory
>
>
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
>> index 329f8ceeebea..205071b45a32 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
>> @@ -184,6 +184,8 @@
>>  	num-lanes = <4>;
>>  	num-viewport = <8>;
>>  	reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>;
>> +	ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
>> +		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;
>>  	status = "okay";
>>  };
>>
>> --
>> 2.20.1
>>
>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window
  2019-05-17 20:55   ` Heinrich Schuchardt
@ 2019-05-17 21:26     ` Gregory CLEMENT
  0 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2019-05-17 21:26 UTC (permalink / raw)
  To: Heinrich Schuchardt, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Russell King
  Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
	Thomas Petazzoni, linux-arm-kernel


> On 5/17/19 10:08 PM, Gregory CLEMENT wrote:
>> Hi Heinrich Schuchardt,
>>
>>> Running a graphics adapter on the MACCHIATObin fails due to an
>>> insufficently sized memory window.
>> I think "insufficient" is enough or I miss something.
>
> Thanks for reviewing. Do I have to resend with corrected wording?

Actually I was said that using an adverbe was the thing to do, so I've
just fix the typo by adding the missing "i". you don't have to resend
it.

>
>>
>>>
>>> Enlarge the memory window for the PCIe slot to 512 MiB.
>>>
>>> With the patch I am able to use a GT710 graphics adapter with 1 GB onboard
>>> memory.
>>>
>>> These are the mapped memory areas that the graphics adapter is actually
>>> using:
>>>
>>> Region 0: Memory at cc000000 (32-bit, non-prefetchable) [size=16M]
>>> Region 1: Memory at c0000000 (64-bit, prefetchable) [size=128M]
>>> Region 3: Memory at c8000000 (64-bit, prefetchable) [size=32M]
>>> Region 5: I/O ports at 1000 [size=128]
>>> Expansion ROM at ca000000 [disabled] [size=512K]
>>
>>>From my point of view this patch is correct, I don't think it is a
>> problem to map more memory. So I applied on it mvebu/dt64.
>>
>
> To which repository are your referring?

I thought it was documented in the MAINTAINER file but I was wrong, so I
will fix it.

I referred to git://git.infradead.org/linux-mvebu.git

this branch will be merged in our for-next branch when 5.2-rc1 will be
released, so it will be part of linux-next.

Gregory

>
> Best regards
>
> Heinrich
>
>> But I add also Thomas in CC who know better the PCIe support on mvebu/
>>
>> Thanks,
>>
>> Gregory
>>
>>
>>>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>> ---
>>>  arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
>>> index 329f8ceeebea..205071b45a32 100644
>>> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
>>> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
>>> @@ -184,6 +184,8 @@
>>>  	num-lanes = <4>;
>>>  	num-viewport = <8>;
>>>  	reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>;
>>> +	ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
>>> +		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;
>>>  	status = "okay";
>>>  };
>>>
>>> --
>>> 2.20.1
>>>
>>
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window
  2019-05-17 16:11 [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window Heinrich Schuchardt
  2019-05-17 20:08 ` Gregory CLEMENT
@ 2019-05-20 15:54 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-05-20 15:54 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree,
	Gregory Clement, Russell King, linux-kernel, Rob Herring,
	linux-arm-kernel, Sebastian Hesselbarth

Hello Heinrich,

On Fri, 17 May 2019 18:11:23 +0200
Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:

> Running a graphics adapter on the MACCHIATObin fails due to an
> insufficently sized memory window.
> 
> Enlarge the memory window for the PCIe slot to 512 MiB.
> 
> With the patch I am able to use a GT710 graphics adapter with 1 GB onboard
> memory.
> 
> These are the mapped memory areas that the graphics adapter is actually
> using:
> 
> Region 0: Memory at cc000000 (32-bit, non-prefetchable) [size=16M]
> Region 1: Memory at c0000000 (64-bit, prefetchable) [size=128M]
> Region 3: Memory at c8000000 (64-bit, prefetchable) [size=32M]
> Region 5: I/O ports at 1000 [size=128]
> Expansion ROM at ca000000 [disabled] [size=512K]
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> index 329f8ceeebea..205071b45a32 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> @@ -184,6 +184,8 @@
>  	num-lanes = <4>;
>  	num-viewport = <8>;
>  	reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>;
> +	ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
> +		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;

While I understand the change, I find it is a bit of a "one-off"
solution, which will only work specifically for the MacchiatoBin. But
admittedly, there isn't really a good generic solution: depending on
the number of PCIe ports and what you connect to them, you will need
windows of different sizes.

On older Armada platforms, it works a bit better because we have a
single PCIe MEM aperture and a single PCIe I/O aperture, from which all
PCIe ports allocate: each PCIe interface is a child bus of an emulated
root port.

Unfortunately, on Armada 7K/8K, each PCIe interface is seen as an
independent root complex, so we have one PCIe I/O aperture and one PCIe
MEM aperture for each.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-05-20 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 16:11 [PATCH 1/1] arm64: dts: marvell: mcbin: enlarge PCI memory window Heinrich Schuchardt
2019-05-17 20:08 ` Gregory CLEMENT
2019-05-17 20:55   ` Heinrich Schuchardt
2019-05-17 21:26     ` Gregory CLEMENT
2019-05-20 15:54 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).