[PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller

Inbaraj E posted 12 patches 1 month, 3 weeks ago
[PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Inbaraj E 1 month, 3 weeks ago
Document bindings for the FSD CSIS DMA controller.

Signed-off-by: Inbaraj E <inbaraj.e@samsung.com>
---
 .../bindings/media/tesla,fsd-csis-media.yaml  | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml

diff --git a/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml b/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
new file mode 100644
index 000000000000..ce6c2e58ed4e
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/tesla,fsd-csis-media.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Tesla FSD SoC MIPI CSI-2 DMA (Bridge device) receiver
+
+maintainers:
+  - Inbaraj E <inbaraj.e@samsung.com>
+
+description: |-
+  The FSD MIPI CSI-2 (Camera Serial Interface 2) have internal DMA engine to
+  capture frames originating from the sensor.
+
+properties:
+  compatible:
+    const: tesla,fsd-csis-media
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 3
+
+  clock-names:
+    items:
+      - const: aclk
+      - const: pclk
+      - const: pll
+
+  iommus:
+    maxItems: 1
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - iommus
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/fsd-clk.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    csi0: csi@12641000 {
+        compatible = "tesla,fsd-csis-media";
+        reg = <0x12661000 0x44c>;
+        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clock_csi CAM_CSI0_0_IPCLKPORT_I_ACLK>,
+                 <&clock_csi CAM_CSI0_0_IPCLKPORT_I_PCLK>,
+                 <&clock_csi CAM_CSI_PLL>;
+        clock-names = "aclk", "pclk", "pll";
+        iommus = <&smmu_isp 0x0 0x0>;
+
+        port {
+            csi_in_0: endpoint {
+                remote-endpoint = <&mipi_csis_0_out>;
+            };
+        };
+    };
+
+...
-- 
2.49.0
Re: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 14/08/2025 16:09, Inbaraj E wrote:
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - iommus
> +  - port

Also, you miss here supplies (as required).

Best regards,
Krzysztof
Re: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Laurent Pinchart 1 month, 1 week ago
Hi Krzysztof,

On Mon, Aug 18, 2025 at 10:45:17AM +0200, Krzysztof Kozlowski wrote:
> On 14/08/2025 16:09, Inbaraj E wrote:
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +  - iommus
> > +  - port
> 
> Also, you miss here supplies (as required).

Did you perhaps mean power-domains ? As far as I understand this is an
IP core internal to an SoC, so *-supply would be quite uncommon.

-- 
Regards,

Laurent Pinchart
Re: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On 24/08/2025 23:15, Laurent Pinchart wrote:
> Hi Krzysztof,
> 
> On Mon, Aug 18, 2025 at 10:45:17AM +0200, Krzysztof Kozlowski wrote:
>> On 14/08/2025 16:09, Inbaraj E wrote:
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - interrupts
>>> +  - clocks
>>> +  - clock-names
>>> +  - iommus
>>> +  - port
>>
>> Also, you miss here supplies (as required).
> 
> Did you perhaps mean power-domains ? As far as I understand this is an
> IP core internal to an SoC, so *-supply would be quite uncommon.

Yes, power domains.


Best regards,
Krzysztof
RE: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Inbaraj E 1 month, 1 week ago
Hi Krzysztof,

Thanks for the review.

> On 14/08/2025 16:09, Inbaraj E wrote:
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +  - iommus
> > +  - port
> 
> Also, you miss here supplies (as required).

According to the HW design of FSD SoC, the control to manage CSIS power is given to
a separate CPU where custom firmware runs. Therefore. The Linux side does not control
the CSIS power supplies directly and are hence not included in the device tree.
 

Regards,
Inbaraj E
Re: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On 23/08/2025 04:39, Inbaraj E wrote:
> Hi Krzysztof,
> 
> Thanks for the review.
> 
>> On 14/08/2025 16:09, Inbaraj E wrote:
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - interrupts
>>> +  - clocks
>>> +  - clock-names
>>> +  - iommus
>>> +  - port
>>
>> Also, you miss here supplies (as required).
> 
> According to the HW design of FSD SoC, the control to manage CSIS power is given to
> a separate CPU where custom firmware runs. Therefore. The Linux side does not control
> the CSIS power supplies directly and are hence not included in the device tree.

Usually this still means you vote for enabling these resources, at least
for other vendors it is like that. Unless you want to say these are
essentially always on and CANNOT be disabled ever.

Best regards,
Krzysztof
RE: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Inbaraj E 1 month, 1 week ago
Hi Krzysztof,

> > According to the HW design of FSD SoC, the control to manage CSIS
> > power is given to a separate CPU where custom firmware runs.
> > Therefore. The Linux side does not control the CSIS power supplies directly
> and are hence not included in the device tree.
> 
> Usually this still means you vote for enabling these resources, at least for
> other vendors it is like that. Unless you want to say these are essentially
> always on and CANNOT be disabled ever.

Yes, we want IP to remain enabled permanently, So we are not adding power supply
control in linux.

Regards,
Inbaraj E
Re: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On 25/08/2025 14:01, Inbaraj E wrote:
> Hi Krzysztof,
> 
>>> According to the HW design of FSD SoC, the control to manage CSIS
>>> power is given to a separate CPU where custom firmware runs.
>>> Therefore. The Linux side does not control the CSIS power supplies directly
>> and are hence not included in the device tree.
>>
>> Usually this still means you vote for enabling these resources, at least for
>> other vendors it is like that. Unless you want to say these are essentially
>> always on and CANNOT be disabled ever.
> 
> Yes, we want IP to remain enabled permanently, So we are not adding power supply
> control in linux.

Please describe it in the description: part of the binding.

Best regards,
Krzysztof
Re: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 14/08/2025 16:09, Inbaraj E wrote:
> Document bindings for the FSD CSIS DMA controller.
> 
> Signed-off-by: Inbaraj E <inbaraj.e@samsung.com>
> ---
>  .../bindings/media/tesla,fsd-csis-media.yaml  | 74 +++++++++++++++++++

Your patchset is organized in total mess. First clock, then media
bindings, then arm64,  then media drivers, then media bindings, then
arm64... Please organize it in standard way - about independent
subsystems I mentioned, so within media first bindings, then driver. Not
intermixed.



>  1 file changed, 74 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
> 
> diff --git a/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml b/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
> new file mode 100644
> index 000000000000..ce6c2e58ed4e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/tesla,fsd-csis-media.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tesla FSD SoC MIPI CSI-2 DMA (Bridge device) receiver
> +
> +maintainers:
> +  - Inbaraj E <inbaraj.e@samsung.com>
> +
> +description: |-

Drop |-

> +  The FSD MIPI CSI-2 (Camera Serial Interface 2) have internal DMA engine to
> +  capture frames originating from the sensor.
> +
> +properties:
> +  compatible:
> +    const: tesla,fsd-csis-media
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 3
> +
> +  clock-names:
> +    items:
> +      - const: aclk
> +      - const: pclk
> +      - const: pll
> +
> +  iommus:
> +    maxItems: 1
> +
> +  port:
> +    $ref: /schemas/graph.yaml#/properties/port

Don't you need second port to CSIS block? I guess this one is input from
the sensor?

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - iommus
> +  - port



Best regards,
Krzysztof
RE: [PATCH v2 10/12] dt-bindings: media: fsd: Document CSIS DMA controller
Posted by Inbaraj E 1 month, 1 week ago
Hi Krzysztof,

Thanks for the review.

> 
> On 14/08/2025 16:09, Inbaraj E wrote:
> > Document bindings for the FSD CSIS DMA controller.
> >
> > Signed-off-by: Inbaraj E <inbaraj.e@samsung.com>
> > ---
> >  .../bindings/media/tesla,fsd-csis-media.yaml  | 74
> > +++++++++++++++++++
> 
> Your patchset is organized in total mess. First clock, then media bindings,
> then arm64,  then media drivers, then media bindings, then arm64... Please
> organize it in standard way - about independent subsystems I mentioned, so
> within media first bindings, then driver. Not intermixed.

I'll update in next patchset.

> 
> 
> 
> >  1 file changed, 74 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
> >
> > diff --git
> > a/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
> > b/Documentation/devicetree/bindings/media/tesla,fsd-csis-media.yaml
> > new file mode 100644
> > index 000000000000..ce6c2e58ed4e
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/tesla,fsd-csis-
> media.yam
> > +++ l
> > @@ -0,0 +1,74 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> > +https://protect2.fireeye.com/v1/url?k=21cb70d9-4129ed84-21cafb96-
> 000b
> > +abd9f1ba-63c99c5193b8964e&q=1&e=f7087d49-8d33-4468-9323-
> 67fa9fa72e40&
> >
> +u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fmedia%2Ftesla%2Cfsd-
> csis-me
> > +dia.yaml%23
> > +$schema:
> > +https://protect2.fireeye.com/v1/url?k=4db8909d-2d5a0dc0-4db91bd2-
> 000b
> > +abd9f1ba-be3588ecc45596c1&q=1&e=f7087d49-8d33-4468-9323-
> 67fa9fa72e40&
> > +u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23
> > +
> > +title: Tesla FSD SoC MIPI CSI-2 DMA (Bridge device) receiver
> > +
> > +maintainers:
> > +  - Inbaraj E <inbaraj.e@samsung.com>
> > +
> > +description: |-
> 
> Drop |-
> 
> > +  The FSD MIPI CSI-2 (Camera Serial Interface 2) have internal DMA
> > + engine to  capture frames originating from the sensor.
> > +
> > +properties:
> > +  compatible:
> > +    const: tesla,fsd-csis-media
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 3
> > +
> > +  clock-names:
> > +    items:
> > +      - const: aclk
> > +      - const: pclk
> > +      - const: pll
> > +
> > +  iommus:
> > +    maxItems: 1
> > +
> > +  port:
> > +    $ref: /schemas/graph.yaml#/properties/port
> 
> Don't you need second port to CSIS block?

No, one port is sufficient.
This port represent CSIS DMA and connected to CSIS (imx-mipi-csis node)

 I guess this one is input from the
> sensor?

No, it is input from CSIS(imx-mipi-csis).

Regards,
Inbaraj E