zynqmp: firmware: Add Xilinx ZynqMP firmware driver
Subsystems (2)
PATCH 1/1 zynqmp: firmware: Add Xilinx ZynqMP firmware driver
From: Rajan Vaja <[email protected]>
Add simple ZynqMP firmware drive to populate child nodes under zynqmp_firmware DT node.
---
drivers/clk/Kconfig | 1 + drivers/firmware/Kconfig | 10 ++++++++++ drivers/firmware/Makefile | 1 + drivers/firmware/firmware-zynqmp.c | 15 +++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 drivers/firmware/firmware-zynqmp.c
drivers/clk/Kconfig +1 -0
@@ -113,6 +113,7 @@ config CLK_ZYNQ config CLK_ZYNQMP bool "Enable clock driver support for ZynqMP" depends on ARCH_ZYNQMP + select ZYNQMP_FIRMWARE help This clock driver adds support for clock realted settings for ZynqMP platform.
drivers/firmware/Kconfig +10 -0
@@ -26,3 +26,13 @@ config TI_SCI_PROTOCOL This protocol library is used by client drivers to use the features provided by the system controller. + +config ZYNQMP_FIRMWARE + bool "ZynqMP Firmware interface" + select FIRMWARE + help + Firmware interface driver is used by different + drivers to communicate with the firmware for + various platform management services. + Say yes to enable ZynqMP firmware interface driver. + If in doubt, say N.
drivers/firmware/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_FIRMWARE) += firmware-uclass.o obj-$(CONFIG_$(SPL_)ARM_PSCI_FW) += psci.o obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o obj-$(CONFIG_SANDBOX) += firmware-sandbox.o +obj-$(CONFIG_ZYNQMP_FIRMWARE) += firmware-zynqmp.o
drivers/firmware/firmware-zynqmp.c new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <dm.h> + +static const struct udevice_id zynqmp_firmware_ids[] = { + { .compatible ="xlnx,zynqmp-firmware" }, + { } +}; + +U_BOOT_DRIVER (zynqmp_firmware) = { + .id =UCLASS_FIRMWARE , + .name ="zynqmp-firmware" , + .probe = dm_scan_fdt_dev, + .of_match = zynqmp_firmware_ids, +};
Signature · 1 line
2.17.1
PATCH 1/1 zynqmp: firmware: Add Xilinx ZynqMP firmware driver
Quoted 7 lines · Michal Simek
From: Rajan Vaja <[email protected]>
Add simple ZynqMP firmware drive to populate child nodes under
zynqmp_firmwareDT node.Signed-off-by Rajan Vaja <[email protected]>Signed-off-by Michal Simek <[email protected]>
If this driver is only meant for populating child nodes, then simple-bus in compatible can solve the problem.
Thanks and regards,
Loksh
Quoted 70 lines
---
drivers/clk/Kconfig | 1 + drivers/firmware/Kconfig | 10 ++++++++++ drivers/firmware/Makefile | 1 + drivers/firmware/firmware-zynqmp.c | 15 +++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 drivers/firmware/firmware-zynqmp.cdrivers/clk/Kconfig +1
-0@@ -113,6 +113,7 @@ config CLK_ZYNQ config CLK_ZYNQMP bool "Enable clock driver support for ZynqMP" depends on ARCH_ZYNQMP + select ZYNQMP_FIRMWARE help This clock driver adds support for clock realted settings for ZynqMP platform.drivers/firmware/Kconfig +10
-0@@ -26,3 +26,13 @@ config TI_SCI_PROTOCOL This protocol library is used by client drivers to use the features provided by the system controller. + +config ZYNQMP_FIRMWARE + bool "ZynqMP Firmware interface" + select FIRMWARE + help + Firmware interface driver is used by different + drivers to communicate with the firmware for + various platform management services. + Say yes to enable ZynqMP firmware interface driver. + If in doubt, say N.drivers/firmware/Makefile +1
-0@@ -2,3 +2,4 @@ obj-$(CONFIG_FIRMWARE) += firmware-uclass.o obj-$(CONFIG_$(SPL_)ARM_PSCI_FW) += psci.o obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o obj-$(CONFIG_SANDBOX) += firmware-sandbox.o +obj-$(CONFIG_ZYNQMP_FIRMWARE) += firmware-zynqmp.odrivers/firmware/firmware-zynqmp.c new file +15
-0@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <dm.h> + +static const struct udevice_id zynqmp_firmware_ids[] = { + { .compatible ="xlnx,zynqmp-firmware" }, + { } +}; + +U_BOOT_DRIVER (zynqmp_firmware) = { + .id =UCLASS_FIRMWARE , + .name ="zynqmp-firmware" , + .probe = dm_scan_fdt_dev, + .of_match = zynqmp_firmware_ids, +};
PATCH 1/1 zynqmp: firmware: Add Xilinx ZynqMP firmware driver
Quoted 5 lines · Lokesh Vutla
Quoted 2 lines · Michal Simek
From: Rajan Vaja <[email protected]>
Quoted 8 lines
Quoted 5 lines
Add simple ZynqMP firmware drive to populate child nodes under
zynqmp_firmwareDT node.Signed-off-by Rajan Vaja <[email protected]>Signed-off-by Michal Simek <[email protected]>If this driver is only meant for populating child nodes, then simple-bus in compatible can solve the problem.
For u-boot this should be ok but it is not the part of kernel DT binding.
Also adding simple-bus in u-boot DTS file would cause issues ok kernel side when DT from u-boot is used in Linux.
My expectation is that we should move all functionality which we have in platform code to this driver.
Thanks,
Michal
PATCH 1/1 zynqmp: firmware: Add Xilinx ZynqMP firmware driver
In reply to Michal Simekst 11. 9. 2019 v 9:47 odesÃlatel Michal Simek <[email protected]> napsal:
Quoted 78 lines
From: Rajan Vaja <[email protected]>
Add simple ZynqMP firmware drive to populate child nodes under
zynqmp_firmwareDT node.Signed-off-by Rajan Vaja <[email protected]>Signed-off-by Michal Simek <[email protected]>---
drivers/clk/Kconfig | 1 + drivers/firmware/Kconfig | 10 ++++++++++ drivers/firmware/Makefile | 1 + drivers/firmware/firmware-zynqmp.c | 15 +++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 drivers/firmware/firmware-zynqmp.cdrivers/clk/Kconfig +1
-0@@ -113,6 +113,7 @@ config CLK_ZYNQ config CLK_ZYNQMP bool "Enable clock driver support for ZynqMP" depends on ARCH_ZYNQMP + select ZYNQMP_FIRMWARE help This clock driver adds support for clock realted settings for ZynqMP platform.drivers/firmware/Kconfig +10
-0@@ -26,3 +26,13 @@ config TI_SCI_PROTOCOL This protocol library is used by client drivers to use the features provided by the system controller. + +config ZYNQMP_FIRMWARE + bool "ZynqMP Firmware interface" + select FIRMWARE + help + Firmware interface driver is used by different + drivers to communicate with the firmware for + various platform management services. + Say yes to enable ZynqMP firmware interface driver. + If in doubt, say N.drivers/firmware/Makefile +1
-0@@ -2,3 +2,4 @@ obj-$(CONFIG_FIRMWARE) += firmware-uclass.o obj-$(CONFIG_$(SPL_)ARM_PSCI_FW) += psci.o obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o obj-$(CONFIG_SANDBOX) += firmware-sandbox.o +obj-$(CONFIG_ZYNQMP_FIRMWARE) += firmware-zynqmp.odrivers/firmware/firmware-zynqmp.c new file +15
-1@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <dm.h> + +static const struct udevice_id zynqmp_firmware_ids[] = { + { .compatible ="xlnx,zynqmp-firmware" }, + { } +}; + +U_BOOT_DRIVER (zynqmp_firmware) = { + .id =UCLASS_FIRMWARE , + .name ="zynqmp-firmware" , + .probe = dm_scan_fdt_dev, + .of_match = zynqmp_firmware_ids, +}; --
Quoted 2 lines
2.17.1
Applied with also record in MAINTAINERS file.
M
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs