Skip to content

Commit 909752d

Browse files
committed
Merge tag 'soc-drivers-for-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers-late
RISC-V soc-drivers for v6.19 Microchip: Add bindings and mfd drivers for two syscon regions on PolarFire SoC, needed as part of a rework of the devicetree to permit supporting, among other things, pinctrl sanely and avoiding the "new" pic64gx SoC ever using the original incorrect clock nodes. Fiddle with the Microchip RISC-V MAINTAINERS entry to add these drivers and avoid branding it FPGA only. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> * tag 'soc-drivers-for-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: MAINTAINERS: rename Microchip RISC-V entry MAINTAINERS: add new soc drivers to Microchip RISC-V entry soc: microchip: add mfd drivers for two syscon regions on PolarFire SoC dt-bindings: soc: microchip: document the simple-mfd syscon on PolarFire SoC Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents aa3294f + 66c6ceb commit 909752d

6 files changed

Lines changed: 145 additions & 1 deletion

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Microchip PolarFire SoC Microprocessor Subsystem (MSS) sysreg register region
8+
9+
maintainers:
10+
- Conor Dooley <conor.dooley@microchip.com>
11+
12+
description:
13+
An wide assortment of registers that control elements of the MSS on PolarFire
14+
SoC, including pinmuxing, resets and clocks among others.
15+
16+
properties:
17+
compatible:
18+
items:
19+
- const: microchip,mpfs-mss-top-sysreg
20+
- const: syscon
21+
22+
reg:
23+
maxItems: 1
24+
25+
'#reset-cells':
26+
description:
27+
The AHB/AXI peripherals on the PolarFire SoC have reset support, so
28+
from CLK_ENVM to CLK_CFM. The reset consumer should specify the
29+
desired peripheral via the clock ID in its "resets" phandle cell.
30+
See include/dt-bindings/clock/microchip,mpfs-clock.h for the full list
31+
of PolarFire clock/reset IDs.
32+
const: 1
33+
34+
required:
35+
- compatible
36+
- reg
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
syscon@20002000 {
43+
compatible = "microchip,mpfs-mss-top-sysreg", "syscon";
44+
reg = <0x20002000 0x1000>;
45+
#reset-cells = <1>;
46+
};
47+

MAINTAINERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22111,7 +22111,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
2211122111
F: Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
2211222112
F: drivers/iommu/riscv/
2211322113

22114-
RISC-V MICROCHIP FPGA SUPPORT
22114+
RISC-V MICROCHIP SUPPORT
2211522115
M: Conor Dooley <conor.dooley@microchip.com>
2211622116
M: Daire McNamara <daire.mcnamara@microchip.com>
2211722117
L: linux-riscv@lists.infradead.org
@@ -22137,6 +22137,8 @@ F: drivers/pci/controller/plda/pcie-microchip-host.c
2213722137
F: drivers/pwm/pwm-microchip-core.c
2213822138
F: drivers/reset/reset-mpfs.c
2213922139
F: drivers/rtc/rtc-mpfs.c
22140+
F: drivers/soc/microchip/mpfs-control-scb.c
22141+
F: drivers/soc/microchip/mpfs-mss-top-sysreg.c
2214022142
F: drivers/soc/microchip/mpfs-sys-controller.c
2214122143
F: drivers/spi/spi-microchip-core-qspi.c
2214222144
F: drivers/spi/spi-microchip-core.c

drivers/soc/microchip/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,15 @@ config POLARFIRE_SOC_SYS_CTRL
99
module will be called mpfs_system_controller.
1010

1111
If unsure, say N.
12+
13+
config POLARFIRE_SOC_SYSCONS
14+
bool "PolarFire SoC (MPFS) syscon drivers"
15+
default y
16+
depends on ARCH_MICROCHIP
17+
select MFD_CORE
18+
help
19+
These drivers add support for the syscons on PolarFire SoC (MPFS).
20+
Without these drivers core parts of the kernel such as clocks
21+
and resets will not function correctly.
22+
23+
If unsure, and on a PolarFire SoC, say y.

