162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * mdio-open-alliance.h - definition of OPEN Alliance SIG standard registers
462306a36Sopenharmony_ci */
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#ifndef __MDIO_OPEN_ALLIANCE__
762306a36Sopenharmony_ci#define __MDIO_OPEN_ALLIANCE__
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <linux/mdio.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci/* NOTE: all OATC14 registers are located in MDIO_MMD_VEND2 */
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* Open Alliance TC14 (10BASE-T1S) registers */
1462306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_IDVER	0xca00  /* PLCA ID and version */
1562306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_CTRL0	0xca01	/* PLCA Control register 0 */
1662306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_CTRL1	0xca02	/* PLCA Control register 1 */
1762306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_STATUS	0xca03	/* PLCA Status register */
1862306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_TOTMR	0xca04	/* PLCA TO Timer register */
1962306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_BURST	0xca05	/* PLCA BURST mode register */
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci/* Open Alliance TC14 PLCA IDVER register */
2262306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_IDM	0xff00	/* PLCA MAP ID */
2362306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_VER	0x00ff	/* PLCA MAP version */
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/* Open Alliance TC14 PLCA CTRL0 register */
2662306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_EN	BIT(15) /* PLCA enable */
2762306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_RST	BIT(14) /* PLCA reset */
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci/* Open Alliance TC14 PLCA CTRL1 register */
3062306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_NCNT	0xff00	/* PLCA node count */
3162306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_ID	0x00ff	/* PLCA local node ID */
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/* Open Alliance TC14 PLCA STATUS register */
3462306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_PST	BIT(15)	/* PLCA status indication */
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci/* Open Alliance TC14 PLCA TOTMR register */
3762306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_TOT	0x00ff
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci/* Open Alliance TC14 PLCA BURST register */
4062306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_MAXBC	0xff00
4162306a36Sopenharmony_ci#define MDIO_OATC14_PLCA_BTMR	0x00ff
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci/* Version Identifiers */
4462306a36Sopenharmony_ci#define OATC14_IDM		0x0a00
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci#endif /* __MDIO_OPEN_ALLIANCE__ */
47