xref: /freebsd/sys/contrib/device-tree/Bindings/display/xylon,logicvc-display.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot# Copyright 2019 Bootlin
38cc087a1SEmmanuel Vadot%YAML 1.2
48cc087a1SEmmanuel Vadot---
5*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/display/xylon,logicvc-display.yaml#
6*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
78cc087a1SEmmanuel Vadot
88cc087a1SEmmanuel Vadottitle: Xylon LogiCVC display controller
98cc087a1SEmmanuel Vadot
108cc087a1SEmmanuel Vadotmaintainers:
118cc087a1SEmmanuel Vadot  - Paul Kocialkowski <paul.kocialkowski@bootlin.com>
128cc087a1SEmmanuel Vadot
138cc087a1SEmmanuel Vadotdescription: |
148cc087a1SEmmanuel Vadot  The Xylon LogiCVC is a display controller that supports multiple layers.
158cc087a1SEmmanuel Vadot  It is usually implemented as programmable logic and was optimized for use
168cc087a1SEmmanuel Vadot  with Xilinx Zynq-7000 SoCs and Xilinx FPGAs.
178cc087a1SEmmanuel Vadot
188cc087a1SEmmanuel Vadot  Because the controller is intended for use in a FPGA, most of the
198cc087a1SEmmanuel Vadot  configuration of the controller takes place at logic configuration bitstream
208cc087a1SEmmanuel Vadot  synthesis time. As a result, many of the device-tree bindings are meant to
218cc087a1SEmmanuel Vadot  reflect the synthesis configuration and must not be configured differently.
228cc087a1SEmmanuel Vadot  Matching synthesis parameters are provided when applicable.
238cc087a1SEmmanuel Vadot
248cc087a1SEmmanuel Vadot  Layers are declared in the "layers" sub-node and have dedicated configuration.
258cc087a1SEmmanuel Vadot  In version 3 of the controller, each layer has fixed memory offset and address
268cc087a1SEmmanuel Vadot  starting from the video memory base address for its framebuffer. In version 4,
278cc087a1SEmmanuel Vadot  framebuffers are configured with a direct memory address instead.
288cc087a1SEmmanuel Vadot
298cc087a1SEmmanuel Vadotproperties:
308cc087a1SEmmanuel Vadot  compatible:
318cc087a1SEmmanuel Vadot    enum:
328cc087a1SEmmanuel Vadot      - xylon,logicvc-3.02.a-display
338cc087a1SEmmanuel Vadot      - xylon,logicvc-4.01.a-display
348cc087a1SEmmanuel Vadot
358cc087a1SEmmanuel Vadot  reg:
368cc087a1SEmmanuel Vadot    maxItems: 1
378cc087a1SEmmanuel Vadot
388cc087a1SEmmanuel Vadot  clocks:
398cc087a1SEmmanuel Vadot    minItems: 1
408cc087a1SEmmanuel Vadot    maxItems: 4
418cc087a1SEmmanuel Vadot
428cc087a1SEmmanuel Vadot  clock-names:
438cc087a1SEmmanuel Vadot    minItems: 1
448cc087a1SEmmanuel Vadot    items:
458cc087a1SEmmanuel Vadot      # vclk is required and must be provided as first item.
468cc087a1SEmmanuel Vadot      - const: vclk
478cc087a1SEmmanuel Vadot      # Other clocks are optional and can be provided in any order.
488cc087a1SEmmanuel Vadot      - enum:
498cc087a1SEmmanuel Vadot          - vclk2
508cc087a1SEmmanuel Vadot          - lvdsclk
518cc087a1SEmmanuel Vadot          - lvdsclkn
528cc087a1SEmmanuel Vadot      - enum:
538cc087a1SEmmanuel Vadot          - vclk2
548cc087a1SEmmanuel Vadot          - lvdsclk
558cc087a1SEmmanuel Vadot          - lvdsclkn
568cc087a1SEmmanuel Vadot      - enum:
578cc087a1SEmmanuel Vadot          - vclk2
588cc087a1SEmmanuel Vadot          - lvdsclk
598cc087a1SEmmanuel Vadot          - lvdsclkn
608cc087a1SEmmanuel Vadot
618cc087a1SEmmanuel Vadot  interrupts:
628cc087a1SEmmanuel Vadot    maxItems: 1
638cc087a1SEmmanuel Vadot
648cc087a1SEmmanuel Vadot  memory-region:
658cc087a1SEmmanuel Vadot    maxItems: 1
668cc087a1SEmmanuel Vadot
678cc087a1SEmmanuel Vadot  xylon,display-interface:
688cc087a1SEmmanuel Vadot    enum:
698cc087a1SEmmanuel Vadot      # Parallel RGB interface (C_DISPLAY_INTERFACE == 0)
708cc087a1SEmmanuel Vadot      - parallel-rgb
718cc087a1SEmmanuel Vadot      # ITU-T BR656 interface (C_DISPLAY_INTERFACE == 1)
728cc087a1SEmmanuel Vadot      - bt656
738cc087a1SEmmanuel Vadot      # 4-bit LVDS interface (C_DISPLAY_INTERFACE == 2)
748cc087a1SEmmanuel Vadot      - lvds-4bits
758cc087a1SEmmanuel Vadot      # 3-bit LVDS interface (C_DISPLAY_INTERFACE == 4)
768cc087a1SEmmanuel Vadot      - lvds-3bits
778cc087a1SEmmanuel Vadot      # DVI interface (C_DISPLAY_INTERFACE == 5)
788cc087a1SEmmanuel Vadot      - dvi
798cc087a1SEmmanuel Vadot    description: Display output interface (C_DISPLAY_INTERFACE).
808cc087a1SEmmanuel Vadot
818cc087a1SEmmanuel Vadot  xylon,display-colorspace:
828cc087a1SEmmanuel Vadot    enum:
838cc087a1SEmmanuel Vadot      # RGB colorspace (C_DISPLAY_COLOR_SPACE == 0)
848cc087a1SEmmanuel Vadot      - rgb
858cc087a1SEmmanuel Vadot      # YUV 4:2:2 colorspace (C_DISPLAY_COLOR_SPACE == 1)
868cc087a1SEmmanuel Vadot      - yuv422
878cc087a1SEmmanuel Vadot      # YUV 4:4:4 colorspace (C_DISPLAY_COLOR_SPACE == 2)
888cc087a1SEmmanuel Vadot      - yuv444
898cc087a1SEmmanuel Vadot    description: Display output colorspace (C_DISPLAY_COLOR_SPACE).
908cc087a1SEmmanuel Vadot
918cc087a1SEmmanuel Vadot  xylon,display-depth:
92*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
938cc087a1SEmmanuel Vadot    description: Display output depth (C_PIXEL_DATA_WIDTH).
948cc087a1SEmmanuel Vadot
958cc087a1SEmmanuel Vadot  xylon,row-stride:
96*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
978cc087a1SEmmanuel Vadot    description: Fixed number of pixels in a framebuffer row (C_ROW_STRIDE).
988cc087a1SEmmanuel Vadot
998cc087a1SEmmanuel Vadot  xylon,dithering:
100*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
1018cc087a1SEmmanuel Vadot    description: Dithering module is enabled (C_XCOLOR)
1028cc087a1SEmmanuel Vadot
1038cc087a1SEmmanuel Vadot  xylon,background-layer:
104*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
1058cc087a1SEmmanuel Vadot    description: |
1068cc087a1SEmmanuel Vadot      The last layer is used to display a black background (C_USE_BACKGROUND).
1078cc087a1SEmmanuel Vadot      The layer must still be registered.
1088cc087a1SEmmanuel Vadot
1098cc087a1SEmmanuel Vadot  xylon,layers-configurable:
110*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
1118cc087a1SEmmanuel Vadot    description: |
1128cc087a1SEmmanuel Vadot      Configuration of layers' size, position and offset is enabled
1138cc087a1SEmmanuel Vadot      (C_USE_SIZE_POSITION).
1148cc087a1SEmmanuel Vadot
1158cc087a1SEmmanuel Vadot  layers:
1168cc087a1SEmmanuel Vadot    type: object
1178cc087a1SEmmanuel Vadot
1188cc087a1SEmmanuel Vadot    properties:
1198cc087a1SEmmanuel Vadot      "#address-cells":
1208cc087a1SEmmanuel Vadot        const: 1
1218cc087a1SEmmanuel Vadot
1228cc087a1SEmmanuel Vadot      "#size-cells":
1238cc087a1SEmmanuel Vadot        const: 0
1248cc087a1SEmmanuel Vadot
1258cc087a1SEmmanuel Vadot    patternProperties:
1268cc087a1SEmmanuel Vadot      "^layer@[0-9]+$":
1278cc087a1SEmmanuel Vadot        type: object
1288cc087a1SEmmanuel Vadot
1298cc087a1SEmmanuel Vadot        properties:
1308cc087a1SEmmanuel Vadot          reg:
1318cc087a1SEmmanuel Vadot            maxItems: 1
1328cc087a1SEmmanuel Vadot
1338cc087a1SEmmanuel Vadot          xylon,layer-depth:
134*fac71e4eSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
1358cc087a1SEmmanuel Vadot            description: Layer depth (C_LAYER_X_DATA_WIDTH).
1368cc087a1SEmmanuel Vadot
1378cc087a1SEmmanuel Vadot          xylon,layer-colorspace:
1388cc087a1SEmmanuel Vadot            enum:
1398cc087a1SEmmanuel Vadot              # RGB colorspace (C_LAYER_X_TYPE == 0)
1408cc087a1SEmmanuel Vadot              - rgb
1418cc087a1SEmmanuel Vadot              # YUV packed colorspace (C_LAYER_X_TYPE == 0)
1428cc087a1SEmmanuel Vadot              - yuv
1438cc087a1SEmmanuel Vadot            description: Layer colorspace (C_LAYER_X_TYPE).
1448cc087a1SEmmanuel Vadot
1458cc087a1SEmmanuel Vadot          xylon,layer-alpha-mode:
1468cc087a1SEmmanuel Vadot            enum:
1478cc087a1SEmmanuel Vadot              # Alpha is configured layer-wide (C_LAYER_X_ALPHA_MODE == 0)
1488cc087a1SEmmanuel Vadot              - layer
1498cc087a1SEmmanuel Vadot              # Alpha is configured per-pixel (C_LAYER_X_ALPHA_MODE == 1)
1508cc087a1SEmmanuel Vadot              - pixel
1518cc087a1SEmmanuel Vadot            description: Alpha mode for the layer (C_LAYER_X_ALPHA_MODE).
1528cc087a1SEmmanuel Vadot
1538cc087a1SEmmanuel Vadot          xylon,layer-base-offset:
154*fac71e4eSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
1558cc087a1SEmmanuel Vadot            description: |
1568cc087a1SEmmanuel Vadot              Offset in number of lines (C_LAYER_X_OFFSET) starting from the
1578cc087a1SEmmanuel Vadot              video RAM base (C_VMEM_BASEADDR), only for version 3.
1588cc087a1SEmmanuel Vadot
1598cc087a1SEmmanuel Vadot          xylon,layer-buffer-offset:
160*fac71e4eSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
1618cc087a1SEmmanuel Vadot            description: |
1628cc087a1SEmmanuel Vadot              Offset in number of lines (C_BUFFER_*_OFFSET) starting from the
1638cc087a1SEmmanuel Vadot              layer base offset for the second buffer used in double-buffering.
1648cc087a1SEmmanuel Vadot
1658cc087a1SEmmanuel Vadot          xylon,layer-primary:
166*fac71e4eSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/flag
1678cc087a1SEmmanuel Vadot            description: |
1688cc087a1SEmmanuel Vadot              Layer should be registered as a primary plane (exactly one is
1698cc087a1SEmmanuel Vadot              required).
1708cc087a1SEmmanuel Vadot
1718cc087a1SEmmanuel Vadot        additionalProperties: false
1728cc087a1SEmmanuel Vadot
1738cc087a1SEmmanuel Vadot        required:
1748cc087a1SEmmanuel Vadot          - reg
1758cc087a1SEmmanuel Vadot          - xylon,layer-depth
1768cc087a1SEmmanuel Vadot          - xylon,layer-colorspace
1778cc087a1SEmmanuel Vadot          - xylon,layer-alpha-mode
1788cc087a1SEmmanuel Vadot
1798cc087a1SEmmanuel Vadot    required:
1808cc087a1SEmmanuel Vadot      - "#address-cells"
1818cc087a1SEmmanuel Vadot      - "#size-cells"
1828cc087a1SEmmanuel Vadot      - layer@0
1838cc087a1SEmmanuel Vadot
1848cc087a1SEmmanuel Vadot    additionalProperties: false
1858cc087a1SEmmanuel Vadot
1868cc087a1SEmmanuel Vadot    description: |
1878cc087a1SEmmanuel Vadot      The description of the display controller layers, containing layer
1888cc087a1SEmmanuel Vadot      sub-nodes that each describe a registered layer.
1898cc087a1SEmmanuel Vadot
1908cc087a1SEmmanuel Vadot  port:
1918cc087a1SEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/port
1928cc087a1SEmmanuel Vadot    description: |
1938cc087a1SEmmanuel Vadot      Video output port, typically connected to a panel or bridge.
1948cc087a1SEmmanuel Vadot
1958cc087a1SEmmanuel VadotadditionalProperties: false
1968cc087a1SEmmanuel Vadot
1978cc087a1SEmmanuel Vadotrequired:
1988cc087a1SEmmanuel Vadot  - compatible
1998cc087a1SEmmanuel Vadot  - reg
2008cc087a1SEmmanuel Vadot  - clocks
2018cc087a1SEmmanuel Vadot  - clock-names
2028cc087a1SEmmanuel Vadot  - interrupts
2038cc087a1SEmmanuel Vadot  - xylon,display-interface
2048cc087a1SEmmanuel Vadot  - xylon,display-colorspace
2058cc087a1SEmmanuel Vadot  - xylon,display-depth
2068cc087a1SEmmanuel Vadot  - xylon,row-stride
2078cc087a1SEmmanuel Vadot  - layers
2088cc087a1SEmmanuel Vadot  - port
2098cc087a1SEmmanuel Vadot
2108cc087a1SEmmanuel Vadotexamples:
2118cc087a1SEmmanuel Vadot  - |
2128cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
2138cc087a1SEmmanuel Vadot
2148cc087a1SEmmanuel Vadot    logicvc: logicvc@43c00000 {
2158cc087a1SEmmanuel Vadot      compatible = "xylon,logicvc-3.02.a", "syscon", "simple-mfd";
2168cc087a1SEmmanuel Vadot      reg = <0x43c00000 0x6000>;
2178cc087a1SEmmanuel Vadot
2188cc087a1SEmmanuel Vadot      #address-cells = <1>;
2198cc087a1SEmmanuel Vadot      #size-cells = <1>;
2208cc087a1SEmmanuel Vadot
2218cc087a1SEmmanuel Vadot      logicvc_display: display@0 {
2228cc087a1SEmmanuel Vadot        compatible = "xylon,logicvc-3.02.a-display";
2238cc087a1SEmmanuel Vadot        reg = <0x0 0x6000>;
2248cc087a1SEmmanuel Vadot
2258cc087a1SEmmanuel Vadot        memory-region = <&logicvc_cma>;
2268cc087a1SEmmanuel Vadot
2278cc087a1SEmmanuel Vadot        clocks = <&logicvc_vclk 0>, <&logicvc_lvdsclk 0>;
2288cc087a1SEmmanuel Vadot        clock-names = "vclk", "lvdsclk";
2298cc087a1SEmmanuel Vadot
2308cc087a1SEmmanuel Vadot        interrupt-parent = <&intc>;
2318cc087a1SEmmanuel Vadot        interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>;
2328cc087a1SEmmanuel Vadot
2338cc087a1SEmmanuel Vadot        xylon,display-interface = "lvds-4bits";
2348cc087a1SEmmanuel Vadot        xylon,display-colorspace = "rgb";
2358cc087a1SEmmanuel Vadot        xylon,display-depth = <16>;
2368cc087a1SEmmanuel Vadot        xylon,row-stride = <1024>;
2378cc087a1SEmmanuel Vadot
2388cc087a1SEmmanuel Vadot        xylon,layers-configurable;
2398cc087a1SEmmanuel Vadot
2408cc087a1SEmmanuel Vadot        layers {
2418cc087a1SEmmanuel Vadot          #address-cells = <1>;
2428cc087a1SEmmanuel Vadot          #size-cells = <0>;
2438cc087a1SEmmanuel Vadot
2448cc087a1SEmmanuel Vadot          layer@0 {
2458cc087a1SEmmanuel Vadot            reg = <0>;
2468cc087a1SEmmanuel Vadot            xylon,layer-depth = <16>;
2478cc087a1SEmmanuel Vadot            xylon,layer-colorspace = "rgb";
2488cc087a1SEmmanuel Vadot            xylon,layer-alpha-mode = "layer";
2498cc087a1SEmmanuel Vadot            xylon,layer-base-offset = <0>;
2508cc087a1SEmmanuel Vadot            xylon,layer-buffer-offset = <480>;
2518cc087a1SEmmanuel Vadot            xylon,layer-primary;
2528cc087a1SEmmanuel Vadot          };
2538cc087a1SEmmanuel Vadot
2548cc087a1SEmmanuel Vadot          layer@1 {
2558cc087a1SEmmanuel Vadot            reg = <1>;
2568cc087a1SEmmanuel Vadot            xylon,layer-depth = <16>;
2578cc087a1SEmmanuel Vadot            xylon,layer-colorspace = "rgb";
2588cc087a1SEmmanuel Vadot            xylon,layer-alpha-mode = "layer";
2598cc087a1SEmmanuel Vadot            xylon,layer-base-offset = <2400>;
2608cc087a1SEmmanuel Vadot            xylon,layer-buffer-offset = <480>;
2618cc087a1SEmmanuel Vadot          };
2628cc087a1SEmmanuel Vadot
2638cc087a1SEmmanuel Vadot          layer@2 {
2648cc087a1SEmmanuel Vadot            reg = <2>;
2658cc087a1SEmmanuel Vadot            xylon,layer-depth = <16>;
2668cc087a1SEmmanuel Vadot            xylon,layer-colorspace = "rgb";
2678cc087a1SEmmanuel Vadot            xylon,layer-alpha-mode = "layer";
2688cc087a1SEmmanuel Vadot            xylon,layer-base-offset = <960>;
2698cc087a1SEmmanuel Vadot            xylon,layer-buffer-offset = <480>;
2708cc087a1SEmmanuel Vadot          };
2718cc087a1SEmmanuel Vadot
2728cc087a1SEmmanuel Vadot          layer@3 {
2738cc087a1SEmmanuel Vadot            reg = <3>;
2748cc087a1SEmmanuel Vadot            xylon,layer-depth = <16>;
2758cc087a1SEmmanuel Vadot            xylon,layer-colorspace = "rgb";
2768cc087a1SEmmanuel Vadot            xylon,layer-alpha-mode = "layer";
2778cc087a1SEmmanuel Vadot            xylon,layer-base-offset = <480>;
2788cc087a1SEmmanuel Vadot            xylon,layer-buffer-offset = <480>;
2798cc087a1SEmmanuel Vadot          };
2808cc087a1SEmmanuel Vadot
2818cc087a1SEmmanuel Vadot          layer@4 {
2828cc087a1SEmmanuel Vadot            reg = <4>;
2838cc087a1SEmmanuel Vadot            xylon,layer-depth = <16>;
2848cc087a1SEmmanuel Vadot            xylon,layer-colorspace = "rgb";
2858cc087a1SEmmanuel Vadot            xylon,layer-alpha-mode = "layer";
2868cc087a1SEmmanuel Vadot            xylon,layer-base-offset = <8192>;
2878cc087a1SEmmanuel Vadot            xylon,layer-buffer-offset = <480>;
2888cc087a1SEmmanuel Vadot          };
2898cc087a1SEmmanuel Vadot        };
2908cc087a1SEmmanuel Vadot
2918cc087a1SEmmanuel Vadot        port {
2928cc087a1SEmmanuel Vadot          #address-cells = <1>;
2938cc087a1SEmmanuel Vadot          #size-cells = <0>;
2948cc087a1SEmmanuel Vadot
2958cc087a1SEmmanuel Vadot          logicvc_output: endpoint@0 {
2968cc087a1SEmmanuel Vadot            reg = <0>;
2978cc087a1SEmmanuel Vadot            remote-endpoint = <&panel_input>;
2988cc087a1SEmmanuel Vadot          };
2998cc087a1SEmmanuel Vadot        };
3008cc087a1SEmmanuel Vadot      };
3018cc087a1SEmmanuel Vadot    };
302