]> Git Repo - u-boot.git/blame - drivers/phy/phy-apple-atc.c
Merge tag 'u-boot-at91-2024.01-b' of https://source.denx.de/u-boot/custodians/u-boot...
[u-boot.git] / drivers / phy / phy-apple-atc.c
CommitLineData
b99c6357
MK
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2022 Mark Kettenis <[email protected]>
4 */
5
6#include <common.h>
7#include <dm.h>
8#include <dm/device-internal.h>
9#include <generic-phy.h>
10#include <reset-uclass.h>
11
12static const struct phy_ops apple_atcphy_ops = {
13};
14
15static struct driver apple_atcphy_driver = {
16 .name = "apple-atcphy",
17 .id = UCLASS_PHY,
18 .ops = &apple_atcphy_ops,
19};
20
21static int apple_atcphy_reset_of_xlate(struct reset_ctl *reset_ctl,
22 struct ofnode_phandle_args *args)
23{
24 if (args->args_count != 0)
25 return -EINVAL;
26
27 return 0;
28}
29
30static const struct reset_ops apple_atcphy_reset_ops = {
31 .of_xlate = apple_atcphy_reset_of_xlate,
32};
33
34static int apple_atcphy_reset_probe(struct udevice *dev)
35{
36 struct udevice *child;
37
38 device_bind(dev, &apple_atcphy_driver, "apple-atcphy", NULL,
39 dev_ofnode(dev), &child);
40
41 return 0;
42}
43
44static const struct udevice_id apple_atcphy_ids[] = {
45 { .compatible = "apple,t6000-atcphy" },
46 { .compatible = "apple,t8103-atcphy" },
47 { }
48};
49
50U_BOOT_DRIVER(apple_atcphy_reset) = {
51 .name = "apple-atcphy-reset",
52 .id = UCLASS_RESET,
53 .of_match = apple_atcphy_ids,
54 .ops = &apple_atcphy_reset_ops,
55 .probe = apple_atcphy_reset_probe,
56};
This page took 0.028108 seconds and 4 git commands to generate.