public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Enable Service layer driver for Agilex5
@ 2025-11-03 23:39 Khairul Anuar Romli
  2025-11-03 23:39 ` [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support " Khairul Anuar Romli
  2025-11-03 23:39 ` [PATCH v3 2/2] arm64: dts: intel: Add Agilex5 SVC node with memory region Khairul Anuar Romli
  0 siblings, 2 replies; 7+ messages in thread
From: Khairul Anuar Romli @ 2025-11-03 23:39 UTC (permalink / raw)
  To: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mahesh Rao, linux-kernel, devicetree, Adrian Ng Ho Yin,
	Niravkumar L Rabara, Khairul Anuar Romli

This patch series introduces support for the Agilex5 service layer driver
(SVC) in the Linux kernel. The changes span across device tree bindings,
platform DTS files, and the Stratix10 SVC firmware driver.

These changes are necessary to enable firmware communication on Agilex5
SoCs via the SVC interface, similar to existing support for Stratix10 and
Agilex platforms.

Agilex5 introduces the ability for the TBU to operate in non-secure mode,
making it accessible to Linux through the IOMMU framework. This key
difference enables improved memory management in non-secure environments.
As a result, this series extends the SVC driver and device tree bindings
to support IOMMU integration for Agilex5.
---
Notes:
This patch series is applied on socfpga maintainer's tree
https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git/log/?h=socfpga_dts_for_v6.19

Changes in v3:
	- Remove driver changes in driver as it is fully compatible
	- Add iommu entry and rewrite the git commit message to describe
	  why the changes is required.
Changes in v2:
	- Add driver changes for Agilex5-svc compatible
---
Khairul Anuar Romli (2):
  dt-bindings: firmware: svc: Add IOMMU support for Agilex5
  arm64: dts: intel: Add Agilex5 SVC node with memory region

 .../firmware/intel,stratix10-svc.yaml         | 20 +++++++++++++++----
 .../arm64/boot/dts/intel/socfpga_agilex5.dtsi |  9 +++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)

-- 
2.43.7


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

* [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support for Agilex5
  2025-11-03 23:39 [PATCH v3 0/2] Enable Service layer driver for Agilex5 Khairul Anuar Romli
@ 2025-11-03 23:39 ` Khairul Anuar Romli
  2025-11-04  9:48   ` Krzysztof Kozlowski
  2025-11-05  1:40   ` Romli, Khairul Anuar
  2025-11-03 23:39 ` [PATCH v3 2/2] arm64: dts: intel: Add Agilex5 SVC node with memory region Khairul Anuar Romli
  1 sibling, 2 replies; 7+ messages in thread
From: Khairul Anuar Romli @ 2025-11-03 23:39 UTC (permalink / raw)
  To: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mahesh Rao, linux-kernel, devicetree, Adrian Ng Ho Yin,
	Niravkumar L Rabara, Khairul Anuar Romli

In Agilex5, the TBU (Translation Buffer Unit) can now operate in non-secure
mode, enabling Linux to utilize it through the IOMMU framework. This allows
improved memory management capabilities in non-secure environments. With
Agilex5 lifting this restriction, we are now extending the device tree
bindings to support IOMMU for the Agilex5 SVC.

Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
Reviewed-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com>
---
Changes in v3:
	- Add iommu property.
	- Add logical check where only Agilex5 required iommus
	- Rewrite the commit message to explain why this changes is 
	  needed.
Changes in v2:
	- Reprase commit message to exclude iommu
---
 .../firmware/intel,stratix10-svc.yaml         | 20 +++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml b/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml
index fac1e955852e..094973494098 100644
--- a/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml
+++ b/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml
@@ -34,6 +34,7 @@ properties:
     enum:
       - intel,stratix10-svc
       - intel,agilex-svc
+      - intel,agilex5-svc
 
   method:
     description: |
@@ -54,14 +55,25 @@ properties:
       reserved memory region for the service layer driver to
       communicate with the secure device manager.
 
+  iommus:
+    maxItems: 1
+
   fpga-mgr:
     $ref: /schemas/fpga/intel,stratix10-soc-fpga-mgr.yaml
     description: Optional child node for fpga manager to perform fabric configuration.
 
-required:
-  - compatible
-  - method
-  - memory-region
+allOf:
+  - required:
+      - compatible
+      - method
+      - memory-region
+  - if:
+      properties:
+        compatible:
+          const: intel,agilex5-svc
+    then:
+      required:
+        - iommus
 
 additionalProperties: false
 
-- 
2.43.7


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

* [PATCH v3 2/2] arm64: dts: intel: Add Agilex5 SVC node with memory region
  2025-11-03 23:39 [PATCH v3 0/2] Enable Service layer driver for Agilex5 Khairul Anuar Romli
  2025-11-03 23:39 ` [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support " Khairul Anuar Romli
@ 2025-11-03 23:39 ` Khairul Anuar Romli
  1 sibling, 0 replies; 7+ messages in thread
From: Khairul Anuar Romli @ 2025-11-03 23:39 UTC (permalink / raw)
  To: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mahesh Rao, linux-kernel, devicetree, Adrian Ng Ho Yin,
	Niravkumar L Rabara, Khairul Anuar Romli

Introduce the Stratix10 SoC Service Layer (SVC) node for Agilex5 SoCs. This
node includes the compatible string "intel,agilex5-svc" and references a
reserved memory region used for communication with the Secure Device
Manager (SDM).

Agilex5 introduces changes in how reserved memory is mapped and accessed
compared to previous SoC generations, particularly with the addition of
IOMMU support. Unlike earlier platforms, Agilex5 enables the use of the
Translation Buffer Unit (TBU) in non-secure mode, allowing Linux to access
it through the IOMMU framework. This commit updates the device tree
structure to support Agilex5-specific handling of the SVC interface,
including the necessary bindings for IOMMU integration.

Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
Reviewed-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com>
---
Changes in v3:
	- include iommu property in svc node.
	- Rephrase git commit message to describe iommu presence
	  in Agilex5
Changes in v2:
	- Rephrase commit message to exclude mentioning iommu
---
 arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
index a13ccee3c4c3..15284092897e 100644
--- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
+++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
@@ -841,5 +841,14 @@ queue7 {
 				};
 			};
 		};
+
+		firmware {
+			svc {
+				compatible = "intel,agilex5-svc";
+				method = "smc";
+				memory-region = <&service_reserved>;
+				iommus = <&smmu 10>;
+			};
+		};
 	};
 };
-- 
2.43.7


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

