media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
Subsystems (7)
v2 cover media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
This series adds new drivers for multiple Maxim GMSL2 and GMSL3 devices, replacing the few GMSL2 drivers already in upstream, and introducing a common framework that can be used to implement such GMSL chips, which avoids code duplication while also adding support for previously unsupported features.
While the normally acceptable and polite way would be to extend the current mainline drivers, the choice was made here to add a totally new set of drivers. The current drivers support only a small subset of the possible features, and only a few devices, so the end result after extending them would in any case be essentially fully rewritten, new drivers.
This series depends on these two series:
* https://lore.kernel.org/lkml/[email protected]
* https://lore.kernel.org/lkml/[email protected]
The following deserializers are supported:
* MAX96712 (already exists in staging)
* MAX96714 (already exists)
* MAX96716 (GMSL2)
* MAX96724 (part of existing MAX96712 driver)
* MAX9296A (GMSL2)
* MAX96792A (GMSL3)
The following serializers are supported:
* MAX96717 (already exists)
* MAX9295A (GMSL2)
* MAX96793 (GMSL3)
Missing features:
* The current TPG implementation makes use of the V4L2_CID_TEST_PATTERN V4L2 control. With V4L2 streams support added, we would like to hook up TPG using the internal pad feature which has not been accepted upstream yet. We decided to leave TPG out for the moment and add it back after internal pads have been accepted.
Known backward compatibility breakages:
* No default routing. Default routing has been intentionally ommitted as the devices support quite complex routing and it would be unfeasible to provide sane defaults for multi-link deserialziers. It is expected that userspace programs would set appropritate routing.
The following list enumerates new features that are supported by the common framework and their respective chip-specific drivers:
* Full Streams API support. Most deserializers have support for more than one link, and more than one PHY. Streams support allows configuration of routing between these links and PHYs.
* .get_frame_desc() support. Both the serializers and deserializers implement this to query and provide frame descriptor data. This is used in features explained in-depth below.
* .get_mbus_config() support. The deserializers implement this to allow upstream devices to query the link frequency of its pads.
* Address translation with I2C ATR for the serializers.
* I2C MUX where supported by the hardware for deserializers, otherwise I2C ATR translation - some deserializers cannot do muxing since I2C communication channel masking is not available per-link, and the only other way to select links is to turn them off, causing link resets. For such cases, I2C ATR is used to change the address of the serializers at probe time.
* Automatic VC remapping on the deserializers. VCs are picked so that if they were unique on the sink pad, they will end up as unique on the source pad they are routed to too, prioritizing using the same VC ID as the sink pad, to facilitate the possibility of using tunnel mode.
* Automatic pixel mode / tunnel mode selection. Tunnel mode is used when VC IDs do not need to be changed and all hardware supports tunnel mode, otherwise, pixel mode is used. The serializers are automatically switched between the two by using a private API.
* Automatic double mode selection. In pixel mode, double mode can be used to pack two pixels into a single data unit, optimizing bandwidth usage. The serializers are automatically set up to support the double modes determined by the deserializers using a private API.
* Automatic data padding. In pixel mode, if the data being transferred uses two different BPPs, data needs to be padded. The serializers automatically set this up depending on the configured double mode settings and incoming data types.
* Logging. Both the deserializers and serializers implement the V4L2 .log_status() ops to allow debugging of the internal state and important chip status registers.
* PHY modes. Deserializer chips commonly have more than a single PHY. The firmware ports are parsed to determine the modes in which to configure the PHYs (2x4, 4x2, 1x4+2x2, 2x2+1x4, and variations using fewer lanes).
* Serializer pinctrl. Serializers implement pinctrl to allow setting configs which would otherwise be inaccessible through GPIO: TX/RX via GMSL link, pull-up & pull-down (with strength), open-drain & push-pull, slew rate, RCLK pin selection.
The drivers have been tested on the following hardware combinations, but further testing is welcome to ensure no / minimal breakage:
* Raspberry Pi 5 + MAX96724 + 4xMAX96717 + 4xIMX219
* Raspberry Pi 5 + MAX96792A + 1xMAX96793 + 1xMAX96717 + 2xIMX219
* Raspberry Pi 5 + MAX96792A + 2xMAX96717 + 2xIMX219
* Renesas V4H + MAX96712 + 2xMAX96717 + 2xIMX219
Analog Devices is taking responsibility for the maintenance of these drivers and common framework, and plans to add support for new broad-market chips on top of them.
Special thanks go to Tomi Valkeinen <[email protected]> for testing the drivers, helping debug and coming up with ideas / implementations for various features.
V2:
* add missing compatible for MAX96717F
* fix embarrassing dt-bindings mistakes
* move MAX9296A/MAX96716/MAX96792A to a separate file as they have two links / PHYs, and adding those conditionally seems impossible
Cosmin Tanislav (16):
dt-bindings: media: i2c: max96717: add myself as maintainer
dt-bindings: media: i2c: max96717: reflow text
dt-bindings: media: i2c: max96717: add support for I2C ATR
dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf
dt-bindings: media: i2c: max96717: add support for MAX9295A
dt-bindings: media: i2c: max96717: add support for MAX96793
dt-bindings: media: i2c: max96712: add myself as maintainer
dt-bindings: media: i2c: max96712: use pattern properties for ports
dt-bindings: media: i2c: max96712: add support for I2C MUX
dt-bindings: media: i2c: max96712: add support for POC supplies
dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A
media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
arm64: defconfig: disable deprecated MAX96712 driver
staging: media: remove MAX96712 driver
media: i2c: remove MAX96717 driver
media: i2c: remove MAX96714 driver
.../bindings/media/i2c/maxim,max9296a.yaml | 281 ++ .../bindings/media/i2c/maxim,max96712.yaml | 47 +- .../media/i2c/maxim,max96717-pinctrl.yaml | 71 + .../bindings/media/i2c/maxim,max96717.yaml | 80 +- MAINTAINERS | 13 +- arch/arm64/configs/defconfig | 1 - drivers/media/i2c/Kconfig | 34 +- drivers/media/i2c/Makefile | 3 +- drivers/media/i2c/max96714.c | 1024 -------- drivers/media/i2c/max96717.c | 1103 -------- drivers/media/i2c/maxim-serdes/Kconfig | 53 + drivers/media/i2c/maxim-serdes/Makefile | 6 + drivers/media/i2c/maxim-serdes/max9296a.c | 1146 ++++++++ drivers/media/i2c/maxim-serdes/max96717.c | 1501 +++++++++++ drivers/media/i2c/maxim-serdes/max96724.c | 905 +++++++ drivers/media/i2c/maxim-serdes/max_des.c | 2321 +++++++++++++++++ drivers/media/i2c/maxim-serdes/max_des.h | 135 + drivers/media/i2c/maxim-serdes/max_ser.c | 1584 +++++++++++ drivers/media/i2c/maxim-serdes/max_ser.h | 132 + drivers/media/i2c/maxim-serdes/max_serdes.c | 302 +++ drivers/media/i2c/maxim-serdes/max_serdes.h | 88 + drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/max96712/Kconfig | 14 - drivers/staging/media/max96712/Makefile | 2 - drivers/staging/media/max96712/max96712.c | 487 ---- 26 files changed, 8634 insertions(+), 2702 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml delete mode 100644 drivers/media/i2c/max96714.c delete mode 100644 drivers/media/i2c/max96717.c create mode 100644 drivers/media/i2c/maxim-serdes/Kconfig create mode 100644 drivers/media/i2c/maxim-serdes/Makefile create mode 100644 drivers/media/i2c/maxim-serdes/max9296a.c create mode 100644 drivers/media/i2c/maxim-serdes/max96717.c create mode 100644 drivers/media/i2c/maxim-serdes/max96724.c create mode 100644 drivers/media/i2c/maxim-serdes/max_des.c create mode 100644 drivers/media/i2c/maxim-serdes/max_des.h create mode 100644 drivers/media/i2c/maxim-serdes/max_ser.c create mode 100644 drivers/media/i2c/maxim-serdes/max_ser.h create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.c create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.h delete mode 100644 drivers/staging/media/max96712/Kconfig delete mode 100644 drivers/staging/media/max96712/Makefile delete mode 100644 drivers/staging/media/max96712/max96712.c
Signature · 1 line
2.48.1
RFC PATCH v2 1/16 dt-bindings: media: i2c: max96717: add myself as maintainer
Analog Devices is taking responsability for the maintenance of the Maxim GMSL2/3 devices.
Add myself to the maintainers list and to the device tree bindings.
--- Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml | 1 + MAINTAINERS | 1 + 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +1 -0
@@ -9,6 +9,7 @@ title: MAX96717 CSI-2 to GMSL2 Serializer maintainers: - Julien Massot <[email protected]> + - Cosmin Tanislav <[email protected]> description: The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input
MAINTAINERS +1 -0
@@ -14198,6 +14198,7 @@ F: drivers/media/i2c/max96714.c MAX96717 GMSL2 SERIALIZER DRIVER M: Julien Massot <[email protected]> +M: Cosmin Tanislav <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml
Signature · 1 line
2.48.1
Re: [RFC PATCH v2 01/16] dt-bindings: media: i2c: max96717: add myself as maintainer
Quoted 10 lines · Cosmin Tanislav
Analog Devices is taking responsability for the maintenance of the Maxim GMSL2/3 devices.
Add myself to the maintainers list and to the device tree bindings.Signed-off-by Cosmin Tanislav <[email protected]>--- Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml | 1 + MAINTAINERS | 1 + 2 files changed, 2 insertions(+)
RFC PATCH v2 2/16 dt-bindings: media: i2c: max96717: reflow text
In reply to Cosmin TanislavThis text is using weird line lengths. Fix it.
--- .../bindings/media/i2c/maxim,max96717.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +9 -10
@@ -12,16 +12,15 @@ maintainers: - Cosmin Tanislav <[email protected]> description: - The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input - into GMSL2 serial outputs. The device allows the GMSL2 link to - simultaneously transmit bidirectional control-channel data while forward - video transmissions are in progress. The MAX96717 can connect to one - remotely located deserializer using industry-standard coax or STP - interconnects. The device cans operate in pixel or tunnel mode. In pixel mode - the MAX96717 can select the MIPI datatype, while the tunnel mode forward all the MIPI - data received by the serializer. - The MAX96717 supports Reference Over Reverse (channel), - to generate a clock output for the sensor from the GMSL reverse channel. + The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input into GMSL2 + serial outputs. The device allows the GMSL2 link to simultaneously transmit + bidirectional control-channel data while forward video transmissions are in + progress. The MAX96717 can connect to one remotely located deserializer using + industry-standard coax or STP interconnects. The device cans operate in pixel + or tunnel mode. In pixel mode the MAX96717 can select the MIPI datatype, while + the tunnel mode forward all the MIPI data received by the serializer. + The MAX96717 supports Reference Over Reverse (channel), to generate a clock + output for the sensor from the GMSL reverse channel. The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the forward direction and 187.5Mbps in the reverse direction.
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [RFC PATCH v2 02/16] dt-bindings: media: i2c: max96717: reflow text
Quoted 12 lines · Cosmin Tanislav
This text is using weird line lengths. Fix it.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../bindings/media/i2c/maxim,max96717.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml maintainers: · line 14
Quoted 3 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0@@ -12,16 +12,15 @@ maintainers: - Cosmin Tanislav <[email protected]> description:
Use '>' token for multiple paragraphs.
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-10- The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input - into GMSL2 serial outputs. The device allows the GMSL2 link to - simultaneously transmit bidirectional control-channel data while forward - video transmissions are in progress. The MAX96717 can connect to one - remotely located deserializer using industry-standard coax or STP - interconnects. The device cans operate in pixel or tunnel mode. In pixel mode - the MAX96717 can select the MIPI datatype, while the tunnel mode forward all the MIPI - data received by the serializer. - The MAX96717 supports Reference Over Reverse (channel), - to generate a clock output for the sensor from the GMSL reverse channel.
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml maintainers:
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +9
-0+ The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input into GMSL2 + serial outputs. The device allows the GMSL2 link to simultaneously transmit + bidirectional control-channel data while forward video transmissions are in + progress. The MAX96717 can connect to one remotely located deserializer using + industry-standard coax or STP interconnects. The device cans operate in pixel + or tunnel mode. In pixel mode the MAX96717 can select the MIPI datatype, while + the tunnel mode forward all the MIPI data received by the serializer. + The MAX96717 supports Reference Over Reverse (channel), to generate a clock + output for the sensor from the GMSL reverse channel.
Is this a separate paragraph? If not, the wrapping is not right. If so, then needs a blank line in between.
Quoted 6 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the forward direction and 187.5Mbps in the reverse direction.Signature · 1 line
2.48.1
RFC PATCH v2 3/16 dt-bindings: media: i2c: max96717: add support for I2C ATR
In reply to Cosmin TanislavMAX96717 is capable of address translation for the connected I2C slaves.
Add support for I2C ATR while keeping I2C gate for compatibility to support this usecase.
--- .../bindings/media/i2c/maxim,max96717.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +39 -0
@@ -91,6 +91,30 @@ properties: incoming GMSL2 link. Therefore, it supports an i2c-gate subnode to configure a sensor. + i2c-alias-pool: + maxItems: 2 + + i2c-atr: + type: object + additionalProperties: false + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + '^i2c@0': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + required: - compatible - reg
@@ -98,6 +122,21 @@ required: additionalProperties: false +allOf: + - $ref: /schemas/i2c/i2c-atr.yaml# + + - anyOf: + - oneOf: + - required: [i2c-atr] + - required: [i2c-gate] + + - not: + required: [i2c-atr, i2c-gate] + +dependentRequired: + i2c-atr: [i2c-alias-pool] + i2c-alias-pool: [i2c-atr] + examples: - | #include <dt-bindings/gpio/gpio.h>
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [RFC PATCH v2 03/16] dt-bindings: media: i2c: max96717: add support for I2C ATR
Quoted 24 lines · Cosmin Tanislav
MAX96717 is capable of address translation for the connected I2C slaves.
Add support for I2C ATR while keeping I2C gate for compatibility to support this usecase.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../bindings/media/i2c/maxim,max96717.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+)Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +6
-0@@ -91,6 +91,30 @@ properties: incoming GMSL2 link. Therefore, it supports an i2c-gate subnode to configure a sensor. + i2c-alias-pool: + maxItems: 2 + + i2c-atr: + type: object + additionalProperties: false
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml properties: · line 109
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +10
-0+ + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + '^i2c@0':
This allows "i2c@0anything-you-want". Based on reg, you want '^i2c@[01]$'.
Quoted 36 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +23
-0+ $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + required: - compatible - reg@@ -98,6 +122,21 @@ required: additionalProperties: false +allOf: + - $ref: /schemas/i2c/i2c-atr.yaml# + + - anyOf: + - oneOf: + - required: [i2c-atr] + - required: [i2c-gate] + + - not: + required: [i2c-atr, i2c-gate] + +dependentRequired: + i2c-atr: [i2c-alias-pool] + i2c-alias-pool: [i2c-atr] + examples: - | #include <dt-bindings/gpio/gpio.h>Signature · 1 line
2.48.1
RFC PATCH v2 4/16 dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf
In reply to Cosmin TanislavMAX96717 is capable of configuring various pin properties.
Add pinctrl/pinconf properties to support this usecase.
--- .../media/i2c/maxim,max96717-pinctrl.yaml | 71 +++++++++++++++++++ .../bindings/media/i2c/maxim,max96717.yaml | 16 ++++- MAINTAINERS | 1 + 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml
Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml new file +71 -0
@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2025 Analog Devices Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/maxim,max96717-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim GMSL2 Serializer Pinctrl + +maintainers: + - Cosmin Tanislav <[email protected]> + +allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml# + - $ref: /schemas/pinctrl/pinmux-node.yaml# + +unevaluatedProperties: false + +properties: + function: true + pins: true + drive-open-drain: true + drive-push-pull: true + bias-disable: true + bias-pull-up: true + bias-pull-down: true + output-disable: true + output-enable: true + output-low: true + output-high: true + slew-rate: true + input-enable: true + + maxim,jitter-compensation: + type: boolean + description: Enables jitter compensation. + + maxim,gmsl-tx: + type: boolean + description: Enable transmitting pin value to GMSL link. + + maxim,gmsl-rx: + type: boolean + description: Enable receiving pin value from GMSL link. + + maxim,gmsl-tx-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Identifier used while transmitting value to GMSL link. + Default value matches the pin number. + minimum: 0 + maximum: 31 + + maxim,gmsl-rx-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Identifier used while receiving value from GMSL link. + Default value matches the pin number. + minimum: 0 + maximum: 31 + + maxim,rclkout-clock: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Clock value. + 0 - XTAL / 1 = 25MHz + 1 - XTAL / 2 = 12.5MHz + 2 - XTAL / 4 = 6.25MHz + 3 - Reference PLL output + minimum: 0 + maximum: 3
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +15 -1
@@ -120,7 +120,21 @@ required: - reg - ports -additionalProperties: false +additionalProperties: + anyOf: + - type: object + allOf: + - $ref: /schemas/media/i2c/maxim,max96717-pinctrl.yaml# + + unevaluatedProperties: false + + - type: object + additionalProperties: + type: object + allOf: + - $ref: /schemas/media/i2c/maxim,max96717-pinctrl.yaml# + + unevaluatedProperties: false allOf: - $ref: /schemas/i2c/i2c-atr.yaml#
MAINTAINERS +1 -0
@@ -14201,6 +14201,7 @@ M: Julien Massot <[email protected]> M: Cosmin Tanislav <[email protected]> L: [email protected] S: Maintained +F: Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml F: Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml F: drivers/media/i2c/max96717.c
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [RFC PATCH v2 04/16] dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf
Quoted 58 lines · Cosmin Tanislav
MAX96717 is capable of configuring various pin properties.
Add pinctrl/pinconf properties to support this usecase.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../media/i2c/maxim,max96717-pinctrl.yaml | 71 +++++++++++++++++++ .../bindings/media/i2c/maxim,max96717.yaml | 16 ++++- MAINTAINERS | 1 + 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yamlDocumentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml new file +40
-0@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2025 Analog Devices Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/maxim,max96717-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim GMSL2 Serializer Pinctrl + +maintainers: + - Cosmin Tanislav <[email protected]> + +allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml# + - $ref: /schemas/pinctrl/pinmux-node.yaml# + +unevaluatedProperties: false + +properties: + function: true + pins: true + drive-open-drain: true + drive-push-pull: true + bias-disable: true + bias-pull-up: true + bias-pull-down: true + output-disable: true + output-enable: true + output-low: true + output-high: true + slew-rate: true + input-enable: true + + maxim,jitter-compensation: + type: boolean + description: Enables jitter compensation. + + maxim,gmsl-tx: + type: boolean + description: Enable transmitting pin value to GMSL link.
Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml line 50
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml new file +10
-0+ + maxim,gmsl-rx: + type: boolean + description: Enable receiving pin value from GMSL link. + + maxim,gmsl-tx-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Identifier used while transmitting value to GMSL link. + Default value matches the pin number.
Use normally wrapping or blank line between paragraphs.
Quoted 26 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml new file +21
-0+ minimum: 0 + maximum: 31 + + maxim,gmsl-rx-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Identifier used while receiving value from GMSL link. + Default value matches the pin number. + minimum: 0 + maximum: 31 + + maxim,rclkout-clock: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Clock value. + 0 - XTAL / 1 = 25MHz + 1 - XTAL / 2 = 12.5MHz + 2 - XTAL / 4 = 6.25MHz + 3 - Reference PLL output + minimum: 0 + maximum: 3Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml required: · line 127
Quoted 9 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +5
-1@@ -120,7 +120,21 @@ required: - reg - ports -additionalProperties: false +additionalProperties: + anyOf: + - type: object + allOf: + - $ref: /schemas/media/i2c/maxim,max96717-pinctrl.yaml#
You can drop the allOf here.
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml required: · line 135
Quoted 8 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +8
-0+ + unevaluatedProperties: false + + - type: object + additionalProperties: + type: object + allOf: + - $ref: /schemas/media/i2c/maxim,max96717-pinctrl.yaml#
And here.
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml required: · line 137
Quoted 2 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +2
-0+ + unevaluatedProperties: false
Do you really need to support 2 forms?
This also allows the node names to be anything. We do that for existing cases, but for new ones you should define some prefix or suffix. Typically, '-pins$' is used.
Rob
RFC PATCH v2 5/16 dt-bindings: media: i2c: max96717: add support for MAX9295A
In reply to Cosmin TanislavMAX9295A is an older variant of the MAX96717 which does not support tunnel mode.
Document the compatibility.
--- .../devicetree/bindings/media/i2c/maxim,max96717.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +3 -0
@@ -24,11 +24,14 @@ description: The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the forward direction and 187.5Mbps in the reverse direction. + MAX96717F only supports a fixed rate of 3Gbps in the forward direction. + MAX9295A only supports pixel mode. properties: compatible: oneOf: + - const: maxim,max9295a - const: maxim,max96717f - items: - enum:
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [RFC PATCH v2 05/16] dt-bindings: media: i2c: max96717: add support for MAX9295A
Quoted 17 lines · Cosmin Tanislav
MAX9295A is an older variant of the MAX96717 which does not support tunnel mode.
Document the compatibility.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../devicetree/bindings/media/i2c/maxim,max96717.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0@@ -24,11 +24,14 @@ description: The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml description: · line 35
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +3
-0forward direction and 187.5Mbps in the reverse direction. + MAX96717F only supports a fixed rate of 3Gbps in the forward direction. + MAX9295A only supports pixel mode. properties: compatible: oneOf: + - const: maxim,max9295a - const: maxim,max96717f
Make these 2 a single 'enum'.
Quoted 5 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0- items: - enum:Signature · 1 line
2.48.1
RFC PATCH v2 6/16 dt-bindings: media: i2c: max96717: add support for MAX96793
In reply to Cosmin TanislavMAX96793 is a newer variant of the MAX96717 which also supports GMSL3 links.
Document this compatibility.
--- Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +2 -0
@@ -27,6 +27,7 @@ description: MAX96717F only supports a fixed rate of 3Gbps in the forward direction. MAX9295A only supports pixel mode. + MAX96793 also supports GMSL3 mode. properties: compatible:
@@ -36,6 +37,7 @@ properties: - items: - enum: - maxim,max96717 + - maxim,max96793 - const: maxim,max96717f '#gpio-cells':
Signature · 1 line
2.48.1
Re: [RFC PATCH v2 06/16] dt-bindings: media: i2c: max96717: add support for MAX96793
Quoted 10 lines · Cosmin Tanislav
MAX96793 is a newer variant of the MAX96717 which also supports GMSL3 links.
Document this compatibility.
Signed-off-by Cosmin Tanislav <[email protected]>--- Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml | 2 ++ 1 file changed, 2 insertions(+)
Re: [RFC PATCH v2 06/16] dt-bindings: media: i2c: max96717: add support for MAX96793
In reply to Cosmin TanislavHi Cosmin,
Quoted 15 lines · Cosmin Tanislav
MAX96793 is a newer variant of the MAX96717 which also supports GMSL3 links.
Document this compatibility.
Signed-off-by Cosmin Tanislav <[email protected]>--- Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +0
-0
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml description: · line 30
Quoted 4 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +1
-0@@ -27,6 +27,7 @@ description: MAX96717F only supports a fixed rate of 3Gbps in the forward direction. MAX9295A only supports pixel mode. + MAX96793 also supports GMSL3 mode.
Fits on the previous line. Same goes for some of the commit messages in the
set: the limit is 75 characters per line.
Quoted 11 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +1
-0properties: compatible:@@ -36,6 +37,7 @@ properties: - items: - enum: - maxim,max96717 + - maxim,max96793 - const: maxim,max96717f '#gpio-cells':
Signature · 3 lines
Regards, Sakari Ailus
RFC PATCH v2 7/16 dt-bindings: media: i2c: max96712: add myself as maintainer
In reply to Cosmin TanislavAnalog Devices is taking responsability for the maintenance of the Maxim GMSL2/3 devices.
Add myself to the maintainers list and to the device tree bindings.
--- Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml | 1 + MAINTAINERS | 1 + 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +1 -0
@@ -9,6 +9,7 @@ title: Quad GMSL2 to CSI-2 Deserializer with GMSL1 Compatibility maintainers: - Niklas Söderlund <[email protected]> + - Cosmin Tanislav <[email protected]> description: | The MAX96712 deserializer converts GMSL2 or GMSL1 serial inputs into MIPI
MAINTAINERS +1 -0
@@ -14184,6 +14184,7 @@ F: drivers/media/i2c/max9286.c MAX96712 QUAD GMSL2 DESERIALIZER DRIVER M: Niklas Söderlund <[email protected]> +M: Cosmin Tanislav <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
Signature · 1 line
2.48.1
Re: [RFC PATCH v2 07/16] dt-bindings: media: i2c: max96712: add myself as maintainer
Quoted 10 lines · Cosmin Tanislav
Analog Devices is taking responsability for the maintenance of the Maxim GMSL2/3 devices.
Add myself to the maintainers list and to the device tree bindings.Signed-off-by Cosmin Tanislav <[email protected]>--- Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml | 1 + MAINTAINERS | 1 + 2 files changed, 2 insertions(+)
RFC PATCH v2 8/16 dt-bindings: media: i2c: max96712: use pattern properties for ports
In reply to Cosmin TanislavThe MAX96712 and MAX96724 support up to 4 separate PHYs, depending on the selected PHY configuration. Use patternProperties to document this.
The input ports are all the same, use patternProperties for them.
--- .../bindings/media/i2c/maxim,max96712.yaml | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +10 -19
@@ -40,27 +40,15 @@ properties: ports: $ref: /schemas/graph.yaml#/properties/ports - properties: - port@0: + patternProperties: + '^port@[0-3]$': $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 0 + description: GMSL Input port - port@1: - $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 1 - - port@2: - $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 2 - - port@3: - $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 3 - - port@4: + '^port@[4-7]$': $ref: /schemas/graph.yaml#/$defs/port-base unevaluatedProperties: false - description: CSI-2 Output + description: CSI-2 Output port properties: endpoint:
@@ -78,8 +66,11 @@ properties: - data-lanes - bus-type - required: - - port@4 + anyOf: + - required: [port@4] + - required: [port@5] + - required: [port@6] + - required: [port@7] required: - compatible
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [RFC PATCH v2 08/16] dt-bindings: media: i2c: max96712: use pattern properties for ports
Quoted 15 lines · Cosmin Tanislav
The MAX96712 and MAX96724 support up to 4 separate PHYs, depending on the selected PHY configuration. Use patternProperties to document this.
The input ports are all the same, use patternProperties for them.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../bindings/media/i2c/maxim,max96712.yaml | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-)Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +0
-0
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml properties: · line 46
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +3
-3@@ -40,27 +40,15 @@ properties: ports: $ref: /schemas/graph.yaml#/properties/ports - properties: - port@0: + patternProperties: + '^port@[0-3]$': $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 0 + description: GMSL Input port
GMSL Inputs 0-3
Though generally every port needs to be documented. So really, this was correct before.
Quoted 9 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +0
-8- port@1: - $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 1 - - port@2: - $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 2 -
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml properties: · line 51
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +2
-6- port@3: - $ref: /schemas/graph.yaml#/properties/port - description: GMSL Input 3 - - port@4: + '^port@[4-7]$': $ref: /schemas/graph.yaml#/$defs/port-base unevaluatedProperties: false - description: CSI-2 Output + description: CSI-2 Output port
The input port numbers are 1:1 with Input numbering. I imagine that's not the case here, so the relationship of port #s to outputs needs to be documented.
Quoted 20 lines
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +5
-2properties: endpoint:@@ -78,8 +66,11 @@ properties: - data-lanes - bus-type - required: - - port@4 + anyOf: + - required: [port@4] + - required: [port@5] + - required: [port@6] + - required: [port@7] required: - compatibleSignature · 1 line
2.48.1
RFC PATCH v2 9/16 dt-bindings: media: i2c: max96712: add support for I2C MUX
In reply to Cosmin TanislavMAX96712 and MAX96724 have more than one GMSL2 link, and each link is capable of connecting to a separate serializer. If these serializers have the same CFG pins configuration, they will also have the same I2C address, causing conflicts unless the deserializer muxes the I2C channels. Moreover, the serializers can have the same hardware attached to their respective I2C bus.
The MAX96712 and MAX96724 suppot I2C channel muxing via the GMSL2 link to facilitate communication to each of the connected serializers.
Document this capability.
--- .../bindings/media/i2c/maxim,max96712.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +13 -0
@@ -37,6 +37,19 @@ properties: enable-gpios: true + i2c-mux: + $ref: /schemas/i2c/i2c-mux.yaml# + unevaluatedProperties: false + patternProperties: + '^i2c@[0-3]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 3 + ports: $ref: /schemas/graph.yaml#/properties/ports
Signature · 1 line
2.48.1
Re: [RFC PATCH v2 09/16] dt-bindings: media: i2c: max96712: add support for I2C MUX
Quoted 10 lines · Cosmin Tanislav
MAX96712 and MAX96724 have more than one GMSL2 link, and each link is capable of connecting to a separate serializer. If these serializers have the same CFG pins configuration, they will also have the same I2C address, causing conflicts unless the deserializer muxes the I2C channels. Moreover, the serializers can have the same hardware attached to their respective I2C bus.
The MAX96712 and MAX96724 suppot I2C channel muxing via the GMSL2 link to facilitate communication to each of the connected serializers.
Quoted 7 lines
Document this capability.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../bindings/media/i2c/maxim,max96712.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
RFC PATCH v2 10/16 dt-bindings: media: i2c: max96712: add support for POC supplies
In reply to Cosmin TanislavThe GMSL links can carry power to the serializer when using coaxial cables.
Document this capability.
--- .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +4 -0
@@ -85,6 +85,10 @@ properties: - required: [port@6] - required: [port@7] +patternProperties: + '^port[0-3]-poc-supply$': + description: Regulator providing Power over Coax for GMSL ports + required: - compatible - reg
Signature · 1 line
2.48.1
Re: [RFC PATCH v2 10/16] dt-bindings: media: i2c: max96712: add support for POC supplies
Quoted 10 lines · Cosmin Tanislav
The GMSL links can carry power to the serializer when using coaxial cables.
Document this capability.
Signed-off-by Cosmin Tanislav <[email protected]>--- .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 4 ++++ 1 file changed, 4 insertions(+)
RFC PATCH v2 11/16 dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A
In reply to Cosmin TanislavThe MAX9296A deserializer converts single or dual serial inputs to MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps or 6Gbps in the forward direction and 187.5Mbps in the reverse direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 serializers with GMSL1 backward compatibility. The MAX9296A supports mixed GMSL2 and GMSL1 links. The serial inputs operate independently, allowing videos with different timings and resolutions to be received on each input.
MAX96716A supports both tunnel and pixel mode.
MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links.
--- .../bindings/media/i2c/maxim,max9296a.yaml | 281 ++++++++++++++++++ MAINTAINERS | 6 + 2 files changed, 287 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +281 -0
@@ -0,0 +1,281 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2024 Collabora Ltd. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/maxim,max9296a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX9296A GMSL2 to CSI-2 Deserializer + +maintainers: + - Cosmin Tanislav <[email protected]> + +description: + The MAX9296A deserializer converts single or dual serial inputs to + MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps + or 6Gbps in the forward direction and 187.5Mbps in the reverse + direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps + or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 + serializers with GMSL1 backward compatibility. The MAX9296A supports + mixed GMSL2 and GMSL1 links. The serial inputs operate independently, + allowing videos with different timings and resolutions to be received + on each input. + + MAX96716A supports both tunnel and pixel mode. + MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. + +properties: + compatible: + enum: + - maxim,max9296a + - maxim,max96716a + - maxim,max96792a + + reg: + maxItems: 1 + + powerdown-gpios: + maxItems: 1 + description: Specifier for the GPIO connected to the PWDNB pin. + + port0-poc-supply: + description: Regulator providing Power over Coax for GMSL port 0 + + port1-poc-supply: + description: Regulator providing Power over Coax for GMSL port 1 + + i2c-mux: + $ref: /schemas/i2c/i2c-mux.yaml# + unevaluatedProperties: false + patternProperties: + '^i2c@[0-1]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + + i2c-alias-pool: + maxItems: 2 + + i2c-atr: + type: object + additionalProperties: false + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + '^i2c@[0-1]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + patternProperties: + '^port@[0-1]$': + $ref: /schemas/graph.yaml#/properties/port + unevaluatedProperties: false + description: GMSL Input + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + description: Endpoint for GMSL2-Link port. + + '^port@[2-3]$': + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI-2 Output port + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + lane-polarities: + minItems: 1 + maxItems: 5 + + link-frequencies: + maxItems: 1 + + required: + - data-lanes + + anyOf: + - required: + - port@2 + - required: + - port@3 + +required: + - compatible + - reg + - ports + +additionalProperties: false + +allOf: + - $ref: /schemas/i2c/i2c-atr.yaml# + + - if: + properties: + compatible: + contains: + enum: + - maxim,max9296a + - maxim,max96792a + then: + not: + required: [i2c-mux] + + - if: + properties: + compatible: + contains: + enum: + - maxim,max96716a + then: + not: + required: [i2c-atr] + +dependentRequired: + i2c-atr: [i2c-alias-pool] + i2c-alias-pool: [i2c-atr] + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/media/video-interfaces.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + deserializer@28 { + compatible = "maxim,max9296a"; + reg = <0x28>; + powerdown-gpios = <&main_gpio0 37 GPIO_ACTIVE_LOW>; + + i2c-alias-pool = <0x40 0x41>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + des_gmsl_in_0: endpoint { + remote-endpoint = <&ser_0_gmsl_out>; + }; + }; + + port@1 { + reg = <1>; + des_gmsl_in_1: endpoint { + remote-endpoint = <&ser_1_gmsl_out>; + }; + }; + + port@2 { + reg = <2>; + des_csi_out: endpoint { + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <400000000>; + remote-endpoint = <&csi_in>; + }; + }; + }; + + i2c-atr { + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + serializer@40 { + compatible = "maxim,max96717"; + reg = <0x40>; + gpio-controller; + #gpio-cells = <2>; + #clock-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ser_0_csi_in: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&sensor_0_out>; + }; + }; + + port@1 { + reg = <1>; + ser_0_gmsl_out: endpoint { + remote-endpoint = <&des_gmsl_in_0>; + }; + }; + }; + }; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + serializer@40 { + compatible = "maxim,max96717"; + reg = <0x40>; + gpio-controller; + #gpio-cells = <2>; + #clock-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ser_1_csi_in: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&sensor_1_out>; + }; + }; + + port@1 { + reg = <1>; + ser_1_gmsl_out: endpoint { + remote-endpoint = <&des_gmsl_in_1>; + }; + }; + }; + }; + }; + }; + }; + }; +...
MAINTAINERS +6 -0
@@ -14220,6 +14220,12 @@ S: Maintained F: Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml F: drivers/iio/proximity/mb1232.c +MAXIM GMSL2 SERIALIZERS AND DESERIALIZERS +M: Cosmin Tanislav <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml + MAXIM MAX11205 DRIVER M: Ramona Bolboaca <[email protected]> L: [email protected]
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [RFC PATCH v2 11/16] dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A
Quoted 28 lines · Cosmin Tanislav
The MAX9296A deserializer converts single or dual serial inputs to MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps or 6Gbps in the forward direction and 187.5Mbps in the reverse direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 serializers with GMSL1 backward compatibility. The MAX9296A supports mixed GMSL2 and GMSL1 links. The serial inputs operate independently, allowing videos with different timings and resolutions to be received on each input.
MAX96716A supports both tunnel and pixel mode.
MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links.Signed-off-by Cosmin Tanislav <[email protected]>--- .../bindings/media/i2c/maxim,max9296a.yaml | 281 ++++++++++++++++++ MAINTAINERS | 6 + 2 files changed, 287 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yamlDocumentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +3
-0@@ -0,0 +1,281 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2024 Collabora Ltd. +%YAML 1.2
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml line 13
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +10
-0+--- +$id: http://devicetree.org/schemas/media/i2c/maxim,max9296a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX9296A GMSL2 to CSI-2 Deserializer + +maintainers: + - Cosmin Tanislav <[email protected]> + +description:
Needs '>' token as you have paragraphs.
Quoted 71 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +71
-0+ The MAX9296A deserializer converts single or dual serial inputs to + MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps + or 6Gbps in the forward direction and 187.5Mbps in the reverse + direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps + or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 + serializers with GMSL1 backward compatibility. The MAX9296A supports + mixed GMSL2 and GMSL1 links. The serial inputs operate independently, + allowing videos with different timings and resolutions to be received + on each input. + + MAX96716A supports both tunnel and pixel mode. + MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. + +properties: + compatible: + enum: + - maxim,max9296a + - maxim,max96716a + - maxim,max96792a + + reg: + maxItems: 1 + + powerdown-gpios: + maxItems: 1 + description: Specifier for the GPIO connected to the PWDNB pin. + + port0-poc-supply: + description: Regulator providing Power over Coax for GMSL port 0 + + port1-poc-supply: + description: Regulator providing Power over Coax for GMSL port 1 + + i2c-mux: + $ref: /schemas/i2c/i2c-mux.yaml# + unevaluatedProperties: false + patternProperties: + '^i2c@[0-1]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + + i2c-alias-pool: + maxItems: 2 + + i2c-atr: + type: object + additionalProperties: false + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + '^i2c@[0-1]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + + ports:
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +10
-0+ $ref: /schemas/graph.yaml#/properties/ports + + patternProperties: + '^port@[0-1]$': + $ref: /schemas/graph.yaml#/properties/port + unevaluatedProperties: false + description: GMSL Input + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml#
What properties are you using from here?
None actually because /schemas/graph.yaml#/properties/port won't allow any.
Quoted 207 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +187
-0+ unevaluatedProperties: false + description: Endpoint for GMSL2-Link port. + + '^port@[2-3]$': + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI-2 Output port + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + lane-polarities: + minItems: 1 + maxItems: 5 + + link-frequencies: + maxItems: 1 + + required: + - data-lanes + + anyOf: + - required: + - port@2 + - required: + - port@3 + +required: + - compatible + - reg + - ports + +additionalProperties: false + +allOf: + - $ref: /schemas/i2c/i2c-atr.yaml# + + - if: + properties: + compatible: + contains: + enum: + - maxim,max9296a + - maxim,max96792a + then: + not: + required: [i2c-mux] + + - if: + properties: + compatible: + contains: + enum: + - maxim,max96716a + then: + not: + required: [i2c-atr] + +dependentRequired: + i2c-atr: [i2c-alias-pool] + i2c-alias-pool: [i2c-atr] + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/media/video-interfaces.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + deserializer@28 { + compatible = "maxim,max9296a"; + reg = <0x28>; + powerdown-gpios = <&main_gpio0 37 GPIO_ACTIVE_LOW>; + + i2c-alias-pool = <0x40 0x41>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + des_gmsl_in_0: endpoint { + remote-endpoint = <&ser_0_gmsl_out>; + }; + }; + + port@1 { + reg = <1>; + des_gmsl_in_1: endpoint { + remote-endpoint = <&ser_1_gmsl_out>; + }; + }; + + port@2 { + reg = <2>; + des_csi_out: endpoint { + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <400000000>; + remote-endpoint = <&csi_in>; + }; + }; + }; + + i2c-atr { + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + serializer@40 { + compatible = "maxim,max96717"; + reg = <0x40>; + gpio-controller; + #gpio-cells = <2>; + #clock-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ser_0_csi_in: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&sensor_0_out>; + }; + }; + + port@1 { + reg = <1>; + ser_0_gmsl_out: endpoint { + remote-endpoint = <&des_gmsl_in_0>; + }; + }; + }; + }; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + serializer@40 { + compatible = "maxim,max96717"; + reg = <0x40>; + gpio-controller; + #gpio-cells = <2>; + #clock-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ser_1_csi_in: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&sensor_1_out>; + }; + }; + + port@1 { + reg = <1>; + ser_1_gmsl_out: endpoint { + remote-endpoint = <&des_gmsl_in_1>; + }; + }; + }; + }; + }; + }; + }; + }; +...MAINTAINERS +6
-0@@ -14220,6 +14220,12 @@ S: Maintained F: Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml F: drivers/iio/proximity/mb1232.c +MAXIM GMSL2 SERIALIZERS AND DESERIALIZERS +M: Cosmin Tanislav <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml + MAXIM MAX11205 DRIVER M: Ramona Bolboaca <[email protected]> L: [email protected]Signature · 1 line
2.48.1
Re: [RFC PATCH v2 11/16] dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A
Quoted 126 lines · Rob Herring
Quoted 28 lines · Cosmin Tanislav
The MAX9296A deserializer converts single or dual serial inputs to MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps or 6Gbps in the forward direction and 187.5Mbps in the reverse direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 serializers with GMSL1 backward compatibility. The MAX9296A supports mixed GMSL2 and GMSL1 links. The serial inputs operate independently, allowing videos with different timings and resolutions to be received on each input.
MAX96716A supports both tunnel and pixel mode.
MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links.Signed-off-by Cosmin Tanislav <[email protected]>--- .../bindings/media/i2c/maxim,max9296a.yaml | 281 ++++++++++++++++++ MAINTAINERS | 6 + 2 files changed, 287 insertions(+)create mode 100644
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yamlDocumentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +3
-0@@ -0,0 +1,281 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2024 Collabora Ltd. +%YAML 1.2Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml line 13
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +10
-0+--- +$id: http://devicetree.org/schemas/media/i2c/maxim,max9296a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX9296A GMSL2 to CSI-2 Deserializer + +maintainers: + - Cosmin Tanislav <[email protected]> + +description:Needs '>' token as you have paragraphs.
Quoted 71 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +71
-0+ The MAX9296A deserializer converts single or dual serial inputs to + MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps + or 6Gbps in the forward direction and 187.5Mbps in the reverse + direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps + or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 + serializers with GMSL1 backward compatibility. The MAX9296A supports + mixed GMSL2 and GMSL1 links. The serial inputs operate independently, + allowing videos with different timings and resolutions to be received + on each input. + + MAX96716A supports both tunnel and pixel mode. + MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. + +properties: + compatible: + enum: + - maxim,max9296a + - maxim,max96716a + - maxim,max96792a + + reg: + maxItems: 1 + + powerdown-gpios: + maxItems: 1 + description: Specifier for the GPIO connected to the PWDNB pin. + + port0-poc-supply: + description: Regulator providing Power over Coax for GMSL port 0 + + port1-poc-supply: + description: Regulator providing Power over Coax for GMSL port 1 + + i2c-mux: + $ref: /schemas/i2c/i2c-mux.yaml# + unevaluatedProperties: false + patternProperties: + '^i2c@[0-1]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + + i2c-alias-pool: + maxItems: 2 + + i2c-atr: + type: object + additionalProperties: false + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + '^i2c@[0-1]$': + $ref: /schemas/i2c/i2c-controller.yaml# + unevaluatedProperties: false + properties: + reg: + items: + minimum: 0 + maximum: 1 + + ports:Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +10
-0+ $ref: /schemas/graph.yaml#/properties/ports + + patternProperties: + '^port@[0-1]$': + $ref: /schemas/graph.yaml#/properties/port + unevaluatedProperties: false + description: GMSL Input + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml#What properties are you using from here?
Quoted 3 lines
None actually because /schemas/graph.yaml#/properties/port won't allow any.
So these lines should be removed.
unevaluatedProperties: false properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false description:
Endpoint for GMSL2-Link port.
Should I submit patches to do the same for the maxim,max96714.yaml file?
I basically copied these bindings from there and adapted them, and those bindings seem to have the same issue.
Quoted 208 lines
Quoted 208 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml new file +187
-0+ unevaluatedProperties: false + description: Endpoint for GMSL2-Link port. + + '^port@[2-3]$': + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI-2 Output port + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + lane-polarities: + minItems: 1 + maxItems: 5 + + link-frequencies: + maxItems: 1 + + required: + - data-lanes + + anyOf: + - required: + - port@2 + - required: + - port@3 + +required: + - compatible + - reg + - ports + +additionalProperties: false + +allOf: + - $ref: /schemas/i2c/i2c-atr.yaml# + + - if: + properties: + compatible: + contains: + enum: + - maxim,max9296a + - maxim,max96792a + then: + not: + required: [i2c-mux] + + - if: + properties: + compatible: + contains: + enum: + - maxim,max96716a + then: + not: + required: [i2c-atr] + +dependentRequired: + i2c-atr: [i2c-alias-pool] + i2c-alias-pool: [i2c-atr] + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/media/video-interfaces.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + deserializer@28 { + compatible = "maxim,max9296a"; + reg = <0x28>; + powerdown-gpios = <&main_gpio0 37 GPIO_ACTIVE_LOW>; + + i2c-alias-pool = <0x40 0x41>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + des_gmsl_in_0: endpoint { + remote-endpoint = <&ser_0_gmsl_out>; + }; + }; + + port@1 { + reg = <1>; + des_gmsl_in_1: endpoint { + remote-endpoint = <&ser_1_gmsl_out>; + }; + }; + + port@2 { + reg = <2>; + des_csi_out: endpoint { + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <400000000>; + remote-endpoint = <&csi_in>; + }; + }; + }; + + i2c-atr { + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + serializer@40 { + compatible = "maxim,max96717"; + reg = <0x40>; + gpio-controller; + #gpio-cells = <2>; + #clock-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ser_0_csi_in: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&sensor_0_out>; + }; + }; + + port@1 { + reg = <1>; + ser_0_gmsl_out: endpoint { + remote-endpoint = <&des_gmsl_in_0>; + }; + }; + }; + }; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + serializer@40 { + compatible = "maxim,max96717"; + reg = <0x40>; + gpio-controller; + #gpio-cells = <2>; + #clock-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ser_1_csi_in: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&sensor_1_out>; + }; + }; + + port@1 { + reg = <1>; + ser_1_gmsl_out: endpoint { + remote-endpoint = <&des_gmsl_in_1>; + }; + }; + }; + }; + }; + }; + }; + }; +...MAINTAINERS +6
-0@@ -14220,6 +14220,12 @@ S: Maintained F: Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml F: drivers/iio/proximity/mb1232.c +MAXIM GMSL2 SERIALIZERS AND DESERIALIZERS +M: Cosmin Tanislav <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml + MAXIM MAX11205 DRIVER M: Ramona Bolboaca <[email protected]> L: [email protected]Signature · 1 line
2.48.1
RFC PATCH v2 12/16 media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
In reply to Cosmin TanislavAdd drivers for some of the broad-market Maxim GMSL2 / GMSL3 serializers and deserializers.
These drivers are meant to replace the existing MAX96712 / MAX96714 / MAX96717 drivers, while integrating them in a common framework, keeping compatibility with existing usecases, and avoiding code duplication, while also enabling more features across the whole range.
These drivers also add support for the following new chips:
* MAX96716 (GMSL2)
* MAX9296A (GMSL2)
* MAX96792A (GMSL3)
* MAX9295A (GMSL2)
* MAX96793 (GMSL3)
These drivers enable support for the following new features:
* Full Streams API support
* .get_frame_desc()
* .get_mbus_config()
* I2C ATR, I2C MUX
* automatic VC remapping
* automatic pixel mode / tunnel mode selection
* automatic double mode selection
* logging of internal state and chip status registers via .log_status()
* PHY modes
* serializer pinctrl
--- MAINTAINERS | 1 + drivers/media/i2c/Kconfig | 2 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/maxim-serdes/Kconfig | 53 + drivers/media/i2c/maxim-serdes/Makefile | 6 + drivers/media/i2c/maxim-serdes/max9296a.c | 1146 +++++++++ drivers/media/i2c/maxim-serdes/max96717.c | 1501 ++++++++++++ drivers/media/i2c/maxim-serdes/max96724.c | 905 ++++++++ drivers/media/i2c/maxim-serdes/max_des.c | 2321 +++++++++++++++++++ drivers/media/i2c/maxim-serdes/max_des.h | 135 ++ drivers/media/i2c/maxim-serdes/max_ser.c | 1584 +++++++++++++ drivers/media/i2c/maxim-serdes/max_ser.h | 132 ++ drivers/media/i2c/maxim-serdes/max_serdes.c | 302 +++ drivers/media/i2c/maxim-serdes/max_serdes.h | 88 + 14 files changed, 8177 insertions(+) create mode 100644 drivers/media/i2c/maxim-serdes/Kconfig create mode 100644 drivers/media/i2c/maxim-serdes/Makefile create mode 100644 drivers/media/i2c/maxim-serdes/max9296a.c create mode 100644 drivers/media/i2c/maxim-serdes/max96717.c create mode 100644 drivers/media/i2c/maxim-serdes/max96724.c create mode 100644 drivers/media/i2c/maxim-serdes/max_des.c create mode 100644 drivers/media/i2c/maxim-serdes/max_des.h create mode 100644 drivers/media/i2c/maxim-serdes/max_ser.c create mode 100644 drivers/media/i2c/maxim-serdes/max_ser.h create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.c create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.h
MAINTAINERS +1 -0
@@ -14225,6 +14225,7 @@ M: Cosmin Tanislav <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml +F: drivers/media/i2c/maxim-serdes/ MAXIM MAX11205 DRIVER M: Ramona Bolboaca <[email protected]>
drivers/media/i2c/Kconfig +2 -0
@@ -1653,6 +1653,8 @@ config VIDEO_MAX96717 To compile this driver as a module, choose M here: the module will be called max96717. +source "drivers/media/i2c/maxim-serdes/Kconfig" + endmenu endif # VIDEO_DEV
drivers/media/i2c/Makefile +1 -0
@@ -70,6 +70,7 @@ obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o obj-$(CONFIG_VIDEO_MAX9286) += max9286.o obj-$(CONFIG_VIDEO_MAX96714) += max96714.o obj-$(CONFIG_VIDEO_MAX96717) += max96717.o +obj-$(CONFIG_VIDEO_MAXIM_SERDES) += maxim-serdes/ obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o obj-$(CONFIG_VIDEO_MT9M001) += mt9m001.o
drivers/media/i2c/maxim-serdes/Kconfig new file +53 -0
53 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 +max-serdes-objs := max_serdes.o max_ser.o max_des.o +obj-$(CONFIG_VIDEO_MAXIM_SERDES) += max-serdes.o +obj-$(CONFIG_VIDEO_MAX96717) += max96717.o +obj-$(CONFIG_VIDEO_MAX96724) += max96724.o +obj-$(CONFIG_VIDEO_MAX9296A) += max9296a.o
drivers/media/i2c/maxim-serdes/max9296a.c new file +1146 -0
1,146 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max96717.c new file +1501 -0
1,501 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max96724.c new file +905 -0
272 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max_des.c new file +2321 -0
2,321 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max_des.h new file +135 -0
135 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max_ser.c new file +1584 -0
1,584 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max_ser.h new file +132 -0
132 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max_serdes.c new file +302 -0
302 lines not on this page · raw message
drivers/media/i2c/maxim-serdes/max_serdes.h new file +88 -0
88 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.48.1
Part of the diff is not shown here. View the raw message.
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Cosmin,
[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on staging/staging-testing staging/staging-next staging/staging-linus arm64/for-next/core linus/master v6.14-rc5 next-20250307] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Cosmin-Tanislav/dt-bindings-media-i2c-max96717-add-myself-as-maintainer/20250309-165419 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next patch link: https://lore.kernel.org/r/20250309084814.3114794-13-demonsingur%40gmail.com patch subject: [RFC PATCH v2 12/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers config: x86_64-buildonly-randconfig-001-20250310 (https://download.01.org/0day-ci/archive/20250310/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All error/warnings (new ones prefixed by >>):
drivers/media/i2c/maxim-serdes/max96717.c: In function 'max96717_mux_set_rclkout':
>> drivers/media/i2c/maxim-serdes/max96717.c:663:34: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
663 | FIELD_PREP(MAX96717_REF_VTG1_PCLK_GPIO, group));
| ^~~~~~~~~~
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/maxim-serdes/max_ser.c:218:10: error: 'const struct i2c_atr_ops' has no member named 'attach_addr'
218 | .attach_addr = max_ser_i2c_atr_attach_addr,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:218:24: error: initialization of 'int (*)(struct i2c_atr *, u32, const struct i2c_client *, u16)' {aka 'int (*)(struct i2c_atr *, unsigned int, const struct i2c_client *, short unsigned int)'} from incompatible pointer type 'int (*)(struct i2c_atr *, u32, u16, u16)' {aka 'int (*)(struct i2c_atr *, unsigned int, short unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
218 | .attach_addr = max_ser_i2c_atr_attach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:218:24: note: (near initialization for 'max_ser_i2c_atr_ops.attach_client')
>> drivers/media/i2c/maxim-serdes/max_ser.c:219:10: error: 'const struct i2c_atr_ops' has no member named 'detach_addr'
219 | .detach_addr = max_ser_i2c_atr_detach_addr,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:219:24: error: initialization of 'void (*)(struct i2c_atr *, u32, const struct i2c_client *)' {aka 'void (*)(struct i2c_atr *, unsigned int, const struct i2c_client *)'} from incompatible pointer type 'void (*)(struct i2c_atr *, u32, u16)' {aka 'void (*)(struct i2c_atr *, unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
219 | .detach_addr = max_ser_i2c_atr_detach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:219:24: note: (near initialization for 'max_ser_i2c_atr_ops.detach_client')
drivers/media/i2c/maxim-serdes/max_ser.c: In function 'max_ser_i2c_atr_init':
>> drivers/media/i2c/maxim-serdes/max_ser.c:232:16: error: variable 'desc' has initializer but incomplete type
232 | struct i2c_atr_adap_desc desc = {
| ^~~~~~~~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:233:18: error: 'struct i2c_atr_adap_desc' has no member named 'chan_id'
233 | .chan_id = 0,
| ^~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:233:28: warning: excess elements in struct initializer
233 | .chan_id = 0,
| ^
drivers/media/i2c/maxim-serdes/max_ser.c:233:28: note: (near initialization for 'desc')
>> drivers/media/i2c/maxim-serdes/max_ser.c:232:34: error: storage size of 'desc' isn't known
232 | struct i2c_atr_adap_desc desc = {
| ^~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:240:21: error: too many arguments to function 'i2c_atr_new'
240 | priv->atr = i2c_atr_new(priv->client->adapter, priv->dev,
| ^~~~~~~~~~~
In file included from drivers/media/i2c/maxim-serdes/max_ser.c:9:
include/linux/i2c-atr.h:53:17: note: declared here
53 | struct i2c_atr *i2c_atr_new(struct i2c_adapter *parent, struct device *dev,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:247:16: error: too few arguments to function 'i2c_atr_add_adapter'
247 | return i2c_atr_add_adapter(priv->atr, &desc);
| ^~~~~~~~~~~~~~~~~~~
include/linux/i2c-atr.h:88:5: note: declared here
88 | int i2c_atr_add_adapter(struct i2c_atr *atr, u32 chan_id,
| ^~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:232:34: warning: unused variable 'desc' [-Wunused-variable]
232 | struct i2c_atr_adap_desc desc = {
| ^~~~
drivers/media/i2c/maxim-serdes/max_ser.c: In function 'max_ser_change_address':
>> drivers/media/i2c/maxim-serdes/max_ser.c:1577:16: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
1577 | val |= FIELD_PREP(MAX_SER_REG0_DEV_ADDR, new_addr);
| ^~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c: In function 'max_ser_i2c_atr_init':
>> drivers/media/i2c/maxim-serdes/max_ser.c:248:1: warning: control reaches end of non-void function [-Wreturn-type]
248 | }
| ^
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/maxim-serdes/max_des.c:991:10: error: 'const struct i2c_atr_ops' has no member named 'attach_addr'
991 | .attach_addr = max_des_ser_atr_attach_addr,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:991:24: error: initialization of 'int (*)(struct i2c_atr *, u32, const struct i2c_client *, u16)' {aka 'int (*)(struct i2c_atr *, unsigned int, const struct i2c_client *, short unsigned int)'} from incompatible pointer type 'int (*)(struct i2c_atr *, u32, u16, u16)' {aka 'int (*)(struct i2c_atr *, unsigned int, short unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
991 | .attach_addr = max_des_ser_atr_attach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:991:24: note: (near initialization for 'max_des_i2c_atr_ops.attach_client')
>> drivers/media/i2c/maxim-serdes/max_des.c:992:10: error: 'const struct i2c_atr_ops' has no member named 'detach_addr'
992 | .detach_addr = max_des_ser_atr_detach_addr,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:992:24: error: initialization of 'void (*)(struct i2c_atr *, u32, const struct i2c_client *)' {aka 'void (*)(struct i2c_atr *, unsigned int, const struct i2c_client *)'} from incompatible pointer type 'void (*)(struct i2c_atr *, u32, u16)' {aka 'void (*)(struct i2c_atr *, unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
992 | .detach_addr = max_des_ser_atr_detach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:992:24: note: (near initialization for 'max_des_i2c_atr_ops.detach_client')
drivers/media/i2c/maxim-serdes/max_des.c: In function 'max_des_i2c_atr_init':
>> drivers/media/i2c/maxim-serdes/max_des.c:1023:33: error: 'I2C_ATR_F_STATIC' undeclared (first use in this function)
1023 | I2C_ATR_F_STATIC | I2C_ATR_F_PASSTHROUGH);
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1023:33: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/media/i2c/maxim-serdes/max_des.c:1023:52: error: 'I2C_ATR_F_PASSTHROUGH' undeclared (first use in this function)
1023 | I2C_ATR_F_STATIC | I2C_ATR_F_PASSTHROUGH);
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:1021:21: error: too many arguments to function 'i2c_atr_new'
1021 | priv->atr = i2c_atr_new(priv->client->adapter, priv->dev,
| ^~~~~~~~~~~
In file included from drivers/media/i2c/maxim-serdes/max_des.c:9:
include/linux/i2c-atr.h:53:17: note: declared here
53 | struct i2c_atr *i2c_atr_new(struct i2c_adapter *parent, struct device *dev,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:1031:24: error: variable 'desc' has initializer but incomplete type
1031 | struct i2c_atr_adap_desc desc = {
| ^~~~~~~~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:1032:26: error: 'struct i2c_atr_adap_desc' has no member named 'chan_id'
1032 | .chan_id = i,
| ^~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:1032:36: warning: excess elements in struct initializer
1032 | .chan_id = i,
| ^
drivers/media/i2c/maxim-serdes/max_des.c:1032:36: note: (near initialization for 'desc')
>> drivers/media/i2c/maxim-serdes/max_des.c:1031:42: error: storage size of 'desc' isn't known
1031 | struct i2c_atr_adap_desc desc = {
| ^~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:1038:23: error: too few arguments to function 'i2c_atr_add_adapter'
1038 | ret = i2c_atr_add_adapter(priv->atr, &desc);
| ^~~~~~~~~~~~~~~~~~~
include/linux/i2c-atr.h:88:5: note: declared here
88 | int i2c_atr_add_adapter(struct i2c_atr *atr, u32 chan_id,
| ^~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:1031:42: warning: unused variable 'desc' [-Wunused-variable]
1031 | struct i2c_atr_adap_desc desc = {
| ^~~~
drivers/media/i2c/maxim-serdes/max_des.c: In function 'max_des_get_mbus_config':
>> drivers/media/i2c/maxim-serdes/max_des.c:1367:12: error: 'struct v4l2_mbus_config' has no member named 'link_freq'
1367 | cfg->link_freq = phy->link_frequency;
| ^~cc1: some warnings being treated as errors
vim +/FIELD_PREP +663 drivers/media/i2c/maxim-serdes/max96717.c
649
650 static int max96717_mux_set_rclkout(struct max96717_priv *priv, unsigned int group)
651 {
652 int ret;
653
654 /* Enable PCLK output. */
655 ret = regmap_set_bits(priv->regmap, MAX96717_REF_VTG1,
656 MAX96717_REF_VTG1_PCLKEN);
657 if (ret)
658 return ret;
659
660 /* Set PCLK output to the RCLK pin. */
661 ret = regmap_update_bits(priv->regmap, MAX96717_REF_VTG1,
662 MAX96717_REF_VTG1_PCLK_GPIO,
> 663 FIELD_PREP(MAX96717_REF_VTG1_PCLK_GPIO, group));
664 if (ret)
665 return ret;
666
667 /* Enable RCLK output on PCLK. */
668 ret = regmap_set_bits(priv->regmap, MAX96717_REF_VTG1,
669 MAX96717_REF_VTG1_RCLKEN_Y);
670 if (ret)
671 return ret;
672
673 return 0;
674 }
675
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Cosmin,
[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on staging/staging-testing staging/staging-next staging/staging-linus arm64/for-next/core linus/master v6.14-rc5 next-20250307] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Cosmin-Tanislav/dt-bindings-media-i2c-max96717-add-myself-as-maintainer/20250309-165419 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next patch link: https://lore.kernel.org/r/20250309084814.3114794-13-demonsingur%40gmail.com patch subject: [RFC PATCH v2 12/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers config: x86_64-buildonly-randconfig-006-20250310 (https://download.01.org/0day-ci/archive/20250310/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/media/i2c/maxim-serdes/max_des.c:991:10: error: 'const struct i2c_atr_ops' has no member named 'attach_addr'
991 | .attach_addr = max_des_ser_atr_attach_addr,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_des.c:991:24: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
991 | .attach_addr = max_des_ser_atr_attach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:991:24: note: (near initialization for 'max_des_i2c_atr_ops')
>> drivers/media/i2c/maxim-serdes/max_des.c:991:24: error: invalid initializer
drivers/media/i2c/maxim-serdes/max_des.c:991:24: note: (near initialization for 'max_des_i2c_atr_ops.<anonymous>')
drivers/media/i2c/maxim-serdes/max_des.c:992:10: error: 'const struct i2c_atr_ops' has no member named 'detach_addr'
992 | .detach_addr = max_des_ser_atr_detach_addr,
| ^~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:992:24: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
992 | .detach_addr = max_des_ser_atr_detach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:992:24: note: (near initialization for 'max_des_i2c_atr_ops')
drivers/media/i2c/maxim-serdes/max_des.c:992:24: error: initialization of 'int (*)(struct i2c_atr *, u32, const struct i2c_client *, u16)' {aka 'int (*)(struct i2c_atr *, unsigned int, const struct i2c_client *, short unsigned int)'} from incompatible pointer type 'void (*)(struct i2c_atr *, u32, u16)' {aka 'void (*)(struct i2c_atr *, unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
drivers/media/i2c/maxim-serdes/max_des.c:992:24: note: (near initialization for 'max_des_i2c_atr_ops.attach_client')
drivers/media/i2c/maxim-serdes/max_des.c: In function 'max_des_i2c_atr_init':
drivers/media/i2c/maxim-serdes/max_des.c:1023:33: error: 'I2C_ATR_F_STATIC' undeclared (first use in this function)
1023 | I2C_ATR_F_STATIC | I2C_ATR_F_PASSTHROUGH);
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1023:33: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/i2c/maxim-serdes/max_des.c:1023:52: error: 'I2C_ATR_F_PASSTHROUGH' undeclared (first use in this function)
1023 | I2C_ATR_F_STATIC | I2C_ATR_F_PASSTHROUGH);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1021:21: error: too many arguments to function 'i2c_atr_new'
1021 | priv->atr = i2c_atr_new(priv->client->adapter, priv->dev,
| ^~~~~~~~~~~
In file included from drivers/media/i2c/maxim-serdes/max_des.c:9:
include/linux/i2c-atr.h:53:17: note: declared here
53 | struct i2c_atr *i2c_atr_new(struct i2c_adapter *parent, struct device *dev,
| ^~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1031:24: error: variable 'desc' has initializer but incomplete type
1031 | struct i2c_atr_adap_desc desc = {
| ^~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1032:26: error: 'struct i2c_atr_adap_desc' has no member named 'chan_id'
1032 | .chan_id = i,
| ^~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1032:36: warning: excess elements in struct initializer
1032 | .chan_id = i,
| ^
drivers/media/i2c/maxim-serdes/max_des.c:1032:36: note: (near initialization for 'desc')
drivers/media/i2c/maxim-serdes/max_des.c:1031:42: error: storage size of 'desc' isn't known
1031 | struct i2c_atr_adap_desc desc = {
| ^~~~
drivers/media/i2c/maxim-serdes/max_des.c:1038:23: error: too few arguments to function 'i2c_atr_add_adapter'
1038 | ret = i2c_atr_add_adapter(priv->atr, &desc);
| ^~~~~~~~~~~~~~~~~~~
include/linux/i2c-atr.h:88:5: note: declared here
88 | int i2c_atr_add_adapter(struct i2c_atr *atr, u32 chan_id,
| ^~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_des.c:1031:42: warning: unused variable 'desc' [-Wunused-variable]
1031 | struct i2c_atr_adap_desc desc = {
| ^~~~
drivers/media/i2c/maxim-serdes/max_des.c: In function 'max_des_get_mbus_config':
drivers/media/i2c/maxim-serdes/max_des.c:1367:12: error: 'struct v4l2_mbus_config' has no member named 'link_freq'
1367 | cfg->link_freq = phy->link_frequency;
| ^~ cc1: some warnings being treated as errors
--
drivers/media/i2c/maxim-serdes/max_ser.c:218:10: error: 'const struct i2c_atr_ops' has no member named 'attach_addr'
218 | .attach_addr = max_ser_i2c_atr_attach_addr,
| ^~~~~~~~~~~
>> drivers/media/i2c/maxim-serdes/max_ser.c:218:24: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
218 | .attach_addr = max_ser_i2c_atr_attach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:218:24: note: (near initialization for 'max_ser_i2c_atr_ops')
>> drivers/media/i2c/maxim-serdes/max_ser.c:218:24: error: invalid initializer
drivers/media/i2c/maxim-serdes/max_ser.c:218:24: note: (near initialization for 'max_ser_i2c_atr_ops.<anonymous>')
drivers/media/i2c/maxim-serdes/max_ser.c:219:10: error: 'const struct i2c_atr_ops' has no member named 'detach_addr'
219 | .detach_addr = max_ser_i2c_atr_detach_addr,
| ^~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:219:24: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
219 | .detach_addr = max_ser_i2c_atr_detach_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:219:24: note: (near initialization for 'max_ser_i2c_atr_ops')
drivers/media/i2c/maxim-serdes/max_ser.c:219:24: error: initialization of 'int (*)(struct i2c_atr *, u32, const struct i2c_client *, u16)' {aka 'int (*)(struct i2c_atr *, unsigned int, const struct i2c_client *, short unsigned int)'} from incompatible pointer type 'void (*)(struct i2c_atr *, u32, u16)' {aka 'void (*)(struct i2c_atr *, unsigned int, short unsigned int)'} [-Werror=incompatible-pointer-types]
drivers/media/i2c/maxim-serdes/max_ser.c:219:24: note: (near initialization for 'max_ser_i2c_atr_ops.attach_client')
drivers/media/i2c/maxim-serdes/max_ser.c: In function 'max_ser_i2c_atr_init':
drivers/media/i2c/maxim-serdes/max_ser.c:232:16: error: variable 'desc' has initializer but incomplete type
232 | struct i2c_atr_adap_desc desc = {
| ^~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:233:18: error: 'struct i2c_atr_adap_desc' has no member named 'chan_id'
233 | .chan_id = 0,
| ^~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:233:28: warning: excess elements in struct initializer
233 | .chan_id = 0,
| ^
drivers/media/i2c/maxim-serdes/max_ser.c:233:28: note: (near initialization for 'desc')
drivers/media/i2c/maxim-serdes/max_ser.c:232:34: error: storage size of 'desc' isn't known
232 | struct i2c_atr_adap_desc desc = {
| ^~~~
drivers/media/i2c/maxim-serdes/max_ser.c:240:21: error: too many arguments to function 'i2c_atr_new'
240 | priv->atr = i2c_atr_new(priv->client->adapter, priv->dev,
| ^~~~~~~~~~~
In file included from drivers/media/i2c/maxim-serdes/max_ser.c:9:
include/linux/i2c-atr.h:53:17: note: declared here
53 | struct i2c_atr *i2c_atr_new(struct i2c_adapter *parent, struct device *dev,
| ^~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:247:16: error: too few arguments to function 'i2c_atr_add_adapter'
247 | return i2c_atr_add_adapter(priv->atr, &desc);
| ^~~~~~~~~~~~~~~~~~~
include/linux/i2c-atr.h:88:5: note: declared here
88 | int i2c_atr_add_adapter(struct i2c_atr *atr, u32 chan_id,
| ^~~~~~~~~~~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c:232:34: warning: unused variable 'desc' [-Wunused-variable]
232 | struct i2c_atr_adap_desc desc = {
| ^~~~
drivers/media/i2c/maxim-serdes/max_ser.c: In function 'max_ser_change_address':
drivers/media/i2c/maxim-serdes/max_ser.c:1577:16: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
1577 | val |= FIELD_PREP(MAX_SER_REG0_DEV_ADDR, new_addr);
| ^~~~~~~~~~
drivers/media/i2c/maxim-serdes/max_ser.c: In function 'max_ser_i2c_atr_init':
drivers/media/i2c/maxim-serdes/max_ser.c:248:1: warning: control reaches end of non-void function [-Wreturn-type]
248 | }
| ^cc1: some warnings being treated as errors
vim +991 drivers/media/i2c/maxim-serdes/max_des.c
989
990 static const struct i2c_atr_ops max_des_i2c_atr_ops = {
> 991 .attach_addr = max_des_ser_atr_attach_addr,
992 .detach_addr = max_des_ser_atr_detach_addr,
993 };
994
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Hi Cosmin
Awesome work. The initiative to establish a common framework for GMSL devices is a great idea.
I believe that we have found few bugs:
Quoted 1 line
+#define
MAX9296A_BACKTOP22(x)(0x31d* (x) *0x3)
The first multiplication is wrong and should be replaced with addition:
+#define MAX9296A_BACKTOP22(x) (0x31d + (x) * 0x3)
The same goes for MAX96724 equivalent macro:
Quoted 1 line
+#define
MAX96724_BACKTOP22(x)(0x415* (x) *0x3)
In MAX96714 driver there is an issue with setting up lane-polarities.
Quoted 8 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +8
-0+static const struct max9296a_chip_info max96714_info = { + .max_register =0x5011 , + .set_pipe_stream_id = max96714_set_pipe_stream_id, + .set_pipe_enable = max96714_set_pipe_enable, + .set_pipe_tunnel_enable = max96714_set_pipe_tunnel_enable, + .phys_configs = { + .num_configs =ARRAY_SIZE (max96714_phys_configs), + .configs = max96714_phys_configs,
drivers/media/i2c/maxim-serdes/max9296a.c line 1074
Quoted 10 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +10
-0+ }, + .polarity_on_physical_lanes = true, + .supports_phy_log = true, + .adjust_rlms = true, + .num_pipes = 1, + .pipe_hw_ids = { 1 }, + .num_phys = 1, + .phy_hw_ids = { 1 }, + .num_links = 1, +};
In order to make thing work we had to set
drivers/media/i2c/maxim-serdes/max9296a.c line 1066
Quoted 1 line
drivers/media/i2c/maxim-serdes/max9296a.c new file +1
-0+ .polarity_on_physical_lanes = true,
To false. So this field is either improperly set for MAX96714, or handling of this case is wrong:
drivers/media/i2c/maxim-serdes/max9296a.c line 483
Quoted 4 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +4
-0+if (priv->info->polarity_on_physical_lanes) + map = phy->mipi.data_lanes[i]; +else + map = i;
Upon mentioned changes we have successfully tested two GMSL2 combinations on Raspberry 5 platform:
1. MAX96724 + MAX96717 (only 2 MIPI-CSI2 lanes with single camera due to hardware limitations)
2. MAX96714 + MAX96717
We have also been wondering about these registers:
Review
Quoted 2 lines
(quoted diff) +2
-0+#define MAX9296A_DPLL_0(x) (0x1c00 + ((x) == 0 ? 1 : 2) * 0x100) +#define MAX96724_DPLL_0(x) (0x1c00 + (x) * 0x100)
There are writes to these addresses but we could not find any reference to these in either MAX96714 or MAX96724 datasheets.
Are You willing to add support for mapping MIPI-CSI2 lanes? This is a very convenient feature which comes in handy during HW design.
Quoted 4 lines · Jakub Kostiw
Hi Cosmin
Awesome work. The initiative to establish a common framework for GMSL devices is a great idea.
Hi! Thanks for the feedback.
Quoted 8 lines
I believe that we have found few bugs:
Quoted 1 line
+#define MAX9296A_BACKTOP22(x) (
0x31d* (x) *0x3)The first multiplication is wrong and should be replaced with addition:
+#define MAX9296A_BACKTOP22(x) (
0x31d+ (x) *0x3)
I'm aware of this issue and had it fixed locally, just haven't submitted a new version yet.
Quoted 4 lines
The same goes for MAX96724 equivalent macro:
Quoted 1 line
+#define MAX96724_BACKTOP22(x) (
0x415* (x) *0x3)
Although I haven't noticed that it applied to MAX96724 too, thanks.
Quoted 23 lines
In MAX96714 driver there is an issue with setting up lane-polarities.
Quoted 8 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +8
-0+static const struct max9296a_chip_info max96714_info = { + .max_register = 0x5011, + .set_pipe_stream_id = max96714_set_pipe_stream_id, + .set_pipe_enable = max96714_set_pipe_enable, + .set_pipe_tunnel_enable = max96714_set_pipe_tunnel_enable, + .phys_configs = { + .num_configs = ARRAY_SIZE(max96714_phys_configs), + .configs = max96714_phys_configs,drivers/media/i2c/maxim-serdes/max9296a.c line 1074
Quoted 10 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +10
-0+ }, + .polarity_on_physical_lanes = true, + .supports_phy_log = true, + .adjust_rlms = true, + .num_pipes = 1, + .pipe_hw_ids = { 1 }, + .num_phys = 1, + .phy_hw_ids = { 1 }, + .num_links = 1, +};In order to make thing work we had to set
Quoted 9 lines
Quoted 1 line
+ .polarity_on_physical_lanes = true,
To false. So this field is either improperly set for MAX96714, or handling of this case is wrong:
Quoted 4 lines
+ if (
priv->info->polarity_on_physical_lanes) + map = phy->mipi.data_lanes[i]; + else
+ map = i;
MAX96714 has different value meanings for the polarity register (compared to MAX9296A). On MAX96714, the bits represent the polarity of the hardware lane (not taking mapping into account). On MAX9296A, mapping is taken into account by hardware, so the polarity can be retrieved directly. See the comments surrounding that piece of code. It's entirely possible that I was wrong when writing this code, but this was cross-checked with the datasheet and the GMSL SerDes GUI. It's not out of the question that any of these could be wrong.
Are you setting a specific polarity on the lanes? I've validated MAX96714 (after the upstream submission) myself and it works.
Quoted 6 lines
Upon mentioned changes we have successfully tested two GMSL2 combinations on Raspberry 5 platform:
1. MAX96724 + MAX96717 (only 2 MIPI-CSI2 lanes with single camera due to hardware limitations)
2. MAX96714 + MAX96717
Quoted 8 lines
We have also been wondering about these registers:
Quoted 3 lines
+#define MAX9296A_DPLL_0(x) (
0x1c00+ ((x) == 0 ? 1 : 2) *0x100)
+#define MAX96724_DPLL_0(x) (0x1c00+ (x) *0x100)There are writes to these addresses but we could not find any reference to these in either MAX96714 or MAX96724 datasheets.
These registers are not mentioned in the datasheet of MAX96714 or MAX96724, as they're considered "hidden". You can look at MAX96716A datasheet for a description.
Quoted 2 lines
Are You willing to add support for mapping MIPI-CSI2 lanes? This is a very convenient feature which comes in handy during HW design.
This should already be implemented by using different numbers in data-lanes property in devicetree.
Quoted 2 lines
I'm aware of this issue and had it fixed locally, just haven't submitted a new version yet.
Great !
Quoted 2 lines
Are you setting a specific polarity on the lanes? I've validated MAX96714 (after the upstream submission) myself and it works.
Our design has all lanes inverted, so we used:
lane-polarities = <1 1 1>;
Only after mentioned change we managed to get the video stream.
Quoted 2 lines
This should already be implemented by using different numbers in data-lanes property in devicetree.
Awesome, this will come in handy for sure.
Quoted 11 lines · Jakub Kostiw
Quoted 2 lines
I'm aware of this issue and had it fixed locally, just haven't submitted a new version yet.
Great !
Quoted 2 lines
Are you setting a specific polarity on the lanes? I've validated MAX96714 (after the upstream submission) myself and it works.
Our design has all lanes inverted, so we used:
lane-polarities = <1 1 1>;
Got it.
Can you revert the change you made to polarity_on_physical_lanes, and try the following?
drivers/media/i2c/maxim-serdes/max9296a.c +1 -1
@@ -474,7 +474,7 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy)*/ if (priv->info->polarity_on_physical_lanes) - map = phy->mipi.data_lanes[i]; + map = phy->mipi.data_lanes[i] -1 ;else map = i;
data_lanes is 1-based (since 0 is the clock lane), but the bits in register 0x335 start from 0. That means we should adjust the values in data_lanes to be 0-based.
Quoted 7 lines
Only after mentioned change we managed to get the video stream.
Quoted 2 lines
This should already be implemented by using different numbers in data-lanes property in devicetree.
Awesome, this will come in handy for sure.
Quoted 17 lines
Can you revert the change you made to
polarity_on_physical_lanes, and try the following?drivers/media/i2c/maxim-serdes/max9296a.c +1
-1@@ -474,7 +474,7 @@ static int max9296a_init_phy(struct max_des *des,struct max_des_phy *phy) */ if (priv->info->polarity_on_physical_lanes) - map = phy->mipi.data_lanes[i]; + map = phy->mipi.data_lanes[i] - 1;else
map = i;
Quoted 3 lines
data_lanesis 1-based (since 0 is the clock lane), but the bits in register0x335start from 0. That means we should adjust the values indata_lanesto be 0-based.
I have applied your patch and polarity settings seems to be correct now (based on register contents).
However, I have came across another issue.
When I was debugging the driver for MAX96714, before I found out that the issue was with polarity settings, I have commented out calls to MAX9296A_DPLL_0. Probably because I thought it was there by mistake. I totally forgot about that change. Before applying your patch I reverted any changes to the driver, so MAX9296A_DPLL_0 writes were back again. Sadly, video stream did not work. So I began to wonder, and just for sake of testing, commented these calls again (added some logs for quick tracing purposes):
drivers/media/i2c/maxim-serdes/max9296a.c +0 -0
@@ -391,6 +391,8 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy)
* PHY1 Lane 1 = D3
*/
+ dev_info(priv->dev, "Using %d lanes", num_data_lanes);
+
/* Configure a lane count. */
ret = regmap_update_bits(priv->regmap, MAX9296A_MIPI_TX10(hw_index), MAX9296A_MIPI_TX10_CSI2_LANE_CNT,
@@ -474,7 +476,7 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) */
if (priv->info->polarity_on_physical_lanes) - map = phy->mipi.data_lanes[i]; + map = phy->mipi.data_lanes[i] - 1; else
map = i;
@@ -484,6 +486,9 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) if (phy->index == 0 && priv->info->phy0_lanes_0_1_on_second_phy)
val = ((val & 0x3) << 2) | ((val >> 2) & 0x3);
+ dev_info(priv->dev, "Val for MIPI_PHY5 (0_1): %lx", FIELD_PREP(MAX9296A_MIPI_PHY5_PHY_POL_MAP_0_1, val)); + dev_info(priv->dev, "Val for MIPI_PHY5 (2_3): %lx", FIELD_PREP(MAX9296A_MIPI_PHY5_PHY_POL_MAP_2_3, val >> 2)); +
ret = regmap_update_bits(priv->regmap, MAX9296A_MIPI_PHY5(index), MAX9296A_MIPI_PHY5_PHY_POL_MAP_0_1 |MAX9296A_MIPI_PHY5_PHY_POL_MAP_2_3,
@@ -499,10 +504,10 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) return ret;
/* Put DPLL block into reset. */
- ret = regmap_clear_bits(priv->regmap, MAX9296A_DPLL_0(hw_index),
- MAX9296A_DPLL_0_CONFIG_SOFT_RST_N);
- if (ret)
- return ret;
+ //ret = regmap_clear_bits(priv->regmap, MAX9296A_DPLL_0(hw_index), + // MAX9296A_DPLL_0_CONFIG_SOFT_RST_N);
+ //if (ret)
+ // return ret;
/* Set DPLL frequency. */
ret = regmap_update_bits(priv->regmap, MAX9296A_BACKTOP22(index),
@@ -519,10 +524,10 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) return ret;
/* Pull DPLL block out of reset. */
- ret = regmap_set_bits(priv->regmap, MAX9296A_DPLL_0(index), - MAX9296A_DPLL_0_CONFIG_SOFT_RST_N); - if (ret)
- return ret;
+ //ret = regmap_set_bits(priv->regmap, MAX9296A_DPLL_0(index), + // MAX9296A_DPLL_0_CONFIG_SOFT_RST_N); + //if (ret)
+ // return ret;
if (dpll_freq > 1500000000ull) {
/* Enable initial deskew with 2 x 32k UI. */
To my surprise it works this way. I tested this 2 times back and forth. Can these calls really cause some issues?
Quoted 97 lines · Jakub Kostiw
Quoted 17 lines
Can you revert the change you made to
polarity_on_physical_lanes, and try the following?drivers/media/i2c/maxim-serdes/max9296a.c +1
-1@@ -474,7 +474,7 @@ static int max9296a_init_phy(struct max_des *des,struct max_des_phy *phy) */ if (priv->info->polarity_on_physical_lanes) - map = phy->mipi.data_lanes[i]; + map = phy->mipi.data_lanes[i] - 1;else
map = i;Quoted 3 lines
data_lanesis 1-based (since 0 is the clock lane), but the bits in register0x335start from 0. That means we should adjust the values indata_lanesto be 0-based.I have applied your patch and polarity settings seems to be correct now (based on register contents).
However, I have came across another issue.
When I was debugging the driver for MAX96714, before I found out that the issue was with polarity settings, I have commented out calls toMAX9296A_DPLL_0. Probably because I thought it was there by mistake. I totally forgot about that change. Before applying your patch I reverted any changes to the driver, soMAX9296A_DPLL_0writes were back again. Sadly, video stream did not work. So I began to wonder, and just for sake of testing, commented these calls again (added some logs for quick tracing purposes):drivers/media/i2c/maxim-serdes/max9296a.c +2
-0@@ -391,6 +391,8 @@ static int max9296a_init_phy(struct max_des *des,struct max_des_phy *phy) * PHY1 Lane 1 = D3 */ + dev_info(priv->dev, "Using %d lanes", num_data_lanes); + /* Configure a lane count. */ ret = regmap_update_bits(priv->regmap,
MAX9296A_MIPI_TX10(hw_index),
MAX9296A_MIPI_TX10_CSI2_LANE_CNT,drivers/media/i2c/maxim-serdes/max9296a.c +4
-1@@ -474,7 +476,7 @@ static int max9296a_init_phy(struct max_des *des,struct max_des_phy *phy) */ if (priv->info->polarity_on_physical_lanes) - map = phy->mipi.data_lanes[i]; + map = phy->mipi.data_lanes[i] - 1; else map = i;@@ -484,6 +486,9 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) if (phy->index == 0 && priv->info->phy0_lanes_0_1_on_second_phy) val = ((val & 0x3) << 2) | ((val >> 2) & 0x3); + dev_info(priv->dev, "Val for MIPI_PHY5 (0_1): %lx",FIELD_PREP (MAX9296A_MIPI_PHY5_PHY_POL_MAP_0_1 , val)); + dev_info(priv->dev, "Val for MIPI_PHY5 (2_3): %lx",FIELD_PREP (MAX9296A_MIPI_PHY5_PHY_POL_MAP_2_3 , val >>2 )); +ret = regmap_update_bits(priv->regmap,
MAX9296A_MIPI_PHY5(index),MAX9296A_MIPI_PHY5_PHY_POL_MAP_0_1|MAX9296A_MIPI_PHY5_PHY_POL_MAP_2_3,drivers/media/i2c/maxim-serdes/max9296a.c +4
-4@@ -499,10 +504,10 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) return ret; /* Put DPLL block into reset. */ - ret = regmap_clear_bits(priv->regmap, MAX9296A_DPLL_0(hw_index), -MAX9296A_DPLL_0_CONFIG_SOFT_RST_N ); - if (ret) - return ret; + //ret = regmap_clear_bits(priv->regmap, MAX9296A_DPLL_0(hw_index), + // MAX9296A_DPLL_0_CONFIG_SOFT_RST_N); + //if (ret) + // return ret; /* Set DPLL frequency. */ret = regmap_update_bits(priv->regmap,
MAX9296A_BACKTOP22(index),drivers/media/i2c/maxim-serdes/max9296a.c +4
-4@@ -519,10 +524,10 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) return ret; /* Pull DPLL block out of reset. */ - ret = regmap_set_bits(priv->regmap, MAX9296A_DPLL_0(index), - MAX9296A_DPLL_0_CONFIG_SOFT_RST_N); - if (ret) - return ret; + //ret = regmap_set_bits(priv->regmap, MAX9296A_DPLL_0(index), + // MAX9296A_DPLL_0_CONFIG_SOFT_RST_N); + //if (ret) + // return ret; if (dpll_freq > 1500000000ull) {/* Enable initial deskew with 2 x 32k UI. */
Quoted 1 line
To my surprise it works this way. I tested this 2 times back and forth. Can these calls really cause some issues?
Can you revert your changes and try this?
drivers/media/i2c/maxim-serdes/max9296a.c +1 -1
@@ -519,7 +519,7 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy)return ret;/* Pull DPLL block out of reset. */ - ret =regmap_set_bits (priv->regmap,MAX9296A_DPLL_0 (index), + ret =regmap_set_bits (priv->regmap,MAX9296A_DPLL_0 (hw_index),MAX9296A_DPLL_0_CONFIG_SOFT_RST_N );if (ret)return ret;
Quoted 7 lines
Can you revert your changes and try this?
drivers/media/i2c/maxim-serdes/max9296a.c +0
-0
drivers/media/i2c/maxim-serdes/max9296a.c static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) · line 525
Quoted 8 lines
drivers/media/i2c/maxim-serdes/max9296a.c +1
-1@@ -519,7 +519,7 @@ static int max9296a_init_phy(struct max_des *des, struct max_des_phy *phy) return ret; /* Pull DPLL block out of reset. */ - ret = regmap_set_bits(priv->regmap, MAX9296A_DPLL_0(index), + ret = regmap_set_bits(priv->regmap, MAX9296A_DPLL_0(hw_index), MAX9296A_DPLL_0_CONFIG_SOFT_RST_N); if (ret) return ret;
This fixes the issue, great work!
Hi Jakub and Cosmin
Quoted 50 lines · Jakub Kostiw
Hi Cosmin
Awesome work. The initiative to establish a common framework for GMSL devices is a great idea.
I believe that we have found few bugs:
Quoted 1 line
+#define
MAX9296A_BACKTOP22(x)(0x31d* (x) *0x3)The first multiplication is wrong and should be replaced with addition:
+#define
MAX9296A_BACKTOP22(x)(0x31d+ (x) *0x3)The same goes for MAX96724 equivalent macro:
Quoted 1 line
+#define
MAX96724_BACKTOP22(x)(0x415* (x) *0x3)In MAX96714 driver there is an issue with setting up lane-polarities.
Quoted 8 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +8
-0+static const struct max9296a_chip_info max96714_info = { + .max_register =0x5011 , + .set_pipe_stream_id = max96714_set_pipe_stream_id, + .set_pipe_enable = max96714_set_pipe_enable, + .set_pipe_tunnel_enable = max96714_set_pipe_tunnel_enable, + .phys_configs = { + .num_configs =ARRAY_SIZE (max96714_phys_configs), + .configs = max96714_phys_configs,drivers/media/i2c/maxim-serdes/max9296a.c line 1074
Quoted 10 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +10
-0+ }, + .polarity_on_physical_lanes = true, + .supports_phy_log = true, + .adjust_rlms = true, + .num_pipes = 1, + .pipe_hw_ids = { 1 }, + .num_phys = 1, + .phy_hw_ids = { 1 }, + .num_links = 1, +};In order to make thing work we had to set
Quoted 1 line
+ .polarity_on_physical_lanes = true,
To false. So this field is either improperly set for MAX96714, or handling of this case is wrong:
drivers/media/i2c/maxim-serdes/max9296a.c line 483
Quoted 4 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +4
-0+if (priv->info->polarity_on_physical_lanes) + map = phy->mipi.data_lanes[i]; +else + map = i;
Quoted 7 lines
Upon mentioned changes we have successfully tested two GMSL2 combinations on Raspberry 5 platform:
1. MAX96724 + MAX96717 (only 2 MIPI-CSI2 lanes with single camera due to hardware limitations)
2. MAX96714 + MAX96717
Feel free to shout if you want help on the Pi side.
Pi5 should be able to extract multiple virtual channels to support several sensors simultaneously (up to 4 VC/DT combinations). It does need a rework so the CFE runs from memory rather than being fed data directly from the CSI-2 receiver, but I believe that is pencilled in as future work with libcamera already.
Unless things have regressed, libcamera should report all connected sensors to SerDes setups, and set up Media Controller appropriately to use them one at a time. I know I've had that working with simple CSI-2 multiplexers and thought I'd had it working with TI FPD-Link III SerDes (Arducam's IMX219 V3Link kit, modded to remove their MCU). I don't have any GMSL hardware to test with.
We're also fairly open to merging drivers and overlays for 3rd party hardware into the downstream Pi kernel. If they've been reviewed and merged upstream then that is the ideal, but if you're prepared to support them, then it saves the user the headache of having to build out-of-tree modules.
Cheers
Dave
Quoted 61 lines · Dave Stevenson
Hi Jakub and Cosmin
Quoted 50 lines · Jakub Kostiw
Hi Cosmin
Awesome work. The initiative to establish a common framework for GMSL devices is a great idea.
I believe that we have found few bugs:
Quoted 1 line
+#define
MAX9296A_BACKTOP22(x)(0x31d* (x) *0x3)The first multiplication is wrong and should be replaced with addition:
+#define
MAX9296A_BACKTOP22(x)(0x31d+ (x) *0x3)The same goes for MAX96724 equivalent macro:
Quoted 1 line
+#define
MAX96724_BACKTOP22(x)(0x415* (x) *0x3)In MAX96714 driver there is an issue with setting up lane-polarities.
Quoted 8 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +8
-0+static const struct max9296a_chip_info max96714_info = { + .max_register =0x5011 , + .set_pipe_stream_id = max96714_set_pipe_stream_id, + .set_pipe_enable = max96714_set_pipe_enable, + .set_pipe_tunnel_enable = max96714_set_pipe_tunnel_enable, + .phys_configs = { + .num_configs =ARRAY_SIZE (max96714_phys_configs), + .configs = max96714_phys_configs,drivers/media/i2c/maxim-serdes/max9296a.c line 1074
Quoted 10 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +10
-0+ }, + .polarity_on_physical_lanes = true, + .supports_phy_log = true, + .adjust_rlms = true, + .num_pipes = 1, + .pipe_hw_ids = { 1 }, + .num_phys = 1, + .phy_hw_ids = { 1 }, + .num_links = 1, +};In order to make thing work we had to set
Quoted 1 line
+ .polarity_on_physical_lanes = true,
To false. So this field is either improperly set for MAX96714, or handling of this case is wrong:
drivers/media/i2c/maxim-serdes/max9296a.c line 483
Quoted 4 lines
drivers/media/i2c/maxim-serdes/max9296a.c new file +4
-0+if (priv->info->polarity_on_physical_lanes) + map = phy->mipi.data_lanes[i]; +else + map = i;Quoted 7 lines
Upon mentioned changes we have successfully tested two GMSL2 combinations on Raspberry 5 platform:
1. MAX96724 + MAX96717 (only 2 MIPI-CSI2 lanes with single camera due to hardware limitations)
2. MAX96714 + MAX96717
Quoted 8 lines
Feel free to shout if you want help on the Pi side.
Pi5 should be able to extract multiple virtual channels to support several sensors simultaneously (up to 4 VC/DT combinations). It does need a rework so the CFE runs from memory rather than being fed data directly from the CSI-2 receiver, but I believe that is pencilled in as future work with libcamera already.
Hi Dave, thanks for your input! I'm glad this is getting some traction.
I'm currently testing using Tomi's pyv4l2 tool, which already contains RPi5 GMSL configs.
I've tested the multi-camera simultaneously streaming usecase already, all is working well, and I was able to get 4 separate camera image streams (or 2 image and 2 meta), streaming to the RPi5, and then to a remote host (where debayer is feasible to do without the help of an ISP).
Last time I tried libcamera it was not able to properly configure all entities, so testing with just the mainline CFE using pyv4l2 makes it much simpler, since we're only interested in getting our hardware supported.
Quoted 15 lines
Unless things have regressed, libcamera should report all connected sensors to SerDes setups, and set up Media Controller appropriately to use them one at a time. I know I've had that working with simple CSI-2 multiplexers and thought I'd had it working with TI FPD-Link III SerDes (Arducam's IMX219 V3Link kit, modded to remove their MCU). I don't have any GMSL hardware to test with.
We're also fairly open to merging drivers and overlays for 3rd party hardware into the downstream Pi kernel. If they've been reviewed and merged upstream then that is the ideal, but if you're prepared to support them, then it saves the user the headache of having to build out-of-tree modules.
Cheers
Dave
Quoted 15 lines
Feel free to shout if you want help on the Pi side.
Pi5 should be able to extract multiple virtual channels to support several sensors simultaneously (up to 4 VC/DT combinations). It does need a rework so the CFE runs from memory rather than being fed data directly from the CSI-2 receiver, but I believe that is pencilled in as future work with libcamera already.
Unless things have regressed, libcamera should report all connected sensors to SerDes setups, and set up Media Controller appropriately to use them one at a time. I know I've had that working with simple CSI-2 multiplexers and thought I'd had it working with TI FPD-Link III SerDes (Arducam's IMX219 V3Link kit, modded to remove their MCU). I don't have any GMSL hardware to test with.
Quoted 5 lines
We're also fairly open to merging drivers and overlays for 3rd party hardware into the downstream Pi kernel. If they've been reviewed and merged upstream then that is the ideal, but if you're prepared to support them, then it saves the user the headache of having to build out-of-tree modules.
Hi Dave
Great to hear. Our initial test were made on a hardware that was designed for other platform (Toradex) so our test options are limited. However, after evaluating Cosmins drivers we designed a proper hardware for Raspberry Pi platform. We are now in a process of review and will soon manufacture it. We should have them in our offices in upcoming weeks.
It would be great to work with you to setup everything properly. We can send samples to you if you wish.
RFC PATCH v2 13/16 arm64: defconfig: disable deprecated MAX96712 driver
In reply to Cosmin TanislavThe staging MAX96712 driver will be removed as its functionality has been moved to the MAX96724 driver which makes use of the Maxim GMSL2/3 deserializer framework.
--- arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm64/configs/defconfig +0 -1
@@ -1272,7 +1272,6 @@ CONFIG_XEN_GNTDEV=y CONFIG_XEN_GRANT_DEV_ALLOC=y CONFIG_STAGING=y CONFIG_STAGING_MEDIA=y -CONFIG_VIDEO_MAX96712=m CONFIG_VIDEO_MESON_VDEC=m CONFIG_SND_BCM2835=m CONFIG_CHROME_PLATFORMS=y
Signature · 1 line
2.48.1
RFC PATCH v2 14/16 staging: media: remove MAX96712 driver
In reply to Cosmin TanislavRemove the staging MAX96712 driver.
Its functionality has been moved to the MAX96724 driver which makes use of the Maxim GMSL2/3 deserializer framework.
--- MAINTAINERS | 1 - drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/max96712/Kconfig | 14 - drivers/staging/media/max96712/Makefile | 2 - drivers/staging/media/max96712/max96712.c | 487 ---------------------- 6 files changed, 507 deletions(-) delete mode 100644 drivers/staging/media/max96712/Kconfig delete mode 100644 drivers/staging/media/max96712/Makefile delete mode 100644 drivers/staging/media/max96712/max96712.c
MAINTAINERS +0 -1
@@ -14188,7 +14188,6 @@ M: Cosmin Tanislav <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml -F: drivers/staging/media/max96712/max96712.c MAX96714 GMSL2 DESERIALIZER DRIVER M: Julien Massot <[email protected]>
drivers/staging/media/Kconfig +0 -2
@@ -28,8 +28,6 @@ source "drivers/staging/media/imx/Kconfig" source "drivers/staging/media/ipu3/Kconfig" -source "drivers/staging/media/max96712/Kconfig" - source "drivers/staging/media/meson/vdec/Kconfig" source "drivers/staging/media/rkvdec/Kconfig"
drivers/staging/media/Makefile +0 -1
@@ -2,7 +2,6 @@ obj-$(CONFIG_VIDEO_ATMEL_ISC_BASE) += deprecated/atmel/ obj-$(CONFIG_INTEL_ATOMISP) += atomisp/ obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx/ -obj-$(CONFIG_VIDEO_MAX96712) += max96712/ obj-$(CONFIG_VIDEO_MESON_VDEC) += meson/vdec/ obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC) += rkvdec/ obj-$(CONFIG_VIDEO_STARFIVE_CAMSS) += starfive/
drivers/staging/media/max96712/Kconfig deleted +0 -14
@@ -1,14 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -config VIDEO_MAX96712 - tristate "Maxim MAX96712 Quad GMSL2 Deserializer support" - depends on I2C - depends on OF_GPIO - depends on VIDEO_DEV - select V4L2_FWNODE - select VIDEO_V4L2_SUBDEV_API - select MEDIA_CONTROLLER - help - This driver supports the Maxim MAX96712 Quad GMSL2 Deserializer. - - To compile this driver as a module, choose M here: the - module will be called max96712.
drivers/staging/media/max96712/Makefile deleted +0 -2
@@ -1,2 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_VIDEO_MAX96712) += max96712.o
drivers/staging/media/max96712/max96712.c deleted +0 -487
487 lines not on this page · raw message
Signature · 1 line
2.48.1
RFC PATCH v2 15/16 media: i2c: remove MAX96717 driver
In reply to Cosmin TanislavThe previous MAX96717 driver has been removed and its functionality has been moved to a MAX96717 driver which makes use of the Maxim GMSL2/3 serializer framework.
--- MAINTAINERS | 1 - drivers/media/i2c/Kconfig | 17 - drivers/media/i2c/Makefile | 1 - drivers/media/i2c/max96717.c | 1103 ---------------------------------- 4 files changed, 1122 deletions(-) delete mode 100644 drivers/media/i2c/max96717.c
MAINTAINERS +0 -1
@@ -14203,7 +14203,6 @@ L: [email protected] S: Maintained F: Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml F: Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml -F: drivers/media/i2c/max96717.c MAX9860 MONO AUDIO VOICE CODEC DRIVER M: Peter Rosin <[email protected]>
drivers/media/i2c/Kconfig +0 -17
@@ -1636,23 +1636,6 @@ config VIDEO_MAX96714 To compile this driver as a module, choose M here: the module will be called max96714. -config VIDEO_MAX96717 - tristate "Maxim MAX96717 GMSL2 Serializer support" - depends on OF && I2C && VIDEO_DEV && COMMON_CLK - select I2C_MUX - select MEDIA_CONTROLLER - select GPIOLIB - select V4L2_CCI_I2C - select V4L2_FWNODE - select VIDEO_V4L2_SUBDEV_API - help - Device driver for the Maxim MAX96717 GMSL2 Serializer. - MAX96717 serializers convert video on a MIPI CSI-2 - input to a GMSL2 output. - - To compile this driver as a module, choose M here: the - module will be called max96717. - source "drivers/media/i2c/maxim-serdes/Kconfig" endmenu
drivers/media/i2c/Makefile +0 -1
@@ -69,7 +69,6 @@ obj-$(CONFIG_VIDEO_M52790) += m52790.o obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o obj-$(CONFIG_VIDEO_MAX9286) += max9286.o obj-$(CONFIG_VIDEO_MAX96714) += max96714.o -obj-$(CONFIG_VIDEO_MAX96717) += max96717.o obj-$(CONFIG_VIDEO_MAXIM_SERDES) += maxim-serdes/ obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
drivers/media/i2c/max96717.c deleted +0 -1103
1,103 lines not on this page · raw message
Signature · 1 line
2.48.1
RFC PATCH v2 16/16 media: i2c: remove MAX96714 driver
In reply to Cosmin TanislavThe previous MAX96714 driver has been removed and its functionality has been moved to the MAX9296A driver which makes use of the Maxim GMSL2/3 serializer framework.
--- MAINTAINERS | 1 - drivers/media/i2c/Kconfig | 17 - drivers/media/i2c/Makefile | 1 - drivers/media/i2c/max96714.c | 1024 ---------------------------------- 4 files changed, 1043 deletions(-) delete mode 100644 drivers/media/i2c/max96714.c
MAINTAINERS +0 -1
@@ -14194,7 +14194,6 @@ M: Julien Massot <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml -F: drivers/media/i2c/max96714.c MAX96717 GMSL2 SERIALIZER DRIVER M: Julien Massot <[email protected]>
drivers/media/i2c/Kconfig +0 -17
@@ -1619,23 +1619,6 @@ config VIDEO_DS90UB960 Device driver for the Texas Instruments DS90UB960 FPD-Link III Deserializer and DS90UB9702 FPD-Link IV Deserializer. -config VIDEO_MAX96714 - tristate "Maxim MAX96714 GMSL2 deserializer" - depends on OF && I2C && VIDEO_DEV - select I2C_MUX - select MEDIA_CONTROLLER - select GPIOLIB - select V4L2_CCI_I2C - select V4L2_FWNODE - select VIDEO_V4L2_SUBDEV_API - help - Device driver for the Maxim MAX96714 GMSL2 Deserializer. - MAX96714 deserializers convert a GMSL2 input to MIPI CSI-2 - output. - - To compile this driver as a module, choose M here: the - module will be called max96714. - source "drivers/media/i2c/maxim-serdes/Kconfig" endmenu
drivers/media/i2c/Makefile +0 -1
@@ -68,7 +68,6 @@ obj-$(CONFIG_VIDEO_LT6911UXE) += lt6911uxe.o obj-$(CONFIG_VIDEO_M52790) += m52790.o obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o obj-$(CONFIG_VIDEO_MAX9286) += max9286.o -obj-$(CONFIG_VIDEO_MAX96714) += max96714.o obj-$(CONFIG_VIDEO_MAXIM_SERDES) += maxim-serdes/ obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
drivers/media/i2c/max96714.c deleted +0 -1024
1,024 lines not on this page · raw message
Signature · 1 line
2.48.1