Message ID | 20201029172947.34315-3-kholk11@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
On Thu, Oct 29, 2020 at 06:29:47PM +0100, kholk11@gmail.com wrote: > From: AngeloGioacchino Del Regno <kholk11@gmail.com> > > Add YAML device tree binding for IMX300 CMOS image sensor, and > the relevant MAINTAINERS entries. > > Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> > --- > .../bindings/media/i2c/sony,imx300.yaml | 112 ++++++++++++++++++ > MAINTAINERS | 7 ++ > 2 files changed, 119 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > new file mode 100644 > index 000000000000..8f1d795f8072 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > @@ -0,0 +1,112 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/sony,imx300.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Sony 1/2.3-Inch 8Mpixel Stacked CMOS Digital Image Sensor > + > +maintainers: > + - AngeloGioacchino Del Regno <kholk11@gmail.com> > + > +description: |- > + The Sony IMX300 is a 1/2.3-inch Stacked CMOS (Exmor-RS) digital image > + sensor with a pixel size of 1.08um and an active array size of > + 5948H x 4140V. It is programmable through I2C interface at address 0x10. > + Image data is sent through MIPI CSI-2, which is configured as either 2 or > + 4 data lanes. > + > +properties: > + compatible: > + const: sony,imx300 > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + vdig-supply: > + description: > + Digital I/O voltage supply, 1.15-1.20 volts > + > + vana-supply: > + description: > + Analog voltage supply, 2.2 volts > + > + vddl-supply: > + description: > + Digital core voltage supply, 1.8 volts > + > + reset-gpios: maxItems: 1 > + description: |- > + Reference to the GPIO connected to the xclr pin, if any. > + Must be released (set high) after all supplies are applied. > + > + # See ../video-interfaces.txt for more details > + port: > + type: object > + properties: > + endpoint: > + type: object > + > + properties: > + data-lanes: > + description: |- > + The sensor supports either two-lane, or four-lane operation, > + but the driver currently supports only four-lane. What the driver is not relevant. Please define all possible configurations. Or just omit? What's the behavior if omitted? > + items: > + - const: 0 > + - const: 1 > + - const: 2 > + - const: 3 > + > + clock-noncontinuous: true > + > + link-frequencies: > + $ref: /schemas/types.yaml#/definitions/uint64-array > + description: > + Allowed data bus frequencies. The driver currently needs > + to switch between 780000000 and 480000000 Hz in order to > + guarantee functionality of all modes. > + > + required: > + - link-frequencies > + > +required: > + - compatible > + - reg > + - clocks > + - vana-supply > + - vdig-supply > + - vddl-supply > + - port > + > +additionalProperties: false > + > +examples: > + - | > + i2c0 { > + #address-cells = <1>; > + #size-cells = <0>; > + > + imx300: sensor@10 { > + compatible = "sony,imx300"; > + reg = <0x10>; > + clocks = <&imx300_xclk>; > + vana-supply = <&imx300_vana>; /* 2.2v */ > + vdig-supply = <&imx300_vdig>; /* 1.2v */ > + vddl-supply = <&imx300_vddl>; /* 1.8v */ > + > + port { > + imx300_0: endpoint { > + remote-endpoint = <&csi1_ep>; > + data-lanes = <0 1 2 3>; > + clock-noncontinuous; > + link-frequencies = /bits/ 64 <780000000 480000000>; > + }; > + }; > + }; > + }; > + > +... > diff --git a/MAINTAINERS b/MAINTAINERS > index c66710dd7e0a..21ba41db0063 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -16279,6 +16279,13 @@ T: git git://linuxtv.org/media_tree.git > F: Documentation/devicetree/bindings/media/i2c/imx290.txt > F: drivers/media/i2c/imx290.c > > +SONY IMX300 SENSOR DRIVER > +M: AngeloGioacchino Del Regno <kholk11@gmail.com> > +L: linux-media@vger.kernel.org > +S: Maintained > +F: Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > +F: drivers/media/i2c/imx300.c > + > SONY IMX319 SENSOR DRIVER > M: Bingbu Cao <bingbu.cao@intel.com> > L: linux-media@vger.kernel.org > -- > 2.28.0 >
Il giorno mer 4 nov 2020 alle ore 22:48 Rob Herring <robh@kernel.org> ha scritto: > > On Thu, Oct 29, 2020 at 06:29:47PM +0100, kholk11@gmail.com wrote: > > From: AngeloGioacchino Del Regno <kholk11@gmail.com> > > > > Add YAML device tree binding for IMX300 CMOS image sensor, and > > the relevant MAINTAINERS entries. > > > > Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> > > --- > > .../bindings/media/i2c/sony,imx300.yaml | 112 ++++++++++++++++++ > > MAINTAINERS | 7 ++ > > 2 files changed, 119 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > > > diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > new file mode 100644 > > index 000000000000..8f1d795f8072 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > @@ -0,0 +1,112 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/i2c/sony,imx300.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Sony 1/2.3-Inch 8Mpixel Stacked CMOS Digital Image Sensor > > + > > +maintainers: > > + - AngeloGioacchino Del Regno <kholk11@gmail.com> > > + > > +description: |- > > + The Sony IMX300 is a 1/2.3-inch Stacked CMOS (Exmor-RS) digital image > > + sensor with a pixel size of 1.08um and an active array size of > > + 5948H x 4140V. It is programmable through I2C interface at address 0x10. > > + Image data is sent through MIPI CSI-2, which is configured as either 2 or > > + 4 data lanes. > > + > > +properties: > > + compatible: > > + const: sony,imx300 > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > + > > + vdig-supply: > > + description: > > + Digital I/O voltage supply, 1.15-1.20 volts > > + > > + vana-supply: > > + description: > > + Analog voltage supply, 2.2 volts > > + > > + vddl-supply: > > + description: > > + Digital core voltage supply, 1.8 volts > > + > > + reset-gpios: > > maxItems: 1 Agreed. > > > + description: |- > > + Reference to the GPIO connected to the xclr pin, if any. > > + Must be released (set high) after all supplies are applied. > > + > > + # See ../video-interfaces.txt for more details > > + port: > > + type: object > > + properties: > > + endpoint: > > + type: object > > + > > + properties: > > + data-lanes: > > + description: |- > > + The sensor supports either two-lane, or four-lane operation, > > + but the driver currently supports only four-lane. > > What the driver is not relevant. Please define all possible > configurations. Or just omit? What's the behavior if omitted? > I wrote this as to document the hardware (there is no datasheet around and I fear that findings will be forgotten one day)... but if you say it's not relevant... ...well, then I can as well just write it in my local notes and remove the info from here. > > + items: > > + - const: 0 > > + - const: 1 > > + - const: 2 > > + - const: 3 > > + > > + clock-noncontinuous: true > > + > > + link-frequencies: > > + $ref: /schemas/types.yaml#/definitions/uint64-array > > + description: > > + Allowed data bus frequencies. The driver currently needs > > + to switch between 780000000 and 480000000 Hz in order to > > + guarantee functionality of all modes. > > + > > + required: > > + - link-frequencies > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - vana-supply > > + - vdig-supply > > + - vddl-supply > > + - port > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + i2c0 { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + imx300: sensor@10 { > > + compatible = "sony,imx300"; > > + reg = <0x10>; > > + clocks = <&imx300_xclk>; > > + vana-supply = <&imx300_vana>; /* 2.2v */ > > + vdig-supply = <&imx300_vdig>; /* 1.2v */ > > + vddl-supply = <&imx300_vddl>; /* 1.8v */ > > + > > + port { > > + imx300_0: endpoint { > > + remote-endpoint = <&csi1_ep>; > > + data-lanes = <0 1 2 3>; > > + clock-noncontinuous; > > + link-frequencies = /bits/ 64 <780000000 480000000>; > > + }; > > + }; > > + }; > > + }; > > + > > +... > > diff --git a/MAINTAINERS b/MAINTAINERS > > index c66710dd7e0a..21ba41db0063 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -16279,6 +16279,13 @@ T: git git://linuxtv.org/media_tree.git > > F: Documentation/devicetree/bindings/media/i2c/imx290.txt > > F: drivers/media/i2c/imx290.c > > > > +SONY IMX300 SENSOR DRIVER > > +M: AngeloGioacchino Del Regno <kholk11@gmail.com> > > +L: linux-media@vger.kernel.org > > +S: Maintained > > +F: Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > +F: drivers/media/i2c/imx300.c > > + > > SONY IMX319 SENSOR DRIVER > > M: Bingbu Cao <bingbu.cao@intel.com> > > L: linux-media@vger.kernel.org > > -- > > 2.28.0 > > Also, I'm sorry for the *very* late reply. I've been busy quite a lot in these days! By the way, I'll push a v3 for this one ASAP! Yours, Angelo
Hi Rob, AngeloGioacchino, On Wed, Nov 04, 2020 at 03:48:06PM -0600, Rob Herring wrote: > On Thu, Oct 29, 2020 at 06:29:47PM +0100, kholk11@gmail.com wrote: > > From: AngeloGioacchino Del Regno <kholk11@gmail.com> > > > > Add YAML device tree binding for IMX300 CMOS image sensor, and > > the relevant MAINTAINERS entries. > > > > Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> > > --- > > .../bindings/media/i2c/sony,imx300.yaml | 112 ++++++++++++++++++ > > MAINTAINERS | 7 ++ > > 2 files changed, 119 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > > > diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > new file mode 100644 > > index 000000000000..8f1d795f8072 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml > > @@ -0,0 +1,112 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/i2c/sony,imx300.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Sony 1/2.3-Inch 8Mpixel Stacked CMOS Digital Image Sensor > > + > > +maintainers: > > + - AngeloGioacchino Del Regno <kholk11@gmail.com> > > + > > +description: |- > > + The Sony IMX300 is a 1/2.3-inch Stacked CMOS (Exmor-RS) digital image > > + sensor with a pixel size of 1.08um and an active array size of > > + 5948H x 4140V. It is programmable through I2C interface at address 0x10. > > + Image data is sent through MIPI CSI-2, which is configured as either 2 or > > + 4 data lanes. > > + > > +properties: > > + compatible: > > + const: sony,imx300 > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 The frequency needs to come from DT; it's not a property of the sensor. > > + > > + vdig-supply: > > + description: > > + Digital I/O voltage supply, 1.15-1.20 volts > > + > > + vana-supply: > > + description: > > + Analog voltage supply, 2.2 volts > > + > > + vddl-supply: > > + description: > > + Digital core voltage supply, 1.8 volts > > + > > + reset-gpios: > > maxItems: 1 > > > + description: |- > > + Reference to the GPIO connected to the xclr pin, if any. > > + Must be released (set high) after all supplies are applied. > > + > > + # See ../video-interfaces.txt for more details > > + port: > > + type: object > > + properties: > > + endpoint: > > + type: object > > + > > + properties: > > + data-lanes: > > + description: |- > > + The sensor supports either two-lane, or four-lane operation, > > + but the driver currently supports only four-lane. > > What the driver is not relevant. Please define all possible > configurations. Or just omit? What's the behavior if omitted? I think we've used to specify the number of lanes if it's configurable, instead of having defaults. I'd do the same here, i.e. require data-lanes. > > > + items: > > + - const: 0 > > + - const: 1 > > + - const: 2 > > + - const: 3 -- Kind regards, Sakari Ailus
diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml new file mode 100644 index 000000000000..8f1d795f8072 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml @@ -0,0 +1,112 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/sony,imx300.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sony 1/2.3-Inch 8Mpixel Stacked CMOS Digital Image Sensor + +maintainers: + - AngeloGioacchino Del Regno <kholk11@gmail.com> + +description: |- + The Sony IMX300 is a 1/2.3-inch Stacked CMOS (Exmor-RS) digital image + sensor with a pixel size of 1.08um and an active array size of + 5948H x 4140V. It is programmable through I2C interface at address 0x10. + Image data is sent through MIPI CSI-2, which is configured as either 2 or + 4 data lanes. + +properties: + compatible: + const: sony,imx300 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + vdig-supply: + description: + Digital I/O voltage supply, 1.15-1.20 volts + + vana-supply: + description: + Analog voltage supply, 2.2 volts + + vddl-supply: + description: + Digital core voltage supply, 1.8 volts + + reset-gpios: + description: |- + Reference to the GPIO connected to the xclr pin, if any. + Must be released (set high) after all supplies are applied. + + # See ../video-interfaces.txt for more details + port: + type: object + properties: + endpoint: + type: object + + properties: + data-lanes: + description: |- + The sensor supports either two-lane, or four-lane operation, + but the driver currently supports only four-lane. + items: + - const: 0 + - const: 1 + - const: 2 + - const: 3 + + clock-noncontinuous: true + + link-frequencies: + $ref: /schemas/types.yaml#/definitions/uint64-array + description: + Allowed data bus frequencies. The driver currently needs + to switch between 780000000 and 480000000 Hz in order to + guarantee functionality of all modes. + + required: + - link-frequencies + +required: + - compatible + - reg + - clocks + - vana-supply + - vdig-supply + - vddl-supply + - port + +additionalProperties: false + +examples: + - | + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + imx300: sensor@10 { + compatible = "sony,imx300"; + reg = <0x10>; + clocks = <&imx300_xclk>; + vana-supply = <&imx300_vana>; /* 2.2v */ + vdig-supply = <&imx300_vdig>; /* 1.2v */ + vddl-supply = <&imx300_vddl>; /* 1.8v */ + + port { + imx300_0: endpoint { + remote-endpoint = <&csi1_ep>; + data-lanes = <0 1 2 3>; + clock-noncontinuous; + link-frequencies = /bits/ 64 <780000000 480000000>; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index c66710dd7e0a..21ba41db0063 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16279,6 +16279,13 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/imx290.txt F: drivers/media/i2c/imx290.c +SONY IMX300 SENSOR DRIVER +M: AngeloGioacchino Del Regno <kholk11@gmail.com> +L: linux-media@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/media/i2c/sony,imx300.yaml +F: drivers/media/i2c/imx300.c + SONY IMX319 SENSOR DRIVER M: Bingbu Cao <bingbu.cao@intel.com> L: linux-media@vger.kernel.org