2022-08-30 11:15:25

by Conor Dooley

[permalink] [raw]
Subject: [PATCH v2 0/9] New PolarFire SoC devkit devicetrees & 22.09 reference design updates

Hey all,

Some 6.1 targeted changes here.
Firstly, two new dev kits (one first-party & one from Aries Embedded).
They've been sitting in our vendor tree, so are being sent where they
belong.

Secondly, another release of our reference design for the Icicle kit
is due in September. Usually these do not really change much for the
devicetree, but this time around a pair of changes impact the memory
map.

The first of these is adding dma-ranges to the pcie controller. The
controller had some issues to begin with & with the current reference
design (v2022.05) would not work with mainline Linux nor has it since
reference design v2021.08. A combination of the property, a change
to the FPGA design & a small fix to the driver will get it working
with mainline again. The other non-backwards compatible change to the
reference design is moves of the peripherals instantiated in the
fabric. Currently they are fairly spread out & a common complaint has
been that this leaves little room in the fic3 section of the memory map
for custom peripherals without removing the existing ones.

This series depends on [0] so as not to add dtbs_check warnings. The
fabric clock support is added by [1].

Thanks,
Conor.

Changes since v1:
- made the polarberry part of an enum in patch 1

0 - https://lore.kernel.org/linux-gpio/[email protected]/
1 - https://lore.kernel.org/linux-clk/[email protected]/

Conor Dooley (7):
dt-bindings: riscv: microchip: document icicle reference design
dt-bindings: riscv: microchip: document the aries m100pfsevp
riscv: dts: microchip: add pci dma ranges for the icicle kit
riscv: dts: microchip: move the mpfs' pci node to -fabric.dtsi
riscv: dts: microchip: icicle: update pci address properties
riscv: dts: microchip: icicle: re-jig fabric peripheral addresses
riscv: dts: microchip: add a devicetree for aries' m100pfsevp

Shravan Chippa (1):
dt-bindings: riscv: microchip: document the sev kit

Vattipalli Praveen (1):
riscv: dts: microchip: add sevkit device tree

.../devicetree/bindings/riscv/microchip.yaml | 21 ++-
arch/riscv/boot/dts/microchip/Makefile | 3 +
.../dts/microchip/mpfs-icicle-kit-fabric.dtsi | 42 ++++-
.../boot/dts/microchip/mpfs-icicle-kit.dts | 3 +-
.../dts/microchip/mpfs-m100pfs-fabric.dtsi | 45 +++++
.../dts/microchip/mpfs-m100pfsevp-emmc.dts | 37 +++++
.../dts/microchip/mpfs-m100pfsevp-sdcard.dts | 37 +++++
.../boot/dts/microchip/mpfs-m100pfsevp.dtsi | 155 ++++++++++++++++++
.../dts/microchip/mpfs-polarberry-fabric.dtsi | 29 ++++
.../dts/microchip/mpfs-sev-kit-fabric.dtsi | 45 +++++
.../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 145 ++++++++++++++++
arch/riscv/boot/dts/microchip/mpfs.dtsi | 29 ----
12 files changed, 550 insertions(+), 41 deletions(-)
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-m100pfs-fabric.dtsi
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-m100pfsevp-emmc.dts
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-m100pfsevp-sdcard.dts
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-m100pfsevp.dtsi
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-sev-kit-fabric.dtsi
create mode 100644 arch/riscv/boot/dts/microchip/mpfs-sev-kit.dts

--
2.36.1


2022-08-30 11:17:29

by Conor Dooley

[permalink] [raw]
Subject: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

Add compatibles for both configurations of the Aries Embedded
M100PFSEVP SOM + EVK platform.

Link: https://www.aries-embedded.com/polarfire-soc-fpga-microsemi-m100pfs-som-mpfs025t-pcie-serdes
Signed-off-by: Conor Dooley <[email protected]>
---
Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/riscv/microchip.yaml b/Documentation/devicetree/bindings/riscv/microchip.yaml
index 485981fbfb4b..04ebd48caaa7 100644
--- a/Documentation/devicetree/bindings/riscv/microchip.yaml
+++ b/Documentation/devicetree/bindings/riscv/microchip.yaml
@@ -27,9 +27,12 @@ properties:

