From: Rahul Sharma <rahul.sharma-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
t.stanislaws-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
kishon-l0cyMroinI0@public.gmane.org,
kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
joshi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
Rahul Sharma
<rahul.sharma-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH v3 0/3] phy: Add exynos-simple-phy driver
Date: Thu, 15 May 2014 00:47:20 +0530 [thread overview]
Message-ID: <1400095043-685-1-git-send-email-rahul.sharma@samsung.com> (raw)
From: Rahul Sharma <Rahul.Sharma-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Hi All,
This series has been originally proposed by Tomasz Stanislawski. With
his permission, I have addressed the following review comments in V3.
Changelog:
v3:
* Implement lazy-init of PHYs.
* Use MACROs instead of numbers to represent phys.
* Use regmap interface to access PMU registers.
It is based on "Next" branch in Kishon Vijay Abraham's tree at
https://git.kernel.org/cgit/linux/kernel/git/kishon/linux-phy.git/
/* Original Message from Tomasz Stanislawski <t.stanislaws-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> */
The Samsung SoCs from Exynos family are enhanced with a bunch of devices that
provide functionality of a physical layer for interfaces like USB, HDMI, SATA,
etc. They are controlled by a simple interface, often a single bit that enables
and/or resets the physical layer.
An IP driver should to control such a controller in an abstract manner.
Therefore, such 'enablers' were implemented as clocks in older versions of
Linux kernel. With the dawn of PHY subsystems, PHYs become a natural way of
exporting the 'enabler' functionality to drivers. However, there is an
unexpected consequence. Some of those 1-bit PHYs were implemented as separate
drivers. This means that one has to create a struct device, struct phy, its
phy provider and 100-150 lines of driver code to basically set one bit.
The DP phy driver is a good example:
https://lkml.org/lkml/2013/7/18/53
And simple-phy RFC (shares only driver code but not other resources):
https://lkml.org/lkml/2013/10/21/313
To avoid waste of resources I propose to create all such 1-bit phys from Exynos
SoC using a single device, driver and phy provider.
This patchset contains a proposed solution.
All comment are welcome.
Hopefully in future the functionality introduced by this patch may be merged
into a larger Power Management Unit (PMU) gluer driver. On Samsusng SoC , the
PMU part contains a number of register barely linked to power management (like
clock gating, clock dividers, CPU resetting, etc.). It may be tempting to
create a hybrid driver that export clocks/phys/etc that are controlled by PMU
unit.
Alternative solutions might be:
* exporting a regmap to the IP driver and allow the driver to control the PHY layer
like in the patch:
http://thread.gmane.org/gmane.linux.kernel.samsung-soc/28617/focus=28648
* create a dedicated power domain for hdmiphy
Regards,
Tomasz Stanislawski
v2:
* rename to exynos-simple-phy
* fix usage of devm_ioremap()
* add documentation for DT bindings
* add patches to client drivers
v1: initial version
Tomasz Stanislawski (3):
phy: Add exynos-simple-phy driver
drm: exynos: hdmi: use hdmiphy as PHY
s5p-tv: hdmi: use hdmiphy as PHY
.../devicetree/bindings/phy/samsung-phy.txt | 56 ++++++
drivers/gpu/drm/exynos/exynos_hdmi.c | 11 +-
drivers/media/platform/s5p-tv/hdmi_drv.c | 11 +-
drivers/phy/Kconfig | 5 +
drivers/phy/Makefile | 1 +
drivers/phy/exynos-simple-phy.c | 189 ++++++++++++++++++++
include/dt-bindings/phy/exynos-simple-phy.h | 27 +++
7 files changed, 290 insertions(+), 10 deletions(-)
create mode 100644 drivers/phy/exynos-simple-phy.c
create mode 100644 include/dt-bindings/phy/exynos-simple-phy.h
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2014-05-14 19:17 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 19:17 Rahul Sharma [this message]
2014-05-14 19:17 ` [PATCH v3 1/3] phy: Add exynos-simple-phy driver Rahul Sharma
2014-05-14 20:01 ` Tomasz Figa
2014-05-15 4:01 ` Rahul Sharma
2014-05-15 21:44 ` Tomasz Figa
2014-05-16 9:42 ` Rahul Sharma
2014-05-16 10:35 ` Rahul Sharma
2014-05-16 10:50 ` Tomasz Figa
2014-05-16 14:30 ` Rahul Sharma
2014-05-16 14:49 ` Tomasz Figa
2014-05-19 7:10 ` Rahul Sharma
2014-05-19 10:54 ` Tomasz Figa
2014-05-20 5:12 ` Rahul Sharma
2014-05-14 22:14 ` Thierry Reding
2014-05-15 5:19 ` Rahul Sharma
2014-05-15 7:42 ` Thierry Reding
2014-05-15 8:17 ` Rahul Sharma
[not found] ` <CAPdUM4OXXMzMDNVym1ysMx7wifbO2QsSP5jk6cn3+F8Or3ng3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-15 9:23 ` Thierry Reding
2014-05-15 13:31 ` Bartlomiej Zolnierkiewicz
2014-05-15 13:35 ` Rahul Sharma
2014-05-15 13:41 ` Kishon Vijay Abraham I
2014-05-15 13:45 ` Rahul Sharma
2014-05-14 19:17 ` [PATCH v3 2/3] drm: exynos: hdmi: use hdmiphy as PHY Rahul Sharma
2014-05-14 19:17 ` [PATCH v3 3/3] s5p-tv: " Rahul Sharma
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=1400095043-685-1-git-send-email-rahul.sharma@samsung.com \
--to=rahul.sharma-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=joshi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=t.stanislaws-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).