* [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver
@ 2019-09-11 7:47 Michal Simek
2019-09-11 8:54 ` Lokesh Vutla
2019-10-08 7:32 ` Michal Simek
0 siblings, 2 replies; 4+ messages in thread
From: Michal Simek @ 2019-09-11 7:47 UTC (permalink / raw)
To: u-boot
From: Rajan Vaja <rajan.vaja@xilinx.com>
Add simple ZynqMP firmware drive to populate child nodes under
zynqmp_firmware DT node.
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
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
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 95fe0aea2ce8..305cbd96f165 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -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.
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index 873bc8c79679..b70a2063551c 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -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.
diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
index 6c3e12968527..a0c250a473eb 100644
--- a/drivers/firmware/Makefile
+++ b/drivers/firmware/Makefile
@@ -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
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
new file mode 100644
index 000000000000..b36eda1b04be
--- /dev/null
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -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,
+};
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver
2019-09-11 7:47 [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver Michal Simek
@ 2019-09-11 8:54 ` Lokesh Vutla
2019-09-11 9:07 ` Michal Simek
2019-10-08 7:32 ` Michal Simek
1 sibling, 1 reply; 4+ messages in thread
From: Lokesh Vutla @ 2019-09-11 8:54 UTC (permalink / raw)
To: u-boot
On 11/09/19 1:17 PM, Michal Simek wrote:
> From: Rajan Vaja <rajan.vaja@xilinx.com>
>
> Add simple ZynqMP firmware drive to populate child nodes under
> zynqmp_firmware DT node.
>
> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
If this driver is only meant for populating child nodes, then simple-bus in
compatible can solve the problem.
Thanks and regards,
Loksh
> ---
>
> 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
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 95fe0aea2ce8..305cbd96f165 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -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.
> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
> index 873bc8c79679..b70a2063551c 100644
> --- a/drivers/firmware/Kconfig
> +++ b/drivers/firmware/Kconfig
> @@ -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.
> diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
> index 6c3e12968527..a0c250a473eb 100644
> --- a/drivers/firmware/Makefile
> +++ b/drivers/firmware/Makefile
> @@ -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
> diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
> new file mode 100644
> index 000000000000..b36eda1b04be
> --- /dev/null
> +++ b/drivers/firmware/firmware-zynqmp.c
> @@ -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,
> +};
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver
2019-09-11 8:54 ` Lokesh Vutla
@ 2019-09-11 9:07 ` Michal Simek
0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2019-09-11 9:07 UTC (permalink / raw)
To: u-boot
On 11. 09. 19 10:54, Lokesh Vutla wrote:
>
>
> On 11/09/19 1:17 PM, Michal Simek wrote:
>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>
>> Add simple ZynqMP firmware drive to populate child nodes under
>> zynqmp_firmware DT node.
>>
>> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>
> 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.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt?h=v5.3-rc8
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver
2019-09-11 7:47 [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver Michal Simek
2019-09-11 8:54 ` Lokesh Vutla
@ 2019-10-08 7:32 ` Michal Simek
1 sibling, 0 replies; 4+ messages in thread
From: Michal Simek @ 2019-10-08 7:32 UTC (permalink / raw)
To: u-boot
st 11. 9. 2019 v 9:47 odesÃlatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> From: Rajan Vaja <rajan.vaja@xilinx.com>
>
> Add simple ZynqMP firmware drive to populate child nodes under
> zynqmp_firmware DT node.
>
> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> 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
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 95fe0aea2ce8..305cbd96f165 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -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.
> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
> index 873bc8c79679..b70a2063551c 100644
> --- a/drivers/firmware/Kconfig
> +++ b/drivers/firmware/Kconfig
> @@ -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.
> diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
> index 6c3e12968527..a0c250a473eb 100644
> --- a/drivers/firmware/Makefile
> +++ b/drivers/firmware/Makefile
> @@ -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
> diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
> new file mode 100644
> index 000000000000..b36eda1b04be
> --- /dev/null
> +++ b/drivers/firmware/firmware-zynqmp.c
> @@ -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,
> +};
> --
> 2.17.1
>
Applied with also record in MAINTAINERS file.
M
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-08 7:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 7:47 [U-Boot] [PATCH] zynqmp: firmware: Add Xilinx ZynqMP firmware driver Michal Simek
2019-09-11 8:54 ` Lokesh Vutla
2019-09-11 9:07 ` Michal Simek
2019-10-08 7:32 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.