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 DE4BFCD342D for ; Tue, 3 Sep 2024 13:02:49 +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=8p5yg7eSpfkF7KfEUeaswPPeaoWpvFoniZltR7IGrLo=; b=ex+KZzwXQ9uYovCA1/NvGxoDGT 1310yfdQ7XXrWgUIkKpmSf/zqtY94V3RsOSx5R1a1MfsccDZs2AEtn2ASKvcxVzap6HHgQF+V0Z69 LoP4QCjTA/K4zxYP8Dq8asVLnrXTjN3wgwn0ts/pi42MJZCXz4usPR+YObhWIh6+sef7Q6apvRsnB 75DiDQunVJmoSBU4zWexOzvuBRotDz/b45H4/EfyZ9ZToUcOupg3vY5fOiOKfVTKsG4plLKTKsZJy +6raXo7F959aJ5vtzgvJRH+tgBhkyJZXnVilYeJlXwbpPJD5ujLcf11u+tqkRFWW03/iZwtxydMpJ VN/eDPDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slTB8-00000000Hm4-1KwT; Tue, 03 Sep 2024 13:02:38 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slT5x-00000000GY8-3QZi for linux-arm-kernel@lists.infradead.org; Tue, 03 Sep 2024 12:57:19 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a869332c2c2so996620566b.0 for ; Tue, 03 Sep 2024 05:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1725368236; x=1725973036; 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=8p5yg7eSpfkF7KfEUeaswPPeaoWpvFoniZltR7IGrLo=; b=EE1GX8foCYFCc4XvlLOl5M3rz1G2Nz3Pyfxkr/C+TbOrky71uN3RYrcufO3z8YDXLx 6N1x7ssCJxUznPXs3N/mcfX945Sf/UWHTnZnEVDv8VE4qvIBJM8t3KKYRG168xXNYIz7 CmsctkvMYspbajiruc5EcGtvRBhSZEDDliVybyLMtCy1oIyy23Wq5NtdRA+j284jcwjo vzVZ+hgkwECWUR/SQ8B0DkcZanslJtS0LsTbiXodnzmWoODRAM4fuV1E51Je45S+YaFz mHXQNA3/aiY65c9kkcYELuAFd7S8lXDqVuOxN/ZB9uW7Xic0H5AyGeaFUwctx3FPpUWn 3pyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725368236; x=1725973036; 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=8p5yg7eSpfkF7KfEUeaswPPeaoWpvFoniZltR7IGrLo=; b=xQmvs/8TeZ/wtAfKtYDZJQcLhOiTORlcwlt/YqT3W28Wy+FCjaVktD1rhjEuq4aehg JH2A2GSLJSQb4Pd8ZtYm47MWz+2+onVmgzNwVSCIkEA1NE4TOB/WS6jhzaLXM/eCLbl4 Iz31mEu3y0iU9o2QzDGqRjK1hrNly5FQAFrozMV15AD01jQSrswmVHTO59AeUrMdexyH H992RHmEhCo8/lLrLIeHZdNjKdsxKh+S4knX6rGtGdVf0a3dvR5Pmtw7uWfAPaDrqQNF T6AfYfhwh+jIbXG9G7ojhd6oifvne23AJZwqZy+SBbS905dp3qsAbb6G6IpyiVVUpY4T UUUw== X-Forwarded-Encrypted: i=1; AJvYcCWSZZ8sSpHzTjWWyQ/1WTzMc8qXaVVkCZe+htUObMLUbU0vUBnb7wKkNzsews/kTO1k76Ql2umwHUWZj76NwdQW@lists.infradead.org X-Gm-Message-State: AOJu0YwXHegGpmH06F0a6wEdDyU1ZYxLqrYf5//9qvTX+G5VEqnmLnqL FXEIxjBQE6tGi2qFafVeX3zDIaF31CRlJEfdMdh2w4zmq3hQmYDXQwrM01qtlII= X-Google-Smtp-Source: AGHT+IHZXUf4gCvoTnaido/Qhn8cqkw+YBP7i7FYjIQcDtkx87EhKcdM6qoGHvRSR0AuY4uEo+anoQ== X-Received: by 2002:a17:907:7248:b0:a77:ca3b:996c with SMTP id a640c23a62f3a-a89a267a567mr1608923766b.16.1725368235772; Tue, 03 Sep 2024 05:57:15 -0700 (PDT) Received: from [192.168.50.4] ([82.78.167.144]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8988feb31fsm690077166b.17.2024.09.03.05.57.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Sep 2024 05:57:15 -0700 (PDT) Message-ID: <5bcdc677-e61e-4312-a19b-57b4600685d3@tuxon.dev> Date: Tue, 3 Sep 2024 15:57:13 +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> <590a4fb2-24b2-432b-92db-534c5a52ed0b@tuxon.dev> <35dc7414-f5bd-4ed4-bfa1-f723f4f0078c@tuxon.dev> <0b73544b-0253-43b9-b631-6578b48eaca8@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-20240903_055717_874184_7C8D93BA X-CRM114-Status: GOOD ( 19.80 ) 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 On 03.09.2024 15:37, Biju Das wrote: > > >> -----Original Message----- >> From: claudiu beznea >> Sent: Tuesday, September 3, 2024 1:26 PM >> 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 >> Subject: Re: [PATCH 00/16] Add initial USB support for the Renesas RZ/G3S SoC >> >> >> >> On 03.09.2024 15:00, Biju Das wrote: >>> >>> >>>> -----Original Message----- >>>> From: Biju Das >>>> Sent: Tuesday, September 3, 2024 12:07 PM >>>> To: Claudiu.Beznea ; 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 >>>> >>>> Subject: RE: [PATCH 00/16] Add initial USB support for the Renesas >>>> RZ/G3S SoC >>>> >>>> Hi Claudiu, >>>> >>>>> -----Original Message----- >>>>> From: claudiu beznea >>>>> Sent: Tuesday, September 3, 2024 12:00 PM >>>>> Subject: Re: [PATCH 00/16] Add initial USB support for the Renesas >>>>> RZ/G3S SoC >>>>> >>>>> >>>>> >>>>> On 03.09.2024 13:31, Biju Das wrote: >>>>>>>> During boot clr USB PWR READY signal in TF-A. >>>>>>>> STR case, suspend set USB PWR READY signal in TF-A. >>>>>>>> STR case, resume clr USB PWR READY signal in TF-A. >>>>>>> As I said previously, it can be done in different ways. My point >>>>>>> was to let Linux set what it needs for all it's devices to work. I >>>>>>> think the way to go forward is a >>>>> maintainer decision. >>>>>> >>>>>> I agree, there can be n number of solution for a problem. >>>>>> >>>>>> Since you modelled system state signal (USB PWRRDY) as reset >>>>>> control signal, it is reset/DT maintainer's decision to say the >>>>>> final word whether this signal fits in reset >>>>> system framework or not? >>>>> >>>>> I was thinking: >>>>> 1/ Geert would be the best to say if he considers it OK to handle this >>>>> in Linux >>>> >>>> I agree Geert is the right person for taking SYSTEM decisions, since >>>> the signal is used only during state transitions (Table 41.6.4 AWO to >>>> ALL_ON and 41.6.3 ALL_ON to AWO) >>> >>> One more info, as per [1], this USB PWRRDY signal setting to be before Linux kernel boots. >> >> The "controlled by" column mentions CA-55 on PWRRDY signal control line and it is b/w steps "DDR exits >> from retention mode" and "clock start settings for system bus and peripheral modules". AFAICT, after >> DDR exists retention mode Linux is ready to run. > > DDR retention exit happens in TF-A and it jumps into reset code where it executes BL2 in TF_A. Bl2 checks for warm or cold reset. > If it is warm reset, it sets required minimal clocks/resets and pass the control to linux by calling the > SMC callback handler. Which in turn calls resume(step 11-->14) path. Is this from HW manual or some specific documentation? I'm referring at "resume" == "steps 11-->14" > > Step 8, Cortex-A55 Exit from DDR retention mode (when using) Setting for exiting form DDR retention mode > Step 9, Cortex-A55 USB PHY PWRRDY signal control (if use USB) SYS_USB_PWRRDY > Step 10, Cortex-A55 PCIe RST_RSM_B signal control (if use PCIe) SYS_PCIE_RST_RSM_B Note *if use*: how does the TF-A know if USB/PCIe is used by Linux? The documentation mention to set it *if use*. Same note is on ALL_ON to VBATT transition documentation (namely "if using USB", "if using PCIe"). If TF-A will do this it should set this signals unconditionally. It will not be something wrong though. We don't know at the moment what this involves in terms of power consumption, if it means something... > Step 11, Cortex-A55 Clock start setting for system bus and desired peripheral modules in PD_ISOVCC CPG_CLKON_***ep > (***: GIC600, MHU, SDHI, USB, ETH, DDR, PCI,AXI_COM_BUS, PERI_COM, AXI_TZCDDR, > OTFDE_DDR) > Step 12, Cortex-A55 Release reset setting for system bus and desired peripheral modules in PD_ISOVCC CPG_RST_*** > (***: GIC600, MHU, SDHI, USB, ETH, DDR, PCI, AXI_COM_BUS, PERI_COM, AXI_TZCDDR,OTFDE_DDR) > Step 13, Cortex-A55 Release MSTOP bit for system bus and desired peripheral modules in PD_ISOVCC CPG_BUS_***_MSTOP > (***: ACPU, PERI_COM, PERI_DDR, TZCDDR), > CPG_MHU_MSTOP. > Step14) Cortex-A55 Clock start setting and reset release setting for Cortex-M33_FPU (if use Cortex-M33_FPU) > CPG_CLKON_CM33, CPG_RST_CM33 > > Cheers, > Biju