From patchwork Thu Aug 22 15:27:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773867 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 99D55C3DA4A for ; Thu, 22 Aug 2024 15:54:41 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6q6gFb3LAoTj4ZZDzDA4qjfJDj1sk1ibLpvJ8GBqpwo=; b=g8aHrH/Jtzl0epja4hEXJ5/1Tq UrFAsWJrskKLz2JnglUQra0ssD95R5wTLz5Wk/jd/dYJNkVU8CJBGmEUL7kmUrp+aWWaDyOCLzWKI wdZ5ty/qX46DK6eYhDgYYsTHnV6oIQN/x4kweIGIeNIu1xEYmUCaKumPrR6IfwHt401Gv5DKPvSen fvsBYt+STJ0uWyG5vWJVKhZnTWj1pQRq+ExF8HWh++oABk2R8P8I3s6fSyTqr2IU79pynr4E9OBaW X+Fv7dJjL4PcOtO7Kr3UBRRNWMhnJaRFz8mrxfeqgtXPQZt0swcOxuZYdZ4PDqOYYncWk08Jzsxjn 6oTdajyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA8o-0000000DRLz-3Nzc; Thu, 22 Aug 2024 15:54:26 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jY-0000000DKlK-0l0k for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:21 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a868831216cso129456666b.3 for ; Thu, 22 Aug 2024 08:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340498; x=1724945298; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6q6gFb3LAoTj4ZZDzDA4qjfJDj1sk1ibLpvJ8GBqpwo=; b=hR48U42QgL3Hvqma1TRD/WdQa2357eNUgbVX5dZ3o1E+OKkAWdtcHruCjuj9MnU34/ RDNZGRwZ7X5BwJ+ZvLnaMQgyoZU+wQrZZs3jx08Hd/Jq1Lz2D2+QNl31ovqZCFSXuoyY 3ad05qsiVX2WdaZH0DqjYtew5qkpve500GtakxRVu+zhHIWRGB9M4qZHNqk2cWePhpjw vKp+GzEK3kut7PG2ILqpVSUufwXtDa8X+K1X0hYL+/17yo8kxB90ra1R0UdfH5XHc0tm J9ztOgFJB0w6PVHWp0HlxUip7NGx0wBYtYPYWmrrgM9YcpxeMSdbjStngcOpcAVVVm33 cddg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340498; x=1724945298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6q6gFb3LAoTj4ZZDzDA4qjfJDj1sk1ibLpvJ8GBqpwo=; b=ScwU9lFxSWyJLppQCFiArD19ZAbGTAhyBa5kImJ5Lmvicd9K3ms51zPENmnqx4O7ti 6eFB3CzhB4axLjQQmPordpYO91c26Z4yYH7fLP7eDQ+Q1D1RSypdaW8S0WCpJNYz7/PK 069Ajg1Y7wuv1zgFqWFXvNWQ2FkesXZ28g7Hq/TCFFj3uW3eIW7WqVlKgzEUnbySZ1im igJE3wcYV5o1iVRrWlyzpGqB1yQZnVv5FJ/rJ1L2GPwx+2SgzVbaS3TX5zpxQkfIVCEM 7y3qNaQ85EdkslAJ23PO7RDTx87Pbt2aIK0xL316+wckl3Get9HrxGE0OxRsiGVCq93M 7sEQ== X-Forwarded-Encrypted: i=1; AJvYcCWRbcuRxIxLuBKDMEivSBXDLa2uOdv8X6nL3vPW5lv8MJVpQy3h4qBa+l8e33EYQyiNTCJHw034R9VzCWCPx2F+@lists.infradead.org X-Gm-Message-State: AOJu0YzyNU9F0LKzILYnO5FgegTCwgZUUOk/cMMSzH6VnbYkCVVKHoa9 k1+Wyxy77/sdyhw/2V33d71Ko1CUNNcHRa5cPPxtGPKT7ALw2Ne9CEsbY48wlyg= X-Google-Smtp-Source: AGHT+IFku6GurN1Vx/0hMFrk2Pt1NEf4Luk7IB+yb2dHofGfjXLtTdF78YBKlCcWth7ycyDXumSweA== X-Received: by 2002:a17:907:1b1a:b0:a80:f6a9:c311 with SMTP id a640c23a62f3a-a866ee68e16mr449214366b.0.1724340497897; Thu, 22 Aug 2024 08:28:17 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:17 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 01/16] clk: renesas: r9a08g045: Add clocks, resets and power domains for USB Date: Thu, 22 Aug 2024 18:27:46 +0300 Message-Id: <20240822152801.602318-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082820_256506_9C4FA8D7 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. 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 From: Claudiu Beznea Add clocks, resets and power domains for USB modules available on the Renesas RZ/G3S SoC. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- drivers/clk/renesas/r9a08g045-cpg.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c index a891bfc3ab5a..6e9529678307 100644 --- a/drivers/clk/renesas/r9a08g045-cpg.c +++ b/drivers/clk/renesas/r9a08g045-cpg.c @@ -207,6 +207,10 @@ static const struct rzg2l_mod_clk r9a08g045_mod_clks[] = { DEF_MOD("sdhi2_imclk2", R9A08G045_SDHI2_IMCLK2, CLK_SD2_DIV4, 0x554, 9), DEF_MOD("sdhi2_clk_hs", R9A08G045_SDHI2_CLK_HS, R9A08G045_CLK_SD2, 0x554, 10), DEF_MOD("sdhi2_aclk", R9A08G045_SDHI2_ACLK, R9A08G045_CLK_P1, 0x554, 11), + DEF_MOD("usb0_host", R9A08G045_USB_U2H0_HCLK, R9A08G045_CLK_P1, 0x578, 0), + DEF_MOD("usb1_host", R9A08G045_USB_U2H1_HCLK, R9A08G045_CLK_P1, 0x578, 1), + DEF_MOD("usb0_func", R9A08G045_USB_U2P_EXR_CPUCLK, R9A08G045_CLK_P1, 0x578, 2), + DEF_MOD("usb_pclk", R9A08G045_USB_PCLK, R9A08G045_CLK_P1, 0x578, 3), DEF_COUPLED("eth0_axi", R9A08G045_ETH0_CLK_AXI, R9A08G045_CLK_M0, 0x57c, 0), DEF_COUPLED("eth0_chi", R9A08G045_ETH0_CLK_CHI, R9A08G045_CLK_ZT, 0x57c, 0), DEF_MOD("eth0_refclk", R9A08G045_ETH0_REFCLK, R9A08G045_CLK_HP, 0x57c, 8), @@ -230,6 +234,10 @@ static const struct rzg2l_reset r9a08g045_resets[] = { DEF_RST(R9A08G045_SDHI0_IXRST, 0x854, 0), DEF_RST(R9A08G045_SDHI1_IXRST, 0x854, 1), DEF_RST(R9A08G045_SDHI2_IXRST, 0x854, 2), + DEF_RST(R9A08G045_USB_U2H0_HRESETN, 0x878, 0), + DEF_RST(R9A08G045_USB_U2H1_HRESETN, 0x878, 1), + DEF_RST(R9A08G045_USB_U2P_EXL_SYSRST, 0x878, 2), + DEF_RST(R9A08G045_USB_PRESETN, 0x878, 3), DEF_RST(R9A08G045_ETH0_RST_HW_N, 0x87c, 0), DEF_RST(R9A08G045_ETH1_RST_HW_N, 0x87c, 1), DEF_RST(R9A08G045_I2C0_MRST, 0x880, 0), @@ -277,6 +285,15 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = { DEF_PD("sdhi2", R9A08G045_PD_SDHI2, DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(11)), RZG2L_PD_F_NONE), + DEF_PD("usb0", R9A08G045_PD_USB0, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, GENMASK(6, 5)), + RZG2L_PD_F_NONE), + DEF_PD("usb1", R9A08G045_PD_USB1, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(7)), + RZG2L_PD_F_NONE), + DEF_PD("usb-phy", R9A08G045_PD_USB_PHY, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(4)), + RZG2L_PD_F_NONE), DEF_PD("eth0", R9A08G045_PD_ETHER0, DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(2)), RZG2L_PD_F_NONE), From patchwork Thu Aug 22 15:27:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773868 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 682E8C52D7C for ; Thu, 22 Aug 2024 15:54:42 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T/Tria7vwi+NxmbhPx5iyMMpWnKPFvb0PWDauQE1PU8=; b=k113oTNSnr5Z5FffVwm3ZbmkXw pbHTJXKJQH4Thctu+GPokaPJkhm9XEbcUg6fGnGEEftH+b7qFoxd4SA309bIsOO5rKIQFLrJt716M RcywGPkYPF7udsP1n+w/36471Be0GjPXWTgAOv4f5KYHZkciLBT8ETzOz8sdZ81o2MVCb6+KnLz3Y 0RYq/vERqOvwvd0nyNPUGgsIn7TTmj9BGS+8laikkd44NVPPIxBdQrB8lGY/anUwSfdeIYBk7QGN8 /j8E1tjTVrESI338lEcff8GzuN/St5q7VJmpV7sB+zSu3jBe4nV9Dj2L4pcLD0XAC3Q298MraiWC+ 8PViOZUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA8r-0000000DROg-2NIF; Thu, 22 Aug 2024 15:54:29 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9ja-0000000DKmI-1CHZ for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:23 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a86910caf9cso142222766b.1 for ; Thu, 22 Aug 2024 08:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340500; x=1724945300; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T/Tria7vwi+NxmbhPx5iyMMpWnKPFvb0PWDauQE1PU8=; b=lOpnpIzs1eMD3kGK3vsNhmR1yAt28F/ZbVq4+ydEFn8JAc8zFZhJnkMwtkWf404RzV 1QTarSLoPrtcSS8Z4TLHBmz8NJ2piOIgptPkyyfJ8VTO9o3wRP+/6kf4x/tM1ko4fLsR clRxo6MiQpJykMceoSXQsIlRfYjRrJnl73ofEXspPx6l9FRSY5vL0p7Ke4rbHaJG9vk5 9tkwgoPMcfuryedFOKqbH83GW5oqyl9Y4bMc46rmJzT5MZDkEfJTWxqwub2lC/Y6axzL YX8ji0QfTqJ9RruvuBdXQsIvgfqYynXsk2rWutfZKVQiEa34qZ0a0C44SJ+FYCx5v/aP 9Lug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340500; x=1724945300; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T/Tria7vwi+NxmbhPx5iyMMpWnKPFvb0PWDauQE1PU8=; b=mUSCVG2amg+1AgYFgZUNAStQsI6rubjCCXBAB4gUCQhGF/JLPabzvWIDhAAc0Gu1A6 e2kNgPS55o1oxbTDUj33ifVbgSGrTw1MoIN8HiIpOiEgqWfs+4NPFI1b5t2ezrTZLA14 SZrF3Ifo8cxaR5v7Ee/TJiXhusZ/LvS7wOpeGDG8fet4rq3lrrLoZbdTXQPlm6JJwmts cd4qyZ8rSvRPfOJGD8Kn1lri3aY0X4WwDU+gR1iUus5uKLkfwoVxoNtb7XeMu/B4u8KQ qO6fHqnQJ9JfwTyP6VeLxuscluIhRxcZkKjVeN+K7dIESIlZsf8WWcGaFaiR/+WfKkva /sIw== X-Forwarded-Encrypted: i=1; AJvYcCWO2AUl4bPDOWSdE+b3X8a4lVXGJYs3y1/fMseBdcwmC9xStCkje54wWpWdMM4wi/lYtS8rut2vj0uawMezVSeZ@lists.infradead.org X-Gm-Message-State: AOJu0YygYnmkRwxVS+OC51KLvyGc1SuzhJyP5+5OD1cREJqXQX1UnAEc mWEZ9SYDJAMsdCtnkCU7XgwDg9HlR9ERIg6JzTcij5ve67RwpzH9m8F9/0gB76o= X-Google-Smtp-Source: AGHT+IEDGiFS9rTl2gT4mpF+7WDWt9rKV3W2mQ9PNVf1k+OndljloE3v+2XJ/Wih9mrH3Tadrpyqjw== X-Received: by 2002:a17:907:9307:b0:a7a:a4cf:4f93 with SMTP id a640c23a62f3a-a868a97d6f2mr322799366b.32.1724340499945; Thu, 22 Aug 2024 08:28:19 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:19 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 02/16] dt-bindings: soc: renesas: renesas,rzg2l-sysc: Add #reset-cells for RZ/G3S Date: Thu, 22 Aug 2024 18:27:47 +0300 Message-Id: <20240822152801.602318-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082822_330375_501CDDC8 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. 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 From: Claudiu Beznea The RZ/G3S System controller has registers to control signals that need to be de-asserted/asserted before/after different SoC areas are power on/off. This signals are implemented as reset signals. For this document the #reset-cells property. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- .../bindings/soc/renesas/renesas,rzg2l-sysc.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.yaml b/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.yaml index 4386b2c3fa4d..6b0bb34485d9 100644 --- a/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.yaml +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.yaml @@ -42,12 +42,28 @@ properties: - const: cm33stbyr_int - const: ca55_deny + "#reset-cells": + const: 1 + required: - compatible - reg additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: renesas,r9a08g045-sysc + then: + required: + - "#reset-cells" + else: + properties: + "#reset-cells": false + examples: - | #include From patchwork Thu Aug 22 15:27:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773869 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 1E319C52D7C for ; Thu, 22 Aug 2024 15:54:45 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3txPUwxmR4fX7LzFPWhcfk9alhQ/U1SsqoBALbg0+o8=; b=LaJGm7+6b3vVoESri5y3jK9s7S E5fIEjdHBLlcusCqVtBGL5QbiwMfzqmip4ltilOcsKqOSd+csGIjX7qzhe4ugg8ds/Qdmzf6s39ns 45yI+bWC+m+vX0x85CymT7BxrBMAIJyeWNt6vUwuHcmHG6t4HV5E0MCpCUYfC+FLy7dieymj/ZwKe TE2W0joAoevZXqGD+2o0z7MKUYlKrephMiJgNp+LEpqfLcLORxlAitHPbd+U22Bq+ilVFlJFYPAvk aYQaR/DWDuS+TLg9hEEWFVfCOeMMzP1Fx8+TjK4U1yL/y7Kcotu0xLC2PH52b8B6VdVjmnPu/VPH3 VUbsqIYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA8t-0000000DRQV-1e0e; Thu, 22 Aug 2024 15:54:31 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jb-0000000DKn0-2JeT for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:24 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a7a81bd549eso91743566b.3 for ; Thu, 22 Aug 2024 08:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340502; x=1724945302; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3txPUwxmR4fX7LzFPWhcfk9alhQ/U1SsqoBALbg0+o8=; b=KhW8EQLavCxw3eyYppbjTTVCOUY1SMWJJ9eHlr+O/UO4bTwbMwSubJmxJwAZFeCEZp C9dImcq18a9arwEabV2WZYMIGCvFZDJ1h49CFsgQsgLTjJbRRgstzWcb6Hrdf8XxWEmV mdtwHfJKigl52iits2tmCj6D6n+w2hvBcMGuKB4dfgwsAzJZMwXhvBElerjcruiaKEv5 5Lc8lmQEHqJmvC5cJAmEs7tVKwNpABwJDnXvcEAtHgluZGgfEgshzngxuvH9FZDkHxkD Mpt/VLOEEERXSFSNwaVfgWoWYrC+4KEs+FmrqByOwHtTcMz8rGtHKcicBv9n6B5mCMKB yb1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340502; x=1724945302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3txPUwxmR4fX7LzFPWhcfk9alhQ/U1SsqoBALbg0+o8=; b=GFhLh2MpL0268fvSu2QAt/MIVpNGLWqncnNFWwiY//LzyHLuTPkgnSsOyAGSFgsc0s U7uNT2TaKn+ObB9SKjIGsrVntUWxpYm2ksLZpuLcDyufM/JAVvvLLonLPzJt23LnsNzy kOG0wZeyCjXymibjPW4TlerX5MilIO5Psrv3TCvGF7jPnvSgwrHq+k/D+5vriZypfB9u hvthYp4Vceab1wzDK2eA65C/CPe13CHyL0dUcQtrUs+aVG9n6Asa8cpzADp1fHajLR7O UCG0/fd1v+635VIRxGict0EAfL3cO616piDmBv8VdIStwtti+Kgn+Cg5xBCzu5tYAlh6 atYA== X-Forwarded-Encrypted: i=1; AJvYcCXcnNvKWxdOfIDJ6SjnKZcZ1IjkpCNU4LPUKhEBKVptC1ApQxxsjOYH/Nmcmw9agn8QWRFUHrmG9bIQQT+9/pDk@lists.infradead.org X-Gm-Message-State: AOJu0YzQO3vsgObWQv/ZgCNAWEXkcBnaMN4ixRWRp0eoy+CyYIuM4QEk iudPiIIozfg6gOjMAagn9mprVCEoHkgPvI6Wp5iZoqo1LCeOJ9V2zbdt5wjOEEo= X-Google-Smtp-Source: AGHT+IGwmGUufY0I/wXnuKumGBXx6MTOJSx969Oopy4E3RE8Z417JclZShJ68eMp0wCAWKbVhUr4SA== X-Received: by 2002:a17:907:efd2:b0:a86:3c01:cf08 with SMTP id a640c23a62f3a-a866f705025mr477276566b.47.1724340502213; Thu, 22 Aug 2024 08:28:22 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:21 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 03/16] dt-bindings: reset: renesas,r9a08g045-sysc: Add reset IDs for RZ/G3S SYSC reset Date: Thu, 22 Aug 2024 18:27:48 +0300 Message-Id: <20240822152801.602318-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082823_623175_667DC3D5 X-CRM114-Status: GOOD ( 12.06 ) 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 From: Claudiu Beznea Add reset IDs for the Renesas RZ/G3S SYSC reset controller driver. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- include/dt-bindings/reset/renesas,r9a08g045-sysc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 include/dt-bindings/reset/renesas,r9a08g045-sysc.h diff --git a/include/dt-bindings/reset/renesas,r9a08g045-sysc.h b/include/dt-bindings/reset/renesas,r9a08g045-sysc.h new file mode 100644 index 000000000000..675872a32121 --- /dev/null +++ b/include/dt-bindings/reset/renesas,r9a08g045-sysc.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ + +#ifndef __DT_BINDINGS_RESET_R9A08G045_SYSC_H +#define __DT_BINDINGS_RESET_R9A08G045_SYSC_H + +#define R9A08G045_SYSC_RESET_USB 0 +#define R9A08G045_SYSC_RESET_PCIE 1 + +#endif /* __DT_BINDINGS_RESET_SAMA7G5_H */ + From patchwork Thu Aug 22 15:27:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773870 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 D4764C52D7C for ; Thu, 22 Aug 2024 15:54:51 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+9DOBqvnZ/STjSdrebzztVFaplbBr0hBrOhxjpVMxCw=; b=nWeuawtDCWsdfbf825x7iBbj8q Hm5hTjLLpQEmHvGS55k+hg3gzxdNLVRqZECqzAZDv6uYDR1jp1/3+gI1uxguOw/l+1ysqKB7YSzsg q6NPGwxU0QNg1fLKlZ2PdLVj46xVKXX+wK9QLByPPeuhSJEfJ8yc/95mQEo8eXXNNOutc6ICt8Asn zTD/TFvEXuiUl0WPf3TD1+JYDWSEihQyYeXkS6w7Y+N+WnySW+3rLcNAV7vfCPQYvCLcysOvSjAL4 w/tZZlSzytRpxEhX+skourmjw4OjwDKJxkGIoH9YM3Rdnijf/puMsIEZKZQXBADtMAmAsraCSsg4U iFrYXDbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA90-0000000DRWm-2qwf; Thu, 22 Aug 2024 15:54:38 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9je-0000000DKno-1zxE for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:27 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a8684c31c60so121134966b.3 for ; Thu, 22 Aug 2024 08:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340504; x=1724945304; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+9DOBqvnZ/STjSdrebzztVFaplbBr0hBrOhxjpVMxCw=; b=AaxbVr81B/oBz2JLcg+2YJMBcWQhYcN0sggoW0UTXmLAD4PVgxuzBOtAaVBpLr9sDO BLqYkrZGr/+Er+3Syr2bqodmvKU8a+wVf+TzL2XB1EXA/DqXPwIRPSKNp7eaPzrbRo1q rjJ31lNo2MUJdyIQaCADMQyeG90KuqmRihLsw5BwiVQ8h8GS9r+Z2dno6ITO2M6KgTLJ Z+qeosO1lPYsIXcqOkq8vTVrhYLMn7EX0udJo+grdRm7DaWQhoCtDu1t/qqb1UpVWFsK JkM9AjfYKswRXdyr1mlFKc4hNGTDMnpFlW5ozquwKxZ3Coq0/CRaKJv75nCRZafxclfz F3iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340504; x=1724945304; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+9DOBqvnZ/STjSdrebzztVFaplbBr0hBrOhxjpVMxCw=; b=GxK9xFdgJTA+YsCdqrTLENb1JkGlT11Cjd75rv4zHS611luhbFS6Gklm4VVP7K7F59 nm/6rY+BuOG8fnQwG+1xCF0tL3CCe7ocD2YHuhm128TfBwK+VGpWzuntazkrs+mRzgIp makCCYohJTKdFIbhmjm86RhKEr3NUgg+1Fj4/y/uYNG+JKlOWgV2ghVGZLgV9vP+CprY cGv/ce//ALmRgqMSBfuldluO/UKjf1gebDdBUeQ43sAnm9edUO907uCAYOjZ9xzOahtp 8VaSV7VboGzUEtHifpz1lsdeYd91v7SJFeVoxN09uinYLCQM2MCzbRP9SHqC5QO3g7cy K+3w== X-Forwarded-Encrypted: i=1; AJvYcCVRz4Wyba5kriHg+BHBEN7+Coub25JkxAgSopzb/ETWtV572qOfKcotyryTFiDeJnXmAZhW6PZDA6ccR04rvTyC@lists.infradead.org X-Gm-Message-State: AOJu0YxM5C8YdUZtXmiSxyx69O5iEVQ7zj3Isp93UvqPWbLIVVn5rvD8 MFZ9gNJnwDGO29Px04Y//EBuSszTNXgBDynt4HXuSvrm4mClCoLHmL9uiHQnjc8= X-Google-Smtp-Source: AGHT+IFlSIRkRZTOFLNyPatfUw5Y174bZy9lMxma4FnpCObFSnO03fmX9lo7w0eBmJXtveDmWb0cnA== X-Received: by 2002:a17:907:7f25:b0:a7a:b561:3564 with SMTP id a640c23a62f3a-a8691cb98f9mr188865766b.61.1724340504353; Thu, 22 Aug 2024 08:28:24 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:23 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 04/16] soc: renesas: Add SYSC driver for Renesas RZ/G3S Date: Thu, 22 Aug 2024 18:27:49 +0300 Message-Id: <20240822152801.602318-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082826_534648_2C28A021 X-CRM114-Status: GOOD ( 31.91 ) 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 From: Claudiu Beznea The RZ/G3S SYS Controller has 2 registers (one for PCIE one for USB) that need to be configured before/after powering off/on the PCI or USB ares. The bits in these registers control signals to PCIE and USB that need to be de-asserted/asserted after/before power on/off event. For this add SYSC controller driver that registers a reset controller driver on auxiliary bus which allows USB, PCIE drivers to control these signals. Signed-off-by: Claudiu Beznea --- Hi, Philipp, Ulf, Geert, all, In this series the control of USB and PCIE signals was implemented though a reset control driver. This approach was chosen as a result of looking though the HW manual and trying to understand how these signals behave. HW manual can be downloaded from [1] (download manual hardware button -> confirm -> extract archive -> Deliverables -> r01uh1014ej0110-rzg3s.pdf). The description of the USB and PCIE control registers is as follows: SYS_USB_PWRRDY Register (Signal is called PWRRDY), Chapter 6.3.83: Controls PWRRDY terminal of USB: 0: PWRRDY 1: PWRRDY down When turning off the USB region power, set this bit to 1. When turning on the USB region power, set this bit to 0. SYS_PCIE_RST_RSM_B (Signal is called RST_RSM_B), Chapter 6.3.84: Controls RST_RSM_B terminal of PCIe 0: RST_RSM_B=0 1: RST_RSM_B=1 Set RST_RSM_B=1 after PCIe power is applied. When the power in the PCIe region is turned off, set RST_RSM_B=0 before turning off the power supply. From this description I understood that the control of the USB PWRRDY, PCIE RST_RSM_B signals and the power control for the domains the USB, PCI belongs are different things [A]. As of Figure 41.1 (Power Domain and Power Supply) and Table 41.1 (Power Domain to which Power Supply Pins Belong) the USB and PCIE belongs to PD_ISOVCC power domain controlled though PMIC [B]. The USB, PCI signals are also reference in HW manual in the low power consumption chapter describing the transition to different power modes. E.g., chapter 41.6.1 (ALL_ON to VBATT), Table 41.8 (Example Transition Flow Outline from ALL_ON Mode to VBATT Mode) says at steps 6 and 7: 6. USB PHY PWRRDY signal control (if using USB) SYS_USB_PWRRDY 7. PCIe RST_RSM_B signal control (if using PCIe) SYS_PCIE_RST_RSM_B Meaning these signals need to be controlled before going to VBATT power mode (where the power supply to USB is turned off) [C]. Due to [A], [B] and [C] I chosed to have the implementation of these signals though a reset control driver. Other option I explored was though power domains as follows: 1/ registering one domain for USB, one of PCIE 2/ passed the domain ID to USB though device tree 3/ attach from USB PHY control driver to the USB power domain with dev_pm_domain_attach_by_name() 4/ and controlling the SYSC registers with pm_runtime_resume_and_get(usb_sysc_domain). Please let me know what do you think about this! Thank you, Claudiu Beznea [1] https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzg3s-general-purpose-microprocessors-single-core-arm-cortex-a55-11-ghz-cpu-and-dual-core-cortex-m33-250 drivers/reset/Kconfig | 7 + drivers/reset/Makefile | 1 + drivers/reset/reset-rzg3s-sysc.c | 140 +++++++++++++++++++ drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/rzg3s-sysc.c | 113 +++++++++++++++ include/linux/soc/renesas/rzg3s-sysc-reset.h | 24 ++++ 6 files changed, 286 insertions(+) create mode 100644 drivers/reset/reset-rzg3s-sysc.c create mode 100644 drivers/soc/renesas/rzg3s-sysc.c create mode 100644 include/linux/soc/renesas/rzg3s-sysc-reset.h diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 67bce340a87e..fbdf860b2293 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -218,6 +218,13 @@ config RESET_RZG2L_USBPHY_CTRL Support for USBPHY Control found on RZ/G2L family. It mainly controls reset and power down of the USB/PHY. +config RESET_RZG3S_SYSC + tristate "Renesas RZ/G3S SYSC reset driver" + depends on ARCH_R9A08G045 || COMPILE_TEST + help + Support for SYSC reset found on RZ/G3S family. It mainly + controls reset on USB and PCIE. + config RESET_SCMI tristate "Reset driver controlled via ARM SCMI interface" depends on ARM_SCMI_PROTOCOL || COMPILE_TEST diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index 27b0bbdfcc04..ee5ca21acc44 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -30,6 +30,7 @@ obj-$(CONFIG_RESET_QCOM_AOSS) += reset-qcom-aoss.o obj-$(CONFIG_RESET_QCOM_PDC) += reset-qcom-pdc.o obj-$(CONFIG_RESET_RASPBERRYPI) += reset-raspberrypi.o obj-$(CONFIG_RESET_RZG2L_USBPHY_CTRL) += reset-rzg2l-usbphy-ctrl.o +obj-$(CONFIG_RESET_RZG3S_SYSC) += reset-rzg3s-sysc.o obj-$(CONFIG_RESET_SCMI) += reset-scmi.o obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o diff --git a/drivers/reset/reset-rzg3s-sysc.c b/drivers/reset/reset-rzg3s-sysc.c new file mode 100644 index 000000000000..56af03f1d8a2 --- /dev/null +++ b/drivers/reset/reset-rzg3s-sysc.c @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Renesas RZ/G3S SYSC reset driver + * + * Copyright (C) 2024 Renesas Electronics Corp. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#define RZG3S_SYSC_USB_PWRRDY 0xd70 +#define RZG3S_SYSC_PCIE_RST_RSM_B 0xd74 +#define RZG3S_SYSC_RESET_MASK 0x1 + +/** + * struct rzg3s_sysc_reset_info - SYSC reset information + * @offset: offset to configure the reset + * @assert_val: value to write to register on assert + * @deassert_val: value to write to register on de-assert + */ +struct rzg3s_sysc_reset_info { + u16 offset; + u8 assert_val; + u8 deassert_val; +}; + +/** + * struct rzg3s_sysc_reset - SYSC reset + * @info: SYSC reset information + * @radev: SYSC reset auxiliary device + * @rcdev: reset controller device + */ +struct rzg3s_sysc_reset { + const struct rzg3s_sysc_reset_info *info; + struct rzg3s_sysc_reset_adev *radev; + struct reset_controller_dev rcdev; +}; + +#define to_rzg3s_sysc_reset(r) container_of(r, struct rzg3s_sysc_reset, rcdev) + +static int rzg3s_sysc_reset_set(struct reset_controller_dev *rcdev, + unsigned long id, bool assert) +{ + struct rzg3s_sysc_reset *reset = to_rzg3s_sysc_reset(rcdev); + struct rzg3s_sysc_reset_adev *radev = reset->radev; + struct rzg3s_sysc_reset_info info = reset->info[id]; + unsigned long flags; + u32 tmp; + + spin_lock_irqsave(radev->lock, flags); + tmp = readl(radev->base + info.offset); + tmp &= ~RZG3S_SYSC_RESET_MASK; + tmp |= assert ? info.assert_val : info.deassert_val; + writel(tmp, radev->base + info.offset); + spin_unlock_irqrestore(radev->lock, flags); + + return 0; +} + +static int rzg3s_sysc_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + return rzg3s_sysc_reset_set(rcdev, id, true); +} + +static int rzg3s_sysc_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + return rzg3s_sysc_reset_set(rcdev, id, false); +} + +static int rzg3s_sysc_reset_status(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct rzg3s_sysc_reset *reset = to_rzg3s_sysc_reset(rcdev); + const struct rzg3s_sysc_reset_info info = reset->info[id]; + struct rzg3s_sysc_reset_adev *radev = reset->radev; + u32 tmp; + + tmp = readl(radev->base + info.offset); + tmp = !!(tmp & RZG3S_SYSC_RESET_MASK); + + return info.assert_val ? tmp : !tmp; +} + +static const struct reset_control_ops rzg3s_sysc_reset_ops = { + .assert = rzg3s_sysc_reset_assert, + .deassert = rzg3s_sysc_reset_deassert, + .status = rzg3s_sysc_reset_status, +}; + +static const struct rzg3s_sysc_reset_info rzg3s_sysc_reset_info[] = { + [R9A08G045_SYSC_RESET_USB] = { + .offset = RZG3S_SYSC_USB_PWRRDY, .assert_val = 1, .deassert_val = 0 + }, + [R9A08G045_SYSC_RESET_PCIE] = { + .offset = RZG3S_SYSC_PCIE_RST_RSM_B, .assert_val = 0, .deassert_val = 1 + }, +}; + +static int rzg3s_sysc_reset_probe(struct auxiliary_device *adev, + const struct auxiliary_device_id *id) +{ + struct rzg3s_sysc_reset_adev *reset_adev = to_rzg3s_sysc_reset_adev(adev); + struct device *dev = &adev->dev; + struct rzg3s_sysc_reset *reset; + + reset = devm_kzalloc(dev, sizeof(*reset), GFP_KERNEL); + if (!reset) + return -ENOMEM; + + reset->radev = reset_adev; + reset->info = rzg3s_sysc_reset_info; + + reset->rcdev.ops = &rzg3s_sysc_reset_ops; + reset->rcdev.of_reset_n_cells = 1; + reset->rcdev.nr_resets = ARRAY_SIZE(rzg3s_sysc_reset_info); + reset->rcdev.of_node = dev->parent->of_node; + reset->rcdev.dev = dev; + + return devm_reset_controller_register(dev, &reset->rcdev); +} + +static const struct auxiliary_device_id rzg3s_sysc_reset_ids[] = { + { .name = "rzg3s_sysc.reset" }, + { } +}; +MODULE_DEVICE_TABLE(auxiliary, rzg3s_sysc_reset_ids); + +static struct auxiliary_driver rzg3s_sysc_reset_driver = { + .probe = rzg3s_sysc_reset_probe, + .id_table = rzg3s_sysc_reset_ids, +}; +module_auxiliary_driver(rzg3s_sysc_reset_driver); diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile index 734f8f8cefa4..74c72ac46f91 100644 --- a/drivers/soc/renesas/Makefile +++ b/drivers/soc/renesas/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_SOC_RENESAS) += renesas-soc.o ifdef CONFIG_SMP obj-$(CONFIG_ARCH_R9A06G032) += r9a06g032-smp.o endif +obj-$(CONFIG_ARCH_R9A08G045) += rzg3s-sysc.o # Family obj-$(CONFIG_PWC_RZV2M) += pwc-rzv2m.o diff --git a/drivers/soc/renesas/rzg3s-sysc.c b/drivers/soc/renesas/rzg3s-sysc.c new file mode 100644 index 000000000000..e664d29ce5c3 --- /dev/null +++ b/drivers/soc/renesas/rzg3s-sysc.c @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * RZ/G3S System controller driver + * + * Copyright (C) 2024 Renesas Electronics Corp. + */ + +#include +#include + +#include + +/** + * struct rzg3s_sysc - SYSC private data structure + * @base: base address + * @dev: device + * @lock: lock + */ +struct rzg3s_sysc { + void __iomem *base; + struct device *dev; + spinlock_t lock; +}; + +static void rzg3s_sysc_reset_adev_release(struct device *dev) +{ + struct auxiliary_device *adev = to_auxiliary_dev(dev); + struct rzg3s_sysc_reset_adev *reset_adev = to_rzg3s_sysc_reset_adev(adev); + + kfree(reset_adev); +} + +static void rzg3s_sysc_reset_unregister_adev(void *adev) +{ + auxiliary_device_delete(adev); + auxiliary_device_uninit(adev); +} + +static int rzg3s_sysc_reset_probe(struct rzg3s_sysc *sysc, const char *adev_name, + u32 adev_id) +{ + struct rzg3s_sysc_reset_adev *radev; + struct auxiliary_device *adev; + int ret; + + radev = kzalloc(sizeof(*radev), GFP_KERNEL); + if (!radev) + return -ENOMEM; + + radev->base = sysc->base; + radev->lock = &sysc->lock; + + adev = &radev->adev; + adev->name = adev_name; + adev->dev.parent = sysc->dev; + adev->dev.release = rzg3s_sysc_reset_adev_release; + adev->id = adev_id; + + ret = auxiliary_device_init(adev); + if (ret) + return ret; + + ret = auxiliary_device_add(adev); + if (ret) { + auxiliary_device_uninit(adev); + return ret; + } + + return devm_add_action_or_reset(sysc->dev, rzg3s_sysc_reset_unregister_adev, adev); +} + +static int rzg3s_sysc_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct rzg3s_sysc *sysc; + + sysc = devm_kzalloc(dev, sizeof(*sysc), GFP_KERNEL); + if (!sysc) + return -ENOMEM; + + sysc->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(sysc->base)) + return PTR_ERR(sysc->base); + + sysc->dev = dev; + spin_lock_init(&sysc->lock); + + return rzg3s_sysc_reset_probe(sysc, "reset", 0); +} + +static const struct of_device_id rzg3s_sysc_match[] = { + { .compatible = "renesas,r9a08g045-sysc" }, + { } +}; +MODULE_DEVICE_TABLE(of, rzg3s_sysc_match); + +static struct platform_driver rzg3s_sysc_driver = { + .driver = { + .name = "renesas-rzg3s-sysc", + .of_match_table = rzg3s_sysc_match + }, + .probe = rzg3s_sysc_probe +}; + +static int __init rzg3s_sysc_init(void) +{ + return platform_driver_register(&rzg3s_sysc_driver); +} +subsys_initcall(rzg3s_sysc_init); + +MODULE_DESCRIPTION("Renesas RZ/G3S System Controller Driver"); +MODULE_AUTHOR("Claudiu Beznea "); +MODULE_LICENSE("GPL"); diff --git a/include/linux/soc/renesas/rzg3s-sysc-reset.h b/include/linux/soc/renesas/rzg3s-sysc-reset.h new file mode 100644 index 000000000000..813cbe82a68a --- /dev/null +++ b/include/linux/soc/renesas/rzg3s-sysc-reset.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __SOC_RENESAS_SYSC_RESET_RZG3S_H +#define __SOC_RENESAS_SYSC_RESET_RZG3S_H + +#include +#include +#include + +/** + * struct rzg3s_sysc_reset_adev - SYSC reset auxiliary device + * @base: base address + * @lock: lock + * @adev: auxiliary device + */ +struct rzg3s_sysc_reset_adev { + void __iomem *base; + spinlock_t *lock; + struct auxiliary_device adev; +}; + +#define to_rzg3s_sysc_reset_adev(a) container_of(a, struct rzg3s_sysc_reset_adev, adev) + +#endif From patchwork Thu Aug 22 15:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773871 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 580B5C3DA4A for ; Thu, 22 Aug 2024 15:55:00 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZgJzIoJ7odKtUR1tmJxpafPTYpDoiiIktLX51hzayU4=; b=Vi2OzcPaKZPkCmW7DyWo3Tigc/ E7e+MIrvU4B2hqmgbYsz1Q88K+ACH1QastcXfpXtizZwK0oQwDfBthyO2GBddkvOAutXTdS3tdmXN gqJuXt2sdKh4Lgd0FDt386PTFLgMLhQ6rIf0KtmoDipTPtdjZ/dEPP5kXZPplfP4Nt33CEmcV3GoT 9H3NaR3mRZByZfJZrvFKnEmUSdBaK+v0dJzTDr5fzWKrpk8W71b2pIY0dPB/R8iuwDZ0ht5cVX93g nqDbP/95jRsrCzCKqPdrS/rOC7d8D4hvFd4eCAaK+4F773+UDEqz7loJvFIRS0YRQXspHel9eovQ3 Sjl6sH1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA96-0000000DRdX-3n1r; Thu, 22 Aug 2024 15:54:44 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jg-0000000DKoT-1nhC for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:29 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5bed83488b3so1412856a12.0 for ; Thu, 22 Aug 2024 08:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340506; x=1724945306; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZgJzIoJ7odKtUR1tmJxpafPTYpDoiiIktLX51hzayU4=; b=CesydzBRhCsY/v5gMT5YNHo6vzba3JaknV0xV6loFNgeDcWTzKHrP5/BU+9+j6kUms 7MGLiiicDKKzQRn0h5NnhjJemank69sMajg8P+myPqaYYInn3pk/wr4ebS6rv8UTfcja I+lEK3WMg1exT+pJhHWRXwioYtFNhXjKkAJKNsZY/ZlHHONdwInXHQKuvpB11XprRlCW Z6nzM0mLAVrC5NKBKF38YpUgvoEkH9eXpXm2Oa+4yYZK7dgzaLZvWuJV6W4BYHPsiOs7 W7YsFpHtYIVFxkxdchhCgDDWccK6Km8q70mFU6FlDTW3i/Rb8BVQQW9CqE3tSQxf1hp8 RnVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340506; x=1724945306; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZgJzIoJ7odKtUR1tmJxpafPTYpDoiiIktLX51hzayU4=; b=oS20Gk+V8ftql+JR0H1uMBN2LNk65oxq225uk+PWQFNfIyL6MNkh9/4zw4hx/6MJjy mKU/b2blP5oQR845rpgmcrHNhWfZw1CMubSWdesNr7LNBRa3KUTn86g7Z8XnGJSiDIuh Le1afnHRRIQWDqfQwt2FEVQM0iiiE4wof7ruP1BJB3Wyg4GuvC/6wHPbgm/6AufAZ9EY LZiSlV5GZ5fHb/ckAB1Uz2E7T1tbHqpia52ewo8sVQInX9D5ne9pLQLMT8szCyFc+6uN 0UhwfNEEDkzf93+Hs+o3F5UkB/AssHQbvNrmLs25wn5/CI6iiFcVsEBgZQkCd6c434Oy Ey+A== X-Forwarded-Encrypted: i=1; AJvYcCWMoI8rOuPhKaiKyoknMukUYOWKsEkgleyTKHPV3wPgMIi1h1LDp46jUJX7lEUvyxciP9EFk4LfxWGFR1mG1qPW@lists.infradead.org X-Gm-Message-State: AOJu0YxbPeLaDMLEPTwHGCNMtH04haBhPQGcLOnml8i5iEvEOJYKrCoU EHqJjA+jI5ym0beM2YVYkxPWyhSsQ+0JKY0kWP1IArMr90xJ4TgwggNU3iRp6y8= X-Google-Smtp-Source: AGHT+IFeGPZpt21jhTv4W0bfHajPG9OGuBMYaiwjLe2EM/CfoluWSL4gm6uew0mp9CeRcXzWktBU8w== X-Received: by 2002:a17:907:9688:b0:a86:7a23:1292 with SMTP id a640c23a62f3a-a867a23275amr475672566b.66.1724340506359; Thu, 22 Aug 2024 08:28:26 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:25 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 05/16] soc: renesas: sysc: Move RZ/G3S SoC detection on SYSC driver Date: Thu, 22 Aug 2024 18:27:50 +0300 Message-Id: <20240822152801.602318-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082828_502755_2261B2A5 X-CRM114-Status: GOOD ( 15.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 From: Claudiu Beznea Now that we have a driver for SYSC driver for RZ/G3S move the SoC detection for RZ/G3S in SYSC driver. Signed-off-by: Claudiu Beznea --- drivers/soc/renesas/renesas-soc.c | 12 --------- drivers/soc/renesas/rzg3s-sysc.c | 45 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c index 172d59e6fbcf..425d9037dcd0 100644 --- a/drivers/soc/renesas/renesas-soc.c +++ b/drivers/soc/renesas/renesas-soc.c @@ -71,10 +71,6 @@ static const struct renesas_family fam_rzg2ul __initconst __maybe_unused = { .name = "RZ/G2UL", }; -static const struct renesas_family fam_rzg3s __initconst __maybe_unused = { - .name = "RZ/G3S", -}; - static const struct renesas_family fam_rzv2h __initconst __maybe_unused = { .name = "RZ/V2H", }; @@ -176,11 +172,6 @@ static const struct renesas_soc soc_rz_g2ul __initconst __maybe_unused = { .id = 0x8450447, }; -static const struct renesas_soc soc_rz_g3s __initconst __maybe_unused = { - .family = &fam_rzg3s, - .id = 0x85e0447, -}; - static const struct renesas_soc soc_rz_v2h __initconst __maybe_unused = { .family = &fam_rzv2h, .id = 0x847a447, @@ -410,9 +401,6 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { #ifdef CONFIG_ARCH_R9A07G054 { .compatible = "renesas,r9a07g054", .data = &soc_rz_v2l }, #endif -#ifdef CONFIG_ARCH_R9A08G045 - { .compatible = "renesas,r9a08g045", .data = &soc_rz_g3s }, -#endif #ifdef CONFIG_ARCH_R9A09G011 { .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m }, #endif diff --git a/drivers/soc/renesas/rzg3s-sysc.c b/drivers/soc/renesas/rzg3s-sysc.c index e664d29ce5c3..1dd48c7255d1 100644 --- a/drivers/soc/renesas/rzg3s-sysc.c +++ b/drivers/soc/renesas/rzg3s-sysc.c @@ -6,10 +6,16 @@ */ #include +#include +#include #include +#include #include +#define RZG3S_SYS_LSI_DEVID 0xa04 +#define RZG3S_SYS_LSI_DEVID_REV GENMASK(31, 28) + /** * struct rzg3s_sysc - SYSC private data structure * @base: base address @@ -71,8 +77,14 @@ static int rzg3s_sysc_reset_probe(struct rzg3s_sysc *sysc, const char *adev_name static int rzg3s_sysc_probe(struct platform_device *pdev) { + const char *soc_id_start, *soc_id_end, *compatible; + struct soc_device_attribute *soc_dev_attr; struct device *dev = &pdev->dev; + struct soc_device *soc_dev; struct rzg3s_sysc *sysc; + char soc_id[32] = {0}; + u32 devid, revision; + u8 size; sysc = devm_kzalloc(dev, sizeof(*sysc), GFP_KERNEL); if (!sysc) @@ -85,6 +97,39 @@ static int rzg3s_sysc_probe(struct platform_device *pdev) sysc->dev = dev; spin_lock_init(&sysc->lock); + compatible = of_get_property(dev->of_node, "compatible", NULL); + if (!compatible) + return -ENODEV; + + soc_id_start = strchr(compatible, ',') + 1; + soc_id_end = strchr(compatible, '-'); + size = soc_id_end - soc_id_start; + if (size > 32) + size = 32; + strscpy(soc_id, soc_id_start, size); + + soc_dev_attr = devm_kzalloc(dev, sizeof(*soc_dev_attr), GFP_KERNEL); + if (!soc_dev_attr) + return -ENOMEM; + + soc_dev_attr->family = "RZ/G3S"; + soc_dev_attr->soc_id = devm_kstrdup(dev, soc_id, GFP_KERNEL); + if (!soc_dev_attr->soc_id) + return -ENOMEM; + + devid = readl(sysc->base + RZG3S_SYS_LSI_DEVID); + revision = FIELD_GET(RZG3S_SYS_LSI_DEVID_REV, devid); + soc_dev_attr->revision = devm_kasprintf(dev, GFP_KERNEL, "%u", revision); + if (!soc_dev_attr->revision) + return -ENOMEM; + + dev_info(dev, "Detected Renesas %s %s Rev %s\n", soc_dev_attr->family, + soc_dev_attr->soc_id, soc_dev_attr->revision); + + soc_dev = soc_device_register(soc_dev_attr); + if (IS_ERR(soc_dev)) + return PTR_ERR(soc_dev); + return rzg3s_sysc_reset_probe(sysc, "reset", 0); } From patchwork Thu Aug 22 15:27:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773872 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 CAD70C52D7C for ; Thu, 22 Aug 2024 15:55:05 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VYtknRff4T33No5Y++IYUbUSWOUqzPRe+qwJzBDRLKk=; b=ikSvr+ztSNs3yfi2AIxb40sOUr yR0TZqhrDy5tEDBSbNSBqeYULloFnRmGe9o2YGk6cY2WIBHaDsZvBXvvdUzSDSiZGPyK/FQzudJz5 sNJS3i5s9LjjzACSNZKbS27ssJoNyxdHsd7cn5/tKsWjmGjkm8/P6y4wEnpL08IJ+JuC2rzK00rNr YZ8zW57YqxijDqq0rOzCpozaZ72aa9H5JLtSnvbcWzSAPb1NjCF/s4tbdeF43pJHSB2o2KQt+cBcj KROSWpH6TQJy52Tz4GBOHpYQ+ojJPEovuB0fW2U67tHTqjM0rJXe2Bm527WtHAab0/xPR1SDGJScn zVD5QU0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9E-0000000DRl0-32f0; Thu, 22 Aug 2024 15:54:52 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9ji-0000000DKp9-2RcW for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:32 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-428e1915e18so6783955e9.1 for ; Thu, 22 Aug 2024 08:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340508; x=1724945308; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VYtknRff4T33No5Y++IYUbUSWOUqzPRe+qwJzBDRLKk=; b=e6k60ddNSOfLjlD65bpmoP40pbwARB1Rsa+Zlx96VOSGJ0lUsCh73NJ2ikOLB/oQIQ raLdF0cXCEZN6Lyl0yV1PIg5Hmntf314fUDH+5N0upCA72SPCNUjaAoU83TzeImJqlV4 mvtK3qEqQU85G+pUUB8BOpS9Ywz3hxTijdjwTo2LohRgLWMYoh5rx23G1iTs+x1t+v26 FTceeUdGt+9Qix70on7hG5pxTopgvFe/86Aw39kBzH2/cctwiMYvcHkdzjzOWz1eNY+4 G2gKWILT7uKpYp3v4aEOcAnmfQbmbVtzksjYhkkaptue/3saQu4bEANq1d2fcNbAnWLA yyIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340508; x=1724945308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VYtknRff4T33No5Y++IYUbUSWOUqzPRe+qwJzBDRLKk=; b=LNSgBlwF/B+Eo13hjD/0iNC8b6I6ZIq28zqVGsqqASVoBjccUXMXRZvoIzNMdRUIkP LIq7gzqEhgZpmVLqxoS3spYDAJ7iJgGGlDQvCk4Ave3iXDq2wo4Kyj7EbuVB8n72P81O 0P/ha4AgZ9lwDf6NV0qOa8Dne6EgGNtVw8l6zbLu/LK7vvaGrOUym5n67P1Ktibev8kk Txewrr4yJosyI/PwiFUNS8SEAriN1zu/nOFfr2MQwZ4TAaXRR6xuBnHcUqxUPG4td+cf AO+G6ZB8LLOPMFuvr9o0elKLFABl0y/ceeNyI2dXTKTtbKHEAmhw/PzMq/N5jY63l2Uk 7mWQ== X-Forwarded-Encrypted: i=1; AJvYcCV5jvLsFSs6mPDI5YgVOCFcAbTAVNT9O2GuY1w9zJWw6+Fjesno0S9DLe4BLM/12dJjSgkJis8Om8PJ71sGpp/l@lists.infradead.org X-Gm-Message-State: AOJu0Yzq0fAskBk2T/f26S9/Onw8bHZfi69U8ocfZ9n9aJNP8TwLP1iu UQjIvUGRuonf7dWGuERvG/cnRTRl2RoRbZI03N28Pofw2oqxPv8EbJu7dKO34/A= X-Google-Smtp-Source: AGHT+IFJJW8cbQ+Z6hZ+0qBX8ovTCGv9ZpRZ4mNlCVMcK82sY8yzcRU23B/c+aKa1+lhTAIB2iIHXA== X-Received: by 2002:a5d:4289:0:b0:360:791c:aff2 with SMTP id ffacd0b85a97d-37308d725c1mr1462761f8f.47.1724340508459; Thu, 22 Aug 2024 08:28:28 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:27 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 06/16] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S SoC Date: Thu, 22 Aug 2024 18:27:51 +0300 Message-Id: <20240822152801.602318-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082830_652266_EE08A341 X-CRM114-Status: GOOD ( 11.20 ) 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 From: Claudiu Beznea Document the Renesas RZ/G3S USB PHY Control IP. This is similar with the one found on the RZ/G2L SoC the exception being that the SYSC USB specific signal need to be configured before accessing the USB area. This is done though a reset signal. Signed-off-by: Claudiu Beznea Reviewed-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- .../reset/renesas,rzg2l-usbphy-ctrl.yaml | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml index b0b20af15313..5f053981474e 100644 --- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml +++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml @@ -15,12 +15,15 @@ description: properties: compatible: - items: - - enum: - - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL and RZ/Five - - renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC} - - renesas,r9a07g054-usbphy-ctrl # RZ/V2L - - const: renesas,rzg2l-usbphy-ctrl + oneOf: + - const: renesas,r9a08g045-usbphy-ctrl # RZ/G3S + + - items: + - enum: + - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL and RZ/Five + - renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC} + - renesas,r9a07g054-usbphy-ctrl # RZ/V2L + - const: renesas,rzg2l-usbphy-ctrl reg: maxItems: 1 @@ -29,7 +32,8 @@ properties: maxItems: 1 resets: - maxItems: 1 + minItems: 1 + maxItems: 2 power-domains: maxItems: 1 @@ -59,6 +63,23 @@ required: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: renesas,r9a08g045-usbphy-ctrl + then: + properties: + resets: + items: + - description: USB PHY Control module reset + - description: USB area reset + else: + properties: + resets: + maxItems: 1 + examples: - | #include From patchwork Thu Aug 22 15:27:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773873 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 25B89C3DA4A for ; Thu, 22 Aug 2024 15:55:13 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=w7FkQHIsvgS8tLvmRvs57rTjX/u1Y5CHinD6jgFXzvM=; b=CjknasKvl22MgprOAvB51z3EC0 1UDBA/5Y1g8cyhFqhAfWeRIunZyz9Fv2TVeqxUik7ut7YHYcheQO16qS3yBNJU7ezjx7lY4SSUn7D OUlzm6t4vNHr28wZhPJx91wjGOk2gKo/gA8mVKz/st6IPP1nYOL4RFL26CJ99o8tah9iT2Vug5Y0h KMo+RH19k1lVqqxjbpfL93Yk8Xryu5gN/xxXng7VJOZY+DQAvmutmO5VTgl5eYrKpRzpzmOGXnrbt lcfH75OFwR7GzpF2sAzjeW6vYdVK7Lw9Lvqtw3ZACiHo16f56R18WJvul6aqt5cxAt7MLRkvjkR0l HF8sAN+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9L-0000000DRrT-1hC0; Thu, 22 Aug 2024 15:54:59 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jk-0000000DKq8-0jRA for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:33 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a8679f534c3so120049966b.0 for ; Thu, 22 Aug 2024 08:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340511; x=1724945311; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w7FkQHIsvgS8tLvmRvs57rTjX/u1Y5CHinD6jgFXzvM=; b=Z4v94E9q/A3rhleNV8lf8eQM6+eo3q5FXQ3jG7WFaOn3UL2THQ4i5EjslCP+Gq4nZN H8yEv7elCBOEHusCphf7FgeWAQnBqLkKMG2Lr8YobWquP/wWr3ExjHH//u+gxV5kpswk FeutF3/DwIyS/tUHQv4l9zHABKeTRXqBjpC5+oE44GclA1YoK6GRupx9FZHfcZ29mxfh MqzdpToIkX62HQMbXa1YrKFjNH7nLbPBqlAX6INuLn55lhyylTODXgDzmLHNaX94P+sR JOovwjtvVis0NG6BorjlHrraMkyH7/zEvs7XlJJWvF7MvRxDXU3LklZ8L5l+n36Dh2d0 qfpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340511; x=1724945311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w7FkQHIsvgS8tLvmRvs57rTjX/u1Y5CHinD6jgFXzvM=; b=jVClJFkp5K2u+KoZUmtwsh1CzJUuTWuuRJEuGe5wAAu5gHtXckMOG4aVHHjL6cn7NQ 0/sBsAC3BImW12oYH226iJiulcbZ5EvZuYQ5Zl7nO8wAkf8PPUwqy/YILB23l9MDFVTC GjDQr0Cxq3ll462LFGWpQ0hjd9jOWzXoKxUqGusk5EPM2ZbkYb3i8IG9qPRJi+z9EE0W NUf8qQTL02lqS08fFKyjKHCym8zEP1l7Nx3c2ZwhqWvoALfemOAFZp/AUmdoLHnPuI9L p0bfisHpp8B9B9FJ9QPc8YcQiDNlhAI7vDo0dzwF/H7ZhV8UeTYa28vldNJjrQJqJN2Z H/ew== X-Forwarded-Encrypted: i=1; AJvYcCV672v2oaXw1vALeFNjCj2ev6QbBUnx6R+OlhAaUHbApnpsSnfXFJk2DMbH8ztnI9mTx1ek9QJmYjUjH59HAgo1@lists.infradead.org X-Gm-Message-State: AOJu0YywSnDd7aT6Ch0wT/E6G1/JB6dKGekPZKspeY+FymAslCh0a4eA 13pqQ2N+XnUdc6R0oypIYFEctn8+q0mw+tx1GxkUrqpiV9AzZrcSKhBLBn1tymM= X-Google-Smtp-Source: AGHT+IGPID6PnpNBLXBTXMtHC4bLo5V7GR8HicFGoYSBbUPtn858dZ2vIoy56QGfOFS6q2WDw3Kkwg== X-Received: by 2002:a17:907:c7dc:b0:a77:d85c:86fa with SMTP id a640c23a62f3a-a8691abe63dmr193992366b.13.1724340510445; Thu, 22 Aug 2024 08:28:30 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:30 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 07/16] reset: rzg2l-usbphy-ctrl: Get reset control array Date: Thu, 22 Aug 2024 18:27:52 +0300 Message-Id: <20240822152801.602318-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082832_245263_F585230F X-CRM114-Status: GOOD ( 17.56 ) 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 From: Claudiu Beznea Before accessing the USB area of the RZ/G3S SoC the PWRRDY bit of the SYS_USB_PWRRDY register need to be cleared. When USB area is not used the PWRRDY bit of the SYS_USB_PWRRDY register need to be set. This register is in the SYSC controller address space and the assert/de-assert of the signal handled by SYSC_USB_PWRRDY was implemented as a reset signal. The USB modules available on the RZ/G3S SoC that need this bit set are: - USB ch0 (supporting host and peripheral mode) - USB ch2 (supporting host mode) - USBPHY control As the USBPHY control is the root device for all the other USB channels (USB ch0, USB ch1) add support to set the PWRRDY for the USB area when initializing the USBPHY control. As this is done though reset signals get the reset array in the USBPHY control driver. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- drivers/reset/reset-rzg2l-usbphy-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c index 1cd157f4f03b..8b64c12f3bec 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -132,7 +132,7 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); - priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); + priv->rstc = devm_reset_control_array_get_exclusive(&pdev->dev); if (IS_ERR(priv->rstc)) return dev_err_probe(dev, PTR_ERR(priv->rstc), "failed to get reset\n"); From patchwork Thu Aug 22 15:27:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773874 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 2AEE9C3DA4A for ; Thu, 22 Aug 2024 15:55:19 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gkWgitHhldKdeisz33EiZdlfuv0bPsRGbcOFCT+k5gc=; b=0XvjTm9sgiWLC5tNb3SX0JIyqd BUNrE1s3D/hi/BwzmDNk7TQTuQF8E2A40/MR0cEJ6yl/Jf0b7t6sm1ILeVEsktq9zQu60rLaPqJdw tecZt+8vCP5FYJ6sF4HDUmKe7nblzFtCotkZJcFB5G71PMXVnvcB+QpxUG2LO5c9k3ZXyEQuaxO8c LSuFsO28lFFhKHyRyMWrb/YZ1mqJUXURtSrWEi1Bd8QV9J+hBi+n20+AMMk6SfzHup4UfZprLR4oj 6fpT1N6SLpC0hyUnbXDi6yvx80ruPv3QXFFTqLtDis62mlmSmYDP2AdNgey+q7Mtbe7hXVQoW4jy0 FfYnrS5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9S-0000000DRwt-0IBb; Thu, 22 Aug 2024 15:55:06 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jm-0000000DKr1-2RlC for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:35 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a7b2dbd81e3so130728166b.1 for ; Thu, 22 Aug 2024 08:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340512; x=1724945312; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gkWgitHhldKdeisz33EiZdlfuv0bPsRGbcOFCT+k5gc=; b=lkWrHBnhhXrcva2+OndHUTY74a2ajNH4RsYFKiPtGiy/F0KfR1tfNdeQMxnRrvGuKk qaLSe3FBrSeKOGSurStRjbLk2evoZ69cCjIraUUFM2moqVnjmB/kRsk0pt0YBnQV4UNA NyiEYaADXorS5PV8TebxmOL+LtJEIGYzTX3yiNwpcHvnfVg8NbZ76YfUS23fgWyV1ahb 7L+dXBSKGnbTmiwcuALe178BKx4YYQM9jy3FDKlnveTuKYyc6znUtCWkfU+fA0KWV+mm Lgs991PXtXpEPtq7KXlTf9sVm/eqYQkBWXU+OEDf5tlhY3+9i5OJ6sy00SsKvQkkM+q3 oxZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340512; x=1724945312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gkWgitHhldKdeisz33EiZdlfuv0bPsRGbcOFCT+k5gc=; b=Ovy9FsVmW+n/6YWNtp1vbPBedgzjQW1lnc1SOKon7r4+TiZr/o0z9VtPJ74Hyynu5H 6xNWZtV0TUPLy6rrc7LM9smxhcozd6DSHn0dOxrXq/+kjlM28lU2YMqrTItD8nc5SH4q 3DrMUd5HFN/bEl2mNHOCbBfZd2EkAXZ3tgc1u4GaDKOXdq3t1dTUQB12df6qHd1AjaDm SNnQo22UXBn98BLOvi5lXBoSY2fpkWHQrLlI72bapQKzPFI166vGWtID3vaOCi9o3paT p+1w4VdS1Hsx7YrWvrSQRjuFjXTgUYGygop1x1UIqtJhD3ggENSq5Jp0DdMQ8RLEhznw Hq7g== X-Forwarded-Encrypted: i=1; AJvYcCVKCAqf1wA+rLMtT8ePnQBZ/bUCPBq8OytBdXOTuZ3A8pEOl5OIiySY5yL8VK+t51p2TOD7U90weBizYoLQtOgO@lists.infradead.org X-Gm-Message-State: AOJu0YwVkeKqmx8nlwYiMdSWAyrW8wPdDaP+JZL1CVEjAYzy5+AI2Gpc /MkVUJvPigCFVDIZkoOeNvZ+fSjAPYRfwQ7oN2EGV3XjC8he2+atsb26Xsc5gUM= X-Google-Smtp-Source: AGHT+IFEWPJ3HqQL/w0KWFEJhV07xF/eMg4mv7Lejm46+5JkTivmt8Z+5f8B5VhGhYYih3FlUFQvOQ== X-Received: by 2002:a17:907:980e:b0:a86:9258:aeed with SMTP id a640c23a62f3a-a869258b023mr191608966b.61.1724340512413; Thu, 22 Aug 2024 08:28:32 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:32 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 08/16] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S Date: Thu, 22 Aug 2024 18:27:53 +0300 Message-Id: <20240822152801.602318-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082834_625337_57F2BBB8 X-CRM114-Status: GOOD ( 12.48 ) 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 From: Claudiu Beznea Add support for RZ/G3S SoC. It needs its own compatible as it uses 2 reset signals and it cannot work w/o both of them. To be able to fully validate this on DT schema, too, the RZ/G3S uses it's own compatible w/o a fallback (as if the fallback will be used the RZ/G3S will not work anyway). Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- drivers/reset/reset-rzg2l-usbphy-ctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c index 8b64c12f3bec..08b18d7de7ad 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -93,6 +93,7 @@ static int rzg2l_usbphy_ctrl_status(struct reset_controller_dev *rcdev, static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] = { { .compatible = "renesas,rzg2l-usbphy-ctrl" }, + { .compatible = "renesas,r9a08g045-usbphy-ctrl" }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, rzg2l_usbphy_ctrl_match_table); From patchwork Thu Aug 22 15:27:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773875 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 555B0C3DA4A for ; Thu, 22 Aug 2024 15:55:26 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mGjGXMgxdEYAGo1GbGD2zE9hgBaB/Zwy6Dj9nf1BYt0=; b=a6xNApP9TG57Ue0wDENrjfPYea 8PiK6W3aolPvV2X8mnKOf2Es3LZNCeveo707xT4/cFs3jPVGUoirgey77YKZTmBSSwXvZDxldsLVJ oFMiIckqoUBsLSpI17tXkgVnrefFCTyDKy23C/gVSBzLH+e3OdNK0sPLR0s4t7+53nwS897D4Qt3R vza/6WG4Ymc+6kxopxwgvkrSYOW5wMZxyr3v3YlBIERMyM/1FZ8NhINqPWqBYyVwtvDzljKPc3JyJ +MpLNEc9Jy/2+FtXGZkKxRjtwG7rRz8wxWGMNiYEGt+y1BCBWAZxYE28ojEjI+52yYVcUWZ9PvGQi baOk90aA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9X-0000000DS1e-1Kmm; Thu, 22 Aug 2024 15:55:11 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jn-0000000DKs2-3U7n for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:37 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a7a9185e1c0so93842366b.1 for ; Thu, 22 Aug 2024 08:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340514; x=1724945314; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mGjGXMgxdEYAGo1GbGD2zE9hgBaB/Zwy6Dj9nf1BYt0=; b=dqoawmiMxRKlhhNQCL9ai7x0WbJ360/ZS0gzcxBq12K3ruTTQ1EUDkyrseycOfJ/hw 37xEdjQicLXjAv3C7ltT1wwCCORINtGXvfDynZwcPsMXyM2h4XfbFyatyKkfIb9+8wYQ scCwxNOQwNf85g3FS05QdrtTv2vlDj5Ye/Hq6o3HXppxbD1UWDbe0Cti0vbv8OCmlgkx 2uz73UC2PDBW9jjhkuS9JRnAzHdFGgWqNrj6Nqb7MDuE+BwQV2HYLGeSkkrLtbfvjIYr 0Y7M8c3+Fa8gvZLkcgrlVsD8lwIyN66ZUYO8dvwrUeZjfIxMtarhTB2kudHJLmUA089s fQ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340514; x=1724945314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mGjGXMgxdEYAGo1GbGD2zE9hgBaB/Zwy6Dj9nf1BYt0=; b=ZZw1ODM+7/FqilHnKs2XWZ3E92DyidgKOObCS1cXn9ijtMnz0gLHUz6vBoKBe/NOk9 XAepYicLYKQBONkBJ0A5npIslkpTk4sUkpZWZEQVKQxRjXzPCXugNGgRv1qRojo6Do8g FxljpE6MZtvKz/tVD2xq8FwufXYB5k15s4a66ZExprsm+gI5nsHiAvOMG0aZW6VNA76y YLxJG8rcvLhvV4U/wPo3quA5k76314xQifGAIJJ2vpZJFfG+fUS7tmV9FlcLHTZiF+kT 94RISXikTLiv1J1q77DHpgthKGXGyF4isuO31TzOJTHE+33oXlD4K65PTv4qTJBimlG5 hfAA== X-Forwarded-Encrypted: i=1; AJvYcCXNm9GGqNzg8xEk+fmMy89At7fqrEqii5rL5LWE7APnWLZI4QGP7JBxz+O+t6dawrZEYTCCRKR2dE07WSCmF56A@lists.infradead.org X-Gm-Message-State: AOJu0Yynkm3YPz3k+JdvOQj1IlpTnsxrGF7Wl/tsmoyt1Wu0BpNF1S+Z pjQMCD3R0HKFO6oXtsz8pYjJ94WMuDPcWyClRQWEMCmkC2HSf5n9QDCJV2vLZQE= X-Google-Smtp-Source: AGHT+IGJeJoxOq1tlRUs+MCEa5uz16WViXX/h9LB3VGUBluXlsLHOcyR6hbTFMMPgE0Rs2wdaLi06w== X-Received: by 2002:a17:907:f74f:b0:a72:40b4:c845 with SMTP id a640c23a62f3a-a866f70378emr511233066b.51.1724340514344; Thu, 22 Aug 2024 08:28:34 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:33 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 09/16] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC Date: Thu, 22 Aug 2024 18:27:54 +0300 Message-Id: <20240822152801.602318-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082835_983419_AC7D05C3 X-CRM114-Status: GOOD ( 10.08 ) 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 From: Claudiu Beznea The USBHS IP block on RZ/G3S SoC is identitcal to the one found on the RZ/G2L device. Document the RZ/G3S USBHS IP block. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml index c63db3ebd07b..0f84cba872ce 100644 --- a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +++ b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml @@ -26,6 +26,7 @@ properties: - renesas,usbhs-r9a07g043 # RZ/G2UL and RZ/Five - renesas,usbhs-r9a07g044 # RZ/G2{L,LC} - renesas,usbhs-r9a07g054 # RZ/V2L + - renesas,usbhs-r9a08g045 # RZ/G3S - const: renesas,rzg2l-usbhs - items: @@ -126,6 +127,7 @@ allOf: - renesas,usbhs-r9a07g043 - renesas,usbhs-r9a07g044 - renesas,usbhs-r9a07g054 + - renesas,usbhs-r9a08g045 then: properties: interrupts: From patchwork Thu Aug 22 15:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773876 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 62513C3DA4A for ; Thu, 22 Aug 2024 15:55:29 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MLN4pb77vJ4aC8LA9dpwq6n4qe80J5V8TVd+pDGU9bo=; b=yPw4xdEQLeR7LfKWhMSVV+bwmd ZJxzGQsQg42BHP9yWOq/Dqa2oSg4Qs9AO5qU1BfCBxEizH1Yz8lUIDxn2/fCKjkW8KQcfmEE0Birx wTBI98AOCyGd64yQVG6ykb5zuwEnu9ArZKZBNkxNdtMBk9oMNCmUpOTrTSSQiqOh4i0diX1pf0XTg n5/z5pPyBYwHgFBfVEk1cJ08s979NGhrVbvTDLXZdsnPCg8D/BOjLjsAKEHwc3ABU4uzLg9oXsx/i lzTOtjBNV4YPoYtvwbeswsll5tsQ14Jl2mMoHsqsNtE5/WnCI0Txra4ynaPO5kI4SlC2aqbIaVb2a MwSejYGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9c-0000000DS5L-0WIU; Thu, 22 Aug 2024 15:55:16 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jq-0000000DKtQ-4C8Q for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:40 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5bec7d380caso1219064a12.3 for ; Thu, 22 Aug 2024 08:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340517; x=1724945317; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MLN4pb77vJ4aC8LA9dpwq6n4qe80J5V8TVd+pDGU9bo=; b=egz+Dnz3VHOZAYDPbAl8vZsbJLZDpCJMHfX0Q6xfa8AzQXV5r0rbEOOiUEEwPFv1Sz GoSh2dw5OLlJiDNsYbsokiqFsJBddeci6PS+8bN4rCDTtdN8uv+pHx6UQ2cXjNSLTy0O lV0Q+gSM1KbnBh46lduzSEaoPQVzKWDCc+qGkVsgpDgQPm5KohUbobba//m4hSY7t55D a+FcxrZ/Wxdd/z0DNPqwumrBGmMRvfqcp6jJ1YngviJBtgangLaHPO9tN5jNI00eK7HX bCLLBdbRd2GCNoh82vjGVgJAjUE7awYCmANc4TT4tuymAJShNoKzSIpG27sSfaGUYID5 rPkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340517; x=1724945317; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MLN4pb77vJ4aC8LA9dpwq6n4qe80J5V8TVd+pDGU9bo=; b=xKeU68gOgmu8vQlXlAd0/61xclYdIrrl5EZF6rsJlEWIIHvDJ7obxPg5A+pz0oAk2h H2p3/JfS4yERrVvWFWauZkAzV2ZSdkxSvqmD7msmODsipVWlve3JU9NNeg78zxEr76Ul plJhjS/GaPZZw+h/r547ak8V4UIiHnYTsIkvQaxxHZOkeEDOqAOId784Tq+5/KKteHd2 IthOPEdOPaxBuYXn1SChT5y7lR4IvNWMQCFdDgRABdsruw9UVDJ+5BSuMcqo3wKffgf7 /GtXq19pFzG8ArIkbIjjI07H4D/Gqr9vPmwTd8GmofgjaOg9tu/pXVgdEO0vN5HZY/ec QD3w== X-Forwarded-Encrypted: i=1; AJvYcCVumBdjQRZCi04Cs9PzB6ARGxzHCLIixN0L6keV/awnZ82JL1nbrLrZd20si+xKkeoJlpkgDFwGpJJX6IyNgbSI@lists.infradead.org X-Gm-Message-State: AOJu0YzlI3+KGYLO/+FbexDUJYVNyc6y9ZLCOwdzejBELTZ3JC46a1vg Yu1KGFMWWUcpdpUO0CJOtPf5MvOHzbR3DGAUBrHgnbHXQhVpkVREOmCivibYads= X-Google-Smtp-Source: AGHT+IEYrxA2bm8mmwSX01X2yZ3QhHyjhFNmbYyUH1245MQKOvJG+Mgyld3wrG6KhxZVhMAa/kKlOQ== X-Received: by 2002:a17:907:2cc6:b0:a80:7c30:a836 with SMTP id a640c23a62f3a-a866f894098mr510823566b.56.1724340516716; Thu, 22 Aug 2024 08:28:36 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:35 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 10/16] phy: renesas: rcar-gen3-usb2: Add support to initialize the bus Date: Thu, 22 Aug 2024 18:27:55 +0300 Message-Id: <20240822152801.602318-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082839_046897_34BEB4A9 X-CRM114-Status: GOOD ( 21.75 ) 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 From: Claudiu Beznea The Renesas RZ/G3S need to initialize the USB BUS before transferring data due to hardware limitation. As the register that need to be touched for this is in the address space of the USB PHY, and the UBS PHY need to be initialized before any other USB drivers handling data transfer, add support to initialize the USB BUS. As the USB PHY is probed before any other USB drivers that enables clocks and de-assert the reset signals and the BUS initialization is done in the probe phase, we need to add code to de-assert reset signal and runtime resume the device (which enables its clocks) before accessing the registers. As the reset signals are not required by the USB PHY driver for the other USB PHY hardware variants, the reset signals and runtime PM was handled only in the function that initialize the USB BUS. The PHY initialization was done right after runtime PM enable to have all in place when the PHYs are registered. Signed-off-by: Claudiu Beznea --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 50 ++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 7594f64eb737..cf4299cea579 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -19,12 +19,14 @@ #include #include #include +#include #include #include #include /******* USB2.0 Host registers (original offset is +0x200) *******/ #define USB2_INT_ENABLE 0x000 +#define USB2_AHB_BUS_CTR 0x008 #define USB2_USBCTR 0x00c #define USB2_SPD_RSM_TIMSET 0x10c #define USB2_OC_TIMSET 0x110 @@ -40,6 +42,10 @@ #define USB2_INT_ENABLE_USBH_INTB_EN BIT(2) /* For EHCI */ #define USB2_INT_ENABLE_USBH_INTA_EN BIT(1) /* For OHCI */ +/* AHB_BUS_CTR */ +#define USB2_AHB_BUS_CTR_MBL_MASK GENMASK(1, 0) +#define USB2_AHB_BUS_CTR_MBL_INCR4 2 + /* USBCTR */ #define USB2_USBCTR_DIRPD BIT(2) #define USB2_USBCTR_PLL_RST BIT(1) @@ -111,6 +117,7 @@ struct rcar_gen3_chan { struct extcon_dev *extcon; struct rcar_gen3_phy rphys[NUM_OF_PHYS]; struct regulator *vbus; + struct reset_control *rstc; struct work_struct work; struct mutex lock; /* protects rphys[...].powered */ enum usb_dr_mode dr_mode; @@ -125,6 +132,7 @@ struct rcar_gen3_chan { struct rcar_gen3_phy_drv_data { const struct phy_ops *phy_usb2_ops; bool no_adp_ctrl; + bool init_bus; }; /* @@ -650,6 +658,35 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np) return candidate; } +static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel) +{ + struct device *dev = channel->dev; + int ret; + u32 val; + + channel->rstc = devm_reset_control_array_get_shared(dev); + if (IS_ERR(channel->rstc)) + return PTR_ERR(channel->rstc); + + ret = pm_runtime_resume_and_get(dev); + if (ret) + return ret; + + ret = reset_control_deassert(channel->rstc); + if (ret) + goto rpm_put; + + val = readl(channel->base + USB2_AHB_BUS_CTR); + val &= ~USB2_AHB_BUS_CTR_MBL_MASK; + val |= USB2_AHB_BUS_CTR_MBL_INCR4; + writel(val, channel->base + USB2_AHB_BUS_CTR); + +rpm_put: + pm_runtime_put(dev); + + return ret; +} + static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) { const struct rcar_gen3_phy_drv_data *phy_data; @@ -703,6 +740,15 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) goto error; } + platform_set_drvdata(pdev, channel); + channel->dev = dev; + + if (phy_data->init_bus) { + ret = rcar_gen3_phy_usb2_init_bus(channel); + if (ret) + goto error; + } + channel->soc_no_adp_ctrl = phy_data->no_adp_ctrl; if (phy_data->no_adp_ctrl) channel->obint_enable_bits = USB2_OBINT_IDCHG_EN; @@ -733,9 +779,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) channel->vbus = NULL; } - platform_set_drvdata(pdev, channel); - channel->dev = dev; - provider = devm_of_phy_provider_register(dev, rcar_gen3_phy_usb2_xlate); if (IS_ERR(provider)) { dev_err(dev, "Failed to register PHY provider\n"); @@ -762,6 +805,7 @@ static void rcar_gen3_phy_usb2_remove(struct platform_device *pdev) if (channel->is_otg_channel) device_remove_file(&pdev->dev, &dev_attr_role); + reset_control_assert(channel->rstc); pm_runtime_disable(&pdev->dev); }; From patchwork Thu Aug 22 15:27:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773877 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 11F52C3DA4A for ; Thu, 22 Aug 2024 15:55:34 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0EG858HP8in5mb9F5t+mQtv5qilS1TpleLRM5JdIQFA=; b=YAjJXVxVHKJoTNZB8AVaMp4VCQ 2fmhTN8JAVuAXMHBULUgXnX5i6OITuosDFor5/Sp9wPoIz3dtDqrb6HMl6HWuzZ+kwawLpy1+twtV IRC2mdXVqE+OTJOBLlKlY8pgKDOyEtBLvjGaYqbPVbJ+/XlmnLPH8UMeWbViM9S1JrY7s4GTNBuZM 9lTpMBlR/YsJxVBDbG55xzDM1R7PzkKYAMTLoLdDFeUw97TlvyK1MIh5L3YiCmS3GZ6DeLe/EEfhT e2zXpBAZbvpX44flzg491f3GvOd3EU5nIUbifXkZERqDa3V4xWskkq/1EIIc2Y168AYYAoyvVhr5V vM3HdQBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9g-0000000DSAG-3YkQ; Thu, 22 Aug 2024 15:55:20 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jt-0000000DKuX-0VEN for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:43 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2f4f24263acso3194861fa.0 for ; Thu, 22 Aug 2024 08:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340519; x=1724945319; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0EG858HP8in5mb9F5t+mQtv5qilS1TpleLRM5JdIQFA=; b=Onhb6CUnTmeA3urj5TTVNP7R/iy6xyCySR57ohqZKb0hA4uEdjjvXMVkY/WwN+Zn/R rs/V0yoJBYJS5kYo/viHxqT2vcYjlLCv8YcdNnofG0W1ebLKB0G5O8FYAmBG8/GsE//Q WIWwPvcVDWh6iigg6xhYwTfA1c+YnsYilv3Fmjn1YFwLYBIdu7LkHEs6lFUsK9mGtpIa 4evQkYxET+lWXQdjuKSbLTppeuLwS7PYva6a/jEWjXpgDHSWwsaMe1wJO1r4L+mEswxI d4I7NpXytSDIUJt0V9dAEYeuSkJEndy+k9EIVNrAY5kMqSQXaLj1mi6bG6p9XQigHPA7 S1zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340519; x=1724945319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0EG858HP8in5mb9F5t+mQtv5qilS1TpleLRM5JdIQFA=; b=Q+h8CcdO3ZP61CeanZvaVfLa0HsGc+Nwe3MdnAHkHa4q/e2UKqwViw/+UDucMG2Mej eAII+zGBRctCHkp9Wtjd1MQcdgEzrb6t6VY4NSUcZfTfOY8LEVsgbj/EC3Ii9UcpT9KR rwopXLDrQ9HG6RyENJ5QJxA85/95Qg5GiSmS2Z5ZRa93WeUIZPFau+LkTRvbsSbDlyGG SF79CRoH9Sf8qY5e6ycKxlfsK0Efj7L0DEdSUfwDD7YSBYdP5EFDqSdwjQuZHzPn+x41 ypVPU8+Yy7LMQunP9d6naqELexQ3xz6W6z6Bkf7mOe9yt1K3/z+2zFxKwW6SJ119hifO +ooA== X-Forwarded-Encrypted: i=1; AJvYcCX9SP/iX1vO8t33k9gF4z6yDhMbxtZ8aGLjZJlbu9ihoGspAZ5Oune49JYxeKyBxQT7UFKWYajxOoXvbjhgie3p@lists.infradead.org X-Gm-Message-State: AOJu0Yx3mq76IQ5jl4f67oisiJ8j87oa8eDt4vJLa51go0sfNsFwt4Hd OQfpEJbpv0dENwL/uu9lXBaKv/aiGHSW3sIClaKsTjJGFjex0DL7y3FxuAMsd7w= X-Google-Smtp-Source: AGHT+IHayguZj8Wa8CKYZZKYCnPQ7ddSFCBCknAgIFfJUW2xU8Ead14TNkyeRYtLahQze0o0yKHgSg== X-Received: by 2002:a2e:a988:0:b0:2ef:2677:7b74 with SMTP id 38308e7fff4ca-2f405f0057bmr21390771fa.41.1724340518917; Thu, 22 Aug 2024 08:28:38 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:38 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 11/16] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S phy bindings Date: Thu, 22 Aug 2024 18:27:56 +0300 Message-Id: <20240822152801.602318-12-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082841_273142_FB2069C4 X-CRM114-Status: GOOD ( 11.54 ) 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 From: Claudiu Beznea Document the RZ/G3S PHY bindings. The RZ/G3S USB PHY is almost identical with the RZ/G2L USB PHY. The difference is that there is a hardware limitation on the max burst size used when the BUS master interface issues a transfer request for RZ/G3S that is configured though PHY registers. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml index f82649a55e91..af275cea3456 100644 --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml @@ -13,7 +13,9 @@ properties: compatible: oneOf: - items: - - const: renesas,usb2-phy-r8a77470 # RZ/G1C + - enum: + - renesas,usb2-phy-r8a77470 # RZ/G1C + - renesas,usb2-phy-r9a08g045 # RZ/G3S - items: - enum: From patchwork Thu Aug 22 15:27:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773886 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 A0791C52D7C for ; Thu, 22 Aug 2024 15:55:36 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XSWof3eimbYWdm3Zde2Iz4BDEJwC1Ylc5fdAQ7iNZKY=; b=EZb9FhSq4gxeOVF0S9UmVV5+bS K01LGlReINbGGQD9HyI2UYU2HTClFSe+Dw4KpEQ3O2RLMht3ZFPGPZrhI0HPk84Owf5FkuK0MCr8l xYqwt4g/NJgK6Y9iHXJSBeVrLjT0dhd14gxgmhd7DGnh9h/XDJNboArZG4slBrF7752dQs0KQIeAk qQ6Czw/Y6tiltWiWrOm/JaTDkrBRhao09rRHwVd5qEPvt3gFmg6xnBnvTXVryf52XxeX+bfcv+wzg 2XraS+eOjocACN8EHb9i/O5rmb2wsAtMffUqd9ME9lmcNwkNDF/mJ8aDrtLBU0xm7q1Z0bSvR6Z/s CLbwdqMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9k-0000000DSE1-3152; Thu, 22 Aug 2024 15:55:24 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9ju-0000000DKvg-2j6O for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:43 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a8684c31c60so121164466b.3 for ; Thu, 22 Aug 2024 08:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340521; x=1724945321; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XSWof3eimbYWdm3Zde2Iz4BDEJwC1Ylc5fdAQ7iNZKY=; b=XhzDtOT5RP/0v5I15+DD1QKeTbFJOKHOfM+Xwan3w0dgXGAn0Ix1WToAbmiFEu3VtC QgBXQHuUtmRzSa+3A6VpcrePNK2VK/FlM0LsJ2JfEAEfJUi5bXznFyUoV/lgNUIX2a9u ZfFSWrSbsCjJAeHKxGFN1S3PIFpRdZxTBjBC9ALsaAStIrjG1lgFSVADD0MYaQbKxmit 7to8qvbKNnvm8ObfQZWMfYs51AwSrcXr/Bd1tGc3nD6kfs1upJpOaORsHbkNOkxfCMN6 3bTgvmQv3IQXaRP4j4BtzrmB52mBvkXiV3Zgr2cdBa8J/FI71fPlBO8tKGqh0rl1mIxR wehg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340521; x=1724945321; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XSWof3eimbYWdm3Zde2Iz4BDEJwC1Ylc5fdAQ7iNZKY=; b=nFK4PMGSKhM3e22gng6ZPvSkt0Sr6xDQbJa+3FnBsI9/X1NooXg54enDdRQOeACppv mxutvOmqEgDGCFwZwc2Xz2Ghn6mAH7FMjc0YMxglLSQEjzlxr8am+D/qoCp480XI5cJf Ud/nxQZyrWef2iMCAP2QJSQzlpujz9f4xntbV/ClMwkdIXIPqi/qcS1PocbVQmA2iKyL nZlVZkq+VwPxZNY+LEW7YvnMkhDtoUNvkl0ak7peNxyS6SKDwWnKkAo4hi9ubCiUz+Kd +7yGIge2O7QW1vthUkvWdHURYMQi6ZqTNqutr3WG+IJRziz7vUbHyuIY8+QYuuB8whYa xOEw== X-Forwarded-Encrypted: i=1; AJvYcCWk5JwO2yv26OBH5vP40N5T6o4oiivWu5yp1nt8Jw5F+0RemfmsVmvMPxCFXwKD0Oh1G3z9lCvHktrVBmaGyptw@lists.infradead.org X-Gm-Message-State: AOJu0YxWBj1YONSJ9r+C0Z44qkUbiGr1touDK6few6krppJ1Oa5GySAY pBRCaYKfF9CEKVznMnKGEQfkjxQaTPOR1kd9IFfETMmmnW+XHg6G6gnpb9UtYUU= X-Google-Smtp-Source: AGHT+IEBQZ1FZ/LXCGsRTtDo2mrL6RRIsqfYVgMxLk7cvYuAGygDFmxNvFc2QDySBzsJWYCvzMOvmg== X-Received: by 2002:a17:907:7214:b0:a86:82e2:8c64 with SMTP id a640c23a62f3a-a8691b5c943mr185347366b.35.1724340521191; Thu, 22 Aug 2024 08:28:41 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:40 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 12/16] phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC Date: Thu, 22 Aug 2024 18:27:57 +0300 Message-Id: <20240822152801.602318-13-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082842_732214_56345A2D X-CRM114-Status: GOOD ( 12.07 ) 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 From: Claudiu Beznea Add support for the Renesas RZ/G3S SoC. The support is similar with the rest of RZ/G2 devices with the except that the RZ/G3S needs bus initialization due to hardware limitation. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index cf4299cea579..58e123305152 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -583,6 +583,12 @@ static const struct rcar_gen3_phy_drv_data rz_g2l_phy_usb2_data = { .no_adp_ctrl = true, }; +static const struct rcar_gen3_phy_drv_data rz_g3s_phy_usb2_data = { + .phy_usb2_ops = &rcar_gen3_phy_usb2_ops, + .no_adp_ctrl = true, + .init_bus = true, +}; + static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = { { .compatible = "renesas,usb2-phy-r8a77470", @@ -604,6 +610,10 @@ static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = { .compatible = "renesas,rzg2l-usb2-phy", .data = &rz_g2l_phy_usb2_data, }, + { + .compatible = "renesas,usb2-phy-r9a08g045", + .data = &rz_g3s_phy_usb2_data, + }, { .compatible = "renesas,rcar-gen3-usb2-phy", .data = &rcar_gen3_phy_usb2_data, From patchwork Thu Aug 22 15:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773887 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 3D86AC52D7C for ; Thu, 22 Aug 2024 15:55:45 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AWNzbrWT4cjZwlbw/B+Ku5dXdfTILO3SL/AQs9G2I5o=; b=Hyio42z/NKB0V505tYunQ3xKc0 m0ybLFg9CieC85jytFZPzQJcll2heVHMhp1VTLpskBi9uK/SEBWsb7RsgtgU6T+a6dzyXg1rswUgF j1/0h8N7RGe3O9Tl18BNhS0HZf1RtleVYq7XT7PHrr9uCrTiROSkwtrc/mmXOiDlmvThPRwfhfPzm XjBrWR5AVNArq9te/ILF9zYa8MhYr61VmPkKU+8LbhTMjUQHddXn9A1DdQ2CVE8SwstUNLPOn1hL5 nNqSereJeoyLsw0lrAxBgi3F4kJ/gaeF43HYoEPlLsDXci4pTJC9QknsZJ1AzTvWFpC75buyqkZZU rY1AMvQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9q-0000000DSJ3-1QEu; Thu, 22 Aug 2024 15:55:30 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jw-0000000DKwg-2fga for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:46 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a7a9cf7d3f3so140599866b.1 for ; Thu, 22 Aug 2024 08:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340523; x=1724945323; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AWNzbrWT4cjZwlbw/B+Ku5dXdfTILO3SL/AQs9G2I5o=; b=H/eAwGUwhP+JcQ6nZvyIe5FgtNTvNsn019GPVWvJBAh9ZKWNm5+i3xlKXOEp+lcenM 753aNGOAK1W8hc74Y+48N9D1p1Y4LKNg/a0y0S9fW3CvJPAWsfDIalCtSBh54JJhQ3CU iiAihdxWDA/QUDUR41PHpkUxuOMVNGJR/NrgYsrWOe5d6sS3pWYgY/T6K4vFlx9eAz7l OrXO1w7vVhB3gdxp//vRwdY+hQCX6wsyErNFG4diCNVm3CoDRAe4vYLvr6h9+qxTdRRc UQwrf9q5tVzk87oX21E3yrlrJIXhFqz0pM3p2u1CnQHODWt+ugBo4ZWtGtSBRCD8ywoJ 97QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340523; x=1724945323; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AWNzbrWT4cjZwlbw/B+Ku5dXdfTILO3SL/AQs9G2I5o=; b=g32PZhmgA/jwfy0U/m7PMZ6FaXbQ47Au2svxmytbQdf5zWc1L7ZxggqJ6oRBhewHvX UrHZnj9++nyGrNFMt4q5qmcLZ8HsNVEk6wlgbhXLzFlLFGibB+KpaIyhXE1vRO7kLeDZ NpAgBiaxA4Ey5Z7ZzusDHubj9gRS8bPAjWDGmUkkU4hgYDevJV9SHzdVfSWHD4ilQ5xo /lSNWYrffMa1PrXuj8y1zA/VlQuS+JrL3xNj95LKn+aOp4Ku71ME+TNqTj6MQgwHRCe2 jHSaOJFhKIjFjl0CvG7W6FnGQpQNIJB2iNiD3FQ1AUHnSZVYIZK9aGAr1FkOUbVYWTUs g2mA== X-Forwarded-Encrypted: i=1; AJvYcCVoFMdDBDPFEM9dJDi7sVDX4w7qWvMwPQzLUfjCIpV4DYrR3oJQ3tnXX1kIVdnW2MlIV9CL9NDjZozRvA7WmTyo@lists.infradead.org X-Gm-Message-State: AOJu0Yzhd+BIcDWpItJbcU1n5aXfn7ItFKBup2W8CPZpU8kUJuJcD3nW k3eTlvKwlr1tKR3JoW/oNzPbSHWa5E10UElyUjuWpK7+i0mtncH5TtaIkMEyamc= X-Google-Smtp-Source: AGHT+IHil/3QLm3fW6hjS77rGDv48oy9/7q2NQAgMRaJIdEszcJA4lXA3RSoaEhwajY77aZMJWnb/Q== X-Received: by 2002:a17:906:7313:b0:a86:700f:93c1 with SMTP id a640c23a62f3a-a86700fb357mr451883866b.60.1724340523183; Thu, 22 Aug 2024 08:28:43 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:42 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 13/16] arm64: dts: renesas: Add #reset-cells to system controller node Date: Thu, 22 Aug 2024 18:27:58 +0300 Message-Id: <20240822152801.602318-14-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082844_682432_D580D128 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. 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 From: Claudiu Beznea System controller on RZ/G3S can act as a reset controller. Add #reset-cells for it. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi index 0d5c47a65e46..cd7cefdb2bab 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -91,6 +91,7 @@ sysc: system-controller@11020000 { ; interrupt-names = "lpm_int", "ca55stbydone_int", "cm33stbyr_int", "ca55_deny"; + #reset-cells = <1>; status = "disabled"; }; From patchwork Thu Aug 22 15:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773888 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 51789C52D7C for ; Thu, 22 Aug 2024 15:55:48 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xQy3IcKZPJI2hl6KCRWvj32xtpsEdmpbu7wAI3ouog0=; b=T4G5UT+QYKn4Pz4vaXjMV4HewA aUkUDAC9cCW3vfTKMGT7pnadIxihyHmeVki4rXAmuQknUZCie3A9MK2p0AdZ2jbZLv4YLrB5YRBKM crjuUdvV7/rETLLQnkmbFT4HwnBOSrxbAnzqQTcuZDW2dq1IRaML36bfv70q3JaPh2YT8qyLn+/St k+Oy0w2i7XcuWkAZJu6fFgOTpxSQRXLobhxpodWsuFKbu4/2e4MUAU0ra1fXjb/Hi/6IsJaFJ6c2i eyXIN5uXoBzXK9csn3RdXH+EhqzeqG1L4wJsuotfFOmsN5FAcm8axVzispE0g3+HCNRFAu59JoeU4 xZ113VHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA9u-0000000DSMu-04SB; Thu, 22 Aug 2024 15:55:34 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9jy-0000000DKxZ-2OxN for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:47 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a7d26c2297eso121708566b.2 for ; Thu, 22 Aug 2024 08:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340525; x=1724945325; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xQy3IcKZPJI2hl6KCRWvj32xtpsEdmpbu7wAI3ouog0=; b=FSHPQfmlDLFDwIAgFUZCYOLSNdKhULX1HEk2mX8LDIRoiSsakVUjFIBOCMS5l4rzWL YhxAPiX5YTQtCzixaAoHoIyIyLlEhS6UjSCE58Tq6QBmEfEksh6AQJ6cFUR7x0XPYsKA aawI26LtQOQvUsxInbT3tXTywoG0jvHY3qxySxJH66HomjBTD/ZoNT8aaIBWUk7GtaUi KJZzANKC6jW6dACQepzMgb/wzTLRcuVcbDj28kqBXwd+N0uvXo0CF0CHVcs9TTsq2ihj pgpT8kJMdUpclSK34dGfPxc6RnVFN31lF0MNdpG5lU9OW7JTH9PIvX1sn8Fj47Bzcl4U wcPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340525; x=1724945325; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xQy3IcKZPJI2hl6KCRWvj32xtpsEdmpbu7wAI3ouog0=; b=nZd4m0nm8rUojjr6av63hppD0p12oYCXiLsstiLKkJLtf3q3X9skFE2RPsr5wwoGN6 CoWWXbYI6rH7obBRPAbVBLtJqRUmWvXTHJ/IRsHsVbLN5pegbOLk//NP2ts+zYj3Wm4i pAn22Nu4pmNg++SVmhl5NMSoEaXuoiPb4ONsWeJFlp96D+lITVDeKF2L79jOS+GUSraN v6Lhb7vAukGvq8dxi2hoFzTtDajihqZf0MgSKFvbIpJIt88U8p3MnYE8mfid7BUzIiZ4 BzKRsMMTdiNmIHndjkKSu/YR7W6gnUuMkvYFgEaaV45AtcFCcmX5zpyfyDhTHo69OQnw s+kg== X-Forwarded-Encrypted: i=1; AJvYcCXUbCkMX+z6mrqVWjFxKX7uvn5WSx4A0g/VSi9vPA2mqkIWhEHZGcR6CxQ/85piNu6cu/xYPz2Q7HhBybrB/hMB@lists.infradead.org X-Gm-Message-State: AOJu0Yy966E8xJ6wZ4RBsOAiQMtxxDok6IFtZvBVnC1IYCgo9mQ+L3Ae 1XXQ+eOOC8QxEENq/mCs3WuVhpjQQyiHI5JUcMYjZmBjOYG2fBRkB6oQf700dsY= X-Google-Smtp-Source: AGHT+IFxTIoKrOlLy0DfsD4U5A56PkQ2ZXDt8aAyKB79f3D2YVsPAO1B8nxgDwEOV3dbQje4XIXtCg== X-Received: by 2002:a17:907:808:b0:a77:e48d:bc8 with SMTP id a640c23a62f3a-a866f27a0d1mr551018366b.21.1724340525195; Thu, 22 Aug 2024 08:28:45 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:44 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 14/16] arm64: dts: renesas: r9a08g045: Add USB support Date: Thu, 22 Aug 2024 18:27:59 +0300 Message-Id: <20240822152801.602318-15-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082846_640504_9A53672B X-CRM114-Status: GOOD ( 11.81 ) 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 From: Claudiu Beznea Add USB nodes for the Renesas RZ/G3S SoC. This consists of PHY reset, host and device support. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi index cd7cefdb2bab..c6c279dffccf 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -7,6 +7,7 @@ #include #include +#include / { compatible = "renesas,r9a08g045"; @@ -265,6 +266,124 @@ eth1: ethernet@11c40000 { status = "disabled"; }; + phyrst: usbphy-ctrl@11e00000 { + compatible = "renesas,r9a08g045-usbphy-ctrl"; + reg = <0 0x11e00000 0 0x10000>; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>; + resets = <&cpg R9A08G045_USB_PRESETN>, + <&sysc R9A08G045_SYSC_RESET_USB>; + power-domains = <&cpg>; + #reset-cells = <1>; + status = "disabled"; + + usb0_vbus_otg: regulator-vbus { + regulator-name = "vbus"; + }; + }; + + ohci0: usb@11e10000 { + compatible = "generic-ohci"; + reg = <0 0x11e10000 0 0x100>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets = <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + phys = <&usb2_phy0 1>; + phy-names = "usb"; + power-domains = <&cpg>; + status = "disabled"; + }; + + ehci0: usb@11e10100 { + compatible = "generic-ehci"; + reg = <0 0x11e10100 0 0x100>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets = <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + phys = <&usb2_phy0 2>; + phy-names = "usb"; + companion = <&ohci0>; + power-domains = <&cpg>; + status = "disabled"; + }; + + usb2_phy0: usb-phy@11e10200 { + compatible = "renesas,usb2-phy-r9a08g045"; + reg = <0 0x11e10200 0 0x700>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets = <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + #phy-cells = <1>; + power-domains = <&cpg>; + status = "disabled"; + }; + + hsusb: usb@11e20000 { + compatible = "renesas,usbhs-r9a08g045", + "renesas,rzg2l-usbhs"; + reg = <0 0x11e20000 0 0x10000>; + interrupts = , + , + , + ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2P_EXR_CPUCLK>; + resets = <&phyrst 0>, + <&cpg R9A08G045_USB_U2P_EXL_SYSRST>; + renesas,buswait = <7>; + phys = <&usb2_phy0 3>; + phy-names = "usb"; + power-domains = <&cpg>; + status = "disabled"; + }; + + ohci1: usb@11e30000 { + compatible = "generic-ohci"; + reg = <0 0x11e30000 0 0x100>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets = <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + phys = <&usb2_phy1 1>; + phy-names = "usb"; + power-domains = <&cpg>; + status = "disabled"; + }; + + ehci1: usb@11e30100 { + compatible = "generic-ehci"; + reg = <0 0x11e30100 0 0x100>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets = <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + phys = <&usb2_phy1 2>; + phy-names = "usb"; + companion = <&ohci1>; + power-domains = <&cpg>; + status = "disabled"; + }; + + usb2_phy1: usb-phy@11e30200 { + compatible = "renesas,usb2-phy-r9a08g045"; + reg = <0 0x11e30200 0 0x700>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets = <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + #phy-cells = <1>; + power-domains = <&cpg>; + status = "disabled"; + }; + gic: interrupt-controller@12400000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>; From patchwork Thu Aug 22 15:28:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773889 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 650D2C3DA4A for ; Thu, 22 Aug 2024 15:55:58 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dHeWW2RAWv56keT/WvGpAcv9ZdqYWF6HJpLE3tjHw58=; b=iG+gl6NrX4BELrls8qV/UBwEUb k6I9bbqGmpym4hl9Zxxw+FoLG5dAj+bJY76r6wjE9tSUSoAEVMI+fXdv51spuJA/z5GSwasa4a7Tg NTCAZWBSbLzvodF9t4UnHGdkiiWXyi7OoKwI9qdfqt7s6f0UA2qd07/vdyL4YaNvqYrFy3zxwGI0T CbAvl+v0K+1piEeHzaj7kRkD/9uweOQF5ipUftyG535T/fTb/w4RKQiwEdei0TL+X0Wu6hvxLZocY ITgRvvhO28uldZ7ldPAlMKmBbHP5/x9O8ja1tZJPI+7Ga9rKTarfwd95BR9NXGb0eM5FtZpPxMir1 u0u8ih4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shAA2-0000000DSVA-0RdF; Thu, 22 Aug 2024 15:55:42 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9k1-0000000DKyg-2nih for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:51 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-428101fa30aso7491625e9.3 for ; Thu, 22 Aug 2024 08:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340528; x=1724945328; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dHeWW2RAWv56keT/WvGpAcv9ZdqYWF6HJpLE3tjHw58=; b=TP0GrLYswihg+L8Dy4A0+5I+tHUkGlrZsV3Cid4kd74L1GefOKMO4WLpZCLiIXroAR BG3WLrCXx5mwaPBwUyH0Uv+k5DmP11SzsSunjpbZAzF1duWcrJd5ev8yxzhtj3jCe1rA hITHIo3fjlLp1zKyJtDiR8YwMzdbvMDbWNWIKkWfDGdeC6bBYlKsEWdQf1dTlGtOaGPC 18mU6iTQAvrI+URto99h6b6nLtDQWqVRZ5SfIkBdu0HkD0osx3TR6WHgd32/QpIhlk5X MRTFJ+Kdsl5YsP7mY6N3W+nZEvZS+B8t9BKNWJucRJqMwVWXlrDGxS4DTr2dMmy7EAU3 OZuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340528; x=1724945328; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dHeWW2RAWv56keT/WvGpAcv9ZdqYWF6HJpLE3tjHw58=; b=s/KclH0ZnouQcixpTrek1NmpmNN+9ySpD78E24T/jkvG+uKhMrYRl2OdpI9RK5JHk0 gH+/JqqXbQlBQLoDlo5+Dgh0KyziQ/yi/FcB+42Hx3IEP/lU5gHU+w45jCpOn+qXb/C5 CWMDcPtx/Fnp1wmSDq8GIuAapj5HLW4+iqHROAzEiTwurio+T9yH9sH0GUAOm2k73hGq o6pvIt+pmepH0acHOGEzgC5s3afCjm5pTShl9nc9Oy9txEkCt7PLf+O0LWTccoNkAgqC eM6ka88sLlKL82Vldl4zZbFcXp7KJAgOB0zcGqHL6pUD+5MWaFdJdMAyQ9knBnWHn8+v ZtqA== X-Forwarded-Encrypted: i=1; AJvYcCWrobOIQX+E96Hqir/3JL8TZqWDCatwu/kC3HSmaNYVp0f+Yt/uLGJWToRGfb8nfs5bKrD1tdoTsitV8iXa+m6j@lists.infradead.org X-Gm-Message-State: AOJu0YzRC130PMUWAGT5Nt5sUxhEPGoG4HWScJVgtn6y3xWGi11s+eoT 8e6DScnZ28vtaAQ1Hloh0vRf1IdddWmkR03I0M22E+zR7ZwJ3gLYUMQ8hBlUX90= X-Google-Smtp-Source: AGHT+IEpM56P+rOfWzF8q9z39ghmNLCQnzP/RLGHl+du2H4z+ac9zrTbNQqtdYtd7xDVKiZkepmRnQ== X-Received: by 2002:a05:6000:110b:b0:371:8e50:2d08 with SMTP id ffacd0b85a97d-372fd720340mr3982596f8f.38.1724340527530; Thu, 22 Aug 2024 08:28:47 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:46 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 15/16] arm64: dts: renesas: rzg3s-smarc: Enable USB support Date: Thu, 22 Aug 2024 18:28:00 +0300 Message-Id: <20240822152801.602318-16-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082849_716825_0AE0DDBD X-CRM114-Status: GOOD ( 10.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 From: Claudiu Beznea Enable USB support (host, device, USB PHYs and sysc). Signed-off-by: Claudiu Beznea --- arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi index deb2ad37bb2e..fd9355936803 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -66,6 +66,29 @@ vccq_sdhi1: regulator-vccq-sdhi1 { }; }; +&ehci0 { + dr_mode = "otg"; + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&hsusb { + dr_mode = "otg"; + status = "okay"; +}; + +&ohci0 { + dr_mode = "otg"; + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + &pinctrl { key-1-gpio-hog { gpio-hog; @@ -124,6 +147,27 @@ cd { pinmux = ; /* SD1_CD */ }; }; + + usb0_pins: usb0 { + peri { + pinmux = , /* VBUS */ + ; /* OVC */ + }; + + otg { + pinmux = ; /* OTG_ID */ + bias-pull-up; + }; + }; + + usb1_pins: usb1 { + pinmux = , /* OVC */ + ; /* VBUS */ + }; +}; + +&phyrst { + status = "okay"; }; &scif0 { @@ -144,3 +188,20 @@ &sdhi1 { max-frequency = <125000000>; status = "okay"; }; + +&sysc { + status = "okay"; +}; + +&usb2_phy0 { + pinctrl-0 = <&usb0_pins>; + pinctrl-names = "default"; + vbus-supply = <&usb0_vbus_otg>; + status = "okay"; +}; + +&usb2_phy1 { + pinctrl-0 = <&usb1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; From patchwork Thu Aug 22 15:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13773890 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 DC48FC52D7C for ; Thu, 22 Aug 2024 15:56:02 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YzzVJZseYqmAj3uluQhRMecpWI1dTsj4zEH1FZKD0d4=; b=ggddDDjtn7IZUNzlh2VUzIzi9J bI0Hw8IaUMvfmVZdA4VQfp2kXWD9UIzrnBLlTEnkEWCqG8tqTU07WgkSmHjDktqR+iqdGJcA9tfcH HdN3OmHlp09M4sc2/41MCyvEm2nBirXh9OpCCMCJ1iUAR1cELTk2jC/yA+98XDQ0n7x8yNK4widL2 Wy9AhfK/6R+cREvgGcGU/kMDR/J3USzTqXVt8uZouO5a57xW9dVQ1KYcotJun1SfeeAdW5SYE9pEG sEf8l9C29dhKLANJ5yyaw2/YQW+6HuhKVWE8p0vvceH174ZqDFErUQuWxDQ32GZk/hFqhxua2rpdx jlnh3bRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shAA7-0000000DSb3-45WZ; Thu, 22 Aug 2024 15:55:47 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9k4-0000000DL06-0KaX for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:28:53 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-371b015572cso630395f8f.1 for ; Thu, 22 Aug 2024 08:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1724340530; x=1724945330; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YzzVJZseYqmAj3uluQhRMecpWI1dTsj4zEH1FZKD0d4=; b=bxMKUPzE9JSNKGOQ3a9lcSksRoLDFoTTUsmoOCPG46CPPYtpnWzgi+ZqFcLLJBR/cS bo4qr8yUsNN6EBDCvj+Ml2YtPlzjg2AlzL1VLAvluspTz9UNcSYg1LSz7R9XNOHG2Qt7 +og9QFofvPpz2hzqtK67NZRRN7EBT0CiZxhFYggL88B9yoQQboB/gZwGLPL7n8dl+NLM wbu14t+uysEw1X7oNgcMyTXsMBRve3/9vmXy0njS90V5vGIrdqz58a9mlYZPeIWKhRL1 G8K0YZkw7Xz7NiEUV/MMntk77dWiK3jEL+84w+ioK9gvlPfQ2hvafHcmDtW6c3kO66YR 8fFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724340530; x=1724945330; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YzzVJZseYqmAj3uluQhRMecpWI1dTsj4zEH1FZKD0d4=; b=fzSTPr09x24FiF461KEh959uzC0lP0f8Azs+BI7k0YcpkIcwSN/uFDjMpm7Btk8Wlz 1ABaXGNobfp22Onn0lGJg0gwE1eLw1W8GS+xvs76ebkOQtodWlRGHgVWdl2PVGpRAf8E 5Plft75I+YE4XCcMWIMPjhDCff7I3J+YPLXnDPodhyUUs3ha5lkn5VbVO4IsBJIO3EwI fWm1UcxmOmUh/l0C7z2voml8G+EmrDd+DPKsA/OCKEvj2xkMuojvx9XXbATf+HE8x1Mj 8Tf3nsmCgNG2Ah8x2cCaMMxk1Kb2ELjvQmOQ6OopcbDeJ4eZr1nK/uYJ21B4g+ujnDLz 1jig== X-Forwarded-Encrypted: i=1; AJvYcCWu/RxoE8vOeOdW9hNH3X3rgqKzvTZ/wQHdo0b7/3Vna5QXDEyOw1DyAqVlhgGNYvZ62G++i+xAUFsyViKA1eVG@lists.infradead.org X-Gm-Message-State: AOJu0Yz3xmgwXIHCAx/hxZiMJjWMaYeTlkh/HWYq/hWihjIkn4E7RmdB c7yT8V6UDxzLzWGJ2FBx/CW9QsBBlJ155hSw8GVwHQQ34BC5gHk5Dsr79X0T0L8= X-Google-Smtp-Source: AGHT+IHCUCn+biQIAnOUlxWOCjXAVeKX8ey9d7uY1NWlOsuugSxvOZNpC2pcgsn0KfGk8KOYuf8lZQ== X-Received: by 2002:adf:a416:0:b0:36b:3395:5363 with SMTP id ffacd0b85a97d-37308c1826emr1937317f8f.16.1724340529907; Thu, 22 Aug 2024 08:28:49 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484dc5sm134189166b.171.2024.08.22.08.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 08:28:49 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: 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.uh@renesas.com, biju.das.jz@bp.renesas.com, ulf.hansson@linaro.org Cc: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH 16/16] arm64: defconfig: Enable RZ/G3S SYSC reset driver Date: Thu, 22 Aug 2024 18:28:01 +0300 Message-Id: <20240822152801.602318-17-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> References: <20240822152801.602318-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_082852_152477_FE93FA3C X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. 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 From: Claudiu Beznea Enable RZ/G3S SYSC reset driver. This exports the control to 2 signals (one for USB, one for PCI). Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 7d32fca64996..4720367a41ea 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1510,6 +1510,7 @@ CONFIG_RESET_IMX7=y CONFIG_RESET_QCOM_AOSS=y CONFIG_RESET_QCOM_PDC=m CONFIG_RESET_RZG2L_USBPHY_CTRL=y +CONFIG_RESET_RZG3S_SYSC=y CONFIG_RESET_TI_SCI=y CONFIG_PHY_XGENE=y CONFIG_PHY_CAN_TRANSCEIVER=m