1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2019 BayLibre, SAS 4 * Author: Neil Armstrong <narmstrong@baylibre.com> 5 */ 6 7#include "meson-g12-common.dtsi" 8#include <dt-bindings/clock/axg-audio-clkc.h> 9#include <dt-bindings/power/meson-sm1-power.h> 10#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h> 11#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h> 12 13/ { 14 compatible = "amlogic,sm1"; 15 16 tdmif_a: audio-controller-0 { 17 compatible = "amlogic,axg-tdm-iface"; 18 #sound-dai-cells = <0>; 19 sound-name-prefix = "TDM_A"; 20 clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>, 21 <&clkc_audio AUD_CLKID_MST_A_SCLK>, 22 <&clkc_audio AUD_CLKID_MST_A_LRCLK>; 23 clock-names = "mclk", "sclk", "lrclk"; 24 status = "disabled"; 25 }; 26 27 tdmif_b: audio-controller-1 { 28 compatible = "amlogic,axg-tdm-iface"; 29 #sound-dai-cells = <0>; 30 sound-name-prefix = "TDM_B"; 31 clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>, 32 <&clkc_audio AUD_CLKID_MST_B_SCLK>, 33 <&clkc_audio AUD_CLKID_MST_B_LRCLK>; 34 clock-names = "mclk", "sclk", "lrclk"; 35 status = "disabled"; 36 }; 37 38 tdmif_c: audio-controller-2 { 39 compatible = "amlogic,axg-tdm-iface"; 40 #sound-dai-cells = <0>; 41 sound-name-prefix = "TDM_C"; 42 clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>, 43 <&clkc_audio AUD_CLKID_MST_C_SCLK>, 44 <&clkc_audio AUD_CLKID_MST_C_LRCLK>; 45 clock-names = "mclk", "sclk", "lrclk"; 46 status = "disabled"; 47 }; 48 49 cpus { 50 #address-cells = <0x2>; 51 #size-cells = <0x0>; 52 53 cpu0: cpu@0 { 54 device_type = "cpu"; 55 compatible = "arm,cortex-a55"; 56 reg = <0x0 0x0>; 57 enable-method = "psci"; 58 next-level-cache = <&l2>; 59 #cooling-cells = <2>; 60 }; 61 62 cpu1: cpu@1 { 63 device_type = "cpu"; 64 compatible = "arm,cortex-a55"; 65 reg = <0x0 0x1>; 66 enable-method = "psci"; 67 next-level-cache = <&l2>; 68 #cooling-cells = <2>; 69 }; 70 71 cpu2: cpu@2 { 72 device_type = "cpu"; 73 compatible = "arm,cortex-a55"; 74 reg = <0x0 0x2>; 75 enable-method = "psci"; 76 next-level-cache = <&l2>; 77 #cooling-cells = <2>; 78 }; 79 80 cpu3: cpu@3 { 81 device_type = "cpu"; 82 compatible = "arm,cortex-a55"; 83 reg = <0x0 0x3>; 84 enable-method = "psci"; 85 next-level-cache = <&l2>; 86 #cooling-cells = <2>; 87 }; 88 89 l2: l2-cache0 { 90 compatible = "cache"; 91 cache-level = <2>; 92 }; 93 }; 94 95 cpu_opp_table: opp-table { 96 compatible = "operating-points-v2"; 97 opp-shared; 98 99 opp-1000000000 { 100 opp-hz = /bits/ 64 <1000000000>; 101 opp-microvolt = <770000>; 102 }; 103 104 opp-1200000000 { 105 opp-hz = /bits/ 64 <1200000000>; 106 opp-microvolt = <780000>; 107 }; 108 109 opp-1404000000 { 110 opp-hz = /bits/ 64 <1404000000>; 111 opp-microvolt = <790000>; 112 }; 113 114 opp-1500000000 { 115 opp-hz = /bits/ 64 <1500000000>; 116 opp-microvolt = <800000>; 117 }; 118 119 opp-1608000000 { 120 opp-hz = /bits/ 64 <1608000000>; 121 opp-microvolt = <810000>; 122 }; 123 124 opp-1704000000 { 125 opp-hz = /bits/ 64 <1704000000>; 126 opp-microvolt = <850000>; 127 }; 128 129 opp-1800000000 { 130 opp-hz = /bits/ 64 <1800000000>; 131 opp-microvolt = <900000>; 132 }; 133 134 opp-1908000000 { 135 opp-hz = /bits/ 64 <1908000000>; 136 opp-microvolt = <950000>; 137 }; 138 }; 139}; 140 141&apb { 142 audio: bus@60000 { 143 compatible = "simple-bus"; 144 reg = <0x0 0x60000 0x0 0x1000>; 145 #address-cells = <2>; 146 #size-cells = <2>; 147 ranges = <0x0 0x0 0x0 0x60000 0x0 0x1000>; 148 149 clkc_audio: clock-controller@0 { 150 status = "disabled"; 151 compatible = "amlogic,sm1-audio-clkc"; 152 reg = <0x0 0x0 0x0 0xb4>; 153 #clock-cells = <1>; 154 #reset-cells = <1>; 155 156 clocks = <&clkc CLKID_AUDIO>, 157 <&clkc CLKID_MPLL0>, 158 <&clkc CLKID_MPLL1>, 159 <&clkc CLKID_MPLL2>, 160 <&clkc CLKID_MPLL3>, 161 <&clkc CLKID_HIFI_PLL>, 162 <&clkc CLKID_FCLK_DIV3>, 163 <&clkc CLKID_FCLK_DIV4>, 164 <&clkc CLKID_FCLK_DIV5>; 165 clock-names = "pclk", 166 "mst_in0", 167 "mst_in1", 168 "mst_in2", 169 "mst_in3", 170 "mst_in4", 171 "mst_in5", 172 "mst_in6", 173 "mst_in7"; 174 175 resets = <&reset RESET_AUDIO>; 176 }; 177 178 toddr_a: audio-controller@100 { 179 compatible = "amlogic,sm1-toddr", 180 "amlogic,axg-toddr"; 181 reg = <0x0 0x100 0x0 0x2c>; 182 #sound-dai-cells = <0>; 183 sound-name-prefix = "TODDR_A"; 184 interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>; 185 clocks = <&clkc_audio AUD_CLKID_TODDR_A>; 186 resets = <&arb AXG_ARB_TODDR_A>, 187 <&clkc_audio AUD_RESET_TODDR_A>; 188 reset-names = "arb", "rst"; 189 amlogic,fifo-depth = <8192>; 190 status = "disabled"; 191 }; 192 193 toddr_b: audio-controller@140 { 194 compatible = "amlogic,sm1-toddr", 195 "amlogic,axg-toddr"; 196 reg = <0x0 0x140 0x0 0x2c>; 197 #sound-dai-cells = <0>; 198 sound-name-prefix = "TODDR_B"; 199 interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>; 200 clocks = <&clkc_audio AUD_CLKID_TODDR_B>; 201 resets = <&arb AXG_ARB_TODDR_B>, 202 <&clkc_audio AUD_RESET_TODDR_B>; 203 reset-names = "arb", "rst"; 204 amlogic,fifo-depth = <256>; 205 status = "disabled"; 206 }; 207 208 toddr_c: audio-controller@180 { 209 compatible = "amlogic,sm1-toddr", 210 "amlogic,axg-toddr"; 211 reg = <0x0 0x180 0x0 0x2c>; 212 #sound-dai-cells = <0>; 213 sound-name-prefix = "TODDR_C"; 214 interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>; 215 clocks = <&clkc_audio AUD_CLKID_TODDR_C>; 216 resets = <&arb AXG_ARB_TODDR_C>, 217 <&clkc_audio AUD_RESET_TODDR_C>; 218 reset-names = "arb", "rst"; 219 amlogic,fifo-depth = <256>; 220 status = "disabled"; 221 }; 222 223 frddr_a: audio-controller@1c0 { 224 compatible = "amlogic,sm1-frddr", 225 "amlogic,axg-frddr"; 226 reg = <0x0 0x1c0 0x0 0x2c>; 227 #sound-dai-cells = <0>; 228 sound-name-prefix = "FRDDR_A"; 229 interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>; 230 clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; 231 resets = <&arb AXG_ARB_FRDDR_A>, 232 <&clkc_audio AUD_RESET_FRDDR_A>; 233 reset-names = "arb", "rst"; 234 amlogic,fifo-depth = <512>; 235 status = "disabled"; 236 }; 237 238 frddr_b: audio-controller@200 { 239 compatible = "amlogic,sm1-frddr", 240 "amlogic,axg-frddr"; 241 reg = <0x0 0x200 0x0 0x2c>; 242 #sound-dai-cells = <0>; 243 sound-name-prefix = "FRDDR_B"; 244 interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>; 245 clocks = <&clkc_audio AUD_CLKID_FRDDR_B>; 246 resets = <&arb AXG_ARB_FRDDR_B>, 247 <&clkc_audio AUD_RESET_FRDDR_B>; 248 reset-names = "arb", "rst"; 249 amlogic,fifo-depth = <256>; 250 status = "disabled"; 251 }; 252 253 frddr_c: audio-controller@240 { 254 compatible = "amlogic,sm1-frddr", 255 "amlogic,axg-frddr"; 256 reg = <0x0 0x240 0x0 0x2c>; 257 #sound-dai-cells = <0>; 258 sound-name-prefix = "FRDDR_C"; 259 interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>; 260 clocks = <&clkc_audio AUD_CLKID_FRDDR_C>; 261 resets = <&arb AXG_ARB_FRDDR_C>, 262 <&clkc_audio AUD_RESET_FRDDR_C>; 263 reset-names = "arb", "rst"; 264 amlogic,fifo-depth = <256>; 265 status = "disabled"; 266 }; 267 268 arb: reset-controller@280 { 269 status = "disabled"; 270 compatible = "amlogic,meson-sm1-audio-arb"; 271 reg = <0x0 0x280 0x0 0x4>; 272 #reset-cells = <1>; 273 clocks = <&clkc_audio AUD_CLKID_DDR_ARB>; 274 }; 275 276 tdmin_a: audio-controller@300 { 277 compatible = "amlogic,sm1-tdmin", 278 "amlogic,axg-tdmin"; 279 reg = <0x0 0x300 0x0 0x40>; 280 sound-name-prefix = "TDMIN_A"; 281 resets = <&clkc_audio AUD_RESET_TDMIN_A>; 282 clocks = <&clkc_audio AUD_CLKID_TDMIN_A>, 283 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>, 284 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>, 285 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>, 286 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>; 287 clock-names = "pclk", "sclk", "sclk_sel", 288 "lrclk", "lrclk_sel"; 289 status = "disabled"; 290 }; 291 292 tdmin_b: audio-controller@340 { 293 compatible = "amlogic,sm1-tdmin", 294 "amlogic,axg-tdmin"; 295 reg = <0x0 0x340 0x0 0x40>; 296 sound-name-prefix = "TDMIN_B"; 297 resets = <&clkc_audio AUD_RESET_TDMIN_B>; 298 clocks = <&clkc_audio AUD_CLKID_TDMIN_B>, 299 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>, 300 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>, 301 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>, 302 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>; 303 clock-names = "pclk", "sclk", "sclk_sel", 304 "lrclk", "lrclk_sel"; 305 status = "disabled"; 306 }; 307 308 tdmin_c: audio-controller@380 { 309 compatible = "amlogic,sm1-tdmin", 310 "amlogic,axg-tdmin"; 311 reg = <0x0 0x380 0x0 0x40>; 312 sound-name-prefix = "TDMIN_C"; 313 resets = <&clkc_audio AUD_RESET_TDMIN_C>; 314 clocks = <&clkc_audio AUD_CLKID_TDMIN_C>, 315 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>, 316 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>, 317 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>, 318 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>; 319 clock-names = "pclk", "sclk", "sclk_sel", 320 "lrclk", "lrclk_sel"; 321 status = "disabled"; 322 }; 323 324 tdmin_lb: audio-controller@3c0 { 325 compatible = "amlogic,sm1-tdmin", 326 "amlogic,axg-tdmin"; 327 reg = <0x0 0x3c0 0x0 0x40>; 328 sound-name-prefix = "TDMIN_LB"; 329 resets = <&clkc_audio AUD_RESET_TDMIN_LB>; 330 clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>, 331 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>, 332 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>, 333 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>, 334 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>; 335 clock-names = "pclk", "sclk", "sclk_sel", 336 "lrclk", "lrclk_sel"; 337 status = "disabled"; 338 }; 339 340 spdifin: audio-controller@400 { 341 compatible = "amlogic,g12a-spdifin", 342 "amlogic,axg-spdifin"; 343 reg = <0x0 0x400 0x0 0x30>; 344 #sound-dai-cells = <0>; 345 sound-name-prefix = "SPDIFIN"; 346 interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>; 347 clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, 348 <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; 349 clock-names = "pclk", "refclk"; 350 resets = <&clkc_audio AUD_RESET_SPDIFIN>; 351 status = "disabled"; 352 }; 353 354 spdifout_a: audio-controller@480 { 355 compatible = "amlogic,g12a-spdifout", 356 "amlogic,axg-spdifout"; 357 reg = <0x0 0x480 0x0 0x50>; 358 #sound-dai-cells = <0>; 359 sound-name-prefix = "SPDIFOUT_A"; 360 clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, 361 <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; 362 clock-names = "pclk", "mclk"; 363 resets = <&clkc_audio AUD_RESET_SPDIFOUT>; 364 status = "disabled"; 365 }; 366 367 tdmout_a: audio-controller@500 { 368 compatible = "amlogic,sm1-tdmout"; 369 reg = <0x0 0x500 0x0 0x40>; 370 sound-name-prefix = "TDMOUT_A"; 371 resets = <&clkc_audio AUD_RESET_TDMOUT_A>; 372 clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, 373 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, 374 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, 375 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, 376 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; 377 clock-names = "pclk", "sclk", "sclk_sel", 378 "lrclk", "lrclk_sel"; 379 status = "disabled"; 380 }; 381 382 tdmout_b: audio-controller@540 { 383 compatible = "amlogic,sm1-tdmout"; 384 reg = <0x0 0x540 0x0 0x40>; 385 sound-name-prefix = "TDMOUT_B"; 386 resets = <&clkc_audio AUD_RESET_TDMOUT_B>; 387 clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>, 388 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>, 389 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>, 390 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>, 391 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>; 392 clock-names = "pclk", "sclk", "sclk_sel", 393 "lrclk", "lrclk_sel"; 394 status = "disabled"; 395 }; 396 397 tdmout_c: audio-controller@580 { 398 compatible = "amlogic,sm1-tdmout"; 399 reg = <0x0 0x580 0x0 0x40>; 400 sound-name-prefix = "TDMOUT_C"; 401 resets = <&clkc_audio AUD_RESET_TDMOUT_C>; 402 clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>, 403 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>, 404 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>, 405 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>, 406 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>; 407 clock-names = "pclk", "sclk", "sclk_sel", 408 "lrclk", "lrclk_sel"; 409 status = "disabled"; 410 }; 411 412 toacodec: audio-controller@740 { 413 compatible = "amlogic,sm1-toacodec", 414 "amlogic,g12a-toacodec"; 415 reg = <0x0 0x740 0x0 0x4>; 416 #sound-dai-cells = <1>; 417 sound-name-prefix = "TOACODEC"; 418 resets = <&clkc_audio AUD_RESET_TOACODEC>; 419 status = "disabled"; 420 }; 421 422 tohdmitx: audio-controller@744 { 423 compatible = "amlogic,sm1-tohdmitx", 424 "amlogic,g12a-tohdmitx"; 425 reg = <0x0 0x744 0x0 0x4>; 426 #sound-dai-cells = <1>; 427 sound-name-prefix = "TOHDMITX"; 428 resets = <&clkc_audio AUD_RESET_TOHDMITX>; 429 status = "disabled"; 430 }; 431 432 toddr_d: audio-controller@840 { 433 compatible = "amlogic,sm1-toddr", 434 "amlogic,axg-toddr"; 435 reg = <0x0 0x840 0x0 0x2c>; 436 #sound-dai-cells = <0>; 437 sound-name-prefix = "TODDR_D"; 438 interrupts = <GIC_SPI 49 IRQ_TYPE_EDGE_RISING>; 439 clocks = <&clkc_audio AUD_CLKID_TODDR_D>; 440 resets = <&arb AXG_ARB_TODDR_D>, 441 <&clkc_audio AUD_RESET_TODDR_D>; 442 reset-names = "arb", "rst"; 443 amlogic,fifo-depth = <256>; 444 status = "disabled"; 445 }; 446 447 frddr_d: audio-controller@880 { 448 compatible = "amlogic,sm1-frddr", 449 "amlogic,axg-frddr"; 450 reg = <0x0 0x880 0x0 0x2c>; 451 #sound-dai-cells = <0>; 452 sound-name-prefix = "FRDDR_D"; 453 interrupts = <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>; 454 clocks = <&clkc_audio AUD_CLKID_FRDDR_D>; 455 resets = <&arb AXG_ARB_FRDDR_D>, 456 <&clkc_audio AUD_RESET_FRDDR_D>; 457 reset-names = "arb", "rst"; 458 amlogic,fifo-depth = <256>; 459 status = "disabled"; 460 }; 461 }; 462 463 pdm: audio-controller@61000 { 464 compatible = "amlogic,sm1-pdm", 465 "amlogic,axg-pdm"; 466 reg = <0x0 0x61000 0x0 0x34>; 467 #sound-dai-cells = <0>; 468 sound-name-prefix = "PDM"; 469 clocks = <&clkc_audio AUD_CLKID_PDM>, 470 <&clkc_audio AUD_CLKID_PDM_DCLK>, 471 <&clkc_audio AUD_CLKID_PDM_SYSCLK>; 472 clock-names = "pclk", "dclk", "sysclk"; 473 resets = <&clkc_audio AUD_RESET_PDM>; 474 status = "disabled"; 475 }; 476}; 477 478&cecb_AO { 479 compatible = "amlogic,meson-sm1-ao-cec"; 480}; 481 482&clk_msr { 483 compatible = "amlogic,meson-sm1-clk-measure"; 484}; 485 486 487&clkc { 488 compatible = "amlogic,sm1-clkc"; 489}; 490 491&cpu_thermal { 492 cooling-maps { 493 map0 { 494 trip = <&cpu_passive>; 495 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 496 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 497 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 498 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 499 }; 500 501 map1 { 502 trip = <&cpu_hot>; 503 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 504 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 505 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 506 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 507 }; 508 }; 509}; 510 511ðmac { 512 power-domains = <&pwrc PWRC_SM1_ETH_ID>; 513}; 514 515&gpio_intc { 516 compatible = "amlogic,meson-sm1-gpio-intc", 517 "amlogic,meson-gpio-intc"; 518}; 519 520&pcie { 521 power-domains = <&pwrc PWRC_SM1_PCIE_ID>; 522}; 523 524&pmu { 525 compatible = "amlogic,sm1-ddr-pmu"; 526}; 527 528&pwrc { 529 compatible = "amlogic,meson-sm1-pwrc"; 530}; 531 532&simplefb_cvbs { 533 power-domains = <&pwrc PWRC_SM1_VPU_ID>; 534}; 535 536&simplefb_hdmi { 537 power-domains = <&pwrc PWRC_SM1_VPU_ID>; 538}; 539 540&vdec { 541 compatible = "amlogic,sm1-vdec"; 542}; 543 544&vpu { 545 power-domains = <&pwrc PWRC_SM1_VPU_ID>; 546}; 547 548&usb { 549 power-domains = <&pwrc PWRC_SM1_USB_ID>; 550}; 551