Re: [PATCH v3 03/19] dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf

Rob Herring
2025-05-14T22:01:31Z

On Tue, May 13, 2025 at 12:28:12AM +0300, Cosmin Tanislav wrote:
> MAX96717 is capable of configuring various pin properties.
>
> Add pinctrl/pinconf properties to support this usecase.
>
> Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
> ---
> .../bindings/media/i2c/maxim,max96717.yaml | 110 ++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 111 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml
> index 167c3dd50683..5998e2518be9 100644
> --- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml
> @@ -121,6 +121,116 @@ required:
> - reg
> - ports
>
> +patternProperties:
> + '-pins$':
> + type: object
> + additionalProperties: false
> +
> + properties:
> + function:
> + enum: [gpio, rclkout]
> +
> + pins: true
> + drive-open-drain: true
> + drive-push-pull: true
> + bias-disable: true
> + output-disable: true
> + output-enable: true
> + output-low: true
> + output-high: true
> + input-enable: true
> +
> + slew-rate:
> + description: |
> + Slew rate.
> + 0 - Fastest
> + 1 - Fast
> + 2 - Slow
> + 3 - Slowest
> + maximum: 3
> +
> + bias-pull-up:
> + oneOf:
> + - type: boolean
> + description: Enable regular 40kOhm pull-up
> + - enum: [ 40000, 1000000 ]
> + description: Enable either the 40kOhm or the 1MOhm pull-up
> +
> + bias-pull-down:
> + oneOf:
> + - type: boolean
> + description: Enable regular 40kOhm pull-down
> + - enum: [ 40000, 1000000 ]
> + description: Enable either the 40kOhm or the 1MOhm pull-down
> +
> + 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
> +
> + required:
> + - pins
> + - function
> +
> + allOf:
> + - $ref: /schemas/pinctrl/pincfg-node.yaml#
> + - $ref: /schemas/pinctrl/pinmux-node.yaml#
> +
> + - if:
> + properties:
> + function:
> + const: gpio
> + then:
> + properties:
> + pins:
> + items:
> + enum: [mfp0, mfp1, mfp2, mfp3, mfp4, mfp5, mfp6, mfp7,
> + mfp8, mfp9, mfp10]
> +
> + - if:
> + properties:
> + function:
> + const: rclkout
> + then:
> + properties:
> + pins:
> + items:
> + enum: [mfp0, mfp1, mfp2, mfp3, mfp4, mfp7, mfp8]
> +
> additionalProperties: false
>
> allOf:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8f463ebca056..f8ffb7cff9c5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -14201,6 +14201,7 @@ M: Julien Massot <julien.massot@collabora.com>
> M: Cosmin Tanislav <cosmin.tanislav@analog.com>
> L: linux-media@vger.kernel.org
> S: Maintained
> +F: Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml

Don't think you need this...

> F: Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml
> F: drivers/media/i2c/max96717.c
>
> --
> 2.49.0
>