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 2A64AC6FD1C for ; Sun, 26 Mar 2023 12:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231185AbjCZMVy (ORCPT ); Sun, 26 Mar 2023 08:21:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbjCZMVx (ORCPT ); Sun, 26 Mar 2023 08:21:53 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C3D6A7D for ; Sun, 26 Mar 2023 05:21:51 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id ek18so25105193edb.6 for ; Sun, 26 Mar 2023 05:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679833310; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=zVP0q5GOX/hLCywa6jLtgJqXWgfu/GbW40t0aFqMMo8=; b=YLxk8yxVs1fPjuNnGaFCwQLNGp3e7Y/9Wg2D2IGIguuWdDBgnDYUF9VPitxIDLtMtj I4QT4K+o45AVEGQHhcnF3whlyuyKgOs+J65ZF1MYR1ru/sUvUXAYGH95tJHojhPpQDr2 Xn7O9+g2JOZfjRO6rg0U/ZfG0nLzXQKVGcwOLkJivyd8ZhioI399UH5Neu6or37dsNUb HzcCadOOo3Xj76tIWFD9zAqqkMrpyamrQPYvpfRgVB47rehLXo2mF0OKNBk0NNFqL+Xm i3SfwBCkKvTQOqjw0m7tZWRMeHtYl3ABn7vkRBL/oKXNGcQjENXVCkwQVgIf698d8T1Z 5ZxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679833310; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zVP0q5GOX/hLCywa6jLtgJqXWgfu/GbW40t0aFqMMo8=; b=DCEDQ5z/saoygOG3vg/TST72CCgbBlum208/33ETWHG6Ph21mDArbJz1FelV1Ms6xP wWslCN3yUdBR+3jT4WHQVuEBc/SKfoQlGNFHGW/oOsG0K5mUdbpvdpIhw+yRb7+EB8Me oRyiKhaE5iiZYJtHckyfO1tiJP8K6qMQmUUjnlpPut6lioqsudb1Hg+r5An70oPvwj9U JtHqLkT3MfQCknwPoFbQXzmYC0fb5wDat9WwghWCjlmuodtw7BbjYENP49JFD7fabZAF ZQ8b22RZsjsJKa1gkKdEGgZ510WkvHvrEmXovwbTCQhsDMOeaLPgMNfWgSJ7QREgTr+I tcMw== X-Gm-Message-State: AAQBX9fwl8ovGmtVIpEm3y6m2tZ7oS0F9Mkw7RPqRPbOmtu9ZFkTGXZf +h83jZ2YByPx7FG/HW3Oj5r60cVIIlO/fgkeIkc= X-Google-Smtp-Source: AKy350Z8Nm7ZuAbyxo/SHlOyBboWAXg4VgdJyW1Y8DzvipW26/qtmBdXEYn3fSxRT59u2Qgrogs/tg== X-Received: by 2002:aa7:cd8b:0:b0:501:d3a1:9a52 with SMTP id x11-20020aa7cd8b000000b00501d3a19a52mr9063096edv.33.1679833310350; Sun, 26 Mar 2023 05:21:50 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:6cac:926d:a4f2:aa09? ([2a02:810d:15c0:828:6cac:926d:a4f2:aa09]) by smtp.gmail.com with ESMTPSA id ha8-20020a170906a88800b0093a6c591743sm7515800ejb.69.2023.03.26.05.21.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Mar 2023 05:21:49 -0700 (PDT) Message-ID: Date: Sun, 26 Mar 2023 14:21:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v3 4/6] dt-bindings: sound: Add support for the Lantiq PEF2256 codec Content-Language: en-US To: Herve Codina Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Christophe Leroy , Thomas Petazzoni References: <20230322134654.219957-1-herve.codina@bootlin.com> <20230322134654.219957-5-herve.codina@bootlin.com> <20230323082758.5e4385ff@bootlin.com> <5c82c731-3124-9eca-32a3-c974db95724a@linaro.org> <20230323091001.100ca343@bootlin.com> From: Krzysztof Kozlowski In-Reply-To: <20230323091001.100ca343@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 23/03/2023 09:10, Herve Codina wrote: > On Thu, 23 Mar 2023 08:31:28 +0100 > Krzysztof Kozlowski wrote: > >> On 23/03/2023 08:27, Herve Codina wrote: >>> Hi Krzysztof >>> >>> On Wed, 22 Mar 2023 22:59:37 +0100 >>> Krzysztof Kozlowski wrote: >>> >>>> On 22/03/2023 14:46, Herve Codina wrote: >>>>> 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. >>>>> >>>>> The codec support allows to use some of the PCM system highway >>>>> time-slots as audio channels to transport audio data over the E1/T1/J1 >>>>> lines. >>>>> >>>>> Signed-off-by: Herve Codina >>>>> --- >>>>> .../bindings/sound/lantiq,pef2256-codec.yaml | 54 +++++++++++++++++++ >>>>> 1 file changed, 54 insertions(+) >>>>> create mode 100644 Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml b/Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml >>>>> new file mode 100644 >>>>> index 000000000000..da35b70cda99 >>>>> --- /dev/null >>>>> +++ b/Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml >>>>> @@ -0,0 +1,54 @@ >>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>>>> +%YAML 1.2 >>>>> +--- >>>>> +$id: http://devicetree.org/schemas/sound/lantiq,pef2256-codec.yaml# >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>> + >>>>> +title: Lantiq PEF2256 codec >>>>> + >>>>> +maintainers: >>>>> + - Herve Codina >>>>> + >>>>> +description: | >>>>> + Codec support for PEF2256. >>>>> + >>>>> + 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. >>>>> + >>>>> + The codec support 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 ALSA 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. >>>>> + >>>>> + The PEF2256 codec node should be a child of a PEF2256 node. >>>>> + Refer to the bindings described in >>>>> + Documentation/devicetree/bindings/mfd/lantiq,pef2256.yaml >>>>> + >>>>> +allOf: >>>>> + - $ref: dai-common.yaml# >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + const: lantiq,pef2256-codec >>>>> + >>>>> + '#sound-dai-cells': >>>>> + const: 0 >>>> >>>> You do not have here any resources, so the entire binding can be dropped >>>> and merged into the parent. >>>> >>>> Best regards, >>>> Krzysztof >>>> >>> >>> Ok, >>> Do you expect all these properties (except compatible) merged at the parent >> >> You have only two properties here - dai cells and name-prefix... >> >>> level or may I keep a child node with these properties including the >>> compatible property (ie. yaml file merge). >> >> I was thinking that these should be merged into parent because usually >> you do not need child node for this. However now I started to think how >> the codec driver would look like. Essentially the parent MFD driver >> would need to register dais... >> > > There is also something specific to audio, the slots definition > 'dai-tdm-slot-tx-mask' and 'dai-tdm-slot-rx-mask'. These slots definitions > are set at the ALSA sound card sub-nodes. > So, I can have multiple codec in the PEF2256. > > For instance: > framer { > compatible = "lantiq,pef2256", "simple-mfd"; > ... > pef2256_codec0: codec0 { > compatible = "lantiq,pef2256-codec"; > #sound-dai-cells = <0>; > }; > pef2256_codec1: codec1 { > compatible = "lantiq,pef2256-codec"; > #sound-dai-cells = <0>; > }; > }; Then include it in the example. It would cut short this discussion. Best regards, Krzysztof