Message ID | 20230912101018.225246-1-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp983783vqx; Wed, 13 Sep 2023 03:26:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmYW7SR0OD6nReWgZRXB7H33ddU7im//px44YKSoelmMbq1Iq+/gBcYCn+R+cZaShRKSKi X-Received: by 2002:a05:6358:5282:b0:135:7c30:523 with SMTP id g2-20020a056358528200b001357c300523mr2607504rwa.16.1694600804458; Wed, 13 Sep 2023 03:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694600804; cv=none; d=google.com; s=arc-20160816; b=icLMBhJoOnZK+YOfJG9Eni6bfqmN5WgjGSXCNJ1zWKFoyKEruhSFQojToFZNIemovH XdhNbl6hD/2Z7SnJQJ+OgKTFx82K4E9PpK/cfN3F0DAJgTZiB3gq3AMq1HCLPexYyA4j E5pMhLti5o8SzX+Qmhx/1Wu2VJE4TpbYu+BT5cRU/1WTrcI5Dkn+/ZMIwN+tlkFh9IRT Jv+H3N3HVflp1ZSMx8tA+shaxbChrBBGvtZmzAer7vI2NxNEZesAWmJo3qCr8xPNqVqn JX6AQDumvwUPn0DstA/y0Z3o2Mjyri3icr/VhveYB9mlcnVRBpwVSO1AMrTRv4N9wqpS TOlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e9HcidEq+A9xaDn4cDf1UskGOrMSLdgPTMn8dmPNgNc=; fh=5rCQDomVZxLXb7yR2oN4iSS3zxUnzGJP2HoQaRzhQu0=; b=aIUUqct17wNgqaQ2MBNY6tdoTKQow+BjIqW60XVI45/mZIAFvhhEGGijm4OefthAmN +q+9YfgjiXBzZ2PbsL/OxoPU0BFImzQ2WpLKJzqbgjAmO3+83lGw+VZdw4UwdmiBhtsN T2jpawHyr5yF+SpuqZv3N4pZ4YPJXnoWLdSZR5nZEBy/Acghx6qLvfmEoigV1fHZcAO0 1ORL4vG368aZYdhaobYYoQkSy3aetjBJM2KEPjwSbCpvV7DA9bRrFjIauLbIa7IoLjVt O48HdP9ye7d52uPhVhF/A72zeyT5WkgayuNqMHfHJ4/9Ct+rc9gH35kiWpB3hU3nIOsg fiyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ORpXVav/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z19-20020a63e113000000b00565e6b6c4aesi6056263pgh.370.2023.09.13.03.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 03:26:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ORpXVav/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B1DD8857E55A; Tue, 12 Sep 2023 03:19:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234280AbjILKTR (ORCPT <rfc822;pwkd43@gmail.com> + 37 others); Tue, 12 Sep 2023 06:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234263AbjILKTF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 12 Sep 2023 06:19:05 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A97F1715; Tue, 12 Sep 2023 03:10:32 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id E1B7040003; Tue, 12 Sep 2023 10:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1694513431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e9HcidEq+A9xaDn4cDf1UskGOrMSLdgPTMn8dmPNgNc=; b=ORpXVav/8v2nGgIh1dhRskAUabjXdDfQkWSO1dPfulthcfojOC1x3Se99trJUjBUSLjazj cZXt26HWVi8pA5p3xDR83S9/uTZzIcqKh66BH98cuE5TBUpTPboObIHEgt3e8m/ztRcZ+f /zB4fS+cnSvIs3mDXIbEoIeHW2UGP7h5v/ZSpOD87nOMzEqoSgxdEKEY6qdUGSC0neU5eb 9tiYOYBGCBTReAwTV4JDfrYAaEIHACZqzjKK9zeeXeOsj9HoPQ4sAXzZYi7F9xzo9LxMyu 1t1ygsOzh0UTT1ABmjnoE/Yi9M/KRTvWe2VmQXD2MrlYNbvRnzyqCsnqK6E/Cg== From: Herve Codina <herve.codina@bootlin.com> To: Herve Codina <herve.codina@bootlin.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Shengjiu Wang <shengjiu.wang@gmail.com>, Xiubo Li <Xiubo.Lee@gmail.com>, Fabio Estevam <festevam@gmail.com>, Nicolin Chen <nicoleotsuka@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Randy Dunlap <rdunlap@infradead.org> Cc: 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, Simon Horman <horms@kernel.org>, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Thomas Petazzoni <thomas.petazzoni@bootlin.com> Subject: [PATCH v5 08/31] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC Date: Tue, 12 Sep 2023 12:10:18 +0200 Message-ID: <20230912101018.225246-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912081527.208499-1-herve.codina@bootlin.com> References: <20230912081527.208499-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 03:19:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776853955371667118 X-GMAIL-MSGID: 1776917733245084300 |
Series |
Add support for QMC HDLC, framer infrastructure and PEF2256 framer
|
|
Commit Message
Herve Codina
Sept. 12, 2023, 10:10 a.m. UTC
The QMC (QUICC mutichannel controller) is a controller present in some
PowerQUICC SoC such as MPC885.
The QMC HDLC uses the QMC controller to transfer HDLC data.
Additionally, a framer can be connected to the QMC HDLC.
If present, this framer is the interface between the TDM bus used by the
QMC HDLC and the E1/T1 line.
The QMC HDLC can use this framer to get information about the E1/T1 line
and configure the E1/T1 line.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
.../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
Comments
Hi Conor, On Tue, 12 Sep 2023 18:21:58 +0100 Conor Dooley <conor@kernel.org> wrote: > On Tue, Sep 12, 2023 at 12:10:18PM +0200, Herve Codina wrote: > > The QMC (QUICC mutichannel controller) is a controller present in some > > PowerQUICC SoC such as MPC885. > > The QMC HDLC uses the QMC controller to transfer HDLC data. > > > > Additionally, a framer can be connected to the QMC HDLC. > > If present, this framer is the interface between the TDM bus used by the > > QMC HDLC and the E1/T1 line. > > The QMC HDLC can use this framer to get information about the E1/T1 line > > and configure the E1/T1 line. > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > --- > > .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > index 82d9beb48e00..b5073531f3f1 100644 > > --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > @@ -101,6 +101,16 @@ patternProperties: > > Channel assigned Rx time-slots within the Rx time-slots routed by the > > TSA to this cell. > > > > + compatible: > > + const: fsl,qmc-hdlc > > + > > + fsl,framer: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: > > + phandle to the framer node. The framer is in charge of an E1/T1 line > > + interface connected to the TDM bus. It can be used to get the E1/T1 line > > + status such as link up/down. > > Sounds like this fsl,framer property should depend on the compatible > being present, no? Well from the implementation point of view, only the QMC HDLC driver uses this property. From the hardware description point of view, this property means that the time slots handled by this channel are connected to the framer. So I think it makes sense for any channel no matter the compatible (even if compatible is not present). Should I change and constraint the fsl,framer property to the compatible presence ? If so, is the following correct for this contraint ? --- 8< --- dependencies: - fsl,framer: [ compatible ]; --- 8< --- Regards, Hervé > > Thanks, > Conor. > > > + > > required: > > - reg > > - fsl,tx-ts-mask > > @@ -159,5 +169,8 @@ examples: > > fsl,operational-mode = "hdlc"; > > fsl,tx-ts-mask = <0x00000000 0x0000ff00>; > > fsl,rx-ts-mask = <0x00000000 0x0000ff00>; > > + > > + compatible = "fsl,qmc-hdlc"; > > + fsl,framer = <&framer>; > > }; > > }; > > -- > > 2.41.0 > >
On Wed, Sep 13, 2023 at 09:26:40AM +0200, Herve Codina wrote: > Hi Conor, > > On Tue, 12 Sep 2023 18:21:58 +0100 > Conor Dooley <conor@kernel.org> wrote: > > > On Tue, Sep 12, 2023 at 12:10:18PM +0200, Herve Codina wrote: > > > The QMC (QUICC mutichannel controller) is a controller present in some > > > PowerQUICC SoC such as MPC885. > > > The QMC HDLC uses the QMC controller to transfer HDLC data. > > > > > > Additionally, a framer can be connected to the QMC HDLC. > > > If present, this framer is the interface between the TDM bus used by the > > > QMC HDLC and the E1/T1 line. > > > The QMC HDLC can use this framer to get information about the E1/T1 line > > > and configure the E1/T1 line. > > > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > > --- > > > .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++ > > > 1 file changed, 13 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > index 82d9beb48e00..b5073531f3f1 100644 > > > --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > @@ -101,6 +101,16 @@ patternProperties: > > > Channel assigned Rx time-slots within the Rx time-slots routed by the > > > TSA to this cell. > > > > > > + compatible: > > > + const: fsl,qmc-hdlc > > > + > > > + fsl,framer: > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > + description: > > > + phandle to the framer node. The framer is in charge of an E1/T1 line > > > + interface connected to the TDM bus. It can be used to get the E1/T1 line > > > + status such as link up/down. > > > > Sounds like this fsl,framer property should depend on the compatible > > being present, no? > > Well from the implementation point of view, only the QMC HDLC driver uses this > property. > > From the hardware description point of view, this property means that the time slots > handled by this channel are connected to the framer. So I think it makes sense for > any channel no matter the compatible (even if compatible is not present). > > Should I change and constraint the fsl,framer property to the compatible presence ? > If so, is the following correct for this contraint ? > --- 8< --- > dependencies: > - fsl,framer: [ compatible ]; > --- 8< --- The regular sort of if: compatible: contains: const: foo then: required: - fsl,framer would fit the bill, no?
On Wed, 13 Sep 2023 15:42:45 +0100 Conor Dooley <conor@kernel.org> wrote: > On Wed, Sep 13, 2023 at 09:26:40AM +0200, Herve Codina wrote: > > Hi Conor, > > > > On Tue, 12 Sep 2023 18:21:58 +0100 > > Conor Dooley <conor@kernel.org> wrote: > > > > > On Tue, Sep 12, 2023 at 12:10:18PM +0200, Herve Codina wrote: > > > > The QMC (QUICC mutichannel controller) is a controller present in some > > > > PowerQUICC SoC such as MPC885. > > > > The QMC HDLC uses the QMC controller to transfer HDLC data. > > > > > > > > Additionally, a framer can be connected to the QMC HDLC. > > > > If present, this framer is the interface between the TDM bus used by the > > > > QMC HDLC and the E1/T1 line. > > > > The QMC HDLC can use this framer to get information about the E1/T1 line > > > > and configure the E1/T1 line. > > > > > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > > > --- > > > > .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++ > > > > 1 file changed, 13 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > index 82d9beb48e00..b5073531f3f1 100644 > > > > --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > @@ -101,6 +101,16 @@ patternProperties: > > > > Channel assigned Rx time-slots within the Rx time-slots routed by the > > > > TSA to this cell. > > > > > > > > + compatible: > > > > + const: fsl,qmc-hdlc > > > > + > > > > + fsl,framer: > > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > > + description: > > > > + phandle to the framer node. The framer is in charge of an E1/T1 line > > > > + interface connected to the TDM bus. It can be used to get the E1/T1 line > > > > + status such as link up/down. > > > > > > Sounds like this fsl,framer property should depend on the compatible > > > being present, no? > > > > Well from the implementation point of view, only the QMC HDLC driver uses this > > property. > > > > From the hardware description point of view, this property means that the time slots > > handled by this channel are connected to the framer. So I think it makes sense for > > any channel no matter the compatible (even if compatible is not present). > > > > Should I change and constraint the fsl,framer property to the compatible presence ? > > If so, is the following correct for this contraint ? > > --- 8< --- > > dependencies: > > - fsl,framer: [ compatible ]; > > --- 8< --- > > The regular sort of > if: > compatible: > contains: > const: foo > then: > required: > - fsl,framer > would fit the bill, no? Not sure. "fsl,framer" is an optional property (depending on the hardware we can have a framer or not). Hervé
On Wed, Sep 13, 2023 at 04:52:50PM +0200, Herve Codina wrote: > On Wed, 13 Sep 2023 15:42:45 +0100 > Conor Dooley <conor@kernel.org> wrote: > > > On Wed, Sep 13, 2023 at 09:26:40AM +0200, Herve Codina wrote: > > > Hi Conor, > > > > > > On Tue, 12 Sep 2023 18:21:58 +0100 > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > On Tue, Sep 12, 2023 at 12:10:18PM +0200, Herve Codina wrote: > > > > > The QMC (QUICC mutichannel controller) is a controller present in some > > > > > PowerQUICC SoC such as MPC885. > > > > > The QMC HDLC uses the QMC controller to transfer HDLC data. > > > > > > > > > > Additionally, a framer can be connected to the QMC HDLC. > > > > > If present, this framer is the interface between the TDM bus used by the > > > > > QMC HDLC and the E1/T1 line. > > > > > The QMC HDLC can use this framer to get information about the E1/T1 line > > > > > and configure the E1/T1 line. > > > > > > > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > > > > --- > > > > > .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++ > > > > > 1 file changed, 13 insertions(+) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > index 82d9beb48e00..b5073531f3f1 100644 > > > > > --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > @@ -101,6 +101,16 @@ patternProperties: > > > > > Channel assigned Rx time-slots within the Rx time-slots routed by the > > > > > TSA to this cell. > > > > > > > > > > + compatible: > > > > > + const: fsl,qmc-hdlc > > > > > + > > > > > + fsl,framer: > > > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > > > + description: > > > > > + phandle to the framer node. The framer is in charge of an E1/T1 line > > > > > + interface connected to the TDM bus. It can be used to get the E1/T1 line > > > > > + status such as link up/down. > > > > > > > > Sounds like this fsl,framer property should depend on the compatible > > > > being present, no? > > > > > > Well from the implementation point of view, only the QMC HDLC driver uses this > > > property. > > > > > > From the hardware description point of view, this property means that the time slots > > > handled by this channel are connected to the framer. So I think it makes sense for > > > any channel no matter the compatible (even if compatible is not present). > > > > > > Should I change and constraint the fsl,framer property to the compatible presence ? > > > If so, is the following correct for this contraint ? > > > --- 8< --- > > > dependencies: > > > - fsl,framer: [ compatible ]; > > > --- 8< --- > > > > The regular sort of > > if: > > compatible: > > contains: > > const: foo > > then: > > required: > > - fsl,framer > > would fit the bill, no? > > Not sure. > "fsl,framer" is an optional property (depending on the hardware we can have > a framer or not). Ah apologies, I had it backwards! Your suggestion seems fair in that case. Thanks, Conor.
On Wed, Sep 13, 2023 at 03:56:16PM +0100, Conor Dooley wrote: > On Wed, Sep 13, 2023 at 04:52:50PM +0200, Herve Codina wrote: > > On Wed, 13 Sep 2023 15:42:45 +0100 > > Conor Dooley <conor@kernel.org> wrote: > > > > > On Wed, Sep 13, 2023 at 09:26:40AM +0200, Herve Codina wrote: > > > > Hi Conor, > > > > > > > > On Tue, 12 Sep 2023 18:21:58 +0100 > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > On Tue, Sep 12, 2023 at 12:10:18PM +0200, Herve Codina wrote: > > > > > > The QMC (QUICC mutichannel controller) is a controller present in some > > > > > > PowerQUICC SoC such as MPC885. > > > > > > The QMC HDLC uses the QMC controller to transfer HDLC data. > > > > > > > > > > > > Additionally, a framer can be connected to the QMC HDLC. > > > > > > If present, this framer is the interface between the TDM bus used by the > > > > > > QMC HDLC and the E1/T1 line. > > > > > > The QMC HDLC can use this framer to get information about the E1/T1 line > > > > > > and configure the E1/T1 line. > > > > > > > > > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > > > > > --- > > > > > > .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++ > > > > > > 1 file changed, 13 insertions(+) > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > > index 82d9beb48e00..b5073531f3f1 100644 > > > > > > --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > > +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > > @@ -101,6 +101,16 @@ patternProperties: > > > > > > Channel assigned Rx time-slots within the Rx time-slots routed by the > > > > > > TSA to this cell. > > > > > > > > > > > > + compatible: > > > > > > + const: fsl,qmc-hdlc > > > > > > + > > > > > > + fsl,framer: > > > > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > > > > + description: > > > > > > + phandle to the framer node. The framer is in charge of an E1/T1 line > > > > > > + interface connected to the TDM bus. It can be used to get the E1/T1 line > > > > > > + status such as link up/down. > > > > > > > > > > Sounds like this fsl,framer property should depend on the compatible > > > > > being present, no? > > > > > > > > Well from the implementation point of view, only the QMC HDLC driver uses this > > > > property. > > > > > > > > From the hardware description point of view, this property means that the time slots > > > > handled by this channel are connected to the framer. So I think it makes sense for > > > > any channel no matter the compatible (even if compatible is not present). > > > > > > > > Should I change and constraint the fsl,framer property to the compatible presence ? > > > > If so, is the following correct for this contraint ? > > > > --- 8< --- > > > > dependencies: > > > > - fsl,framer: [ compatible ]; > > > > --- 8< --- > > > > > > The regular sort of > > > if: > > > compatible: > > > contains: > > > const: foo > > > then: > > > required: > > > - fsl,framer > > > would fit the bill, no? > > > > Not sure. > > "fsl,framer" is an optional property (depending on the hardware we can have > > a framer or not). > > Ah apologies, I had it backwards! Your suggestion seems fair in that > case. Or actually, if: compatible: not: contains: const: foo then: properties: fsl,framer: false ? That should do the trick in a more conventional way.
Hi Conor, On Wed, 13 Sep 2023 15:59:41 +0100 Conor Dooley <conor@kernel.org> wrote: > On Wed, Sep 13, 2023 at 03:56:16PM +0100, Conor Dooley wrote: > > On Wed, Sep 13, 2023 at 04:52:50PM +0200, Herve Codina wrote: > > > On Wed, 13 Sep 2023 15:42:45 +0100 > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > On Wed, Sep 13, 2023 at 09:26:40AM +0200, Herve Codina wrote: > > > > > Hi Conor, > > > > > > > > > > On Tue, 12 Sep 2023 18:21:58 +0100 > > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > > > On Tue, Sep 12, 2023 at 12:10:18PM +0200, Herve Codina wrote: > > > > > > > The QMC (QUICC mutichannel controller) is a controller present in some > > > > > > > PowerQUICC SoC such as MPC885. > > > > > > > The QMC HDLC uses the QMC controller to transfer HDLC data. > > > > > > > > > > > > > > Additionally, a framer can be connected to the QMC HDLC. > > > > > > > If present, this framer is the interface between the TDM bus used by the > > > > > > > QMC HDLC and the E1/T1 line. > > > > > > > The QMC HDLC can use this framer to get information about the E1/T1 line > > > > > > > and configure the E1/T1 line. > > > > > > > > > > > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > > > > > > --- > > > > > > > .../bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 13 +++++++++++++ > > > > > > > 1 file changed, 13 insertions(+) > > > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > > > index 82d9beb48e00..b5073531f3f1 100644 > > > > > > > --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > > > +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml > > > > > > > @@ -101,6 +101,16 @@ patternProperties: > > > > > > > Channel assigned Rx time-slots within the Rx time-slots routed by the > > > > > > > TSA to this cell. > > > > > > > > > > > > > > + compatible: > > > > > > > + const: fsl,qmc-hdlc > > > > > > > + > > > > > > > + fsl,framer: > > > > > > > + $ref: /schemas/types.yaml#/definitions/phandle > > > > > > > + description: > > > > > > > + phandle to the framer node. The framer is in charge of an E1/T1 line > > > > > > > + interface connected to the TDM bus. It can be used to get the E1/T1 line > > > > > > > + status such as link up/down. > > > > > > > > > > > > Sounds like this fsl,framer property should depend on the compatible > > > > > > being present, no? > > > > > > > > > > Well from the implementation point of view, only the QMC HDLC driver uses this > > > > > property. > > > > > > > > > > From the hardware description point of view, this property means that the time slots > > > > > handled by this channel are connected to the framer. So I think it makes sense for > > > > > any channel no matter the compatible (even if compatible is not present). > > > > > > > > > > Should I change and constraint the fsl,framer property to the compatible presence ? > > > > > If so, is the following correct for this contraint ? > > > > > --- 8< --- > > > > > dependencies: > > > > > - fsl,framer: [ compatible ]; > > > > > --- 8< --- > > > > > > > > The regular sort of > > > > if: > > > > compatible: > > > > contains: > > > > const: foo > > > > then: > > > > required: > > > > - fsl,framer > > > > would fit the bill, no? > > > > > > Not sure. > > > "fsl,framer" is an optional property (depending on the hardware we can have > > > a framer or not). > > > > Ah apologies, I had it backwards! Your suggestion seems fair in that > > case. > > Or actually, > if: > compatible: > not: > contains: > const: foo > then: > properties: > fsl,framer: false > ? That should do the trick in a more conventional way. Thanks for this proposal. I will use it in the next iteration. Regards, Hervé
diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml index 82d9beb48e00..b5073531f3f1 100644 --- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml +++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml @@ -101,6 +101,16 @@ patternProperties: Channel assigned Rx time-slots within the Rx time-slots routed by the TSA to this cell. + compatible: + const: fsl,qmc-hdlc + + fsl,framer: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the framer node. The framer is in charge of an E1/T1 line + interface connected to the TDM bus. It can be used to get the E1/T1 line + status such as link up/down. + required: - reg - fsl,tx-ts-mask @@ -159,5 +169,8 @@ examples: fsl,operational-mode = "hdlc"; fsl,tx-ts-mask = <0x00000000 0x0000ff00>; fsl,rx-ts-mask = <0x00000000 0x0000ff00>; + + compatible = "fsl,qmc-hdlc"; + fsl,framer = <&framer>; }; };