From: Nava kishore Manne <hidden> Date: 2021-05-20 08:10:23
This patch adds load PDI API support to enable full/partial PDI loading
from linux. Programmable Device Image (PDI) is combination of headers,
images and bitstream files to be loaded.
Signed-off-by: Nava kishore Manne <redacted>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
---
Changes for v2:
-Updated API Doc and commit msg.
No functional changes.
Changes for v3:
-None.
Changes for v4:
-Rebased the changes on linux-next.
No functional changes
Changes for v5:
-None.
Changes for v6:
-None.
drivers/firmware/xilinx/zynqmp.c | 17 +++++++++++++++++
include/linux/firmware/xlnx-zynqmp.h | 10 ++++++++++
2 files changed, 27 insertions(+)
From: Nava kishore Manne <hidden> Date: 2021-05-20 08:10:39
Add documentation to describe Xilinx firmware driver bindings.
Firmware driver provides an interface to firmware APIs.
Interface APIs can be used by any driver to communicate
to Platform Management Unit.
Signed-off-by: Nava kishore Manne <redacted>
---
Changes for v4:
-Added new yaml file for xilinx firmware
as suggested by Rob.
Changes for v5:
-Fixed some minor issues and updated the fpga node name to versal_fpga.
Changes for v6:
-Added AES and Clk nodes as a sub nodes to the firmware node.
.../firmware/xilinx/xlnx,zynqmp-firmware.yaml | 102 ++++++++++++++++++
1 file changed, 102 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml
@@ -0,0 +1,102 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/firmware/xilinx/xlnx,zynqmp-firmware.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Xilinx firmware driver++maintainers:+-Nava kishore Manne <nava.manne@xilinx.com>++description:+The zynqmp-firmware node describes the interface to platform firmware.+ZynqMP has an interface to communicate with secure firmware. Firmware+driver provides an interface to firmware APIs. Interface APIs can be+used by any driver to communicate to PMUFW(Platform Management Unit).+These requests include clock management, pin control, device control,+power management service, FPGA service and other platform management+services.++properties:+compatible:+oneOf:+-description:+For implementations complying for Zynq Ultrascale+ MPSoC.+const:xlnx,zynqmp-firmware++-description:+For implementations complying for Versal.+const:xlnx,versal-firmware++method:+description:|+The method of calling the PM-API firmware layer.+Permitted values are.+-"smc":SMC#0, following the SMCCC+-"hvc":HVC#0, following the SMCCC++$ref:/schemas/types.yaml#/definitions/string-array+enum:+-smc+-hvc++patternProperties:+"versal_fpga":+$ref:"../../fpga/xlnx,versal-fpga.yaml#"+description:Compatible of the FPGA device.+type:object+required:+-compatible++"zynqmp-aes":+$ref:"../../crypto/xlnx,zynqmp-aes.yaml#"+description:|+The ZynqMP AES-GCM hardened cryptographic accelerator is+used to encrypt or decrypt the data with provided key and+initialization vector.+type:object+required:+-compatible++"clock-controller":+$ref:"../../clock/xlnx,versal-clk.yaml#"+description:|+The clock controller is a hardware block of Xilinx versal+clock tree. It reads required input clock frequencies from+the devicetree and acts as clock provider for all clock+consumers of PS clocks.list of clock specifiers which are+external input clocks to the given clock controller.+type:object+required:+-compatible+-"#clock-cells"+-clocks+-clock-names++required:+-compatible++examples:+-|+versal-firmware {+compatible = "xlnx,versal-firmware";+method = "smc";++versal_fpga:versal_fpga {+compatible = "xlnx,versal-fpga";+};++xlnx_aes:zynqmp-aes {+compatible = "xlnx,zynqmp-aes";+};++versal_clk:clock-controller {+#clock-cells = <1>;+compatible = "xlnx,versal-clk";+clocks = <&ref>, <&alt_ref>, <&pl_alt_ref>;+clock-names = "ref", "alt_ref", "pl_alt_ref";+};+};++additionalProperties:false
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Nava kishore Manne <hidden> Date: 2021-05-20 08:11:26
Add support for Xilinx Versal FPGA manager.
PDI source type can be DDR, OCM, QSPI flash etc..
But driver allocates memory always from DDR, Since driver supports only
DDR source type.
Signed-off-by: Appana Durga Kedareswara rao <redacted>
Signed-off-by: Nava kishore Manne <redacted>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
---
Changes for v2:
-Updated the Fpga Mgr registrations call's
to 5.11
-Fixed some minor coding issues as suggested by
Moritz.
Changes for v3:
-Rewritten the Versal fpga Kconfig contents.
Changes for v4:
-Rebased the changes on linux-next.
No functional changes.
Changes for v5:
-None.
Changes for v6:
-None.
drivers/fpga/Kconfig | 9 +++
drivers/fpga/Makefile | 1 +
drivers/fpga/versal-fpga.c | 117 +++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
create mode 100644 drivers/fpga/versal-fpga.c
On Thu, May 20, 2021 at 01:39:54PM +0530, Nava kishore Manne wrote:
quoted hunk
Add support for Xilinx Versal FPGA manager.
PDI source type can be DDR, OCM, QSPI flash etc..
But driver allocates memory always from DDR, Since driver supports only
DDR source type.
Signed-off-by: Appana Durga Kedareswara rao <redacted>
Signed-off-by: Nava kishore Manne <redacted>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
---
Changes for v2:
-Updated the Fpga Mgr registrations call's
to 5.11
-Fixed some minor coding issues as suggested by
Moritz.
Changes for v3:
-Rewritten the Versal fpga Kconfig contents.
Changes for v4:
-Rebased the changes on linux-next.
No functional changes.
Changes for v5:
-None.
Changes for v6:
-None.
drivers/fpga/Kconfig | 9 +++
drivers/fpga/Makefile | 1 +
drivers/fpga/versal-fpga.c | 117 +++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
create mode 100644 drivers/fpga/versal-fpga.c
You save a pointer to a reference counted structure, without
incrementing the reference count. What could go wrong? :)
You are getting lucky here, but as stated above, why do you need this
pointer?
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Nava kishore Manne <hidden> Date: 2021-06-01 06:56:42
Hi Greg,
Thanks for providing the review comments.
Please find my response inline.
-----Original Message-----
From: Greg KH <gregkh@linuxfoundation.org>
Sent: Thursday, May 20, 2021 2:19 PM
To: Nava kishore Manne <redacted>
Cc: robh+dt@kernel.org; Michal Simek <redacted>;
mdf@kernel.org; trix@redhat.com; arnd@arndb.de; Rajan Vaja
[off-list ref]; Amit Sunil Dhamne [off-list ref];
Tejas Patel [off-list ref]; zou_wei@huawei.com; Sai Krishna
Potthuri [off-list ref]; Ravi Patel [off-list ref];
iwamatsu@nigauri.org; Jiaying Liang [off-list ref];
devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
kernel@vger.kernel.org; linux-fpga@vger.kernel.org; git [off-list ref];
chinnikishore369@gmail.com; Appana Durga Kedareswara Rao
[off-list ref]
Subject: Re: [PATCH v6 4/4] fpga: versal-fpga: Add versal fpga manager driver
On Thu, May 20, 2021 at 01:39:54PM +0530, Nava kishore Manne wrote:
quoted
Add support for Xilinx Versal FPGA manager.
PDI source type can be DDR, OCM, QSPI flash etc..
But driver allocates memory always from DDR, Since driver supports
only DDR source type.
Signed-off-by: Appana Durga Kedareswara rao
[off-list ref]
Signed-off-by: Nava kishore Manne <redacted>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
---
Changes for v2:
-Updated the Fpga Mgr registrations call's
to 5.11
-Fixed some minor coding issues as suggested by
Moritz.
Changes for v3:
-Rewritten the Versal fpga Kconfig contents.
Changes for v4:
-Rebased the changes on linux-next.
No functional changes.
Changes for v5:
-None.
Changes for v6:
-None.
drivers/fpga/Kconfig | 9 +++
drivers/fpga/Makefile | 1 +
drivers/fpga/versal-fpga.c | 117
+++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
create mode 100644 drivers/fpga/versal-fpga.c
diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index
Agree this empty API is not needed.
It's a limitation with the framework and this needs to fixed in the fpga_manager core.
Will address this generic issue in a different series.
You save a pointer to a reference counted structure, without incrementing
the reference count. What could go wrong? :)
You are getting lucky here, but as stated above, why do you need this
pointer?
From: Moritz Fischer <mdf@kernel.org> Date: 2021-06-01 15:43:37
On Tue, Jun 01, 2021 at 06:56:32AM +0000, Nava kishore Manne wrote:
Hi Greg,
Thanks for providing the review comments.
Please find my response inline.
quoted
-----Original Message-----
From: Greg KH <gregkh@linuxfoundation.org>
Sent: Thursday, May 20, 2021 2:19 PM
To: Nava kishore Manne <redacted>
Cc: robh+dt@kernel.org; Michal Simek <redacted>;
mdf@kernel.org; trix@redhat.com; arnd@arndb.de; Rajan Vaja
[off-list ref]; Amit Sunil Dhamne [off-list ref];
Tejas Patel [off-list ref]; zou_wei@huawei.com; Sai Krishna
Potthuri [off-list ref]; Ravi Patel [off-list ref];
iwamatsu@nigauri.org; Jiaying Liang [off-list ref];
devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
kernel@vger.kernel.org; linux-fpga@vger.kernel.org; git [off-list ref];
chinnikishore369@gmail.com; Appana Durga Kedareswara Rao
[off-list ref]
Subject: Re: [PATCH v6 4/4] fpga: versal-fpga: Add versal fpga manager driver
On Thu, May 20, 2021 at 01:39:54PM +0530, Nava kishore Manne wrote:
quoted
Add support for Xilinx Versal FPGA manager.
PDI source type can be DDR, OCM, QSPI flash etc..
But driver allocates memory always from DDR, Since driver supports
only DDR source type.
Signed-off-by: Appana Durga Kedareswara rao
[off-list ref]
Signed-off-by: Nava kishore Manne <redacted>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
---
Changes for v2:
-Updated the Fpga Mgr registrations call's
to 5.11
-Fixed some minor coding issues as suggested by
Moritz.
Changes for v3:
-Rewritten the Versal fpga Kconfig contents.
Changes for v4:
-Rebased the changes on linux-next.
No functional changes.
Changes for v5:
-None.
Changes for v6:
-None.
drivers/fpga/Kconfig | 9 +++
drivers/fpga/Makefile | 1 +
drivers/fpga/versal-fpga.c | 117
+++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
create mode 100644 drivers/fpga/versal-fpga.c
diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index
Agree this empty API is not needed.
It's a limitation with the framework and this needs to fixed in the fpga_manager core.
Will address this generic issue in a different series.
I was working on a series to clean this up anyways :)
You save a pointer to a reference counted structure, without incrementing
the reference count. What could go wrong? :)
You are getting lucky here, but as stated above, why do you need this
pointer?
From: Rob Herring <robh@kernel.org> Date: 2021-06-02 18:31:36
On Thu, May 20, 2021 at 01:39:53PM +0530, Nava kishore Manne wrote:
quoted hunk
Add documentation to describe Xilinx firmware driver bindings.
Firmware driver provides an interface to firmware APIs.
Interface APIs can be used by any driver to communicate
to Platform Management Unit.
Signed-off-by: Nava kishore Manne <redacted>
---
Changes for v4:
-Added new yaml file for xilinx firmware
as suggested by Rob.
Changes for v5:
-Fixed some minor issues and updated the fpga node name to versal_fpga.
Changes for v6:
-Added AES and Clk nodes as a sub nodes to the firmware node.
.../firmware/xilinx/xlnx,zynqmp-firmware.yaml | 102 ++++++++++++++++++
1 file changed, 102 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml
@@ -0,0 +1,102 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/firmware/xilinx/xlnx,zynqmp-firmware.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Xilinx firmware driver++maintainers:+-Nava kishore Manne <nava.manne@xilinx.com>++description:+The zynqmp-firmware node describes the interface to platform firmware.+ZynqMP has an interface to communicate with secure firmware. Firmware+driver provides an interface to firmware APIs. Interface APIs can be+used by any driver to communicate to PMUFW(Platform Management Unit).+These requests include clock management, pin control, device control,+power management service, FPGA service and other platform management+services.++properties:+compatible:+oneOf:+-description:+For implementations complying for Zynq Ultrascale+ MPSoC.+const:xlnx,zynqmp-firmware++-description:+For implementations complying for Versal.+const:xlnx,versal-firmware++method:+description:|+The method of calling the PM-API firmware layer.+Permitted values are.+-"smc":SMC#0, following the SMCCC+-"hvc":HVC#0, following the SMCCC++$ref:/schemas/types.yaml#/definitions/string-array+enum:+-smc+-hvc++patternProperties:+"versal_fpga":
This says 'fooversal_fpgabar' is a valid node name.
You don't need a pattern, move under 'properties'. Same for the other
child nodes.
+ $ref: "../../fpga/xlnx,versal-fpga.yaml#"
/schemas/fpga/...
Don't need quotes.
+ description: Compatible of the FPGA device.
+ type: object
+ required:
+ - compatible
Drop. What's required should be in xlnx,versal-fpga.yaml.
+
+ "zynqmp-aes":
Same comments as above on the rest of the child nodes.
+ $ref: "../../crypto/xlnx,zynqmp-aes.yaml#"
+ description: |
+ The ZynqMP AES-GCM hardened cryptographic accelerator is
+ used to encrypt or decrypt the data with provided key and
+ initialization vector.
+ type: object
+ required:
+ - compatible
+
+ "clock-controller":
+ $ref: "../../clock/xlnx,versal-clk.yaml#"
+ description: |
+ The clock controller is a hardware block of Xilinx versal
+ clock tree. It reads required input clock frequencies from
+ the devicetree and acts as clock provider for all clock
+ consumers of PS clocks.list of clock specifiers which are
+ external input clocks to the given clock controller.
+ type: object
+ required:
+ - compatible
+ - "#clock-cells"
+ - clocks
+ - clock-names
+
+required:
+ - compatible
+
+examples:
+ - |
+ versal-firmware {
+ compatible = "xlnx,versal-firmware";
+ method = "smc";
+
+ versal_fpga: versal_fpga {
+ compatible = "xlnx,versal-fpga";
+ };
+
+ xlnx_aes: zynqmp-aes {
+ compatible = "xlnx,zynqmp-aes";
+ };
+
+ versal_clk: clock-controller {
+ #clock-cells = <1>;
+ compatible = "xlnx,versal-clk";
+ clocks = <&ref>, <&alt_ref>, <&pl_alt_ref>;
+ clock-names = "ref", "alt_ref", "pl_alt_ref";
+ };
+ };
+
+additionalProperties: false
From: Nava kishore Manne <hidden> Date: 2021-06-04 07:37:01
Hi Rob,
Thanks for providing the review comments.
Please find my response inline.
-----Original Message-----
From: Rob Herring <robh@kernel.org>
Sent: Thursday, June 3, 2021 12:02 AM
To: Nava kishore Manne <redacted>
Cc: Michal Simek <redacted>; mdf@kernel.org; trix@redhat.com;
arnd@arndb.de; Rajan Vaja [off-list ref];
gregkh@linuxfoundation.org; Amit Sunil Dhamne
[off-list ref]; Tejas Patel [off-list ref];
zou_wei@huawei.com; Sai Krishna Potthuri [off-list ref]; Ravi
Patel [off-list ref]; iwamatsu@nigauri.org; Jiaying Liang
[off-list ref]; devicetree@vger.kernel.org; linux-arm-
kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
fpga@vger.kernel.org; git [off-list ref]; chinnikishore369@gmail.com
Subject: Re: [PATCH v6 3/4] dt-bindings: firmware: Add bindings for xilinx
firmware
On Thu, May 20, 2021 at 01:39:53PM +0530, Nava kishore Manne wrote:
quoted
Add documentation to describe Xilinx firmware driver bindings.
Firmware driver provides an interface to firmware APIs.
Interface APIs can be used by any driver to communicate to Platform
Management Unit.
Signed-off-by: Nava kishore Manne <redacted>
---
Changes for v4:
-Added new yaml file for xilinx firmware
as suggested by Rob.
Changes for v5:
-Fixed some minor issues and updated the fpga node name to
versal_fpga.
quoted
Changes for v6:
-Added AES and Clk nodes as a sub nodes to the firmware node.
.../firmware/xilinx/xlnx,zynqmp-firmware.yaml | 102
++++++++++++++++++
1 file changed, 102 insertions(+)
create mode 100644
Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-
@@ -0,0 +1,102 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2+---+$id:+http://devicetree.org/schemas/firmware/xilinx/xlnx,zynqmp-firmware.ya+ml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Xilinx firmware driver++maintainers:+-Nava kishore Manne <nava.manne@xilinx.com>++description:+The zynqmp-firmware node describes the interface to platform
firmware.
quoted
+ ZynqMP has an interface to communicate with secure firmware.
+Firmware
+ driver provides an interface to firmware APIs. Interface APIs can
+be
+ used by any driver to communicate to PMUFW(Platform Management
Unit).
quoted
+ These requests include clock management, pin control, device
+control,
+ power management service, FPGA service and other platform
+management
+ services.
+
+properties:
+ compatible:
+ oneOf:
+ - description:
+ For implementations complying for Zynq Ultrascale+ MPSoC.
+ const: xlnx,zynqmp-firmware
+
+ - description:
+ For implementations complying for Versal.
+ const: xlnx,versal-firmware
+
+ method:
+ description: |
+ The method of calling the PM-API firmware layer.
+ Permitted values are.
+ - "smc" : SMC #0, following the SMCCC
+ - "hvc" : HVC #0, following the SMCCC
+
+ $ref: /schemas/types.yaml#/definitions/string-array
+ enum:
+ - smc
+ - hvc
+
+patternProperties:
+ "versal_fpga":
This says 'fooversal_fpgabar' is a valid node name.
You don't need a pattern, move under 'properties'. Same for the other child
nodes.
Will fix in v7.
quoted
+ $ref: "../../fpga/xlnx,versal-fpga.yaml#"
/schemas/fpga/...
Don't need quotes.
Will fix in v7.
quoted
+ description: Compatible of the FPGA device.
+ type: object
+ required:
+ - compatible
Drop. What's required should be in xlnx,versal-fpga.yaml.
Will fix in v7.
quoted
+
+ "zynqmp-aes":
Same comments as above on the rest of the child nodes.
Will fix in v7.
quoted
+ $ref: "../../crypto/xlnx,zynqmp-aes.yaml#"
+ description: |
+ The ZynqMP AES-GCM hardened cryptographic accelerator is
+ used to encrypt or decrypt the data with provided key and
+ initialization vector.
+ type: object
+ required:
+ - compatible
+
+ "clock-controller":
+ $ref: "../../clock/xlnx,versal-clk.yaml#"
+ description: |
+ The clock controller is a hardware block of Xilinx versal
+ clock tree. It reads required input clock frequencies from
+ the devicetree and acts as clock provider for all clock
+ consumers of PS clocks.list of clock specifiers which are
+ external input clocks to the given clock controller.
+ type: object
+ required:
+ - compatible
+ - "#clock-cells"
+ - clocks
+ - clock-names
+
+required:
+ - compatible
+
+examples:
+ - |
+ versal-firmware {
+ compatible = "xlnx,versal-firmware";
+ method = "smc";
+
+ versal_fpga: versal_fpga {
+ compatible = "xlnx,versal-fpga";
+ };
+
+ xlnx_aes: zynqmp-aes {
+ compatible = "xlnx,zynqmp-aes";
+ };
+
+ versal_clk: clock-controller {
+ #clock-cells = <1>;
+ compatible = "xlnx,versal-clk";
+ clocks = <&ref>, <&alt_ref>, <&pl_alt_ref>;
+ clock-names = "ref", "alt_ref", "pl_alt_ref";
+ };
+ };
+
+additionalProperties: false