drivers/soc/microchip/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
obj-$(CONFIG_POLARFIRE_SOC_SYS_CTRL) += mpfs-sys-controller.o
2+
obj-$(CONFIG_POLARFIRE_SOC_SYSCONS) += mpfs-control-scb.o mpfs-mss-top-sysreg.o
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
3+
#include <linux/array_size.h>
4+
#include <linux/of.h>
5+
#include <linux/mfd/core.h>
6+
#include <linux/mfd/syscon.h>
7+
#include <linux/platform_device.h>
8+
9+
static const struct mfd_cell mpfs_control_scb_devs[] = {
10+
MFD_CELL_NAME("mpfs-tvs"),
11+
};
12+
13+
static int mpfs_control_scb_probe(struct platform_device *pdev)
14+
{
15+
struct device *dev = &pdev->dev;
16+
17+
return mfd_add_devices(dev, PLATFORM_DEVID_NONE, mpfs_control_scb_devs,
18+
ARRAY_SIZE(mpfs_control_scb_devs), NULL, 0, NULL);
19+
}
20+
21+
static const struct of_device_id mpfs_control_scb_of_match[] = {
22+
{ .compatible = "microchip,mpfs-control-scb", },
23+
{},
24+
};
25+
MODULE_DEVICE_TABLE(of, mpfs_control_scb_of_match);
26+
27+
static struct platform_driver mpfs_control_scb_driver = {
28+
.driver = {
29+
.name = "mpfs-control-scb",
30+
.of_match_table = mpfs_control_scb_of_match,
31+
},
32+
.probe = mpfs_control_scb_probe,
33+
};
34+
module_platform_driver(mpfs_control_scb_driver);
35+
36+
MODULE_LICENSE("GPL");
37+
MODULE_AUTHOR("Conor Dooley <conor.dooley@microchip.com>");
38+
MODULE_DESCRIPTION("PolarFire SoC control scb driver");
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
3+
#include <linux/array_size.h>
4+
#include <linux/of.h>
5+
#include <linux/mfd/core.h>
6+
#include <linux/mfd/syscon.h>
7+
#include <linux/of_platform.h>
8+
#include <linux/platform_device.h>
9+
10+
static const struct mfd_cell mpfs_mss_top_sysreg_devs[] = {
11+
MFD_CELL_NAME("mpfs-reset"),
12+
};
13+
14+
static int mpfs_mss_top_sysreg_probe(struct platform_device *pdev)
15+
{
16+
struct device *dev = &pdev->dev;
17+
int ret;
18+
19+
ret = mfd_add_devices(dev, PLATFORM_DEVID_NONE, mpfs_mss_top_sysreg_devs,
20+
ARRAY_SIZE(mpfs_mss_top_sysreg_devs) , NULL, 0, NULL);
21+
if (ret)
22+
return ret;
23+
24+
return devm_of_platform_populate(dev);
25+
}
26+
27+
static const struct of_device_id mpfs_mss_top_sysreg_of_match[] = {
28+
{ .compatible = "microchip,mpfs-mss-top-sysreg", },
29+
{},
30+
};
31+
MODULE_DEVICE_TABLE(of, mpfs_mss_top_sysreg_of_match);
32+
33+
static struct platform_driver mpfs_mss_top_sysreg_driver = {
34+
.driver = {
35+
.name = "mpfs-mss-top-sysreg",
36+
.of_match_table = mpfs_mss_top_sysreg_of_match,
37+
},
38+
.probe = mpfs_mss_top_sysreg_probe,
39+
};
40+
module_platform_driver(mpfs_mss_top_sysreg_driver);
41+
42+
MODULE_LICENSE("GPL");
43+
MODULE_AUTHOR("Conor Dooley <conor.dooley@microchip.com>");
44+
MODULE_DESCRIPTION("PolarFire SoC mss top sysreg driver");

0 commit comments

Comments
 (0)