Skip to contentSkip to conversation

Update the Icicle Kit device tree

PATCH Superseded [email protected] 5 participants 28 messages Jan 17, 2022 – Jan 25, 2022

Subsystems (12)
Device tree bindings USB GPIO RISC-V +8 more subsystems

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

v4 cover Update the Icicle Kit device tree

From: Conor Dooley <[email protected]>

This series updates the Microchip Icicle Kit device tree by adding a host of peripherals, and some updates to the memory map. In addition, the device tree has been split into a third part, which contains "soft" peripherals that are in the fpga fabric.

Several of the entries are for peripherals that have not get had their drivers upstreamed, so in those cases the dt bindings are included where appropriate in order to avoid the many "DT compatible string <x> appears un-documented" errors.

Depends on mpfs clock driver series [1] to provide:
dt-bindings/clock/microchip,mpfs-clock.h
and on the other changes to the icicle/mpfs device tree from geert that are already in linux/riscv/for-next.

Additionally, the interrupt-extended warnings on the plic/clint are cleared by [2] & [3].

[1] https://lore.kernel.org/linux-clk/[email protected]/T/
[2] https://lore.kernel.org/linux-riscv/[email protected]/
[3] https://lore.kernel.org/linux-riscv/[email protected]/

Changes from v3:
- drop "mailbox: change mailbox-mpfs compatible string", already upstream:
commit f10b1fc0161cd99e
- fix copy paste error in microchip,mpfs-mailbox dt-binding
- remove whitespace in syscontroller dt entry

Changes from v2:
- dropped plic int header & corresponding defines in dts{,i}
- use $ref to drmode in mpfs-musb binding
- split changes to dts{,i} again: functional changes to existing elements now are in a new patch
- drop num-cs property in mpfs-spi binding
- dont make the system controller a simple-mfd
- move the separate bindings for rng/generic system services into the system controller binding
- added an instance corei2c as i2c2 in the fabric dtsi
- add version numbering to corepwm and corei2c compat string (-rtl-vN)

Conor Dooley (14):
dt-bindings: soc/microchip: update syscontroller compatibles
dt-bindings: soc/microchip: add services as children of sys ctrlr
dt-bindings: i2c: add bindings for microchip mpfs i2c
dt-bindings: rtc: add bindings for microchip mpfs rtc
dt-bindings: gpio: add bindings for microchip mpfs gpio
dt-bindings: spi: add bindings for microchip mpfs spi
dt-bindings: usb: add bindings for microchip mpfs musb
dt-bindings: pwm: add microchip corepwm binding
riscv: dts: microchip: use clk defines for icicle kit
riscv: dts: microchip: add fpga fabric section to icicle kit
riscv: dts: microchip: refactor icicle kit device tree
riscv: dts: microchip: update peripherals in icicle kit device tree
riscv: dts: microchip: add new peripherals to icicle kit device tree
MAINTAINERS: update riscv/microchip entry

 .../bindings/gpio/microchip,mpfs-gpio.yaml    |  80 ++++++
 .../bindings/i2c/microchip,mpfs-i2c.yaml      |  55 ++++
 ...ilbox.yaml => microchip,mpfs-mailbox.yaml} |   6 +-
 .../bindings/pwm/microchip,corepwm.yaml       |  75 +++++
 .../bindings/rtc/microchip,mfps-rtc.yaml      |  63 +++++
 .../microchip,mpfs-sys-controller.yaml        |  73 +++++
 ...icrochip,polarfire-soc-sys-controller.yaml |  35 ---
 .../bindings/spi/microchip,mpfs-spi.yaml      |  52 ++++
 .../bindings/usb/microchip,mpfs-musb.yaml     |  59 ++++
 MAINTAINERS                                   |   2 +
 .../dts/microchip/microchip-mpfs-fabric.dtsi  |  25 ++
 .../microchip/microchip-mpfs-icicle-kit.dts   | 115 ++++++--
 .../boot/dts/microchip/microchip-mpfs.dtsi    | 262 +++++++++++++++---
 arch/riscv/configs/icicle_kit_defconfig       | 134 +++++++++
 14 files changed, 932 insertions(+), 104 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
 create mode 100644 Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml
 rename Documentation/devicetree/bindings/mailbox/{microchip,polarfire-soc-mailbox.yaml => microchip,mpfs-mailbox.yaml} (82%)
 create mode 100644 Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml
 create mode 100644 Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
 create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
 create mode 100644 Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
 create mode 100644 arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi
 create mode 100644 arch/riscv/configs/icicle_kit_defconfig
Signature · 1 line
2.32.0
author maintainer
#1 lore raw

PATCH v4 1/14 dt-bindings: soc/microchip: update syscontroller compatibles

From: Conor Dooley <[email protected]>

The Polarfire SoC is currently using two different compatible string prefixes. Fix this by changing "polarfire-soc-*" strings to "mpfs-*" in its system controller in order to match the compatible string used in the soc binding and device tree

---
 ...larfire-soc-mailbox.yaml => microchip,mpfs-mailbox.yaml} | 6 +++---
 ...s-controller.yaml => microchip,mpfs-sys-controller.yaml} | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
 rename Documentation/devicetree/bindings/mailbox/{microchip,polarfire-soc-mailbox.yaml => microchip,mpfs-mailbox.yaml} (82%)
 rename Documentation/devicetree/bindings/soc/microchip/{microchip,polarfire-soc-sys-controller.yaml => microchip,mpfs-sys-controller.yaml} (75%)
Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml renamed from Documentation/devicetree/bindings/mailbox/microchip,polarfire-soc-mailbox.yaml +3 -3
similarity index 82%
rename from Documentation/devicetree/bindings/mailbox/microchip,polarfire-soc-mailbox.yaml
rename to Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml
index bbb173ea483c..082d397d3e89 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: "http://devicetree.org/schemas/mailbox/microchip,polarfire-soc-mailbox.yaml#"
+$id: "http://devicetree.org/schemas/mailbox/microchip,mpfs-mailbox.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
 title: Microchip PolarFire SoC (MPFS) MSS (microprocessor subsystem) mailbox controller
@@ -11,7 +11,7 @@ maintainers:
 
 properties:
   compatible:
-    const: microchip,polarfire-soc-mailbox
+    const: microchip,mpfs-mailbox
 
   reg:
     items:
