Skip to contentSkip to conversation

New PolarFire SoC devkit devicetrees & 22.09 reference design updates

PATCH Superseded Conor Dooley 3 participants 20 messages Aug 30, 2022

Subsystems (3)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Conor Dooley

author maintainer
#0 lore raw

v2 cover 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
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH v2 1/9 dt-bindings: riscv: microchip: document icicle reference design

The icicle kit reference design's v2022.09 release,made some changes to the memory map - including adding the ability to read the fabric clock controllers via the system controller bus & making the PCI controller work with upstream Linux.

While the PCI was not working in the v2022.03 design, so nothing is broken there in terms of backwards compatibility, the fabric clocks used in the v2022.03 design were chosen by the individual run of the synthesis tool. In the v2022.09 reference design, the clocks are fixed to use the "north west" fabric Clock Conditioning Circuitry.

Make use of a new compatible to denote that this is not backwards compatible.

---
 .../devicetree/bindings/riscv/microchip.yaml   | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/riscv/microchip.yaml +12 -6
index 1aa7336a9672..485981fbfb4b 100644
@@ -17,12 +17,18 @@ properties:
   $nodename:
     const: '/'
   compatible:
-    items:
-      - enum:
-          - microchip,mpfs-icicle-kit
-          - microchip,mpfs-icicle-reference-rtlv2203
-          - sundance,polarberry
-      - const: microchip,mpfs
+    oneOf:
+      - items:
+          - enum:
+              - microchip,mpfs-icicle-reference-rtlv2203
+              - microchip,mpfs-icicle-reference-rtlv2209
+          - const: microchip,mpfs-icicle-kit
+          - const: microchip,mpfs
+
+      - items:
+          - enum:
+              - sundance,polarberry
+          - const: microchip,mpfs
 
 additionalProperties: true
 
Signature · 1 line
2.36.1
author maintainer
#2 lore raw

PATCH v2 2/9 dt-bindings: riscv: microchip: document the aries m100pfsevp

In reply to Conor Dooley

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

---
 Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/riscv/microchip.yaml +3 -0
index 485981fbfb4b..04ebd48caaa7 100644
@@ -27,9 +27,12 @@ properties:
 
       - items:
           - enum:
+              - aries,m100pfsevp-emmc
+              - aries,m100pfsevp-sdcard
               - sundance,polarberry
           - const: microchip,mpfs
 
+
 additionalProperties: true
 
 ...
Signature · 1 line
2.36.1
#3 lore raw

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

Quoted 14 lines · Conor Dooley

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

---
 Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/riscv/microchip.yaml +0 -0
index 485981fbfb4b..04ebd48caaa7 100644

Documentation/devicetree/bindings/riscv/microchip.yaml properties: · line 31

Quoted 5 lines
Documentation/devicetree/bindings/riscv/microchip.yaml +2 -0
@@ -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...

Documentation/devicetree/bindings/riscv/microchip.yaml properties: · line 35

Quoted 4 lines
Documentation/devicetree/bindings/riscv/microchip.yaml +1 -0
               - sundance,polarberry
           - const: microchip,mpfs
 
+

No need for line break.

Best regards,
Krzysztof

author maintainer
#4 lore raw

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

Quoted 18 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 15 lines · Conor Dooley

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

---
 Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/riscv/microchip.yaml +0 -0
index 485981fbfb4b..04ebd48caaa7 100644
@@ -27,9 +27,12 @@ properties:
 
Quoted 9 lines

Documentation/devicetree/bindings/riscv/microchip.yaml properties: · line 31

Quoted 4 lines
Documentation/devicetree/bindings/riscv/microchip.yaml +2 -0
       - 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..

Quoted 7 lines

Documentation/devicetree/bindings/riscv/microchip.yaml properties: · line 35

Quoted 5 lines
Documentation/devicetree/bindings/riscv/microchip.yaml +1 -0
               - sundance,polarberry
           - const: microchip,mpfs
 
+

No need for line break.

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

Conor.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#5 lore raw

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

Quoted 29 lines · On 30/08/2022 18:25, [email protected] wrote:
Quoted 18 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 15 lines · Conor Dooley

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

---
 Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/riscv/microchip.yaml +0 -0
index 485981fbfb4b..04ebd48caaa7 100644
@@ -27,9 +27,12 @@ properties:
 
