129332c0dSAdrian Chadd /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 329332c0dSAdrian Chadd * 429332c0dSAdrian Chadd * Copyright (c) 2022 Adrian Chadd <adrian@FreeBSD.org>. 529332c0dSAdrian Chadd * 629332c0dSAdrian Chadd * Redistribution and use in source and binary forms, with or without 729332c0dSAdrian Chadd * modification, are permitted provided that the following conditions 829332c0dSAdrian Chadd * are met: 929332c0dSAdrian Chadd * 1. Redistributions of source code must retain the above copyright 1029332c0dSAdrian Chadd * notice unmodified, this list of conditions, and the following 1129332c0dSAdrian Chadd * disclaimer. 1229332c0dSAdrian Chadd * 2. Redistributions in binary form must reproduce the above copyright 1329332c0dSAdrian Chadd * notice, this list of conditions and the following disclaimer in the 1429332c0dSAdrian Chadd * documentation and/or other materials provided with the distribution. 1529332c0dSAdrian Chadd * 1629332c0dSAdrian Chadd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1729332c0dSAdrian Chadd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1829332c0dSAdrian Chadd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1929332c0dSAdrian Chadd * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2029332c0dSAdrian Chadd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2129332c0dSAdrian Chadd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2229332c0dSAdrian Chadd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2329332c0dSAdrian Chadd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2429332c0dSAdrian Chadd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2529332c0dSAdrian Chadd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2629332c0dSAdrian Chadd * SUCH DAMAGE. 2729332c0dSAdrian Chadd */ 2829332c0dSAdrian Chadd 2929332c0dSAdrian Chadd #ifndef __QCOM_MDIO_IPQ4018_REG_H__ 3029332c0dSAdrian Chadd #define __QCOM_MDIO_IPQ4018_REG_H__ 3129332c0dSAdrian Chadd 3229332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_ADDR 0x44 3329332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_WRITE 0x48 3429332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_READ 0x4c 3529332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_CMD 0x50 3629332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_CMD_ACCESS_BUSY (1U << 16) 3729332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_CMD_ACCESS_START (1U << 8) 3829332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_CMD_ACCESS_CODE_READ 0 3929332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_REG_CMD_ACCESS_CODE_WRITE 1 4029332c0dSAdrian Chadd 4129332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_SLEEP_COUNT 100 4229332c0dSAdrian Chadd #define QCOM_IPQ4018_MDIO_SLEEP 10 /* uSec */ 4329332c0dSAdrian Chadd 4429332c0dSAdrian Chadd #endif /* __QCOM_MDIO_IPQ4018_REG_H__ */ 45