* [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller.
@ 2026-02-10 19:32 Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 1/3] dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property Clément Le Goffic
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Clément Le Goffic @ 2026-02-10 19:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Gabriel Fernandez
Cc: linux-clk, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Clément Le Goffic, Clément Le Goffic
The STM32MP25 RCC peripheral as an access controller is allowed to know
whether the clocks are secured or not.
The STM32MP25 RCC peripheral knows about the clock secure configuration
of all non RIF-aware peripheral.
In parallel all the RIF-aware peripheral configuration information
are known by the RIFSC peripheral which is already an access
controller.
Changes in v9:
- Rebase on v6.19.0
- Add Gabriel Fernandez's Reviewed-by
- Link to v8: https://lore.kernel.org/r/20250924-b4-rcc-upstream-v8-0-b32d46f71a38@gmail.com
Changes in v8:
- Use uppercase for peripheral name in commit message
- Add the '#access-controller-cells' property to the RCC in
stm32mp231.dtsi
- Link to v7: https://lore.kernel.org/r/20250922-b4-rcc-upstream-v7-0-2dfc4e018f40@gmail.com
The v7 is a subset of the v6 and other prior versions, split to simplify
the review and merging process.
Changes in v7:
- None
- Link to v6: https://lore.kernel.org/all/20250909-b4-ddrperfm-upstream-v6-2-ce082cc801b5@gmail.com/
Signed-off-by: Clément Le Goffic <legoffic.clement@gmail.com>
---
Clément Le Goffic (3):
dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property
clk: stm32mp25: add firewall grant_access ops
arm64: dts: st: set RCC as an access-controller
.../bindings/clock/st,stm32mp25-rcc.yaml | 7 ++++
arch/arm64/boot/dts/st/stm32mp231.dtsi | 1 +
arch/arm64/boot/dts/st/stm32mp251.dtsi | 1 +
drivers/clk/stm32/clk-stm32mp25.c | 40 +++++++++++++++++++++-
4 files changed, 48 insertions(+), 1 deletion(-)
---
base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
change-id: 20250916-b4-rcc-upstream-8a8ea3af6a0d
prerequisite-change-id: 20250916-b4-firewall-upstream-dfe8588a21f8:v8
prerequisite-patch-id: e4a708d9c6df5725c9598fbd2169636e4e7dc46b
Best regards,
--
Clément Le Goffic <legoffic.clement@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v9 1/3] dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property
2026-02-10 19:32 [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
@ 2026-02-10 19:32 ` Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 2/3] clk: stm32mp25: add firewall grant_access ops Clément Le Goffic
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Clément Le Goffic @ 2026-02-10 19:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Gabriel Fernandez
Cc: linux-clk, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Clément Le Goffic, Clément Le Goffic
From: Clément Le Goffic <clement.legoffic@foss.st.com>
RCC is able to check the availability of a clock.
Allow to query the RCC with a firewall ID.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Clément Le Goffic <legoffic.clement@gmail.com>
---
Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml
index 1e3b5d218bb0..882de8608200 100644
--- a/Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml
+++ b/Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml
@@ -31,6 +31,11 @@ properties:
'#reset-cells':
const: 1
+ '#access-controller-cells':
+ const: 1
+ description:
+ Contains the firewall ID associated to the peripheral.
+
clocks:
items:
- description: CK_SCMI_HSE High Speed External oscillator (8 to 48 MHz)
@@ -122,6 +127,7 @@ required:
- reg
- '#clock-cells'
- '#reset-cells'
+ - '#access-controller-cells'
- clocks
additionalProperties: false
@@ -135,6 +141,7 @@ examples:
reg = <0x44200000 0x10000>;
#clock-cells = <1>;
#reset-cells = <1>;
+ #access-controller-cells = <1>;
clocks = <&scmi_clk CK_SCMI_HSE>,
<&scmi_clk CK_SCMI_HSI>,
<&scmi_clk CK_SCMI_MSI>,
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v9 2/3] clk: stm32mp25: add firewall grant_access ops
2026-02-10 19:32 [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 1/3] dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property Clément Le Goffic
@ 2026-02-10 19:32 ` Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 3/3] arm64: dts: st: set RCC as an access-controller Clément Le Goffic
2026-03-13 8:24 ` [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
3 siblings, 0 replies; 5+ messages in thread
From: Clément Le Goffic @ 2026-02-10 19:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Gabriel Fernandez
Cc: linux-clk, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Clément Le Goffic, Clément Le Goffic
From: Clément Le Goffic <clement.legoffic@foss.st.com>
On STM32MP25, the RCC peripheral manages the secure level of resources
that are used by other devices such as clocks.
Declare this peripheral as a firewall controller.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: Clément Le Goffic <legoffic.clement@gmail.com>
---
drivers/clk/stm32/clk-stm32mp25.c | 40 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/stm32/clk-stm32mp25.c b/drivers/clk/stm32/clk-stm32mp25.c
index 52f0e8a12926..af4bc06d703a 100644
--- a/drivers/clk/stm32/clk-stm32mp25.c
+++ b/drivers/clk/stm32/clk-stm32mp25.c
@@ -4,8 +4,10 @@
* Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.
*/
+#include <linux/bus/stm32_firewall.h>
#include <linux/bus/stm32_firewall_device.h>
#include <linux/clk-provider.h>
+#include <linux/device.h>
#include <linux/io.h>
#include <linux/platform_device.h>
@@ -1602,6 +1604,11 @@ static int stm32_rcc_get_access(void __iomem *base, u32 index)
return 0;
}
+static int stm32mp25_rcc_grant_access(struct stm32_firewall_controller *ctrl, u32 firewall_id)
+{
+ return stm32_rcc_get_access(ctrl->mmio, firewall_id);
+}
+
static int stm32mp25_check_security(struct device_node *np, void __iomem *base,
const struct clock_config *cfg)
{
@@ -1970,6 +1977,7 @@ MODULE_DEVICE_TABLE(of, stm32mp25_match_data);
static int stm32mp25_rcc_clocks_probe(struct platform_device *pdev)
{
+ struct stm32_firewall_controller *rcc_controller;
struct device *dev = &pdev->dev;
void __iomem *base;
int ret;
@@ -1982,7 +1990,36 @@ static int stm32mp25_rcc_clocks_probe(struct platform_device *pdev)
if (ret)
return ret;
- return stm32_rcc_init(dev, stm32mp25_match_data, base);
+ ret = stm32_rcc_init(dev, stm32mp25_match_data, base);
+ if (ret)
+ return ret;
+
+ rcc_controller = devm_kzalloc(&pdev->dev, sizeof(*rcc_controller), GFP_KERNEL);
+ if (!rcc_controller)
+ return -ENOMEM;
+
+ rcc_controller->dev = dev;
+ rcc_controller->mmio = base;
+ rcc_controller->name = dev_driver_string(dev);
+ rcc_controller->type = STM32_PERIPHERAL_FIREWALL;
+ rcc_controller->grant_access = stm32mp25_rcc_grant_access;
+
+ platform_set_drvdata(pdev, rcc_controller);
+
+ ret = stm32_firewall_controller_register(rcc_controller);
+ if (ret) {
+ dev_err(dev, "Couldn't register as a firewall controller: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+static void stm32mp25_rcc_clocks_remove(struct platform_device *pdev)
+{
+ struct stm32_firewall_controller *rcc_controller = platform_get_drvdata(pdev);
+
+ stm32_firewall_controller_unregister(rcc_controller);
}
static struct platform_driver stm32mp25_rcc_clocks_driver = {
@@ -1991,6 +2028,7 @@ static struct platform_driver stm32mp25_rcc_clocks_driver = {
.of_match_table = stm32mp25_match_data,
},
.probe = stm32mp25_rcc_clocks_probe,
+ .remove = stm32mp25_rcc_clocks_remove,
};
static int __init stm32mp25_clocks_init(void)
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v9 3/3] arm64: dts: st: set RCC as an access-controller
2026-02-10 19:32 [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 1/3] dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 2/3] clk: stm32mp25: add firewall grant_access ops Clément Le Goffic
@ 2026-02-10 19:32 ` Clément Le Goffic
2026-03-13 8:24 ` [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
3 siblings, 0 replies; 5+ messages in thread
From: Clément Le Goffic @ 2026-02-10 19:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Gabriel Fernandez
Cc: linux-clk, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Clément Le Goffic, Clément Le Goffic
From: Clément Le Goffic <clement.legoffic@foss.st.com>
RCC now implements firewall access ops to check the access to
resources. Allow client nodes to query the RCC with one firewall ID.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Signed-off-by: Clément Le Goffic <legoffic.clement@gmail.com>
---
arch/arm64/boot/dts/st/stm32mp231.dtsi | 1 +
arch/arm64/boot/dts/st/stm32mp251.dtsi | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/st/stm32mp231.dtsi b/arch/arm64/boot/dts/st/stm32mp231.dtsi
index 88e214d395ab..e283c760d94f 100644
--- a/arch/arm64/boot/dts/st/stm32mp231.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp231.dtsi
@@ -776,6 +776,7 @@ rcc: clock-controller@44200000 {
reg = <0x44200000 0x10000>;
#clock-cells = <1>;
#reset-cells = <1>;
+ #access-controller-cells = <1>;
clocks = <&scmi_clk CK_SCMI_HSE>,
<&scmi_clk CK_SCMI_HSI>,
<&scmi_clk CK_SCMI_MSI>,
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index a8e6e0f77b83..89e0b8f2fbf9 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -1761,6 +1761,7 @@ rcc: clock-controller@44200000 {
reg = <0x44200000 0x10000>;
#clock-cells = <1>;
#reset-cells = <1>;
+ #access-controller-cells = <1>;
clocks = <&scmi_clk CK_SCMI_HSE>,
<&scmi_clk CK_SCMI_HSI>,
<&scmi_clk CK_SCMI_MSI>,
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller.
2026-02-10 19:32 [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
` (2 preceding siblings ...)
2026-02-10 19:32 ` [PATCH v9 3/3] arm64: dts: st: set RCC as an access-controller Clément Le Goffic
@ 2026-03-13 8:24 ` Clément Le Goffic
3 siblings, 0 replies; 5+ messages in thread
From: Clément Le Goffic @ 2026-03-13 8:24 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Gabriel Fernandez
Cc: linux-clk, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Clément Le Goffic
Hello,
On 2/10/26 8:32 PM, Clément Le Goffic wrote:
> The STM32MP25 RCC peripheral as an access controller is allowed to know
> whether the clocks are secured or not.
> The STM32MP25 RCC peripheral knows about the clock secure configuration
> of all non RIF-aware peripheral.
> In parallel all the RIF-aware peripheral configuration information
> are known by the RIFSC peripheral which is already an access
> controller.
>
> Changes in v9:
> - Rebase on v6.19.0
> - Add Gabriel Fernandez's Reviewed-by
> - Link to v8: https://lore.kernel.org/r/20250924-b4-rcc-upstream-v8-0-b32d46f71a38@gmail.com
>
> Changes in v8:
> - Use uppercase for peripheral name in commit message
> - Add the '#access-controller-cells' property to the RCC in
> stm32mp231.dtsi
> - Link to v7: https://lore.kernel.org/r/20250922-b4-rcc-upstream-v7-0-2dfc4e018f40@gmail.com
>
> The v7 is a subset of the v6 and other prior versions, split to simplify
> the review and merging process.
>
> Changes in v7:
> - None
> - Link to v6: https://lore.kernel.org/all/20250909-b4-ddrperfm-upstream-v6-2-ce082cc801b5@gmail.com/
>
> Signed-off-by: Clément Le Goffic <legoffic.clement@gmail.com>
> ---
> Clément Le Goffic (3):
> dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property
> clk: stm32mp25: add firewall grant_access ops
> arm64: dts: st: set RCC as an access-controller
>
> .../bindings/clock/st,stm32mp25-rcc.yaml | 7 ++++
> arch/arm64/boot/dts/st/stm32mp231.dtsi | 1 +
> arch/arm64/boot/dts/st/stm32mp251.dtsi | 1 +
> drivers/clk/stm32/clk-stm32mp25.c | 40 +++++++++++++++++++++-
> 4 files changed, 48 insertions(+), 1 deletion(-)
> ---
> base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
> change-id: 20250916-b4-rcc-upstream-8a8ea3af6a0d
> prerequisite-change-id: 20250916-b4-firewall-upstream-dfe8588a21f8:v8
> prerequisite-patch-id: e4a708d9c6df5725c9598fbd2169636e4e7dc46b
>
> Best regards,
> --
> Clément Le Goffic <legoffic.clement@gmail.com>
>
Everything seems fine here, does anyone is able to take it ?
Best regards,
Clément
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-13 8:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-10 19:32 [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 1/3] dt-bindings: stm32: stm32mp25: add `#access-controller-cells` property Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 2/3] clk: stm32mp25: add firewall grant_access ops Clément Le Goffic
2026-02-10 19:32 ` [PATCH v9 3/3] arm64: dts: st: set RCC as an access-controller Clément Le Goffic
2026-03-13 8:24 ` [PATCH v9 0/3] Register the STM32MP25 RCC driver as an access controller Clément Le Goffic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®