Allwinner A10 Timings Controller (TCON)

Schema identifier ($id): "http://devicetree.org/schemas/display/allwinner,sun4i-a10-tcon.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"

The TCON acts as a timing controller for RGB, LVDS and TV interfaces.

Properties and child nodes (properties) #

#clock-cells — not listed as required here #

Exact value (const): 0

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "allwinner,sun4i-a10-tcon"

Rule 2

Exact value (const): "allwinner,sun5i-a13-tcon"

Rule 3

Exact value (const): "allwinner,sun6i-a31-tcon"

Rule 4

Exact value (const): "allwinner,sun6i-a31s-tcon"

Rule 5

Exact value (const): "allwinner,sun7i-a20-tcon"

Rule 6

Exact value (const): "allwinner,sun8i-a23-tcon"

Rule 7

Exact value (const): "allwinner,sun8i-a33-tcon"

Rule 8

Exact value (const): "allwinner,sun8i-a83t-tcon-lcd"

Rule 9

Exact value (const): "allwinner,sun8i-a83t-tcon-tv"

Rule 10

Exact value (const): "allwinner,sun8i-r40-tcon-tv"

Rule 11

Exact value (const): "allwinner,sun8i-v3s-tcon"

Rule 12

Exact value (const): "allwinner,sun9i-a80-tcon-lcd"

Rule 13

Exact value (const): "allwinner,sun9i-a80-tcon-tv"

Rule 14

Exact value (const): "allwinner,sun20i-d1-tcon-lcd"

Rule 15

Exact value (const): "allwinner,sun20i-d1-tcon-tv"

Rule 16

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun7i-a20-tcon0", "allwinner,sun7i-a20-tcon1"

Item 2

Exact value (const): "allwinner,sun7i-a20-tcon"

Rule 17

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun50i-a64-tcon-lcd"

Item 2

Exact value (const): "allwinner,sun8i-a83t-tcon-lcd"

Rule 18

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun8i-h3-tcon-tv", "allwinner,sun50i-a64-tcon-tv"

Item 2

Exact value (const): "allwinner,sun8i-a83t-tcon-tv"

Rule 19

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun50i-h6-tcon-tv"

Item 2

Exact value (const): "allwinner,sun8i-r40-tcon-tv"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 4

clock-names — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 4

clock-output-names — not listed as required here #

Name of the LCD pixel clock created.

Maximum number of items (maxItems): 1

dmas — not listed as required here #

Maximum number of items (maxItems): 1

resets — required here #

At least one of these rules must match (anyOf) #

Rule 1

Array item rules (items)

Item 1

TCON Reset Line

Rule 2

Array item rules (items)

Item 1

TCON Reset Line

Item 2

TCON LVDS Reset Line

Rule 3

Array item rules (items)

Item 1

TCON Reset Line

Item 2

TCON eDP Reset Line

Rule 4

Array item rules (items)

Item 1

TCON Reset Line

Item 2

TCON eDP Reset Line

Item 3

TCON LVDS Reset Line

reset-names — not listed as required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "lcd"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "lcd"

Item 2

Exact value (const): "lvds"

Rule 3

Array item rules (items)

Item 1

Exact value (const): "lcd"

Item 2

Exact value (const): "edp"

Rule 4

Array item rules (items)

Item 1

Exact value (const): "lcd"

Item 2

Exact value (const): "edp"

Item 3

Exact value (const): "lvds"

ports — required here #

Shared schema rule ($ref): /schemas/graph.yaml#/properties/ports

Properties and child nodes (properties) #

port@0 — required here

Shared schema rule ($ref): /schemas/graph.yaml#/properties/port

Input endpoints of the controller.

port@1 — required here

Shared schema rule ($ref): /schemas/graph.yaml#/$defs/port-base

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Output endpoints of the controller.

Properties matching a name pattern (patternProperties)

^endpoint(@[0-9])$ — name matches this regular expression

Shared schema rule ($ref): /schemas/graph.yaml#/$defs/endpoint-base

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

allwinner,tcon-channel — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

TCON can have 1 or 2 channels, usually with the first channel being used for the panels interfaces (RGB, LVDS, etc.), and the second being used for the outputs that require another controller (TV Encoder, HDMI, etc.).

If that property is present, specifies the TCON channel the endpoint is associated to. If that property is not present, the endpoint number will be used as the channel number.

Required in this object (required): "port@0", "port@1"

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "resets", "ports"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun4i-a10-tcon", "allwinner,sun5i-a13-tcon", "allwinner,sun7i-a20-tcon"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 3

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "ahb"

Item 2

Exact value (const): "tcon-ch0"

Item 3

Exact value (const): "tcon-ch1"

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun6i-a31-tcon", "allwinner,sun6i-a31s-tcon"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 4

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "ahb"

Item 2

Exact value (const): "tcon-ch0"

Item 3

Exact value (const): "tcon-ch1"

Item 4

Exact value (const): "lvds-alt"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-a23-tcon", "allwinner,sun8i-a33-tcon"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 3

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "ahb"

Item 2

Exact value (const): "tcon-ch0"

Item 3

Exact value (const): "lvds-alt"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-a83t-tcon-lcd", "allwinner,sun8i-v3s-tcon", "allwinner,sun9i-a80-tcon-lcd", "allwinner,sun20i-d1-tcon-lcd"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "ahb"

Item 2

Exact value (const): "tcon-ch0"

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun8i-a83t-tcon-tv", "allwinner,sun8i-r40-tcon-tv", "allwinner,sun9i-a80-tcon-tv", "allwinner,sun20i-d1-tcon-tv"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "ahb"

Item 2

Exact value (const): "tcon-ch1"

Rule 6 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun5i-a13-tcon", "allwinner,sun6i-a31-tcon", "allwinner,sun6i-a31s-tcon", "allwinner,sun7i-a20-tcon", "allwinner,sun8i-a23-tcon", "allwinner,sun8i-a33-tcon", "allwinner,sun8i-v3s-tcon", "allwinner,sun9i-a80-tcon-lcd", "allwinner,sun4i-a10-tcon", "allwinner,sun8i-a83t-tcon-lcd", "allwinner,sun20i-d1-tcon-lcd"

When the condition matches (then) #

Required in this object (required): "#clock-cells", "clock-output-names"

Rule 7 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun6i-a31-tcon", "allwinner,sun6i-a31s-tcon", "allwinner,sun8i-a23-tcon", "allwinner,sun8i-a33-tcon", "allwinner,sun8i-a83t-tcon-lcd", "allwinner,sun20i-d1-tcon-lcd"

When the condition matches (then) #

Properties and child nodes (properties)

resets — not listed as required here

Minimum number of items (minItems): 2

reset-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "lcd"

Item 2

Exact value (const): "lvds"

Rule 8 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun9i-a80-tcon-lcd"

When the condition matches (then) #

Properties and child nodes (properties)

resets — not listed as required here

Minimum number of items (minItems): 3

reset-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "lcd"

Item 2

Exact value (const): "edp"

Item 3

Exact value (const): "lvds"

Rule 9 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun9i-a80-tcon-tv"

When the condition matches (then) #

Properties and child nodes (properties)

resets — not listed as required here

Minimum number of items (minItems): 2

reset-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "lcd"

Item 2

Exact value (const): "edp"

Rule 10 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "allwinner,sun4i-a10-tcon", "allwinner,sun5i-a13-tcon", "allwinner,sun6i-a31-tcon", "allwinner,sun6i-a31s-tcon", "allwinner,sun7i-a20-tcon", "allwinner,sun8i-a23-tcon", "allwinner,sun8i-a33-tcon"

When the condition matches (then) #

Required in this object (required): "dmas"

Examples (examples) #

#include <dt-bindings/dma/sun4i-a10.h>

/*
 * This comes from the clock/sun4i-a10-ccu.h and
 * reset/sun4i-a10-ccu.h headers, but we can't include them since
 * it would trigger a bunch of warnings for redefinitions of
 * symbols with the other example.
 */

#define CLK_AHB_LCD0	56
#define CLK_TCON0_CH0	149
#define CLK_TCON0_CH1	155
#define RST_TCON0		11

lcd-controller@1c0c000 {
    compatible = "allwinner,sun4i-a10-tcon";
    reg = <0x01c0c000 0x1000>;
    interrupts = <44>;
    resets = <&ccu RST_TCON0>;
    reset-names = "lcd";
    clocks = <&ccu CLK_AHB_LCD0>,
             <&ccu CLK_TCON0_CH0>,
             <&ccu CLK_TCON0_CH1>;
    clock-names = "ahb",
                  "tcon-ch0",
                  "tcon-ch1";
    clock-output-names = "tcon0-pixel-clock";
    #clock-cells = <0>;
    dmas = <&dma SUN4I_DMA_DEDICATED 14>;

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0>;

            endpoint@0 {
                reg = <0>;
                remote-endpoint = <&be0_out_tcon0>;
            };

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&be1_out_tcon0>;
            };
        };

        port@1 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <1>;

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&hdmi_in_tcon0>;
                allwinner,tcon-channel = <1>;
            };
        };
    };
};

#undef CLK_AHB_LCD0
#undef CLK_TCON0_CH0
#undef CLK_TCON0_CH1
#undef RST_TCON0
#include <dt-bindings/interrupt-controller/arm-gic.h>

/*
 * This comes from the clock/sun6i-a31-ccu.h and
 * reset/sun6i-a31-ccu.h headers, but we can't include them since
 * it would trigger a bunch of warnings for redefinitions of
 * symbols with the other example.
 */

#define CLK_PLL_MIPI	15
#define CLK_AHB1_LCD0	47
#define CLK_LCD0_CH0	127
#define CLK_LCD0_CH1	129
#define RST_AHB1_LCD0	27
#define RST_AHB1_LVDS	41

lcd-controller@1c0c000 {
    compatible = "allwinner,sun6i-a31-tcon";
    reg = <0x01c0c000 0x1000>;
    interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
    dmas = <&dma 11>;
    resets = <&ccu RST_AHB1_LCD0>, <&ccu RST_AHB1_LVDS>;
    reset-names = "lcd", "lvds";
    clocks = <&ccu CLK_AHB1_LCD0>,
             <&ccu CLK_LCD0_CH0>,
             <&ccu CLK_LCD0_CH1>,
             <&ccu CLK_PLL_MIPI>;
    clock-names = "ahb",
                  "tcon-ch0",
                  "tcon-ch1",
                  "lvds-alt";
    clock-output-names = "tcon0-pixel-clock";
    #clock-cells = <0>;

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0>;

            endpoint@0 {
                reg = <0>;
                remote-endpoint = <&drc0_out_tcon0>;
            };

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&drc1_out_tcon0>;
            };
        };

        port@1 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <1>;

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&hdmi_in_tcon0>;
                allwinner,tcon-channel = <1>;
            };
        };
    };
};

#undef CLK_PLL_MIPI
#undef CLK_AHB1_LCD0
#undef CLK_LCD0_CH0
#undef CLK_LCD0_CH1
#undef RST_AHB1_LCD0
#undef RST_AHB1_LVDS
#include <dt-bindings/interrupt-controller/arm-gic.h>

/*
 * This comes from the clock/sun9i-a80-ccu.h and
 * reset/sun9i-a80-ccu.h headers, but we can't include them since
 * it would trigger a bunch of warnings for redefinitions of
 * symbols with the other example.
 */

#define CLK_BUS_LCD0	102
#define CLK_LCD0		58
#define RST_BUS_LCD0	22
#define RST_BUS_EDP		24
#define RST_BUS_LVDS	25

lcd-controller@3c00000 {
    compatible = "allwinner,sun9i-a80-tcon-lcd";
    reg = <0x03c00000 0x10000>;
    interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&ccu CLK_BUS_LCD0>, <&ccu CLK_LCD0>;
    clock-names = "ahb", "tcon-ch0";
    resets = <&ccu RST_BUS_LCD0>, <&ccu RST_BUS_EDP>, <&ccu RST_BUS_LVDS>;
    reset-names = "lcd", "edp", "lvds";
    clock-output-names = "tcon0-pixel-clock";
    #clock-cells = <0>;

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
            reg = <0>;

            endpoint {
                remote-endpoint = <&drc0_out_tcon0>;
            };
        };

        port@1 {
            reg = <1>;
        };
    };
};

#undef CLK_BUS_TCON0
#undef CLK_TCON0
#undef RST_BUS_TCON0
#undef RST_BUS_EDP
#undef RST_BUS_LVDS
#include <dt-bindings/interrupt-controller/arm-gic.h>

/*
 * This comes from the clock/sun8i-a83t-ccu.h and
 * reset/sun8i-a83t-ccu.h headers, but we can't include them since
 * it would trigger a bunch of warnings for redefinitions of
 * symbols with the other example.
 */

#define CLK_BUS_TCON0	36
#define CLK_TCON0		85
#define RST_BUS_TCON0	22
#define RST_BUS_LVDS	31

lcd-controller@1c0c000 {
    compatible = "allwinner,sun8i-a83t-tcon-lcd";
    reg = <0x01c0c000 0x1000>;
    interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
    clock-names = "ahb", "tcon-ch0";
    clock-output-names = "tcon-pixel-clock";
    #clock-cells = <0>;
    resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
    reset-names = "lcd", "lvds";

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0>;

            endpoint@0 {
                reg = <0>;
                remote-endpoint = <&mixer0_out_tcon0>;
            };

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&mixer1_out_tcon0>;
            };
        };

        port@1 {
            reg = <1>;
        };
    };
};

#undef CLK_BUS_TCON0
#undef CLK_TCON0
#undef RST_BUS_TCON0
#undef RST_BUS_LVDS
#include <dt-bindings/interrupt-controller/arm-gic.h>

/*
 * This comes from the clock/sun8i-r40-ccu.h and
 * reset/sun8i-r40-ccu.h headers, but we can't include them since
 * it would trigger a bunch of warnings for redefinitions of
 * symbols with the other example.
 */

#define CLK_BUS_TCON_TV0	73
#define RST_BUS_TCON_TV0	49

tcon_tv0: lcd-controller@1c73000 {
    compatible = "allwinner,sun8i-r40-tcon-tv";
    reg = <0x01c73000 0x1000>;
    interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>;
    clock-names = "ahb", "tcon-ch1";
    resets = <&ccu RST_BUS_TCON_TV0>;
    reset-names = "lcd";

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0>;

            endpoint@0 {
                reg = <0>;
                remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>;
            };

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&tcon_top_mixer1_out_tcon_tv0>;
            };
        };

        tcon_tv0_out: port@1 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <1>;

            endpoint@1 {
                reg = <1>;
                remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>;
            };
        };
    };
};

#undef CLK_BUS_TCON_TV0
#undef RST_BUS_TCON_TV0

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Edit this page