Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] pic64gx soc driver/binding changes
@ 2025-11-17 14:21 Conor Dooley
  2025-11-17 14:21 ` [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx Conor Dooley
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Conor Dooley @ 2025-11-17 14:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: conor, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Daire McNamara, devicetree, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

Mostly this is stuff that PH did last year, but rebased on top of
current work.

CC: Conor Dooley <conor@kernel.org>
CC: Rob Herring <robh@kernel.org>
CC: Krzysztof Kozlowski <krzk+dt@kernel.org>
CC: Daire McNamara <daire.mcnamara@microchip.com>
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-riscv@lists.infradead.org

Conor Dooley (1):
  dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on
    pic64gx

Pierre-Henry Moussay (2):
  dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx
    compatibility
  soc: microchip: mpfs-sys-controller: add support for pic64gx

 .../microchip,mpfs-mss-top-sysreg.yaml        | 14 +++-
 .../microchip,mpfs-sys-controller.yaml        |  4 +-
 drivers/soc/microchip/mpfs-sys-controller.c   | 74 ++++++++++++++-----
 3 files changed, 67 insertions(+), 25 deletions(-)

-- 
2.51.0


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

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

* [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx
  2025-11-17 14:21 [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
@ 2025-11-17 14:21 ` Conor Dooley
  2025-11-17 21:49   ` Rob Herring (Arm)
  2025-11-17 14:21 ` [PATCH v1 2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility Conor Dooley
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2025-11-17 14:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: conor, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Daire McNamara, devicetree, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

pic64gx has an identical sysreg syscon to mpfs, add it using a fallback.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../microchip/microchip,mpfs-mss-top-sysreg.yaml   | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml
index 44e4a50c3155..2c1efcdf59b7 100644
--- a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml
+++ b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml
@@ -15,10 +15,16 @@ description:
 
 properties:
   compatible:
-    items:
-      - const: microchip,mpfs-mss-top-sysreg
-      - const: syscon
-      - const: simple-mfd
+    oneOf:
+      - items:
+          - const: microchip,mpfs-mss-top-sysreg
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: microchip,pic64gx-mss-top-sysreg
+          - const: microchip,mpfs-mss-top-sysreg
+          - const: syscon
+          - const: simple-mfd
 
   reg:
     maxItems: 1
-- 
2.51.0


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

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

* [PATCH v1 2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility
  2025-11-17 14:21 [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
  2025-11-17 14:21 ` [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx Conor Dooley
@ 2025-11-17 14:21 ` Conor Dooley
  2025-11-17 21:49   ` Rob Herring (Arm)
  2025-11-17 14:21 ` [PATCH v1 3/3] soc: microchip: mpfs-sys-controller: add support for pic64gx Conor Dooley
  2026-03-03 17:09 ` [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
  3 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2025-11-17 14:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: conor, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Daire McNamara, devicetree, linux-riscv, Pierre-Henry Moussay

From: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>

pic64gx is not compatible with mpfs because due to the lack of FPGA
functionality some features are disabled. Notably, anything to do with
FPGA fabric contents is not supported.

Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/soc/microchip/microchip,mpfs-sys-controller.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
index a3fa04f3a1bd..6cebc19db4f5 100644
--- a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
+++ b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
@@ -24,7 +24,9 @@ properties:
     maxItems: 1
 
   compatible:
-    const: microchip,mpfs-sys-controller
+    enum:
+      - microchip,mpfs-sys-controller
+      - microchip,pic64gx-sys-controller
 
   microchip,bitstream-flash:
     $ref: /schemas/types.yaml#/definitions/phandle
-- 
2.51.0


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

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

* [PATCH v1 3/3] soc: microchip: mpfs-sys-controller: add support for pic64gx
  2025-11-17 14:21 [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
  2025-11-17 14:21 ` [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx Conor Dooley
  2025-11-17 14:21 ` [PATCH v1 2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility Conor Dooley
@ 2025-11-17 14:21 ` Conor Dooley
  2026-03-03 17:09 ` [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
  3 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2025-11-17 14:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: conor, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Daire McNamara, devicetree, linux-riscv, Pierre-Henry Moussay

From: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>

pic64gx is not compatible with mpfs because due to the lack of FPGA
functionality some features are disabled. Notably, anything to do with
FPGA fabric contents is not supported.

Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 drivers/soc/microchip/mpfs-sys-controller.c | 74 +++++++++++++++------
 1 file changed, 54 insertions(+), 20 deletions(-)

diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c
index 30bc45d17d34..02ab0875c911 100644
--- a/drivers/soc/microchip/mpfs-sys-controller.c
+++ b/drivers/soc/microchip/mpfs-sys-controller.c
@@ -36,6 +36,11 @@ struct mpfs_sys_controller {
 	struct kref consumers;
 };
 
+struct mpfs_syscon_config {
+	unsigned int nb_subdevs;
+	struct platform_device *subdevs;
+};
+
 int mpfs_blocking_transaction(struct mpfs_sys_controller *sys_controller, struct mpfs_mss_msg *msg)
 {
 	unsigned long timeout = msecs_to_jiffies(MPFS_SYS_CTRL_TIMEOUT_MS);
@@ -110,25 +115,11 @@ struct mtd_info *mpfs_sys_controller_get_flash(struct mpfs_sys_controller *mpfs_
 }
 EXPORT_SYMBOL(mpfs_sys_controller_get_flash);
 
-static struct platform_device subdevs[] = {
-	{
-		.name		= "mpfs-rng",
-		.id		= -1,
-	},
-	{
-		.name		= "mpfs-generic-service",
-		.id		= -1,
-	},
-	{
-		.name		= "mpfs-auto-update",
-		.id		= -1,
-	},
-};
-
 static int mpfs_sys_controller_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mpfs_sys_controller *sys_controller;
+	struct mpfs_syscon_config *of_data;
 	struct device_node *np;
 	int i, ret;
 
@@ -164,11 +155,17 @@ static int mpfs_sys_controller_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, sys_controller);
 
+	of_data = (struct mpfs_syscon_config *) device_get_match_data(dev);
+	if (!of_data) {
+		dev_err(dev, "Error getting match data\n");
+		return -EINVAL;
+	}
 
-	for (i = 0; i < ARRAY_SIZE(subdevs); i++) {
-		subdevs[i].dev.parent = dev;
-		if (platform_device_register(&subdevs[i]))
-			dev_warn(dev, "Error registering sub device %s\n", subdevs[i].name);
+	for (i = 0; i < of_data->nb_subdevs; i++) {
+		of_data->subdevs[i].dev.parent = dev;
+		if (platform_device_register(&of_data->subdevs[i]))
+			dev_warn(dev, "Error registering sub device %s\n",
+				 of_data->subdevs[i].name);
 	}
 
 	dev_info(&pdev->dev, "Registered MPFS system controller\n");
@@ -183,8 +180,45 @@ static void mpfs_sys_controller_remove(struct platform_device *pdev)
 	mpfs_sys_controller_put(sys_controller);
 }
 
+static struct platform_device mpfs_subdevs[] = {
+	{
+		.name		= "mpfs-rng",
+		.id		= -1,
+	},
+	{
+		.name		= "mpfs-generic-service",
+		.id		= -1,
+	},
+	{
+		.name		= "mpfs-auto-update",
+		.id		= -1,
+	},
+};
+
+static struct platform_device pic64gx_subdevs[] = {
+	{
+		.name		= "mpfs-rng",
+		.id		= -1,
+	},
+	{
+		.name		= "mpfs-generic-service",
+		.id		= -1,
+	},
+};
+
+static const struct mpfs_syscon_config mpfs_config = {
+	.nb_subdevs = ARRAY_SIZE(mpfs_subdevs),
+	.subdevs = mpfs_subdevs,
+};
+
+static const struct mpfs_syscon_config pic64gx_config = {
+	.nb_subdevs = ARRAY_SIZE(pic64gx_subdevs),
+	.subdevs = pic64gx_subdevs,
+};
+
 static const struct of_device_id mpfs_sys_controller_of_match[] = {
-	{.compatible = "microchip,mpfs-sys-controller", },
+	{.compatible = "microchip,mpfs-sys-controller", .data = &mpfs_config},
+	{.compatible = "microchip,pic64gx-sys-controller", .data = &pic64gx_config},
 	{},
 };
 MODULE_DEVICE_TABLE(of, mpfs_sys_controller_of_match);
-- 
2.51.0


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

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

* Re: [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx
  2025-11-17 14:21 ` [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx Conor Dooley
@ 2025-11-17 21:49   ` Rob Herring (Arm)
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2025-11-17 21:49 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Daire McNamara, Krzysztof Kozlowski, devicetree, linux-kernel,
	Conor Dooley, linux-riscv


On Mon, 17 Nov 2025 14:21:20 +0000, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> pic64gx has an identical sysreg syscon to mpfs, add it using a fallback.
> 
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>  .../microchip/microchip,mpfs-mss-top-sysreg.yaml   | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

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

* Re: [PATCH v1 2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility
  2025-11-17 14:21 ` [PATCH v1 2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility Conor Dooley
@ 2025-11-17 21:49   ` Rob Herring (Arm)
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2025-11-17 21:49 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Krzysztof Kozlowski, devicetree, Pierre-Henry Moussay,
	Daire McNamara, Conor Dooley, linux-riscv, linux-kernel


On Mon, 17 Nov 2025 14:21:21 +0000, Conor Dooley wrote:
> From: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
> 
> pic64gx is not compatible with mpfs because due to the lack of FPGA
> functionality some features are disabled. Notably, anything to do with
> FPGA fabric contents is not supported.
> 
> Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>  .../bindings/soc/microchip/microchip,mpfs-sys-controller.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

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

* Re: [PATCH v1 0/3] pic64gx soc driver/binding changes
  2025-11-17 14:21 [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
                   ` (2 preceding siblings ...)
  2025-11-17 14:21 ` [PATCH v1 3/3] soc: microchip: mpfs-sys-controller: add support for pic64gx Conor Dooley
@ 2026-03-03 17:09 ` Conor Dooley
  3 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2026-03-03 17:09 UTC (permalink / raw)
  To: linux-kernel, Conor Dooley
  Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Daire McNamara,
	devicetree, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

On Mon, 17 Nov 2025 14:21:19 +0000, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> Mostly this is stuff that PH did last year, but rebased on top of
> current work.
> 
> CC: Conor Dooley <conor@kernel.org>
> CC: Rob Herring <robh@kernel.org>
> CC: Krzysztof Kozlowski <krzk+dt@kernel.org>
> CC: Daire McNamara <daire.mcnamara@microchip.com>
> CC: devicetree@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
> CC: linux-riscv@lists.infradead.org
> 
> [...]

Applied to riscv-soc-drivers-for-next, thanks!

[1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx
      https://git.kernel.org/conor/c/7a58baed883a
[2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility
      https://git.kernel.org/conor/c/ecc09da7ba34
[3/3] soc: microchip: mpfs-sys-controller: add support for pic64gx
      https://git.kernel.org/conor/c/63b5305ad84d

Thanks,
Conor.

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

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

end of thread, other threads:[~2026-03-03 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17 14:21 [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley
2025-11-17 14:21 ` [PATCH v1 1/3] dt-bindings: soc: microchip: add compatible for the mss-top-sysreg on pic64gx Conor Dooley
2025-11-17 21:49   ` Rob Herring (Arm)
2025-11-17 14:21 ` [PATCH v1 2/3] dt-bindings: soc: microchip: mpfs-sys-controller: Add pic64gx compatibility Conor Dooley
2025-11-17 21:49   ` Rob Herring (Arm)
2025-11-17 14:21 ` [PATCH v1 3/3] soc: microchip: mpfs-sys-controller: add support for pic64gx Conor Dooley
2026-03-03 17:09 ` [PATCH v1 0/3] pic64gx soc driver/binding changes Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox