1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/net/lantiq, 4 $id: http://devicetree.org/schemas/net/lantiq,pef2256.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Lantiq PEF2256 7 title: Lantiq PEF2256 8 8 9 maintainers: 9 maintainers: 10 - Herve Codina <herve.codina@bootlin.com> 10 - Herve Codina <herve.codina@bootlin.com> 11 11 12 description: 12 description: 13 The Lantiq PEF2256, also known as Infineon P 13 The Lantiq PEF2256, also known as Infineon PEF2256 or FALC56, is a framer and 14 line interface component designed to fulfill 14 line interface component designed to fulfill all required interfacing between 15 an analog E1/T1/J1 line and the digital PCM 15 an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. 16 16 17 properties: 17 properties: 18 compatible: 18 compatible: 19 items: 19 items: 20 - const: lantiq,pef2256 20 - const: lantiq,pef2256 21 21 22 reg: 22 reg: 23 maxItems: 1 23 maxItems: 1 24 24 25 clocks: 25 clocks: 26 items: 26 items: 27 - description: Master Clock 27 - description: Master Clock 28 - description: System Clock Receive 28 - description: System Clock Receive 29 - description: System Clock Transmit 29 - description: System Clock Transmit 30 30 31 clock-names: 31 clock-names: 32 items: 32 items: 33 - const: mclk 33 - const: mclk 34 - const: sclkr 34 - const: sclkr 35 - const: sclkx 35 - const: sclkx 36 36 37 interrupts: 37 interrupts: 38 maxItems: 1 38 maxItems: 1 39 39 40 reset-gpios: 40 reset-gpios: 41 description: 41 description: 42 GPIO used to reset the device. 42 GPIO used to reset the device. 43 maxItems: 1 43 maxItems: 1 44 44 45 pinctrl: 45 pinctrl: 46 $ref: /schemas/pinctrl/pinctrl.yaml# 46 $ref: /schemas/pinctrl/pinctrl.yaml# 47 additionalProperties: false 47 additionalProperties: false 48 48 49 patternProperties: 49 patternProperties: 50 '-pins$': 50 '-pins$': 51 type: object 51 type: object 52 $ref: /schemas/pinctrl/pinmux-node.yam 52 $ref: /schemas/pinctrl/pinmux-node.yaml# 53 additionalProperties: false 53 additionalProperties: false 54 54 55 properties: 55 properties: 56 pins: 56 pins: 57 enum: [ RPA, RPB, RPC, RPD, XPA, X 57 enum: [ RPA, RPB, RPC, RPD, XPA, XPB, XPC, XPD ] 58 58 59 function: 59 function: 60 enum: [ SYPR, RFM, RFMB, RSIGM, RS 60 enum: [ SYPR, RFM, RFMB, RSIGM, RSIG, DLR, FREEZE, RFSP, LOS, 61 SYPX, XFMS, XSIG, TCLK, XM 61 SYPX, XFMS, XSIG, TCLK, XMFB, XSIGM, DLX, XCLK, XLT, 62 GPI, GPOH, GPOL ] 62 GPI, GPOH, GPOL ] 63 63 64 required: 64 required: 65 - pins 65 - pins 66 - function 66 - function 67 67 68 lantiq,data-rate-bps: 68 lantiq,data-rate-bps: 69 enum: [2048000, 4096000, 8192000, 16384000 69 enum: [2048000, 4096000, 8192000, 16384000] 70 default: 2048000 70 default: 2048000 71 description: 71 description: 72 Data rate (bit per seconds) on the syste 72 Data rate (bit per seconds) on the system highway. 73 73 74 lantiq,clock-falling-edge: 74 lantiq,clock-falling-edge: 75 $ref: /schemas/types.yaml#/definitions/fla 75 $ref: /schemas/types.yaml#/definitions/flag 76 description: 76 description: 77 Data is sent on falling edge of the cloc 77 Data is sent on falling edge of the clock (and received on the rising 78 edge). If 'clock-falling-edge' is not pr 78 edge). If 'clock-falling-edge' is not present, data is sent on the 79 rising edge (and received on the falling 79 rising edge (and received on the falling edge). 80 80 81 lantiq,channel-phase: 81 lantiq,channel-phase: 82 $ref: /schemas/types.yaml#/definitions/uin 82 $ref: /schemas/types.yaml#/definitions/uint32 83 enum: [0, 1, 2, 3, 4, 5, 6, 7] 83 enum: [0, 1, 2, 3, 4, 5, 6, 7] 84 default: 0 84 default: 0 85 description: | 85 description: | 86 The pef2256 delivers a full frame (32 8- 86 The pef2256 delivers a full frame (32 8-bit time-slots in E1 and 24 8-bit 87 time-slots 8 8-bit signaling in E1/J1) e 87 time-slots 8 8-bit signaling in E1/J1) every 125us. This lead to a data 88 rate of 2048000 bit/s. When lantiq,data- 88 rate of 2048000 bit/s. When lantiq,data-rate-bps is more than 2048000 89 bit/s, the data (all 32 8-bit) present i 89 bit/s, the data (all 32 8-bit) present in the frame are interleave with 90 unused time-slots. The lantiq,channel-ph 90 unused time-slots. The lantiq,channel-phase property allows to set the 91 correct alignment of the interleave mech 91 correct alignment of the interleave mechanism. 92 For instance, suppose lantiq,data-rate-b 92 For instance, suppose lantiq,data-rate-bps = 8192000 (ie 4*2048000), and 93 lantiq,channel-phase = 2, the interleave 93 lantiq,channel-phase = 2, the interleave schema with unused time-slots 94 (nu) and used time-slots (XX) for TSi is 94 (nu) and used time-slots (XX) for TSi is 95 nu nu XX nu nu nu XX nu nu nu XX nu 95 nu nu XX nu nu nu XX nu nu nu XX nu 96 <-- TSi --> <- TSi+1 -> <- TSi+2 -> 96 <-- TSi --> <- TSi+1 -> <- TSi+2 -> 97 With lantiq,data-rate-bps = 8192000, and 97 With lantiq,data-rate-bps = 8192000, and lantiq,channel-phase = 1, the 98 interleave schema is 98 interleave schema is 99 nu XX nu nu nu XX nu nu nu XX nu nu 99 nu XX nu nu nu XX nu nu nu XX nu nu 100 <-- TSi --> <- TSi+1 -> <- TSi+2 -> 100 <-- TSi --> <- TSi+1 -> <- TSi+2 -> 101 With lantiq,data-rate-bps = 4096000 (ie 101 With lantiq,data-rate-bps = 4096000 (ie 2*2048000), and 102 lantiq,channel-phase = 1, the interleave 102 lantiq,channel-phase = 1, the interleave schema is 103 nu XX nu XX nu XX 103 nu XX nu XX nu XX 104 <-- TSi --> <- TSi+1 -> <- TSi+2 -> 104 <-- TSi --> <- TSi+1 -> <- TSi+2 -> 105 105 106 patternProperties: 106 patternProperties: 107 '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$': 107 '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$': 108 type: object 108 type: object 109 $ref: /schemas/sound/dai-common.yaml 109 $ref: /schemas/sound/dai-common.yaml 110 unevaluatedProperties: false 110 unevaluatedProperties: false 111 description: 111 description: 112 Codec provided by the pef2256. This code 112 Codec provided by the pef2256. This codec allows to use some of the PCM 113 system highway time-slots as audio chann 113 system highway time-slots as audio channels to transport audio data over 114 the E1/T1/J1 lines. 114 the E1/T1/J1 lines. 115 The time-slots used by the codec must be 115 The time-slots used by the codec must be set and so, the properties 116 'dai-tdm-slot-num', 'dai-tdm-slot-width' 116 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and 117 'dai-tdm-slot-rx-mask' must be present i 117 'dai-tdm-slot-rx-mask' must be present in the sound card node for 118 sub-nodes that involve the codec. The co 118 sub-nodes that involve the codec. The codec uses 8-bit time-slots. 119 'dai-tdm-tdm-slot-with' must be set to 8 119 'dai-tdm-tdm-slot-with' must be set to 8. 120 The tx and rx masks define the pef2256 t 120 The tx and rx masks define the pef2256 time-slots assigned to the codec. 121 121 122 properties: 122 properties: 123 compatible: 123 compatible: 124 const: lantiq,pef2256-codec 124 const: lantiq,pef2256-codec 125 125 126 '#sound-dai-cells': 126 '#sound-dai-cells': 127 const: 0 127 const: 0 128 128 129 required: 129 required: 130 - compatible 130 - compatible 131 - '#sound-dai-cells' 131 - '#sound-dai-cells' 132 132 133 required: 133 required: 134 - compatible 134 - compatible 135 - reg 135 - reg 136 - clocks 136 - clocks 137 - clock-names 137 - clock-names 138 - interrupts 138 - interrupts 139 139 140 additionalProperties: false 140 additionalProperties: false 141 141 142 examples: 142 examples: 143 - | 143 - | 144 #include <dt-bindings/gpio/gpio.h> 144 #include <dt-bindings/gpio/gpio.h> 145 #include <dt-bindings/interrupt-controller 145 #include <dt-bindings/interrupt-controller/irq.h> 146 146 147 pef2256: framer@2000000 { 147 pef2256: framer@2000000 { 148 compatible = "lantiq,pef2256"; 148 compatible = "lantiq,pef2256"; 149 reg = <0x2000000 0x100>; 149 reg = <0x2000000 0x100>; 150 interrupts = <8 IRQ_TYPE_LEVEL_LOW>; 150 interrupts = <8 IRQ_TYPE_LEVEL_LOW>; 151 interrupt-parent = <&intc>; 151 interrupt-parent = <&intc>; 152 clocks = <&clk_mclk>, <&clk_sclkr>, <&cl 152 clocks = <&clk_mclk>, <&clk_sclkr>, <&clk_sclkx>; 153 clock-names = "mclk", "sclkr", "sclkx"; 153 clock-names = "mclk", "sclkr", "sclkx"; 154 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW> 154 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; 155 lantiq,data-rate-bps = <4096000>; 155 lantiq,data-rate-bps = <4096000>; 156 156 157 pinctrl { 157 pinctrl { 158 pef2256_rpa_sypr: rpa-pins { 158 pef2256_rpa_sypr: rpa-pins { 159 pins = "RPA"; 159 pins = "RPA"; 160 function = "SYPR"; 160 function = "SYPR"; 161 }; 161 }; 162 pef2256_xpa_sypx: xpa-pins { 162 pef2256_xpa_sypx: xpa-pins { 163 pins = "XPA"; 163 pins = "XPA"; 164 function = "SYPX"; 164 function = "SYPX"; 165 }; 165 }; 166 }; 166 }; 167 167 168 pef2256_codec0: codec-0 { 168 pef2256_codec0: codec-0 { 169 compatible = "lantiq,pef2256-codec"; 169 compatible = "lantiq,pef2256-codec"; 170 #sound-dai-cells = <0>; 170 #sound-dai-cells = <0>; 171 sound-name-prefix = "PEF2256_0"; 171 sound-name-prefix = "PEF2256_0"; 172 }; 172 }; 173 173 174 pef2256_codec1: codec-1 { 174 pef2256_codec1: codec-1 { 175 compatible = "lantiq,pef2256-codec"; 175 compatible = "lantiq,pef2256-codec"; 176 #sound-dai-cells = <0>; 176 #sound-dai-cells = <0>; 177 sound-name-prefix = "PEF2256_1"; 177 sound-name-prefix = "PEF2256_1"; 178 }; 178 }; 179 }; 179 }; 180 180 181 sound { 181 sound { 182 compatible = "simple-audio-card"; 182 compatible = "simple-audio-card"; 183 #address-cells = <1>; 183 #address-cells = <1>; 184 #size-cells = <0>; 184 #size-cells = <0>; 185 simple-audio-card,dai-link@0 { /* CPU DA 185 simple-audio-card,dai-link@0 { /* CPU DAI1 - pef2256 codec 1 */ 186 reg = <0>; 186 reg = <0>; 187 cpu { 187 cpu { 188 sound-dai = <&cpu_dai1>; 188 sound-dai = <&cpu_dai1>; 189 }; 189 }; 190 codec { 190 codec { 191 sound-dai = <&pef2256_codec0>; 191 sound-dai = <&pef2256_codec0>; 192 dai-tdm-slot-num = <4>; 192 dai-tdm-slot-num = <4>; 193 dai-tdm-slot-width = <8>; 193 dai-tdm-slot-width = <8>; 194 /* TS 1, 2, 3, 4 */ 194 /* TS 1, 2, 3, 4 */ 195 dai-tdm-slot-tx-mask = <0 1 1 1 1>; 195 dai-tdm-slot-tx-mask = <0 1 1 1 1>; 196 dai-tdm-slot-rx-mask = <0 1 1 1 1>; 196 dai-tdm-slot-rx-mask = <0 1 1 1 1>; 197 }; 197 }; 198 }; 198 }; 199 simple-audio-card,dai-link@1 { /* CPU DA 199 simple-audio-card,dai-link@1 { /* CPU DAI2 - pef2256 codec 2 */ 200 reg = <1>; 200 reg = <1>; 201 cpu { 201 cpu { 202 sound-dai = <&cpu_dai2>; 202 sound-dai = <&cpu_dai2>; 203 }; 203 }; 204 codec { 204 codec { 205 sound-dai = <&pef2256_codec1>; 205 sound-dai = <&pef2256_codec1>; 206 dai-tdm-slot-num = <4>; 206 dai-tdm-slot-num = <4>; 207 dai-tdm-slot-width = <8>; 207 dai-tdm-slot-width = <8>; 208 /* TS 5, 6, 7, 8 */ 208 /* TS 5, 6, 7, 8 */ 209 dai-tdm-slot-tx-mask = <0 0 0 0 0 1 209 dai-tdm-slot-tx-mask = <0 0 0 0 0 1 1 1 1>; 210 dai-tdm-slot-rx-mask = <0 0 0 0 0 1 210 dai-tdm-slot-rx-mask = <0 0 0 0 0 1 1 1 1>; 211 }; 211 }; 212 }; 212 }; 213 }; 213 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.