From patchwork Fri Jun 7 11:37:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13689750 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 501D018FC63; Fri, 7 Jun 2024 11:38:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760287; cv=none; b=VN6hqIQWK6FJRT6k27y2aM+/bE0fsT/vCJqMz3orucLgbF1tNQfpG3UNt/4LpC7GM7q59m8lU6y8KobCP9Ow5nQPGmshJ3zqAc5wao422Wrc256XhLeKGh90lOhLB5HU0e9xla77RzQcHlCFDnFSxKmShBZcWFk5uFjRpcp5XhY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760287; c=relaxed/simple; bh=xPTcRZ3uY6SLDT1LcRQ8G6+MqC270bZyen/hkyz5YkU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XH0dnijUWW0UXi6ZTmY3Mdet7uJfbV982mAOAi6/HORx05mbsfreKd7BqIdsSm/6AKuZqoJesdQjPvu6N8m93jCFy8guzb7MIzrhbqP5h/UNXO7otcPNV1CKDQkSe0svCmnAYDI/8Yl2040bljaVZ/3zR4H61zYfL0TK0tv0JVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.08,220,1712588400"; d="scan'208";a="211042474" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 07 Jun 2024 20:37:58 +0900 Received: from localhost.localdomain (unknown [10.226.92.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8589240071E8; Fri, 7 Jun 2024 20:37:53 +0900 (JST) From: Biju Das To: Philipp Zabel , Liam Girdwood , Mark Brown , Yoshihiro Shimoda , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Biju Das , Vinod Koul , Kishon Vijay Abraham I , linux-renesas-soc@vger.kernel.org, linux-phy@lists.infradead.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , devicetree@vger.kernel.org Subject: [PATCH RFC v2 1/4] reset: renesas: Instantiate USB VBUS regulator device Date: Fri, 7 Jun 2024 12:37:42 +0100 Message-Id: <20240607113745.73934-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> References: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 As per RZ/G2L HW manual, VBUSEN can be controlled by the VBOUT bit of the VBUS Control Register(VBENCTL) register in the USBPHY Control. Expose this register as regmap and instantiate the USB VBUS regulator device, so that consumer can control the vbus using regulator API's. Signed-off-by: Biju Das --- v1->v2: * Instatiated regulator driver --- drivers/reset/reset-rzg2l-usbphy-ctrl.c | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c index 8f6fbd978591..45406d6bbb85 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -10,10 +10,12 @@ #include #include #include +#include #include #include #define RESET 0x000 +#define VBENCTL 0x03c #define RESET_SEL_PLLRESET BIT(12) #define RESET_PLLRESET BIT(8) @@ -32,6 +34,7 @@ struct rzg2l_usbphy_ctrl_priv { struct reset_controller_dev rcdev; struct reset_control *rstc; void __iomem *base; + struct platform_device *vdev; spinlock_t lock; }; @@ -100,10 +103,19 @@ static const struct reset_control_ops rzg2l_usbphy_ctrl_reset_ops = { .status = rzg2l_usbphy_ctrl_status, }; +static const struct regmap_config rzg2l_usb_regconf = { + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, + .max_register = 1, +}; + static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rzg2l_usbphy_ctrl_priv *priv; + struct platform_device *vdev; + struct regmap *regmap; unsigned long flags; int error; u32 val; @@ -116,6 +128,22 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) if (IS_ERR(priv->base)) return PTR_ERR(priv->base); + regmap = devm_regmap_init_mmio(dev, priv->base + VBENCTL, &rzg2l_usb_regconf); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + vdev = platform_device_alloc("rzg2l-usb-vbus-regulator", pdev->id); + if (!vdev) + return -ENOMEM; + vdev->dev.parent = dev; + priv->vdev = vdev; + + error = platform_device_add(vdev); + if (error) { + platform_device_put(vdev); + return error; + } + priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); if (IS_ERR(priv->rstc)) return dev_err_probe(dev, PTR_ERR(priv->rstc), @@ -160,6 +188,7 @@ static void rzg2l_usbphy_ctrl_remove(struct platform_device *pdev) { struct rzg2l_usbphy_ctrl_priv *priv = dev_get_drvdata(&pdev->dev); + platform_device_unregister(priv->vdev); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); reset_control_assert(priv->rstc); From patchwork Fri Jun 7 11:37:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13689751 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E028A18FC63; Fri, 7 Jun 2024 11:38:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760290; cv=none; b=rvMTPSsYu002r+Cr4hRyJqpQLpYsPBXeMvg14keH3DwdLbo/r4+Ykpq0MrBHNY+PugA81I4t+KYIE9j0YrVijxfcaWAMFFEWqw2Uu2syomsvIsLT1om3VqfdZp2WJJRSFGELBWkhPG84v1ZChUAoibpUTw4nF/qrOPmsGrHUd6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760290; c=relaxed/simple; bh=1Akd+26U6Id9fSsgiUhbrzDMLs+DxaRzmxHmosCpZ0o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SeJzXzwDYJo1hoDujWqvKf+bhUw/3vGoIMitD1MVfv8iqqqzYvyM2FflslDitq0gO7uk1NXoYekIIjYtXJvDb47cL35lleoeS3NU7Zpn22vIDzUtm7kWewQrg6hLGdNIfmRdTs7/zApG43IagoLNHuCC33IXs77SuimKdbm9xHI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.08,220,1712588400"; d="scan'208";a="211042485" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 07 Jun 2024 20:38:03 +0900 Received: from localhost.localdomain (unknown [10.226.92.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 05D5C40071E8; Fri, 7 Jun 2024 20:37:58 +0900 (JST) From: Biju Das To: Liam Girdwood , Mark Brown , Yoshihiro Shimoda , Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Biju Das , Vinod Koul , Kishon Vijay Abraham I , linux-renesas-soc@vger.kernel.org, linux-phy@lists.infradead.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , devicetree@vger.kernel.org Subject: [PATCH RFC v2 2/4] regulator: Add Renesas RZ/G2L USB VBUS regulator driver Date: Fri, 7 Jun 2024 12:37:43 +0100 Message-Id: <20240607113745.73934-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> References: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 As per the RZ/G2L HW manual, VBUSEN can be controlled by the VBOUT bit of the VBUS Control Register. This register is mapped in the reset framework. The reset driver expose this register as regmap and instantiates this driver. The consumer device will use the regulator regmap to control the VBOUT bit as the control need to be done in the atomic context. Signed-off-by: Biju Das --- v1->v2: * New patch --- drivers/regulator/Kconfig | 9 +++ drivers/regulator/Makefile | 1 + .../regulator/renesas-usb-vbus-regulator.c | 65 +++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 drivers/regulator/renesas-usb-vbus-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index d333be2bea3b..0281a9a6f4ce 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1634,6 +1634,15 @@ config REGULATOR_UNIPHIER help Support for regulators implemented on Socionext UniPhier SoCs. +config REGULATOR_RZG2L_VBCTRL + tristate "Renesas RZ/G2L USB VBUS regulator driver" + depends on ARCH_RZG2L || COMPILE_TEST + depends on OF + select REGMAP_MMIO + default ARCH_RZG2L + help + Support for VBUS regulators implemented on Renesas RZ/G2L SoCs. + config REGULATOR_VCTRL tristate "Voltage controlled regulators" depends on OF diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index ba15fa5f30ad..6127ffb4b011 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -189,6 +189,7 @@ obj-$(CONFIG_REGULATOR_TPS65132) += tps65132-regulator.o obj-$(CONFIG_REGULATOR_TPS68470) += tps68470-regulator.o obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o twl6030-regulator.o obj-$(CONFIG_REGULATOR_UNIPHIER) += uniphier-regulator.o +obj-$(CONFIG_REGULATOR_RZG2L_VBCTRL) += renesas-usb-vbus-regulator.o obj-$(CONFIG_REGULATOR_VCTRL) += vctrl-regulator.o obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress-regulator.o obj-$(CONFIG_REGULATOR_VQMMC_IPQ4019) += vqmmc-ipq4019-regulator.o diff --git a/drivers/regulator/renesas-usb-vbus-regulator.c b/drivers/regulator/renesas-usb-vbus-regulator.c new file mode 100644 index 000000000000..24582782ad40 --- /dev/null +++ b/drivers/regulator/renesas-usb-vbus-regulator.c @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// Renesas USB VBUS output regulator driver +// +// Copyright (C) 2024 Renesas Electronics Corporation +// + +#include +#include +#include +#include +#include +#include +#include +#include + +static const unsigned int vbus_voltages[] = { + 3300000, 0 +}; + +static const struct regulator_ops rzg2l_usb_vbus_reg_ops = { + .list_voltage = regulator_list_voltage_table, +}; + +static const struct regulator_desc rzg2l_usb_vbus_rdesc = { + .name = "usb_vbus", + .ops = &rzg2l_usb_vbus_reg_ops, + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .volt_table = vbus_voltages, + .n_voltages = ARRAY_SIZE(vbus_voltages), +}; + +static int rzg2l_usb_vbus_regulator_probe(struct platform_device *pdev) +{ + struct regulator_config config = { }; + struct device *dev = &pdev->dev; + struct regulator_dev *rdev; + + config.regmap = dev_get_regmap(dev->parent, NULL); + if (!config.regmap) + return dev_err_probe(dev, -ENOENT, "Failed to get regmap\n"); + + config.dev = dev; + config.of_node = dev->of_node; + rdev = devm_regulator_register(dev, &rzg2l_usb_vbus_rdesc, &config); + if (IS_ERR(rdev)) + return dev_err_probe(dev, PTR_ERR(rdev), + "not able to register vbus regulator\n"); + + return 0; +} + +static struct platform_driver rzg2l_usb_vbus_regulator_driver = { + .probe = rzg2l_usb_vbus_regulator_probe, + .driver = { + .name = "rzg2l-usb-vbus-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, + }, +}; +module_platform_driver(rzg2l_usb_vbus_regulator_driver); + +MODULE_AUTHOR("Biju Das "); +MODULE_DESCRIPTION("Renesas RZ/G2L USB Vbus Regulator Driver"); +MODULE_LICENSE("GPL"); From patchwork Fri Jun 7 11:37:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13689752 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0706C190672 for ; Fri, 7 Jun 2024 11:38:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760292; cv=none; b=gJKONy92A85SOu51EeDBJrtT3uJeBWu83YpktyRKfKNQVn8G9gYZbrzkRFNtg6Q3N88Sdecbi40dqv52WpVo6VYYS4NCb1N/4xaERS9qk1NnQ6g3eS+fdSAz9Cer+ghrtHXWe/Oy9F1rx50QaQZo8BcXbw/Q2taq6tTNTrdG15o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760292; c=relaxed/simple; bh=sUDP76420iyyiGk6Cp9rhDUJbMx+RuHcFC9ZV4JESGM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m1zVft4Exn+OD3U9DW4RlVbl+5g2GmYlN82yurKtuGBQZGHG2sLW4n4AwDFh5W03hFjOcQYJj01JbNeDQJoUpI7tqO6J6GyRZMqFH9Q5CDECLmrCRPVuGBNXUOInjzP5Sp4f/dp5kMimOT0X+EA92ExDd+VxLgiX3LJH2UEgDQc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.08,220,1712588400"; d="scan'208";a="211042492" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 07 Jun 2024 20:38:09 +0900 Received: from localhost.localdomain (unknown [10.226.92.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9242A40071E8; Fri, 7 Jun 2024 20:38:04 +0900 (JST) From: Biju Das To: Yoshihiro Shimoda , Philipp Zabel , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Biju Das , Vinod Koul , Kishon Vijay Abraham I , linux-renesas-soc@vger.kernel.org, linux-phy@lists.infradead.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das Subject: [PATCH RFC v2 3/4] phy: renesas: phy-rcar-gen3-usb2: Control VBUSEN selection Date: Fri, 7 Jun 2024 12:37:44 +0100 Message-Id: <20240607113745.73934-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> References: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use regmap provided by the regulator driver to control VBUS for RZ/G2L alike SoCs. Signed-off-by: Biju Das --- v1->v2: * Used regulator driver's regmap to handle VBUS. --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index fbab6ac0f0d1..90561b6f9597 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,7 @@ struct rcar_gen3_chan { struct extcon_dev *extcon; struct rcar_gen3_phy rphys[NUM_OF_PHYS]; struct regulator *vbus; + struct regmap *regmap; struct work_struct work; struct mutex lock; /* protects rphys[...].powered */ enum usb_dr_mode dr_mode; @@ -188,6 +190,10 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus) dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, vbus); if (ch->soc_no_adp_ctrl) { + if (vbus) + regmap_write(ch->regmap, 0, 0); + else + regmap_write(ch->regmap, 0, 1); vbus_ctrl_reg = USB2_VBCTRL; vbus_ctrl_val = USB2_VBCTRL_VBOUT; } @@ -718,7 +724,8 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) phy_set_drvdata(channel->rphys[i].phy, &channel->rphys[i]); } - channel->vbus = devm_regulator_get_optional(dev, "vbus"); + channel->vbus = devm_regulator_get(dev, channel->soc_no_adp_ctrl ? + "usb_vbus" : "vbus"); if (IS_ERR(channel->vbus)) { if (PTR_ERR(channel->vbus) == -EPROBE_DEFER) { ret = PTR_ERR(channel->vbus); @@ -727,6 +734,14 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) channel->vbus = NULL; } + if (channel->soc_no_adp_ctrl && channel->vbus) { + channel->regmap = regulator_get_regmap(channel->vbus); + if (IS_ERR(channel->regmap)) { + ret = PTR_ERR(channel->vbus); + goto error; + } + } + platform_set_drvdata(pdev, channel); channel->dev = dev; From patchwork Fri Jun 7 11:37:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13689753 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A50A190060; Fri, 7 Jun 2024 11:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760297; cv=none; b=DpJ+O9rmKcqhQYulfx9uEN4koDiacpk5R0yAOZl3ONS+WjoIG3RuETVlTb5TRMTP3fAI4MUmoqowXKssXijKyv9ucmHZRTus5hpft4mzzS6HjyjSdFtHTjnB3pJoxy6jnG4gpKgQBSz3vQU23NfztQ/8/lP6fIYj2xKwLPjW3g8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717760297; c=relaxed/simple; bh=oxKWcpVAXXPyUMCU1E6CBtM5Hu7e1FfDc5YNoyYVX8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gGf86Tn9+X/n1tjqwiLQit5BMEJoMv2HIl8/mpXTd0K5hQJzvFkkytRg4BaOnxEaqkHdmdSUhk21jkG0lxShrFXzefGncOlwPPBWaavP7EYf7+9H3Bnl0Wtgsr24jbGPyzcVWxQ0AR+DjjmY81jzUq8wWVj0tkEJe53kb2RFcjk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.08,221,1712588400"; d="scan'208";a="207084446" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 07 Jun 2024 20:38:14 +0900 Received: from localhost.localdomain (unknown [10.226.92.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id C16034005B53; Fri, 7 Jun 2024 20:38:09 +0900 (JST) From: Biju Das To: Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Biju Das , Vinod Koul , Kishon Vijay Abraham I , Liam Girdwood , Mark Brown , linux-renesas-soc@vger.kernel.org, linux-phy@lists.infradead.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , devicetree@vger.kernel.org Subject: [PATCH RFC v2 4/4] arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS Date: Fri, 7 Jun 2024 12:37:45 +0100 Message-Id: <20240607113745.73934-5-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> References: <20240607113745.73934-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Replace the fixed regulator for USB VBUS. Signed-off-by: Biju Das --- v1->v2: * New patch. --- arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi b/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi index b7a3e6caa386..9105afbd5810 100644 --- a/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi +++ b/arch/arm64/boot/dts/renesas/rz-smarc-common.dtsi @@ -54,14 +54,6 @@ codec_dai: simple-audio-card,codec { }; }; - usb0_vbus_otg: regulator-usb0-vbus-otg { - compatible = "regulator-fixed"; - - regulator-name = "USB0_VBUS_OTG"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - }; - vccq_sdhi1: regulator-vccq-sdhi1 { compatible = "regulator-gpio"; regulator-name = "SDHI1 VccQ"; @@ -139,6 +131,11 @@ &ohci1 { &phyrst { status = "okay"; + vbus_usb0: usb-vbus-regulator { + regulator-name = "usb_vbus"; + regulator-min-microvolt = <0>; + regulator-max-microvolt = <3300000>; + }; }; &scif0 { @@ -171,7 +168,7 @@ &usb2_phy0 { pinctrl-0 = <&usb0_pins>; pinctrl-names = "default"; - vbus-supply = <&usb0_vbus_otg>; + vbus-supply = <&vbus_usb0>; status = "okay"; };