linux/drivers/net/dsa/microchip/ksz8863_smi.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Microchip KSZ8863 series register access through SMI
 *
 * Copyright (C) 2019 Pengutronix, Michael Grzeschik <[email protected]>
 */

#include <linux/mod_devicetable.h>
#include <linux/property.h>

#include "ksz8.h"
#include "ksz_common.h"

/* Serial Management Interface (SMI) uses the following frame format:
 *
 *       preamble|start|Read/Write|  PHY   |  REG  |TA|   Data bits      | Idle
 *               |frame| OP code  |address |address|  |                  |
 * read | 32x1´s | 01  |    00    | 1xRRR  | RRRRR |Z0| 00000000DDDDDDDD |  Z
 * write| 32x1´s | 01  |    00    | 0xRRR  | RRRRR |10| xxxxxxxxDDDDDDDD |  Z
 *
 */

#define SMI_KSZ88XX_READ_PHY

static int ksz8863_mdio_read(void *ctx, const void *reg_buf, size_t reg_len,
			     void *val_buf, size_t val_len)
{}

static int ksz8863_mdio_write(void *ctx, const void *data, size_t count)
{}

static const struct regmap_bus regmap_smi[] =;

static const struct regmap_config ksz8863_regmap_config[] =;

static int ksz8863_smi_probe(struct mdio_device *mdiodev)
{}

static void ksz8863_smi_remove(struct mdio_device *mdiodev)
{}

static void ksz8863_smi_shutdown(struct mdio_device *mdiodev)
{}

static const struct of_device_id ksz8863_dt_ids[] =;
MODULE_DEVICE_TABLE(of, ksz8863_dt_ids);

static struct mdio_driver ksz8863_driver =;

mdio_module_driver(ksz8863_driver);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();