* Re: [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support for Agilex5
  2025-11-03 23:39 ` [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support " Khairul Anuar Romli
@ 2025-11-04  9:48   ` Krzysztof Kozlowski
  2025-11-04 11:14     ` Romli, Khairul Anuar
  2025-11-05  1:40   ` Romli, Khairul Anuar
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-04  9:48 UTC (permalink / raw)
  To: Khairul Anuar Romli
  Cc: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mahesh Rao, linux-kernel, devicetree, Adrian Ng Ho Yin,
	Niravkumar L Rabara

On Tue, Nov 04, 2025 at 07:39:27AM +0800, Khairul Anuar Romli wrote:
> In Agilex5, the TBU (Translation Buffer Unit) can now operate in non-secure
> mode, enabling Linux to utilize it through the IOMMU framework. This allows
> improved memory management capabilities in non-secure environments. With
> Agilex5 lifting this restriction, we are now extending the device tree
> bindings to support IOMMU for the Agilex5 SVC.
> 
> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
> Reviewed-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
> Reviewed-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com>

Two reviews but...

>  
> -required:
> -  - compatible
> -  - method
> -  - memory-region
> +allOf:
> +  - required:
> +      - compatible
> +      - method
> +      - memory-region

... none told you this is not the correct syntax / style?

Were these reviews really happening? What exactly was reviewed here?

Best regards,
Krzysztof


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

* Re: [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support for Agilex5
  2025-11-04  9:48   ` Krzysztof Kozlowski
@ 2025-11-04 11:14     ` Romli, Khairul Anuar
  2025-11-04 14:33       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Romli, Khairul Anuar @ 2025-11-04 11:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Rao, Mahesh, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, Ng, Adrian Ho Yin,
	Rabara, Niravkumar Laxmidas

On 4/11/2025 5:48 pm, Krzysztof Kozlowski wrote:
> On Tue, Nov 04, 2025 at 07:39:27AM +0800, Khairul Anuar Romli wrote:
>> In Agilex5, the TBU (Translation Buffer Unit) can now operate in non-secure
>> mode, enabling Linux to utilize it through the IOMMU framework. This allows
>> improved memory management capabilities in non-secure environments. With
>> Agilex5 lifting this restriction, we are now extending the device tree
>> bindings to support IOMMU for the Agilex5 SVC.
>>
>> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
>> Reviewed-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
>> Reviewed-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com>
> 
> Two reviews but...
> 
>>   
>> -required:
>> -  - compatible
>> -  - method
>> -  - memory-region
>> +allOf:
>> +  - required:
>> +      - compatible
>> +      - method
>> +      - memory-region
> 
> ... none told you this is not the correct syntax / style?
> 
> Were these reviews really happening? What exactly was reviewed here?
> 
> Best regards,
> Krzysztof
> 

The peer review was on the property and compatible added in this patch.
I was at fault for not emphasize to check on the syntax / style for the 
logical changes.

I refers to 
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml 
and the changes could be as follows:

required:
   - compatible
   - method
   - memory-region
+allOf:
+  - if:
+      properties:
+        compatible:
+          const: intel,agilex5-svc
+    then:
+      required:
+        - iommus

Do I need to re-specify the rest of the compatible property other than 
intel,agilex5-svc and their required properties under the allOf block?

My objective is to specify that iommus only for intel,agilex5-svc but 
not the rest of devices.

Thanks.

Best Regards,
Khairul


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

* Re: [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support for Agilex5
  2025-11-04 11:14     ` Romli, Khairul Anuar
@ 2025-11-04 14:33       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-04 14:33 UTC (permalink / raw)
  To: Romli, Khairul Anuar
  Cc: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Rao, Mahesh, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, Ng, Adrian Ho Yin,
	Rabara, Niravkumar Laxmidas

On 04/11/2025 12:14, Romli, Khairul Anuar wrote:
> On 4/11/2025 5:48 pm, Krzysztof Kozlowski wrote:
>> On Tue, Nov 04, 2025 at 07:39:27AM +0800, Khairul Anuar Romli wrote:
>>> In Agilex5, the TBU (Translation Buffer Unit) can now operate in non-secure
>>> mode, enabling Linux to utilize it through the IOMMU framework. This allows
>>> improved memory management capabilities in non-secure environments. With
>>> Agilex5 lifting this restriction, we are now extending the device tree
>>> bindings to support IOMMU for the Agilex5 SVC.
>>>
>>> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
>>> Reviewed-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
>>> Reviewed-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com>
>>
>> Two reviews but...
>>
>>>   
>>> -required:
>>> -  - compatible
>>> -  - method
>>> -  - memory-region
>>> +allOf:
>>> +  - required:
>>> +      - compatible
>>> +      - method
>>> +      - memory-region
>>
>> ... none told you this is not the correct syntax / style?
>>
>> Were these reviews really happening? What exactly was reviewed here?
>>
>> Best regards,
>> Krzysztof
>>
> 
> The peer review was on the property and compatible added in this patch.
> I was at fault for not emphasize to check on the syntax / style for the 
> logical changes.

Rather the reviewers gave you just simple acks without doing their job.
That's a 10 liner patch...

Feels like just to tick gerrit or satisfy internal procedures.

If internal reviewers give you such "okay" marks, without adhering to
reviewers statement of oversight, you can freely ignore them and instead
educate them to provide full review on the mailing list.

> 
> I refers to 
> Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml 
> and the changes could be as follows:
> 
> required:
>    - compatible
>    - method
>    - memory-region
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          const: intel,agilex5-svc
> +    then:
> +      required:
> +        - iommus
> 
> Do I need to re-specify the rest of the compatible property other than 
> intel,agilex5-svc and their required properties under the allOf block?
> 
> My objective is to specify that iommus only for intel,agilex5-svc but 
> not the rest of devices.
It all depends whether other devices also use IOMMU.

Best regards,
Krzysztof

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

* Re: [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support for Agilex5
  2025-11-03 23:39 ` [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support " Khairul Anuar Romli
  2025-11-04  9:48   ` Krzysztof Kozlowski
@ 2025-11-05  1:40   ` Romli, Khairul Anuar
  1 sibling, 0 replies; 7+ messages in thread
From: Romli, Khairul Anuar @ 2025-11-05  1:40 UTC (permalink / raw)
  To: Dinh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Rao, Mahesh, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, Ng, Adrian Ho Yin,
	Rabara, Niravkumar Laxmidas

On 4/11/2025 7:39 am, Romli, Khairul Anuar wrote:
> In Agilex5, the TBU (Translation Buffer Unit) can now operate in non-secure
> mode, enabling Linux to utilize it through the IOMMU framework. This allows
> improved memory management capabilities in non-secure environments. With
> Agilex5 lifting this restriction, we are now extending the device tree
> bindings to support IOMMU for the Agilex5 SVC.
> 
> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
> Reviewed-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
> Reviewed-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com>
> ---
> Changes in v3:
> 	- Add iommu property.
> 	- Add logical check where only Agilex5 required iommus
> 	- Rewrite the commit message to explain why this changes is
> 	  needed.
> Changes in v2:
> 	- Reprase commit message to exclude iommu
> ---
>   .../firmware/intel,stratix10-svc.yaml         | 20 +++++++++++++++----
>   1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml b/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml
> index fac1e955852e..094973494098 100644
> --- a/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml
> +++ b/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.yaml
> @@ -34,6 +34,7 @@ properties:
>       enum:
>         - intel,stratix10-svc
>         - intel,agilex-svc
> +      - intel,agilex5-svc
>   
>     method:
>       description: |
> @@ -54,14 +55,25 @@ properties:
>         reserved memory region for the service layer driver to
>         communicate with the secure device manager.
>   
> +  iommus:
> +    maxItems: 1
> +
>     fpga-mgr:
>       $ref: /schemas/fpga/intel,stratix10-soc-fpga-mgr.yaml
>       description: Optional child node for fpga manager to perform fabric configuration.
>   
> -required:
> -  - compatible
> -  - method
> -  - memory-region
> +allOf:
> +  - required:
> +      - compatible
> +      - method
> +      - memory-region
> +  - if:
> +      properties:
> +        compatible:
> +          const: intel,agilex5-svc

I am sending the next revision to use contains: enum: instead of const.
> +    then:
> +      required:
> +        - iommus
>   
>   additionalProperties: false
>   


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

end of thread, other threads:[~2025-11-05  1:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 23:39 [PATCH v3 0/2] Enable Service layer driver for Agilex5 Khairul Anuar Romli
2025-11-03 23:39 ` [PATCH v3 1/2] dt-bindings: firmware: svc: Add IOMMU support " Khairul Anuar Romli
2025-11-04  9:48   ` Krzysztof Kozlowski
2025-11-04 11:14     ` Romli, Khairul Anuar
2025-11-04 14:33       ` Krzysztof Kozlowski
2025-11-05  1:40   ` Romli, Khairul Anuar
2025-11-03 23:39 ` [PATCH v3 2/2] arm64: dts: intel: Add Agilex5 SVC node with memory region Khairul Anuar Romli

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