* [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode
@ 2019-07-12 20:43 Sven Van Asbroeck
2019-07-12 20:43 ` [PATCH 2/2] dt-bindings: bus: imx-weim: document optional " Sven Van Asbroeck
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sven Van Asbroeck @ 2019-07-12 20:43 UTC (permalink / raw)
To: Shawn Guo, Rob Herring
Cc: NXP Linux Team, Kees Cook, linux-kernel, linux-arm-kernel,
Mark Rutland, Sascha Hauer, devicetree, Fabio Estevam,
Pengutronix Kernel Team, Arnd Bergmann
To enable burst clock mode, add the fsl,burst-clk-enable
property to the weim bus's devicetree node.
Example:
weim: weim@21b8000 {
compatible = "fsl,imx6q-weim";
reg = <0x021b8000 0x4000>;
clocks = <&clks 196>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x08000000 0x08000000>;
fsl,weim-cs-gpr = <&gpr>;
fsl,burst-clk-enable;
client-device@0,0 {
compatible = "something";
reg = <0 0 0x02000000>;
#address-cells = <1>;
#size-cells = <1>;
bank-width = <2>;
fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
0x0000c000 0x1404a38e 0x00000000>;
};
};
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
---
drivers/bus/imx-weim.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index db74334ca5ef..cb7d5504a22a 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -19,6 +19,8 @@ struct imx_weim_devtype {
unsigned int cs_count;
unsigned int cs_regs_count;
unsigned int cs_stride;
+ unsigned int wcr_offset;
+ unsigned int wcr_bcm;
};
static const struct imx_weim_devtype imx1_weim_devtype = {
@@ -37,6 +39,8 @@ static const struct imx_weim_devtype imx50_weim_devtype = {
.cs_count = 4,
.cs_regs_count = 6,
.cs_stride = 0x18,
+ .wcr_offset = 0x90,
+ .wcr_bcm = BIT(0),
};
static const struct imx_weim_devtype imx51_weim_devtype = {
@@ -192,6 +196,7 @@ static int __init weim_parse_dt(struct platform_device *pdev,
struct device_node *child;
int ret, have_child = 0;
struct cs_timing_state ts = {};
+ u32 reg;
if (devtype == &imx50_weim_devtype) {
ret = imx_weim_gpr_setup(pdev);
@@ -199,6 +204,17 @@ static int __init weim_parse_dt(struct platform_device *pdev,
return ret;
}
+ 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);
+ } else {
+ dev_err(&pdev->dev, "burst clk mode not supported.\n");
+ return -EINVAL;
+ }
+ }
+
for_each_available_child_of_node(pdev->dev.of_node, child) {
ret = weim_timing_setup(&pdev->dev, child, base, devtype, &ts);
if (ret)
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] dt-bindings: bus: imx-weim: document optional burst clock mode
2019-07-12 20:43 [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode Sven Van Asbroeck
@ 2019-07-12 20:43 ` Sven Van Asbroeck
2019-07-24 20:48 ` Rob Herring
2019-07-25 14:30 ` [PATCH 1/2] bus: imx-weim: optionally enable " Sven Van Asbroeck
2019-08-03 8:19 ` Shawn Guo
2 siblings, 1 reply; 6+ messages in thread
From: Sven Van Asbroeck @ 2019-07-12 20:43 UTC (permalink / raw)
To: Shawn Guo, Rob Herring
Cc: NXP Linux Team, Kees Cook, linux-kernel, linux-arm-kernel,
Mark Rutland, Sascha Hauer, devicetree, Fabio Estevam,
Pengutronix Kernel Team, Arnd Bergmann
An optional devicetree property was added to the imx-weim driver,
which if present instructs it to operate in burst clock mode.
Update the dt-bindings to reflect this.
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
---
Documentation/devicetree/bindings/bus/imx-weim.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt
index dda7d6d66479..1b1d1c5c21ea 100644
--- a/Documentation/devicetree/bindings/bus/imx-weim.txt
+++ b/Documentation/devicetree/bindings/bus/imx-weim.txt
@@ -44,6 +44,10 @@ Optional properties:
what bootloader sets up in IOMUXC_GPR1[11:0] will be
used.
+ - fsl,burst-clk-enable For "fsl,imx50-weim" and "fsl,imx6q-weim" type of
+ devices, the presence of this property indicates that
+ the weim bus should operate in Burst Clock Mode.
+
Timing property for child nodes. It is mandatory, not optional.
- fsl,weim-cs-timing: The timing array, contains timing values for the
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] dt-bindings: bus: imx-weim: document optional burst clock mode
2019-07-12 20:43 ` [PATCH 2/2] dt-bindings: bus: imx-weim: document optional " Sven Van Asbroeck
@ 2019-07-24 20:48 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2019-07-24 20:48 UTC (permalink / raw)
To: Sven Van Asbroeck
Cc: Shawn Guo, NXP Linux Team, Kees Cook, linux-kernel,
linux-arm-kernel, Mark Rutland, Sascha Hauer, devicetree,
Fabio Estevam, Pengutronix Kernel Team, Arnd Bergmann
On Fri, 12 Jul 2019 16:43:16 -0400, Sven Van Asbroeck wrote:
> An optional devicetree property was added to the imx-weim driver,
> which if present instructs it to operate in burst clock mode.
> Update the dt-bindings to reflect this.
>
> Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
> ---
> Documentation/devicetree/bindings/bus/imx-weim.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode
2019-07-12 20:43 [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode Sven Van Asbroeck
2019-07-12 20:43 ` [PATCH 2/2] dt-bindings: bus: imx-weim: document optional " Sven Van Asbroeck
@ 2019-07-25 14:30 ` Sven Van Asbroeck
2019-07-25 19:32 ` Fabio Estevam
2019-08-03 8:19 ` Shawn Guo
2 siblings, 1 reply; 6+ messages in thread
From: Sven Van Asbroeck @ 2019-07-25 14:30 UTC (permalink / raw)
To: Shawn Guo
Cc: NXP Linux Team, Kees Cook, Linux Kernel Mailing List,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
Mark Rutland, Sascha Hauer, devicetree, Fabio Estevam,
Pengutronix Kernel Team, Arnd Bergmann
On Fri, Jul 12, 2019 at 4:43 PM Sven Van Asbroeck <thesven73@gmail.com> wrote:
>
> To enable burst clock mode, add the fsl,burst-clk-enable
> property to the weim bus's devicetree node.
>
Any feedback on this patch, positive or negative?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode
2019-07-25 14:30 ` [PATCH 1/2] bus: imx-weim: optionally enable " Sven Van Asbroeck
@ 2019-07-25 19:32 ` Fabio Estevam
0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2019-07-25 19:32 UTC (permalink / raw)
To: Sven Van Asbroeck
Cc: Shawn Guo, NXP Linux Team, Kees Cook, Linux Kernel Mailing List,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
Mark Rutland, Sascha Hauer, devicetree, Pengutronix Kernel Team,
Arnd Bergmann
Hi Sven,
On Thu, Jul 25, 2019 at 11:30 AM Sven Van Asbroeck <thesven73@gmail.com> wrote:
>
> On Fri, Jul 12, 2019 at 4:43 PM Sven Van Asbroeck <thesven73@gmail.com> wrote:
> >
> > To enable burst clock mode, add the fsl,burst-clk-enable
> > property to the weim bus's devicetree node.
> >
>
> Any feedback on this patch, positive or negative?
Looks good to me:
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode
2019-07-12 20:43 [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode Sven Van Asbroeck
2019-07-12 20:43 ` [PATCH 2/2] dt-bindings: bus: imx-weim: document optional " Sven Van Asbroeck
2019-07-25 14:30 ` [PATCH 1/2] bus: imx-weim: optionally enable " Sven Van Asbroeck
@ 2019-08-03 8:19 ` Shawn Guo
2 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2019-08-03 8:19 UTC (permalink / raw)
To: Sven Van Asbroeck
Cc: Rob Herring, NXP Linux Team, Kees Cook, linux-kernel,
linux-arm-kernel, Mark Rutland, Sascha Hauer, devicetree,
Fabio Estevam, Pengutronix Kernel Team, Arnd Bergmann
On Fri, Jul 12, 2019 at 04:43:15PM -0400, Sven Van Asbroeck wrote:
> To enable burst clock mode, add the fsl,burst-clk-enable
> property to the weim bus's devicetree node.
>
> Example:
> weim: weim@21b8000 {
> compatible = "fsl,imx6q-weim";
> reg = <0x021b8000 0x4000>;
> clocks = <&clks 196>;
> #address-cells = <2>;
> #size-cells = <1>;
> ranges = <0 0 0x08000000 0x08000000>;
> fsl,weim-cs-gpr = <&gpr>;
> fsl,burst-clk-enable;
>
> client-device@0,0 {
> compatible = "something";
> reg = <0 0 0x02000000>;
> #address-cells = <1>;
> #size-cells = <1>;
> bank-width = <2>;
> fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
> 0x0000c000 0x1404a38e 0x00000000>;
> };
> };
>
> Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Applied both, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-03 8:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 20:43 [PATCH 1/2] bus: imx-weim: optionally enable burst clock mode Sven Van Asbroeck
2019-07-12 20:43 ` [PATCH 2/2] dt-bindings: bus: imx-weim: document optional " Sven Van Asbroeck
2019-07-24 20:48 ` Rob Herring
2019-07-25 14:30 ` [PATCH 1/2] bus: imx-weim: optionally enable " Sven Van Asbroeck
2019-07-25 19:32 ` Fabio Estevam
2019-08-03 8:19 ` Shawn Guo
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).