|
| 1 | +/* |
| 2 | + * arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-dabfm.dtsi |
| 3 | + * |
| 4 | + * Copyright (C) 2021 StreamUnlimited, Inc. All rights reserved. |
| 5 | + * |
| 6 | + * This program is free software; you can redistribute it and/or modify |
| 7 | + * it under the terms of the GNU General Public License as published by |
| 8 | + * the Free Software Foundation; either version 2 of the License, or |
| 9 | + * (at your option) any later version. |
| 10 | + * |
| 11 | + * This program is distributed in the hope that it will be useful, but WITHOUT |
| 12 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 14 | + * more details. |
| 15 | + * |
| 16 | + */ |
| 17 | + |
| 18 | +/* |
| 19 | + * DT for the removable dabfm module. |
| 20 | + */ |
| 21 | + |
| 22 | +/ { |
| 23 | + sue { |
| 24 | + daughterboard = "dabfm"; |
| 25 | + }; |
| 26 | + |
| 27 | + sound-dabfm { |
| 28 | + compatible = "sue,stream195x-audio"; |
| 29 | + sue-card,name = "dabfm"; |
| 30 | + |
| 31 | + sue-card,dai-link@2 { |
| 32 | + format = "i2s"; |
| 33 | + |
| 34 | + frame-master = <&dailink2_codec>; |
| 35 | + bitclock-master = <&dailink2_codec>; |
| 36 | + |
| 37 | + dailink2_cpu: cpu { |
| 38 | + sound-dai = <&sai6>; |
| 39 | + dai-tdm-slot-num = <2>; |
| 40 | + dai-tdm-slot-width = <32>; |
| 41 | + }; |
| 42 | + |
| 43 | + dailink2_codec: codec { |
| 44 | + use-dummy-codec; |
| 45 | + }; |
| 46 | + }; |
| 47 | + }; |
| 48 | + |
| 49 | + sound-sai2 { |
| 50 | + compatible = "sue,stream195x-audio"; |
| 51 | + sue-card,name = "sai2card"; |
| 52 | + |
| 53 | + sue-card,dai-link@4 { |
| 54 | + format = "i2s"; |
| 55 | + |
| 56 | + frame-master = <&dailink4_codec>; |
| 57 | + bitclock-master = <&dailink4_codec>; |
| 58 | + |
| 59 | + continuous-clock; |
| 60 | + |
| 61 | + dailink4_cpu: cpu { |
| 62 | + sound-dai = <&sai2>; |
| 63 | + dai-tdm-slot-num = <2>; |
| 64 | + dai-tdm-slot-width = <32>; |
| 65 | + }; |
| 66 | + |
| 67 | + dailink4_codec: codec { |
| 68 | + use-dummy-codec; |
| 69 | + }; |
| 70 | + }; |
| 71 | + }; |
| 72 | + |
| 73 | +}; |
| 74 | + |
| 75 | +&ecspi1 { |
| 76 | + pinctrl-names = "default"; |
| 77 | + pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>; |
| 78 | + num-cs = <1>; |
| 79 | + cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; |
| 80 | + status = "okay"; |
| 81 | + |
| 82 | + dabfm: dabfm@0 { |
| 83 | + status = "okay"; |
| 84 | + reg = <0>; |
| 85 | + compatible = "sue,dabfm"; |
| 86 | + /* It's set to 10MHz which is 1MHz more than dabfm driver, |
| 87 | + * which is different from stream1832 where they are same |
| 88 | + */ |
| 89 | + spi-max-frequency = <10000000>; |
| 90 | + }; |
| 91 | +}; |
| 92 | + |
| 93 | +&sai6 { |
| 94 | + #sound-dai-cells = <0>; /* This is required for the simple-audio-card to work */ |
| 95 | + pinctrl-names = "default"; |
| 96 | + pinctrl-0 = <&pinctrl_sai6_rx>; |
| 97 | + /* override interrupt since it's using same one as SAI5 by default */ |
| 98 | + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; |
| 99 | + |
| 100 | + status = "okay"; |
| 101 | + |
| 102 | + /* |
| 103 | + * This is conjunction with `dai-tdm-slot-num = <2>;` makes sure that |
| 104 | + * for 8 channel playback 8 ch / 2 slots = 4 pins are used with a mask |
| 105 | + * of 0xf. |
| 106 | + * / |
| 107 | + /* first number is pins, second is rx mask, third is tx mask */ |
| 108 | + fsl,dataline = < |
| 109 | + 1 0x1 0x1 |
| 110 | + 2 0x3 0x3 |
| 111 | + 3 0x7 0x7 |
| 112 | + 4 0xf 0xf |
| 113 | + >; |
| 114 | + fsl,sai-asynchronous; |
| 115 | +}; |
| 116 | + |
| 117 | +&sai2 { |
| 118 | + #sound-dai-cells = <0>; /* This is required for the simple-audio-card to work */ |
| 119 | + pinctrl-names = "default"; |
| 120 | + pinctrl-0 = <&pinctrl_sai2_rx &pinctrl_sai2_clk>; |
| 121 | + |
| 122 | + assigned-clocks = <&clk IMX8MM_CLK_SAI2>; |
| 123 | + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; |
| 124 | + assigned-clock-rates = <24576000>; |
| 125 | + |
| 126 | + status = "okay"; |
| 127 | +}; |
0 commit comments