Quoted 9 lines

Documentation/devicetree/bindings/riscv/microchip.yaml properties: · line 31

Quoted 4 lines
Documentation/devicetree/bindings/riscv/microchip.yaml +2 -0
       - 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...

Quoted 2 lines

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?

Quoted 5 lines

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

author maintainer
#6 lore raw

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

Quoted 30 lines · Krzysztof Kozlowski
Quoted 29 lines · On 30/08/2022 18:25, [email protected] wrote:
Quoted 27 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 14 lines · Conor Dooley

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

---
 Documentation/devicetree/bindings/riscv/microchip.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/riscv/microchip.yaml +0 -0
index 485981fbfb4b..04ebd48caaa7 100644

Documentation/devicetree/bindings/riscv/microchip.yaml properties: · line 31

Quoted 5 lines
Documentation/devicetree/bindings/riscv/microchip.yaml +2 -0
@@ -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...

Quoted 4 lines
Quoted 2 lines

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.

Quoted 11 lines
Quoted 6 lines

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.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#7 lore raw

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

Quoted 6 lines · On 30/08/2022 19:59, [email protected] wrote:
Quoted 6 lines
Quoted 5 lines

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..

Quoted 8 lines
Quoted 4 lines

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

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#8 lore raw

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

Quoted 14 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 11 lines · On 30/08/2022 19:59, [email protected] wrote:
Quoted 10 lines
Quoted 5 lines

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.

Quoted 7 lines
Quoted 3 lines

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
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#9 lore raw

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

Quoted 15 lines · On 30/08/2022 20:35, [email protected] wrote:
Quoted 14 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 11 lines · On 30/08/2022 19:59, [email protected] wrote:
Quoted 10 lines
Quoted 5 lines

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.

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

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

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#10 lore raw

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

Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · On 30/08/2022 20:35, [email protected] wrote:
Quoted 18 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 14 lines · On 30/08/2022 19:59, [email protected] wrote:
Quoted 10 lines
Quoted 5 lines

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.

Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

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.

Quoted 5 lines

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 :)

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#11 lore raw

PATCH v2 3/9 dt-bindings: riscv: microchip: document the sev kit

In reply to Conor Dooley

From: Shravan Chippa <[email protected]>

Update devicetree bindings document with PolarFire SoC Video Kit, known by its "sev-kit" product code.

---
 Documentation/devicetree/bindings/riscv/microchip.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/riscv/microchip.yaml +1 -1
index 04ebd48caaa7..f8b9a3288437 100644
@@ -29,10 +29,10 @@ properties:
           - enum:
               - aries,m100pfsevp-emmc
               - aries,m100pfsevp-sdcard
+              - microchip,mpfs-sev-kit
               - sundance,polarberry
           - const: microchip,mpfs
 
-
 additionalProperties: true
 
 ...
Signature · 1 line
2.36.1
author maintainer
#12 lore raw

PATCH v2 4/9 riscv: dts: microchip: add pci dma ranges for the icicle kit

In reply to Conor Dooley

The recently removed, accidentally included, "matr0" property was used in place of a dma-ranges property. The PCI controller is non-functional with mainline Linux in the v2022.02 or later reference designs and has not worked without configuration of address-translation since v2021.08.

Add the address translation that will be used by the v2022.09 reference design & update the compatible used by the dts.

---
 arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi | 7 ++++++-
 arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts         | 3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi +6 -1
