brintos

brintos / linux-shallow public Read only

0
0
Text · 16.4 KiB · 724d93b Raw
678 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/display/allwinner,sun4i-a10-tcon.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Allwinner A10 Timings Controller (TCON)8 9maintainers:10  - Chen-Yu Tsai <wens@csie.org>11  - Maxime Ripard <mripard@kernel.org>12 13description: |14  The TCON acts as a timing controller for RGB, LVDS and TV15  interfaces.16 17properties:18  "#clock-cells":19    const: 020 21  compatible:22    oneOf:23      - const: allwinner,sun4i-a10-tcon24      - const: allwinner,sun5i-a13-tcon25      - const: allwinner,sun6i-a31-tcon26      - const: allwinner,sun6i-a31s-tcon27      - const: allwinner,sun7i-a20-tcon28      - const: allwinner,sun8i-a23-tcon29      - const: allwinner,sun8i-a33-tcon30      - const: allwinner,sun8i-a83t-tcon-lcd31      - const: allwinner,sun8i-a83t-tcon-tv32      - const: allwinner,sun8i-r40-tcon-tv33      - const: allwinner,sun8i-v3s-tcon34      - const: allwinner,sun9i-a80-tcon-lcd35      - const: allwinner,sun9i-a80-tcon-tv36      - const: allwinner,sun20i-d1-tcon-lcd37      - const: allwinner,sun20i-d1-tcon-tv38 39      - items:40          - enum:41              - allwinner,sun7i-a20-tcon042              - allwinner,sun7i-a20-tcon143          - const: allwinner,sun7i-a20-tcon44 45      - items:46          - enum:47              - allwinner,sun50i-a64-tcon-lcd48          - const: allwinner,sun8i-a83t-tcon-lcd49 50      - items:51          - enum:52              - allwinner,sun8i-h3-tcon-tv53              - allwinner,sun50i-a64-tcon-tv54          - const: allwinner,sun8i-a83t-tcon-tv55 56      - items:57          - enum:58              - allwinner,sun50i-h6-tcon-tv59          - const: allwinner,sun8i-r40-tcon-tv60 61  reg:62    maxItems: 163 64  interrupts:65    maxItems: 166 67  clocks:68    minItems: 169    maxItems: 470 71  clock-names:72    minItems: 173    maxItems: 474 75  clock-output-names:76    description:77      Name of the LCD pixel clock created.78    maxItems: 179 80  dmas:81    maxItems: 182 83  resets:84    anyOf:85      - items:86          - description: TCON Reset Line87 88      - items:89          - description: TCON Reset Line90          - description: TCON LVDS Reset Line91 92      - items:93          - description: TCON Reset Line94          - description: TCON eDP Reset Line95 96      - items:97          - description: TCON Reset Line98          - description: TCON eDP Reset Line99          - description: TCON LVDS Reset Line100 101  reset-names:102    oneOf:103      - const: lcd104 105      - items:106          - const: lcd107          - const: lvds108 109      - items:110          - const: lcd111          - const: edp112 113      - items:114          - const: lcd115          - const: edp116          - const: lvds117 118  ports:119    $ref: /schemas/graph.yaml#/properties/ports120 121    properties:122      port@0:123        $ref: /schemas/graph.yaml#/properties/port124        description: |125          Input endpoints of the controller.126 127      port@1:128        $ref: /schemas/graph.yaml#/$defs/port-base129        unevaluatedProperties: false130        description: |131          Output endpoints of the controller.132 133        patternProperties:134          "^endpoint(@[0-9])$":135            $ref: /schemas/graph.yaml#/$defs/endpoint-base136            unevaluatedProperties: false137 138            properties:139              allwinner,tcon-channel:140                $ref: /schemas/types.yaml#/definitions/uint32141                description: |142                  TCON can have 1 or 2 channels, usually with the143                  first channel being used for the panels interfaces144                  (RGB, LVDS, etc.), and the second being used for the145                  outputs that require another controller (TV Encoder,146                  HDMI, etc.).147 148                  If that property is present, specifies the TCON149                  channel the endpoint is associated to. If that150                  property is not present, the endpoint number will be151                  used as the channel number.152 153    required:154      - port@0155      - port@1156 157required:158  - compatible159  - reg160  - interrupts161  - clocks162  - clock-names163  - resets164  - ports165 166additionalProperties: false167 168allOf:169  - if:170      properties:171        compatible:172          contains:173            enum:174              - allwinner,sun4i-a10-tcon175              - allwinner,sun5i-a13-tcon176              - allwinner,sun7i-a20-tcon177 178    then:179      properties:180        clocks:181          minItems: 3182 183        clock-names:184          items:185            - const: ahb186            - const: tcon-ch0187            - const: tcon-ch1188 189  - if:190      properties:191        compatible:192          contains:193            enum:194              - allwinner,sun6i-a31-tcon195              - allwinner,sun6i-a31s-tcon196 197    then:198      properties:199        clocks:200          minItems: 4201 202        clock-names:203          items:204            - const: ahb205            - const: tcon-ch0206            - const: tcon-ch1207            - const: lvds-alt208 209  - if:210      properties:211        compatible:212          contains:213            enum:214              - allwinner,sun8i-a23-tcon215              - allwinner,sun8i-a33-tcon216 217    then:218      properties:219        clocks:220          minItems: 3221 222        clock-names:223          items:224            - const: ahb225            - const: tcon-ch0226            - const: lvds-alt227 228  - if:229      properties:230        compatible:231          contains:232            enum:233              - allwinner,sun8i-a83t-tcon-lcd234              - allwinner,sun8i-v3s-tcon235              - allwinner,sun9i-a80-tcon-lcd236              - allwinner,sun20i-d1-tcon-lcd237 238    then:239      properties:240        clocks:241          minItems: 2242 243        clock-names:244          items:245            - const: ahb246            - const: tcon-ch0247 248  - if:249      properties:250        compatible:251          contains:252            enum:253              - allwinner,sun8i-a83t-tcon-tv254              - allwinner,sun8i-r40-tcon-tv255              - allwinner,sun9i-a80-tcon-tv256              - allwinner,sun20i-d1-tcon-tv257 258    then:259      properties:260        clocks:261          minItems: 2262 263        clock-names:264          items:265            - const: ahb266            - const: tcon-ch1267 268  - if:269      properties:270        compatible:271          contains:272            enum:273              - allwinner,sun5i-a13-tcon274              - allwinner,sun6i-a31-tcon275              - allwinner,sun6i-a31s-tcon276              - allwinner,sun7i-a20-tcon277              - allwinner,sun8i-a23-tcon278              - allwinner,sun8i-a33-tcon279              - allwinner,sun8i-v3s-tcon280              - allwinner,sun9i-a80-tcon-lcd281              - allwinner,sun4i-a10-tcon282              - allwinner,sun8i-a83t-tcon-lcd283              - allwinner,sun20i-d1-tcon-lcd284 285    then:286      required:287        - "#clock-cells"288        - clock-output-names289 290  - if:291      properties:292        compatible:293          contains:294            enum:295              - allwinner,sun6i-a31-tcon296              - allwinner,sun6i-a31s-tcon297              - allwinner,sun8i-a23-tcon298              - allwinner,sun8i-a33-tcon299              - allwinner,sun8i-a83t-tcon-lcd300              - allwinner,sun20i-d1-tcon-lcd301 302    then:303      properties:304        resets:305          minItems: 2306 307        reset-names:308          items:309            - const: lcd310            - const: lvds311 312  - if:313      properties:314        compatible:315          contains:316            enum:317              - allwinner,sun9i-a80-tcon-lcd318 319    then:320      properties:321        resets:322          minItems: 3323 324        reset-names:325          items:326            - const: lcd327            - const: edp328            - const: lvds329 330  - if:331      properties:332        compatible:333          contains:334            enum:335              - allwinner,sun9i-a80-tcon-tv336 337    then:338      properties:339        resets:340          minItems: 2341 342        reset-names:343          items:344            - const: lcd345            - const: edp346 347  - if:348      properties:349        compatible:350          contains:351            enum:352              - allwinner,sun4i-a10-tcon353              - allwinner,sun5i-a13-tcon354              - allwinner,sun6i-a31-tcon355              - allwinner,sun6i-a31s-tcon356              - allwinner,sun7i-a20-tcon357              - allwinner,sun8i-a23-tcon358              - allwinner,sun8i-a33-tcon359 360    then:361      required:362        - dmas363 364examples:365  - |366    #include <dt-bindings/dma/sun4i-a10.h>367 368    /*369     * This comes from the clock/sun4i-a10-ccu.h and370     * reset/sun4i-a10-ccu.h headers, but we can't include them since371     * it would trigger a bunch of warnings for redefinitions of372     * symbols with the other example.373     */374 375    #define CLK_AHB_LCD0	56376    #define CLK_TCON0_CH0	149377    #define CLK_TCON0_CH1	155378    #define RST_TCON0		11379 380    lcd-controller@1c0c000 {381        compatible = "allwinner,sun4i-a10-tcon";382        reg = <0x01c0c000 0x1000>;383        interrupts = <44>;384        resets = <&ccu RST_TCON0>;385        reset-names = "lcd";386        clocks = <&ccu CLK_AHB_LCD0>,387                 <&ccu CLK_TCON0_CH0>,388                 <&ccu CLK_TCON0_CH1>;389        clock-names = "ahb",390                      "tcon-ch0",391                      "tcon-ch1";392        clock-output-names = "tcon0-pixel-clock";393        #clock-cells = <0>;394        dmas = <&dma SUN4I_DMA_DEDICATED 14>;395 396        ports {397            #address-cells = <1>;398            #size-cells = <0>;399 400            port@0 {401                #address-cells = <1>;402                #size-cells = <0>;403                reg = <0>;404 405                endpoint@0 {406                    reg = <0>;407                    remote-endpoint = <&be0_out_tcon0>;408                };409 410                endpoint@1 {411                    reg = <1>;412                    remote-endpoint = <&be1_out_tcon0>;413                };414            };415 416            port@1 {417                #address-cells = <1>;418                #size-cells = <0>;419                reg = <1>;420 421                endpoint@1 {422                    reg = <1>;423                    remote-endpoint = <&hdmi_in_tcon0>;424                    allwinner,tcon-channel = <1>;425                };426            };427        };428    };429 430    #undef CLK_AHB_LCD0431    #undef CLK_TCON0_CH0432    #undef CLK_TCON0_CH1433    #undef RST_TCON0434 435  - |436    #include <dt-bindings/interrupt-controller/arm-gic.h>437 438    /*439     * This comes from the clock/sun6i-a31-ccu.h and440     * reset/sun6i-a31-ccu.h headers, but we can't include them since441     * it would trigger a bunch of warnings for redefinitions of442     * symbols with the other example.443     */444 445    #define CLK_PLL_MIPI	15446    #define CLK_AHB1_LCD0	47447    #define CLK_LCD0_CH0	127448    #define CLK_LCD0_CH1	129449    #define RST_AHB1_LCD0	27450    #define RST_AHB1_LVDS	41451 452    lcd-controller@1c0c000 {453        compatible = "allwinner,sun6i-a31-tcon";454        reg = <0x01c0c000 0x1000>;455        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;456        dmas = <&dma 11>;457        resets = <&ccu RST_AHB1_LCD0>, <&ccu RST_AHB1_LVDS>;458        reset-names = "lcd", "lvds";459        clocks = <&ccu CLK_AHB1_LCD0>,460                 <&ccu CLK_LCD0_CH0>,461                 <&ccu CLK_LCD0_CH1>,462                 <&ccu CLK_PLL_MIPI>;463        clock-names = "ahb",464                      "tcon-ch0",465                      "tcon-ch1",466                      "lvds-alt";467        clock-output-names = "tcon0-pixel-clock";468        #clock-cells = <0>;469 470        ports {471            #address-cells = <1>;472            #size-cells = <0>;473 474            port@0 {475                #address-cells = <1>;476                #size-cells = <0>;477                reg = <0>;478 479                endpoint@0 {480                    reg = <0>;481                    remote-endpoint = <&drc0_out_tcon0>;482                };483 484                endpoint@1 {485                    reg = <1>;486                    remote-endpoint = <&drc1_out_tcon0>;487                };488            };489 490            port@1 {491                #address-cells = <1>;492                #size-cells = <0>;493                reg = <1>;494 495                endpoint@1 {496                    reg = <1>;497                    remote-endpoint = <&hdmi_in_tcon0>;498                    allwinner,tcon-channel = <1>;499                };500            };501        };502    };503 504    #undef CLK_PLL_MIPI505    #undef CLK_AHB1_LCD0506    #undef CLK_LCD0_CH0507    #undef CLK_LCD0_CH1508    #undef RST_AHB1_LCD0509    #undef RST_AHB1_LVDS510 511  - |512    #include <dt-bindings/interrupt-controller/arm-gic.h>513 514    /*515     * This comes from the clock/sun9i-a80-ccu.h and516     * reset/sun9i-a80-ccu.h headers, but we can't include them since517     * it would trigger a bunch of warnings for redefinitions of518     * symbols with the other example.519     */520 521    #define CLK_BUS_LCD0	102522    #define CLK_LCD0		58523    #define RST_BUS_LCD0	22524    #define RST_BUS_EDP		24525    #define RST_BUS_LVDS	25526 527    lcd-controller@3c00000 {528        compatible = "allwinner,sun9i-a80-tcon-lcd";529        reg = <0x03c00000 0x10000>;530        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;531        clocks = <&ccu CLK_BUS_LCD0>, <&ccu CLK_LCD0>;532        clock-names = "ahb", "tcon-ch0";533        resets = <&ccu RST_BUS_LCD0>, <&ccu RST_BUS_EDP>, <&ccu RST_BUS_LVDS>;534        reset-names = "lcd", "edp", "lvds";535        clock-output-names = "tcon0-pixel-clock";536        #clock-cells = <0>;537 538        ports {539            #address-cells = <1>;540            #size-cells = <0>;541 542            port@0 {543                reg = <0>;544 545                endpoint {546                    remote-endpoint = <&drc0_out_tcon0>;547                };548            };549 550            port@1 {551                reg = <1>;552            };553        };554    };555 556    #undef CLK_BUS_TCON0557    #undef CLK_TCON0558    #undef RST_BUS_TCON0559    #undef RST_BUS_EDP560    #undef RST_BUS_LVDS561 562  - |563    #include <dt-bindings/interrupt-controller/arm-gic.h>564 565    /*566     * This comes from the clock/sun8i-a83t-ccu.h and567     * reset/sun8i-a83t-ccu.h headers, but we can't include them since568     * it would trigger a bunch of warnings for redefinitions of569     * symbols with the other example.570     */571 572    #define CLK_BUS_TCON0	36573    #define CLK_TCON0		85574    #define RST_BUS_TCON0	22575    #define RST_BUS_LVDS	31576 577    lcd-controller@1c0c000 {578        compatible = "allwinner,sun8i-a83t-tcon-lcd";579        reg = <0x01c0c000 0x1000>;580        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;581        clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;582        clock-names = "ahb", "tcon-ch0";583        clock-output-names = "tcon-pixel-clock";584        #clock-cells = <0>;585        resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;586        reset-names = "lcd", "lvds";587 588        ports {589            #address-cells = <1>;590            #size-cells = <0>;591 592            port@0 {593                #address-cells = <1>;594                #size-cells = <0>;595                reg = <0>;596 597                endpoint@0 {598                    reg = <0>;599                    remote-endpoint = <&mixer0_out_tcon0>;600                };601 602                endpoint@1 {603                    reg = <1>;604                    remote-endpoint = <&mixer1_out_tcon0>;605                };606            };607 608            port@1 {609                reg = <1>;610            };611        };612    };613 614    #undef CLK_BUS_TCON0615    #undef CLK_TCON0616    #undef RST_BUS_TCON0617    #undef RST_BUS_LVDS618 619  - |620    #include <dt-bindings/interrupt-controller/arm-gic.h>621 622    /*623     * This comes from the clock/sun8i-r40-ccu.h and624     * reset/sun8i-r40-ccu.h headers, but we can't include them since625     * it would trigger a bunch of warnings for redefinitions of626     * symbols with the other example.627     */628 629    #define CLK_BUS_TCON_TV0	73630    #define RST_BUS_TCON_TV0	49631 632    tcon_tv0: lcd-controller@1c73000 {633        compatible = "allwinner,sun8i-r40-tcon-tv";634        reg = <0x01c73000 0x1000>;635        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;636        clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>;637        clock-names = "ahb", "tcon-ch1";638        resets = <&ccu RST_BUS_TCON_TV0>;639        reset-names = "lcd";640 641        ports {642            #address-cells = <1>;643            #size-cells = <0>;644 645            port@0 {646                #address-cells = <1>;647                #size-cells = <0>;648                reg = <0>;649 650                endpoint@0 {651                    reg = <0>;652                    remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>;653                };654 655                endpoint@1 {656                    reg = <1>;657                    remote-endpoint = <&tcon_top_mixer1_out_tcon_tv0>;658                };659            };660 661            tcon_tv0_out: port@1 {662                #address-cells = <1>;663                #size-cells = <0>;664                reg = <1>;665 666                endpoint@1 {667                    reg = <1>;668                    remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>;669                };670            };671        };672    };673 674    #undef CLK_BUS_TCON_TV0675    #undef RST_BUS_TCON_TV0676 677...678