LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock
@ 2021-11-24 17:55 Ivan Bornyakov
  2021-11-24 17:55 ` [PATCH v2 1/2] " Ivan Bornyakov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ivan Bornyakov @ 2021-11-24 17:55 UTC (permalink / raw)
  Cc: Ivan Bornyakov, system, shawnguo, s.hauer, kernel, festevam,
	linux-imx, linux-arm-kernel, linux-kernel, robh+dt, devicetree

Introduce option to enable continuous burst clock, if burst clock itself
is enabled.

Changelog:
  v1 -> v2:
    * documentation about this option added to
      Documentation/devicetree/bindings/bus/imx-weim.txt

Ivan Bornyakov (2):
  bus: imx-weim: optionally enable continuous burst clock
  dt-bindings: bus: imx-weim: add words about continuous bclk

 .../devicetree/bindings/bus/imx-weim.txt       |  5 +++++
 drivers/bus/imx-weim.c                         | 18 ++++++++++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

-- 
2.32.0



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

* [PATCH v2 1/2] bus: imx-weim: optionally enable continuous burst clock
  2021-11-24 17:55 [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov
@ 2021-11-24 17:55 ` Ivan Bornyakov
  2021-12-11 11:04   ` Fabio Estevam
  2021-11-24 17:55 ` [PATCH v2 2/2] dt-bindings: bus: imx-weim: add words about continuous bclk Ivan Bornyakov
  2021-12-01 10:25 ` [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov
  2 siblings, 1 reply; 6+ messages in thread
From: Ivan Bornyakov @ 2021-11-24 17:55 UTC (permalink / raw)
  Cc: Ivan Bornyakov, system, shawnguo, s.hauer, kernel, festevam,
	linux-imx, linux-arm-kernel, linux-kernel, robh+dt, devicetree

To enable continuous burst clock, add "fsl,continuous-burst-clk" along
with "fsl,burst-clk-enable" property to the weim bus's devicetree node.

Example:
weim: weim@21b8000 {
	compatible = "fsl,imx6ul-weim", "fsl,imx6q-weim";
	reg = <0x021b8000 0x4000>;
	clocks = <&clks 143>;
	#address-cells = <2>;
	#size-cells = <1>;
	ranges = <0 0 0x50000000 0x08000000>;
	fsl,weim-cs-gpr = <&gpr>;
	fsl,burst-clk-enable;
	fsl,continuous-burst-clk;

	client-device@0 {
		...
	};
};

Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>
---
 drivers/bus/imx-weim.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 28bb65a5613f..bccb275b65ba 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -21,6 +21,7 @@ struct imx_weim_devtype {
 	unsigned int	cs_stride;
 	unsigned int	wcr_offset;
 	unsigned int	wcr_bcm;
+	unsigned int	wcr_cont_bclk;
 };
 
 static const struct imx_weim_devtype imx1_weim_devtype = {
@@ -41,6 +42,7 @@ static const struct imx_weim_devtype imx50_weim_devtype = {
 	.cs_stride	= 0x18,
 	.wcr_offset	= 0x90,
 	.wcr_bcm	= BIT(0),
+	.wcr_cont_bclk	= BIT(3),
 };
 
 static const struct imx_weim_devtype imx51_weim_devtype = {
@@ -206,8 +208,20 @@ static int weim_parse_dt(struct platform_device *pdev, void __iomem *base)
 	if (of_property_read_bool(pdev->dev.of_node, "fsl,burst-clk-enable")) {
 		if (devtype->wcr_bcm) {
 			reg = readl(base + devtype->wcr_offset);
-			writel(reg | devtype->wcr_bcm,
-				base + devtype->wcr_offset);
+			reg |= devtype->wcr_bcm;
+
+			if (of_property_read_bool(pdev->dev.of_node,
+						"fsl,continuous-burst-clk")) {
+				if (devtype->wcr_cont_bclk) {
+					reg |= devtype->wcr_cont_bclk;
+				} else {
+					dev_err(&pdev->dev,
+						"continuous burst clk not supported.\n");
+					return -EINVAL;
+				}
+			}
+
+			writel(reg, base + devtype->wcr_offset);
 		} else {
 			dev_err(&pdev->dev, "burst clk mode not supported.\n");
 			return -EINVAL;
-- 
2.32.0



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

* [PATCH v2 2/2] dt-bindings: bus: imx-weim: add words about continuous bclk
  2021-11-24 17:55 [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov
  2021-11-24 17:55 ` [PATCH v2 1/2] " Ivan Bornyakov
@ 2021-11-24 17:55 ` Ivan Bornyakov
  2021-12-01 22:17   ` Rob Herring
  2021-12-01 10:25 ` [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov
  2 siblings, 1 reply; 6+ messages in thread
From: Ivan Bornyakov @ 2021-11-24 17:55 UTC (permalink / raw)
  Cc: Ivan Bornyakov, system, shawnguo, s.hauer, kernel, festevam,
	linux-imx, linux-arm-kernel, linux-kernel, robh+dt, devicetree

Document continuous Burst Clock option. With this option Burst Clock, if
enabled, will output continuous clock, otherwise Burst Clock will output
clock only when necessary.
---
 Documentation/devicetree/bindings/bus/imx-weim.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt
index 1b1d1c5c21ea..e7f502070d77 100644
--- a/Documentation/devicetree/bindings/bus/imx-weim.txt
+++ b/Documentation/devicetree/bindings/bus/imx-weim.txt
@@ -48,6 +48,11 @@ Optional properties:
 			devices, the presence of this property indicates that
 			the weim bus should operate in Burst Clock Mode.
 
+ - fsl,continuous-burst-clk	Make Burst Clock to output continuous clock.
+			Without this option Burst Clock will output clock
+			only when necessary. This takes effect only if
+			"fsl,burst-clk-enable" is set.
+
 Timing property for child nodes. It is mandatory, not optional.
 
  - fsl,weim-cs-timing:	The timing array, contains timing values for the
-- 
2.32.0



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

* Re: [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock
  2021-11-24 17:55 [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov
  2021-11-24 17:55 ` [PATCH v2 1/2] " Ivan Bornyakov
  2021-11-24 17:55 ` [PATCH v2 2/2] dt-bindings: bus: imx-weim: add words about continuous bclk Ivan Bornyakov
@ 2021-12-01 10:25 ` Ivan Bornyakov
  2 siblings, 0 replies; 6+ messages in thread