index 0d28858b83f2..c0fb9dd7b2c8 100644
@@ -2,7 +2,8 @@
 /* Copyright (c) 2020-2021 Microchip Technology Inc */
 
 / {
-	compatible = "microchip,mpfs-icicle-reference-rtlv2203", "microchip,mpfs";
+	compatible = "microchip,mpfs-icicle-reference-rtlv2209", "microchip,mpfs-icicle-kit",
+		     "microchip,mpfs";
 
 	core_pwm0: pwm@41000000 {
 		compatible = "microchip,corepwm-rtl-v4";
@@ -37,3 +38,7 @@ fabric_clk1: fabric-clk1 {
 		clock-frequency = <125000000>;
 	};
 };
+
+&pcie {
+	dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 0x1 0x00000000>;
+};
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts +2 -1
index f3f87ed2007f..5e2b8aa2ff64 100644
@@ -11,7 +11,8 @@
 
 / {
 	model = "Microchip PolarFire-SoC Icicle Kit";
-	compatible = "microchip,mpfs-icicle-kit", "microchip,mpfs";
+	compatible = "microchip,mpfs-icicle-reference-rtlv2209", "microchip,mpfs-icicle-kit",
+		     "microchip,mpfs";
 
 	aliases {
 		ethernet0 = &mac1;
Signature · 1 line
2.36.1
author maintainer
#13 lore raw

PATCH v2 5/9 riscv: dts: microchip: move the mpfs' pci node to -fabric.dtsi

In reply to Conor Dooley

In today's edition of moving things around:

The PCIe root port on PolarFire SoC is more part of the FPGA than of the Core Complex. It is located on the other side of the chip and, apart from its interrupts, most of its configuration is determined by the FPGA bitstream rather. This includes:

- address translation in both directions
- the addresses at which the config and data regions appear to the core complex
- the clocks used by the AXI bus
- the plic interrupt used

Moving the PCIe node to the -fabric.dtsi makes it clearer than a singular configuration for root port is not correct & allows the base SoC dtsi to be more easily included.

---
 .../dts/microchip/mpfs-icicle-kit-fabric.dtsi | 32 +++++++++++++++++--
 .../dts/microchip/mpfs-polarberry-fabric.dtsi | 29 +++++++++++++++++
 arch/riscv/boot/dts/microchip/mpfs.dtsi       | 29 -----------------
 3 files changed, 58 insertions(+), 32 deletions(-)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi +29 -3
index c0fb9dd7b2c8..a21440c8ee03 100644
@@ -37,8 +37,34 @@ fabric_clk1: fabric-clk1 {
 		#clock-cells = <0>;
 		clock-frequency = <125000000>;
 	};
-};
 
-&pcie {
-	dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 0x1 0x00000000>;
+	pcie: pcie@2000000000 {
+		compatible = "microchip,pcie-host-1.0";
+		#address-cells = <0x3>;
+		#interrupt-cells = <0x1>;
+		#size-cells = <0x2>;
+		device_type = "pci";
+		reg = <0x20 0x0 0x0 0x8000000>, <0x0 0x43000000 0x0 0x10000>;
+		reg-names = "cfg", "apb";
+		bus-range = <0x0 0x7f>;
+		interrupt-parent = <&plic>;
+		interrupts = <119>;
+		interrupt-map = <0 0 0 1 &pcie_intc 0>,
+				<0 0 0 2 &pcie_intc 1>,
+				<0 0 0 3 &pcie_intc 2>,
+				<0 0 0 4 &pcie_intc 3>;
+		interrupt-map-mask = <0 0 0 7>;
+		clocks = <&fabric_clk1>, <&fabric_clk1>, <&fabric_clk3>;
+		clock-names = "fic0", "fic1", "fic3";
+		ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
+		dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 0x1 0x00000000>;
+		msi-parent = <&pcie>;
+		msi-controller;
+		status = "disabled";
+		pcie_intc: interrupt-controller {
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+			interrupt-controller;
+		};
+	};
 };
arch/riscv/boot/dts/microchip/mpfs-polarberry-fabric.dtsi +29 -0
index 49380c428ec9..67303bc0e451 100644
@@ -13,4 +13,33 @@ fabric_clk1: fabric-clk1 {
 		#clock-cells = <0>;
 		clock-frequency = <125000000>;
 	};
+
+	pcie: pcie@2000000000 {
+		compatible = "microchip,pcie-host-1.0";
+		#address-cells = <0x3>;
+		#interrupt-cells = <0x1>;
+		#size-cells = <0x2>;
+		device_type = "pci";
+		reg = <0x20 0x0 0x0 0x8000000>, <0x0 0x43000000 0x0 0x10000>;
+		reg-names = "cfg", "apb";
+		bus-range = <0x0 0x7f>;
+		interrupt-parent = <&plic>;
+		interrupts = <119>;
+		interrupt-map = <0 0 0 1 &pcie_intc 0>,
+				<0 0 0 2 &pcie_intc 1>,
+				<0 0 0 3 &pcie_intc 2>,
+				<0 0 0 4 &pcie_intc 3>;
+		interrupt-map-mask = <0 0 0 7>;
+		clocks = <&fabric_clk1>, <&fabric_clk1>, <&fabric_clk3>;
+		clock-names = "fic0", "fic1", "fic3";
+		ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
+		msi-parent = <&pcie>;
+		msi-controller;
+		status = "disabled";
+		pcie_intc: interrupt-controller {
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+			interrupt-controller;
+		};
+	};
 };
arch/riscv/boot/dts/microchip/mpfs.dtsi +0 -29
index a1176260086a..5974066298e1 100644
@@ -464,35 +464,6 @@ usb: usb@20201000 {
 			status = "disabled";
 		};
 
-		pcie: pcie@2000000000 {
-			compatible = "microchip,pcie-host-1.0";
-			#address-cells = <0x3>;
-			#interrupt-cells = <0x1>;
-			#size-cells = <0x2>;
-			device_type = "pci";
-			reg = <0x20 0x0 0x0 0x8000000>, <0x0 0x43000000 0x0 0x10000>;
-			reg-names = "cfg", "apb";
-			bus-range = <0x0 0x7f>;
-			interrupt-parent = <&plic>;
-			interrupts = <119>;
-			interrupt-map = <0 0 0 1 &pcie_intc 0>,
-					<0 0 0 2 &pcie_intc 1>,
-					<0 0 0 3 &pcie_intc 2>,
-					<0 0 0 4 &pcie_intc 3>;
-			interrupt-map-mask = <0 0 0 7>;
-			clocks = <&fabric_clk1>, <&fabric_clk1>, <&fabric_clk3>;
-			clock-names = "fic0", "fic1", "fic3";
-			ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
-			msi-parent = <&pcie>;
-			msi-controller;
-			status = "disabled";
-			pcie_intc: interrupt-controller {
-				#address-cells = <0>;
-				#interrupt-cells = <1>;
-				interrupt-controller;
-			};
-		};
-
 		mbox: mailbox@37020000 {
 			compatible = "microchip,mpfs-mailbox";
 			reg = <0x0 0x37020000 0x0 0x1000>, <0x0 0x2000318C 0x0 0x40>;
Signature · 1 line
2.36.1
author maintainer
#14 lore raw

PATCH v2 6/9 riscv: dts: microchip: icicle: update pci address properties

In reply to Conor Dooley

For the v2022.09 reference design the PCI root port's data region has been moved to FIC1 from FIC0. This is a shorter path, allowing for higher clock rates and improved through-put. As a result, the address at which the PCIe's data region appears to the core complex has changed. The config region's address is unchanged.

As FIC0 is no longer used, its clock can be removed too.

---
 .../boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi +6 -5
index a21440c8ee03..32d51c4a5b0c 100644
@@ -2,6 +2,7 @@
 /* Copyright (c) 2020-2021 Microchip Technology Inc */
 
 / {
+
 	compatible = "microchip,mpfs-icicle-reference-rtlv2209", "microchip,mpfs-icicle-kit",
 		     "microchip,mpfs";
 
@@ -38,13 +39,13 @@ fabric_clk1: fabric-clk1 {
 		clock-frequency = <125000000>;
 	};
 
-	pcie: pcie@2000000000 {
+	pcie: pcie@3000000000 {
 		compatible = "microchip,pcie-host-1.0";
 		#address-cells = <0x3>;
 		#interrupt-cells = <0x1>;
 		#size-cells = <0x2>;
 		device_type = "pci";
-		reg = <0x20 0x0 0x0 0x8000000>, <0x0 0x43000000 0x0 0x10000>;
+		reg = <0x30 0x0 0x0 0x8000000>, <0x0 0x43000000 0x0 0x10000>;
 		reg-names = "cfg", "apb";
 		bus-range = <0x0 0x7f>;
 		interrupt-parent = <&plic>;
@@ -54,9 +55,9 @@ pcie: pcie@2000000000 {
 				<0 0 0 3 &pcie_intc 2>,
 				<0 0 0 4 &pcie_intc 3>;
 		interrupt-map-mask = <0 0 0 7>;
-		clocks = <&fabric_clk1>, <&fabric_clk1>, <&fabric_clk3>;
-		clock-names = "fic0", "fic1", "fic3";
-		ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
+		clocks = <&fabric_clk1>, <&fabric_clk3>;
+		clock-names = "fic1", "fic3";
+		ranges = <0x3000000 0x0 0x8000000 0x30 0x8000000 0x0 0x80000000>;
 		dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 0x1 0x00000000>;
 		msi-parent = <&pcie>;
 		msi-controller;
Signature · 1 line
2.36.1
#15 lore raw

Re: [PATCH v2 6/9] riscv: dts: microchip: icicle: update pci address properties

Quoted 5 lines · Conor Dooley

For the v2022.09 reference design the PCI root port's data region has been moved to FIC1 from FIC0. This is a shorter path, allowing for higher clock rates and improved through-put. As a result, the address at which the PCIe's data region appears to the core complex has changed. The config region's address is unchanged.

Did this also fix the 32bit address apperture issue which plagued getting pcie graphics cards sorted.

Signature · 4 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html
author maintainer
#16 lore raw

Re: [PATCH v2 6/9] riscv: dts: microchip: icicle: update pci address properties

Quoted 11 lines · Ben Dooks

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 5 lines · Conor Dooley

For the v2022.09 reference design the PCI root port's data region has been moved to FIC1 from FIC0. This is a shorter path, allowing for higher clock rates and improved through-put. As a result, the address at which the PCIe's data region appears to the core complex has changed. The config region's address is unchanged.

Did this also fix the 32bit address apperture issue which plagued getting pcie graphics cards sorted.

Eh, not this specific part of what is changing in v2022.09 - this will just allow us to close timing using higher clock rates. But another change that is landing in v2022.09 will (see patch 4/9). Performance is not going to be great, but 32 bit devices will work again... We've got some more stuff in the works that should help on the performance front, so hopefully that makes life easier for pcie graphics cards. soonTM on that one though ;)

Thanks,
Conor.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#17 lore raw

PATCH v2 7/9 riscv: dts: microchip: icicle: re-jig fabric peripheral addresses

In reply to Conor Dooley

When users try to add onto the reference design, they find that the current addresses that peripherals connected to Fabric InterConnect (FIC) 3 use are restrictive. For the v2022.09 reference design, the peripherals have been shifted down, leaving more contiguous address space for their custom IP/peripherals.

---
 arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi +4 -4
index 32d51c4a5b0c..98f04be0dc6b 100644
@@ -6,18 +6,18 @@ / {
 	compatible = "microchip,mpfs-icicle-reference-rtlv2209", "microchip,mpfs-icicle-kit",
 		     "microchip,mpfs";
 
-	core_pwm0: pwm@41000000 {
+	core_pwm0: pwm@40000000 {
 		compatible = "microchip,corepwm-rtl-v4";
-		reg = <0x0 0x41000000 0x0 0xF0>;
+		reg = <0x0 0x40000000 0x0 0xF0>;
 		microchip,sync-update-mask = /bits/ 32 <0>;
 		#pwm-cells = <2>;
 		clocks = <&fabric_clk3>;
 		status = "disabled";
 	};
 
-	i2c2: i2c@44000000 {
+	i2c2: i2c@40000200 {
 		compatible = "microchip,corei2c-rtl-v7";
-		reg = <0x0 0x44000000 0x0 0x1000>;
+		reg = <0x0 0x40000200 0x0 0x1000>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 		clocks = <&fabric_clk3>;
Signature · 1 line
2.36.1
author maintainer
#18 lore raw

PATCH v2 8/9 riscv: dts: microchip: add sevkit device tree

In reply to Conor Dooley

From: Vattipalli Praveen <[email protected]>

Add a basic dts for the Microchip Smart Embedded Vision dev kit. The SEV kit is an upcoming first party board, featuring an MPFS250T and:
- Dual Sony Camera Sensors (IMX334)
- IEEE 802.11 b/g/n 20MHz (1x1) Wi-Fi
- Bluetooth 5 Low Energy
- 4 GB DDR4 x64
- 2 GB LPDDR4 x32
- 1 GB SPI Flash
- 8 GB eMMC flash & SD card slot (multiplexed)
- HDMI2.0 Video Input/Output
- MIPI DSI Output
- MIPI CSI-2 Input

---
 arch/riscv/boot/dts/microchip/Makefile        |   1 +
 .../dts/microchip/mpfs-sev-kit-fabric.dtsi    |  45 ++++++
 .../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 145 ++++++++++++++++++
 3 files changed, 191 insertions(+)
 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
arch/riscv/boot/dts/microchip/Makefile +1 -0
index 39aae7b04f1c..f18477b2e86d 100644
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-icicle-kit.dtb
 dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-polarberry.dtb
+dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-sev-kit.dtb
 obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
arch/riscv/boot/dts/microchip/mpfs-sev-kit-fabric.dtsi new file +45 -0

45 lines not on this page · raw message

arch/riscv/boot/dts/microchip/mpfs-sev-kit.dts new file +145 -0

145 lines not on this page · raw message

Signature · 1 line
2.36.1
author maintainer
#19 lore raw

PATCH v2 9/9 riscv: dts: microchip: add a devicetree for aries' m100pfsevp

In reply to Conor Dooley

Add device trees for both configs used by the Aries Embedded M100PFSEVP. The M100OFSEVP consists of a MPFS250T on a SOM, featuring:
- 2GB DDR4 SDRAM dedicated to the HMS
- 512MB DDR4 SDRAM dedicated to the FPGA
- 32 MB SPI NOR Flash
- 4 GByte eMMC

and a carrier board with:
- 2x Gigabit Ethernet
- USB
- 2x UART
- 2x CAN
- TFT connector
- HSMC extension connector
- 3x PMOD extension connectors
- microSD-card slot

---
 arch/riscv/boot/dts/microchip/Makefile        |   2 +
 .../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 ++++++++++++++++++
 5 files changed, 276 insertions(+)
 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
arch/riscv/boot/dts/microchip/Makefile +2 -0
index f18477b2e86d..ea14afab0010 100644
@@ -1,5 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-icicle-kit.dtb
+dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-m100pfsevp-emmc.dtb
+dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-m100pfsevp-sdcard.dtb
 dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-polarberry.dtb
 dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-sev-kit.dtb
 obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
arch/riscv/boot/dts/microchip/mpfs-m100pfs-fabric.dtsi new file +45 -0

45 lines not on this page · raw message

arch/riscv/boot/dts/microchip/mpfs-m100pfsevp-emmc.dts new file +37 -0
new file mode 100644
index 000000000000..3a656c982781
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Original all-in-one devicetree:
+ * Copyright (C) 2021-2022 - Wolfgang Grandegger <[email protected]>
+ * Rewritten to use includes:
+ * Copyright (C) 2022 - Conor Dooley <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "mpfs-m100pfsevp.dtsi"
+
+/* Clock frequency (in Hz) of the rtcclk */
+#define RTCCLK_FREQ		1000000
+
+/ {
+	model = "Aries Embedded M100PFEVPS eMMC";
+	compatible = "aries,m100pfsevp-emmc", "microchip,mpfs";
+};
+
+&gpio0 {
+	emmc-sel-hog {
+		gpio-hog;
+		gpios = <12 0>;
+		output-low;
+	};
+};
+
+&mmc {
+	max-frequency = <50000000>;
+	bus-width = <8>;
+	cap-mmc-highspeed;
+	no-1-8-v;
+	non-removable;
+	disable-wp;
+	status = "okay";
+};
arch/riscv/boot/dts/microchip/mpfs-m100pfsevp-sdcard.dts new file +37 -0
new file mode 100644
index 000000000000..90fdeac22d24
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Original all-in-one devicetree:
+ * Copyright (C) 2021-2022 - Wolfgang Grandegger <[email protected]>
+ * Rewritten to use includes:
+ * Copyright (C) 2022 - Conor Dooley <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "mpfs-m100pfsevp.dtsi"
+
+/ {
+	model = "Aries Embedded M100PFEVPS sd-card";
+	compatible = "aries,m100pfsevp-sdcard", "microchip,mpfs";
+};
+
+&gpio0 {
+	sdcard-sel-hog {
+		gpio-hog;
+		gpios = <12 0>;
+		output-high;
+	};
+};
+
+&mmc {
+	max-frequency = <50000000>;
+	bus-width = <4>;
+	no-1-8-v;
+	cap-sd-highspeed;
+	sd-uhs-sdr12;
+	sd-uhs-sdr25;
+	sd-uhs-sdr50;
+	sd-uhs-sdr104;
+	disable-wp;
+	status = "okay";
+};
arch/riscv/boot/dts/microchip/mpfs-m100pfsevp.dtsi new file +155 -0

155 lines not on this page · raw message

Signature · 1 line
2.36.1