- items:
- enum:
+ - aries,m100pfsevp-emmc
+ - aries,m100pfsevp-sdcard
- sundance,polarberry
- const: microchip,mpfs

+
additionalProperties: true

...
--
2.36.1

2022-08-30 14:47:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 13:17, Conor Dooley wrote:
> Add compatibles for both configurations of the Aries Embedded
> M100PFSEVP SOM + EVK platform.
>
> Link: https://www.aries-embedded.com/polarfire-soc-fpga-microsemi-m100pfs-som-mpfs025t-pcie-serdes
> Signed-off-by: Conor Dooley <[email protected]>
> ---
> Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/riscv/microchip.yaml b/Documentation/devicetree/bindings/riscv/microchip.yaml
> index 485981fbfb4b..04ebd48caaa7 100644
> --- a/Documentation/devicetree/bindings/riscv/microchip.yaml
> +++ b/Documentation/devicetree/bindings/riscv/microchip.yaml
> @@ -27,9 +27,12 @@ properties:
>
> - items:
> - enum:
> + - aries,m100pfsevp-emmc
> + - aries,m100pfsevp-sdcard

Usually sd card is pluggable, so what is the actual difference here? For
example this one:
https://shop.aries-embedded.de/evaluation-kit/m/m100pfsevp/445/m100pfsevp-250baab
has eMMC and SD card...

> - sundance,polarberry
> - const: microchip,mpfs
>
> +

No need for line break.

Best regards,
Krzysztof

2022-08-30 15:47:59

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 15:37, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 30/08/2022 13:17, Conor Dooley wrote:
>> Add compatibles for both configurations of the Aries Embedded
>> M100PFSEVP SOM + EVK platform.
>>
>> Link: https://www.aries-embedded.com/polarfire-soc-fpga-microsemi-m100pfs-som-mpfs025t-pcie-serdes
>> Signed-off-by: Conor Dooley <[email protected]>
>> ---
>> Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/riscv/microchip.yaml b/Documentation/devicetree/bindings/riscv/microchip.yaml
>> index 485981fbfb4b..04ebd48caaa7 100644
>> --- a/Documentation/devicetree/bindings/riscv/microchip.yaml
>> +++ b/Documentation/devicetree/bindings/riscv/microchip.yaml
>> @@ -27,9 +27,12 @@ properties:
>>
>> - items:
>> - enum:
>> + - aries,m100pfsevp-emmc
>> + - aries,m100pfsevp-sdcard
>
> Usually sd card is pluggable, so what is the actual difference here? For
> example this one:
> https://shop.aries-embedded.de/evaluation-kit/m/m100pfsevp/445/m100pfsevp-250baab
> has eMMC and SD card...

Yeah, both are there but it is muxed by the bootloader using a GPIO. For
icicle this is done by a mux in the FPGA fabric instead. Tw dts were
needed so that the gpio-hog could be set correctly. Out of curiosity, I can
have the same compatible in multiple devicetrees right? In that case, it
would just be "aries,m100pfsevp" here and I could put that in both?
Would make things easier..

>
>> - sundance,polarberry
>> - const: microchip,mpfs
>>
>> +
>
> No need for line break.

Gah, that's a silly one to miss..

Conor.

2022-08-30 17:00:49

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 18:25, [email protected] wrote:
> On 30/08/2022 15:37, Krzysztof Kozlowski wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> On 30/08/2022 13:17, Conor Dooley wrote:
>>> Add compatibles for both configurations of the Aries Embedded
>>> M100PFSEVP SOM + EVK platform.
>>>
>>> Link: https://www.aries-embedded.com/polarfire-soc-fpga-microsemi-m100pfs-som-mpfs025t-pcie-serdes
>>> Signed-off-by: Conor Dooley <[email protected]>
>>> ---
>>> Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/riscv/microchip.yaml b/Documentation/devicetree/bindings/riscv/microchip.yaml
>>> index 485981fbfb4b..04ebd48caaa7 100644
>>> --- a/Documentation/devicetree/bindings/riscv/microchip.yaml
>>> +++ b/Documentation/devicetree/bindings/riscv/microchip.yaml
>>> @@ -27,9 +27,12 @@ properties:
>>>
>>> - items:
>>> - enum:
>>> + - aries,m100pfsevp-emmc
>>> + - aries,m100pfsevp-sdcard
>>
>> Usually sd card is pluggable, so what is the actual difference here? For
>> example this one:
>> https://shop.aries-embedded.de/evaluation-kit/m/m100pfsevp/445/m100pfsevp-250baab
>> has eMMC and SD card...
>
> Yeah, both are there but it is muxed by the bootloader using a GPIO. For
> icicle this is done by a mux in the FPGA fabric instead. T

