1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0-only
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Copyright (C) 2015 STMicroelectronics Limited.
4*724ba675SRob Herring * Author: Gabriel Fernandez <gabriel.fernandez@linaro.org>
5*724ba675SRob Herring */
6*724ba675SRob Herring#include "stih407-clock.dtsi"
7*724ba675SRob Herring#include "stih407-family.dtsi"
8*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
9*724ba675SRob Herring/ {
10*724ba675SRob Herring	soc {
11*724ba675SRob Herring		sti-display-subsystem@0 {
12*724ba675SRob Herring			compatible = "st,sti-display-subsystem";
13*724ba675SRob Herring			#address-cells = <1>;
14*724ba675SRob Herring			#size-cells = <1>;
15*724ba675SRob Herring			reg = <0 0>;
16*724ba675SRob Herring			assigned-clocks = <&clk_s_d2_quadfs 0>,
17*724ba675SRob Herring					  <&clk_s_d2_quadfs 1>,
18*724ba675SRob Herring					  <&clk_s_c0_pll1 0>,
19*724ba675SRob Herring					  <&clk_s_c0_flexgen CLK_COMPO_DVP>,
20*724ba675SRob Herring					  <&clk_s_c0_flexgen CLK_MAIN_DISP>,
21*724ba675SRob Herring					  <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>,
22*724ba675SRob Herring					  <&clk_s_d2_flexgen CLK_PIX_AUX_DISP>,
23*724ba675SRob Herring					  <&clk_s_d2_flexgen CLK_PIX_GDP1>,
24*724ba675SRob Herring					  <&clk_s_d2_flexgen CLK_PIX_GDP2>,
25*724ba675SRob Herring					  <&clk_s_d2_flexgen CLK_PIX_GDP3>,
26*724ba675SRob Herring					  <&clk_s_d2_flexgen CLK_PIX_GDP4>;
27*724ba675SRob Herring
28*724ba675SRob Herring			assigned-clock-parents = <0>,
29*724ba675SRob Herring						 <0>,
30*724ba675SRob Herring						 <0>,
31*724ba675SRob Herring						 <&clk_s_c0_pll1 0>,
32*724ba675SRob Herring						 <&clk_s_c0_pll1 0>,
33*724ba675SRob Herring						 <&clk_s_d2_quadfs 0>,
34*724ba675SRob Herring						 <&clk_s_d2_quadfs 1>,
35*724ba675SRob Herring						 <&clk_s_d2_quadfs 0>,
36*724ba675SRob Herring						 <&clk_s_d2_quadfs 0>,
37*724ba675SRob Herring						 <&clk_s_d2_quadfs 0>,
38*724ba675SRob Herring						 <&clk_s_d2_quadfs 0>;
39*724ba675SRob Herring
40*724ba675SRob Herring			assigned-clock-rates = <297000000>,
41*724ba675SRob Herring					       <108000000>,
42*724ba675SRob Herring					       <0>,
43*724ba675SRob Herring					       <400000000>,
44*724ba675SRob Herring					       <400000000>;
45*724ba675SRob Herring
46*724ba675SRob Herring			ranges;
47*724ba675SRob Herring
48*724ba675SRob Herring			sti-compositor@9d11000 {
49*724ba675SRob Herring				compatible = "st,stih407-compositor";
50*724ba675SRob Herring				reg = <0x9d11000 0x1000>;
51*724ba675SRob Herring
52*724ba675SRob Herring				clock-names = "compo_main",
53*724ba675SRob Herring					      "compo_aux",
54*724ba675SRob Herring					      "pix_main",
55*724ba675SRob Herring					      "pix_aux",
56*724ba675SRob Herring					      "pix_gdp1",
57*724ba675SRob Herring					      "pix_gdp2",
58*724ba675SRob Herring					      "pix_gdp3",
59*724ba675SRob Herring					      "pix_gdp4",
60*724ba675SRob Herring					      "main_parent",
61*724ba675SRob Herring					      "aux_parent";
62*724ba675SRob Herring
63*724ba675SRob Herring				clocks = <&clk_s_c0_flexgen CLK_COMPO_DVP>,
64*724ba675SRob Herring					 <&clk_s_c0_flexgen CLK_COMPO_DVP>,
65*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>,
66*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_PIX_AUX_DISP>,
67*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_PIX_GDP1>,
68*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_PIX_GDP2>,
69*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_PIX_GDP3>,
70*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_PIX_GDP4>,
71*724ba675SRob Herring					 <&clk_s_d2_quadfs 0>,
72*724ba675SRob Herring					 <&clk_s_d2_quadfs 1>;
73*724ba675SRob Herring
74*724ba675SRob Herring				reset-names = "compo-main", "compo-aux";
75*724ba675SRob Herring				resets = <&softreset STIH407_COMPO_SOFTRESET>,
76*724ba675SRob Herring					 <&softreset STIH407_COMPO_SOFTRESET>;
77*724ba675SRob Herring				st,vtg = <&vtg_main>, <&vtg_aux>;
78*724ba675SRob Herring			};
79*724ba675SRob Herring
80*724ba675SRob Herring			sti-tvout@8d08000 {
81*724ba675SRob Herring				compatible = "st,stih407-tvout";
82*724ba675SRob Herring				reg = <0x8d08000 0x1000>;
83*724ba675SRob Herring				reg-names = "tvout-reg";
84*724ba675SRob Herring				reset-names = "tvout";
85*724ba675SRob Herring				resets = <&softreset STIH407_HDTVOUT_SOFTRESET>;
86*724ba675SRob Herring				#address-cells = <1>;
87*724ba675SRob Herring				#size-cells = <1>;
88*724ba675SRob Herring				assigned-clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>,
89*724ba675SRob Herring						  <&clk_s_d2_flexgen CLK_TMDS_HDMI>,
90*724ba675SRob Herring						  <&clk_s_d2_flexgen CLK_REF_HDMIPHY>,
91*724ba675SRob Herring						  <&clk_s_d0_flexgen CLK_PCM_0>,
92*724ba675SRob Herring						  <&clk_s_d2_flexgen CLK_PIX_HDDAC>,
93*724ba675SRob Herring						  <&clk_s_d2_flexgen CLK_HDDAC>;
94*724ba675SRob Herring
95*724ba675SRob Herring				assigned-clock-parents = <&clk_s_d2_quadfs 0>,
96*724ba675SRob Herring							 <&clk_tmdsout_hdmi>,
97*724ba675SRob Herring							 <&clk_s_d2_quadfs 0>,
98*724ba675SRob Herring							 <&clk_s_d0_quadfs 0>,
99*724ba675SRob Herring							 <&clk_s_d2_quadfs 0>,
100*724ba675SRob Herring							 <&clk_s_d2_quadfs 0>;
101*724ba675SRob Herring			};
102*724ba675SRob Herring
103*724ba675SRob Herring			sti_hdmi: sti-hdmi@8d04000 {
104*724ba675SRob Herring				compatible = "st,stih407-hdmi";
105*724ba675SRob Herring				reg = <0x8d04000 0x1000>;
106*724ba675SRob Herring				reg-names = "hdmi-reg";
107*724ba675SRob Herring				#sound-dai-cells = <0>;
108*724ba675SRob Herring				interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
109*724ba675SRob Herring				interrupt-names = "irq";
110*724ba675SRob Herring				clock-names = "pix",
111*724ba675SRob Herring					      "tmds",
112*724ba675SRob Herring					      "phy",
113*724ba675SRob Herring					      "audio",
114*724ba675SRob Herring					      "main_parent",
115*724ba675SRob Herring					      "aux_parent";
116*724ba675SRob Herring
117*724ba675SRob Herring				clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>,
118*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_TMDS_HDMI>,
119*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_REF_HDMIPHY>,
120*724ba675SRob Herring					 <&clk_s_d0_flexgen CLK_PCM_0>,
121*724ba675SRob Herring					 <&clk_s_d2_quadfs 0>,
122*724ba675SRob Herring					 <&clk_s_d2_quadfs 1>;
123*724ba675SRob Herring
124*724ba675SRob Herring				hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>;
125*724ba675SRob Herring				reset-names = "hdmi";
126*724ba675SRob Herring				resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>;
127*724ba675SRob Herring				ddc = <&hdmiddc>;
128*724ba675SRob Herring			};
129*724ba675SRob Herring
130*724ba675SRob Herring			sti-hda@8d02000 {
131*724ba675SRob Herring				compatible = "st,stih407-hda";
132*724ba675SRob Herring				reg = <0x8d02000 0x400>, <0x92b0120 0x4>;
133*724ba675SRob Herring				reg-names = "hda-reg", "video-dacs-ctrl";
134*724ba675SRob Herring				clock-names = "pix",
135*724ba675SRob Herring					      "hddac",
136*724ba675SRob Herring					      "main_parent",
137*724ba675SRob Herring					      "aux_parent";
138*724ba675SRob Herring				clocks = <&clk_s_d2_flexgen CLK_PIX_HDDAC>,
139*724ba675SRob Herring					 <&clk_s_d2_flexgen CLK_HDDAC>,
140*724ba675SRob Herring					 <&clk_s_d2_quadfs 0>,
141*724ba675SRob Herring					 <&clk_s_d2_quadfs 1>;
142*724ba675SRob Herring			};
143*724ba675SRob Herring		};
144*724ba675SRob Herring	};
145*724ba675SRob Herring};
146