From: Ivan Bornyakov @ 2021-12-01 10:25 UTC (permalink / raw)
  To: i.bornyakov
  Cc: system, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel, linux-kernel, robh+dt, devicetree

On Wed, Nov 24, 2021 at 08:55:40PM +0300, Ivan Bornyakov wrote:
> Introduce option to enable continuous burst clock, if burst clock itself
> is enabled.
> 
> Changelog:
>   v1 -> v2:
>     * documentation about this option added to
>       Documentation/devicetree/bindings/bus/imx-weim.txt
> 
> Ivan Bornyakov (2):
>   bus: imx-weim: optionally enable continuous burst clock
>   dt-bindings: bus: imx-weim: add words about continuous bclk
> 
>  .../devicetree/bindings/bus/imx-weim.txt       |  5 +++++
>  drivers/bus/imx-weim.c                         | 18 ++++++++++++++++--
>  2 files changed, 21 insertions(+), 2 deletions(-)
> 
> -- 
> 2.32.0
> 

Friendly ping.
Any feedback?


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

* Re: [PATCH v2 2/2] dt-bindings: bus: imx-weim: add words about continuous bclk
  2021-11-24 17:55 ` [PATCH v2 2/2] dt-bindings: bus: imx-weim: add words about continuous bclk Ivan Bornyakov
@ 2021-12-01 22:17   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2021-12-01 22:17 UTC (permalink / raw)
  To: Ivan Bornyakov
  Cc: system, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel, linux-kernel, devicetree

On Wed, Nov 24, 2021 at 08:55:42PM +0300, Ivan Bornyakov wrote:
> Document continuous Burst Clock option. With this option Burst Clock, if
> enabled, will output continuous clock, otherwise Burst Clock will output
> clock only when necessary.

Missing S-o-b. checkpatch.pl will tell you this.

> ---
>  Documentation/devicetree/bindings/bus/imx-weim.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt
> index 1b1d1c5c21ea..e7f502070d77 100644
> --- a/Documentation/devicetree/bindings/bus/imx-weim.txt
> +++ b/Documentation/devicetree/bindings/bus/imx-weim.txt
> @@ -48,6 +48,11 @@ Optional properties:
>  			devices, the presence of this property indicates that
>  			the weim bus should operate in Burst Clock Mode.
>  
> + - fsl,continuous-burst-clk	Make Burst Clock to output continuous clock.
> +			Without this option Burst Clock will output clock
> +			only when necessary. This takes effect only if
> +			"fsl,burst-clk-enable" is set.
> +
>  Timing property for child nodes. It is mandatory, not optional.
>  
>   - fsl,weim-cs-timing:	The timing array, contains timing values for the
> -- 
> 2.32.0
> 
> 
> 

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

* Re: [PATCH v2 1/2] bus: imx-weim: optionally enable continuous burst clock
  2021-11-24 17:55 ` [PATCH v2 1/2] " Ivan Bornyakov
@ 2021-12-11 11:04   ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2021-12-11 11:04 UTC (permalink / raw)
  To: Ivan Bornyakov
  Cc: system, Shawn Guo, Sascha Hauer, Sascha Hauer, NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Wed, Nov 24, 2021 at 3:10 PM Ivan Bornyakov <i.bornyakov@metrotek.ru> wrote:
>
> To enable continuous burst clock, add "fsl,continuous-burst-clk" along
> with "fsl,burst-clk-enable" property to the weim bus's devicetree node.
>
> Example:
> weim: weim@21b8000 {
>         compatible = "fsl,imx6ul-weim", "fsl,imx6q-weim";
>         reg = <0x021b8000 0x4000>;
>         clocks = <&clks 143>;
>         #address-cells = <2>;
>         #size-cells = <1>;
>         ranges = <0 0 0x50000000 0x08000000>;
>         fsl,weim-cs-gpr = <&gpr>;
>         fsl,burst-clk-enable;
>         fsl,continuous-burst-clk;
>
>         client-device@0 {
>                 ...
>         };
> };
>
> Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

end of thread, other threads:[~2021-12-11 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24 17:55 [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov
2021-11-24 17:55 ` [PATCH v2 1/2] " Ivan Bornyakov
2021-12-11 11:04   ` Fabio Estevam
2021-11-24 17:55 ` [PATCH v2 2/2] dt-bindings: bus: imx-weim: add words about continuous bclk Ivan Bornyakov
2021-12-01 22:17   ` Rob Herring
2021-12-01 10:25 ` [PATCH v2 0/2] bus: imx-weim: optionally enable continuous burst clock Ivan Bornyakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).