Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 0/4] phy: samsung: add Exynos2200 SNPS eUSB2 driver
Date: Sat, 15 Feb 2025 14:24:05 +0200	[thread overview]
Message-ID: <20250215122409.162810-1-ivo.ivanov.ivanov1@gmail.com> (raw)

Hey folks,

In the vendor kernel, everything is handled in a single phy driver,
with helpers for functions outside it. Clocks and regulators are
specified and enabled in one node, which makes it difficult to
separate what clocks and regulators go where without access to
schematics or TRMs. The following gates are defined for USB:

CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_USBSUBCTL_APB_PCLK
CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_USBDPPHY_CTRL_PCLK
CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_USBDPPHY_TCA_APB_CLK

CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_USBLINK_ACLK
CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_USB32DRD_REF_CLK_40

CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_EUSB_CTRL_PCLK
CLK_BLK_HSI0_UID_USB32DRD_IPCLKPORT_I_EUSB_APB_CLK
CLK_BLK_HSI0_UID_AS_APB_EUSBPHY_HSI0_IPCLKPORT_PCLKM
CLK_BLK_HSI0_UID_RSTNSYNC_CLK_HSI0_EUSB_IPCLKPORT_CLK

From what I've managed to understand, this SoC has 3 PHYs for USB:
 - a synopsys eusb2 phy
 - a synposys combophy for usbdp and superspeed
 - a usbcon phy, which can detach/attach pipe3 and has registers for
   linkctrl

The approach taken here is to introduce 2 new separate drivers: one for
the eusb2 and one for the usbcon. The eusb2 driver is modelled to take
a phandle to the usbcon and configure/unconfigure it for the eUSB2
to become accessible and not cause a hang whenever its registers are
touched.

A new USBDP driver will be added later on, so that pipe3 and super-speed
can be configured.

Best regards,
Ivaylo

Ivaylo Ivanov (4):
  dt-bindings: phy: add samsung,exynos2200-snps-eusb2-phy schema file
  dt-bindings: phy: add samsung,exynos2200-usbcon-phy schema file
  phy: samsung: add Exynos2200 SNPS eUSB2 driver
  phy: samsung: add Exynos2200 usb phy controller

 .../samsung,exynos2200-snps-eusb2-phy.yaml    |  75 ++++
 .../phy/samsung,exynos2200-usbcon-phy.yaml    |  70 ++++
 drivers/phy/samsung/Kconfig                   |  26 ++
 drivers/phy/samsung/Makefile                  |   2 +
 .../phy/samsung/phy-exynos2200-snps-eusb2.c   | 351 ++++++++++++++++++
 drivers/phy/samsung/phy-exynos2200-usbcon.c   | 241 ++++++++++++
 include/linux/soc/samsung/exynos-regs-pmu.h   |   3 +
 7 files changed, 768 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-snps-eusb2-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml
 create mode 100644 drivers/phy/samsung/phy-exynos2200-snps-eusb2.c
 create mode 100644 drivers/phy/samsung/phy-exynos2200-usbcon.c

-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

             reply	other threads:[~2025-02-15 12:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15 12:24 Ivaylo Ivanov [this message]
2025-02-15 12:24 ` [PATCH v1 1/4] dt-bindings: phy: add samsung,exynos2200-snps-eusb2-phy schema file Ivaylo Ivanov
2025-02-15 13:29   ` Rob Herring (Arm)
2025-02-16  9:14   ` Diederik de Haas
2025-02-16  9:22     ` Krzysztof Kozlowski
2025-02-16  9:27       ` Ivaylo Ivanov
2025-02-16  9:37         ` Krzysztof Kozlowski
2025-02-15 12:24 ` [PATCH v1 2/4] dt-bindings: phy: add samsung,exynos2200-usbcon-phy " Ivaylo Ivanov
2025-02-15 13:29   ` Rob Herring (Arm)
2025-02-15 12:24 ` [PATCH v1 3/4] phy: samsung: add Exynos2200 SNPS eUSB2 driver Ivaylo Ivanov
2025-02-16  9:26   ` Krzysztof Kozlowski
2025-02-16  9:41     ` Ivaylo Ivanov
2025-02-16  9:44       ` Krzysztof Kozlowski
2025-02-16  9:51         ` Ivaylo Ivanov
2025-02-16 13:19           ` Krzysztof Kozlowski
2025-02-16 13:57             ` Ivaylo Ivanov
2025-02-16 18:25               ` Ivaylo Ivanov
2025-02-17  9:05   ` Philipp Zabel
2025-02-15 12:24 ` [PATCH v1 4/4] phy: samsung: add Exynos2200 usb phy controller Ivaylo Ivanov
2025-02-16  9:36   ` Krzysztof Kozlowski
2025-02-16  9:58     ` Ivaylo Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250215122409.162810-1-ivo.ivanov.ivanov1@gmail.com \
    --to=ivo.ivanov.ivanov1@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox