Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp113566rdb; Fri, 18 Aug 2023 16:36:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFncmTdvXOl4O+tCEvZxELE9xYMB+298N+RwE94SAAbgMOKzgXFUOwb2aTgCFq3qtnhKpaM X-Received: by 2002:a17:902:c246:b0:1b8:c972:606a with SMTP id 6-20020a170902c24600b001b8c972606amr620612plg.51.1692401800283; Fri, 18 Aug 2023 16:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692401800; cv=none; d=google.com; s=arc-20160816; b=y1BhR4m8bO43A1e7iTJJt3n18u4iwvxtmBXOrx1g8XXMmIg02qV/IJPi+QtjMm7zNy D6+MGswKtPsqR6az0I0qWRNLWE8CobXQTx3o8iuS3H/mWUDANw3YLqUeYVqeAPVZwl7Y RS+ZyVEBuz2CF/GCzmQikCFS6Wsf4aTzHHQFbyeWnWl7P0EZAiivxuPuxC13kiOWUNJF PgV7C5MEQL+q1//HX+wHUUaKP5UEqNhmg6c9i77Zrbp+3EKW+vaYo02G7BhN1doARP0i ZuThe1BaFo53pVaWEd0/mD5bk4kaTB9YpP315NoLsYXTg997ZABonTU8YvzN+CBAlBfo QVLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=fPZq4TxZ4uD+1YDrwGfVCfR5eKqcdkL2mTUU+zD+gtE=; fh=Am76m85Wub4Tfou4DIPLY6b8ACS2R6coYVh/n7W3W+I=; b=bllDG3sIDFxUsynvM1uQqHyg/dgvpwH9o/q1/SKiju+w4CUqqOrgiNhMmZ/UG6e+lz IeEBWFO6bULiMnXlZvLR6+naBbAZa7b3GRgDflfoAQgY6NVWlgUA8Jtan14TiQMHFu/y Nm8BnE5bCkXdHWMM750SOqYEdNmdqygFqSF01z9tZsi80/2WPd0MXRN1uFHILo50PqyE a68VsoaRB3WgyWKCvDbAE7IvpsBF17hDSFU9oOgo9gLsaSJ0Ktxg7oNMI/H91EcnDqfA lb38zqteBG6yZNpxRtdITfiE9p03TfFv7LBvR5EJJHVow+4HN1puCOCowBDkIQDR3l3y ZTPA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y21-20020a170902e19500b001bdb92d7b19si2216919pla.101.2023.08.18.16.36.16; Fri, 18 Aug 2023 16:36:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376759AbjHRL5S convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 Aug 2023 07:57:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376764AbjHRL4y (ORCPT ); Fri, 18 Aug 2023 07:56:54 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 720052D4F; Fri, 18 Aug 2023 04:56:53 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 37IBu8jZ5023526, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 37IBu8jZ5023526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 Aug 2023 19:56:08 +0800 Received: from RTEXMBS05.realtek.com.tw (172.21.6.98) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Fri, 18 Aug 2023 19:56:28 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS05.realtek.com.tw (172.21.6.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 18 Aug 2023 19:56:28 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Fri, 18 Aug 2023 19:56:28 +0800 From: Justin Lai To: Andrew Lunn CC: "kuba@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCH net-next v3 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code Thread-Topic: [PATCH net-next v3 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code Thread-Index: AQHZz4Ya38d07ViN20S7bf3O9T4Qta/q9pcAgAMgk2D//87KAIABzfpQ Date: Fri, 18 Aug 2023 11:56:28 +0000 Message-ID: <4951391892534eaeb2da96f052364e4c@realtek.com> References: <20230815143756.106623-1-justinlai0215@realtek.com> <20230815143756.106623-2-justinlai0215@realtek.com> <95f079a4-19f9-4501-90d9-0bcd476ce68d@lunn.ch> <4955506dbf6b4ebdb67cbb738750fbc8@realtek.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.210.185] x-kse-serverinfo: RTEXMBS05.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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, Aug 17, 2023 at 07:32:07AM +0000, Justin Lai wrote: > > > On Tue, Aug 15, 2023 at 10:37:55PM +0800, Justin Lai wrote: > > > > This patch is to add the ethernet device driver for the PCIe > > > > interface of Realtek Automotive Ethernet Switch, applicable to > > > > RTL9054, RTL9068, > > > RTL9072, RTL9075, RTL9068, RTL9071. > > > > > > > > Below is a simplified block diagram of the chip and its relevant > interfaces. > > > > > > > > ************************* > > > > * * > > > > * CPU network device * > > > > * ____________ * > > > > * | | * > > > > * | PCIE Host | * > > > > ************************* > > > > || > > > > PCIE > > > > || > > > > **************************************** > > > > * | PCIE Endpoint | * > > > > * |---------------| * > > > > * | GMAC | * > > > > * |------| Realtek * > > > > * || RTL90xx Series * > > > > * || * > > > > * _____________||______________ * > > > > * | |MAC| | * > > > > * | |---| | * > > > > * | | * > > > > * | Ethernet Switch Core | * > > > > * | | * > > > > * | ----- ----- | * > > > > * | |MAC| ............|MAC| | * > > > > * |__|___|_____________|___|____| * > > > > * |PHY| ............|PHY| * > > > > * ----- ----- * > > > > *********||****************||*********** > > > > This driver is mainly used to control GMAC, but does not control > > > > the switch > > > core, so it is not the same as DSA. > > > > In addition, the GMAC is not directly connected to the PHY, but > > > > directly connected to the mac of the switch core, so there is no > > > > need for PHY > > > handing. > > > > > > So this describes your board? Is the MAC and the swtich two separate > > > chips? Is it however possible to connect the GMAC to a PHY? Could > > > some OEM purchase the chipset and build a board with a PHY? We write > > > MAC drivers around what the MAC can do, not what one specific board > allows. > > > > > > What MAC drivers do to support being connected to a switch like this > > > is use a fixed-link PHY, via phylink. This gives a virtual PHY, which supports > one speed. > > > The MAC driver then just uses the phylink API as normal. > > > > > > On your board, how is the switch controlled? Is there an MDIO bus as > > > part of the MAC? If so, you should add an MDIO bus master driver. > > > > > > Hi, Andrew > > > > The block of the Realtek RTL90xx series is our entire chip > > architecture, the GMAC is connected to the switch core, and there is > > no PHY in between. So customers don't need to consider that. > > O.K. It would of been helpful if you had said this right at the beginning. It is > good to point out anything unusual with your hardware, otherwise reviewers > are going to make wrong assumptions, and then ask lots of questions. > > Is the 'line' speed of the MAC fixed? It operates at one speed, and that is it? Hi, Andrew The "line" speed of the MAC is fixed 5G, but the throughput will be determined according to the speed of the PCIe link. For example, if the link speed is gen 3, the throughput will be 5G. if the link speed is gen 2, the throughput will be 2.5G. if the link speed is gen 1, the throughput will be 1G. > What about pause? You cannot negotiate pause, but can it be forced? We do not support negotiate pause, but it can be forced. > > We have some externally controlled interfaces to control switch core, > > such as I2C, MDIO, SPI, etc., but these are not controlled by GMAC . > > And just for conformation, there is no extra fields in the DMA descriptors, etc, > to help the switch? You will at some point write a DSA driver for the switch, > and there will be a tagging protocol, extra headers added to the frame, in > order to direct frames out the correct port of the switch? There is no extra fields in DMA descriptors for tagging protocol. The tag added by switch hardware instead of this driver. > > Are the I2C, MDIO and SPI bus masters also hanging off a PCIE endpoint? Can > they probe independently? I'm just want to check this should not be part of an > MFD driver. The I2C, MDIO and SPI bus masters are not hanging off the PCIE endpoints, but on the switch core. > > Is there a public data sheet for this device? We currently do not have a public data sheet to provide. > > Andrew >