Merge tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / stihxxx-b2120.dtsi
1 /*
2  * Copyright (C) 2014 STMicroelectronics (R&D) Limited.
3  * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  */
9 #include <dt-bindings/clock/stih407-clks.h>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/media/c8sectpfe.h>
12 / {
13         leds {
14                 compatible = "gpio-leds";
15                 red {
16                         label = "Front Panel LED";
17                         gpios = <&pio4 1 GPIO_ACTIVE_HIGH>;
18                         linux,default-trigger = "heartbeat";
19                 };
20                 green {
21                         gpios = <&pio1 3 GPIO_ACTIVE_HIGH>;
22                         default-state = "off";
23                 };
24         };
25
26         sound: sound {
27                 compatible = "simple-audio-card";
28                 simple-audio-card,name = "STI-B2120";
29                 status = "okay";
30                 #address-cells = <1>;
31                 #size-cells = <0>;
32
33                 simple-audio-card,dai-link@0 {
34                         reg = <0>;
35                         /* HDMI */
36                         format = "i2s";
37                         mclk-fs = <128>;
38                         cpu {
39                                 sound-dai = <&sti_uni_player0>;
40                         };
41
42                         codec {
43                                 sound-dai = <&sti_hdmi>;
44                         };
45                 };
46
47                 simple-audio-card,dai-link@1 {
48                         reg = <1>;
49                         /* DAC */
50                         format = "i2s";
51                         mclk-fs = <256>;
52                         frame-inversion = <1>;
53                         cpu {
54                                 sound-dai = <&sti_uni_player2>;
55                         };
56
57                         codec {
58                                 sound-dai = <&sti_sasg_codec 1>;
59                         };
60                 };
61
62                 simple-audio-card,dai-link@2 {
63                         reg = <2>;
64                         /* SPDIF */
65                         format = "left_j";
66                         mclk-fs = <128>;
67                         cpu {
68                                 sound-dai = <&sti_uni_player3>;
69                         };
70
71                         codec {
72                                 sound-dai = <&sti_sasg_codec 0>;
73                         };
74                 };
75         };
76
77         soc {
78                 sbc_serial0: serial@9530000 {
79                         status = "okay";
80                 };
81
82                 pwm0: pwm@9810000 {
83                         status = "okay";
84                 };
85
86                 pwm1: pwm@9510000 {
87                         status = "okay";
88                 };
89
90                 ssc2: i2c@9842000 {
91                         status = "okay";
92                         clock-frequency = <100000>;
93                         st,i2c-min-scl-pulse-width-us = <0>;
94                         st,i2c-min-sda-pulse-width-us = <5>;
95                 };
96
97                 ssc3: i2c@9843000 {
98                         status = "okay";
99                         clock-frequency = <100000>;
100                         st,i2c-min-scl-pulse-width-us = <0>;
101                         st,i2c-min-sda-pulse-width-us = <5>;
102                 };
103
104                 i2c@9844000 {
105                         status = "okay";
106                 };
107
108                 i2c@9845000 {
109                         status = "okay";
110                 };
111
112                 i2c@9540000 {
113                         status = "okay";
114                 };
115
116                 mmc0: sdhci@9060000 {
117                         non-removable;
118                         status = "okay";
119                 };
120
121                 mmc1: sdhci@9080000 {
122                         status = "okay";
123                 };
124
125                 /* SSC11 to HDMI */
126                 hdmiddc: i2c@9541000 {
127                         status = "okay";
128                         /* HDMI V1.3a supports Standard mode only */
129                         clock-frequency = <100000>;
130                         st,i2c-min-scl-pulse-width-us = <0>;
131                         st,i2c-min-sda-pulse-width-us = <5>;
132                 };
133
134                 miphy28lp_phy: miphy28lp@0 {
135
136                         phy_port0: port@9b22000 {
137                                 st,osc-rdy;
138                         };
139
140                         phy_port1: port@9b2a000 {
141                                 st,osc-force-ext;
142                         };
143                 };
144
145                 st_dwc3: dwc3@8f94000 {
146                         status = "okay";
147                 };
148
149                 ethernet0: dwmac@9630000 {
150                         st,tx-retime-src = "clkgen";
151                         status = "okay";
152                         phy-mode = "rgmii";
153                         fixed-link = <0 1 1000 0 0>;
154                 };
155
156                 demux@8a20000 {
157                         compatible      = "st,stih407-c8sectpfe";
158                         status          = "okay";
159                         reg             = <0x08a20000 0x10000>,
160                                           <0x08a00000 0x4000>;
161                         reg-names       = "c8sectpfe", "c8sectpfe-ram";
162                         interrupts      = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
163                                           <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
164                         interrupt-names = "c8sectpfe-error-irq",
165                                           "c8sectpfe-idle-irq";
166                         pinctrl-0       = <&pinctrl_tsin0_serial>;
167                         pinctrl-1       = <&pinctrl_tsin0_parallel>;
168                         pinctrl-2       = <&pinctrl_tsin3_serial>;
169                         pinctrl-3       = <&pinctrl_tsin4_serial_alt3>;
170                         pinctrl-4       = <&pinctrl_tsin5_serial_alt1>;
171                         pinctrl-names   = "tsin0-serial",
172                                           "tsin0-parallel",
173                                           "tsin3-serial",
174                                           "tsin4-serial",
175                                           "tsin5-serial";
176                         clocks          = <&clk_s_c0_flexgen CLK_PROC_STFE>;
177                         clock-names     = "c8sectpfe";
178
179                         /* tsin0 is TSA on NIMA */
180                         tsin0: port {
181                                 tsin-num        = <0>;
182                                 serial-not-parallel;
183                                 i2c-bus         = <&ssc2>;
184                                 reset-gpios     = <&pio15 4 GPIO_ACTIVE_HIGH>;
185                                 dvb-card        = <STV0367_TDA18212_NIMA_1>;
186                         };
187                 };
188
189                 sti_uni_player0: sti-uni-player@8d80000 {
190                         status = "okay";
191                 };
192
193                 sti_uni_player2: sti-uni-player@8d82000 {
194                         status = "okay";
195                 };
196
197                 sti_uni_player3: sti-uni-player@8d85000 {
198                         status = "okay";
199                 };
200
201                 syscfg_core: core-syscfg@92b0000 {
202                         sti_sasg_codec: sti-sasg-codec {
203                                 status = "okay";
204                                 pinctrl-names = "default";
205                                 pinctrl-0 = <&pinctrl_spdif_out>;
206                         };
207                 };
208         };
209 };