[1/2] dt-bindings: media: i2c: add galaxycore,gc2145 dt-bindings
Commit Message
Introduction of the Galaxy Core GC2145 XVGA CMOS camera sensor.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
---
.../bindings/media/i2c/galaxycore,gc2145.yaml | 108 ++++++++++++++++++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
2 files changed, 110 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/i2c/galaxycore,gc2145.yaml
Comments
Hey Alain,
On Tue, Sep 26, 2023 at 11:28:19AM +0200, Alain Volmat wrote:
> Introduction of the Galaxy Core GC2145 XVGA CMOS camera sensor.
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
> .../bindings/media/i2c/galaxycore,gc2145.yaml | 108 ++++++++++++++++++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
AFAIU, changes to the vendor-prefixes file are done as standalone
patches.
> 2 files changed, 110 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/i2c/galaxycore,gc2145.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/galaxycore,gc2145.yaml b/Documentation/devicetree/bindings/media/i2c/galaxycore,gc2145.yaml
> new file mode 100644
> index 000000000000..e80b581498fc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/galaxycore,gc2145.yaml
> @@ -0,0 +1,108 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc2145.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Galaxy Core 1/5'' UXGA CMOS Image Sensor
> +
> +maintainers:
> + - Alain Volmat <alain.volmat@foss.st.com>
> +
> +description: |
This | seems unneeded as you have no formatting to preserve.
> + The Galaxy Core GC2145 is a high quality 2 Mega CMOS image sensor, for mobile
> + phone camera applications and digital camera products. GC2145 incorporates a
> + 1616V x 1232H active pixel array, on-chip 10-bit ADC, and image signal
> + processor. It is programmable through an I2C interface. Image data is sent
> + either through a parallel interface or through MIPI CSI-2.
> +
> +allOf:
> + - $ref: ../video-interface-devices.yaml#
> +
> +properties:
> + compatible:
> + const: galaxycore,gc2145
> +
> + reg:
> + enum:
> + - 0x3c
If this is the only permitted address, this should be a const, rather
than an enum, no? Are you expecting the list to grow?
> +
> + clocks:
> + description: Reference to the xclk clock.
> + maxItems: 1
> +
> + powerdown-gpios:
> + description: GPIO descriptor for the powerdown pin.
> + maxItems: 1
> +
> + reset-gpios:
> + description: GPIO descriptor for the reset pin.
> + maxItems: 1
Where you only have a single entry, a lot of these descriptions are
superfluous.
Generally, this looks pretty good to me.
Thanks,
Conor.
> +
> + IOVDD-supply:
> + description: Power Supply for I/O circuits (1.7 - 3V).
> +
> + AVDD-supply:
> + description: Power for analog circuit/sensor array (2.7 - 3V).
> +
> + DVDD-supply:
> + description: Power for digital core (1.7 - 1.9V).
> +
> + orientation: true
> +
> + rotation: true
> +
> + port:
> + $ref: /schemas/graph.yaml#/$defs/port-base
> +
> + properties:
> + endpoint:
> + $ref: /schemas/media/video-interfaces.yaml#
> + unevaluatedProperties: false
> +
> + required:
> + - endpoint
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - powerdown-gpios
> + - reset-gpios
> + - IOVDD-supply
> + - AVDD-supply
> + - DVDD-supply
> + - port
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + i2c5 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + gc2145@3c {
> + compatible = "galaxycore,gc2145";
> + reg = <0x3c>;
> + clocks = <&clk_ext_camera>;
> + IOVDD-supply = <&scmi_v3v3_sw>;
> + AVDD-supply = <&scmi_v3v3_sw>;
> + DVDD-supply = <&scmi_v3v3_sw>;
> + powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
> + reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
> +
> + port {
> + endpoint {
> + remote-endpoint = <&mipid02_0>;
> + data-lanes = <1 2>;
> + };
> + };
> + };
> + };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 573578db9509..d9df03bba5bb 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -494,6 +494,8 @@ patternProperties:
> description: Fujitsu Ltd.
> "^fxtec,.*":
> description: FX Technology Ltd.
> + "^galaxycore,.*":
> + description: Galaxy Core Inc.
> "^gardena,.*":
> description: GARDENA GmbH
> "^gateworks,.*":
> --
> 2.25.1
>
On 26/09/2023 11:28, Alain Volmat wrote:
> Introduction of the Galaxy Core GC2145 XVGA CMOS camera sensor.
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
...
> +properties:
> + compatible:
> + const: galaxycore,gc2145
> +
> + reg:
> + enum:
> + - 0x3c
> +
> + clocks:
> + description: Reference to the xclk clock.
> + maxItems: 1
If xclk is the name of the pin and you want to mention it, then just:
items:
- description: xclk clock
(no "reference" or "GPIO descriptor" because it is redundant as Conor wrote)
> +
> + powerdown-gpios:
> + description: GPIO descriptor for the powerdown pin.
> + maxItems: 1
> +
> + reset-gpios:
> + description: GPIO descriptor for the reset pin.
> + maxItems: 1
> +
> + IOVDD-supply:
lowercase, so iovdd-supply. Same in other places.
> + description: Power Supply for I/O circuits (1.7 - 3V).
> +
> + AVDD-supply:
> + description: Power for analog circuit/sensor array (2.7 - 3V).
> +
> + DVDD-supply:
> + description: Power for digital core (1.7 - 1.9V).
> +
> + orientation: true
> +
> + rotation: true
> +
> + port:
> + $ref: /schemas/graph.yaml#/$defs/port-base
> +
> + properties:
> + endpoint:
> + $ref: /schemas/media/video-interfaces.yaml#
> + unevaluatedProperties: false
> +
> + required:
> + - endpoint
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - powerdown-gpios
> + - reset-gpios
> + - IOVDD-supply
> + - AVDD-supply
> + - DVDD-supply
> + - port
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + i2c5 {
i2c
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + gc2145@3c {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "galaxycore,gc2145";
> + reg = <0x3c>;
Best regards,
Krzysztof
new file mode 100644
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc2145.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Galaxy Core 1/5'' UXGA CMOS Image Sensor
+
+maintainers:
+ - Alain Volmat <alain.volmat@foss.st.com>
+
+description: |
+ The Galaxy Core GC2145 is a high quality 2 Mega CMOS image sensor, for mobile
+ phone camera applications and digital camera products. GC2145 incorporates a
+ 1616V x 1232H active pixel array, on-chip 10-bit ADC, and image signal
+ processor. It is programmable through an I2C interface. Image data is sent
+ either through a parallel interface or through MIPI CSI-2.
+
+allOf:
+ - $ref: ../video-interface-devices.yaml#
+
+properties:
+ compatible:
+ const: galaxycore,gc2145
+
+ reg:
+ enum:
+ - 0x3c
+
+ clocks:
+ description: Reference to the xclk clock.
+ maxItems: 1
+
+ powerdown-gpios:
+ description: GPIO descriptor for the powerdown pin.
+ maxItems: 1
+
+ reset-gpios:
+ description: GPIO descriptor for the reset pin.
+ maxItems: 1
+
+ IOVDD-supply:
+ description: Power Supply for I/O circuits (1.7 - 3V).
+
+ AVDD-supply:
+ description: Power for analog circuit/sensor array (2.7 - 3V).
+
+ DVDD-supply:
+ description: Power for digital core (1.7 - 1.9V).
+
+ orientation: true
+
+ rotation: true
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - endpoint
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - powerdown-gpios
+ - reset-gpios
+ - IOVDD-supply
+ - AVDD-supply
+ - DVDD-supply
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gc2145@3c {
+ compatible = "galaxycore,gc2145";
+ reg = <0x3c>;
+ clocks = <&clk_ext_camera>;
+ IOVDD-supply = <&scmi_v3v3_sw>;
+ AVDD-supply = <&scmi_v3v3_sw>;
+ DVDD-supply = <&scmi_v3v3_sw>;
+ powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
+ reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
+
+ port {
+ endpoint {
+ remote-endpoint = <&mipid02_0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+
+...
@@ -494,6 +494,8 @@ patternProperties:
description: Fujitsu Ltd.
"^fxtec,.*":
description: FX Technology Ltd.
+ "^galaxycore,.*":
+ description: Galaxy Core Inc.
"^gardena,.*":
description: GARDENA GmbH
"^gateworks,.*":