Ah, this is still just one MMC controller - either as eMMC or as SD-card?

> w dts were
> needed so that the gpio-hog could be set correctly. Out of curiosity, I can
> have the same compatible in multiple devicetrees right? In that case, it
> would just be "aries,m100pfsevp" here and I could put that in both?
> Would make things easier..

Depends, but I would say for this case rather not. The compatible should
identify the board. If the boards are different, one compatible should
not identify both of them. Imagine U-Boot (or something else) trying to
match the DTS.

Best regards,
Krzysztof

2022-08-30 17:04:54

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 17:55, Krzysztof Kozlowski wrote:
> On 30/08/2022 18:25, [email protected] wrote:
>> On 30/08/2022 15:37, Krzysztof Kozlowski wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On 30/08/2022 13:17, Conor Dooley wrote:
>>>> Add compatibles for both configurations of the Aries Embedded
>>>> M100PFSEVP SOM + EVK platform.
>>>>
>>>> Link: https://www.aries-embedded.com/polarfire-soc-fpga-microsemi-m100pfs-som-mpfs025t-pcie-serdes
>>>> Signed-off-by: Conor Dooley <[email protected]>
>>>> ---
>>>> Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
>>>> 1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/riscv/microchip.yaml b/Documentation/devicetree/bindings/riscv/microchip.yaml
>>>> index 485981fbfb4b..04ebd48caaa7 100644
>>>> --- a/Documentation/devicetree/bindings/riscv/microchip.yaml
>>>> +++ b/Documentation/devicetree/bindings/riscv/microchip.yaml
>>>> @@ -27,9 +27,12 @@ properties:
>>>>
>>>> - items:
>>>> - enum:
>>>> + - aries,m100pfsevp-emmc
>>>> + - aries,m100pfsevp-sdcard
>>>
>>> Usually sd card is pluggable, so what is the actual difference here? For
>>> example this one:
>>> https://shop.aries-embedded.de/evaluation-kit/m/m100pfsevp/445/m100pfsevp-250baab
>>> has eMMC and SD card...
>>
>> Yeah, both are there but it is muxed by the bootloader using a GPIO. For
>> icicle this is done by a mux in the FPGA fabric instead. T
>
> Ah, this is still just one MMC controller - either as eMMC or as SD-card?

Yes.

>
>> w dts were
>> needed so that the gpio-hog could be set correctly. Out of curiosity, I can
>> have the same compatible in multiple devicetrees right? In that case, it
>> would just be "aries,m100pfsevp" here and I could put that in both?
>> Would make things easier..
>
> Depends, but I would say for this case rather not. The compatible should
> identify the board. If the boards are different, one compatible should
> not identify both of them. Imagine U-Boot (or something else) trying to
> match the DTS.

It is the same board though, the way the bootloader works is that if it
detects an SD-card it will use that to boot from, and if not will fall back
to the emmc.

2022-08-30 18:02:27

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 18:30, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 30/08/2022 19:59, [email protected] wrote:
>>>> w dts were
>>>> needed so that the gpio-hog could be set correctly. Out of curiosity, I can
>>>> have the same compatible in multiple devicetrees right? In that case, it
>>>> would just be "aries,m100pfsevp" here and I could put that in both?
>>>> Would make things easier..
>>>
>>> Depends, but I would say for this case rather not. The compatible should
>>> identify the board. If the boards are different, one compatible should
>>> not identify both of them. Imagine U-Boot (or something else) trying to
>>> match the DTS.
>>
>> It is the same board though, the way the bootloader works is that if it
>> detects an SD-card it will use that to boot from, and if not will fall back
>> to the emmc.
>
> Wait, I might miss that part. So this is exactly the same hardware with
> the same SoM/SoC, same eMMC and SD card, except that one has plugged
> this SD card (as it is hot-pluggable)?

