summaryrefslogtreecommitdiffstats
path: root/drivers/phy
Commit message (Collapse)AuthorAgeFilesLines
* phy: stm32: sync with upstreamAhmad Fatoum2021-03-171-80/+151
| | | | | | | | | | | | | | | | | | | | | | | | This imports following Linux patches by Amelie Delaunay <amelie.delaunay@foss.st.com>: phy: stm32: manage 1v1 and 1v8 supplies at pll activation/deactivation phy: stm32: replace regulator_bulk* by multiple regulator_* phy: stm32: ensure pll is disabled before phys creation phy: stm32: ensure phy are no more active when removing the driver phy: stm32: rework PLL Lock detection ARM: dts: stm32: add usbphyc vdda1v1 and vdda1v8 supplies on stm32mp151 This makes barebox compatible to the new device tree binding, reduces our differences to the upstream driver and removes the power_on, power_off callbacks which are now integrated into init/exit. The device tree override is necessary, because unlike with Linux, barebox regulator core doesn't descend into child nodes to enable their regulators, but that's a fix for another day. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: include <linux/math64.h> wrapper instead of <asm-generic/div64.h>Ahmad Fatoum2021-02-191-1/+1
| | | | | | | | | | | <asm-generic/div64.h> isn't meant for direct usage as <asm/div64.h> may override this on a per-architecture basis. We don't do that currently, but in the future we might. Include the <linux/math64.h> instead. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: stm32-usphyc: release resources to properly support EPROBE_DEFERAhmad Fatoum2020-12-161-2/+7
| | | | | | | | Driver failed to release resources on failed probe so far, leading to deferred probe failing with -EBUSY. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Use driver macroSascha Hauer2020-09-291-5/+1
| | | | | | | We have several macros for a oneline driver registration. Add some missing and use them consistently where possible througout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/kconfig'Sascha Hauer2020-05-141-1/+1
|\
| * phy: freescale: fix typo in Kconfig defaultAhmad Fatoum2020-04-291-1/+1
| | | | | | | | | | | | | | We don't have a config SOC_IMX8MQ, but have an ARCH_IMX8MQ. Fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drivers: mark first batch of compilable drivers for COMPILE_TESTAhmad Fatoum2020-05-081-1/+1
|/ | | | | | | | | All of these drivers have a runtime dependency on SoC peripherals, but can nevertheless be compile-tested. Add COMPILE_TEST as an alternate dependency. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: port over Linux stm32 usbphyc driverAhmad Fatoum2020-02-253-0/+448
| | | | | | | | This ports over the Linux v5.6-rc1 state of the driver. It'll be needed for both EHCI and DWC2 usb connectivity on the stm32mp1. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: introduce phy_get_by_indexAhmad Fatoum2020-02-251-0/+14
| | | | | | | | | The upstream (v5.6-rc1) device tree node of the stm32mp157c-dk2's OHCI has a phys property, but not phy-names. We have no API to reference such a phy easily (passing NULL isn't allowed). Add one. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: populate existing ->pwr member with phy-supplyAhmad Fatoum2020-02-251-0/+10
| | | | | | | | | barebox already enables/disables the ->pwr regulator at the correct places, but doesn't assign a value anywhere. Initialize it with the phy-supply regulator like Linux does. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: remove unused init_data parameterAhmad Fatoum2020-02-253-6/+3
| | | | | | | | Linux has since migrated to a new lookup API that lacks the init_data parameter. As it's unused in barebox, follow suit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: Port i.MX8MQ USB PHY driver from LinuxAndrey Smirnov2019-02-225-0/+138
| | | | | | | Port i.MX8MQ USB PHY driver from Linux. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: core: Assume EPROBE_DEFER in of_phy_provider_lookup()Andrey Smirnov2019-02-221-2/+2
| | | | | | | | | In order to support PHY driver probe deferral change the code to assume EPROBE_DEFER instead of ENODEV when requested PHY is missing from phy_provider_list. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-1/+1
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb-nop-xceiv: Add support for 'reset-gpios' bindingAndrey Smirnov2017-06-061-4/+41
| | | | | | | Cc: cphealy@gmail.com Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: usb-nop-xceiv: Add clock supportSascha Hauer2017-01-191-3/+15
| | | | | | | As stated in the FIXME comment this is needed. Get and enable a "main_clk" just like the kernel does. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: Add usb-nop-xceiv supportSascha Hauer2016-09-293-4/+116
| | | | | | | | | Add a nop usb transcveiver driver. At the moment it does nothing, so is nothing more than a driver to satisfy the device tree dependencies. clk / vbus-regulator / vbus-detect-gpio support can be added later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: Introduce to_usbphy conversion functionSascha Hauer2016-09-291-0/+12
| | | | | | | | | | The generic phy support layer has the necessary list handling and phy retrieval functions, so we should reuse them for usb phys. This adds a phy_to_usbphy() conversion function which drivers can implement which attach to the generic phy layer and are really usb phys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: Introduce of_phy_get_by_phandleSascha Hauer2016-09-291-0/+36
| | | | | | | | | Currently generic phy support assumes that the standard phy binding from dts/Bindings/phy/phy-bindings.txt is used. This adds a helper function which can be used to retrieve a phy when this standard binding is not used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add generic PHY frameworkLucas Stach2014-11-043-0/+341
This brings in the generix PHY framework from Linux. I tried to strip it down as much as possible while keeping it useful. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>