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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC11C4361B for ; Wed, 16 Dec 2020 05:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 615A623333 for ; Wed, 16 Dec 2020 05:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725831AbgLPFcU (ORCPT ); Wed, 16 Dec 2020 00:32:20 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:37520 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725274AbgLPFcU (ORCPT ); Wed, 16 Dec 2020 00:32:20 -0500 Date: Wed, 16 Dec 2020 08:31:34 +0300 From: Serge Semin To: Andrew Lunn CC: Serge Semin , Alexandre Torgue , , , , Alexey Malahov , Jose Abreu , Pavel Parkhomenko , Maxime Coquelin , Jakub Kicinski , Giuseppe Cavallaro , Vyacheslav Mitrofanov , "David S. Miller" , Subject: Re: [RFC] net: stmmac: Problem with adding the native GPIOs support Message-ID: <20201216053134.xlqxr4ncbukecxuu@mobilestation> References: <20201214092516.lmbezb6hrbda6hzo@mobilestation> <20201214153143.GB2841266@lunn.ch> <20201215082527.lqipjzastdlhzkqv@mobilestation> <20201215135837.GB2822543@lunn.ch> <20201215145253.sc6cmqetjktxn4xb@mobilestation> <20201216020355.GA2893264@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20201216020355.GA2893264@lunn.ch> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Dec 16, 2020 at 03:03:55AM +0100, Andrew Lunn wrote: > > > From what you are saying, it sounds like from software you cannot > > > independently control the GPIO controller reset? > > > > No. The hardware implements the default MAC reset behavior. So the > > GPIO controller gets reset synchronously with the MAC reset and that > > can't be changed. > > Is there pinmux support for these pins? Can you disconnect them from > the MAC? Often pins can be connected to different internal IP > blocks. Maybe you can flip the pin mux, perform the MAC reset, and > then put the pinmux back to connect the pins to the MAC IP again? Alas no. Pins multiplexing isn't implemented in the Baikal-T1 SoC at all. Each pin has been assigned with a single function. In this case DW GMAC GPO/GPI pins always serve as GPO/GPI and nothing else. -Sergey > > Andrew