From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: slongerbeam@gmail.com, p.zabel@pengutronix.de,
shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com,
mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
martin.kepplinger@puri.sm, rmfrfs@gmail.com,
xavier.roumegue@oss.nxp.com, alexander.stein@ew.tq-group.com,
dorota.czaplejewicz@puri.sm, kernel@pengutronix.de,
linux-imx@nxp.com, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/8] staging: media: imx: Add more compatible strings
Date: Mon, 14 Feb 2022 21:15:07 +0200 [thread overview]
Message-ID: <YgqqO+6FHIVocnW9@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220214184318.409208-4-jacopo@jmondi.org>
Hi Jacopo,
Thank you for the patch.
On Mon, Feb 14, 2022 at 07:43:13PM +0100, Jacopo Mondi wrote:
> The imx7-media-csi driver controls the CSI (CMOS Sensor Interface)
> peripheral available on several SoC of different generations.
>
> The current situation when it comes to compatible strings is rather
> confused:
> - Bindings document imx6ul, imx7 and imx8mm
> - Driver supports imx6ul, imx7 and imx8mq
> - The IMX8MM and IMX8MQ DTS use the correct compatible strings with a
> fallback to the generic "imx7-csi" identifier:
> arch/arm64/boot/dts/freescale/imx8mq.dtsi: compatible = "fsl,imx8mq-csi",
> arch/arm64/boot/dts/freescale/imx8mm.dtsi: compatible = "fsl,imx8mm-csi",
>
> Tidy-up the situation by adding the IMX8MQ compatible string to the
> bindings documentation andathe IMX8MM identifier to the driver, to allow
> to distinguish the SoC the CSI peripheral is integrated on in the
> following patches.
>
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
> Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml | 1 +
> drivers/staging/media/imx/imx7-media-csi.c | 2 ++
I think Rob would prefer this being split in two patches, and I think it
would make sense, as you're fixing two separate issues.
> 2 files changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml b/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
> index 4f7b78265336..0f1505d85111 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
> @@ -21,6 +21,7 @@ properties:
> - fsl,imx7-csi
> - fsl,imx6ul-csi
> - items:
> + - const: fsl,imx8mq-csi
> - const: fsl,imx8mm-csi
> - const: fsl,imx7-csi
I don't think you intended to require the following:
compatible = "fsl,imx8mq-csi", "fsl,imx8mm-csi", "fsl,imx7-csi";
You probably want
properties:
compatible:
oneOf:
- enum:
+ - fsl,imx8mq-csi
- fsl,imx7-csi
- fsl,imx6ul-csi
- items:
- const: fsl,imx8mm-csi
- const: fsl,imx7-csi
instead.
> diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
> index 32311fc0e2a4..59100e409709 100644
> --- a/drivers/staging/media/imx/imx7-media-csi.c
> +++ b/drivers/staging/media/imx/imx7-media-csi.c
> @@ -162,6 +162,7 @@
> enum imx_csi_model {
> IMX7_CSI_IMX7 = 0,
> IMX7_CSI_IMX8MQ,
> + IMX7_CSI_IMX8MM,
> };
>
> struct imx7_csi {
> @@ -1277,6 +1278,7 @@ static int imx7_csi_remove(struct platform_device *pdev)
>
> static const struct of_device_id imx7_csi_of_match[] = {
> { .compatible = "fsl,imx8mq-csi", .data = (void *)IMX7_CSI_IMX8MQ },
> + { .compatible = "fsl,imx8mm-csi", .data = (void *)IMX7_CSI_IMX8MM },
This isn't needed, as the i.MX8MM CSI bridgge is considered fully
backward-compatible with the i.MX7 version. I'd introduce this change in
the patch where you start using IMX7_CSI_IMX8MM, and I would then add
the following to the DT binding:
properties:
compatible:
oneOf:
- enum:
- fsl,imx8mq-csi
+ - fsl,imx8mm-csi
- fsl,imx7-csi
- fsl,imx6ul-csi
- items:
- const: fsl,imx8mm-csi
- const: fsl,imx7-csi
to allow setting
compatible = "fsl,imx8mm-csi";
without the imx7 fallback if we consider the i.MX8MM version different.
If the driver can operate correctly on the i.MX8MM when using the i.MX7
fallback code paths (possibly minor issues that are not considered
fatal, such as missing features) then you could skip this binding
change.
> { .compatible = "fsl,imx7-csi", .data = (void *)IMX7_CSI_IMX7 },
> { .compatible = "fsl,imx6ul-csi", .data = (void *)IMX7_CSI_IMX7 },
> { },
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2022-02-14 19:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 18:43 [PATCH 0/8] media: imx: Destage imx7-mipi-csis with fixes on top Jacopo Mondi
2022-02-14 18:43 ` [PATCH 1/8] media: imx: De-stage imx7-mipi-csis Jacopo Mondi
2022-02-14 18:43 ` [PATCH 2/8] media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c Jacopo Mondi
2022-02-15 6:58 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 3/8] staging: media: imx: Add more compatible strings Jacopo Mondi
2022-02-14 19:15 ` Laurent Pinchart [this message]
2022-02-15 8:36 ` Jacopo Mondi
2022-02-15 8:45 ` Laurent Pinchart
2022-02-15 9:17 ` Jacopo Mondi
2022-02-14 18:43 ` [PATCH 4/8] staging: media: imx: Define per-SoC info Jacopo Mondi
2022-02-14 19:20 ` Laurent Pinchart
2022-02-15 8:40 ` Jacopo Mondi
2022-02-14 18:43 ` [PATCH 5/8] staging: media: imx: Use DUAL pixel mode if available Jacopo Mondi
2022-02-15 7:12 ` Laurent Pinchart
2022-02-15 8:59 ` Jacopo Mondi
2022-02-20 13:34 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 6/8] media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422 Jacopo Mondi
2022-02-15 7:25 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 7/8] media: imx: imx-mipi-csis: Add RGB565_1X16 Jacopo Mondi
2022-02-15 7:26 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 8/8] media: imx: imx-mipi-csis: Add RGB/BGR888 Jacopo Mondi
2022-02-15 7:46 ` Laurent Pinchart
2022-02-15 21:07 ` Sakari Ailus
2022-02-15 21:52 ` Laurent Pinchart
2022-02-15 23:10 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YgqqO+6FHIVocnW9@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=dorota.czaplejewicz@puri.sm \
--cc=festevam@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jacopo@jmondi.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin.kepplinger@puri.sm \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=rmfrfs@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=slongerbeam@gmail.com \
--cc=xavier.roumegue@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox