From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F79E28E00 for ; Thu, 23 Oct 2025 13:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227910; cv=none; b=TQ6DqSmeiAWNNW1ixepPXbSz2vnu1we6ySMQS2AXehT/d9/X+NGqUCeBIXuKf0MaS9rVr6o8bg3rVPNggCCTabsa6uCAJe1d8prADkQisEOJI76bGI6oxIKkgtLs3Ix3g9+oces/sW5wcAJyJi5Q0Mis/RW1kBogX6CXSXXwHpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227910; c=relaxed/simple; bh=/jPm6jH+d13noCe9SKn4mrnwnuDsNjdGPU/d9Ul9H6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sq/4txS0TuPqGe0oCdGvWJKuOuZefMELijSvh/3KjUkjzeIbA63qk04E4qJfZKwx0ZlVwH0gJkSUkWZYX802yicbkUhkYUS0lv0nhWfc8cVF+BFUiARcJG/pD25PBWdspXb6i5qWbCZKOy71sshP/T8fCSlDVCafRQZrkuvJEaA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=pg1y0IDU; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="pg1y0IDU" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-b6d345d7ff7so88439766b.1 for ; Thu, 23 Oct 2025 06:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227906; x=1761832706; darn=vger.kernel.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=mcs7Y+EttDztrEgb0m4AiPh1csnrxylUuqHzrjAxJgY=; b=pg1y0IDU42Q63ySQjK8xYqBMTr+J+75fH3VLzWrgauSbvcV1Nm62SDXq8SKumILzks WE3K3r/8FdZpx0Tc9Ojiob8wqG1jKbKpPdeleKKo72e+zWH4KQg+nbGkeIxXyg4Xmejm tTfGubpGPwBOdLRttoVKOfy4M4iDUcRpeoCYc84Gu3KTyLw/i0pJTzGR3Au60Kn4mDv+ VfsZUy3nxn4wdcUj2UmU0e4NSKhPvb/vsZdVS+D4ANWNzCdUaF/rsOww/dTyp3Dyx6Yi vbnvAD4dLAfavtq6mJJA5chHn7QWiJQB7rvsOmfpixshc01bU5hOZmSVfhene/SNLpCF 1fPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227906; x=1761832706; 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=mcs7Y+EttDztrEgb0m4AiPh1csnrxylUuqHzrjAxJgY=; b=G9xIBVDEL8Y7OaVI4EigG7i1K5idzTBC9D7ocn+7QD9Bn8ZblSgQqCUFEpeipzi0Io vri2ZgGrMcGO+Ql/AQO5SbTz1EHnlZMptAtJNfAuwSs5O+i2SssOWoG7RR2U+96DVbpx J9XxtqE1OPgh5J8aK2Vj+oUyepJN9OcZpEVCgqxXbFjfGBqd1/U9qtnS0zSv7o4RICBr Shkr38tIZo7W9TBQm93/7CXXcpQrzwzdwt73vL7W4JK7MNCr3PYB6L1L0crWtk8K3Zk8 9DcPv4MO3pergILeHXpqMNgHWMBDW7SJ35Go3PBhvZkQ13Jpb38oLLGd0JoBYiwssfCD NBNw== X-Forwarded-Encrypted: i=1; AJvYcCUl6io0Dtqkh1TYduHPaZPPhRi11wjw+LpmbXiTsi9KqJNq2Kh5L+4S9ME5NYSr2e0nBDqympc8t6JVDbw=@vger.kernel.org X-Gm-Message-State: AOJu0YwKjiWM37GOFTiwMUcwDTs024ixNPl+/4acupzPhODbRvkp4l7V AMNHIbOdnghLBuQwQAkDFNRRzs7Y8qFhwofKvz7AhuqOpQtb9ukkE0aAssN1Jr2Co4o= X-Gm-Gg: ASbGncvL2O14QD6gqUiIU7bGGj/XzR7D12SlJIjd8iPADu/S6aVtE1o7EGXWaQfleEQ Zi5bXUtFrfff+obtkktcP5y2rN73oBmO1p09nUMoY+H9Pno6gvREAK6BcPX4lRsGC4nGHab75ZV JH1bQZ8Dz9X5/T7V65XdOsJ1XSDkO8EzSc+vjygzbOEAucfaYGy+BsDrLF/LJ3WSXzbo7wDmH9N j7RPJ5yv64Lps3Wuww1aFwX9qfNI5dWJBAccFm37z7TWIR8LL6apEg8pjrGAThOLh3E0Ip3WdPo PzXMx5qwHBz4Ty05y5P8pXxKbci1d+fGZxy2xBmEbac+ibwn7tNGkGqT9zYIZB1k5+f9PM5gqgM M72BgN3iwefYrKAD1pFZNjOD5MIDqLSm6dk2Da1cAcGhT4Qj1lzGRrtWwACxYz4XWBeKF9uXtIb 2G/Uyl7MIDlmU0hpfORhO1rYHalciR37jM8cPYqfG8 X-Google-Smtp-Source: AGHT+IErl4KxFsPoyMcgmYdHQ18H8eQgx+LzGITPImiQSgQDh6xe3/IOiWXni9Y5LKEyJSLxqP3qGQ== X-Received: by 2002:a17:907:72c4:b0:b29:57b0:617f with SMTP id a640c23a62f3a-b6d2c6df653mr921330166b.1.1761227905751; Thu, 23 Oct 2025 06:58:25 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58:24 -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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea , Conor Dooley Subject: [PATCH v8 1/7] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S Date: Thu, 23 Oct 2025 16:58:04 +0300 Message-ID: <20251023135810.1688415-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The reset lines are mandatory for the Renesas RZ/G3S platform and must be explicitly defined in device tree. Fixes: f3c849855114 ("dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S p= hy bindings") Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - dropped Tb tag as it was reported that it is not valid on bindings Changes in v6: - collected tags Changes in v5: - none Changes in v4: - none Changes in v3: - collected tags - rebased on top of latest version of renesas,usb2-phy.yaml; Conor, Geert: I kept your tags; please let me know if you consider it otherwise Changes in v2: - none; this patch is new Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/= Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml index 179cb4bfc424..2bbec8702a1e 100644 --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml @@ -118,6 +118,7 @@ allOf: contains: enum: - renesas,usb2-phy-r9a09g057 + - renesas,usb2-phy-r9a08g045 - renesas,rzg2l-usb2-phy then: properties: --=20 2.43.0 From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 385A5320A15 for ; Thu, 23 Oct 2025 13:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227913; cv=none; b=CNgZxeaAfDyyt3i8blo2lZxmadtkARdICKb5NZMQ6Y6EOPMAi8+awNCVlb74oUf8QeaPqnG1DnE6asiDeNl/1DhgyQuVK2JDzvDxblmHkXQoMb5WaV5Gu6DQGk0fK71JpwlKUQcGPNLuNofHsYRtEQdbc0IH2o3UldGPlcSglxs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227913; c=relaxed/simple; bh=7pVJRtjZLD5TeJtHqNBvULeyoq1fs96v67StzdBP0ew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jLyCimgPRZ17PKOUDZgP+9z1P16xThOnRF63HCqPC+kEWsOiaGNv3+CLm4VfTVKf5t1QnH25WwijBFPW9hXFHKqWOvoWaycVunacCVnPiU28BwD/OLmqKwuLsQHuWLc6NhPIn37vMm26v8Qo/sRDiKHdmEJVh2owAcPHbSqLs2s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=LQJ+609g; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="LQJ+609g" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-6399328ff1fso1590140a12.0 for ; Thu, 23 Oct 2025 06:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227910; x=1761832710; darn=vger.kernel.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=hv0OLxIw6eR8M9PP1FC7Hsyw74xGUijbxOyWvfPyb1o=; b=LQJ+609go0icKvbN8Uet5pMxn6/AlqaTxce8+pasVmB3ZC3AXx9YRuqHgprqUefdSc fchfo24fM+lRAIqszy2WljET4L+jwM1j+g9rSazouUO6NHljr4yZbD7Oz7WtI8f6RLIN gKKSzgpTZIt94BUxo/rhy6ka4hntaQMNwAVYGy8GzS8ttg+qRsaqR4OmJN9CUMNptu+W XUfwLQVm2Uv5GhFSzIeUw8vzm2dazWlYJcm405nJswMHfZel4Cy0IJtz51qfTx/bq+sw 55nrg5PAu0nwGeA82ZGAVPzJQf0GF3tD5wnTvYKq6/vnMK/jo5laLeuTdW4/7e8Brdss LzJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227910; x=1761832710; 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=hv0OLxIw6eR8M9PP1FC7Hsyw74xGUijbxOyWvfPyb1o=; b=HGHasg3sSeP8WaC3fSYqjUm48/xJ1IIx4RrxPFsvCcQAwU0kMWZkejb4AVdVcg9diT if8c8SHyNv+CGI16/GsaCXJetrAjgQCciWUMrkMhQBIP6NNSDzt/sBup1PExOavNvNh5 Y+BZzInGLdAncDVGBg9nX0AAbRX/w3+cb61qLMcrD8IDS+qgB47W+a7HDmElOgW6cHtS iCeiuoWdCeelU+ElGavRWsXuysIynHOo5G550al6uJ/CXDM7urPt250pI81i4fXKtyog Ic318IcUPHnz+ucdbEEtOf6VvTtNUyh0vvutX/8I1lFqDChW6vNi6Q4MYgF2Z+ga8U3B vf/w== X-Forwarded-Encrypted: i=1; AJvYcCUKvQTk94T5XNYtWdIESkNdeLBnTrn+wDZsZHW5wXPXM2Moow5SKgNBFbN/qjB2jnA7kqiMcVAAGox03ns=@vger.kernel.org X-Gm-Message-State: AOJu0YwLYB7KMT/NnBQGoPhEjFbdXFSHLL+MjLwkve1Vui0OrPxhVLfg d305yAkCCo69r3IYKNFVjqfaFBC9nZUp7QAw3JegYFr6YBK2nGS5961/E5Y/9AjhMRE= X-Gm-Gg: ASbGncsyUq4it3+dz9L90PLJ8f67w30aJc88jhjJUOOlFAwIAocmmH+dYOHLdYnPI6l fDPQYT9IYo+hdfyYGyWE8gKF8h4onOpRrd7US2bjXpFb4MahGBvvAI3uvmOCu+vL3anyRk9V8yE 4s315tIwS8olAUWsQYaR4Nwtt2LDQ236E2AMdk6PkP/NHkA9zRZRB82EMk1ibwt+w9urJhur6xq hy63JHV2Z9/WpSepecM+IZFaitSMujyp4flYRmv8r63/DtzeUT7c6ZThxmS6SDErPUj6w4J95fV mhQ84fjOnl0UJ9aRp2S245mBdPldl03VqIKRVIleDDMDfCn0gbLXpaK6ZzOJ0fnzxHKkELZHgmF M/Eo+Ve+gJxTfaV68dps2c8BazHR1Odoh/e41WLXs4anEN9/BjbceU+9ykZ5qShyZOc3Uwy6Yby 7sP58rjwjyBYB1/D9OaIjQKScQR4hnUe9DBMLNA1Wk X-Google-Smtp-Source: AGHT+IF5LB7zjNrRLkZ5eXQ1A6Lm7xHSr+oOpxBpiq+5BFOfT5pJDhYCz3rgr76zPso7ExfB4BpJ+Q== X-Received: by 2002:a17:906:730f:b0:afe:7b8c:a583 with SMTP id a640c23a62f3a-b647403a645mr3069948666b.13.1761227909653; Thu, 23 Oct 2025 06:58:29 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58:28 -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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Christophe JAILLET , Wolfram Sang , Claudiu Beznea Subject: [PATCH v8 2/7] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe() Date: Thu, 23 Oct 2025 16:58:05 +0300 Message-ID: <20251023135810.1688415-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Christophe JAILLET If an error occurs after the reset_control_deassert(), reset_control_assert() must be called, as already done in the remove function. Use devm_add_action_or_reset() to add the missing call and simplify the .remove() function accordingly. While at it, drop struct rcar_gen3_chan::rstc as it is not used aymore. Fixes: 4eae16375357 ("phy: renesas: rcar-gen3-usb2: Add support to initiali= ze the bus") Signed-off-by: Christophe JAILLET Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Tested-by: Wolfram Sang [claudiu.beznea: removed "struct reset_control *rstc =3D data;" from rcar_gen3_reset_assert(), dropped struct rcar_gen3_chan::rstc] Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - dropped struct rcar_gen3_chan::rstc; updated the patch description to reflect it - collected tags Changes in v5: - none Changes in v4: - none Changes in v3: - collected tags Changes in v2: - none; this patch is new; re-spinned the Christophe's work at https://lore.kernel.org/all/TYCPR01MB113329930BA5E2149C9BE2A1986672@TYCPR= 01MB11332.jpnprd01.prod.outlook.com/ =20 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas= /phy-rcar-gen3-usb2.c index 3f6b480e1092..a38ead7c8055 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -134,7 +134,6 @@ 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; spinlock_t lock; /* protects access to hardware and driver data structure= . */ enum usb_dr_mode dr_mode; @@ -771,21 +770,31 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct = device_node *np) return candidate; } =20 +static void rcar_gen3_reset_assert(void *data) +{ + reset_control_assert(data); +} + static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel) { struct device *dev =3D channel->dev; + struct reset_control *rstc; int ret; u32 val; =20 - channel->rstc =3D devm_reset_control_array_get_shared(dev); - if (IS_ERR(channel->rstc)) - return PTR_ERR(channel->rstc); + rstc =3D devm_reset_control_array_get_shared(dev); + if (IS_ERR(rstc)) + return PTR_ERR(rstc); =20 ret =3D pm_runtime_resume_and_get(dev); if (ret) return ret; =20 - ret =3D reset_control_deassert(channel->rstc); + ret =3D reset_control_deassert(rstc); + if (ret) + goto rpm_put; + + ret =3D devm_add_action_or_reset(dev, rcar_gen3_reset_assert, rstc); if (ret) goto rpm_put; =20 @@ -924,7 +933,6 @@ static void rcar_gen3_phy_usb2_remove(struct platform_d= evice *pdev) if (channel->is_otg_channel) device_remove_file(&pdev->dev, &dev_attr_role); =20 - reset_control_assert(channel->rstc); pm_runtime_disable(&pdev->dev); }; =20 --=20 2.43.0 From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A85C31A072 for ; Thu, 23 Oct 2025 13:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227915; cv=none; b=bveFJE5+qcL9BeQ/efgCgc5feS1UMJc3eKhsdOMwIu2zmc66miL9XmOpQgXueTV1ymHdMCDU12tedPuIX0Cujh30MbgEROXKqk4yQQzzbwtTo7dva2O/BVyQI3BtZXCTupALRCDNwy3noIngVHCHuqg7Y8MM3oAXFsOupZweOw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227915; c=relaxed/simple; bh=RP8a8zuf1k1PEjcvlI/NCNsC1HRv3VhEnHagA2m9GFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a6OYuZCHDOwX+a24lyObpdA+pqO63jAaXwJLcPWKthh+yIFH17HINQvD6HhP87l1id13W0eM39tLZctlYEcuJJKGxeLFz6Z7xZP3BF2BmSUwXRJ3phBRRvTDA80+OcXAwOj0I2rz2C+EgDiTO8X3ReaL0NlyaEkRWTRPewwqg+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Klomd+Rx; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Klomd+Rx" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-b3e234fcd4bso159432566b.3 for ; Thu, 23 Oct 2025 06:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227911; x=1761832711; darn=vger.kernel.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=w0ptn8E/LhDaocVN69/KiZrW/OIwIcPB5zTMwm1G3mY=; b=Klomd+RxX2f0fd1QiAgAJ9RBrqtrzV5Pdskyi4fO7Hw4nDt0xTw3bXBnp4rvaFHkaq WVYea7NJ0Zda3Zzs8nnAAH7N7V+ek2WNnWNGkurd0SJVS5L6RtwIrEkq7syoAfw6X3Db 1xpfmftl9LMAnJ6riGN5iVhMBIlic/iD3p8fmi5fKDvAOsV7vImI4MD+jkcJpm/DwRt3 M3F3k/JjcWxF+Keny5V9AC/wf8WFoMJDrb8tUtOiLLACuRGL6IoEEajEhULP26PgVcdy vd+v/MTTWTHnkVLh0dHhookFx1F1PhO3kYnVWEHAdjsx2NHUU0uJOMIVolAaLLpY1mVl 0jsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227911; x=1761832711; 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=w0ptn8E/LhDaocVN69/KiZrW/OIwIcPB5zTMwm1G3mY=; b=C0TKhivL2XLDw53qHakA3rdKs1Na0QNxLpfD4bFvAiN13e7yINlp9V0qGUP2PAcB9X VecztFgSNtgAZt7JcSkhfrjJt2Pj2Dj/VDfcHI8Httki1Mk58hr+eMQCRM8tfymX5r9I 4fO/dhycle/ae9Ajcf5OSwJ6DYA1VgKIfRpt5mjH4CPsRqFTfaE+bisPq/ujs+we+1zd jUbxVmvhyikmZWK3uIycHvf/PFRZr5CMbnr4tERk0/jpiLVaBper3jUy7Hs7A3dgws2b 0Jn+iVxfsAWPASjt5wVTkB1QVxEPA7xfnzG1+12T5A6NA1t7uCBf9OqXg72BOVNakIH5 4ejQ== X-Forwarded-Encrypted: i=1; AJvYcCXRpLQKS9nl1YbuvRVXtU6yE2NBikbIhzMlyxVB7pRd04RosDk50ObI3Ag25zoGHvlL7gnH9Q1B8naQSZE=@vger.kernel.org X-Gm-Message-State: AOJu0YwfIjpQ/lspyJ/XtPH1gW1R3A2urFIumo3+Mqyok10P7l/IiGB2 Fft1k+WZF+BulJaH3hAHHF0gRsO5/4i2sbuDcPxbJ4yWNDJAXZOz6KxmaUv9am4dJh0= X-Gm-Gg: ASbGncum7CaY5IFuBouPED1ktmxow/PbJIdx0kkel54OrzIaig8Lt+ti9XmJrF7f5ig Cn7KTk0pkx9MkXg62k8CJkgVNvRwhPx3rBzGu7+VdXDCadLw2V0DgYL0zTAIo2wWBKbzzHOL4GH WpfwyrhXZIL14BhyiRELlcN0jdC4m/obCwL54vlN3B1weGF47YKvveJ1pEzP0XnoJpk4zLrdLQ3 ykI2AiMGURH79KKbxr8FACCBQH1Peb+igg0XZrf0KL0bLG01BmnwAra7wikpzrDl+Ca9jvdL4Kw HWLEtiXcEVN7xDtSMJAALCclE3Hf/ZeCPfaNohaXkl3aVGlw9O0p64FaToYUoN8r2uJVTOG3u2F Il/bRH1RmnBE8Zyz285T3UKqGPa9wG/lPqRb2A/pl4rA+5YkApSGYy0UJ1WUtYghfAFLE1+Aj/a fHOpCqoMadky06LwItGe0EkcyGz0ckqgQar5URKCv+ X-Google-Smtp-Source: AGHT+IH5zxAjIq0T7KqfSxfMMJDn8BjHIDOb4sW4dH03nN6pd1cSkApPwJS1N7LfAd+GxeG4RMRMMw== X-Received: by 2002:a17:907:9816:b0:b6d:5bc3:e158 with SMTP id a640c23a62f3a-b6d5bc3e4eemr167216766b.17.1761227911453; Thu, 23 Oct 2025 06:58:31 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58: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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea Subject: [PATCH v8 3/7] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support Date: Thu, 23 Oct 2025 16:58:06 +0300 Message-ID: <20251023135810.1688415-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The Renesas USB PHY hardware block needs to have the PWRRDY bit in the system controller set before applying any other settings. The PWRRDY bit must be controlled during power-on, power-off, and system suspend/resume sequences as follows: - during power-on/resume, it must be set to zero before enabling clocks and modules - during power-off/suspend, it must be set to one after disabling clocks and modules Add the renesas,sysc-pwrrdy device tree property, which allows the reset-rzg2l-usbphy-ctrl driver to parse, map, and control the system controller PWRRDY bit at the appropriate time. Along with it add a new compatible for the RZ/G3S SoC. Reviewed-by: Rob Herring (Arm) Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - dropped Tb tag as it was reported that it is not valid on bindings Changes in v6: - collected tags Changes in v5: - fixed description formatting - collected tags Changes in v4: - dropped blank line from compatible section - s/renesas,sysc-signals/renesas,sysc-pwrrdy/g - dropped description from renesas,sysc-pwrrdy - updated description of renesas,sysc-pwrrdy items - updated patch description Changes in v3: - none; this patch is new .../reset/renesas,rzg2l-usbphy-ctrl.yaml | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-c= trl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctr= l.yaml index b0b20af15313..c83469a1b379 100644 --- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml +++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml @@ -15,12 +15,14 @@ description: =20 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: + - 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 + - const: renesas,r9a08g045-usbphy-ctrl # RZ/G3S =20 reg: maxItems: 1 @@ -48,6 +50,20 @@ properties: $ref: /schemas/regulator/regulator.yaml# unevaluatedProperties: false =20 + renesas,sysc-pwrrdy: + description: + The system controller PWRRDY indicates to the USB PHY if the power s= upply + is ready. PWRRDY needs to be set during power-on before applying any + other settings. It also needs to be set before powering off the USB. + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: + System controller phandle required by USB PHY CTRL driver to= set + PWRRDY + - description: Register offset associated with PWRRDY + - description: Register bitmask associated with PWRRDY + required: - compatible - reg @@ -57,6 +73,19 @@ required: - '#reset-cells' - regulator-vbus =20 +allOf: + - if: + properties: + compatible: + contains: + const: renesas,r9a08g045-usbphy-ctrl + then: + required: + - renesas,sysc-pwrrdy + else: + properties: + renesas,sysc-pwrrdy: false + additionalProperties: false =20 examples: --=20 2.43.0 From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15DB8320CC0 for ; Thu, 23 Oct 2025 13:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227917; cv=none; b=ImTDMAre2Te3N6Z93UuQy43ybji0TxacKwzfIQElnAqtOp4XyE7ackWdzxu9SEuiq2YK4CjVOoRUlIlOBqis7cDRpcdvRZiirF8NHUMGiloitDBvhW8jVi17MTAJ0sQbYG4VtkzLJMnGt+/flQBsoG50DBhDcIffDLgM22vaJWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227917; c=relaxed/simple; bh=292vCK5mpBOx2Tupx64vngytF4gnLualvVUEwBWU/to=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ppm1UJj9TYecqmVSB+kBaGyQBgTeRbaDMb2w+WoOi7Q4hAv91Vr7lzLLN/iUg9cU80wvpUEGuFO3CoxHoqefF9g5y1Q3ND33T5weHYdZegZIC/B7B7DRcw24h7kE0kQx7ZpCG/QVka19wAzeqd6j5kW8WMcjbjhF8YXkdDhLYEg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=HS4ZHeA4; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="HS4ZHeA4" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-b5b823b4f3dso160841466b.3 for ; Thu, 23 Oct 2025 06:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227913; x=1761832713; darn=vger.kernel.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=ECxRdi5HH+Y1BbJYjbyAcCHCuJXoR1zvOVp1BwxUGOM=; b=HS4ZHeA42MD6JHFB6QAwiA20GxlI8O2DXQqo+tRV6VMpgtyYn5BK2lZszq9fQUlt2w A50r9G0OLGqr7xyKtq+ln+zwItHV0k1VczfMzkEGYH0gDYNiDukBmbSADJzoM1YwIhHd plHJ3Rlwx6Y3jVo1r4FNPOuPZT857bx7PAN5XTBqpEYs6yNDpz7rQD8WDHYJbnjswtP2 QOhzuFyg9xmSfsAPe0jRKNMa5T/stRh3Obko11+dTB9CGg7dHf6xr/nPy8H8DWeFxCbO u9sRhGD7ntj6cQ6LNZ28K6k0UR0CzZGLaAQJ+lKUU4H/7qhoJaUnH/QTnsWbkAazyPn1 Z+TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227913; x=1761832713; 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=ECxRdi5HH+Y1BbJYjbyAcCHCuJXoR1zvOVp1BwxUGOM=; b=tEj7+6ouQv3Pq0GoRcZTsbkvL64FaA/yn/s2tlkcadGs8hmfgfrCK88eEGnxosW8Ep /89tn0P/vg963RnQ0BNVF5GQhqsFQrDbIGNmD+vmYMqWyER+P9wevsA5IixW4vVtGVQQ 9/on4M+dj+YNIyho5DKz/htGsFDYqqGDGAp0MoWKGrwDcFMB+cT68aHu3nnMtKoDRxYL NETmARD2ZmS0I87W08Y2npakfFaBbk1ALgTpgrMB3EQVOQAJ8jla9lGQkE4KWS/Nekzj FcF+9pxr6FnI5vhMAcX9p4bZ7Dy3cLng2GX2r4lL84SI1T1BvpbEl5B9pWZTAjUuXwi4 s3KA== X-Forwarded-Encrypted: i=1; AJvYcCXyz+fg59Ou7wWvGDdSXnBS9ZqwTWToRG+D+kp/baRDt+MBQrO7OS34hX+xxm6/NSdjC/sjUTHgksfW1j4=@vger.kernel.org X-Gm-Message-State: AOJu0YwjcqrobhCanN33FvTQXypuZIMhs7P+01bEIMvNVo0NtkEgr5YX F4FSJ2lzyp5XdC1sML8SXOTXb0gYpBK91XI4RhGwsafMIus7TGiVkhTxQeMmTi9P+kg= X-Gm-Gg: ASbGncuUl8ZAE1M9fNPxSu5ek+i2xRl3sfuHqMW1r59uGzC/bt8wv47Y87mocDVnKzt fu3D7R+n5dH5EsuACj9+GdDktE5hLkmHstwsI72kbKtnRxChquR3maOUbt+4OF3W50n9ZrPIjsP Funvol/PlcgaQXK0tuFjujFvOCFdfNKDndWOnyjiSF7fLr16hVvBuu2wjLIfND0G66nEl1Xvm10 ca/6TsD/HgtdN6eocq/LO2/krWj7X4HjiQ1Ps4oB3y3dYre0NMy4Sp7JJ85Kjd41wvewlzOztzN M1TayKfQaDfN4UhEjXoKRZnm5rNoaCiHRUQzRnCrl6TrCFA8OyEs7/FrbbsfRUAmi91Jq2VttwU SKEbbtDLYfj0HOTGCWiPNrof62kf6/FGGTApWWDhgwX6B02Xnv6hFadJl3gXqmptKBv2tk/jix6 jhBthpEtbymkbp4N/Wt8A6XryaxiOBnbObEdGyeJE4 X-Google-Smtp-Source: AGHT+IG0iSZWhMAUuwbkA8pJHid1t/y13SCmKcaPc9WJrK8PETA/yNl+KAMDTotEEe14viSY2gGdKA== X-Received: by 2002:a17:907:86a2:b0:b3d:9c3c:9ab6 with SMTP id a640c23a62f3a-b6473842ea5mr2737367466b.29.1761227913211; Thu, 23 Oct 2025 06:58:33 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58: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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea , Wolfram Sang Subject: [PATCH v8 4/7] reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY Date: Thu, 23 Oct 2025 16:58:07 +0300 Message-ID: <20251023135810.1688415-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Claudiu Beznea On the Renesas RZ/G3S SoC, the USB PHY block has an input signal called PWRRDY. This signal is managed by the system controller and must be de-asserted after powering on the area where USB PHY resides and asserted before powering it off. On power-on/resume the USB PWRRDY signal need to be de-asserted before enabling clock and switching the module to normal state (through MSTOP support). The power-on/resume configuration sequence must be: 1/ PWRRDY=3D0 2/ CLK_ON=3D1 3/ MSTOP=3D0 On power-off/suspend the configuration sequence should be: 1/ MSTOP=3D1 2/ CLK_ON=3D0 3/ PWRRDY=3D1 The CLK_ON and MSTOP functionalities are controlled by clock drivers. The suspend/resume support will be handled by different patches. After long discussions with the internal HW team, it has been confirmed that the HW connection b/w USB PHY block, the USB channels, the system controller, clock, MSTOP, PWRRDY signal is as follows: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=90 =E2=94=82 =E2= =94=82=E2=97=84=E2=94=80=E2=94=80 CPG_CLKON_USB.CLK0_ON =E2=94=82 USB CH0 =E2= =94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=90 =E2=94=82=E2=94=8C=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90= =E2=94=82=E2=97=84=E2=94=80=E2=94=80 CPG_CLKON_USB.CLK2_ON =E2=94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82=E2=94=82host control= ler registers =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82=E2=94=82fu= nction controller registers=E2=94=82 =E2=94=82 =E2=94=82 PHY0 =E2=94=82=E2=97=84=E2=94=80=E2= =94=80=E2=94=A4=E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=82 USB PHY =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=96=B2=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=82 =E2=94=82 CPG_BUS_PERI_COM_MSTOP.MSTO= P{6, 5}_ON =E2=94=82=E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =90 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=90 =E2=94=82=E2=94=82USHPHY control=E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82=E2=94=82 registers =E2=94=82 =E2=94=82 PHY1 =E2=94=82 =E2= =94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82=E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =98 =E2=94=82 =E2=94=82=E2=97=84=E2=94=80=E2=94=80=E2=94=A4 USB = CH1 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82=E2=94=8C=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=90 =E2=94=82=E2=97=84=E2=94=80=E2=94=80 CPG_CLKON_USB.CLK1_ON =E2=94=94=E2=94=80=E2=96=B2=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=96=B2=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=96=B2=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=98 =E2=94=82=E2=94=82 host controller registers = =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82=E2=94=94= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=96=B2=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94= =82 =E2=94=82 =E2=94=82 =E2=94=82 CPG_BUS_PERI_COM_MS= TOP.MSTOP7_ON =E2=94=82PWRRDY =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 CPG_CLK_ON_USB.CLK3_ON =E2=94=82 =E2=94=82 =E2=94=82 CPG_BUS_PERI_COM_MSTOP.MSTOP4_ON =E2=94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82SYSC=E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 where: - CPG_CLKON_USB.CLK.CLKX_ON is the register bit controlling the clock X of different USB blocks, X in {0, 1, 2, 3} - CPG_BUS_PERI_COM_MSTOP.MSTOPX_ON is the register bit controlling the MSTOP of different USB blocks, X in {4, 5, 6, 7} - USB PHY is the USB PHY block exposing 2 ports, port0 and port1, used by the USB CH0, USB CH1 - SYSC is the system controller block controlling the PWRRDY signal - USB CHx are individual USB block with host and function capabilities (USB CH0 have both host and function capabilities, USB CH1 has only host capabilities) The USBPHY control registers are controlled though the reset-rzg2l-usbphy-ctrl driver. The USB PHY ports are controlled by phy_rcar_gen3_usb2 (drivers/phy/renesas/phy-rcar-gen3-usb2.c file). The USB PHY ports request resets from the reset-rzg2l-usbphy-ctrl driver. The connection b/w the system controller and the USB PHY CTRL driver is implemented through the renesas,sysc-pwrrdy device tree property proposed in this patch. This property specifies the register offset and the bitmask required to control the PWRRDY signal. Since the USB PHY CTRL driver needs to be probed before any other USB-specific driver on RZ/G3S, control of PWRRDY is passed exclusively to it. This guarantees the correct configuration sequence between clocks, MSTOP bits, and the PWRRDY bit on probe/resume and remove/suspend. At the same time, changes are kept minimal by avoiding modifications to the USB PHY driver to also handle the PWRRDY itself. Tested-by: Wolfram Sang Signed-off-by: Claudiu Beznea Reviewed-by: Philipp Zabel --- Changes in v8: - updated the patch description to emphasize that PWRRDY need to be controlled on suspend/resume path, as well (when support will be proposed) - dropped struct rzg2l_usbphy_ctrl_pwrrdy and used regmap_field instead - simplified the logic in rzg2l_usbphy_ctrl_set_pwrrdy() by relying on the fact that PWRRDY mask provided though device tree will always be 1 bit long - in rzg2l_usbphy_ctrl_pwrrdy_init() cast data to uintptr_t before comparing it with a constant Changes in v7: - used proper regmap update value on rzg2l_usbphy_ctrl_set_pwrrdy() Changes in v6: - used syscon_regmap_lookup_by_phandle_args() to simplify the code - collected tags Changes in v5: - none Changes in v4: - updated patch description - updated rzg2l_usbphy_ctrl_pwrrdy_init() to map directly the "renesas,sysc-pwrrdy" as the SYSC signal abstraction was dropped in this version, along with rz_sysc_get_signal_map() - dropped priv member of rzg2l_usbphy_ctrl_pwrrdy_init() as it is not needed in this version - shift left !power_on with pwrrdy->mask as this is how the regmap_update_bits() needs the last member to be - selected MFD_SYSCON Changes in v3: - none; this patch is new drivers/reset/Kconfig | 1 + drivers/reset/reset-rzg2l-usbphy-ctrl.c | 56 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 78b7078478d4..329730cbcfb9 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -237,6 +237,7 @@ config RESET_RASPBERRYPI config RESET_RZG2L_USBPHY_CTRL tristate "Renesas RZ/G2L USBPHY control driver" depends on ARCH_RZG2L || COMPILE_TEST + select MFD_SYSCON help Support for USBPHY Control found on RZ/G2L family. It mainly controls reset and power down of the USB/PHY. diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-= rzg2l-usbphy-ctrl.c index 8a7f167e405e..57350764be25 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -13,6 +13,7 @@ #include #include #include +#include =20 #define RESET 0x000 #define VBENCTL 0x03c @@ -91,6 +92,8 @@ static int rzg2l_usbphy_ctrl_status(struct reset_controll= er_dev *rcdev, return !!(readl(priv->base + RESET) & port_mask); } =20 +#define RZG2L_USBPHY_CTRL_PWRRDY 1 + static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] =3D { { .compatible =3D "renesas,rzg2l-usbphy-ctrl" }, { /* Sentinel */ } @@ -110,6 +113,55 @@ static const struct regmap_config rzg2l_usb_regconf = =3D { .max_register =3D 1, }; =20 +static void rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy, + bool power_on) +{ + u32 val =3D power_on ? 0 : 1; + + /* The initialization path guarantees that the mask is 1 bit long. */ + regmap_field_update_bits(pwrrdy, 1, val); +} + +static void rzg2l_usbphy_ctrl_pwrrdy_off(void *data) +{ + rzg2l_usbphy_ctrl_set_pwrrdy(data, false); +} + +static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev) +{ + struct regmap_field *pwrrdy; + struct reg_field field; + struct regmap *regmap; + const int *data; + u32 args[2]; + + data =3D device_get_match_data(dev); + if ((uintptr_t)data !=3D RZG2L_USBPHY_CTRL_PWRRDY) + return 0; + + regmap =3D syscon_regmap_lookup_by_phandle_args(dev->of_node, + "renesas,sysc-pwrrdy", + ARRAY_SIZE(args), args); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + /* Don't allow more than one bit in mask. */ + if (hweight32(args[1]) !=3D 1) + return -EINVAL; + + field.reg =3D args[0]; + field.lsb =3D __ffs(args[1]); + field.msb =3D __fls(args[1]); + + pwrrdy =3D devm_regmap_field_alloc(dev, regmap, field); + if (!pwrrdy) + return -ENOMEM; + + rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true); + + return devm_add_action_or_reset(dev, rzg2l_usbphy_ctrl_pwrrdy_off, pwrrdy= ); +} + static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; @@ -132,6 +184,10 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_dev= ice *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); =20 + error =3D rzg2l_usbphy_ctrl_pwrrdy_init(dev); + if (error) + return error; + priv->rstc =3D devm_reset_control_get_exclusive(&pdev->dev, NULL); if (IS_ERR(priv->rstc)) return dev_err_probe(dev, PTR_ERR(priv->rstc), --=20 2.43.0 From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 010B7328B75 for ; Thu, 23 Oct 2025 13:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227919; cv=none; b=a11wZoZYyEcH5Cha2h6ppE5PyotYZput0dL/v90KixWoagUpJWu8NVoTy9/VN9hBOgdNt/VUWThkgrXa2WE3PLfpIIrNEpYSmooDXkaCHIaaDc8/+WdjcoA62rhgqtfT0p90oVrZN8ZfW90cCiW0Zlev39A91SkG17Vw+yCBT/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227919; c=relaxed/simple; bh=gVMp9OKX1E6FMgxJQra5Aw6qeOKI1S5qh1QZpcnn0XQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XvUqQvVaIELXS3783uWTazEhjqcO4FCGVDNc8UOsTX8JGls+IStM7OqAVec7wS+HjFwa6qIg6axIyHpEU30UocrtceOhUTCRonmtJvGYm7mKvvXRe6AS9RvndZ6Yh/Nltv8YEki85P9J+TTpby+QZxk5Rw4oWpArLScluRC0KRg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=SEUJpxC0; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="SEUJpxC0" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-afcb7ae6ed0so197291166b.3 for ; Thu, 23 Oct 2025 06:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227915; x=1761832715; darn=vger.kernel.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=5v6y+GjI1vQGPmK5PBayMgAyAsV46MUdg+BfNU35YfE=; b=SEUJpxC0r/cPOhFuwwpx3ViQU5kUen49/A9U/sBcUlS7VfOUUcOCxSq0lCBnfY3jH5 RLg/f51wS2Z5yY+1q5KdS8+WdetyiElV5VyFcXdeNRZKDOaVG61Z1mFzzxyFxqsQvJ3r Axus2iLrSjaPPedHHNKajwQ5ARTL+usYv3Gkb4oRlaS34WroSM6F4lS+ZvA1gYJQzxcm aBDtq6+UKquCRzNO42/3AinDwgvXL5qMJDWezrWzs8MbulLEU3Amnnapd7WLE3iJ80Dg zAzzyDrpFJsdFb5b7SNiL2cwLJX4mymJKg1d2wRHxvVsvcwE/caPSwXGpL5N4tx0172F J7qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227915; x=1761832715; 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=5v6y+GjI1vQGPmK5PBayMgAyAsV46MUdg+BfNU35YfE=; b=FAzH/mPGNDBbE1veg3gYTXLgFpxplZLK6+WViFVa7HSbAWYNiQYyZO6w//GA2YQP1y 9YmqlNs/JNoqIprJyNk/EC7DndsCwHfYvKk+rPmT7qZGADF0g+wkhN2AOPyeq6E67hzU XGdH2+FOPM+lqnjpWzTW8Cxz7ijA03u9MJad4MpLgRbS9cFQF5KP7VoG1LcAUet0KDz8 rr28dw5seGOahqOvcHw+wSc3/AJPOW9kik+wTdusff09AJdoaGIzR1pVUUhgnUzut2Ut zFxPUO/dW0GGfzduNJmk9nvOZY9pV06F6MQO5bVjn4XTQfFR2k1P/iWwDanBxg6+CYmM NwUw== X-Forwarded-Encrypted: i=1; AJvYcCWUpeUy4F/MFWyW4Xe185q9bglpO6U2oaF05Krz4OtH3IdBcDQMlxrnE+CDxsBtvMJwzuBHdbO1iVuXYSc=@vger.kernel.org X-Gm-Message-State: AOJu0YxJfKdew1fWzeD+jwsmzrBZ54nBx1VooEraHRdN8TeFKncwVzVL +8JlM51ROwNmIJGBWUyefnwMq7JpPjnlYt/vYdfFhKbgf/L1a9eX1Y2xBWsfWrGtJtA= X-Gm-Gg: ASbGnctDr5lm6eQDyf35mPg9l/w7ArZHtlzl/7XTT7Ei8Q7TkC74I+GZi2Tj18QJ8IB gepkRcvz/Y5J1i81L88O5DupMUPuQHgSMx/2O+l0uE1W6hfY5ycp8mPGLackZq74/IcY1X/4MhT Y0lO/fgwon4BqF5voBUS6mJJbHLRuUNb8xd/2SK3tYf5s237S+qfjRo0UFbVMw5QWTPpFPzFPbY XILd6FVVM1r1ZETktm9YEfXK+AxUOjmakJbzQRhLFLf8pgHLT0tKdgxU+Aci1GMmqUmYKN/TwMY m5HGn0JAAxRri5mKKjJC7Wb5SKMkLjW1/zHgMKZ7Od6c7nnVL7pdibMc4OLRsmuwUUn2taO7Qop bYzMUn2TK1qTYeY47zsDA+GsHH/Y5IthPiDOYwYH2BrdaXSozR5a401nZACrZHtRAUDJujGw/YB /CUcrpWJbt95wCQZNfIgP9rU5152pxig== X-Google-Smtp-Source: AGHT+IEC+rYJG36/rC4PJVSPAIdX4Lo/ftVglMxpEkizTmYDSbvRujYXusVRK/4v8s9FHkKuEzGgrA== X-Received: by 2002:a17:907:74b:b0:b3e:5f20:88ad with SMTP id a640c23a62f3a-b6476ccc0c0mr2866186366b.28.1761227915106; Thu, 23 Oct 2025 06:58:35 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58:34 -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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea , Wolfram Sang Subject: [PATCH v8 5/7] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC Date: Thu, 23 Oct 2025 16:58:08 +0300 Message-ID: <20251023135810.1688415-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The Renesas RZ/G3S SoC USB PHY HW block receives as input the USB PWRRDY signal from the system controller. Add support for the Renesas RZ/G3S SoC. Tested-by: Wolfram Sang Signed-off-by: Claudiu Beznea Reviewed-by: Philipp Zabel --- Changes in v8: - none Changes in v7: - none Changes in v6: - collected tags Changes in v5: - none Changes in v4: - none Changes in v3: - none; this patch is new drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-= rzg2l-usbphy-ctrl.c index 57350764be25..1c0424639e66 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -96,6 +96,10 @@ static int rzg2l_usbphy_ctrl_status(struct reset_control= ler_dev *rcdev, =20 static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] =3D { { .compatible =3D "renesas,rzg2l-usbphy-ctrl" }, + { + .compatible =3D "renesas,r9a08g045-usbphy-ctrl", + .data =3D (void *)RZG2L_USBPHY_CTRL_PWRRDY + }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, rzg2l_usbphy_ctrl_match_table); --=20 2.43.0 From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5A8A32AAC8 for ; Thu, 23 Oct 2025 13:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227921; cv=none; b=MfIrP/9dCBk5jTa18Hd//A+sOu+SX/qA1+TKayYtPAE/Ph/msZPzFfBO2LWDI3+4hGjZRv3qQuRePJev4TF0ZFr9LpTY61mXA9FGOojhnn8uCUffZmAqb5u0lpZzaDzd0Vr0H8VCJEG9PaJGig8YrAomlgkDyZHuXKtueWrX9IA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227921; c=relaxed/simple; bh=z87Wvt6YoFbSnJxC5WmES77DeHFkBXJ5qhn/nvHk1us=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rFSle5CQ3+CQoN44Rmjh6wGlSGOKlTXWJYBliI/TgDPt2Ny/Y7dipvBTSX8WNIrdj7tpthGkEnbENYfcit0y77u07mRJadjbdyLq2O+h6LW8NWoR4cUy0yJUfWzTs7GClXtHr6qtGkD2otJU6mVkeflrPW2d33QOZbcMVEughGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=dBRSuiGL; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="dBRSuiGL" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b403bb7843eso176975666b.3 for ; Thu, 23 Oct 2025 06:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227917; x=1761832717; darn=vger.kernel.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=S7yahp7GEuZbCGPELhsza9+agCEdI0nJz4aKJxPM9QA=; b=dBRSuiGLfzphdCAytCMQgTw4T55+g/voWCCSMTk4tQe/ZHva2hDPDuwntdrO8mHB/O 6G3KAq6DeuPpf93lxwdf5tGkiapxsTHK8Gl8LPtgy6jo0IkQ3c3v+L7sSO2RW3GhR+ys +9YxBhG1pd5cOSAjZAO0JM8ngCvxOqCS/GNAzuSMnaZofkVKPd/W9aYBbjqIxa25i6SG ijELBvkFhJL8Jfy5kNDsnWYrYw3B2iw0tmfyJlwg3PEojtR7s0Z7xM44TaERsncdnimc MCLfmwMNL9LDzB0d2OUKHIErjLrAbwGjBB+ePnL23ad+MIww/Bve160dI6vEoaD38ytr vViw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227917; x=1761832717; 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=S7yahp7GEuZbCGPELhsza9+agCEdI0nJz4aKJxPM9QA=; b=VBwZhIDsCWogNWgG5vYjpy7ZuBi6ofFJpoNbDtRd5BarmgEp1wwQvlMYTiGlF9adya 0YCKEhjvhf0/fIYtnsSPHxFaBk+dppQAZUqKNIg2isZ+BydtP7YPOirAuqfkLHgezYM9 9jDujLibOPNQQBpP/syXSS+ymOnpot0p7ckCT0zwwnLsP7sZqnP6vLgHlXra8rlvf6Jd 45tRgB8La2AzTGFkd3c5HPURqUxaHRnoWYqBW00fMOGLMTVV1vws4nz1LJJ2XdpJoR+m Zi11WnqKE5iSUPiMcDd36ZDA2tcWv/nk4DJbH7Zad+Lp6bcGVBG4KKVTnM8ly+XETtuR 3CjA== X-Forwarded-Encrypted: i=1; AJvYcCW/fxHvZgobfEoSl2YcPJTJaYAJpSvg8KHL9+FAjk2nQ4/v76zmotHRPcMsB3KOsQ7gjI2prHJSZaxJvnw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8zNvRuZBHw9tW/aOyM1Wt4tYd3AwT6oYnO80LlYT7FnUQ7KMw zYc2EivLvmWTvaPTlE1x3bkvw0aXRfASwWU5gUOf0Ilf7YTRDduHsj3OMQ8bKwWjrNI= X-Gm-Gg: ASbGncu8ILZU227GXMtkjI4dyWH98IPpG0JnTjwtmaCExHXfdvygc9XaVIi0iEhVQ8A YDEW1gCnWj3nTKxTAGBFxMl3Jq7m6Mz0GfFbH9Doo8iawWRw3zptyVSzfebT3tcms3ardcjCoD2 X09SwALVX2+hwifBno2a4tg+MF4zr+UpxS8i+oEYvtQCSYD3sHk3LCuImNHI62v6UaVwwrtBKzL PfLRTUZAcAVBUp+/FQCM8//E+fIdgqiFOiuNBrxoveDeVoakMc/zbSYWsFMDR6cGkGZa3Hw27Yv rAKF9G+Sm8LE8heG1B7N4a4r4Gg0CQ1YIADcqhRdarDtE5mw4HxzvlrQ2vDlBmY2yiuSO6KRYti 51uesHDRA9mNY6mrIEzFrsNBZe2W0ZiXU2z/riosAuCUgR3Qkl6ueBUYa8dL5nBmWMOE++jIDti 3PaGt4tSQCOUYHacU2Wdeb0C6k0ZhQag== X-Google-Smtp-Source: AGHT+IERQSaNZ8XWnCMAWS4myPYBzmO3iaaDa9WU1IStoe35MF/GtpgRwoWc/lAKsVo6nO1iKmmTLg== X-Received: by 2002:a17:906:ef04:b0:b31:ec30:c678 with SMTP id a640c23a62f3a-b647482d9c3mr3234596766b.57.1761227917037; Thu, 23 Oct 2025 06:58:37 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58:36 -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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea , Wolfram Sang Subject: [PATCH v8 6/7] arm64: dts: renesas: r9a08g045: Add USB support Date: Thu, 23 Oct 2025 16:58:09 +0300 Message-ID: <20251023135810.1688415-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add USB nodes for the Renesas RZ/G3S SoC. This consists of PHY reset, host and device support. Reviewed-by: Geert Uytterhoeven Tested-by: Wolfram Sang Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - collected tags Changes in v6: - collected tags Changes in v5: - none Changes in v4: - dropped renesas,sysc-signals from usb2_phy0, usb2_phy1 nodes - s/renesas,sysc-signals/renesas,sysc-pwrrdy/g Changes in v3: - changed the nodes order to keep similar nodes toghether arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 118 +++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/d= ts/renesas/r9a08g045.dtsi index dd9c9c33d9d6..876de634908e 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -727,6 +727,124 @@ eth1: ethernet@11c40000 { status =3D "disabled"; }; =20 + phyrst: usbphy-ctrl@11e00000 { + compatible =3D "renesas,r9a08g045-usbphy-ctrl"; + reg =3D <0 0x11e00000 0 0x10000>; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>; + resets =3D <&cpg R9A08G045_USB_PRESETN>; + power-domains =3D <&cpg>; + #reset-cells =3D <1>; + renesas,sysc-pwrrdy =3D <&sysc 0xd70 0x1>; + status =3D "disabled"; + + usb0_vbus_otg: regulator-vbus { + regulator-name =3D "vbus"; + }; + }; + + ohci0: usb@11e10000 { + compatible =3D "generic-ohci"; + reg =3D <0 0x11e10000 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + phys =3D <&usb2_phy0 1>; + phy-names =3D "usb"; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + ohci1: usb@11e30000 { + compatible =3D "generic-ohci"; + reg =3D <0 0x11e30000 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets =3D <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + phys =3D <&usb2_phy1 1>; + phy-names =3D "usb"; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + ehci0: usb@11e10100 { + compatible =3D "generic-ehci"; + reg =3D <0 0x11e10100 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + phys =3D <&usb2_phy0 2>; + phy-names =3D "usb"; + companion =3D <&ohci0>; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + ehci1: usb@11e30100 { + compatible =3D "generic-ehci"; + reg =3D <0 0x11e30100 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets =3D <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + phys =3D <&usb2_phy1 2>; + phy-names =3D "usb"; + companion =3D <&ohci1>; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + usb2_phy0: usb-phy@11e10200 { + compatible =3D "renesas,usb2-phy-r9a08g045"; + reg =3D <0 0x11e10200 0 0x700>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + #phy-cells =3D <1>; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + usb2_phy1: usb-phy@11e30200 { + compatible =3D "renesas,usb2-phy-r9a08g045"; + reg =3D <0 0x11e30200 0 0x700>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets =3D <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + #phy-cells =3D <1>; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + hsusb: usb@11e20000 { + compatible =3D "renesas,usbhs-r9a08g045", + "renesas,rzg2l-usbhs"; + reg =3D <0 0x11e20000 0 0x10000>; + interrupts =3D , + , + , + ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2P_EXR_CPUCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2P_EXL_SYSRST>; + renesas,buswait =3D <7>; + phys =3D <&usb2_phy0 3>; + phy-names =3D "usb"; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + gic: interrupt-controller@12400000 { compatible =3D "arm,gic-v3"; #interrupt-cells =3D <3>; --=20 2.43.0 From nobody Sun Dec 14 19:30:17 2025 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A55CF32B998 for ; Thu, 23 Oct 2025 13:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227923; cv=none; b=C9/nfG6Yxlk7jvwZDP40lvYsyLt9jDPGXHpz88zQGeCHkEsnDxoSSGhliJZV7wxQBTx53e7NnzK8gAuj/pethrmRvoquPRBIE3RtgOABnS243anp33XoFuDCmpuDQbgCCCWiuuIVa2gibq3D9ZTO24uZItkKva1OUvbwPUM0Vnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761227923; c=relaxed/simple; bh=50hw/72TpRU+0O/DF7+aRtgAC5bIC3qKK0GLCIJ0bWY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d1G6ik28iZeyll0hqcWXrrVRZxoeLR0RhCYx+5kZGYTnLDDynULi/xFFnX3iRo/IYjavI8lwvR4HUHmvAS2AgU/u/zxEwNtdWYpB/wWAjsEL1Vw6JVKJltHpIX3BUMZu2MgY8FrUDXiddajZ9wn1RKj4ek3xDz9BWJWKTmpP+lk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=jPwUFSeg; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="jPwUFSeg" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-63c45c11be7so1532846a12.3 for ; Thu, 23 Oct 2025 06:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1761227919; x=1761832719; darn=vger.kernel.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=EDOk3wzJ/Csdlnb+sDEwzVll8zo5EaNbS49j4wNtazc=; b=jPwUFSegNA5zL2D0GbNPVyGJVe5ioYTQn6Gb66hqPUcR24NIenJE3WyW+y0WmCbicr GNMwqksrzBLZDyhC5Zp/XFiC3X5I1M+DOHjAehpuHTNqH3awHZEFTMKYKz9UCXNAiayI nWJRMT5Ou4R9ICg20A/Gcrz4JVr5s4YKgXyT8Lk8kncrXkfmciT6InsvRvrWm3YckICB 5Ep8Im8wdDFr5oB1tyIWTBVkFexPo8rRSzZ/wqaXXsGjSY11Ggenu8OroN3waldp58wv Rx0GmGLmSBVBM8JsUUijJOpEHPJb9eSDA8Ka5h7uzsXVo0sxUfoJQQiZ9xPHfaOUREZq UeXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761227919; x=1761832719; 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=EDOk3wzJ/Csdlnb+sDEwzVll8zo5EaNbS49j4wNtazc=; b=PDpoWjuHpIeehMYQnJodQh2OtbvUWJa1B57GfP5u4dUzUf/kKV4ooZcQ+XsagArQps HAMewk059IiplVDBntBRTYsXAmQdkbeH6U3WLLX9Zo5lpNRUElPMJn0HEwWDDGLYpUSL t0wl4pTLlYFC4bNEGdxHR/n5tKoFUG3LAmk1WKNIVNhOGgviRRhNjYkKqB2YHdZkCdWX 1J7O3NSDAsyhD1VNOxanCHkv9J/ytbmxQ8RU5tCyElqdprzfNIHQbgTKTvxyHwGmtuy0 ewMa22m+RZ2M1RXXkgShPyvLR1YLDm0crFakyyIMaVtqBmsCYjwmZv4buRvQqR40Szvq 8SXQ== X-Forwarded-Encrypted: i=1; AJvYcCWO2zawPvFWuTTmUnxBcOV1rSqMyEuprbxv6ERZ/LFDxyRJejWiBr2mM1QC96wBwczPmejfRytRyaqE73c=@vger.kernel.org X-Gm-Message-State: AOJu0YyRy9XYM6TuyQvOYIyGdniw0QlKbXfSKEmpTeQyZYyODCYOM0tB QznnMlWOTXdgWpPq3c4hSRDkuRdF6umLk0Y+LF6nX7bIBdGQ2kafgcYAGeIhLfrwi28= X-Gm-Gg: ASbGncvgHJIQVs3Sx+GVuZYMsor8gtvhQZZhnq1wDW7prrAB4corZOmJo/GO2jHsjim DVwYpOVqUavCEMvzXBun6+N+IngL50VJgwLH+zdFwali5q2lZ9YUbuMuV65lxZndTr97qva5kyR k21Jq1klPuzaamECprlF697sVBGKFLkNTZwdYnm+IfS8PtFJZX/XA9qzb6TowNs8W8rXMn8nm1f zSA+mGA6s0Nggh+eiaJL+wI3y0dIGvz9xQONpLcxsoHxBBD9xeDsFgRl0aA+Px88lKT//VMWzxP PDx28oTNlbZ9QQHcMCWlwGpK7Kv9gh4BLL2F+jc/7832aFCKd4p0VL0BYyRPTvvmDTrXL/3DxOj 8akgc9+99Vygv4Pf/PYmUDB2/jgNXGjpeH6tijSsWddbHX4s6qDkedpma1GzHIDYBZe9x7ARV+m NxPtJ30Q8WXt7zoE1qljMODeQkk1v3xhAtO27/Sv+m X-Google-Smtp-Source: AGHT+IFBx3dgJXH4lEpxnlJJFwOwoH+u/MOZe+M6OK+FLRB/x3UWGEvHv5qUZS/pYvr0WhrpOqUmSg== X-Received: by 2002:a17:907:3d9e:b0:b3e:3c1c:d301 with SMTP id a640c23a62f3a-b64769cb8cfmr2888032566b.61.1761227918932; Thu, 23 Oct 2025 06:58:38 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.151]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d511f8634sm226114066b.29.2025.10.23.06.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Oct 2025 06:58: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, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea , Wolfram Sang Subject: [PATCH v8 7/7] arm64: dts: renesas: rzg3s-smarc: Enable USB support Date: Thu, 23 Oct 2025 16:58:10 +0300 Message-ID: <20251023135810.1688415-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> References: <20251023135810.1688415-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Enable USB support (host, device, USB PHYs). Reviewed-by: Geert Uytterhoeven Tested-by: Wolfram Sang Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - collected tags Changes in v5: - none Changes in v4: - none Changes in v3: - collected tags Changes in v2: - this was patch 15/16 in v1: - dropped sysc enablement as it is now done in SoC dtsi file arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot= /dts/renesas/rzg3s-smarc.dtsi index 5e044a4d0234..5586dd43c4d5 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -92,6 +92,20 @@ &audio_clk2 { clock-frequency =3D <12288000>; }; =20 +&ehci0 { + dr_mode =3D "otg"; + status =3D "okay"; +}; + +&ehci1 { + status =3D "okay"; +}; + +&hsusb { + dr_mode =3D "otg"; + status =3D "okay"; +}; + &i2c0 { status =3D "okay"; =20 @@ -132,6 +146,15 @@ power-monitor@44 { }; }; =20 +&ohci0 { + dr_mode =3D "otg"; + status =3D "okay"; +}; + +&ohci1 { + status =3D "okay"; +}; + &pinctrl { audio_clock_pins: audio-clock { pins =3D "AUDIO_CLK1", "AUDIO_CLK2"; @@ -207,6 +230,27 @@ ssi3_pins: ssi3 { , /* TXD */ ; /* RXD */ }; + + usb0_pins: usb0 { + peri { + pinmux =3D , /* VBUS */ + ; /* OVC */ + }; + + otg { + pinmux =3D ; /* OTG_ID */ + bias-pull-up; + }; + }; + + usb1_pins: usb1 { + pinmux =3D , /* OVC */ + ; /* VBUS */ + }; +}; + +&phyrst { + status =3D "okay"; }; =20 &scif0 { @@ -242,3 +286,16 @@ &ssi3 { pinctrl-0 =3D <&ssi3_pins>, <&audio_clock_pins>; status =3D "okay"; }; + +&usb2_phy0 { + pinctrl-0 =3D <&usb0_pins>; + pinctrl-names =3D "default"; + vbus-supply =3D <&usb0_vbus_otg>; + status =3D "okay"; +}; + +&usb2_phy1 { + pinctrl-0 =3D <&usb1_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; --=20 2.43.0