2022-12-29 13:41:00

by Luca Ceresoli

[permalink] [raw]
Subject: [PATCH v3 02/21] dt-bindings: display: tegra: vi: add 'vip' property and example

The Tegra20 VI peripheral can receive parallel input from the VIP parallel
input module. Add it to the allowed properties and augment the existing
nvidia,tegra20-vi example to show a 'vip' property.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Luca Ceresoli <[email protected]>

---

Changed in v3 (suggested by Rob Herring):
- drop 'endpoint', unneeded as there's no extra properties in the
endpoints

Changed in v2 (suggested by Krzysztof Kozlowski):
- rename "i2c3" -> "ic2"
- add review tag
---
.../display/tegra/nvidia,tegra20-vi.yaml | 64 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 65 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml
index 782a4b10150a..da9ce76e15ef 100644
--- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml
+++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml
@@ -74,6 +74,18 @@ properties:
avdd-dsi-csi-supply:
description: DSI/CSI power supply. Must supply 1.2 V.

+ vip:
+ $ref: /schemas/display/tegra/nvidia,tegra20-vip.yaml
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Input from the VIP (parallel input capture) module
+
patternProperties:
"^csi@[0-9a-f]+$":
type: object
@@ -109,6 +121,22 @@ examples:
#include <dt-bindings/clock/tegra20-car.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ camera@48 {
+ compatible = "aptina,mt9v111";
+ reg = <0x48>;
+ clocks = <&camera_clk>;
+
+ port {
+ mt9v111_out: endpoint {
+ remote-endpoint = <&vi_vip_in>;
+ };
+ };
+ };
+ };
+
vi@54080000 {
compatible = "nvidia,tegra20-vi";
reg = <0x54080000 0x00040000>;
@@ -116,6 +144,42 @@ examples:
clocks = <&tegra_car TEGRA20_CLK_VI>;
resets = <&tegra_car 100>;
reset-names = "vi";
+
+ vip {
+ compatible = "nvidia,tegra20-vip";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ channel@0 {
+ reg = <0>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ vi_vip_in: endpoint {
+ remote-endpoint = <&mt9v111_out>;
+ };
+ };
+ port@1 {
+ reg = <1>;
+ vi_vip_out: endpoint {
+ remote-endpoint = <&vi_in>;
+ };
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ vi_in: endpoint {
+ remote-endpoint = <&vi_vip_out>;
+ };
+ };
+ };
};

- |
diff --git a/MAINTAINERS b/MAINTAINERS
index 4feb2e1258ce..dca1c47706f3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20568,6 +20568,7 @@ L: [email protected]
L: [email protected]
S: Maintained
F: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
+F: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml
F: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vip.yaml
F: drivers/staging/media/tegra-video/

--
2.34.1


2022-12-30 16:55:06

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3 02/21] dt-bindings: display: tegra: vi: add 'vip' property and example


On Thu, 29 Dec 2022 14:31:46 +0100, Luca Ceresoli wrote:
> The Tegra20 VI peripheral can receive parallel input from the VIP parallel
> input module. Add it to the allowed properties and augment the existing
> nvidia,tegra20-vi example to show a 'vip' property.
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Luca Ceresoli <[email protected]>
>
> ---
>
> Changed in v3 (suggested by Rob Herring):
> - drop 'endpoint', unneeded as there's no extra properties in the
> endpoints
>
> Changed in v2 (suggested by Krzysztof Kozlowski):
> - rename "i2c3" -> "ic2"
> - add review tag
> ---
> .../display/tegra/nvidia,tegra20-vi.yaml | 64 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 65 insertions(+)
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.example.dtb: vi@54080000: vip: Unevaluated properties are not allowed ('channel@0' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.example.dtb: vi@54080000: vip: 'ports' is a required property
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.example.dtb: vip: Unevaluated properties are not allowed ('channel@0' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vi.example.dtb: vip: 'ports' is a required property
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-vip.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.

2023-01-24 17:03:49

by Dmitry Osipenko

[permalink] [raw]
Subject: Re: [PATCH v3 02/21] dt-bindings: display: tegra: vi: add 'vip' property and example

On 12/29/22 16:31, Luca Ceresoli wrote:
> + vip {
> + compatible = "nvidia,tegra20-vip";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + channel@0 {
> + reg = <0>;
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + reg = <0>;
> + vi_vip_in: endpoint {
> + remote-endpoint = <&mt9v111_out>;
> + };
> + };
> + port@1 {
> + reg = <1>;
> + vi_vip_out: endpoint {
> + remote-endpoint = <&vi_in>;
> + };
> + };
> + };
> + };

In the changelog you said that the channel@0 node is removed

--
Best regards,
Dmitry


2023-01-24 21:14:32

by Luca Ceresoli

[permalink] [raw]
Subject: Re: [PATCH v3 02/21] dt-bindings: display: tegra: vi: add 'vip' property and example

Hi Dmitry,

On Tue, 24 Jan 2023 20:02:39 +0300
Dmitry Osipenko <[email protected]> wrote:

> On 12/29/22 16:31, Luca Ceresoli wrote:
> > + vip {
> > + compatible = "nvidia,tegra20-vip";
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + channel@0 {
> > + reg = <0>;
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + port@0 {
> > + reg = <0>;
> > + vi_vip_in: endpoint {
> > + remote-endpoint = <&mt9v111_out>;
> > + };
> > + };
> > + port@1 {
> > + reg = <1>;
> > + vi_vip_out: endpoint {
> > + remote-endpoint = <&vi_in>;
> > + };
> > + };
> > + };
> > + };
>
> In the changelog you said that the channel@0 node is removed

Thanks, you are right, this is a leftover. I must have forgotten about
updating the example. :-\

It will be fixed in v4 obviously, I was waiting before sending it in
case of any feedback on the other patches.

Best regards.
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2023-01-24 22:09:13

by Dmitry Osipenko

[permalink] [raw]
Subject: Re: [PATCH v3 02/21] dt-bindings: display: tegra: vi: add 'vip' property and example

On 1/25/23 00:14, Luca Ceresoli wrote:
> Hi Dmitry,
>
> On Tue, 24 Jan 2023 20:02:39 +0300
> Dmitry Osipenko <[email protected]> wrote:
>
>> On 12/29/22 16:31, Luca Ceresoli wrote:
>>> + vip {
>>> + compatible = "nvidia,tegra20-vip";
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> + channel@0 {
>>> + reg = <0>;
>>> + ports {
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> + port@0 {
>>> + reg = <0>;
>>> + vi_vip_in: endpoint {
>>> + remote-endpoint = <&mt9v111_out>;
>>> + };
>>> + };
>>> + port@1 {
>>> + reg = <1>;
>>> + vi_vip_out: endpoint {
>>> + remote-endpoint = <&vi_in>;
>>> + };
>>> + };
>>> + };
>>> + };
>>
>> In the changelog you said that the channel@0 node is removed
>
> Thanks, you are right, this is a leftover. I must have forgotten about
> updating the example. :-\
>
> It will be fixed in v4 obviously, I was waiting before sending it in
> case of any feedback on the other patches.

The rest of the patches look okay. The patchset should get testing on
T210 and then will be good to apply it, IMO. If nobody will volunteer to
test T210 then should be good to apply it too, we can always fix the
code later on.

--
Best regards,
Dmitry