* [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers
@ 2020-11-09 13:48 Michael Tretter
2020-11-09 13:48 ` [PATCH v4 1/4] soc: xilinx: vcu: drop useless success message Michael Tretter
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Michael Tretter @ 2020-11-09 13:48 UTC (permalink / raw)
To: linux-arm-kernel
Cc: dshah, tejasp, gregkh, Michael Tretter, rajanv, michals, kernel,
rvisaval
Hello,
this is v4 of the series to expose the vcu-settings via syscon. This is
necessary, because other drivers, e.g. the allegro-dvt driver, need to read
the VCU settings as well.
I dropped the patches that register the clock controller for now. The patch
stack to rework the driver to properly provide the PLL and clock dividers grew
to a level that justifies a separate series.
The individual patches do not contain any changes compared to v3.
Michael
Changelog:
v3 -> v4:
- Drop patches that add a clock controller
v2 -> v3:
- drop unused xvcu_reset() function
v1 -> v2:
- drop custom select for syscon
- unregister registered clocks on driver remove
Michael Tretter (4):
soc: xilinx: vcu: drop useless success message
dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding
soc: xilinx: vcu: use vcu-settings syscon registers
soc: xilinx: vcu: add missing register NUM_CORE
.../soc/xilinx/xlnx,vcu-settings.yaml | 34 +++++++
.../bindings/soc/xilinx/xlnx,vcu.txt | 9 +-
drivers/soc/xilinx/Kconfig | 1 +
drivers/soc/xilinx/xlnx_vcu.c | 96 +++++++++----------
include/linux/mfd/syscon/xlnx-vcu.h | 39 ++++++++
5 files changed, 123 insertions(+), 56 deletions(-)
create mode 100644 Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu-settings.yaml
create mode 100644 include/linux/mfd/syscon/xlnx-vcu.h
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v4 1/4] soc: xilinx: vcu: drop useless success message
2020-11-09 13:48 [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michael Tretter
@ 2020-11-09 13:48 ` Michael Tretter
2020-11-09 13:48 ` [PATCH v4 2/4] dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding Michael Tretter
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Michael Tretter @ 2020-11-09 13:48 UTC (permalink / raw)
To: linux-arm-kernel
Cc: dshah, tejasp, gregkh, Michael Tretter, rajanv, michals, kernel,
rvisaval
The message that the driver was successfully probed only adds useless
noise. Drop the message.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
drivers/soc/xilinx/xlnx_vcu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c
index a3aa40996f13..dcd8e7824b06 100644
--- a/drivers/soc/xilinx/xlnx_vcu.c
+++ b/drivers/soc/xilinx/xlnx_vcu.c
@@ -571,8 +571,6 @@ static int xvcu_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, xvcu);
- dev_info(&pdev->dev, "%s: Probed successfully\n", __func__);
-
return 0;
error_pll_ref:
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4 2/4] dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding
2020-11-09 13:48 [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michael Tretter
2020-11-09 13:48 ` [PATCH v4 1/4] soc: xilinx: vcu: drop useless success message Michael Tretter
@ 2020-11-09 13:48 ` Michael Tretter
2020-11-09 13:48 ` [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers Michael Tretter
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Michael Tretter @ 2020-11-09 13:48 UTC (permalink / raw)
To: linux-arm-kernel
Cc: dshah, tejasp, gregkh, Michael Tretter, rajanv, michals, kernel,
Rob Herring, rvisaval
The xlnx,vcu binding comprises two adjacent register banks:
The first register bank ("vcu_slcr") contains registers for setting the
clocks of the vcu and controlling the performance monitors. The second
bank ("logicoreip") contains the configuration settings of the video codec
unit, which are set before synthesizing the bitstream.
Drivers that drive the actual video codec unit need to read the
registers from the logicoreip register bank for configuring the vcu
firmware.
As logicoreip is a too generic name for this register bank, use
"vcu-settings" as a binding name, because the register bank basically
provides the configuration settings of the VCU.
Therefore, add the vcu-settings binding to provide a syscon interface
for other drivers to read these registers.
The alternative would have been to merge the two register banks of the
xlnx,vcu binding into one register bank and make xlnx,vcu provide a
syscon interface, but that would lead to more incompatibility than
making second register bank of xlnx,vcu optional.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
---
.../soc/xilinx/xlnx,vcu-settings.yaml | 34 +++++++++++++++++++
.../bindings/soc/xilinx/xlnx,vcu.txt | 9 ++---
2 files changed, 36 insertions(+), 7 deletions(-)
create mode 100644 Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu-settings.yaml
diff --git a/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu-settings.yaml b/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu-settings.yaml
new file mode 100644
index 000000000000..378d0ced43c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu-settings.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/xilinx/xlnx,vcu-settings.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx VCU Settings
+
+maintainers:
+ - Michael Tretter <kernel@pengutronix.de>
+
+description: |
+ The Xilinx VCU Settings provides information about the configuration of the
+ video codec unit.
+
+properties:
+ compatible:
+ items:
+ - const: xlnx,vcu-settings
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ xlnx_vcu: vcu@a0041000 {
+ compatible = "xlnx,vcu-settings", "syscon";
+ reg = <0x0 0xa0041000 0x0 0x1000>;
+ };
diff --git a/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu.txt b/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu.txt
index 6786d6715df0..2417b13ba468 100644
--- a/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu.txt
+++ b/Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu.txt
@@ -12,10 +12,7 @@ Required properties:
- compatible: shall be one of:
"xlnx,vcu"
"xlnx,vcu-logicoreip-1.0"
-- reg, reg-names: There are two sets of registers need to provide.
- 1. vcu slcr
- 2. Logicore
- reg-names should contain name for the each register sequence.
+- reg : The base offset and size of the VCU_PL_SLCR register space.
- clocks: phandle for aclk and pll_ref clocksource
- clock-names: The identification string, "aclk", is always required for
the axi clock. "pll_ref" is required for pll.
@@ -23,9 +20,7 @@ Example:
xlnx_vcu: vcu@a0040000 {
compatible = "xlnx,vcu-logicoreip-1.0";
- reg = <0x0 0xa0040000 0x0 0x1000>,
- <0x0 0xa0041000 0x0 0x1000>;
- reg-names = "vcu_slcr", "logicore";
+ reg = <0x0 0xa0040000 0x0 0x1000>;
clocks = <&si570_1>, <&clkc 71>;
clock-names = "pll_ref", "aclk";
};
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers
2020-11-09 13:48 [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michael Tretter
2020-11-09 13:48 ` [PATCH v4 1/4] soc: xilinx: vcu: drop useless success message Michael Tretter
2020-11-09 13:48 ` [PATCH v4 2/4] dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding Michael Tretter
@ 2020-11-09 13:48 ` Michael Tretter
2020-11-13 20:52 ` Hyun Kwon
2020-11-09 13:48 ` [PATCH v4 4/4] soc: xilinx: vcu: add missing register NUM_CORE Michael Tretter
2020-11-20 13:55 ` [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michal Simek
4 siblings, 1 reply; 8+ messages in thread
From: Michael Tretter @ 2020-11-09 13:48 UTC (permalink / raw)
To: linux-arm-kernel
Cc: dshah, tejasp, gregkh, Michael Tretter, rajanv, michals, kernel,
rvisaval
Switch the "logicoreip" registers to the new xlnx,vcu-settings binding
to be able to read the settings if the settings are specified in a
separate device tree node that is shared with other drivers.
If the driver is not able to find a node with the new binding, fall back
to check for the logicore register bank to be backwards compatible.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
drivers/soc/xilinx/Kconfig | 1 +
drivers/soc/xilinx/xlnx_vcu.c | 94 ++++++++++++++---------------
include/linux/mfd/syscon/xlnx-vcu.h | 38 ++++++++++++
3 files changed, 86 insertions(+), 47 deletions(-)
create mode 100644 include/linux/mfd/syscon/xlnx-vcu.h
diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig
index 646512d7276f..0b1708dae361 100644
--- a/drivers/soc/xilinx/Kconfig
+++ b/drivers/soc/xilinx/Kconfig
@@ -4,6 +4,7 @@ menu "Xilinx SoC drivers"
config XILINX_VCU
tristate "Xilinx VCU logicoreIP Init"
depends on HAS_IOMEM
+ select REGMAP_MMIO
help
Provides the driver to enable and disable the isolation between the
processing system and programmable logic part by using the logicoreIP
diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c
index dcd8e7824b06..14daad4efc58 100644
--- a/drivers/soc/xilinx/xlnx_vcu.c
+++ b/drivers/soc/xilinx/xlnx_vcu.c
@@ -10,39 +10,12 @@
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/mfd/syscon/xlnx-vcu.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
-
-/* Address map for different registers implemented in the VCU LogiCORE IP. */
-#define VCU_ECODER_ENABLE 0x00
-#define VCU_DECODER_ENABLE 0x04
-#define VCU_MEMORY_DEPTH 0x08
-#define VCU_ENC_COLOR_DEPTH 0x0c
-#define VCU_ENC_VERTICAL_RANGE 0x10
-#define VCU_ENC_FRAME_SIZE_X 0x14
-#define VCU_ENC_FRAME_SIZE_Y 0x18
-#define VCU_ENC_COLOR_FORMAT 0x1c
-#define VCU_ENC_FPS 0x20
-#define VCU_MCU_CLK 0x24
-#define VCU_CORE_CLK 0x28
-#define VCU_PLL_BYPASS 0x2c
-#define VCU_ENC_CLK 0x30
-#define VCU_PLL_CLK 0x34
-#define VCU_ENC_VIDEO_STANDARD 0x38
-#define VCU_STATUS 0x3c
-#define VCU_AXI_ENC_CLK 0x40
-#define VCU_AXI_DEC_CLK 0x44
-#define VCU_AXI_MCU_CLK 0x48
-#define VCU_DEC_VIDEO_STANDARD 0x4c
-#define VCU_DEC_FRAME_SIZE_X 0x50
-#define VCU_DEC_FRAME_SIZE_Y 0x54
-#define VCU_DEC_FPS 0x58
-#define VCU_BUFFER_B_FRAME 0x5c
-#define VCU_WPP_EN 0x60
-#define VCU_PLL_CLK_DEC 0x64
-#define VCU_GASKET_INIT 0x74
-#define VCU_GASKET_VALUE 0x03
+#include <linux/regmap.h>
/* vcu slcr registers, bitmask and shift */
#define VCU_PLL_CTRL 0x24
@@ -106,11 +79,20 @@ struct xvcu_device {
struct device *dev;
struct clk *pll_ref;
struct clk *aclk;
- void __iomem *logicore_reg_ba;
+ struct regmap *logicore_reg_ba;
void __iomem *vcu_slcr_ba;
u32 coreclk;
};
+static struct regmap_config vcu_settings_regmap_config = {
+ .name = "regmap",
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .max_register = 0xfff,
+ .cache_type = REGCACHE_NONE,
+};
+
/**
* struct xvcu_pll_cfg - Helper data
* @fbdiv: The integer portion of the feedback divider to the PLL
@@ -300,10 +282,12 @@ static int xvcu_set_vcu_pll_info(struct xvcu_device *xvcu)
int ret, i;
const struct xvcu_pll_cfg *found = NULL;
- inte = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK);
- deci = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC);
- coreclk = xvcu_read(xvcu->logicore_reg_ba, VCU_CORE_CLK) * MHZ;
- mcuclk = xvcu_read(xvcu->logicore_reg_ba, VCU_MCU_CLK) * MHZ;
+ regmap_read(xvcu->logicore_reg_ba, VCU_PLL_CLK, &inte);
+ regmap_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC, &deci);
+ regmap_read(xvcu->logicore_reg_ba, VCU_CORE_CLK, &coreclk);
+ coreclk *= MHZ;
+ regmap_read(xvcu->logicore_reg_ba, VCU_MCU_CLK, &mcuclk);
+ mcuclk *= MHZ;
if (!mcuclk || !coreclk) {
dev_err(xvcu->dev, "Invalid mcu and core clock data\n");
return -EINVAL;
@@ -498,6 +482,7 @@ static int xvcu_probe(struct platform_device *pdev)
{
struct resource *res;
struct xvcu_device *xvcu;
+ void __iomem *regs;
int ret;
xvcu = devm_kzalloc(&pdev->dev, sizeof(*xvcu), GFP_KERNEL);
@@ -518,17 +503,32 @@ static int xvcu_probe(struct platform_device *pdev)
return -ENOMEM;
}
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "logicore");
- if (!res) {
- dev_err(&pdev->dev, "get logicore memory resource failed.\n");
- return -ENODEV;
- }
+ xvcu->logicore_reg_ba =
+ syscon_regmap_lookup_by_compatible("xlnx,vcu-settings");
+ if (IS_ERR(xvcu->logicore_reg_ba)) {
+ dev_info(&pdev->dev,
+ "could not find xlnx,vcu-settings: trying direct register access\n");
+
+ res = platform_get_resource_byname(pdev,
+ IORESOURCE_MEM, "logicore");
+ if (!res) {
+ dev_err(&pdev->dev, "get logicore memory resource failed.\n");
+ return -ENODEV;
+ }
- xvcu->logicore_reg_ba = devm_ioremap(&pdev->dev, res->start,
- resource_size(res));
- if (!xvcu->logicore_reg_ba) {
- dev_err(&pdev->dev, "logicore register mapping failed.\n");
- return -ENOMEM;
+ regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+ if (!regs) {
+ dev_err(&pdev->dev, "logicore register mapping failed.\n");
+ return -ENOMEM;
+ }
+
+ xvcu->logicore_reg_ba =
+ devm_regmap_init_mmio(&pdev->dev, regs,
+ &vcu_settings_regmap_config);
+ if (IS_ERR(xvcu->logicore_reg_ba)) {
+ dev_err(&pdev->dev, "failed to init regmap\n");
+ return PTR_ERR(xvcu->logicore_reg_ba);
+ }
}
xvcu->aclk = devm_clk_get(&pdev->dev, "aclk");
@@ -560,7 +560,7 @@ static int xvcu_probe(struct platform_device *pdev)
* Bit 0 : Gasket isolation
* Bit 1 : put VCU out of reset
*/
- xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
+ regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
/* Do the PLL Settings based on the ref clk,core and mcu clk freq */
ret = xvcu_set_pll(xvcu);
@@ -597,7 +597,7 @@ static int xvcu_remove(struct platform_device *pdev)
return -ENODEV;
/* Add the the Gasket isolation and put the VCU in reset. */
- xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
+ regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
clk_disable_unprepare(xvcu->pll_ref);
clk_disable_unprepare(xvcu->aclk);
diff --git a/include/linux/mfd/syscon/xlnx-vcu.h b/include/linux/mfd/syscon/xlnx-vcu.h
new file mode 100644
index 000000000000..d3edec4b7b1d
--- /dev/null
+++ b/include/linux/mfd/syscon/xlnx-vcu.h
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2020 Pengutronix, Michael Tretter <kernel@pengutronix.de>
+ */
+
+#ifndef __XLNX_VCU_H
+#define __XLNX_VCU_H
+
+#define VCU_ECODER_ENABLE 0x00
+#define VCU_DECODER_ENABLE 0x04
+#define VCU_MEMORY_DEPTH 0x08
+#define VCU_ENC_COLOR_DEPTH 0x0c
+#define VCU_ENC_VERTICAL_RANGE 0x10
+#define VCU_ENC_FRAME_SIZE_X 0x14
+#define VCU_ENC_FRAME_SIZE_Y 0x18
+#define VCU_ENC_COLOR_FORMAT 0x1c
+#define VCU_ENC_FPS 0x20
+#define VCU_MCU_CLK 0x24
+#define VCU_CORE_CLK 0x28
+#define VCU_PLL_BYPASS 0x2c
+#define VCU_ENC_CLK 0x30
+#define VCU_PLL_CLK 0x34
+#define VCU_ENC_VIDEO_STANDARD 0x38
+#define VCU_STATUS 0x3c
+#define VCU_AXI_ENC_CLK 0x40
+#define VCU_AXI_DEC_CLK 0x44
+#define VCU_AXI_MCU_CLK 0x48
+#define VCU_DEC_VIDEO_STANDARD 0x4c
+#define VCU_DEC_FRAME_SIZE_X 0x50
+#define VCU_DEC_FRAME_SIZE_Y 0x54
+#define VCU_DEC_FPS 0x58
+#define VCU_BUFFER_B_FRAME 0x5c
+#define VCU_WPP_EN 0x60
+#define VCU_PLL_CLK_DEC 0x64
+#define VCU_GASKET_INIT 0x74
+#define VCU_GASKET_VALUE 0x03
+
+#endif /* __XLNX_VCU_H */
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4 4/4] soc: xilinx: vcu: add missing register NUM_CORE
2020-11-09 13:48 [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michael Tretter
` (2 preceding siblings ...)
2020-11-09 13:48 ` [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers Michael Tretter
@ 2020-11-09 13:48 ` Michael Tretter
2020-11-20 13:55 ` [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michal Simek
4 siblings, 0 replies; 8+ messages in thread
From: Michael Tretter @ 2020-11-09 13:48 UTC (permalink / raw)
To: linux-arm-kernel
Cc: dshah, tejasp, gregkh, Michael Tretter, rajanv, michals, kernel,
rvisaval
The H.264/H.265 Video Codec Unit v1.2 documentation describes this
register as follows:
Number of encoders core used for the provided configuration
This is required for configuring the VCU encoder buffer.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
include/linux/mfd/syscon/xlnx-vcu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/mfd/syscon/xlnx-vcu.h b/include/linux/mfd/syscon/xlnx-vcu.h
index d3edec4b7b1d..ff7bc3656f6e 100644
--- a/include/linux/mfd/syscon/xlnx-vcu.h
+++ b/include/linux/mfd/syscon/xlnx-vcu.h
@@ -32,6 +32,7 @@
#define VCU_BUFFER_B_FRAME 0x5c
#define VCU_WPP_EN 0x60
#define VCU_PLL_CLK_DEC 0x64
+#define VCU_NUM_CORE 0x6c
#define VCU_GASKET_INIT 0x74
#define VCU_GASKET_VALUE 0x03
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers
2020-11-09 13:48 ` [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers Michael Tretter
@ 2020-11-13 20:52 ` Hyun Kwon
2020-11-17 8:08 ` Michael Tretter
0 siblings, 1 reply; 8+ messages in thread
From: Hyun Kwon @ 2020-11-13 20:52 UTC (permalink / raw)
To: Michael Tretter
Cc: dshah, Hyun Kwon, tejasp, gregkh, rajanv, michals, rvisaval,
kernel, linux-arm-kernel
Hi Michael,
Thank you for the patch.
On Mon, Nov 09, 2020 at 02:48:17PM +0100, Michael Tretter wrote:
> Switch the "logicoreip" registers to the new xlnx,vcu-settings binding
> to be able to read the settings if the settings are specified in a
> separate device tree node that is shared with other drivers.
>
> If the driver is not able to find a node with the new binding, fall back
> to check for the logicore register bank to be backwards compatible.
>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
> drivers/soc/xilinx/Kconfig | 1 +
> drivers/soc/xilinx/xlnx_vcu.c | 94 ++++++++++++++---------------
> include/linux/mfd/syscon/xlnx-vcu.h | 38 ++++++++++++
> 3 files changed, 86 insertions(+), 47 deletions(-)
> create mode 100644 include/linux/mfd/syscon/xlnx-vcu.h
>
> diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig
> index 646512d7276f..0b1708dae361 100644
> --- a/drivers/soc/xilinx/Kconfig
> +++ b/drivers/soc/xilinx/Kconfig
> @@ -4,6 +4,7 @@ menu "Xilinx SoC drivers"
> config XILINX_VCU
> tristate "Xilinx VCU logicoreIP Init"
> depends on HAS_IOMEM
> + select REGMAP_MMIO
This should be 'depends on'? Please check: https://www.spinics.net/lists/kernel/msg3607924.html
The rest look fine to me. After confirming above, for 1/4, 3/4, and 4/4,
please feel free to add,
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Thanks!
-hyun
> help
> Provides the driver to enable and disable the isolation between the
> processing system and programmable logic part by using the logicoreIP
> diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c
> index dcd8e7824b06..14daad4efc58 100644
> --- a/drivers/soc/xilinx/xlnx_vcu.c
> +++ b/drivers/soc/xilinx/xlnx_vcu.c
> @@ -10,39 +10,12 @@
> #include <linux/device.h>
> #include <linux/errno.h>
> #include <linux/io.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/mfd/syscon/xlnx-vcu.h>
> #include <linux/module.h>
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
> -
> -/* Address map for different registers implemented in the VCU LogiCORE IP. */
> -#define VCU_ECODER_ENABLE 0x00
> -#define VCU_DECODER_ENABLE 0x04
> -#define VCU_MEMORY_DEPTH 0x08
> -#define VCU_ENC_COLOR_DEPTH 0x0c
> -#define VCU_ENC_VERTICAL_RANGE 0x10
> -#define VCU_ENC_FRAME_SIZE_X 0x14
> -#define VCU_ENC_FRAME_SIZE_Y 0x18
> -#define VCU_ENC_COLOR_FORMAT 0x1c
> -#define VCU_ENC_FPS 0x20
> -#define VCU_MCU_CLK 0x24
> -#define VCU_CORE_CLK 0x28
> -#define VCU_PLL_BYPASS 0x2c
> -#define VCU_ENC_CLK 0x30
> -#define VCU_PLL_CLK 0x34
> -#define VCU_ENC_VIDEO_STANDARD 0x38
> -#define VCU_STATUS 0x3c
> -#define VCU_AXI_ENC_CLK 0x40
> -#define VCU_AXI_DEC_CLK 0x44
> -#define VCU_AXI_MCU_CLK 0x48
> -#define VCU_DEC_VIDEO_STANDARD 0x4c
> -#define VCU_DEC_FRAME_SIZE_X 0x50
> -#define VCU_DEC_FRAME_SIZE_Y 0x54
> -#define VCU_DEC_FPS 0x58
> -#define VCU_BUFFER_B_FRAME 0x5c
> -#define VCU_WPP_EN 0x60
> -#define VCU_PLL_CLK_DEC 0x64
> -#define VCU_GASKET_INIT 0x74
> -#define VCU_GASKET_VALUE 0x03
> +#include <linux/regmap.h>
>
> /* vcu slcr registers, bitmask and shift */
> #define VCU_PLL_CTRL 0x24
> @@ -106,11 +79,20 @@ struct xvcu_device {
> struct device *dev;
> struct clk *pll_ref;
> struct clk *aclk;
> - void __iomem *logicore_reg_ba;
> + struct regmap *logicore_reg_ba;
> void __iomem *vcu_slcr_ba;
> u32 coreclk;
> };
>
> +static struct regmap_config vcu_settings_regmap_config = {
> + .name = "regmap",
> + .reg_bits = 32,
> + .val_bits = 32,
> + .reg_stride = 4,
> + .max_register = 0xfff,
> + .cache_type = REGCACHE_NONE,
> +};
> +
> /**
> * struct xvcu_pll_cfg - Helper data
> * @fbdiv: The integer portion of the feedback divider to the PLL
> @@ -300,10 +282,12 @@ static int xvcu_set_vcu_pll_info(struct xvcu_device *xvcu)
> int ret, i;
> const struct xvcu_pll_cfg *found = NULL;
>
> - inte = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK);
> - deci = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC);
> - coreclk = xvcu_read(xvcu->logicore_reg_ba, VCU_CORE_CLK) * MHZ;
> - mcuclk = xvcu_read(xvcu->logicore_reg_ba, VCU_MCU_CLK) * MHZ;
> + regmap_read(xvcu->logicore_reg_ba, VCU_PLL_CLK, &inte);
> + regmap_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC, &deci);
> + regmap_read(xvcu->logicore_reg_ba, VCU_CORE_CLK, &coreclk);
> + coreclk *= MHZ;
> + regmap_read(xvcu->logicore_reg_ba, VCU_MCU_CLK, &mcuclk);
> + mcuclk *= MHZ;
> if (!mcuclk || !coreclk) {
> dev_err(xvcu->dev, "Invalid mcu and core clock data\n");
> return -EINVAL;
> @@ -498,6 +482,7 @@ static int xvcu_probe(struct platform_device *pdev)
> {
> struct resource *res;
> struct xvcu_device *xvcu;
> + void __iomem *regs;
> int ret;
>
> xvcu = devm_kzalloc(&pdev->dev, sizeof(*xvcu), GFP_KERNEL);
> @@ -518,17 +503,32 @@ static int xvcu_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "logicore");
> - if (!res) {
> - dev_err(&pdev->dev, "get logicore memory resource failed.\n");
> - return -ENODEV;
> - }
> + xvcu->logicore_reg_ba =
> + syscon_regmap_lookup_by_compatible("xlnx,vcu-settings");
> + if (IS_ERR(xvcu->logicore_reg_ba)) {
> + dev_info(&pdev->dev,
> + "could not find xlnx,vcu-settings: trying direct register access\n");
> +
> + res = platform_get_resource_byname(pdev,
> + IORESOURCE_MEM, "logicore");
> + if (!res) {
> + dev_err(&pdev->dev, "get logicore memory resource failed.\n");
> + return -ENODEV;
> + }
>
> - xvcu->logicore_reg_ba = devm_ioremap(&pdev->dev, res->start,
> - resource_size(res));
> - if (!xvcu->logicore_reg_ba) {
> - dev_err(&pdev->dev, "logicore register mapping failed.\n");
> - return -ENOMEM;
> + regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
> + if (!regs) {
> + dev_err(&pdev->dev, "logicore register mapping failed.\n");
> + return -ENOMEM;
> + }
> +
> + xvcu->logicore_reg_ba =
> + devm_regmap_init_mmio(&pdev->dev, regs,
> + &vcu_settings_regmap_config);
> + if (IS_ERR(xvcu->logicore_reg_ba)) {
> + dev_err(&pdev->dev, "failed to init regmap\n");
> + return PTR_ERR(xvcu->logicore_reg_ba);
> + }
> }
>
> xvcu->aclk = devm_clk_get(&pdev->dev, "aclk");
> @@ -560,7 +560,7 @@ static int xvcu_probe(struct platform_device *pdev)
> * Bit 0 : Gasket isolation
> * Bit 1 : put VCU out of reset
> */
> - xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
> + regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
>
> /* Do the PLL Settings based on the ref clk,core and mcu clk freq */
> ret = xvcu_set_pll(xvcu);
> @@ -597,7 +597,7 @@ static int xvcu_remove(struct platform_device *pdev)
> return -ENODEV;
>
> /* Add the the Gasket isolation and put the VCU in reset. */
> - xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
> + regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
>
> clk_disable_unprepare(xvcu->pll_ref);
> clk_disable_unprepare(xvcu->aclk);
> diff --git a/include/linux/mfd/syscon/xlnx-vcu.h b/include/linux/mfd/syscon/xlnx-vcu.h
> new file mode 100644
> index 000000000000..d3edec4b7b1d
> --- /dev/null
> +++ b/include/linux/mfd/syscon/xlnx-vcu.h
> @@ -0,0 +1,38 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (C) 2020 Pengutronix, Michael Tretter <kernel@pengutronix.de>
> + */
> +
> +#ifndef __XLNX_VCU_H
> +#define __XLNX_VCU_H
> +
> +#define VCU_ECODER_ENABLE 0x00
> +#define VCU_DECODER_ENABLE 0x04
> +#define VCU_MEMORY_DEPTH 0x08
> +#define VCU_ENC_COLOR_DEPTH 0x0c
> +#define VCU_ENC_VERTICAL_RANGE 0x10
> +#define VCU_ENC_FRAME_SIZE_X 0x14
> +#define VCU_ENC_FRAME_SIZE_Y 0x18
> +#define VCU_ENC_COLOR_FORMAT 0x1c
> +#define VCU_ENC_FPS 0x20
> +#define VCU_MCU_CLK 0x24
> +#define VCU_CORE_CLK 0x28
> +#define VCU_PLL_BYPASS 0x2c
> +#define VCU_ENC_CLK 0x30
> +#define VCU_PLL_CLK 0x34
> +#define VCU_ENC_VIDEO_STANDARD 0x38
> +#define VCU_STATUS 0x3c
> +#define VCU_AXI_ENC_CLK 0x40
> +#define VCU_AXI_DEC_CLK 0x44
> +#define VCU_AXI_MCU_CLK 0x48
> +#define VCU_DEC_VIDEO_STANDARD 0x4c
> +#define VCU_DEC_FRAME_SIZE_X 0x50
> +#define VCU_DEC_FRAME_SIZE_Y 0x54
> +#define VCU_DEC_FPS 0x58
> +#define VCU_BUFFER_B_FRAME 0x5c
> +#define VCU_WPP_EN 0x60
> +#define VCU_PLL_CLK_DEC 0x64
> +#define VCU_GASKET_INIT 0x74
> +#define VCU_GASKET_VALUE 0x03
> +
> +#endif /* __XLNX_VCU_H */
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers
2020-11-13 20:52 ` Hyun Kwon
@ 2020-11-17 8:08 ` Michael Tretter
0 siblings, 0 replies; 8+ messages in thread
From: Michael Tretter @ 2020-11-17 8:08 UTC (permalink / raw)
To: Hyun Kwon
Cc: dshah, tejasp, gregkh, rajanv, michals, rvisaval, kernel,
linux-arm-kernel
On Fri, 13 Nov 2020 12:52:48 -0800, Hyun Kwon wrote:
> On Mon, Nov 09, 2020 at 02:48:17PM +0100, Michael Tretter wrote:
> > Switch the "logicoreip" registers to the new xlnx,vcu-settings binding
> > to be able to read the settings if the settings are specified in a
> > separate device tree node that is shared with other drivers.
> >
> > If the driver is not able to find a node with the new binding, fall back
> > to check for the logicore register bank to be backwards compatible.
> >
> > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> > ---
> > drivers/soc/xilinx/Kconfig | 1 +
> > drivers/soc/xilinx/xlnx_vcu.c | 94 ++++++++++++++---------------
> > include/linux/mfd/syscon/xlnx-vcu.h | 38 ++++++++++++
> > 3 files changed, 86 insertions(+), 47 deletions(-)
> > create mode 100644 include/linux/mfd/syscon/xlnx-vcu.h
> >
> > diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig
> > index 646512d7276f..0b1708dae361 100644
> > --- a/drivers/soc/xilinx/Kconfig
> > +++ b/drivers/soc/xilinx/Kconfig
> > @@ -4,6 +4,7 @@ menu "Xilinx SoC drivers"
> > config XILINX_VCU
> > tristate "Xilinx VCU logicoreIP Init"
> > depends on HAS_IOMEM
> > + select REGMAP_MMIO
>
> This should be 'depends on'? Please check: https://www.spinics.net/lists/kernel/msg3607924.html
No, the 'select' is correct for REGMAP_MMIO. The REGMAP* config options don't
have a prompt and are expected to be selected by drivers that are using them.
>
> The rest look fine to me. After confirming above, for 1/4, 3/4, and 4/4,
> please feel free to add,
>
> Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Thanks,
Michael
>
> Thanks!
>
> -hyun
>
> > help
> > Provides the driver to enable and disable the isolation between the
> > processing system and programmable logic part by using the logicoreIP
> > diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c
> > index dcd8e7824b06..14daad4efc58 100644
> > --- a/drivers/soc/xilinx/xlnx_vcu.c
> > +++ b/drivers/soc/xilinx/xlnx_vcu.c
> > @@ -10,39 +10,12 @@
> > #include <linux/device.h>
> > #include <linux/errno.h>
> > #include <linux/io.h>
> > +#include <linux/mfd/syscon.h>
> > +#include <linux/mfd/syscon/xlnx-vcu.h>
> > #include <linux/module.h>
> > #include <linux/of_platform.h>
> > #include <linux/platform_device.h>
> > -
> > -/* Address map for different registers implemented in the VCU LogiCORE IP. */
> > -#define VCU_ECODER_ENABLE 0x00
> > -#define VCU_DECODER_ENABLE 0x04
> > -#define VCU_MEMORY_DEPTH 0x08
> > -#define VCU_ENC_COLOR_DEPTH 0x0c
> > -#define VCU_ENC_VERTICAL_RANGE 0x10
> > -#define VCU_ENC_FRAME_SIZE_X 0x14
> > -#define VCU_ENC_FRAME_SIZE_Y 0x18
> > -#define VCU_ENC_COLOR_FORMAT 0x1c
> > -#define VCU_ENC_FPS 0x20
> > -#define VCU_MCU_CLK 0x24
> > -#define VCU_CORE_CLK 0x28
> > -#define VCU_PLL_BYPASS 0x2c
> > -#define VCU_ENC_CLK 0x30
> > -#define VCU_PLL_CLK 0x34
> > -#define VCU_ENC_VIDEO_STANDARD 0x38
> > -#define VCU_STATUS 0x3c
> > -#define VCU_AXI_ENC_CLK 0x40
> > -#define VCU_AXI_DEC_CLK 0x44
> > -#define VCU_AXI_MCU_CLK 0x48
> > -#define VCU_DEC_VIDEO_STANDARD 0x4c
> > -#define VCU_DEC_FRAME_SIZE_X 0x50
> > -#define VCU_DEC_FRAME_SIZE_Y 0x54
> > -#define VCU_DEC_FPS 0x58
> > -#define VCU_BUFFER_B_FRAME 0x5c
> > -#define VCU_WPP_EN 0x60
> > -#define VCU_PLL_CLK_DEC 0x64
> > -#define VCU_GASKET_INIT 0x74
> > -#define VCU_GASKET_VALUE 0x03
> > +#include <linux/regmap.h>
> >
> > /* vcu slcr registers, bitmask and shift */
> > #define VCU_PLL_CTRL 0x24
> > @@ -106,11 +79,20 @@ struct xvcu_device {
> > struct device *dev;
> > struct clk *pll_ref;
> > struct clk *aclk;
> > - void __iomem *logicore_reg_ba;
> > + struct regmap *logicore_reg_ba;
> > void __iomem *vcu_slcr_ba;
> > u32 coreclk;
> > };
> >
> > +static struct regmap_config vcu_settings_regmap_config = {
> > + .name = "regmap",
> > + .reg_bits = 32,
> > + .val_bits = 32,
> > + .reg_stride = 4,
> > + .max_register = 0xfff,
> > + .cache_type = REGCACHE_NONE,
> > +};
> > +
> > /**
> > * struct xvcu_pll_cfg - Helper data
> > * @fbdiv: The integer portion of the feedback divider to the PLL
> > @@ -300,10 +282,12 @@ static int xvcu_set_vcu_pll_info(struct xvcu_device *xvcu)
> > int ret, i;
> > const struct xvcu_pll_cfg *found = NULL;
> >
> > - inte = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK);
> > - deci = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC);
> > - coreclk = xvcu_read(xvcu->logicore_reg_ba, VCU_CORE_CLK) * MHZ;
> > - mcuclk = xvcu_read(xvcu->logicore_reg_ba, VCU_MCU_CLK) * MHZ;
> > + regmap_read(xvcu->logicore_reg_ba, VCU_PLL_CLK, &inte);
> > + regmap_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC, &deci);
> > + regmap_read(xvcu->logicore_reg_ba, VCU_CORE_CLK, &coreclk);
> > + coreclk *= MHZ;
> > + regmap_read(xvcu->logicore_reg_ba, VCU_MCU_CLK, &mcuclk);
> > + mcuclk *= MHZ;
> > if (!mcuclk || !coreclk) {
> > dev_err(xvcu->dev, "Invalid mcu and core clock data\n");
> > return -EINVAL;
> > @@ -498,6 +482,7 @@ static int xvcu_probe(struct platform_device *pdev)
> > {
> > struct resource *res;
> > struct xvcu_device *xvcu;
> > + void __iomem *regs;
> > int ret;
> >
> > xvcu = devm_kzalloc(&pdev->dev, sizeof(*xvcu), GFP_KERNEL);
> > @@ -518,17 +503,32 @@ static int xvcu_probe(struct platform_device *pdev)
> > return -ENOMEM;
> > }
> >
> > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "logicore");
> > - if (!res) {
> > - dev_err(&pdev->dev, "get logicore memory resource failed.\n");
> > - return -ENODEV;
> > - }
> > + xvcu->logicore_reg_ba =
> > + syscon_regmap_lookup_by_compatible("xlnx,vcu-settings");
> > + if (IS_ERR(xvcu->logicore_reg_ba)) {
> > + dev_info(&pdev->dev,
> > + "could not find xlnx,vcu-settings: trying direct register access\n");
> > +
> > + res = platform_get_resource_byname(pdev,
> > + IORESOURCE_MEM, "logicore");
> > + if (!res) {
> > + dev_err(&pdev->dev, "get logicore memory resource failed.\n");
> > + return -ENODEV;
> > + }
> >
> > - xvcu->logicore_reg_ba = devm_ioremap(&pdev->dev, res->start,
> > - resource_size(res));
> > - if (!xvcu->logicore_reg_ba) {
> > - dev_err(&pdev->dev, "logicore register mapping failed.\n");
> > - return -ENOMEM;
> > + regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
> > + if (!regs) {
> > + dev_err(&pdev->dev, "logicore register mapping failed.\n");
> > + return -ENOMEM;
> > + }
> > +
> > + xvcu->logicore_reg_ba =
> > + devm_regmap_init_mmio(&pdev->dev, regs,
> > + &vcu_settings_regmap_config);
> > + if (IS_ERR(xvcu->logicore_reg_ba)) {
> > + dev_err(&pdev->dev, "failed to init regmap\n");
> > + return PTR_ERR(xvcu->logicore_reg_ba);
> > + }
> > }
> >
> > xvcu->aclk = devm_clk_get(&pdev->dev, "aclk");
> > @@ -560,7 +560,7 @@ static int xvcu_probe(struct platform_device *pdev)
> > * Bit 0 : Gasket isolation
> > * Bit 1 : put VCU out of reset
> > */
> > - xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
> > + regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
> >
> > /* Do the PLL Settings based on the ref clk,core and mcu clk freq */
> > ret = xvcu_set_pll(xvcu);
> > @@ -597,7 +597,7 @@ static int xvcu_remove(struct platform_device *pdev)
> > return -ENODEV;
> >
> > /* Add the the Gasket isolation and put the VCU in reset. */
> > - xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
> > + regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
> >
> > clk_disable_unprepare(xvcu->pll_ref);
> > clk_disable_unprepare(xvcu->aclk);
> > diff --git a/include/linux/mfd/syscon/xlnx-vcu.h b/include/linux/mfd/syscon/xlnx-vcu.h
> > new file mode 100644
> > index 000000000000..d3edec4b7b1d
> > --- /dev/null
> > +++ b/include/linux/mfd/syscon/xlnx-vcu.h
> > @@ -0,0 +1,38 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * Copyright (C) 2020 Pengutronix, Michael Tretter <kernel@pengutronix.de>
> > + */
> > +
> > +#ifndef __XLNX_VCU_H
> > +#define __XLNX_VCU_H
> > +
> > +#define VCU_ECODER_ENABLE 0x00
> > +#define VCU_DECODER_ENABLE 0x04
> > +#define VCU_MEMORY_DEPTH 0x08
> > +#define VCU_ENC_COLOR_DEPTH 0x0c
> > +#define VCU_ENC_VERTICAL_RANGE 0x10
> > +#define VCU_ENC_FRAME_SIZE_X 0x14
> > +#define VCU_ENC_FRAME_SIZE_Y 0x18
> > +#define VCU_ENC_COLOR_FORMAT 0x1c
> > +#define VCU_ENC_FPS 0x20
> > +#define VCU_MCU_CLK 0x24
> > +#define VCU_CORE_CLK 0x28
> > +#define VCU_PLL_BYPASS 0x2c
> > +#define VCU_ENC_CLK 0x30
> > +#define VCU_PLL_CLK 0x34
> > +#define VCU_ENC_VIDEO_STANDARD 0x38
> > +#define VCU_STATUS 0x3c
> > +#define VCU_AXI_ENC_CLK 0x40
> > +#define VCU_AXI_DEC_CLK 0x44
> > +#define VCU_AXI_MCU_CLK 0x48
> > +#define VCU_DEC_VIDEO_STANDARD 0x4c
> > +#define VCU_DEC_FRAME_SIZE_X 0x50
> > +#define VCU_DEC_FRAME_SIZE_Y 0x54
> > +#define VCU_DEC_FPS 0x58
> > +#define VCU_BUFFER_B_FRAME 0x5c
> > +#define VCU_WPP_EN 0x60
> > +#define VCU_PLL_CLK_DEC 0x64
> > +#define VCU_GASKET_INIT 0x74
> > +#define VCU_GASKET_VALUE 0x03
> > +
> > +#endif /* __XLNX_VCU_H */
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers
2020-11-09 13:48 [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michael Tretter
` (3 preceding siblings ...)
2020-11-09 13:48 ` [PATCH v4 4/4] soc: xilinx: vcu: add missing register NUM_CORE Michael Tretter
@ 2020-11-20 13:55 ` Michal Simek
4 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2020-11-20 13:55 UTC (permalink / raw)
To: Michael Tretter, linux-arm-kernel
Cc: dshah, tejasp, gregkh, rajanv, kernel, rvisaval
On 09. 11. 20 14:48, Michael Tretter wrote:
> Hello,
>
> this is v4 of the series to expose the vcu-settings via syscon. This is
> necessary, because other drivers, e.g. the allegro-dvt driver, need to read
> the VCU settings as well.
>
> I dropped the patches that register the clock controller for now. The patch
> stack to rework the driver to properly provide the PLL and clock dividers grew
> to a level that justifies a separate series.
>
> The individual patches do not contain any changes compared to v3.
>
> Michael
>
> Changelog:
>
> v3 -> v4:
> - Drop patches that add a clock controller
>
> v2 -> v3:
> - drop unused xvcu_reset() function
>
> v1 -> v2:
> - drop custom select for syscon
> - unregister registered clocks on driver remove
>
> Michael Tretter (4):
> soc: xilinx: vcu: drop useless success message
> dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding
> soc: xilinx: vcu: use vcu-settings syscon registers
> soc: xilinx: vcu: add missing register NUM_CORE
>
> .../soc/xilinx/xlnx,vcu-settings.yaml | 34 +++++++
> .../bindings/soc/xilinx/xlnx,vcu.txt | 9 +-
> drivers/soc/xilinx/Kconfig | 1 +
> drivers/soc/xilinx/xlnx_vcu.c | 96 +++++++++----------
> include/linux/mfd/syscon/xlnx-vcu.h | 39 ++++++++
> 5 files changed, 123 insertions(+), 56 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/soc/xilinx/xlnx,vcu-settings.yaml
> create mode 100644 include/linux/mfd/syscon/xlnx-vcu.h
>
Applied all.
https://github.com/Xilinx/linux-xlnx/tree/zynqmp/soc-next
Thanks,
Michal
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-11-20 13:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 13:48 [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers Michael Tretter
2020-11-09 13:48 ` [PATCH v4 1/4] soc: xilinx: vcu: drop useless success message Michael Tretter
2020-11-09 13:48 ` [PATCH v4 2/4] dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding Michael Tretter
2020-11-09 13:48 ` [PATCH v4 3/4] soc: xilinx: vcu: use vcu-settings syscon registers Michael Tretter
2020-11-13 20:52 ` Hyun Kwon
2020-11-17 8:08 ` Michael Tretter
2020-11-09 13:48 ` [PATCH v4 4/4] soc: xilinx: vcu: add missing register NUM_CORE Michael Tretter
2020-11-20 13:55 ` [PATCH v4 0/4] soc: xilinx: vcu: provide interfaces for other drivers 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.