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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE5AACD13CF for ; Mon, 2 Sep 2024 08:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oOaSphN4uqIVyGx4/lf/Z0TMBGuenM0C4nTClydRFg4=; b=WXFYhVaoPSuKJMnfA9F9tHs88A iQ/wwyNju3zVtAU9c+j4bBHUmsfIK8Sg4GRvI6g4L/3YJZhEeSJsREI2W2C3IPD8d7K9jztvsLFfN dPMroAF8WqUgCirY6RMw+f3nZft9+LwX2GMOFUglVw6fgAQofTXnZDGAAQQy0wcLIdRV7zyMOFreA OheEmY97m/R32UTV7MLEhztn0nVvXj+Yz8/W7VKAER55o8+xuYJeg8nQY9yO9+UUrX6Yh9sqKc1+j dShcfNcLwzZfoUyjpsIpaNj/gN9NpGXlACerLWHrOpaB1rGsmUvwWDoOtXxtnMo4mFSSZtPyU67w2 c6vXMwSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl2jZ-0000000Da7D-0Le8; Mon, 02 Sep 2024 08:48:25 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl2if-0000000DZwl-2jhn for linux-arm-kernel@lists.infradead.org; Mon, 02 Sep 2024 08:47:31 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5353cd2fa28so5174445e87.3 for ; Mon, 02 Sep 2024 01:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1725266847; x=1725871647; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oOaSphN4uqIVyGx4/lf/Z0TMBGuenM0C4nTClydRFg4=; b=dowgRRuU8LNQk++gdKls7RBPoz5aB1Rlj+g0oPgty/gqfdFGD9ZCfbxyCzxsdObmUw wCuSkGHcIE+NhQ0x51UXp1FEQSR+oAB827uWV3dx/cFQCEmMQDnbn3EENj/xu3Vn+Zj0 tGp2lN3aM3oN0TZil3dly8wLlA9K3vhSaRE11JnGYAFduwA3b+uVZp0RIfX0JmoKFfns uS+j+9UefhmVnPMZmP7lr+17XgZB+x7UB0YIlIB9M5McL8Jlp5Ow1rv7dxSLjzwUg+Qk GEivAKKcjhU3ClLewwAQbEARitLET/KmWNM6TiFSWhWWaS8PkA0BkTyZpcn8nNrLKddv vKhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725266847; x=1725871647; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oOaSphN4uqIVyGx4/lf/Z0TMBGuenM0C4nTClydRFg4=; b=H96ZkW5RaIL3DFY/RtatiH5e/oMpl5WutbS7kRWkUsU39UufL+WURfUE3Ssy19Kekt hlHlBfflxZbFmGtcNYEJVPxr8LOWvGcnEDyVaOhYGak75JlFMXBkh48mblFGd82q5avk GXsKOWvgZvO8aFsI2lLABoyjJ3fs6m0MjdsT+hox1oB97SOq86bAYmrzHmt62xB6CGFo 4L4Y67Efy5PfvRZdxnIyhR3BnTTFy4WN+29697hLaPStaVrJPM+iHTcCLGR52Q0lUmuw MjLfvtVNDxp9vWZmjxMqInpTpMn8rWKAjkPp0gbE+UP1jv12BwL5RTSqeUcy3617duNS W25g== X-Forwarded-Encrypted: i=1; AJvYcCV9u4+A/cZz/2/7BGrg+eo40noQPVrZTahmhSrB3XRmpJwZ3PzyVRg4SKpMUYJBYIAHHWi3duZZ4JCvCKqW7Kse@lists.infradead.org X-Gm-Message-State: AOJu0YwoR/1uB1JvT05ICim9io7kUwhUWUBgKN8MTjzZe9STPqmamiZY Vdr7Lfh2gDTB1NcXzyVStQNFrHzBUSsw2oCCylYEsOaDPrYBpx7skqbKzu3Ul0I= X-Google-Smtp-Source: AGHT+IFKP+TMYUf8hSyMMTGOziIULq1HvfnDIOTbDSCryKJ5amdlOmDWug+wIx0ZuZ/E3sdbRQoVKA== X-Received: by 2002:a05:6512:15a5:b0:52e:9e70:d068 with SMTP id 2adb3069b0e04-53546afad74mr5564997e87.4.1725266847009; Mon, 02 Sep 2024 01:47:27 -0700 (PDT) Received: from [192.168.50.4] ([82.78.167.144]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8988fef4c3sm525445666b.32.2024.09.02.01.47.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Sep 2024 01:47:26 -0700 (PDT) Message-ID: <5556d176-cca7-492c-ba21-48256d5d6338@tuxon.dev> Date: Mon, 2 Sep 2024 11:47:24 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC Content-Language: en-US To: Biju Das , Ulf Hansson Cc: "vkoul@kernel.org" , "kishon@kernel.org" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "p.zabel@pengutronix.de" , "geert+renesas@glider.be" , "magnus.damm@gmail.com" , "gregkh@linuxfoundation.org" , "mturquette@baylibre.com" , "sboyd@kernel.org" , Yoshihiro Shimoda , "linux-phy@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , "linux-pm@vger.kernel.org" , Claudiu Beznea References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> <99bef301-9f6c-4797-b47e-c83e56dfbda9@tuxon.dev> From: claudiu beznea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240902_014729_703051_F5AF2C8F X-CRM114-Status: GOOD ( 25.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Biju, On 02.09.2024 10:54, Biju Das wrote: > Hi Claudiu, > >> -----Original Message----- >> From: Biju Das >> Sent: Saturday, August 31, 2024 6:14 AM >> Subject: RE: [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC >> >> Hi Claudiu, >> >>> -----Original Message----- >>> From: claudiu beznea >>> Sent: Friday, August 30, 2024 9:23 AM >>> Subject: Re: [PATCH 00/16] Add initial USB support for the Renesas >>> RZ/G3S SoC >>> >>> Hi, Ulf, >>> >>> On 29.08.2024 18:26, Ulf Hansson wrote: >>>> On Thu, 22 Aug 2024 at 17:28, Claudiu wrote: >>>>> >>>>> From: Claudiu Beznea >>>>> >>>>> Hi, >>>>> >>>>> Series adds initial USB support for the Renesas RZ/G3S SoC. >>>>> >>>>> Series is split as follows: >>>>> >>>>> - patch 01/16 - add clock reset and power domain support for USB >>>>> - patch 02-04/16 - add reset control support for a USB signal >>>>> that need to be controlled before/after >>>>> the power to USB area is turned on/off. >>>>> >>>>> Philipp, Ulf, Geert, all, >>>>> >>>>> I detailed my approach for this in patch >>>>> 04/16, please have a look and let me know >>>>> your input. >>>> >>>> I have looked briefly. Your suggested approach may work, but I have >>>> a few thoughts, see below. >>>> >>>> If I understand correctly, it is the consumer driver for the device >>>> that is attached to the USB power domain that becomes responsible >>>> for asserting/de-asserting this new signal. Right? >>> >>> Right! >>> >>>> >>>> In this regard, please note that the consumer driver doesn't really >>>> know when the power domain really gets powered-on/off. Calling >>>> pm_runtime_get|put*() is dealing with the reference counting. For >>>> example, a call to pm_runtime_get*() just makes sure that the PM >>>> domain gets-or-remains powered-on. Could this be a problem from the >>>> reset-signal point of view? >>> >>> It should be safe. From the HW manual I understand the hardware block is something like the >> following: >>> >>> >>> USB area >>> +-------------------------+ >>> | | >>> | PHY --->USB controller | >>> SYSC --> | ^ | >>> | | | >>> | PHY reset | >>> +-------------------------+ >> >> How USB PWRRDY signal is connected to USB? >> >> USB block consists of PHY control, PHY, USB HOST and USB OTG Controller IPs. >> >> Is it connected to top level block or connected to each IP's for turning off the USB region power? >> >> ? Or Just PHY (HW manual mentions for AWO, the USB PWRRDY signal->USB PHY PWRRDY signal control)? > > As per the update from HW team, > > "SYS_USB_PWRRDY and SYS_PCIE_RST_RSM_B are used when transition from ALL_ON to AWO (or from AWO to ALL_ON). > > Refer to step 8,9 in Table 41.10 Example Transition Flow Outline from ALL_ON Mode to AWO Mode. > Refer to step 9,10 in Table 41.11 Example Transition Flow Outline from AWO Mode to ALL_ON Mode. All this is not new information. >From experiments, we need to control these signals also when booting as intermediary booting application may control and leave it in improper state. W/o having SYSC signals configured properly there is no chance for USB to work (it should be the same for PCIe but I haven't explored it yet). > > When turning off USB PHY and PCIe PHY, if they are not controlled, PHY may break." >From experiments, I know this, as this is the reason the SYSC USB PWRRDY has been implemented in Linux and proposed in this series. > > Do you have any plan to control this power transitions(ALL_ON to AWO and vice versa) in linux? As you know, the RZ/G3S USB PM code is already prepared. This is also configuring these signals when going to suspend/exiting from resume. W/o configuring properly these signals the USB is not working after a suspend/resume cycle. Thank you, Claudiu Beznea > Cheers, > Biju >