From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C6A2EE4996 for ; Mon, 21 Aug 2023 20:50:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 75DFC839; Mon, 21 Aug 2023 22:50:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 75DFC839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692651055; bh=2iXNBomS3QYsEVGDuduwyjCgZP0m9FgMapy3rlwBHEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DlTSiHavhacryipUtcPS1UP5YK7Ty+sF4nIdktVD6A2PHP6PfwZiRMZGwIUAmudmN x86PyQyEIuzIm5lvZUW78dX1IrqGsMzI2ZFtdZ4FRnl6C9p/aV+IWu4Y1iZhjGj1oD 3dKNrFmExRB+KeSjzLR2Rlt5btKA8/M/DzkXD9fU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E6B3CF8025E; Mon, 21 Aug 2023 22:49:44 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 90181F8025E; Mon, 21 Aug 2023 22:49:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A2B32F80199; Mon, 21 Aug 2023 22:49:41 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 02C00F800F8 for ; Mon, 21 Aug 2023 22:49:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 02C00F800F8 Authentication-Results: alsa1.perex.cz; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=fv+EmOOC Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 31C8864B7B; Mon, 21 Aug 2023 20:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 706CAC433C8; Mon, 21 Aug 2023 20:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692650973; bh=2iXNBomS3QYsEVGDuduwyjCgZP0m9FgMapy3rlwBHEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fv+EmOOCUeVPXhIEOPEN0gZANSmnsZESKoOCf0KcELIFfSCoCVIhcM+OWdzQyYY9i U5CGawHWdzHz0OeDYcygg9fHP+jcv0z6wrE9eVJfXfNYZ6vvTfZyuEGleV4t7ExcWJ kRYw4DCxnDiUJZxmUwYZ9dlvlHtRTdaWF+gkzlF22bzi10fEZD7M7W3CZZ3Q+ypmh/ bQUcCEBK+RnPaywn/CD/IkztUICRJolXHQvvnNXoQVypDFM1Bv10ZT5aOJ84jqFvZU 9jcWrkOrw6JVUTAuafxBiTKSA04xrvLLPGn0ncXDNdUu+y75yrWIJkB4wCMYxmffyX X0bmQr4hW9uwg== Received: (nullmailer pid 2268748 invoked by uid 1000); Mon, 21 Aug 2023 20:49:29 -0000 Date: Mon, 21 Aug 2023 15:49:29 -0500 From: Rob Herring To: Christophe Leroy Cc: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Randy Dunlap , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: Re: [PATCH v4 22/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer Message-ID: <20230821204929.GA2261144-robh@kernel.org> References: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> Message-ID-Hash: OQK6KNMKK7VPCZ3S43JJGT7OXPXBGWTT X-Message-ID-Hash: OQK6KNMKK7VPCZ3S43JJGT7OXPXBGWTT X-MailFrom: SRS0=A38r=EG=robh_at_kernel.org=rob@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, Aug 18, 2023 at 06:39:16PM +0200, Christophe Leroy wrote: > From: Herve Codina > > The Lantiq PEF2256 is a framer and line interface component designed to > fulfill all required interfacing between an analog E1/T1/J1 line and the > digital PCM system highway/H.100 bus. > > Signed-off-by: Herve Codina > Signed-off-by: Christophe Leroy > --- > .../bindings/net/lantiq,pef2256.yaml | 219 ++++++++++++++++++ > 1 file changed, 219 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > > diff --git a/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > new file mode 100644 > index 000000000000..72f6777afa3a > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > @@ -0,0 +1,219 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/lantiq,pef2256.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Lantiq PEF2256 > + > +maintainers: > + - Herve Codina > + > +description: > + The Lantiq PEF2256, also known as Infineon PEF2256 or FALC56, is a framer and > + line interface component designed to fulfill all required interfacing between > + an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. > + > +properties: > + compatible: > + items: > + - const: lantiq,pef2256 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Master clock > + - description: System Clock Receive > + - description: System Clock Transmit > + > + clock-names: > + items: > + - const: mclk > + - const: sclkr > + - const: sclkx > + > + interrupts: > + maxItems: 1 > + > + reset-gpios: > + description: > + GPIO used to reset the device. > + maxItems: 1 > + > + '#framer-cells': Not a standard binding. Do you need provider specific variable number of cells? > + const: 0 > + > + pinctrl: > + $ref: /schemas/pinctrl/pinctrl.yaml# > + additionalProperties: false > + > + patternProperties: > + '-pins$': > + type: object > + $ref: /schemas/pinctrl/pincfg-node.yaml# > + additionalProperties: false > + > + properties: > + pins: > + enum: [ RPA, RPB, RPC, RPD, XPA, XPB, XPC, XPD ] > + > + function: > + enum: [ SYPR, RFM, RFMB, RSIGM, RSIG, DLR, FREEZE, RFSP, LOS, > + SYPX, XFMS, XSIG, TCLK, XMFB, XSIGM, DLX, XCLK, XLT, > + GPI, GPOH, GPOL ] > + > + required: > + - pins > + - function > + > + lantiq,data-rate-bps: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [2048000, 4096000, 8192000, 16384000] > + default: 2048000 > + description: > + Data rate (bit per seconds) on the system highway. > + > + lantiq,clock-falling-edge: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Data is sent on falling edge of the clock (and received on the rising > + edge). If 'clock-falling-edge' is not present, data is sent on the > + rising edge (and received on the falling edge). > + > + lantiq,channel-phase: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2, 3, 4, 5, 6, 7] > + default: 0 > + description: Need '|' to preserve formatting > + The pef2256 delivers a full frame (32 8bit time-slots in E1 and 24 8bit > + time-slots 8 8bit signaling in E1/J1) every 125us. This lead to a data > + rate of 2048000 bit/s. When lantiq,data-rate-bps is more than 2048000 > + bit/s, the data (all 32 8bit) present in the frame are interleave with > + unused time-slots. The lantiq,channel-phase property allows to set the > + correct alignment of the interleave mechanism. > + For instance, suppose lantiq,data-rate-bps = 8192000 (ie 4*2048000), and > + lantiq,channel-phase = 2, the interleave schema with unused time-slots > + (nu) and used time-slots (XX) for TSi is > + nu nu XX nu nu nu XX nu nu nu XX nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 8192000, and lantiq,channel-phase = 1, the > + interleave schema is > + nu XX nu nu nu XX nu nu nu XX nu nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 4096000 (ie 2*2048000), and > + lantiq,channel-phase = 1, the interleave schema is > + nu XX nu XX nu XX > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + > +patternProperties: > + '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$': > + type: object > + $ref: /schemas/sound/dai-common.yaml > + unevaluatedProperties: false > + description: > + Codec provided by the pef2256. This codec allows to use some of the PCM > + system highway time-slots as audio channels to transport audio data over > + the E1/T1/J1 lines. > + The time-slots used by the codec must be set and so, the properties > + 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and > + 'dai-tdm-slot-rx-mask' must be present in the sound card node for > + sub-nodes that involve the codec. The codec uses 8bit time-slots. > + 'dai-tdm-tdm-slot-with' must be set to 8. > + The tx and rx masks define the pef2256 time-slots assigned to the codec. > + > + properties: > + compatible: > + const: lantiq,pef2256-codec > + > + '#sound-dai-cells': > + const: 0 > + > + required: > + - compatible > + - '#sound-dai-cells' > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + - '#framer-cells' > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + pef2256: framer@2000000 { > + compatible = "lantiq,pef2256"; > + reg = <0x2000000 0x100>; > + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; > + interrupt-parent = <&intc>; > + clocks = <&clk_mclk>, <&clk_sclkr>, <&clk_sclkx>; > + clock-names = "mclk", "sclkr", "sclkx"; > + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; > + lantiq,data-rate-bps = <4096000>; > + #framer-cells = <0>; > + > + pinctrl { > + pef2256_rpa_sypr: rpa-pins { > + pins = "RPA"; > + function = "SYPR"; > + }; > + pef2256_xpa_sypx: xpa-pins { > + pins = "XPA"; > + function = "SYPX"; > + }; > + }; > + > + pef2256_codec0: codec-0 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_0"; > + }; > + > + pef2256_codec1: codec-1 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_1"; > + }; > + }; > + > + sound { > + compatible = "simple-audio-card"; > + #address-cells = <1>; > + #size-cells = <0>; > + simple-audio-card,dai-link@0 { /* CPU DAI1 - pef2256 codec 1 */ > + reg = <0>; > + cpu { > + sound-dai = <&cpu_dai1>; > + }; > + codec { > + sound-dai = <&pef2256_codec0>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 1, 2, 3, 4 */ > + dai-tdm-slot-tx-mask = <0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 1 1 1 1>; > + }; > + }; > + simple-audio-card,dai-link@1 { /* CPU DAI2 - pef2256 codec 2 */ > + reg = <1>; > + cpu { > + sound-dai = <&cpu_dai2>; > + }; > + codec { > + sound-dai = <&pef2256_codec1>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 5, 6, 7, 8 */ > + dai-tdm-slot-tx-mask = <0 0 0 0 0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 0 0 0 0 1 1 1 1>; > + }; > + }; > + }; > -- > 2.41.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3400BEE4996 for ; Mon, 21 Aug 2023 20:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbjHUUth (ORCPT ); Mon, 21 Aug 2023 16:49:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231273AbjHUUth (ORCPT ); Mon, 21 Aug 2023 16:49:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADFB1BC; Mon, 21 Aug 2023 13:49:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3924364B8F; Mon, 21 Aug 2023 20:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 706CAC433C8; Mon, 21 Aug 2023 20:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692650973; bh=2iXNBomS3QYsEVGDuduwyjCgZP0m9FgMapy3rlwBHEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fv+EmOOCUeVPXhIEOPEN0gZANSmnsZESKoOCf0KcELIFfSCoCVIhcM+OWdzQyYY9i U5CGawHWdzHz0OeDYcygg9fHP+jcv0z6wrE9eVJfXfNYZ6vvTfZyuEGleV4t7ExcWJ kRYw4DCxnDiUJZxmUwYZ9dlvlHtRTdaWF+gkzlF22bzi10fEZD7M7W3CZZ3Q+ypmh/ bQUcCEBK+RnPaywn/CD/IkztUICRJolXHQvvnNXoQVypDFM1Bv10ZT5aOJ84jqFvZU 9jcWrkOrw6JVUTAuafxBiTKSA04xrvLLPGn0ncXDNdUu+y75yrWIJkB4wCMYxmffyX X0bmQr4hW9uwg== Received: (nullmailer pid 2268748 invoked by uid 1000); Mon, 21 Aug 2023 20:49:29 -0000 Date: Mon, 21 Aug 2023 15:49:29 -0500 From: Rob Herring To: Christophe Leroy Cc: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Randy Dunlap , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: Re: [PATCH v4 22/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer Message-ID: <20230821204929.GA2261144-robh@kernel.org> References: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Aug 18, 2023 at 06:39:16PM +0200, Christophe Leroy wrote: > From: Herve Codina > > The Lantiq PEF2256 is a framer and line interface component designed to > fulfill all required interfacing between an analog E1/T1/J1 line and the > digital PCM system highway/H.100 bus. > > Signed-off-by: Herve Codina > Signed-off-by: Christophe Leroy > --- > .../bindings/net/lantiq,pef2256.yaml | 219 ++++++++++++++++++ > 1 file changed, 219 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > > diff --git a/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > new file mode 100644 > index 000000000000..72f6777afa3a > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > @@ -0,0 +1,219 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/lantiq,pef2256.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Lantiq PEF2256 > + > +maintainers: > + - Herve Codina > + > +description: > + The Lantiq PEF2256, also known as Infineon PEF2256 or FALC56, is a framer and > + line interface component designed to fulfill all required interfacing between > + an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. > + > +properties: > + compatible: > + items: > + - const: lantiq,pef2256 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Master clock > + - description: System Clock Receive > + - description: System Clock Transmit > + > + clock-names: > + items: > + - const: mclk > + - const: sclkr > + - const: sclkx > + > + interrupts: > + maxItems: 1 > + > + reset-gpios: > + description: > + GPIO used to reset the device. > + maxItems: 1 > + > + '#framer-cells': Not a standard binding. Do you need provider specific variable number of cells? > + const: 0 > + > + pinctrl: > + $ref: /schemas/pinctrl/pinctrl.yaml# > + additionalProperties: false > + > + patternProperties: > + '-pins$': > + type: object > + $ref: /schemas/pinctrl/pincfg-node.yaml# > + additionalProperties: false > + > + properties: > + pins: > + enum: [ RPA, RPB, RPC, RPD, XPA, XPB, XPC, XPD ] > + > + function: > + enum: [ SYPR, RFM, RFMB, RSIGM, RSIG, DLR, FREEZE, RFSP, LOS, > + SYPX, XFMS, XSIG, TCLK, XMFB, XSIGM, DLX, XCLK, XLT, > + GPI, GPOH, GPOL ] > + > + required: > + - pins > + - function > + > + lantiq,data-rate-bps: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [2048000, 4096000, 8192000, 16384000] > + default: 2048000 > + description: > + Data rate (bit per seconds) on the system highway. > + > + lantiq,clock-falling-edge: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Data is sent on falling edge of the clock (and received on the rising > + edge). If 'clock-falling-edge' is not present, data is sent on the > + rising edge (and received on the falling edge). > + > + lantiq,channel-phase: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2, 3, 4, 5, 6, 7] > + default: 0 > + description: Need '|' to preserve formatting > + The pef2256 delivers a full frame (32 8bit time-slots in E1 and 24 8bit > + time-slots 8 8bit signaling in E1/J1) every 125us. This lead to a data > + rate of 2048000 bit/s. When lantiq,data-rate-bps is more than 2048000 > + bit/s, the data (all 32 8bit) present in the frame are interleave with > + unused time-slots. The lantiq,channel-phase property allows to set the > + correct alignment of the interleave mechanism. > + For instance, suppose lantiq,data-rate-bps = 8192000 (ie 4*2048000), and > + lantiq,channel-phase = 2, the interleave schema with unused time-slots > + (nu) and used time-slots (XX) for TSi is > + nu nu XX nu nu nu XX nu nu nu XX nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 8192000, and lantiq,channel-phase = 1, the > + interleave schema is > + nu XX nu nu nu XX nu nu nu XX nu nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 4096000 (ie 2*2048000), and > + lantiq,channel-phase = 1, the interleave schema is > + nu XX nu XX nu XX > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + > +patternProperties: > + '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$': > + type: object > + $ref: /schemas/sound/dai-common.yaml > + unevaluatedProperties: false > + description: > + Codec provided by the pef2256. This codec allows to use some of the PCM > + system highway time-slots as audio channels to transport audio data over > + the E1/T1/J1 lines. > + The time-slots used by the codec must be set and so, the properties > + 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and > + 'dai-tdm-slot-rx-mask' must be present in the sound card node for > + sub-nodes that involve the codec. The codec uses 8bit time-slots. > + 'dai-tdm-tdm-slot-with' must be set to 8. > + The tx and rx masks define the pef2256 time-slots assigned to the codec. > + > + properties: > + compatible: > + const: lantiq,pef2256-codec > + > + '#sound-dai-cells': > + const: 0 > + > + required: > + - compatible > + - '#sound-dai-cells' > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + - '#framer-cells' > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + pef2256: framer@2000000 { > + compatible = "lantiq,pef2256"; > + reg = <0x2000000 0x100>; > + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; > + interrupt-parent = <&intc>; > + clocks = <&clk_mclk>, <&clk_sclkr>, <&clk_sclkx>; > + clock-names = "mclk", "sclkr", "sclkx"; > + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; > + lantiq,data-rate-bps = <4096000>; > + #framer-cells = <0>; > + > + pinctrl { > + pef2256_rpa_sypr: rpa-pins { > + pins = "RPA"; > + function = "SYPR"; > + }; > + pef2256_xpa_sypx: xpa-pins { > + pins = "XPA"; > + function = "SYPX"; > + }; > + }; > + > + pef2256_codec0: codec-0 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_0"; > + }; > + > + pef2256_codec1: codec-1 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_1"; > + }; > + }; > + > + sound { > + compatible = "simple-audio-card"; > + #address-cells = <1>; > + #size-cells = <0>; > + simple-audio-card,dai-link@0 { /* CPU DAI1 - pef2256 codec 1 */ > + reg = <0>; > + cpu { > + sound-dai = <&cpu_dai1>; > + }; > + codec { > + sound-dai = <&pef2256_codec0>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 1, 2, 3, 4 */ > + dai-tdm-slot-tx-mask = <0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 1 1 1 1>; > + }; > + }; > + simple-audio-card,dai-link@1 { /* CPU DAI2 - pef2256 codec 2 */ > + reg = <1>; > + cpu { > + sound-dai = <&cpu_dai2>; > + }; > + codec { > + sound-dai = <&pef2256_codec1>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 5, 6, 7, 8 */ > + dai-tdm-slot-tx-mask = <0 0 0 0 0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 0 0 0 0 1 1 1 1>; > + }; > + }; > + }; > -- > 2.41.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 773E1EE4996 for ; Mon, 21 Aug 2023 20:50:27 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=fv+EmOOC; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RV4PF62Vbz3c2X for ; Tue, 22 Aug 2023 06:50:25 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=fv+EmOOC; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=srs0=a38r=eg=robh_at_kernel.org=rob@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RV4NH6rwLz2xm4 for ; Tue, 22 Aug 2023 06:49:35 +1000 (AEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 31C8864B7B; Mon, 21 Aug 2023 20:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 706CAC433C8; Mon, 21 Aug 2023 20:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692650973; bh=2iXNBomS3QYsEVGDuduwyjCgZP0m9FgMapy3rlwBHEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fv+EmOOCUeVPXhIEOPEN0gZANSmnsZESKoOCf0KcELIFfSCoCVIhcM+OWdzQyYY9i U5CGawHWdzHz0OeDYcygg9fHP+jcv0z6wrE9eVJfXfNYZ6vvTfZyuEGleV4t7ExcWJ kRYw4DCxnDiUJZxmUwYZ9dlvlHtRTdaWF+gkzlF22bzi10fEZD7M7W3CZZ3Q+ypmh/ bQUcCEBK+RnPaywn/CD/IkztUICRJolXHQvvnNXoQVypDFM1Bv10ZT5aOJ84jqFvZU 9jcWrkOrw6JVUTAuafxBiTKSA04xrvLLPGn0ncXDNdUu+y75yrWIJkB4wCMYxmffyX X0bmQr4hW9uwg== Received: (nullmailer pid 2268748 invoked by uid 1000); Mon, 21 Aug 2023 20:49:29 -0000 Date: Mon, 21 Aug 2023 15:49:29 -0500 From: Rob Herring To: Christophe Leroy Subject: Re: [PATCH v4 22/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer Message-ID: <20230821204929.GA2261144-robh@kernel.org> References: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , alsa-devel@alsa-project.org, Herve Codina , Thomas Petazzoni , Xiubo Li , Linus Walleij , Jaroslav Kysela , Eric Dumazet , Krzysztof Kozlowski , Fabio Estevam , Qiang Zhao , Shengjiu Wang , Lee Jones , Jakub Kicinski , Paolo Abeni , devicetree@vger.kernel.org, Conor Dooley , linux-kernel@vger.kernel.org, Nicolin Chen , linux-gpio@vger.kernel.org, Mark Brown , Takashi Iwai , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Randy Dunlap , Liam Girdwood , Li Yang , linuxppc-dev@lists.ozlabs.org, "David S. Miller " Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Aug 18, 2023 at 06:39:16PM +0200, Christophe Leroy wrote: > From: Herve Codina > > The Lantiq PEF2256 is a framer and line interface component designed to > fulfill all required interfacing between an analog E1/T1/J1 line and the > digital PCM system highway/H.100 bus. > > Signed-off-by: Herve Codina > Signed-off-by: Christophe Leroy > --- > .../bindings/net/lantiq,pef2256.yaml | 219 ++++++++++++++++++ > 1 file changed, 219 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > > diff --git a/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > new file mode 100644 > index 000000000000..72f6777afa3a > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > @@ -0,0 +1,219 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/lantiq,pef2256.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Lantiq PEF2256 > + > +maintainers: > + - Herve Codina > + > +description: > + The Lantiq PEF2256, also known as Infineon PEF2256 or FALC56, is a framer and > + line interface component designed to fulfill all required interfacing between > + an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. > + > +properties: > + compatible: > + items: > + - const: lantiq,pef2256 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Master clock > + - description: System Clock Receive > + - description: System Clock Transmit > + > + clock-names: > + items: > + - const: mclk > + - const: sclkr > + - const: sclkx > + > + interrupts: > + maxItems: 1 > + > + reset-gpios: > + description: > + GPIO used to reset the device. > + maxItems: 1 > + > + '#framer-cells': Not a standard binding. Do you need provider specific variable number of cells? > + const: 0 > + > + pinctrl: > + $ref: /schemas/pinctrl/pinctrl.yaml# > + additionalProperties: false > + > + patternProperties: > + '-pins$': > + type: object > + $ref: /schemas/pinctrl/pincfg-node.yaml# > + additionalProperties: false > + > + properties: > + pins: > + enum: [ RPA, RPB, RPC, RPD, XPA, XPB, XPC, XPD ] > + > + function: > + enum: [ SYPR, RFM, RFMB, RSIGM, RSIG, DLR, FREEZE, RFSP, LOS, > + SYPX, XFMS, XSIG, TCLK, XMFB, XSIGM, DLX, XCLK, XLT, > + GPI, GPOH, GPOL ] > + > + required: > + - pins > + - function > + > + lantiq,data-rate-bps: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [2048000, 4096000, 8192000, 16384000] > + default: 2048000 > + description: > + Data rate (bit per seconds) on the system highway. > + > + lantiq,clock-falling-edge: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Data is sent on falling edge of the clock (and received on the rising > + edge). If 'clock-falling-edge' is not present, data is sent on the > + rising edge (and received on the falling edge). > + > + lantiq,channel-phase: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2, 3, 4, 5, 6, 7] > + default: 0 > + description: Need '|' to preserve formatting > + The pef2256 delivers a full frame (32 8bit time-slots in E1 and 24 8bit > + time-slots 8 8bit signaling in E1/J1) every 125us. This lead to a data > + rate of 2048000 bit/s. When lantiq,data-rate-bps is more than 2048000 > + bit/s, the data (all 32 8bit) present in the frame are interleave with > + unused time-slots. The lantiq,channel-phase property allows to set the > + correct alignment of the interleave mechanism. > + For instance, suppose lantiq,data-rate-bps = 8192000 (ie 4*2048000), and > + lantiq,channel-phase = 2, the interleave schema with unused time-slots > + (nu) and used time-slots (XX) for TSi is > + nu nu XX nu nu nu XX nu nu nu XX nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 8192000, and lantiq,channel-phase = 1, the > + interleave schema is > + nu XX nu nu nu XX nu nu nu XX nu nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 4096000 (ie 2*2048000), and > + lantiq,channel-phase = 1, the interleave schema is > + nu XX nu XX nu XX > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + > +patternProperties: > + '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$': > + type: object > + $ref: /schemas/sound/dai-common.yaml > + unevaluatedProperties: false > + description: > + Codec provided by the pef2256. This codec allows to use some of the PCM > + system highway time-slots as audio channels to transport audio data over > + the E1/T1/J1 lines. > + The time-slots used by the codec must be set and so, the properties > + 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and > + 'dai-tdm-slot-rx-mask' must be present in the sound card node for > + sub-nodes that involve the codec. The codec uses 8bit time-slots. > + 'dai-tdm-tdm-slot-with' must be set to 8. > + The tx and rx masks define the pef2256 time-slots assigned to the codec. > + > + properties: > + compatible: > + const: lantiq,pef2256-codec > + > + '#sound-dai-cells': > + const: 0 > + > + required: > + - compatible > + - '#sound-dai-cells' > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + - '#framer-cells' > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + pef2256: framer@2000000 { > + compatible = "lantiq,pef2256"; > + reg = <0x2000000 0x100>; > + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; > + interrupt-parent = <&intc>; > + clocks = <&clk_mclk>, <&clk_sclkr>, <&clk_sclkx>; > + clock-names = "mclk", "sclkr", "sclkx"; > + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; > + lantiq,data-rate-bps = <4096000>; > + #framer-cells = <0>; > + > + pinctrl { > + pef2256_rpa_sypr: rpa-pins { > + pins = "RPA"; > + function = "SYPR"; > + }; > + pef2256_xpa_sypx: xpa-pins { > + pins = "XPA"; > + function = "SYPX"; > + }; > + }; > + > + pef2256_codec0: codec-0 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_0"; > + }; > + > + pef2256_codec1: codec-1 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_1"; > + }; > + }; > + > + sound { > + compatible = "simple-audio-card"; > + #address-cells = <1>; > + #size-cells = <0>; > + simple-audio-card,dai-link@0 { /* CPU DAI1 - pef2256 codec 1 */ > + reg = <0>; > + cpu { > + sound-dai = <&cpu_dai1>; > + }; > + codec { > + sound-dai = <&pef2256_codec0>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 1, 2, 3, 4 */ > + dai-tdm-slot-tx-mask = <0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 1 1 1 1>; > + }; > + }; > + simple-audio-card,dai-link@1 { /* CPU DAI2 - pef2256 codec 2 */ > + reg = <1>; > + cpu { > + sound-dai = <&cpu_dai2>; > + }; > + codec { > + sound-dai = <&pef2256_codec1>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 5, 6, 7, 8 */ > + dai-tdm-slot-tx-mask = <0 0 0 0 0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 0 0 0 0 1 1 1 1>; > + }; > + }; > + }; > -- > 2.41.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C232CEE4996 for ; Mon, 21 Aug 2023 20:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1wEBNwSonfZNwScSO5bF77MejlISPPWaMqV3lTJ9mJ0=; b=HGn/1BftjoBMI/ QkptplrlhnVK3JyUbLkp/ArrwtkD0At0WLT0P6sKNh+MWAy7u3LJrvDxpBg3ROnLIJeZO2MRg0pxa 8ih/8vJNcg339heiUUG2oaTj3K0Crb8XN1OrGlAWD73c/YY+RMJqfAOGfjy4FK5aGD/btkWTS4Kwn +tPMQLEgW6HxbIftCzJvS2IdIzFsP/6s+yRtC938MHOFvGBWsaFaEC4+zXB5vKZzqYU3MlxYP7PNJ BOboTXBSvIRPq39BFCZC0RCCv0PgGBxHwlkT53u2g9uPLmiVO/+qLkD3BQFDB7M/xqFpHtCwscRGP tA/8RH3VOd8Fw6A73FWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYBqE-00EgVf-0r; Mon, 21 Aug 2023 20:49:38 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYBqA-00EgUy-2E for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2023 20:49:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 31C8864B7B; Mon, 21 Aug 2023 20:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 706CAC433C8; Mon, 21 Aug 2023 20:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692650973; bh=2iXNBomS3QYsEVGDuduwyjCgZP0m9FgMapy3rlwBHEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fv+EmOOCUeVPXhIEOPEN0gZANSmnsZESKoOCf0KcELIFfSCoCVIhcM+OWdzQyYY9i U5CGawHWdzHz0OeDYcygg9fHP+jcv0z6wrE9eVJfXfNYZ6vvTfZyuEGleV4t7ExcWJ kRYw4DCxnDiUJZxmUwYZ9dlvlHtRTdaWF+gkzlF22bzi10fEZD7M7W3CZZ3Q+ypmh/ bQUcCEBK+RnPaywn/CD/IkztUICRJolXHQvvnNXoQVypDFM1Bv10ZT5aOJ84jqFvZU 9jcWrkOrw6JVUTAuafxBiTKSA04xrvLLPGn0ncXDNdUu+y75yrWIJkB4wCMYxmffyX X0bmQr4hW9uwg== Received: (nullmailer pid 2268748 invoked by uid 1000); Mon, 21 Aug 2023 20:49:29 -0000 Date: Mon, 21 Aug 2023 15:49:29 -0500 From: Rob Herring To: Christophe Leroy Cc: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Randy Dunlap , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: Re: [PATCH v4 22/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer Message-ID: <20230821204929.GA2261144-robh@kernel.org> References: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7c67d590b13a889466f53edf94192bca3bf6ceec.1692376361.git.christophe.leroy@csgroup.eu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230821_134934_837941_33AC6DBE X-CRM114-Status: GOOD ( 29.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 18, 2023 at 06:39:16PM +0200, Christophe Leroy wrote: > From: Herve Codina > > The Lantiq PEF2256 is a framer and line interface component designed to > fulfill all required interfacing between an analog E1/T1/J1 line and the > digital PCM system highway/H.100 bus. > > Signed-off-by: Herve Codina > Signed-off-by: Christophe Leroy > --- > .../bindings/net/lantiq,pef2256.yaml | 219 ++++++++++++++++++ > 1 file changed, 219 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > > diff --git a/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > new file mode 100644 > index 000000000000..72f6777afa3a > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/lantiq,pef2256.yaml > @@ -0,0 +1,219 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/lantiq,pef2256.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Lantiq PEF2256 > + > +maintainers: > + - Herve Codina > + > +description: > + The Lantiq PEF2256, also known as Infineon PEF2256 or FALC56, is a framer and > + line interface component designed to fulfill all required interfacing between > + an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. > + > +properties: > + compatible: > + items: > + - const: lantiq,pef2256 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Master clock > + - description: System Clock Receive > + - description: System Clock Transmit > + > + clock-names: > + items: > + - const: mclk > + - const: sclkr > + - const: sclkx > + > + interrupts: > + maxItems: 1 > + > + reset-gpios: > + description: > + GPIO used to reset the device. > + maxItems: 1 > + > + '#framer-cells': Not a standard binding. Do you need provider specific variable number of cells? > + const: 0 > + > + pinctrl: > + $ref: /schemas/pinctrl/pinctrl.yaml# > + additionalProperties: false > + > + patternProperties: > + '-pins$': > + type: object > + $ref: /schemas/pinctrl/pincfg-node.yaml# > + additionalProperties: false > + > + properties: > + pins: > + enum: [ RPA, RPB, RPC, RPD, XPA, XPB, XPC, XPD ] > + > + function: > + enum: [ SYPR, RFM, RFMB, RSIGM, RSIG, DLR, FREEZE, RFSP, LOS, > + SYPX, XFMS, XSIG, TCLK, XMFB, XSIGM, DLX, XCLK, XLT, > + GPI, GPOH, GPOL ] > + > + required: > + - pins > + - function > + > + lantiq,data-rate-bps: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [2048000, 4096000, 8192000, 16384000] > + default: 2048000 > + description: > + Data rate (bit per seconds) on the system highway. > + > + lantiq,clock-falling-edge: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Data is sent on falling edge of the clock (and received on the rising > + edge). If 'clock-falling-edge' is not present, data is sent on the > + rising edge (and received on the falling edge). > + > + lantiq,channel-phase: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2, 3, 4, 5, 6, 7] > + default: 0 > + description: Need '|' to preserve formatting > + The pef2256 delivers a full frame (32 8bit time-slots in E1 and 24 8bit > + time-slots 8 8bit signaling in E1/J1) every 125us. This lead to a data > + rate of 2048000 bit/s. When lantiq,data-rate-bps is more than 2048000 > + bit/s, the data (all 32 8bit) present in the frame are interleave with > + unused time-slots. The lantiq,channel-phase property allows to set the > + correct alignment of the interleave mechanism. > + For instance, suppose lantiq,data-rate-bps = 8192000 (ie 4*2048000), and > + lantiq,channel-phase = 2, the interleave schema with unused time-slots > + (nu) and used time-slots (XX) for TSi is > + nu nu XX nu nu nu XX nu nu nu XX nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 8192000, and lantiq,channel-phase = 1, the > + interleave schema is > + nu XX nu nu nu XX nu nu nu XX nu nu > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + With lantiq,data-rate-bps = 4096000 (ie 2*2048000), and > + lantiq,channel-phase = 1, the interleave schema is > + nu XX nu XX nu XX > + <-- TSi --> <- TSi+1 -> <- TSi+2 -> > + > +patternProperties: > + '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$': > + type: object > + $ref: /schemas/sound/dai-common.yaml > + unevaluatedProperties: false > + description: > + Codec provided by the pef2256. This codec allows to use some of the PCM > + system highway time-slots as audio channels to transport audio data over > + the E1/T1/J1 lines. > + The time-slots used by the codec must be set and so, the properties > + 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and > + 'dai-tdm-slot-rx-mask' must be present in the sound card node for > + sub-nodes that involve the codec. The codec uses 8bit time-slots. > + 'dai-tdm-tdm-slot-with' must be set to 8. > + The tx and rx masks define the pef2256 time-slots assigned to the codec. > + > + properties: > + compatible: > + const: lantiq,pef2256-codec > + > + '#sound-dai-cells': > + const: 0 > + > + required: > + - compatible > + - '#sound-dai-cells' > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + - '#framer-cells' > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + pef2256: framer@2000000 { > + compatible = "lantiq,pef2256"; > + reg = <0x2000000 0x100>; > + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; > + interrupt-parent = <&intc>; > + clocks = <&clk_mclk>, <&clk_sclkr>, <&clk_sclkx>; > + clock-names = "mclk", "sclkr", "sclkx"; > + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; > + lantiq,data-rate-bps = <4096000>; > + #framer-cells = <0>; > + > + pinctrl { > + pef2256_rpa_sypr: rpa-pins { > + pins = "RPA"; > + function = "SYPR"; > + }; > + pef2256_xpa_sypx: xpa-pins { > + pins = "XPA"; > + function = "SYPX"; > + }; > + }; > + > + pef2256_codec0: codec-0 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_0"; > + }; > + > + pef2256_codec1: codec-1 { > + compatible = "lantiq,pef2256-codec"; > + #sound-dai-cells = <0>; > + sound-name-prefix = "PEF2256_1"; > + }; > + }; > + > + sound { > + compatible = "simple-audio-card"; > + #address-cells = <1>; > + #size-cells = <0>; > + simple-audio-card,dai-link@0 { /* CPU DAI1 - pef2256 codec 1 */ > + reg = <0>; > + cpu { > + sound-dai = <&cpu_dai1>; > + }; > + codec { > + sound-dai = <&pef2256_codec0>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 1, 2, 3, 4 */ > + dai-tdm-slot-tx-mask = <0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 1 1 1 1>; > + }; > + }; > + simple-audio-card,dai-link@1 { /* CPU DAI2 - pef2256 codec 2 */ > + reg = <1>; > + cpu { > + sound-dai = <&cpu_dai2>; > + }; > + codec { > + sound-dai = <&pef2256_codec1>; > + dai-tdm-slot-num = <4>; > + dai-tdm-slot-width = <8>; > + /* TS 5, 6, 7, 8 */ > + dai-tdm-slot-tx-mask = <0 0 0 0 0 1 1 1 1>; > + dai-tdm-slot-rx-mask = <0 0 0 0 0 1 1 1 1>; > + }; > + }; > + }; > -- > 2.41.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel