From: Krzysztof Kozlowski <krzk@kernel.org>
To: Herman van Hazendonk <github.com@herrie.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/2] media: i2c: add Aptina MT9M113 1.3 Mpx SoC sensor driver
Date: Mon, 8 Jun 2026 09:02:56 +0200 [thread overview]
Message-ID: <20260608-exuberant-ingenious-macaw-9c6145@quoll> (raw)
In-Reply-To: <20260607-submit-media-mt9m113-v7-2-5da397a3d2a5@herrie.org>
On Sun, Jun 07, 2026 at 07:34:05AM +0200, Herman van Hazendonk wrote:
> Add a V4L2 subdev driver for the Aptina MT9M113 1.3 Megapixel SoC
> image sensor (1280x1024 active pixel array) with on-chip ISP. The
> sensor exposes:
>
> - dual context operation: Context A (640x480 preview, binned) and
> Context B (1280x1024 capture) selectable at runtime;
> - single-lane MIPI CSI-2 output, YUV422 in UYVY or YUYV byte order
> (the byte order is selected via the chroma/luma swap bit in
> MODE_OUTPUT_FORMAT_{A,B});
> - I2C MCU-indirect register access through the 0x098C/0x0990 page
> indirection pair, in addition to the directly addressable
> register space;
> - V4L2 controls: H/V flip, color effects (none / mono / sepia /
> negative / solarization), power-line frequency, saturation,
> manual or auto exposure, analog gain, auto white balance, and
> a four-entry test pattern selector;
> - a 24 MHz EXTCLK and 1.8/2.8 V supplies.
>
> The MT9M113 MCU intermittently wedges on stream start (SEQ_CMD
> stuck, SEQ_STATE never reaching preview/capture; only a full power
> cycle recovers it). The driver works around this in two layers:
> runtime-PM resume always performs a full power-cycle plus init-table
> replay - matching the legacy vendor kernel's per-open behaviour -
> so a wedged MCU is recovered each session; and the s_stream(1) path
> retries a bounded number of times with a runtime-PM power cycle
> between attempts as fallback insurance for the residual failure
> rate.
>
> Found on the HP TouchPad (Tenderloin) as the front-facing camera
> and on a number of other 1280x1024 mobile/embedded boards.
>
> Assisted-by: Claude:claude-opus-4-7 Sashiko:claude-haiku-4-5 Sparse:0.6.4 Coccinelle:1.1.1
> Signed-off-by: Herman van Hazendonk <github.com@herrie.org>
> ---
> .../bindings/media/i2c/aptina,mt9m113.yaml | 8 +
> MAINTAINERS | 8 +
> drivers/media/i2c/Kconfig | 13 +
> drivers/media/i2c/Makefile | 1 +
> drivers/media/i2c/mt9m113.c | 3394 ++++++++++++++++++++
> 5 files changed, 3424 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/aptina,mt9m113.yaml b/Documentation/devicetree/bindings/media/i2c/aptina,mt9m113.yaml
> index 72b827c47b1d..cfd6711e8250 100644
> --- a/Documentation/devicetree/bindings/media/i2c/aptina,mt9m113.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/aptina,mt9m113.yaml
> @@ -70,6 +70,14 @@ properties:
> const: 4
> description: MIPI CSI-2 D-PHY
>
> + data-lanes:
> + description:
> + The MT9M113 has a single CSI-2 data lane. Reject DT entries
> + that try to assign more than one lane so a misconfiguration
> + is caught at schema-validation time rather than at runtime
> + when the driver enforces num_data_lanes == 1.
> + maxItems: 1
> +
Please run scripts/checkpatch.pl on the patches and fix reported
warnings. After that, run also 'scripts/checkpatch.pl --strict' on the
patches and (probably) fix more warnings. Some warnings can be ignored,
especially from --strict run, but the code here looks like it needs a
fix. Feel free to get in touch if the warning is not clear.
Best regards,
Krzysztof
prev parent reply other threads:[~2026-06-08 7:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 5:34 [PATCH v7 0/2] media: i2c: add Aptina MT9M113 image " Herman van Hazendonk via B4 Relay
2026-06-07 5:34 ` [PATCH v7 1/2] dt-bindings: media: i2c: add aptina,mt9m113 Herman van Hazendonk via B4 Relay
2026-06-08 7:02 ` Krzysztof Kozlowski
2026-06-07 5:34 ` [PATCH v7 2/2] media: i2c: add Aptina MT9M113 1.3 Mpx SoC sensor driver Herman van Hazendonk via B4 Relay
2026-06-08 7:02 ` Krzysztof Kozlowski [this message]
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=20260608-exuberant-ingenious-macaw-9c6145@quoll \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=github.com@herrie.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.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
all inboxes | Powered by JetHome®