# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/cec/samsung,s5p-cec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S5PV210 and Exynos HDMI CEC

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>
  - Marek Szyprowski <m.szyprowski@samsung.com>

allOf:
  - $ref: cec-common.yaml#

properties:
  compatible:
    const: samsung,s5p-cec

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: hdmicec

  interrupts:
    maxItems: 1

  samsung,syscon-phandle:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      Phandle to PMU system controller interface

  reg:
    maxItems: 1

required:
  - compatible
  - clocks
  - clock-names
  - hdmi-phandle
  - interrupts
  - samsung,syscon-phandle
  - reg

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/exynos5420.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    cec@101b0000 {
        compatible = "samsung,s5p-cec";
        reg = <0x101B0000 0x200>;

        clocks = <&clock CLK_HDMI_CEC>;
        clock-names = "hdmicec";
        interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
        hdmi-phandle = <&hdmi>;
        needs-hpd;
        pinctrl-names = "default";
        pinctrl-0 = <&hdmi_cec>;
        samsung,syscon-phandle = <&pmu_system_controller>;
    };