Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2375701rwl; Thu, 13 Apr 2023 05:49:11 -0700 (PDT) X-Google-Smtp-Source: AKy350YKT33w81Z3IZBw7K6GnhPC+buc4ovZZfQN7g+rKVwgWPXQosYY+njOlochq54ZjCVl9qMc X-Received: by 2002:a05:6a00:1514:b0:63a:8533:d6a7 with SMTP id q20-20020a056a00151400b0063a8533d6a7mr4040828pfu.9.1681390150584; Thu, 13 Apr 2023 05:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681390150; cv=none; d=google.com; s=arc-20160816; b=tcoFkriTsEKF0osShl+wtfcV9AIXAXHaIxdg1W8EmlW1sNrg4S4rCMOSdEN+VD0IiG PPHPkhbxSYom5y8h0EcBjSNhSuYijhQ44zxrfJ1ZdL/aon8gs5b71SdqNO37hLZZEPBd g56U1pg+A0ZvzxHFv12aNsKSfVzk56WOhKbDOH4vtPvj+ZbFMj41XJPTKdCgdCrDmbtn 2v9RUgp/E1FHmHvT5tMG623yvG1F09xCU+NbEiCXd3dHua+fuMyc/tAOXL73dAyZY+Vr QmmHuXq4ZTlF5CEutD83yw++a4dka0/4mpqvlLfxGHVHFg3Ak+Bna+BNGALbI5g/O/gv BdDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FtBdndZ3097mSvwg5FOFaiH+eLsMC9IFLTN0uxY11Hk=; b=S6gfzizJks1criPf/UDTisLwSVWr/NBGo4TYJWKiYdgKEIp2+UvpcWnh3P6wyHlcqW 203lvfqh1IWXkFLk6acoqvj16VRGRes+gRQ/FxybBCwaWZQEo9yDsbUoI6X26tEnBOyw mGhOreimw6NA/2ifGW8bfrZetZb8Q6v3EgnIKXCI/gbcnW+TMVfAhgcNKfSAIPjCGEHW K4K2wYbR29cIWv1cXM7Sonln4Qj/0qnUQnEodqZnuLcZ3mzkk/r43/9g6HSSrLfxyyoj ZIvYQJcLLzBGL5REedma73k4wwisGRrIS5wML8xWm60eUbi9WjSXyCY85G1s2L2weGkV wzfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=b0F4Mwt0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q19-20020aa78433000000b0063724ddd779si1640282pfn.313.2023.04.13.05.48.59; Thu, 13 Apr 2023 05:49:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=b0F4Mwt0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbjDMMso (ORCPT + 99 others); Thu, 13 Apr 2023 08:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229663AbjDMMsn (ORCPT ); Thu, 13 Apr 2023 08:48:43 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42E4C2115; Thu, 13 Apr 2023 05:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=FtBdndZ3097mSvwg5FOFaiH+eLsMC9IFLTN0uxY11Hk=; b=b0F4Mwt0Njh9nMh7X/DOfo3jPT uG1loN7ecupHSyBznqMc3ZsMIGSgYdywFIue78i4BY7R0ThXcrkOXtZKy+jN2eQ4obVkbNR0wT3ty BVAIU+RTRicvetF9arvDQotBgmDSaqqIeUGu3lufoBbQEXHKfqHeeJTxQHirNSyO+y0E=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pmwNK-00ABVl-W0; Thu, 13 Apr 2023 14:48:30 +0200 Date: Thu, 13 Apr 2023 14:48:30 +0200 From: Andrew Lunn To: Herve Codina Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, Christophe Leroy , Thomas Petazzoni Subject: Re: [RFC PATCH 0/4] Add support for QMC HDLC and PHY Message-ID: <885e4f20-614a-4b8e-827e-eb978480af87@lunn.ch> References: <20230323103154.264546-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230323103154.264546-1-herve.codina@bootlin.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 23, 2023 at 11:31:50AM +0100, Herve Codina wrote: > Hi, > > I have a system where I need to handle an HDLC interface. > > The HDLC data are transferred using a TDM bus on which a PEF2256 is > present. The PEF2256 transfers data from/to the TDM bus to/from E1 line. > This PEF2256 is also connected to a PowerQUICC SoC for the control path > and the TDM is connected to the SoC (QMC component) for the data path. > > From the HDLC driver, I need to handle data using the QMC and carrier > detection using the PEF2256 (E1 line carrier). > > The HDLC driver consider the PEF2256 as a generic PHY. > So, the design is the following: > > +----------+ +-------------+ +---------+ > | HDLC drv | <-data-> | QMC channel | <-- TDM --> | PEF2256 | > +----------+ +-------------+ | | <--> E1 > ^ +---------+ +---------+ | | > +-> | Gen PHY | <-> | PEF2256 | <- local bus -> | | > +---------+ | PHY drv | +---------+ > +---------+ Hi Herver Sorry, i'm late to the conversation. I'm looking at this from two different perspectives. I help maintain Ethernet PHYs. And i have hacked on the IDT 82P2288 E1/T1/J1 framer. I think there is a block missing from this diagram. There appears to be an MFD driver for the PEF2256? At least, i see an include for linux/mfd/pef2256.h. When i look at the 'phy' driver, i don't see anything a typical PHY driver used for networking would have. A networking PHY driver often has the ability to change between modes, like SGMII, QSGMII, 10GBASER. The equivalent here would be changing between E1, T1 and J1. It has the ability to change the speed, 1G, 2.5G, 10G etc. This could be implied via the mode, E1 is 2.048Mbps, T1 1.544Mbps, and i forget what J1 is. The PEF2256 also seems to support E1/T1/J1. How is its modes configured? In fact, this PHY driver does not seem to do any configuration of any sort on the framer. All it seems to be doing is take notification from one chain and send them out another chain! I also wounder if this get_status() call is sufficient. Don't you also want Red, Yellow and Blue alarms? It is not just the carrier is down, but why it is down. Overall, i don't see why you want a PHY. What value does it add? Andrew