@@ -38,7 +38,7 @@ examples:
       #address-cells = <2>;
       #size-cells = <2>;
       mbox: mailbox@37020000 {
-        compatible = "microchip,polarfire-soc-mailbox";
+        compatible = "microchip,mpfs-mailbox";
         reg = <0x0 0x37020000 0x0 0x1000>, <0x0 0x2000318c 0x0 0x40>;
         interrupt-parent = <&L1>;
         interrupts = <96>;
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml renamed from Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml +3 -3
similarity index 75%
rename from Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
rename to Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
index 2cd3bc6bd8d6..f699772fedf3 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: "http://devicetree.org/schemas/soc/microchip/microchip,polarfire-soc-sys-controller.yaml#"
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,mpfs-sys-controller.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
 title: Microchip PolarFire SoC (MPFS) MSS (microprocessor subsystem) system controller
@@ -19,7 +19,7 @@ properties:
     maxItems: 1
 
   compatible:
-    const: microchip,polarfire-soc-sys-controller
+    const: microchip,mpfs-sys-controller
 
 required:
   - compatible
@@ -30,6 +30,6 @@ additionalProperties: false
 examples:
   - |
     syscontroller: syscontroller {
-      compatible = "microchip,polarfire-soc-sys-controller";
+      compatible = "microchip,mpfs-sys-controller";
       mboxes = <&mbox 0>;
     };
Signature · 1 line
2.32.0
author maintainer
#2 lore raw

PATCH v4 2/14 dt-bindings: soc/microchip: add services as children of sys ctrlr

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add mpfs-rng and mpfs-generic-services as children of the system controller.

---
 .../microchip,mpfs-sys-controller.yaml        | 44 +++++++++++++++++--
 1 file changed, 41 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml +41 -3
index f699772fedf3..b69386b1a3e1 100644
@@ -13,13 +13,45 @@ description: |
   The PolarFire SoC system controller is communicated with via a mailbox.
   This document describes the bindings for the client portion of that mailbox.
 
-
 properties:
   mboxes:
     maxItems: 1
 
   compatible:
-    const: microchip,mpfs-sys-controller
+    items:
+      - const: microchip,mpfs-sys-controller
+
+  rng:
+    type: object
+
+    description: |
+      The hardware random number generator on the Polarfire SoC is
+      accessed via the mailbox interface provided by the system controller
+
+    properties:
+      compatible:
+        const: microchip,mpfs-rng
+
+    required:
+      - compatible
+
+  sysserv:
+    type: object
+
+    description: |
+      The PolarFire SoC system controller is communicated with via a mailbox.
+      This binding represents several of the functions provided by the system
+      controller which do not belong in a specific subsystem, such as reading
+      the fpga device certificate, all of which follow the same format:
+        - a command + optional payload sent to the sys controller
+        - a status + a payload returned to Linux
+
+    properties:
+      compatible:
+        const: microchip,mpfs-generic-service
+
+    required:
+      - compatible
 
 required:
   - compatible
@@ -29,7 +61,13 @@ additionalProperties: false
 
 examples:
   - |
-    syscontroller: syscontroller {
+    syscontroller {
       compatible = "microchip,mpfs-sys-controller";
       mboxes = <&mbox 0>;
+      rng: rng {
+        compatible = "microchip,mpfs-rng";
+      };
+      sysserv: sysserv {
+        compatible = "microchip,mpfs-generic-service";
+      };
     };
Signature · 1 line
2.32.0
author maintainer
#3 lore raw

PATCH v4 3/14 dt-bindings: i2c: add bindings for microchip mpfs i2c

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add device tree bindings for the i2c controller on the Microchip PolarFire SoC.

---
 .../bindings/i2c/microchip,mpfs-i2c.yaml      | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +55 -0
new file mode 100644
index 000000000000..ced843e78844
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/microchip,mpfs-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS I2C Controller Device Tree Bindings
+
+maintainers:
+  - Daire McNamara <[email protected]>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
+      - microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-frequency:
+    description: |
+      Desired I2C bus clock frequency in Hz. As only Standard and Fast
+      modes are supported, possible values are 100000 and 400000.
+    enum: [100000, 400000]
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/microchip,mpfs-clock.h>
+    i2c@2010a000 {
+      compatible = "microchip,mpfs-i2c";
+      reg = <0x2010a000 0x1000>;
+      clocks = <&clkcfg CLK_I2C0>;
+      interrupt-parent = <&plic>;
+      interrupts = <58>;
+      clock-frequency = <100000>;
+    };
+...
Signature · 1 line
2.32.0
maintainer Reviewed-by on v4 3/14
#4 lore raw

Re: [PATCH v4 03/14] dt-bindings: i2c: add bindings for microchip mpfs i2c

Quoted 5 lines · On Mon, 17 Jan 2022 11:07:44 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the i2c controller on the Microchip PolarFire SoC.

Quoted 7 lines
---
 .../bindings/i2c/microchip,mpfs-i2c.yaml      | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml
#5 lore raw

Re: [PATCH v4 03/14] dt-bindings: i2c: add bindings for microchip mpfs i2c

In reply to [email protected]

Hi Conor,

Quoted 7 lines · On Mon, Jan 17, 2022 at 12:06 PM <[email protected]> wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the i2c controller on the Microchip PolarFire SoC.

Thanks for your patch!

Quoted 12 lines
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +9 -0
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/microchip,mpfs-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS I2C Controller Device Tree Bindings
+
+maintainers:

Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml line 19

Quoted 10 lines
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +10 -0
+  - Daire McNamara <[email protected]>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
+      - microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

Wouldn't it be more logical to have:

items:
- const: microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

?

If the IP core is reused, it can become:

items:
- enum:
- microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- microchip,<foo>-i2c # ...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

That way the driver can just match on the second (fallback) value, and no further driver changes will be needed (until v8 or later).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

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

author maintainer
#6 lore raw

Re: [PATCH v4 03/14] dt-bindings: i2c: add bindings for microchip mpfs i2c

Quoted 40 lines · Geert Uytterhoeven

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

Hi Conor,

Quoted 7 lines · On Mon, Jan 17, 2022 at 12:06 PM <[email protected]> wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the i2c controller on the Microchip PolarFire SoC.

Thanks for your patch!

Quoted 12 lines
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +9 -0
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/microchip,mpfs-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS I2C Controller Device Tree Bindings
+
+maintainers:

Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml line 19

Quoted 10 lines
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +10 -0
+  - Daire McNamara <[email protected]>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
+      - microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

Wouldn't it be more logical to have:

Quoted 5 lines

items:
- const: microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

?

This would be fine for mpfs-i2c since corei2c is a "superset" - but how would that look for the fabric core? I don't think falling back from the fabric core onto the "hard" one makes sense. This would mean the following two entries:

i2c2: i2c@44000000 { //fabric

	compatible = "microchip,corei2c-rtl-v7";
};
i2c1: i2c@2010b000 { //"hard" mpfs peripheral
	compatible = "microchip,mpfs-i2c", "microchip,corei2c-rtl-v7";
};

But this generates errors in dt_binding_check w/ your suggestion - so how about the following (similar to ti,omap4-i2c.yaml):

compatible:
oneOf:
- items:
- const: microchip,mpfs-i2c # Microchip PolarFire...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric...

Is there a prettier way than this duplication?

Quoted 23 lines

If the IP core is reused, it can become:

items:
- enum:
- microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- microchip,<foo>-i2c # ...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

That way the driver can just match on the second (fallback) value, and no further driver changes will be needed (until v8 or later).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#7 lore raw

Re: [PATCH v4 03/14] dt-bindings: i2c: add bindings for microchip mpfs i2c

Hi Conor,

Quoted 47 lines · On Thu, Jan 20, 2022 at 2:42 PM <[email protected]> wrote:
Quoted 36 lines · Geert Uytterhoeven
Quoted 7 lines · On Mon, Jan 17, 2022 at 12:06 PM <[email protected]> wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the i2c controller on the Microchip PolarFire SoC.

Thanks for your patch!

Quoted 12 lines
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +9 -0
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/microchip,mpfs-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS I2C Controller Device Tree Bindings
+
+maintainers:

Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml line 19

Quoted 10 lines
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml new file +10 -0
+  - Daire McNamara <[email protected]>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
+      - microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

Wouldn't it be more logical to have:

Quoted 5 lines

items:
- const: microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

?

This would be fine for mpfs-i2c since corei2c is a "superset" - but how would that look for the fabric core? I don't think falling back from the fabric core onto the "hard" one makes sense. This would mean the following two entries:

Quoted 6 lines

i2c2: i2c@44000000 { //fabric

        compatible = "microchip,corei2c-rtl-v7";
};
i2c1: i2c@2010b000 { //"hard" mpfs peripheral
        compatible = "microchip,mpfs-i2c", "microchip,corei2c-rtl-v7";
};

Oops, I missed that you have both forms.
But in se, they're the same IP core, just hard vs. soft? Then the below makes sense.

Quoted 11 lines

But this generates errors in dt_binding_check w/ your suggestion - so how about the following (similar to ti,omap4-i2c.yaml):

compatible:
oneOf:
- items:
- const: microchip,mpfs-i2c # Microchip PolarFire...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric...

Is there a prettier way than this duplication?

I'm afraid not, and the above scheme is used a lot.

Quoted 10 lines
Quoted 10 lines

If the IP core is reused, it can become:

items:
- enum:
- microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- microchip,<foo>-i2c # ...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

That way the driver can just match on the second (fallback) value, and no further driver changes will be needed (until v8 or later).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#8 lore raw

Re: [PATCH v4 03/14] dt-bindings: i2c: add bindings for microchip mpfs i2c

Quoted 24 lines

Hi Conor,

Quoted 14 lines · On Thu, Jan 20, 2022 at 2:42 PM <[email protected]> wrote:
Quoted 8 lines · Geert Uytterhoeven

On Mon, Jan 17, 2022 at 12:06 PM <[email protected]> wrote:
Wouldn't it be more logical to have:

items:
- const: microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

?

This would be fine for mpfs-i2c since corei2c is a "superset" - but how would that look for the fabric core? I don't think falling back from the fabric core onto the "hard" one makes sense. This would mean the following two entries:

Quoted 6 lines

i2c2: i2c@44000000 { //fabric

        compatible = "microchip,corei2c-rtl-v7";
};
i2c1: i2c@2010b000 { //"hard" mpfs peripheral
        compatible = "microchip,mpfs-i2c", "microchip,corei2c-rtl-v7";
};
Quoted 3 lines

Oops, I missed that you have both forms.
But in se, they're the same IP core, just hard vs. soft? Then the below makes sense.

A lot (but not all) of the peripherals on Polarfire SoC are "subsets" of the IP cores: I think corei2c is almost identical but for others the hard version has some of the optional features disabled or slight changes made.

If the IP is already written why not use it ;)

Quoted 11 lines
Quoted 11 lines

But this generates errors in dt_binding_check w/ your suggestion - so how about the following (similar to ti,omap4-i2c.yaml):

compatible:
oneOf:
- items:
- const: microchip,mpfs-i2c # Microchip PolarFire...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric...

Quoted 3 lines
Quoted 1 line

Is there a prettier way than this duplication?

I'm afraid not, and the above scheme is used a lot.

Fair enough!

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

If the IP core is reused, it can become:

items:
- enum:
- microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
- microchip,<foo>-i2c # ...
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core

That way the driver can just match on the second (fallback) value, and no further driver changes will be needed (until v8 or later).

author maintainer
#9 lore raw

PATCH v4 4/14 dt-bindings: rtc: add bindings for microchip mpfs rtc

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add device tree bindings for the real time clock on the Microchip PolarFire SoC.

---
 .../bindings/rtc/microchip,mfps-rtc.yaml      | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +63 -0
new file mode 100644
index 000000000000..d57460cbe5e3
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/microchip,mfps-rtc.yaml#
+
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip PolarFire Soc (MPFS) RTC Device Tree Bindings
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - Daire McNamara <[email protected]>
+  - Lewis Hanly <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 2
+
+  microchip,prescaler:
+    description: |
+      The prescaler divides the input frequency to create a time-based strobe (typically 1 Hz) for
+      the calendar counter. The Alarm and Compare Registers, in conjunction with the calendar
+      counter, facilitate time-matched events. To properly operate in Calendar or Binary mode,
+      the 26-bit prescaler must be programmed to generate a strobe to the RTC.
+    maxItems: 1
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: rtc
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/microchip,mpfs-clock.h>
+    rtc@20124000 {
+        compatible = "microchip,mpfs-rtc";
+        reg = <0x20124000 0x1000>;
+        clocks = <&clkcfg CLK_RTC>;
+        clock-names = "rtc";
+        interrupts = <80>, <81>;
+    };
+...
Signature · 1 line
2.32.0
maintainer
#10 lore raw

Re: [PATCH v4 04/14] dt-bindings: rtc: add bindings for microchip mpfs rtc

Quoted 34 lines · On Mon, Jan 17, 2022 at 11:07:45AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the real time clock on the Microchip PolarFire SoC.

---
 .../bindings/rtc/microchip,mfps-rtc.yaml      | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +16 -0
new file mode 100644
index 000000000000..d57460cbe5e3
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/microchip,mfps-rtc.yaml#
+
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip PolarFire Soc (MPFS) RTC Device Tree Bindings
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - Daire McNamara <[email protected]>
+  - Lewis Hanly <[email protected]>
+

Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml line 26

Quoted 10 lines
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +10 -0
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 2

Need to define what each one is.

Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml line 35

Quoted 9 lines
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +9 -0
+
+  microchip,prescaler:
+    description: |
+      The prescaler divides the input frequency to create a time-based strobe (typically 1 Hz) for
+      the calendar counter. The Alarm and Compare Registers, in conjunction with the calendar
+      counter, facilitate time-matched events. To properly operate in Calendar or Binary mode,
+      the 26-bit prescaler must be programmed to generate a strobe to the RTC.
+    maxItems: 1
+    $ref: /schemas/types.yaml#/definitions/uint32

Can't you calculate this based on the clock input freq?

Quoted 32 lines
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +28 -0
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: rtc
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/microchip,mpfs-clock.h>
+    rtc@20124000 {
+        compatible = "microchip,mpfs-rtc";
+        reg = <0x20124000 0x1000>;
+        clocks = <&clkcfg CLK_RTC>;
+        clock-names = "rtc";
+        interrupts = <80>, <81>;
+    };
+...
Signature · 1 line
2.32.0
author maintainer
#11 lore raw

Re: [PATCH v4 04/14] dt-bindings: rtc: add bindings for microchip mpfs rtc

Quoted 41 lines · Rob Herring

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

Quoted 38 lines · On Mon, Jan 17, 2022 at 11:07:45AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the real time clock on the Microchip PolarFire SoC.

---
  .../bindings/rtc/microchip,mfps-rtc.yaml      | 63 +++++++++++++++++++
  1 file changed, 63 insertions(+)

create mode 100644 Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml

Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +20 -0
new file mode 100644
index 000000000000..d57460cbe5e3
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/microchip,mfps-rtc.yaml#
+
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip PolarFire Soc (MPFS) RTC Device Tree Bindings
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - Daire McNamara <[email protected]>
+  - Lewis Hanly <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-rtc
Quoted 8 lines

Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml line 26

Quoted 6 lines
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +6 -0
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 2

Need to define what each one is.

Sure.

Quoted 11 lines

Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml line 35

Quoted 10 lines
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +9 -0
+
+  microchip,prescaler:
+    description: |
+      The prescaler divides the input frequency to create a time-based strobe (typically 1 Hz) for
+      the calendar counter. The Alarm and Compare Registers, in conjunction with the calendar
+      counter, facilitate time-matched events. To properly operate in Calendar or Binary mode,
+      the 26-bit prescaler must be programmed to generate a strobe to the RTC.
+    maxItems: 1
+    $ref: /schemas/types.yaml#/definitions/uint32
Quoted 1 line

Can't you calculate this based on the clock input freq?

I mistakenly thought this was set when the bitstream was programmed to the FPGA but it is just an APB register & should be calculated. I'll drop the property.

Quoted 33 lines
Quoted 33 lines
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml new file +28 -1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: rtc
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/microchip,mpfs-clock.h>
+    rtc@20124000 {
+        compatible = "microchip,mpfs-rtc";
+        reg = <0x20124000 0x1000>;
+        clocks = <&clkcfg CLK_RTC>;
+        clock-names = "rtc";
+        interrupts = <80>, <81>;
+    };
+...
--

2.32.0

author maintainer
#12 lore raw

PATCH v4 5/14 dt-bindings: gpio: add bindings for microchip mpfs gpio

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add device tree bindings for the gpio controller on the Microchip PolarFire SoC.

---
 .../bindings/gpio/microchip,mpfs-gpio.yaml    | 80 +++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml new file +80 -0
new file mode 100644
index 000000000000..47a76f0e32b9
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS GPIO Controller Device Tree Bindings
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - microchip,mpfs-gpio
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
+    minItems: 1
+    maxItems: 32
+
+  interrupt-controller: true
+
+  clocks:
+    maxItems: 1
+
+  "#gpio-cells":
+    const: 2
+
+  "#interrupt-cells":
+    const: 1
+
+  ngpios:
+    description:
+      The number of GPIOs available.
+    minimum: 1
+    maximum: 32
+    default: 32
+
+  gpio-controller: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#interrupt-cells"
+  - interrupt-controller
+  - "#gpio-cells"
+  - gpio-controller
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include "dt-bindings/clock/microchip,mpfs-clock.h"
+    gpio@20122000 {
+        compatible = "microchip,mpfs-gpio";
+        reg = <0x20122000 0x1000>;
+        clocks = <&clkcfg CLK_GPIO2>;
+        interrupt-parent = <&plic>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        interrupt-controller;
+        #interrupt-cells = <1>;
+        interrupts = <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>,
+                     <53>, <53>, <53>, <53>;
+    };
+...
Signature · 1 line
2.32.0
maintainer Reviewed-by on v4 5/14
#13 lore raw

Re: [PATCH v4 05/14] dt-bindings: gpio: add bindings for microchip mpfs gpio

Quoted 11 lines · On Mon, 17 Jan 2022 11:07:46 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the gpio controller on the Microchip PolarFire SoC.

---
 .../bindings/gpio/microchip,mpfs-gpio.yaml    | 80 +++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
author maintainer
#14 lore raw

PATCH v4 6/14 dt-bindings: spi: add bindings for microchip mpfs spi

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add device tree bindings for the {q,}spi controller on the Microchip PolarFire SoC.

---
 .../bindings/spi/microchip,mpfs-spi.yaml      | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml new file +52 -0
new file mode 100644
index 000000000000..ece261b8e963
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/microchip,mpfs-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS {Q,}SPI Controller Device Tree Bindings
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-spi
+      - microchip,mpfs-qspi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clock-names:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include "dt-bindings/clock/microchip,mpfs-clock.h"
+    spi@20108000 {
+        compatible = "microchip,mpfs-spi";
+        reg = <0x20108000 0x1000>;
+        clocks = <&clkcfg CLK_SPI0>;
+        interrupt-parent = <&plic>;
+        interrupts = <54>;
+        spi-max-frequency = <25000000>;
+    };
+...
Signature · 7 lines
2.32.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer Reviewed-by on v4 6/14
#15 lore raw

Re: [PATCH v4 06/14] dt-bindings: spi: add bindings for microchip mpfs spi

Quoted 11 lines · On Mon, 17 Jan 2022 11:07:47 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the {q,}spi controller on the Microchip PolarFire SoC.

---
 .../bindings/spi/microchip,mpfs-spi.yaml      | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
author maintainer
#16 lore raw

PATCH v4 7/14 dt-bindings: usb: add bindings for microchip mpfs musb

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add device tree bindings for the usb controller on the Microchip PolarFire SoC.

---
 .../bindings/usb/microchip,mpfs-musb.yaml     | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml new file +59 -0
new file mode 100644
index 000000000000..48c458c65848
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/microchip,mpfs-musb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MPFS USB Controller Device Tree Bindings
+
+allOf:
+  - $ref: usb-drd.yaml#
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - microchip,mpfs-musb
+
+  dr_mode: true
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 2
+    maxItems: 2
+
+  interrupt-names:
+    items:
+      - const: dma
+      - const: mc
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include "dt-bindings/clock/microchip,mpfs-clock.h"
+    usb@20201000 {
+        compatible = "microchip,mpfs-musb";
+        reg = <0x20201000 0x1000>;
+        clocks = <&clkcfg CLK_USB>;
+        interrupt-parent = <&plic>;
+        interrupts = <86>, <87>;
+        interrupt-names = "dma", "mc";
+        dr_mode = "host";
+    };
+
+...
Signature · 7 lines
2.32.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer Reviewed-by on v4 7/14
#17 lore raw

Re: [PATCH v4 07/14] dt-bindings: usb: add bindings for microchip mpfs musb

Quoted 11 lines · On Mon, 17 Jan 2022 11:07:48 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the usb controller on the Microchip PolarFire SoC.

---
 .../bindings/usb/microchip,mpfs-musb.yaml     | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
author maintainer
#18 lore raw

PATCH v4 8/14 dt-bindings: pwm: add microchip corepwm binding

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add device tree bindings for the Microchip fpga fabric based "core" PWM controller.

---
 .../bindings/pwm/microchip,corepwm.yaml       | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml
Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml new file +75 -0
new file mode 100644
index 000000000000..26a77cde2465
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/microchip,corepwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip ip core PWM controller bindings
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+description: |
+  corePWM is an 16 channel pulse width modulator FPGA IP
+
+  https://www.microsemi.com/existing-parts/parts/152118
+
+properties:
+  compatible:
+    items:
+      - const: microchip,corepwm-rtl-v4
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 2
+
+  microchip,sync-update:
+    description: |
+      In synchronous mode, all channels are updated at the beginning of the PWM period.
+      Asynchronous mode is relevant to applications such as LED control, where
+      synchronous updates are not required. Asynchronous mode lowers the area size,
+      reducing shadow register requirements. This can be set at run time, provided
+      SHADOW_REG_EN is asserted. SHADOW_REG_EN is set by the FPGA bitstream programmed
+      to the device.
+      Each bit corresponds to a PWM channel & represents whether synchronous mode is
+      possible for the PWM channel.
+
+    $ref: /schemas/types.yaml#/definitions/uint16
+    default: 0
+
+  microchip,dac-mode:
+    description: |
+      Optional, per-channel Low Ripple DAC mode is possible on this IP core. It creates
+      a minimum period pulse train whose High/Low average is that of the chosen duty
+      cycle. This "DAC" will have far better bandwidth and ripple performance than the
+      standard PWM algorithm can achieve.
+      Each bit corresponds to a PWM channel & represents whether dac mode is enabled
+      that PWM channel.
+
+    $ref: /schemas/types.yaml#/definitions/uint16
+    default: 0
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - "#pwm-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include "dt-bindings/clock/microchip,mpfs-clock.h"
+    pwm@41000000 {
+      compatible = "microchip,corepwm-rtl-v4";
+      microchip,sync-update = /bits/ 16 <0>;
+      clocks = <&clkcfg CLK_FIC3>;
+      reg = <0x41000000 0xF0>;
+      #pwm-cells = <2>;
+    };
Signature · 7 lines
2.32.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer Reviewed-by on v4 8/14
#19 lore raw

Re: [PATCH v4 08/14] dt-bindings: pwm: add microchip corepwm binding

Quoted 11 lines · On Mon, 17 Jan 2022 11:07:49 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the Microchip fpga fabric based "core" PWM controller.

---
 .../bindings/pwm/microchip,corepwm.yaml       | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml
author maintainer
#20 lore raw

PATCH v4 9/14 riscv: dts: microchip: use clk defines for icicle kit

In reply to [email protected]

From: Conor Dooley <[email protected]>

Update the Microchip Icicle kit device tree by replacing clock related magic numbers with their defined counterparts.

---
 .../microchip/microchip-mpfs-icicle-kit.dts   |  2 +-
 .../boot/dts/microchip/microchip-mpfs.dtsi    | 25 ++++++++++---------
 2 files changed, 14 insertions(+), 13 deletions(-)
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +1 -1
index 0c748ae1b006..6d19ba196f12 100644
@@ -31,7 +31,7 @@ cpus {
 	memory@80000000 {
 		device_type = "memory";
 		reg = <0x0 0x80000000 0x0 0x40000000>;
-		clocks = <&clkcfg 26>;
+		clocks = <&clkcfg CLK_DDRC>;
 	};
 };
 
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +13 -12
index 869aaf0d5c06..717e39b30a15 100644
@@ -2,6 +2,7 @@
 /* Copyright (c) 2020 Microchip Technology Inc */
 
 /dts-v1/;
+#include "dt-bindings/clock/microchip,mpfs-clock.h"
 
 / {
 	#address-cells = <2>;
@@ -14,7 +15,6 @@ cpus {
 		#size-cells = <0>;
 
 		cpu@0 {
-			clock-frequency = <0>;
 			compatible = "sifive,e51", "sifive,rocket0", "riscv";
 			device_type = "cpu";
 			i-cache-block-size = <64>;
@@ -22,6 +22,7 @@ cpu@0 {
 			i-cache-size = <16384>;
 			reg = <0>;
 			riscv,isa = "rv64imac";
+			clocks = <&clkcfg CLK_CPU>;
 			status = "disabled";
 
 			cpu0_intc: interrupt-controller {
@@ -32,7 +33,6 @@ cpu0_intc: interrupt-controller {
 		};
 
 		cpu@1 {
-			clock-frequency = <0>;
 			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
 			d-cache-block-size = <64>;
 			d-cache-sets = <64>;
@@ -48,6 +48,7 @@ cpu@1 {
 			mmu-type = "riscv,sv39";
 			reg = <1>;
 			riscv,isa = "rv64imafdc";
+			clocks = <&clkcfg CLK_CPU>;
 			tlb-split;
 			status = "okay";
 
@@ -59,7 +60,6 @@ cpu1_intc: interrupt-controller {
 		};
 
 		cpu@2 {
-			clock-frequency = <0>;
 			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
 			d-cache-block-size = <64>;
 			d-cache-sets = <64>;
@@ -75,6 +75,7 @@ cpu@2 {
 			mmu-type = "riscv,sv39";
 			reg = <2>;
 			riscv,isa = "rv64imafdc";
+			clocks = <&clkcfg CLK_CPU>;
 			tlb-split;
 			status = "okay";
 
@@ -86,7 +87,6 @@ cpu2_intc: interrupt-controller {
 		};
 
 		cpu@3 {
-			clock-frequency = <0>;
 			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
 			d-cache-block-size = <64>;
 			d-cache-sets = <64>;
@@ -102,6 +102,7 @@ cpu@3 {
 			mmu-type = "riscv,sv39";
 			reg = <3>;
 			riscv,isa = "rv64imafdc";
+			clocks = <&clkcfg CLK_CPU>;
 			tlb-split;
 			status = "okay";
 
@@ -113,7 +114,6 @@ cpu3_intc: interrupt-controller {
 		};
 
 		cpu@4 {
-			clock-frequency = <0>;
 			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
 			d-cache-block-size = <64>;
 			d-cache-sets = <64>;
@@ -129,6 +129,7 @@ cpu@4 {
 			mmu-type = "riscv,sv39";
 			reg = <4>;
 			riscv,isa = "rv64imafdc";
+			clocks = <&clkcfg CLK_CPU>;
 			tlb-split;
 			status = "okay";
 			cpu4_intc: interrupt-controller {
@@ -210,7 +211,7 @@ serial0: serial@20000000 {
 			interrupt-parent = <&plic>;
 			interrupts = <90>;
 			current-speed = <115200>;
-			clocks = <&clkcfg 8>;
+			clocks = <&clkcfg CLK_MMUART0>;
 			status = "disabled";
 		};
 
@@ -222,7 +223,7 @@ serial1: serial@20100000 {
 			interrupt-parent = <&plic>;
 			interrupts = <91>;
 			current-speed = <115200>;
-			clocks = <&clkcfg 9>;
+			clocks = <&clkcfg CLK_MMUART1>;
 			status = "disabled";
 		};
 
@@ -234,7 +235,7 @@ serial2: serial@20102000 {
 			interrupt-parent = <&plic>;
 			interrupts = <92>;
 			current-speed = <115200>;
-			clocks = <&clkcfg 10>;
+			clocks = <&clkcfg CLK_MMUART2>;
 			status = "disabled";
 		};
 
@@ -246,7 +247,7 @@ serial3: serial@20104000 {
 			interrupt-parent = <&plic>;
 			interrupts = <93>;
 			current-speed = <115200>;
-			clocks = <&clkcfg 11>;
+			clocks = <&clkcfg CLK_MMUART3>;
 			status = "disabled";
 		};
 
@@ -256,7 +257,7 @@ mmc: mmc@20008000 {
 			reg = <0x0 0x20008000 0x0 0x1000>;
 			interrupt-parent = <&plic>;
 			interrupts = <88>, <89>;
-			clocks = <&clkcfg 6>;
+			clocks = <&clkcfg CLK_MMC>;
 			max-frequency = <200000000>;
 			status = "disabled";
 		};
@@ -267,7 +268,7 @@ emac0: ethernet@20110000 {
 			interrupt-parent = <&plic>;
 			interrupts = <64>, <65>, <66>, <67>;
 			local-mac-address = [00 00 00 00 00 00];
-			clocks = <&clkcfg 4>, <&clkcfg 2>;
+			clocks = <&clkcfg CLK_MAC0>, <&clkcfg CLK_AHB>;
 			clock-names = "pclk", "hclk";
 			status = "disabled";
 			#address-cells = <1>;
@@ -280,7 +281,7 @@ emac1: ethernet@20112000 {
 			interrupt-parent = <&plic>;
 			interrupts = <70>, <71>, <72>, <73>;
 			local-mac-address = [00 00 00 00 00 00];
-			clocks = <&clkcfg 5>, <&clkcfg 2>;
+			clocks = <&clkcfg CLK_MAC1>, <&clkcfg CLK_AHB>;
 			status = "disabled";
 			clock-names = "pclk", "hclk";
 			#address-cells = <1>;
Signature · 7 lines
2.32.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author maintainer
#21 lore raw

PATCH v4 10/14 riscv: dts: microchip: add fpga fabric section to icicle kit

In reply to [email protected]

From: Conor Dooley <[email protected]>

Split the device tree for the Microchip MPFS into two sections by adding microchip-mpfs-fabric.dtsi, which contains peripherals contained in the FPGA fabric.

---
 .../dts/microchip/microchip-mpfs-fabric.dtsi  | 25 +++++++++++++++++++
 .../microchip/microchip-mpfs-icicle-kit.dts   |  8 ++++++
 .../boot/dts/microchip/microchip-mpfs.dtsi    |  1 +
 3 files changed, 34 insertions(+)
 create mode 100644 arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi
arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi new file +25 -0
new file mode 100644
index 000000000000..c1dcd56b0679
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/* Copyright (c) 2020-2021 Microchip Technology Inc */
+
+/ {
+	core_pwm0: pwm@41000000 {
+		compatible = "microchip,corepwm-rtl-v4";
+		reg = <0x0 0x41000000 0x0 0xF0>;
+		microchip,sync-update = /bits/ 16 <0>;
+		#pwm-cells = <2>;
+		clocks = <&clkcfg CLK_FIC3>;
+		status = "disabled";
+	};
+
+	i2c2: i2c@44000000 {
+		compatible = "microchip,corei2c-rtl-v7";
+		reg = <0x0 0x44000000 0x0 0x1000>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clocks = <&clkcfg CLK_FIC3>;
+		interrupt-parent = <&plic>;
+		interrupts = <122>;
+		clock-frequency = <100000>;
+		status = "disabled";
+	};
+};
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +8 -0
index 6d19ba196f12..ab803f71626a 100644
@@ -68,6 +68,10 @@ &mmc {
 	sd-uhs-sdr104;
 };
 
+&i2c2 {
+	status = "okay";
+};
+
 &emac0 {
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
@@ -86,3 +90,7 @@ phy1: ethernet-phy@9 {
 		ti,fifo-depth = <0x01>;
 	};
 };
+
+&core_pwm0 {
+	status = "okay";
+};
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +1 -0
index 717e39b30a15..c7d73756c9b8 100644
@@ -3,6 +3,7 @@
 
 /dts-v1/;
 #include "dt-bindings/clock/microchip,mpfs-clock.h"
+#include "microchip-mpfs-fabric.dtsi"
 
 / {
 	#address-cells = <2>;
Signature · 1 line
2.32.0
author maintainer
#22 lore raw

PATCH v4 11/14 riscv: dts: microchip: refactor icicle kit device tree

In reply to [email protected]

From: Conor Dooley <[email protected]>

Assorted minor changes to the MPFS/Icicle kit device tree:

- rename serial to mmuart to match microchip documentation
- move phy0 inside mac1 node to match phy configuration
- add labels where missing (cpus, cache controller)
- add missing address cells & interrupts to MACs

---
 .../microchip/microchip-mpfs-icicle-kit.dts   |  37 ++---
 .../boot/dts/microchip/microchip-mpfs.dtsi    |  65 +++++----
 arch/riscv/configs/icicle_kit_defconfig       | 134 ++++++++++++++++++
 3 files changed, 186 insertions(+), 50 deletions(-)
 create mode 100644 arch/riscv/configs/icicle_kit_defconfig
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +20 -17
index ab803f71626a..c51bd7cf500f 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/* Copyright (c) 2020 Microchip Technology Inc */
+/* Copyright (c) 2020-2021 Microchip Technology Inc */
 
 /dts-v1/;
 
@@ -13,11 +13,11 @@ / {
 	compatible = "microchip,mpfs-icicle-kit", "microchip,mpfs";
 
 	aliases {
-		ethernet0 = &emac1;
-		serial0 = &serial0;
-		serial1 = &serial1;
-		serial2 = &serial2;
-		serial3 = &serial3;
+		ethernet0 = &mac1;
+		serial0 = &mmuart0;
+		serial1 = &mmuart1;
+		serial2 = &mmuart2;
+		serial3 = &mmuart3;
 	};
 
 	chosen {
@@ -39,19 +39,19 @@ &refclk {
 	clock-frequency = <600000000>;
 };
 
-&serial0 {
+&mmuart0 {
 	status = "okay";
 };
 
-&serial1 {
+&mmuart1 {
 	status = "okay";
 };
 
-&serial2 {
+&mmuart2 {
 	status = "okay";
 };
 
-&serial3 {
+&mmuart3 {
 	status = "okay";
 };
 
@@ -61,7 +61,10 @@ &mmc {
 	bus-width = <4>;
 	disable-wp;
 	cap-sd-highspeed;
+	cap-mmc-highspeed;
 	card-detect-delay = <200>;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
 	sd-uhs-sdr12;
 	sd-uhs-sdr25;
 	sd-uhs-sdr50;
@@ -72,22 +75,22 @@ &i2c2 {
 	status = "okay";
 };
 
-&emac0 {
+&mac0 {
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
-	phy0: ethernet-phy@8 {
-		reg = <8>;
-		ti,fifo-depth = <0x01>;
-	};
 };
 
-&emac1 {
+&mac1 {
 	status = "okay";
 	phy-mode = "sgmii";
 	phy-handle = <&phy1>;
 	phy1: ethernet-phy@9 {
 		reg = <9>;
-		ti,fifo-depth = <0x01>;
+		ti,fifo-depth = <0x1>;
+	};
+	phy0: ethernet-phy@8 {
+		reg = <8>;
+		ti,fifo-depth = <0x1>;
 	};
 };
 
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +32 -33

176 lines not on this page · raw message

arch/riscv/configs/icicle_kit_defconfig new file +134 -0

134 lines not on this page · raw message

Signature · 1 line
2.32.0
author maintainer
#23 lore raw

Re: [PATCH v4 11/14] riscv: dts: microchip: refactor icicle kit device tree

Quoted 9 lines · On 17/01/2022 11:07, [email protected] wrote:

From: Conor Dooley <[email protected]>

Assorted minor changes to the MPFS/Icicle kit device tree:

- rename serial to mmuart to match microchip documentation
- move phy0 inside mac1 node to match phy configuration
- add labels where missing (cpus, cache controller)
- add missing address cells & interrupts to MACs

Quoted 5 lines
---
  .../microchip/microchip-mpfs-icicle-kit.dts   |  37 ++---
  .../boot/dts/microchip/microchip-mpfs.dtsi    |  65 +++++----
  arch/riscv/configs/icicle_kit_defconfig       | 134

last time i checked this was not a device tree change. what a mess i made of v3...
++++++++++++++++++

Quoted 432 lines
  3 files changed, 186 insertions(+), 50 deletions(-)

create mode 100644 arch/riscv/configs/icicle_kit_defconfig

arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +20 -17
index ab803f71626a..c51bd7cf500f 100644
@@ -1,5 +1,5 @@
  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/* Copyright (c) 2020 Microchip Technology Inc */
+/* Copyright (c) 2020-2021 Microchip Technology Inc */
 
  /dts-v1/;
 
@@ -13,11 +13,11 @@ / {
  	compatible = "microchip,mpfs-icicle-kit", "microchip,mpfs";
 
  	aliases {
-		ethernet0 = &emac1;
-		serial0 = &serial0;
-		serial1 = &serial1;
-		serial2 = &serial2;
-		serial3 = &serial3;
+		ethernet0 = &mac1;
+		serial0 = &mmuart0;
+		serial1 = &mmuart1;
+		serial2 = &mmuart2;
+		serial3 = &mmuart3;
  	};
 
  	chosen {
@@ -39,19 +39,19 @@ &refclk {
  	clock-frequency = <600000000>;
  };
 
-&serial0 {
+&mmuart0 {
  	status = "okay";
  };
 
-&serial1 {
+&mmuart1 {
  	status = "okay";
  };
 
-&serial2 {
+&mmuart2 {
  	status = "okay";
  };
 
-&serial3 {
+&mmuart3 {
  	status = "okay";
  };
 
@@ -61,7 +61,10 @@ &mmc {
  	bus-width = <4>;
  	disable-wp;
  	cap-sd-highspeed;
+	cap-mmc-highspeed;
  	card-detect-delay = <200>;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
  	sd-uhs-sdr12;
  	sd-uhs-sdr25;
  	sd-uhs-sdr50;
@@ -72,22 +75,22 @@ &i2c2 {
  	status = "okay";
  };
 
-&emac0 {
+&mac0 {
  	phy-mode = "sgmii";
  	phy-handle = <&phy0>;
-	phy0: ethernet-phy@8 {
-		reg = <8>;
-		ti,fifo-depth = <0x01>;
-	};
  };
 
-&emac1 {
+&mac1 {
  	status = "okay";
  	phy-mode = "sgmii";
  	phy-handle = <&phy1>;
  	phy1: ethernet-phy@9 {
  		reg = <9>;
-		ti,fifo-depth = <0x01>;
+		ti,fifo-depth = <0x1>;
+	};
+	phy0: ethernet-phy@8 {
+		reg = <8>;
+		ti,fifo-depth = <0x1>;
  	};
  };
 
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +32 -33
index c7d73756c9b8..62bd00092bcc 100644
@@ -1,5 +1,5 @@
  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/* Copyright (c) 2020 Microchip Technology Inc */
+/* Copyright (c) 2020-2021 Microchip Technology Inc */
 
  /dts-v1/;
  #include "dt-bindings/clock/microchip,mpfs-clock.h"
@@ -15,7 +15,7 @@ cpus {
  		#address-cells = <1>;
  		#size-cells = <0>;
 
-		cpu@0 {
+		cpu0: cpu@0 {
  			compatible = "sifive,e51", "sifive,rocket0", "riscv";
  			device_type = "cpu";
  			i-cache-block-size = <64>;
@@ -33,7 +33,7 @@ cpu0_intc: interrupt-controller {
  			};
  		};
 
-		cpu@1 {
+		cpu1: cpu@1 {
  			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
  			d-cache-block-size = <64>;
  			d-cache-sets = <64>;
@@ -60,7 +60,7 @@ cpu1_intc: interrupt-controller {
  			};
  		};
 
-		cpu@2 {
+		cpu2: cpu@2 {
  			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
  			d-cache-block-size = <64>;
  			d-cache-sets = <64>;
@@ -87,7 +87,7 @@ cpu2_intc: interrupt-controller {
  			};
  		};
 
-		cpu@3 {
+		cpu3: cpu@3 {
  			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
  			d-cache-block-size = <64>;
  			d-cache-sets = <64>;
@@ -114,7 +114,7 @@ cpu3_intc: interrupt-controller {
  			};
  		};
 
-		cpu@4 {
+		cpu4: cpu@4 {
  			compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
  			d-cache-block-size = <64>;
  			d-cache-sets = <64>;
@@ -152,8 +152,9 @@ soc {
  		compatible = "simple-bus";
  		ranges;
 
-		cache-controller@2010000 {
+		cctrllr: cache-controller@2010000 {
  			compatible = "sifive,fu540-c000-ccache", "cache";
+			reg = <0x0 0x2010000 0x0 0x1000>;
  			cache-block-size = <64>;
  			cache-level = <2>;
  			cache-sets = <1024>;
@@ -161,10 +162,9 @@ cache-controller@2010000 {
  			cache-unified;
  			interrupt-parent = <&plic>;
  			interrupts = <1>, <2>, <3>;
-			reg = <0x0 0x2010000 0x0 0x1000>;
  		};
 
-		clint@2000000 {
+		clint: clint@2000000 {
  			compatible = "sifive,fu540-c000-clint", "sifive,clint0";
  			reg = <0x0 0x2000000 0x0 0xC000>;
  			interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
@@ -174,6 +174,15 @@ clint@2000000 {
  					      <&cpu4_intc 3>, <&cpu4_intc 7>;
  		};
 
+		dma@3000000 {
+			compatible = "sifive,fu540-c000-pdma";
+			reg = <0x0 0x3000000 0x0 0x8000>;
+			interrupt-parent = <&plic>;
+			interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>,
+				     <30>;
+			#dma-cells = <1>;
+		};
+
  		plic: interrupt-controller@c000000 {
  			compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0";
  			reg = <0x0 0xc000000 0x0 0x4000000>;
@@ -188,15 +197,6 @@ plic: interrupt-controller@c000000 {
  			riscv,ndev = <186>;
  		};
 
-		dma@3000000 {
-			compatible = "sifive,fu540-c000-pdma";
-			reg = <0x0 0x3000000 0x0 0x8000>;
-			interrupt-parent = <&plic>;
-			interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>,
-				     <30>;
-			#dma-cells = <1>;
-		};
-
  		clkcfg: clkcfg@20002000 {
  			compatible = "microchip,mpfs-clkcfg";
  			reg = <0x0 0x20002000 0x0 0x1000>;
@@ -204,7 +204,7 @@ clkcfg: clkcfg@20002000 {
  			#clock-cells = <1>;
  		};
 
-		serial0: serial@20000000 {
+		mmuart0: serial@20000000 {
  			compatible = "ns16550a";
  			reg = <0x0 0x20000000 0x0 0x400>;
  			reg-io-width = <4>;
@@ -216,7 +216,7 @@ serial0: serial@20000000 {
  			status = "disabled";
  		};
 
-		serial1: serial@20100000 {
+		mmuart1: serial@20100000 {
  			compatible = "ns16550a";
  			reg = <0x0 0x20100000 0x0 0x400>;
  			reg-io-width = <4>;
@@ -228,7 +228,7 @@ serial1: serial@20100000 {
  			status = "disabled";
  		};
 
-		serial2: serial@20102000 {
+		mmuart2: serial@20102000 {
  			compatible = "ns16550a";
  			reg = <0x0 0x20102000 0x0 0x400>;
  			reg-io-width = <4>;
@@ -240,7 +240,7 @@ serial2: serial@20102000 {
  			status = "disabled";
  		};
 
-		serial3: serial@20104000 {
+		mmuart3: serial@20104000 {
  			compatible = "ns16550a";
  			reg = <0x0 0x20104000 0x0 0x400>;
  			reg-io-width = <4>;
@@ -257,37 +257,36 @@ mmc: mmc@20008000 {
  			compatible = "microchip,mpfs-sd4hc", "cdns,sd4hc";
  			reg = <0x0 0x20008000 0x0 0x1000>;
  			interrupt-parent = <&plic>;
-			interrupts = <88>, <89>;
+			interrupts = <88>;
  			clocks = <&clkcfg CLK_MMC>;
  			max-frequency = <200000000>;
  			status = "disabled";
  		};
 
-		emac0: ethernet@20110000 {
+		mac0: ethernet@20110000 {
  			compatible = "cdns,macb";
  			reg = <0x0 0x20110000 0x0 0x2000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
  			interrupt-parent = <&plic>;
-			interrupts = <64>, <65>, <66>, <67>;
+			interrupts = <64>, <65>, <66>, <67>, <68>, <69>;
  			local-mac-address = [00 00 00 00 00 00];
  			clocks = <&clkcfg CLK_MAC0>, <&clkcfg CLK_AHB>;
  			clock-names = "pclk", "hclk";
  			status = "disabled";
-			#address-cells = <1>;
-			#size-cells = <0>;
  		};
 
-		emac1: ethernet@20112000 {
+		mac1: ethernet@20112000 {
  			compatible = "cdns,macb";
  			reg = <0x0 0x20112000 0x0 0x2000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
  			interrupt-parent = <&plic>;
-			interrupts = <70>, <71>, <72>, <73>;
+			interrupts = <70>, <71>, <72>, <73>, <74>, <75>;
  			local-mac-address = [00 00 00 00 00 00];
  			clocks = <&clkcfg CLK_MAC1>, <&clkcfg CLK_AHB>;
-			status = "disabled";
  			clock-names = "pclk", "hclk";
-			#address-cells = <1>;
-			#size-cells = <0>;
+			status = "disabled";
  		};
-
  	};
  };
arch/riscv/configs/icicle_kit_defconfig new file +134 -0
new file mode 100644
index 000000000000..f484130e723d
@@ -0,0 +1,134 @@
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_CFS_BANDWIDTH=y
+CONFIG_CGROUP_BPF=y
+CONFIG_NAMESPACES=y
+CONFIG_USER_NS=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EXPERT=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_BPF_SYSCALL=y
+CONFIG_SOC_MICROCHIP_POLARFIRE=y
+CONFIG_SMP=y
+CONFIG_CMDLINE="earlyprintk earlycon=sbi debug uio_pdrv_genirq.of_id=generic-uio"
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_BLK_DEV_ZONED=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_NETLINK_DIAG=y
+CONFIG_PCI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_PCIE_MICROCHIP_HOST=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NBD=y
+CONFIG_BLK_DEV_NVME=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_ATA=y
+CONFIG_NETDEVICES=y
+CONFIG_MACB=y
+CONFIG_R8169=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_POLARFIRE_SOC=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MICROCHIP=y
+CONFIG_SPI=y
+CONFIG_SPI_POLARFIRE_SOC=y
+CONFIG_SPI_POLARFIRE_SOC_QSPI=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_POLARFIRE_SOC=y
+CONFIG_POWER_RESET=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_DRM=y
+CONFIG_DRM_RADEON=y
+CONFIG_DRM_NOUVEAU=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_ACM=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_POLARFIRE_SOC=y
+CONFIG_USB_INVENTRA_DMA=y
+CONFIG_USB_SERIAL=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_CADENCE=y
+CONFIG_MMC_SPI=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_POLARFIRE_SOC=y
+CONFIG_DMADEVICES=y
+CONFIG_SF_PDMA=y
+CONFIG_UIO=y
+CONFIG_UIO_PDRV_GENIRQ=y
+CONFIG_UIO_DMEM_GENIRQ=y
+CONFIG_UIO_MICROCHIP_CAN=y
+CONFIG_UIO_MICROCHIP_PDMA=y
+CONFIG_UIO_MICROCHIP_DMA=y
+CONFIG_MAILBOX=y
+CONFIG_POLARFIRE_SOC_MAILBOX=y
+CONFIG_POLARFIRE_SOC_SYS_CTRL=y
+CONFIG_POLARFIRE_SOC_GENERIC_SERVICE=y
+CONFIG_IIO=y
+CONFIG_IIO_SW_DEVICE=y
+CONFIG_IIO_SW_TRIGGER=y
+CONFIG_PAC193X=y
+CONFIG_PWM=y
+CONFIG_PWM_MICROCHIP_CORE=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_FANOTIFY=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
+CONFIG_EXFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_V4_1=y
+CONFIG_NFS_V4_2=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+CONFIG_WQ_WATCHDOG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_STACKTRACE=y
author maintainer
#24 lore raw

PATCH v4 12/14 riscv: dts: microchip: update peripherals in icicle kit device tree

In reply to [email protected]

From: Conor Dooley <[email protected]>

Assorted minor changes to the MPFS/Icicle kit device tree:

- enable mmuart4 instead of mmuart0
- remove sifive pdma
- split memory node to match updated fpga design
- move stdout path to serial1 to avoid collision with bootloader running on the e51

---
 .../microchip/microchip-mpfs-icicle-kit.dts   | 23 +++++++++++++------
 .../boot/dts/microchip/microchip-mpfs.dtsi    | 23 +++++++++++--------
 2 files changed, 29 insertions(+), 17 deletions(-)
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +16 -7
index c51bd7cf500f..dc5f351b10c4 100644
@@ -18,20 +18,29 @@ aliases {
 		serial1 = &mmuart1;
 		serial2 = &mmuart2;
 		serial3 = &mmuart3;
+		serial4 = &mmuart4;
 	};
 
 	chosen {
-		stdout-path = "serial0:115200n8";
+		stdout-path = "serial1:115200n8";
 	};
 
 	cpus {
 		timebase-frequency = <RTCCLK_FREQ>;
 	};
 
-	memory@80000000 {
+	ddrc_cache_lo: memory@80000000 {
 		device_type = "memory";
-		reg = <0x0 0x80000000 0x0 0x40000000>;
+		reg = <0x0 0x80000000 0x0 0x2e000000>;
 		clocks = <&clkcfg CLK_DDRC>;
+		status = "okay";
+	};
+
+	ddrc_cache_hi: memory@1000000000 {
+		device_type = "memory";
+		reg = <0x10 0x0 0x0 0x40000000>;
+		clocks = <&clkcfg CLK_DDRC>;
+		status = "okay";
 	};
 };
 
@@ -39,10 +48,6 @@ &refclk {
 	clock-frequency = <600000000>;
 };
 
-&mmuart0 {
-	status = "okay";
-};
-
 &mmuart1 {
 	status = "okay";
 };
@@ -55,6 +60,10 @@ &mmuart3 {
 	status = "okay";
 };
 
+&mmuart4 {
+	status = "okay";
+};
+
 &mmc {
 	status = "okay";
 
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +13 -10
index 62bd00092bcc..5e7aaaf42cde 100644
@@ -174,15 +174,6 @@ clint: clint@2000000 {
 					      <&cpu4_intc 3>, <&cpu4_intc 7>;
 		};
 
-		dma@3000000 {
-			compatible = "sifive,fu540-c000-pdma";
-			reg = <0x0 0x3000000 0x0 0x8000>;
-			interrupt-parent = <&plic>;
-			interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>,
-				     <30>;
-			#dma-cells = <1>;
-		};
-
 		plic: interrupt-controller@c000000 {
 			compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0";
 			reg = <0x0 0xc000000 0x0 0x4000000>;
@@ -213,7 +204,7 @@ mmuart0: serial@20000000 {
 			interrupts = <90>;
 			current-speed = <115200>;
 			clocks = <&clkcfg CLK_MMUART0>;
-			status = "disabled";
+			status = "disabled"; /* Reserved for the HSS */
 		};
 
 		mmuart1: serial@20100000 {
@@ -252,6 +243,18 @@ mmuart3: serial@20104000 {
 			status = "disabled";
 		};
 
+		mmuart4: serial@20106000 {
+			compatible = "ns16550a";
+			reg = <0x0 0x20106000 0x0 0x400>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+			interrupt-parent = <&plic>;
+			interrupts = <94>;
+			clocks = <&clkcfg CLK_MMUART4>;
+			current-speed = <115200>;
+			status = "disabled";
+		};
+
 		/* Common node entry for emmc/sd */
 		mmc: mmc@20008000 {
 			compatible = "microchip,mpfs-sd4hc", "cdns,sd4hc";
Signature · 1 line
2.32.0
author maintainer
#25 lore raw

PATCH v4 13/14 riscv: dts: microchip: add new peripherals to icicle kit device tree

In reply to [email protected]

From: Conor Dooley <[email protected]>

Add new peripherals to the MPFS, and enable them in the Icicle kit device tree:

2x SPI, QSPI, 3x GPIO, 2x I2C, Real Time Counter, PCIE controller, USB host & system controller.

---
 .../microchip/microchip-mpfs-icicle-kit.dts   |  53 ++++++
 .../boot/dts/microchip/microchip-mpfs.dtsi    | 168 ++++++++++++++++++
 2 files changed, 221 insertions(+)
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +53 -0
index dc5f351b10c4..cd2fe80fa81a 100644
@@ -80,6 +80,26 @@ &mmc {
 	sd-uhs-sdr104;
 };
 
+&spi0 {
+	status = "okay";
+};
+
+&spi1 {
+	status = "okay";
+};
+
+&qspi {
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&i2c1 {
+	status = "okay";
+};
+
 &i2c2 {
 	status = "okay";
 };
@@ -103,6 +123,39 @@ phy0: ethernet-phy@8 {
 	};
 };
 
+&gpio2 {
+	interrupts = <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>,
+		     <53>, <53>, <53>, <53>;
+	status = "okay";
+};
+
+&rtc {
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&mbox {
+	status = "okay";
+};
+
+&syscontroller {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+};
+
 &core_pwm0 {
 	status = "okay";
 };
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +168 -0

179 lines not on this page · raw message

Signature · 7 lines
2.32.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author maintainer
#26 lore raw

PATCH v4 14/14 MAINTAINERS: update riscv/microchip entry

In reply to [email protected]

From: Conor Dooley <[email protected]>

Update the RISC-V/Microchip entry by adding the microchip dts directory and myself as maintainer

---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
index 7a2345ce8521..3b1d6be7bd56 100644
@@ -16348,8 +16348,10 @@ K:	riscv
 
 RISC-V/MICROCHIP POLARFIRE SOC SUPPORT
 M:	Lewis Hanly <[email protected]>
+M:	Conor Dooley <[email protected]>
 L:	[email protected]
 S:	Supported
+F:	arch/riscv/boot/dts/microchip/
 F:	drivers/mailbox/mailbox-mpfs.c
 F:	drivers/soc/microchip/
 F:	include/soc/microchip/mpfs.h
Signature · 7 lines
2.32.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer
#27 lore raw

Re: (subset) [PATCH v4 00/14] Update the Icicle Kit device tree

In reply to [email protected]
Quoted 8 lines · On Mon, 17 Jan 2022 11:07:41 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

This series updates the Microchip Icicle Kit device tree by adding a host of peripherals, and some updates to the memory map. In addition, the device tree has been split into a third part, which contains "soft" peripherals that are in the fpga fabric.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[06/14] dt-bindings: spi: add bindings for microchip mpfs spi

        commit: 2da187304e556ac59cf2dacb323cc78ded988169

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

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