yessir

2022-08-30 18:02:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 19:59, [email protected] wrote:
>>> w dts were
>>> needed so that the gpio-hog could be set correctly. Out of curiosity, I can
>>> have the same compatible in multiple devicetrees right? In that case, it
>>> would just be "aries,m100pfsevp" here and I could put that in both?
>>> Would make things easier..
>>
>> Depends, but I would say for this case rather not. The compatible should
>> identify the board. If the boards are different, one compatible should
>> not identify both of them. Imagine U-Boot (or something else) trying to
>> match the DTS.
>
> It is the same board though, the way the bootloader works is that if it
> detects an SD-card it will use that to boot from, and if not will fall back
> to the emmc.

Wait, I might miss that part. So this is exactly the same hardware with
the same SoM/SoC, same eMMC and SD card, except that one has plugged
this SD card (as it is hot-pluggable)?

Best regards,
Krzysztof

2022-08-30 18:03:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 20:35, [email protected] wrote:
> On 30/08/2022 18:30, Krzysztof Kozlowski wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> On 30/08/2022 19:59, [email protected] wrote:
>>>>> w dts were
>>>>> needed so that the gpio-hog could be set correctly. Out of curiosity, I can
>>>>> have the same compatible in multiple devicetrees right? In that case, it
>>>>> would just be "aries,m100pfsevp" here and I could put that in both?
>>>>> Would make things easier..
>>>>
>>>> Depends, but I would say for this case rather not. The compatible should
>>>> identify the board. If the boards are different, one compatible should
>>>> not identify both of them. Imagine U-Boot (or something else) trying to
>>>> match the DTS.
>>>
>>> It is the same board though, the way the bootloader works is that if it
>>> detects an SD-card it will use that to boot from, and if not will fall back
>>> to the emmc.
>>
>> Wait, I might miss that part. So this is exactly the same hardware with
>> the same SoM/SoC, same eMMC and SD card, except that one has plugged
>> this SD card (as it is hot-pluggable)?

Then two thoughts:
1. It is indeed one compatible because it is exactly the same hardware
(I don't consider plugged SD card as part of it, just like plugged USB).

2. Then I don't think you should have two boards in the kernel. It's
fine if bootloaders have two of them or to store an overlay in the
kernel or somewhere. But two boards for the same board differing by
hot-plug setup is not for Linux kernel.


Best regards,
Krzysztof

2022-08-30 18:05:12

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/9] dt-bindings: riscv: microchip: document the aries m100pfsevp

On 30/08/2022 18:47, Krzysztof Kozlowski wrote:
> On 30/08/2022 20:35, [email protected] wrote:
>> On 30/08/2022 18:30, Krzysztof Kozlowski wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On 30/08/2022 19:59, [email protected] wrote:
>>>>>> w dts were
>>>>>> needed so that the gpio-hog could be set correctly. Out of curiosity, I can
>>>>>> have the same compatible in multiple devicetrees right? In that case, it
>>>>>> would just be "aries,m100pfsevp" here and I could put that in both?
>>>>>> Would make things easier..
>>>>>
>>>>> Depends, but I would say for this case rather not. The compatible should
>>>>> identify the board. If the boards are different, one compatible should
>>>>> not identify both of them. Imagine U-Boot (or something else) trying to
>>>>> match the DTS.
>>>>
>>>> It is the same board though, the way the bootloader works is that if it
>>>> detects an SD-card it will use that to boot from, and if not will fall back
>>>> to the emmc.
>>>
>>> Wait, I might miss that part. So this is exactly the same hardware with
>>> the same SoM/SoC, same eMMC and SD card, except that one has plugged
>>> this SD card (as it is hot-pluggable)?
>
> Then two thoughts:
> 1. It is indeed one compatible because it is exactly the same hardware
> (I don't consider plugged SD card as part of it, just like plugged USB).

Cool.

>
> 2. Then I don't think you should have two boards in the kernel. It's
> fine if bootloaders have two of them or to store an overlay in the
> kernel or somewhere. But two boards for the same board differing by
> hot-plug setup is not for Linux kernel.

Fine by me too. Easy enough to sort that out in u-boot or w/e (and do
whatever suits in a vendor tree).

Thanks Krzysztof :)