1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

phy: add a NO-OP phy driver

This driver is used to stub PHY operations in a driver (USB, SATA).
This is useful when the 'client' driver (USB, SATA, ...) uses the PHY
framework and there is no actual PHY harwdare to drive.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
This commit is contained in:
Jean-Jacques Hiblot
2017-07-24 15:18:15 +02:00
committed by Marek Vasut
parent 2080d023d9
commit 3b63db37ad
4 changed files with 61 additions and 0 deletions

26
drivers/phy/nop-phy.c Normal file
View File

@@ -0,0 +1,26 @@
/*
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
* Written by Jean-Jacques Hiblot <jjhiblot@ti.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <dm.h>
#include <dm/device.h>
#include <generic-phy.h>
static const struct udevice_id nop_phy_ids[] = {
{ .compatible = "nop-phy" },
{ }
};
static struct phy_ops nop_phy_ops = {
};
U_BOOT_DRIVER(nop_phy) = {
.name = "nop_phy",
.id = UCLASS_PHY,
.of_match = nop_phy_ids,
.ops = &nop_phy_ops,
};