Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5253991imu; Wed, 19 Dec 2018 08:05:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/UEz9Wrz4Wr6iYX8/iVzRk5JR6gi6gbysiWzp9jS4J1FjaVsV16A7Cg/F8hp6ipUJYvlC1T X-Received: by 2002:a65:47ca:: with SMTP id f10mr20377441pgs.166.1545235538208; Wed, 19 Dec 2018 08:05:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545235538; cv=none; d=google.com; s=arc-20160816; b=Ff9Sh/QP0QbesljWyVYTG3msy91q/InmQUDmFJWwi5Yg2bD7IzAuGsevfqAnda6XTh Dr7/b73fR8NA8CpYtAGgkbbI7hU8vXZhgr4IH7fQdb4hHjP7YVxH2LtAR0XKOaD2jlG3 O0Cu6ILgsox0pqxPjBpUoXsA9cUEdBLNYBwuzKFd3FnL1I7JNzSolPnbkodezqpUyX8/ egjXbLu4z9HwlvWjedkh2C9VJGIC5Gr0ec1ZfGw28H93uFMlV22ajftgpRDjpVOFD6sf fjHtkOH3mvMdwYnN0UJLOsOlOBxCGEVmsPXjYFr4JhRJObwtMKuMi5WvfTWSJRwpSpol eblw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=F/IbJcayV0BHyGU1UIVZJJtZqw1GoeG1VHqqTcm/RVw=; b=V7My4JwlbGFUO53DVVsWeXToeSoKk0QdDQELlHmH2WtqkLRtWNMH0Mo76Zx+TEE8tX BYLgdJO0qpX7JqWVDYRjPCh/fiZmb3PEZMGD2cNFg+rIKM2oh1WmM8TGvDa9/9cjbIsi WC+7OEpf6mOX1pMsXYRcg5CXG+VfWl+NvMRjW2fLJYAQ/eZ0zqqQJmy3ww1TFKOLgceM E4PuDLw7TPxApXtIGU8Luv9ILyUWssjD6HOUbH8gv5rGDKieYqS4fP0tpfKncdJUzGY4 Sjx/x29/jW6ARc6IIxKLdzHVQGmH1NrXZBhh2MepwQZ77UrOKqYSzoqzdzPHWjF7FNeN tWeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b="yJC2B/5f"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si15544468plp.137.2018.12.19.08.05.09; Wed, 19 Dec 2018 08:05:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b="yJC2B/5f"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728376AbeLSP2m (ORCPT + 99 others); Wed, 19 Dec 2018 10:28:42 -0500 Received: from mail.nic.cz ([217.31.204.67]:40818 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727844AbeLSP2m (ORCPT ); Wed, 19 Dec 2018 10:28:42 -0500 Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTPS id 80D21631CE; Wed, 19 Dec 2018 16:28:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1545233320; bh=BDt8vj+FzsQ9c3tr9yFRMKJVFQFALAU9dKG6n/qJGdo=; h=Date:From:To; b=yJC2B/5fC9N8Ip7vWaPjItQWJo59MSDnTxwFoXhLlKsdmn0FpEJaJXLPORB7evGVN D/5mbRX2u3OBujfP93pbe1wz9LKuvkBfmfXbBwWQ8jAr72X4Czv8hDdaSfKczgvym9 GA5SefnBUoHmHumklm2hHiMPxzRcqKvDE5zgFH6s= Date: Wed, 19 Dec 2018 16:28:35 +0100 From: Marek =?ISO-8859-1?Q?Beh=FAn?= To: Miquel Raynal Cc: Nadav Haklai , Gregory Clement , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Thomas Petazzoni , Bjorn Helgaas , , Rob Herring , Mark Rutland , Lorenzo Pieralisi , linux-pci@vger.kernel.org, , , Antoine Tenart , Maxime Chevallier Subject: Re: [PATCH v2 03/12] PCI: aardvark: Add PHY support Message-ID: <20181219162835.5ff9c33c@dellmb.labs.office.nic.cz> In-Reply-To: <20181218144130.3f1a75de@xps13> References: <20181212102142.16053-1-miquel.raynal@bootlin.com> <20181212102142.16053-4-miquel.raynal@bootlin.com> <20181214014701.373b220b@nic.cz> <20181214015712.31f749ea@nic.cz> <20181217170724.58421a29@xps13> <20181217223430.182d01d8@nic.cz> <20181218091817.4a8a5d42@xps13> <20181218092314.725af970@xps13> <20181218140920.6935db39@nic.cz> <20181218144130.3f1a75de@xps13> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, One thing for which I would like to be able to disable comphy is that each consumes about 100mW of power. On Turris Mox we configure the comphys to SGMII1, PCIe and USB3 modes. If there is no USB device plugged, the USB3 phy can be disabled, and save 100mW of power. If the PCIe extension module is not present, the PCIe can too be disabled, and if there is no switch nor SFP module present, so can SGMII1. The other reason is this: if the SGMII phy is set to 1G mode, and then powered on second time in 2.5G mode, will it work? I would like to patch mvneta driver to power on/off the comphy, if the device node is present in device tree. But then the system can request such a change (SGMII to 2500BASE-X or back). Marek On Tue, 18 Dec 2018 14:41:30 +0100 Miquel Raynal wrote: > Hi Marek, >=20 > Marek Behun wrote on Tue, 18 Dec 2018 14:09:20 > +0100: >=20 > > > [2] > > > https://github.com/ARM-software/arm-trusted-firmware/blob/master/driv= ers/marvell/comphy/phy-comphy-3700.c =20 > >=20 > > Yes, I used mainline atf (it did not work out of the box with 18.09 > > atf-marvell of course). But there is no _power_off function for > > SGMII, nor a digital_reset function like in cp110 implementation. =20 >=20 > Indeed, but why would you need one? Just use the helpers from the core > and if there is no implementation, nothing should happen and the > helper should exit without error. Just call > phy_set_mode()/phy_power_on() an you should be good. >=20 >=20 > Thanks, > Miqu=C3=A8l