* [PATCH v2 0/5] Add support for DCMIPP camera interface of STMicroelectronics STM32 SoC series
@ 2023-08-29 13:23 Alain Volmat
2023-08-29 13:23 ` [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver Alain Volmat
2023-08-29 13:23 ` [PATCH v2 4/5] ARM: dts: stm32: add dcmipp support to stm32mp135 Alain Volmat
0 siblings, 2 replies; 6+ messages in thread
From: Alain Volmat @ 2023-08-29 13:23 UTC (permalink / raw)
To: Hugues Fruchet, Alain Volmat, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Russell King, Philipp Zabel
Cc: Sakari Ailus, Dan Scally, linux-media, devicetree, linux-stm32,
linux-arm-kernel, linux-kernel
This patchset introduces support for Digital Camera Memory Interface
Pixel Processor (DCMIPP) of STMicroelectronics STM32 SoC series.
This initial support implements a single capture pipe
allowing RGB565, YUV, Y, RAW8 and JPEG capture with
frame skipping, prescaling and cropping.
DCMIPP is exposed through 3 subdevices:
- dcmipp_dump_parallel: parallel interface handling
- dcmipp_dump_postproc: frame skipping, prescaling and cropping control
- dcmipp_dump_capture: video device capture node
v2:
- removal of pclk-max-frequency from yaml example dts
- codying-style fixes
- correction in enum functions (format, mbus, frame_size ...) handling
- drop of v4l2_pipeline_pm_ calls, and specific open/close handler of
vdev
- video dev s_stream handling updated to call s_stream of remote subdev
instead of loop until sensor subdev
- code update following media_pipeline & v4l2_async_ api changes since v1
- removal of IP reset call upon error
- removal of link_validate handlers
- addition of V4L2_CAP_IO_MC device_caps
- removal of the frame skip control for the time being, will be added
back in another commit once control method will be agreed
- change byteproc entity type to MEDIA_ENT_F_PROC_VIDEO_SCALER
- various fixes from Dan & Sakari remarks
Alain Volmat (2):
dt-bindings: media: add bindings for dcmipp driver
media: MAINTAINERS: add entry for STM32 DCMIPP driver
Hugues Fruchet (3):
media: stm32-dcmipp: STM32 DCMIPP camera interface driver
ARM: dts: stm32: add dcmipp support to stm32mp135
ARM: multi_v7_defconfig: enable STM32 DCMIPP media support
.../bindings/media/st,stm32-dcmipp.yaml | 95 ++
MAINTAINERS | 9 +
arch/arm/boot/dts/st/stm32mp135.dtsi | 9 +
arch/arm/configs/multi_v7_defconfig | 1 +
drivers/media/platform/st/stm32/Kconfig | 15 +
drivers/media/platform/st/stm32/Makefile | 1 +
.../platform/st/stm32/stm32-dcmipp/Makefile | 5 +
.../st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 1040 +++++++++++++++++
.../st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 692 +++++++++++
.../st/stm32/stm32-dcmipp/dcmipp-common.c | 105 ++
.../st/stm32/stm32-dcmipp/dcmipp-common.h | 227 ++++
.../st/stm32/stm32-dcmipp/dcmipp-core.c | 673 +++++++++++
.../st/stm32/stm32-dcmipp/dcmipp-parallel.c | 523 +++++++++
13 files changed, 3395 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/Makefile
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-parallel.c
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver
2023-08-29 13:23 [PATCH v2 0/5] Add support for DCMIPP camera interface of STMicroelectronics STM32 SoC series Alain Volmat
@ 2023-08-29 13:23 ` Alain Volmat
2023-08-29 14:35 ` Rob Herring
2023-08-29 15:00 ` Conor Dooley
2023-08-29 13:23 ` [PATCH v2 4/5] ARM: dts: stm32: add dcmipp support to stm32mp135 Alain Volmat
1 sibling, 2 replies; 6+ messages in thread
From: Alain Volmat @ 2023-08-29 13:23 UTC (permalink / raw)
To: Hugues Fruchet, Alain Volmat, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue
Cc: Sakari Ailus, Dan Scally, linux-media, devicetree, linux-stm32,
linux-arm-kernel, linux-kernel
Add the yaml binding for the DCMIPP driver.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
---
.../bindings/media/st,stm32-dcmipp.yaml | 95 +++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
new file mode 100644
index 000000000000..63f03a1c42b6
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/st,stm32-dcmipp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 DCMIPP Digital Camera Memory Interface Pixel Processor binding
+
+maintainers:
+ - Hugues Fruchet <hugues.fruchet@foss.st.com>
+ - Alain Volmat <alain.volmat@foss.st.com>
+
+properties:
+ compatible:
+ const: st,stm32mp13-dcmipp
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: kclk
+
+ resets:
+ maxItems: 1
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description:
+ DCMIPP supports a single port node with parallel bus.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-type:
+ enum: [5, 6]
+ default: 5
+
+ bus-width:
+ enum: [8, 10, 12, 14]
+ default: 8
+
+ pclk-sample: true
+ hsync-active: true
+ vsync-active: true
+
+ required:
+ - pclk-sample
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/stm32mp13-clks.h>
+ #include <dt-bindings/reset/stm32mp13-resets.h>
+ dcmipp: dcmipp@5a000000 {
+ compatible = "st,stm32mp13-dcmipp";
+ reg = <0x5a000000 0x400>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rcc DCMIPP_R>;
+ clocks = <&rcc DCMIPP_K>;
+ clock-names = "kclk";
+
+ port {
+ dcmipp_0: endpoint {
+ remote-endpoint = <&mipid02_2>;
+ bus-width = <8>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <0>;
+ };
+ };
+ };
+
+...
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/5] ARM: dts: stm32: add dcmipp support to stm32mp135
2023-08-29 13:23 [PATCH v2 0/5] Add support for DCMIPP camera interface of STMicroelectronics STM32 SoC series Alain Volmat
2023-08-29 13:23 ` [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver Alain Volmat
@ 2023-08-29 13:23 ` Alain Volmat
1 sibling, 0 replies; 6+ messages in thread
From: Alain Volmat @ 2023-08-29 13:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue
Cc: Sakari Ailus, Dan Scally, Hugues Fruchet, Alain Volmat,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
From: Hugues Fruchet <hugues.fruchet@foss.st.com>
Add dcmipp support to STM32MP135.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp135.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp135.dtsi b/arch/arm/boot/dts/st/stm32mp135.dtsi
index abf2acd37b4e..fcf0592c01fd 100644
--- a/arch/arm/boot/dts/st/stm32mp135.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp135.dtsi
@@ -8,5 +8,14 @@
/ {
soc {
+ dcmipp: dcmipp@5a000000 {
+ compatible = "st,stm32mp13-dcmipp";
+ reg = <0x5a000000 0x400>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rcc DCMIPP_R>;
+ clocks = <&rcc DCMIPP_K>;
+ clock-names = "kclk";
+ status = "disabled";
+ };
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver
2023-08-29 13:23 ` [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver Alain Volmat
@ 2023-08-29 14:35 ` Rob Herring
2023-08-29 15:00 ` Conor Dooley
1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2023-08-29 14:35 UTC (permalink / raw)
To: Alain Volmat
Cc: Dan Scally, linux-arm-kernel, devicetree, Sakari Ailus,
Conor Dooley, Hugues Fruchet, Alexandre Torgue, Rob Herring,
linux-kernel, Krzysztof Kozlowski, Mauro Carvalho Chehab,
linux-media, linux-stm32, Maxime Coquelin
On Tue, 29 Aug 2023 15:23:45 +0200, Alain Volmat wrote:
> Add the yaml binding for the DCMIPP driver.
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
> .../bindings/media/st,stm32-dcmipp.yaml | 95 +++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml: title: 'STMicroelectronics STM32 DCMIPP Digital Camera Memory Interface Pixel Processor binding' should not be valid under {'pattern': '([Bb]inding| [Ss]chema)'}
hint: Everything is a binding/schema, no need to say it. Describe what hardware the binding is for.
from schema $id: http://devicetree.org/meta-schemas/base.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230829132357.192535-2-alain.volmat@foss.st.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver
2023-08-29 13:23 ` [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver Alain Volmat
2023-08-29 14:35 ` Rob Herring
@ 2023-08-29 15:00 ` Conor Dooley
2023-09-01 14:43 ` Alain Volmat
1 sibling, 1 reply; 6+ messages in thread
From: Conor Dooley @ 2023-08-29 15:00 UTC (permalink / raw)
To: Alain Volmat
Cc: Hugues Fruchet, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Sakari Ailus, Dan Scally, linux-media,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3437 bytes --]
Hey,
On Tue, Aug 29, 2023 at 03:23:45PM +0200, Alain Volmat wrote:
> Add the yaml binding for the DCMIPP driver.
Please drop all mentions of drivers, bindings are for hardware.
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
> .../bindings/media/st,stm32-dcmipp.yaml | 95 +++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
> new file mode 100644
> index 000000000000..63f03a1c42b6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
> @@ -0,0 +1,95 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/st,stm32-dcmipp.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectronics STM32 DCMIPP Digital Camera Memory Interface Pixel Processor binding
s/binding// to appease the bot.
> +
> +maintainers:
> + - Hugues Fruchet <hugues.fruchet@foss.st.com>
> + - Alain Volmat <alain.volmat@foss.st.com>
> +
> +properties:
> + compatible:
> + const: st,stm32mp13-dcmipp
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + items:
> + - const: kclk
Can drop the items: here since you only have one. The name is also
pretty pointless when you only have one...
> +
> + resets:
> + maxItems: 1
> +
> + port:
> + $ref: /schemas/graph.yaml#/$defs/port-base
> + unevaluatedProperties: false
> + description:
> + DCMIPP supports a single port node with parallel bus.
> +
> + properties:
> + endpoint:
> + $ref: video-interfaces.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + bus-type:
> + enum: [5, 6]
> + default: 5
> +
> + bus-width:
> + enum: [8, 10, 12, 14]
> + default: 8
> +
> + pclk-sample: true
> + hsync-active: true
> + vsync-active: true
> +
> + required:
> + - pclk-sample
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> + - resets
> + - port
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/clock/stm32mp13-clks.h>
> + #include <dt-bindings/reset/stm32mp13-resets.h>
> + dcmipp: dcmipp@5a000000 {
Neither of the labels here are used AFAICT, please remove them.
Thanks,
Conor.
> + compatible = "st,stm32mp13-dcmipp";
> + reg = <0x5a000000 0x400>;
> + interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
> + resets = <&rcc DCMIPP_R>;
> + clocks = <&rcc DCMIPP_K>;
> + clock-names = "kclk";
> +
> + port {
> + dcmipp_0: endpoint {
> + remote-endpoint = <&mipid02_2>;
> + bus-width = <8>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + pclk-sample = <0>;
> + };
> + };
> + };
> +
> +...
> --
> 2.25.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver
2023-08-29 15:00 ` Conor Dooley
@ 2023-09-01 14:43 ` Alain Volmat
0 siblings, 0 replies; 6+ messages in thread
From: Alain Volmat @ 2023-09-01 14:43 UTC (permalink / raw)
To: Conor Dooley
Cc: Hugues Fruchet, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Sakari Ailus, Dan Scally, linux-media,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
Hi Conor,
thanks for the review. I've taken into account your comment and
will push this into the v3.
On Tue, Aug 29, 2023 at 04:00:06PM +0100, Conor Dooley wrote:
> Hey,
>
> On Tue, Aug 29, 2023 at 03:23:45PM +0200, Alain Volmat wrote:
> > Add the yaml binding for the DCMIPP driver.
>
> Please drop all mentions of drivers, bindings are for hardware.
Ok
>
> >
> > Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> > ---
> > .../bindings/media/st,stm32-dcmipp.yaml | 95 +++++++++++++++++++
> > 1 file changed, 95 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
> > new file mode 100644
> > index 000000000000..63f03a1c42b6
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
> > @@ -0,0 +1,95 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/st,stm32-dcmipp.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: STMicroelectronics STM32 DCMIPP Digital Camera Memory Interface Pixel Processor binding
>
> s/binding// to appease the bot.
Ok
>
> > +
> > +maintainers:
> > + - Hugues Fruchet <hugues.fruchet@foss.st.com>
> > + - Alain Volmat <alain.volmat@foss.st.com>
> > +
> > +properties:
> > + compatible:
> > + const: st,stm32mp13-dcmipp
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + clock-names:
> > + items:
> > + - const: kclk
>
> Can drop the items: here since you only have one. The name is also
> pretty pointless when you only have one...
Ok, I removed clock-names (from required as well).
>
> > +
> > + resets:
> > + maxItems: 1
> > +
> > + port:
> > + $ref: /schemas/graph.yaml#/$defs/port-base
> > + unevaluatedProperties: false
> > + description:
> > + DCMIPP supports a single port node with parallel bus.
> > +
> > + properties:
> > + endpoint:
> > + $ref: video-interfaces.yaml#
> > + unevaluatedProperties: false
> > +
> > + properties:
> > + bus-type:
> > + enum: [5, 6]
> > + default: 5
> > +
> > + bus-width:
> > + enum: [8, 10, 12, 14]
> > + default: 8
> > +
> > + pclk-sample: true
> > + hsync-active: true
> > + vsync-active: true
> > +
> > + required:
> > + - pclk-sample
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - clock-names
> > + - resets
> > + - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + #include <dt-bindings/clock/stm32mp13-clks.h>
> > + #include <dt-bindings/reset/stm32mp13-resets.h>
> > + dcmipp: dcmipp@5a000000 {
>
> Neither of the labels here are used AFAICT, please remove them.
Done
Regards,
Alain
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-01 14:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29 13:23 [PATCH v2 0/5] Add support for DCMIPP camera interface of STMicroelectronics STM32 SoC series Alain Volmat
2023-08-29 13:23 ` [PATCH v2 1/5] dt-bindings: media: add bindings for dcmipp driver Alain Volmat
2023-08-29 14:35 ` Rob Herring
2023-08-29 15:00 ` Conor Dooley
2023-09-01 14:43 ` Alain Volmat
2023-08-29 13:23 ` [PATCH v2 4/5] ARM: dts: stm32: add dcmipp support to stm32mp135 Alain Volmat
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).