Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2019 BayLibre, SAS
0004  * Author: Jerome Brunet <jbrunet@baylibre.com>
0005  */
0006 
0007 #include "meson-g12-common.dtsi"
0008 #include <dt-bindings/clock/axg-audio-clkc.h>
0009 #include <dt-bindings/power/meson-g12a-power.h>
0010 #include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
0011 #include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
0012 
0013 / {
0014         tdmif_a: audio-controller-0 {
0015                 compatible = "amlogic,axg-tdm-iface";
0016                 #sound-dai-cells = <0>;
0017                 sound-name-prefix = "TDM_A";
0018                 clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
0019                          <&clkc_audio AUD_CLKID_MST_A_SCLK>,
0020                          <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
0021                 clock-names = "mclk", "sclk", "lrclk";
0022                 status = "disabled";
0023         };
0024 
0025         tdmif_b: audio-controller-1 {
0026                 compatible = "amlogic,axg-tdm-iface";
0027                 #sound-dai-cells = <0>;
0028                 sound-name-prefix = "TDM_B";
0029                 clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
0030                          <&clkc_audio AUD_CLKID_MST_B_SCLK>,
0031                          <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
0032                 clock-names = "mclk", "sclk", "lrclk";
0033                 status = "disabled";
0034         };
0035 
0036         tdmif_c: audio-controller-2 {
0037                 compatible = "amlogic,axg-tdm-iface";
0038                 #sound-dai-cells = <0>;
0039                 sound-name-prefix = "TDM_C";
0040                 clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
0041                          <&clkc_audio AUD_CLKID_MST_C_SCLK>,
0042                          <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
0043                 clock-names = "mclk", "sclk", "lrclk";
0044                 status = "disabled";
0045         };
0046 };
0047 
0048 &apb {
0049         pdm: audio-controller@40000 {
0050                 compatible = "amlogic,g12a-pdm",
0051                              "amlogic,axg-pdm";
0052                 reg = <0x0 0x40000 0x0 0x34>;
0053                 #sound-dai-cells = <0>;
0054                 sound-name-prefix = "PDM";
0055                 clocks = <&clkc_audio AUD_CLKID_PDM>,
0056                          <&clkc_audio AUD_CLKID_PDM_DCLK>,
0057                          <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
0058                 clock-names = "pclk", "dclk", "sysclk";
0059                 resets = <&clkc_audio AUD_RESET_PDM>;
0060                 status = "disabled";
0061         };
0062 
0063         audio: bus@42000 {
0064                 compatible = "simple-bus";
0065                 reg = <0x0 0x42000 0x0 0x2000>;
0066                 #address-cells = <2>;
0067                 #size-cells = <2>;
0068                 ranges = <0x0 0x0 0x0 0x42000 0x0 0x2000>;
0069 
0070                 clkc_audio: clock-controller@0 {
0071                         status = "disabled";
0072                         compatible = "amlogic,g12a-audio-clkc";
0073                         reg = <0x0 0x0 0x0 0xb4>;
0074                         #clock-cells = <1>;
0075                         #reset-cells = <1>;
0076 
0077                         clocks = <&clkc CLKID_AUDIO>,
0078                                  <&clkc CLKID_MPLL0>,
0079                                  <&clkc CLKID_MPLL1>,
0080                                  <&clkc CLKID_MPLL2>,
0081                                  <&clkc CLKID_MPLL3>,
0082                                  <&clkc CLKID_HIFI_PLL>,
0083                                  <&clkc CLKID_FCLK_DIV3>,
0084                                  <&clkc CLKID_FCLK_DIV4>,
0085                                  <&clkc CLKID_GP0_PLL>;
0086                         clock-names = "pclk",
0087                                       "mst_in0",
0088                                       "mst_in1",
0089                                       "mst_in2",
0090                                       "mst_in3",
0091                                       "mst_in4",
0092                                       "mst_in5",
0093                                       "mst_in6",
0094                                       "mst_in7";
0095 
0096                         resets = <&reset RESET_AUDIO>;
0097                 };
0098 
0099                 toddr_a: audio-controller@100 {
0100                         compatible = "amlogic,g12a-toddr",
0101                                      "amlogic,axg-toddr";
0102                         reg = <0x0 0x100 0x0 0x2c>;
0103                         #sound-dai-cells = <0>;
0104                         sound-name-prefix = "TODDR_A";
0105                         interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>;
0106                         clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
0107                         resets = <&arb AXG_ARB_TODDR_A>,
0108                                  <&clkc_audio AUD_RESET_TODDR_A>;
0109                         reset-names = "arb", "rst";
0110                         amlogic,fifo-depth = <512>;
0111                         status = "disabled";
0112                 };
0113 
0114                 toddr_b: audio-controller@140 {
0115                         compatible = "amlogic,g12a-toddr",
0116                                      "amlogic,axg-toddr";
0117                         reg = <0x0 0x140 0x0 0x2c>;
0118                         #sound-dai-cells = <0>;
0119                         sound-name-prefix = "TODDR_B";
0120                         interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>;
0121                         clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
0122                         resets = <&arb AXG_ARB_TODDR_B>,
0123                                  <&clkc_audio AUD_RESET_TODDR_B>;
0124                         reset-names = "arb", "rst";
0125                         amlogic,fifo-depth = <256>;
0126                         status = "disabled";
0127                 };
0128 
0129                 toddr_c: audio-controller@180 {
0130                         compatible = "amlogic,g12a-toddr",
0131                                      "amlogic,axg-toddr";
0132                         reg = <0x0 0x180 0x0 0x2c>;
0133                         #sound-dai-cells = <0>;
0134                         sound-name-prefix = "TODDR_C";
0135                         interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>;
0136                         clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
0137                         resets = <&arb AXG_ARB_TODDR_C>,
0138                                  <&clkc_audio AUD_RESET_TODDR_C>;
0139                         reset-names = "arb", "rst";
0140                         amlogic,fifo-depth = <256>;
0141                         status = "disabled";
0142                 };
0143 
0144                 frddr_a: audio-controller@1c0 {
0145                         compatible = "amlogic,g12a-frddr",
0146                                      "amlogic,axg-frddr";
0147                         reg = <0x0 0x1c0 0x0 0x2c>;
0148                         #sound-dai-cells = <0>;
0149                         sound-name-prefix = "FRDDR_A";
0150                         interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
0151                         clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
0152                         resets = <&arb AXG_ARB_FRDDR_A>,
0153                                  <&clkc_audio AUD_RESET_FRDDR_A>;
0154                         reset-names = "arb", "rst";
0155                         amlogic,fifo-depth = <512>;
0156                         status = "disabled";
0157                 };
0158 
0159                 frddr_b: audio-controller@200 {
0160                         compatible = "amlogic,g12a-frddr",
0161                                      "amlogic,axg-frddr";
0162                         reg = <0x0 0x200 0x0 0x2c>;
0163                         #sound-dai-cells = <0>;
0164                         sound-name-prefix = "FRDDR_B";
0165                         interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>;
0166                         clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
0167                         resets = <&arb AXG_ARB_FRDDR_B>,
0168                                  <&clkc_audio AUD_RESET_FRDDR_B>;
0169                         reset-names = "arb", "rst";
0170                         amlogic,fifo-depth = <256>;
0171                         status = "disabled";
0172                 };
0173 
0174                 frddr_c: audio-controller@240 {
0175                         compatible = "amlogic,g12a-frddr",
0176                                      "amlogic,axg-frddr";
0177                         reg = <0x0 0x240 0x0 0x2c>;
0178                         #sound-dai-cells = <0>;
0179                         sound-name-prefix = "FRDDR_C";
0180                         interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>;
0181                         clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
0182                         resets = <&arb AXG_ARB_FRDDR_C>,
0183                                  <&clkc_audio AUD_RESET_FRDDR_C>;
0184                         reset-names = "arb", "rst";
0185                         amlogic,fifo-depth = <256>;
0186                         status = "disabled";
0187                 };
0188 
0189                 arb: reset-controller@280 {
0190                         status = "disabled";
0191                         compatible = "amlogic,meson-axg-audio-arb";
0192                         reg = <0x0 0x280 0x0 0x4>;
0193                         #reset-cells = <1>;
0194                         clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
0195                 };
0196 
0197                 tdmin_a: audio-controller@300 {
0198                         compatible = "amlogic,g12a-tdmin",
0199                                      "amlogic,axg-tdmin";
0200                         reg = <0x0 0x300 0x0 0x40>;
0201                         sound-name-prefix = "TDMIN_A";
0202                         resets = <&clkc_audio AUD_RESET_TDMIN_A>;
0203                         clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
0204                                  <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
0205                                  <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
0206                                  <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
0207                                  <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
0208                         clock-names = "pclk", "sclk", "sclk_sel",
0209                                       "lrclk", "lrclk_sel";
0210                         status = "disabled";
0211                 };
0212 
0213                 tdmin_b: audio-controller@340 {
0214                         compatible = "amlogic,g12a-tdmin",
0215                                      "amlogic,axg-tdmin";
0216                         reg = <0x0 0x340 0x0 0x40>;
0217                         sound-name-prefix = "TDMIN_B";
0218                         resets = <&clkc_audio AUD_RESET_TDMIN_B>;
0219                         clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
0220                                  <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
0221                                  <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
0222                                  <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
0223                                  <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
0224                         clock-names = "pclk", "sclk", "sclk_sel",
0225                                       "lrclk", "lrclk_sel";
0226                         status = "disabled";
0227                 };
0228 
0229                 tdmin_c: audio-controller@380 {
0230                         compatible = "amlogic,g12a-tdmin",
0231                                      "amlogic,axg-tdmin";
0232                         reg = <0x0 0x380 0x0 0x40>;
0233                         sound-name-prefix = "TDMIN_C";
0234                         resets = <&clkc_audio AUD_RESET_TDMIN_C>;
0235                         clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
0236                                  <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
0237                                  <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
0238                                  <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
0239                                  <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
0240                         clock-names = "pclk", "sclk", "sclk_sel",
0241                                       "lrclk", "lrclk_sel";
0242                         status = "disabled";
0243                 };
0244 
0245                 tdmin_lb: audio-controller@3c0 {
0246                         compatible = "amlogic,g12a-tdmin",
0247                                      "amlogic,axg-tdmin";
0248                         reg = <0x0 0x3c0 0x0 0x40>;
0249                         sound-name-prefix = "TDMIN_LB";
0250                         resets = <&clkc_audio AUD_RESET_TDMIN_LB>;
0251                         clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
0252                                  <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
0253                                  <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
0254                                  <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
0255                                  <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
0256                         clock-names = "pclk", "sclk", "sclk_sel",
0257                                       "lrclk", "lrclk_sel";
0258                         status = "disabled";
0259                 };
0260 
0261                 spdifin: audio-controller@400 {
0262                         compatible = "amlogic,g12a-spdifin",
0263                                      "amlogic,axg-spdifin";
0264                         reg = <0x0 0x400 0x0 0x30>;
0265                         #sound-dai-cells = <0>;
0266                         sound-name-prefix = "SPDIFIN";
0267                         interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
0268                         clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
0269                                  <&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
0270                         clock-names = "pclk", "refclk";
0271                         resets = <&clkc_audio AUD_RESET_SPDIFIN>;
0272                         status = "disabled";
0273                 };
0274 
0275                 spdifout: audio-controller@480 {
0276                         compatible = "amlogic,g12a-spdifout",
0277                                      "amlogic,axg-spdifout";
0278                         reg = <0x0 0x480 0x0 0x50>;
0279                         #sound-dai-cells = <0>;
0280                         sound-name-prefix = "SPDIFOUT";
0281                         clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
0282                                  <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
0283                         clock-names = "pclk", "mclk";
0284                         resets = <&clkc_audio AUD_RESET_SPDIFOUT>;
0285                         status = "disabled";
0286                 };
0287 
0288                 tdmout_a: audio-controller@500 {
0289                         compatible = "amlogic,g12a-tdmout";
0290                         reg = <0x0 0x500 0x0 0x40>;
0291                         sound-name-prefix = "TDMOUT_A";
0292                         resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
0293                         clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
0294                                  <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
0295                                  <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
0296                                  <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
0297                                  <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
0298                         clock-names = "pclk", "sclk", "sclk_sel",
0299                                       "lrclk", "lrclk_sel";
0300                         status = "disabled";
0301                 };
0302 
0303                 tdmout_b: audio-controller@540 {
0304                         compatible = "amlogic,g12a-tdmout";
0305                         reg = <0x0 0x540 0x0 0x40>;
0306                         sound-name-prefix = "TDMOUT_B";
0307                         resets = <&clkc_audio AUD_RESET_TDMOUT_B>;
0308                         clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
0309                                  <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
0310                                  <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
0311                                  <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
0312                                  <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
0313                         clock-names = "pclk", "sclk", "sclk_sel",
0314                                       "lrclk", "lrclk_sel";
0315                         status = "disabled";
0316                 };
0317 
0318                 tdmout_c: audio-controller@580 {
0319                         compatible = "amlogic,g12a-tdmout";
0320                         reg = <0x0 0x580 0x0 0x40>;
0321                         sound-name-prefix = "TDMOUT_C";
0322                         resets = <&clkc_audio AUD_RESET_TDMOUT_C>;
0323                         clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
0324                                  <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
0325                                  <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
0326                                  <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
0327                                  <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
0328                         clock-names = "pclk", "sclk", "sclk_sel",
0329                                       "lrclk", "lrclk_sel";
0330                         status = "disabled";
0331                 };
0332 
0333                 spdifout_b: audio-controller@680 {
0334                         compatible = "amlogic,g12a-spdifout",
0335                                      "amlogic,axg-spdifout";
0336                         reg = <0x0 0x680 0x0 0x50>;
0337                         #sound-dai-cells = <0>;
0338                         sound-name-prefix = "SPDIFOUT_B";
0339                         clocks = <&clkc_audio AUD_CLKID_SPDIFOUT_B>,
0340                                  <&clkc_audio AUD_CLKID_SPDIFOUT_B_CLK>;
0341                         clock-names = "pclk", "mclk";
0342                         resets = <&clkc_audio AUD_RESET_SPDIFOUT_B>;
0343                         status = "disabled";
0344                 };
0345 
0346                 toacodec: audio-controller@740 {
0347                         compatible = "amlogic,g12a-toacodec";
0348                         reg = <0x0 0x740 0x0 0x4>;
0349                         #sound-dai-cells = <1>;
0350                         sound-name-prefix = "TOACODEC";
0351                         resets = <&clkc_audio AUD_RESET_TOACODEC>;
0352                         status = "disabled";
0353                 };
0354 
0355                 tohdmitx: audio-controller@744 {
0356                         compatible = "amlogic,g12a-tohdmitx";
0357                         reg = <0x0 0x744 0x0 0x4>;
0358                         #sound-dai-cells = <1>;
0359                         sound-name-prefix = "TOHDMITX";
0360                         resets = <&clkc_audio AUD_RESET_TOHDMITX>;
0361                         status = "disabled";
0362                 };
0363         };
0364 };
0365 
0366 &ethmac {
0367         power-domains = <&pwrc PWRC_G12A_ETH_ID>;
0368 };
0369 
0370 &vpu {
0371         power-domains = <&pwrc PWRC_G12A_VPU_ID>;
0372 };
0373 
0374 &sd_emmc_a {
0375         amlogic,dram-access-quirk;
0376 };
0377 
0378 &simplefb_cvbs {
0379         power-domains = <&pwrc PWRC_G12A_VPU_ID>;
0380 };
0381 
0382 &simplefb_hdmi {
0383         power-domains = <&pwrc PWRC_G12A_VPU_ID>;
0384 };
0385