Path: blob/main/sys/dts/include/dt-bindings/net/qcom-qca807x.h
48375 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2022 Adrian Chadd <[email protected]>4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions are7* met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in12* the documentation and/or other materials provided with the distribution.13*14* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND15* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE16* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE17* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE18* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL19* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS20* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)21* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT22* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY23* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF24* SUCH DAMAGE.25*/2627/*28* DT constants for the Qualcomm QCA807x PHY29*/3031#ifndef _DT_BINDINGS_NET_QCOM_QCA807X_H__32#define _DT_BINDINGS_NET_QCOM_QCA807X_H__3334/*35* PSGMII driver configuration. This controls the TX voltage36* used between the SoC and the external PHY over the SERDES37* interface.38*39* The default value is 12 (600mV)40*/41#define PSGMII_QSGMII_TX_DRIVER_140MV 042#define PSGMII_QSGMII_TX_DRIVER_160MV 143#define PSGMII_QSGMII_TX_DRIVER_180MV 244#define PSGMII_QSGMII_TX_DRIVER_200MV 345#define PSGMII_QSGMII_TX_DRIVER_220MV 446#define PSGMII_QSGMII_TX_DRIVER_240MV 547#define PSGMII_QSGMII_TX_DRIVER_260MV 648#define PSGMII_QSGMII_TX_DRIVER_280MV 749#define PSGMII_QSGMII_TX_DRIVER_300MV 850#define PSGMII_QSGMII_TX_DRIVER_320MV 951#define PSGMII_QSGMII_TX_DRIVER_400MV 1052#define PSGMII_QSGMII_TX_DRIVER_500MV 1153#define PSGMII_QSGMII_TX_DRIVER_600MV 125455/*56* These fields control the PHY power saving based on the57* cable length.58*59* 0 - full amplitude, full bias current60* 1 - amplitude follows cable length, half bias current61* 2 - full amplitude, bias current follows cable length62* 3 - both amplitude and bias current follow cable length63* 4 - full amplitude, half bias current64* 5 - amplitude follows cable length, 1/4 bias current65* when cable length < 10m else half bias current66* 6 - full amplitude, bias current follows cable length,67* bias reduced further by half when cable length < 10m68* 7 - amplitude follows cable length, same bias current69* setting as '6'70*/71#define QCA807X_CONTROL_DAC_FULL_VOLT_BIAS 072#define QCA807X_CONTROL_DAC_DSP_VOLT_HALF_BIAS 173#define QCA807X_CONTROL_DAC_FULL_VOLT_DSP_BIAS 274#define QCA807X_CONTROL_DAC_DSP_VOLT_BIAS 375#define QCA807X_CONTROL_DAC_FULL_VOLT_HALF_BIAS 476#define QCA807X_CONTROL_DAC_DSP_VOLT_QUARTER_BIAS 577#define QCA807X_CONTROL_DAC_FULL_VOLT_HALF_BIAS_SHORT 678#define QCA807X_CONTROL_DAC_DSP_VOLT_HALF_BIAS_SHORT 77980#endif /* __DT_BINDINGS_NET_QCOM_QCA807X_H__ */818283