dt-bindings: freescale: Add bindings for the M4IF module
Fabio Estevam
reviewerPATCH v2 1/3 dt-bindings: freescale: Add bindings for the M4IF module
From: Fabio Estevam <[email protected]>
Add bindings for the M4IF module present on i.MX51.
---
Changes since v1:
- Newly introduced in this series (Lucas)
Documentation/devicetree/bindings/arm/freescale/m4if.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/freescale/m4if.txt
Documentation/devicetree/bindings/arm/freescale/m4if.txt new file +12 -0
@@ -0,0 +1,12 @@ +* Freescale Multi Master Multi Memory Interface (M4IF) module + +Required properties: +- compatible : Should be "fsl,imx51-m4if" +- reg : Address and length of the register set for the device + +Example: + +m4if: m4if at 83fd8000 { + compatible = "fsl,imx51-m4if"; + reg = <0x83fd8000 0x1000>; +};
Signature · 1 line
2.7.4
Fabio Estevam
reviewerPATCH v2 2/3 ARM: dts: imx51: Add M4IF support
From: Fabio Estevam <[email protected]>
As per the i.MX51 Reference Manual the M4IF register region starts at 0x83fd8000 and has a 4kB address range.
Add support for it.
---
Changes since v1:
- None
arch/arm/boot/dts/imx51.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/imx51.dtsi +5 -0
@@ -531,6 +531,11 @@ status = "disabled"; }; + m4if: m4if at 83fd8000 { + compatible = "fsl,imx51-m4if"; + reg = <0x83fd8000 0x1000>; + }; + weim: weim at 83fda000 { #address-cells = <2>; #size-cells = <1>;
Signature · 1 line
2.7.4
PATCH v2 2/3 ARM: dts: imx51: Add M4IF support
Am Montag, den 09.07.2018, 15:19 -0300 schrieb Fabio Estevam:
Quoted 9 lines
From: Fabio Estevam <[email protected]>
As per the i.MX51 Reference Manual the M4IF register region starts at
0x83fd8000and has a 4kB address range.Add support for it.
Signed-off-by Fabio Estevam <[email protected]>Tested-by Sergey Lapin <[email protected]>
Quoted 24 lines
---
Changes since v1:
- None?arch/arm/boot/dts/imx51.dtsi | 5 +++++
?1 file changed, 5 insertions(+)arch/arm/boot/dts/imx51.dtsi +0
-0@@ -531,6 +531,11 @@ ? status = "disabled"; ? };?
arch/arm/boot/dts/imx51.dtsi +5
-0+ m4if: m4if at 83fd8000 { + compatible = "fsl,imx51-m4if"; + reg = <0x83fd8000 0x1000>; + }; +? weim: weim at
83fda000{
? #address-cells = <2>;
? #size-cells = <1>;
Fabio Estevam
reviewerPATCH v2 2/2 ARM: imx51: Configure M4IF to avoid visual artifacts
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Configure the M4IF registers as per the vendor bootloader to avoid visual artifacts during video playback.
This way we don't need to rely on the bootloader configuration for optimal IPU/VPU bus priorities.
---
Changes since v1:
- None
arch/arm/mach-imx/mach-imx51.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
arch/arm/mach-imx/mach-imx51.c +28 -1
@@ -12,6 +12,7 @@#include <linux/io.h> #include <linux/irq.h> +#include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/of_platform.h> #include <asm/mach/arch.h>
@@ -48,11 +49,37 @@ static void __init imx51_ipu_mipi_setup(void)iounmap (hsc_addr); } +static void __init imx51_m4if_setup (void ) +{ +void __iomem *m4if_base; +struct device_node *np; + + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx51-m4if" ); +if (!np) +return ; + + m4if_base =of_iomap (np,0 ); +if (!m4if_base) { +pr_err ("Unable to map M4IF registers\n" ); +return ; + } + +/* +* Configure VPU and IPU with higher priorities +* in order to avoid artifacts during video playback +*/ +writel_relaxed (0x00000203 , m4if_base +0x40 ); +writel_relaxed (0x00000000 , m4if_base +0x44 ); +writel_relaxed (0x00120125 , m4if_base +0x9c ); +writel_relaxed (0x001901A3 , m4if_base +0x48 ); +iounmap (m4if_base); +} +static void __init imx51_dt_init (void ) {imx51_ipu_mipi_setup ();imx_src_init (); - +imx51_m4if_setup ();imx_aips_allow_unprivileged_access ("fsl,imx51-aipstz" ); }
Signature · 1 line
2.7.4
Fabio Estevam
reviewerPATCH v2 2/2 ARM: imx51: Configure M4IF to avoid visual artifacts
Hi Shawn,
Subject here should be [PATCH v2 3/3], sorry.
Quoted 72 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Configure the M4IF registers as per the vendor bootloader to avoid visual artifacts during video playback.
This way we don't need to rely on the bootloader configuration for optimal IPU/VPU bus priorities.
Signed-off-by Fabio Estevam <[email protected]>Tested-by Sergey Lapin <[email protected]>Reviewed-by Lucas Stach <[email protected]>---
Changes since v1:
- Nonearch/arm/mach-imx/mach-imx51.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)arch/arm/mach-imx/mach-imx51.c +28
-2@@ -12,6 +12,7 @@#include <linux/io.h> #include <linux/irq.h> +#include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/of_platform.h> #include <asm/mach/arch.h> @@ -48,11 +49,37 @@ static void __init imx51_ipu_mipi_setup(void)iounmap (hsc_addr); } +static void __init imx51_m4if_setup (void ) +{ +void __iomem *m4if_base; +struct device_node *np; + + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx51-m4if" ); +if (!np) +return ; + + m4if_base =of_iomap (np,0 ); +if (!m4if_base) { +pr_err ("Unable to map M4IF registers\n" ); +return ; + } + +/* +* Configure VPU and IPU with higher priorities +* in order to avoid artifacts during video playback +*/ +writel_relaxed (0x00000203 , m4if_base +0x40 ); +writel_relaxed (0x00000000 , m4if_base +0x44 ); +writel_relaxed (0x00120125 , m4if_base +0x9c ); +writel_relaxed (0x001901A3 , m4if_base +0x48 ); +iounmap (m4if_base); +} +static void __init imx51_dt_init (void ) {imx51_ipu_mipi_setup ();imx_src_init (); - +imx51_m4if_setup ();imx_aips_allow_unprivileged_access ("fsl,imx51-aipstz" ); } --2.7.4
PATCH v2 1/3 dt-bindings: freescale: Add bindings for the M4IF module
In reply to Fabio EstevamAm Montag, den 09.07.2018, 15:19 -0300 schrieb Fabio Estevam:
Quoted 5 lines
Quoted 1 line
From: Fabio Estevam <[email protected]>
Add bindings for the M4IF module present on i.MX51.
Signed-off-by Fabio Estevam <[email protected]>
Quoted 26 lines
---
Changes since v1:
- Newly introduced in this series (Lucas)?Documentation/devicetree/bindings/arm/freescale/m4if.txt | 12 ++++++++++++ ?1 file changed, 12 insertions(+)
?create mode 100644Documentation/devicetree/bindings/arm/freescale/m4if.txtDocumentation/devicetree/bindings/arm/freescale/m4if.txt new file +8
-0@@ -0,0 +1,12 @@ +* Freescale Multi Master Multi Memory Interface (M4IF) module + +Required properties: +- compatible : Should be "fsl,imx51-m4if" +- reg : Address and length of the register set for the device + +Example: +Documentation/devicetree/bindings/arm/freescale/m4if.txt line 11
Quoted 3 lines
Documentation/devicetree/bindings/arm/freescale/m4if.txt new file +3
-0+m4if: m4if at 83fd8000 { + compatible = "fsl,imx51-m4if"; + reg = <0x83fd8000 0x1000>;+};
Rob Herring
maintainerPATCH v2 1/3 dt-bindings: freescale: Add bindings for the M4IF module
In reply to Fabio EstevamQuoted 4 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add bindings for the M4IF module present on i.MX51.
Quoted 8 lines
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Newly introduced in this series (Lucas)Documentation/devicetree/bindings/arm/freescale/m4if.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/freescale/m4if.txt
Shawn Guo
AppliedPATCH v2 1/3 dt-bindings: freescale: Add bindings for the M4IF module
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add bindings for the M4IF module present on i.MX51.
Signed-off-by Fabio Estevam <[email protected]>
Applied all, thanks.