ipq40xx: 5.10: copy patches
[openwrt/openwrt.git] / target / linux / ipq40xx / patches-5.10 / 706-dt-bindings-net-add-QCA807x-PHY.patch
1 From c66863c1ba8995b61e6d727d78a241c734f5bb57 Mon Sep 17 00:00:00 2001
2 From: Robert Marko <robert.marko@sartura.hr>
3 Date: Thu, 1 Oct 2020 15:05:35 +0200
4 Subject: [PATCH] dt-bindings: net: add QCA807x PHY
5
6 Add DT bindings for Qualcomm QCA807x PHY series.
7
8 Signed-off-by: Robert Marko <robert.marko@sartura.hr>
9 ---
10 include/dt-bindings/net/qcom-qca807x.h | 45 ++++++++++++++++++++++++++
11 1 file changed, 45 insertions(+)
12 create mode 100644 include/dt-bindings/net/qcom-qca807x.h
13
14 --- /dev/null
15 +++ b/include/dt-bindings/net/qcom-qca807x.h
16 @@ -0,0 +1,45 @@
17 +/* SPDX-License-Identifier: GPL-2.0-or-later */
18 +/*
19 + * Device Tree constants for the Qualcomm QCA807X PHYs
20 + */
21 +
22 +#ifndef _DT_BINDINGS_QCOM_QCA807X_H
23 +#define _DT_BINDINGS_QCOM_QCA807X_H
24 +
25 +#define PSGMII_QSGMII_TX_DRIVER_140MV 0
26 +#define PSGMII_QSGMII_TX_DRIVER_160MV 1
27 +#define PSGMII_QSGMII_TX_DRIVER_180MV 2
28 +#define PSGMII_QSGMII_TX_DRIVER_200MV 3
29 +#define PSGMII_QSGMII_TX_DRIVER_220MV 4
30 +#define PSGMII_QSGMII_TX_DRIVER_240MV 5
31 +#define PSGMII_QSGMII_TX_DRIVER_260MV 6
32 +#define PSGMII_QSGMII_TX_DRIVER_280MV 7
33 +#define PSGMII_QSGMII_TX_DRIVER_300MV 8
34 +#define PSGMII_QSGMII_TX_DRIVER_320MV 9
35 +#define PSGMII_QSGMII_TX_DRIVER_400MV 10
36 +#define PSGMII_QSGMII_TX_DRIVER_500MV 11
37 +/* Default value */
38 +#define PSGMII_QSGMII_TX_DRIVER_600MV 12
39 +
40 +/* Full amplitude, full bias current */
41 +#define QCA807X_CONTROL_DAC_FULL_VOLT_BIAS 0
42 +/* Amplitude follow DSP (amplitude is adjusted based on cable length), half bias current */
43 +#define QCA807X_CONTROL_DAC_DSP_VOLT_HALF_BIAS 1
44 +/* Full amplitude, bias current follow DSP (bias current is adjusted based on cable length) */
45 +#define QCA807X_CONTROL_DAC_FULL_VOLT_DSP_BIAS 2
46 +/* Both amplitude and bias current follow DSP */
47 +#define QCA807X_CONTROL_DAC_DSP_VOLT_BIAS 3
48 +/* Full amplitude, half bias current */
49 +#define QCA807X_CONTROL_DAC_FULL_VOLT_HALF_BIAS 4
50 +/* Amplitude follow DSP setting; 1/4 bias current when cable<10m,
51 + * otherwise half bias current
52 + */
53 +#define QCA807X_CONTROL_DAC_DSP_VOLT_QUARTER_BIAS 5
54 +/* Full amplitude; same bias current setting with “010” and “011”,
55 + * but half more bias is reduced when cable <10m
56 + */
57 +#define QCA807X_CONTROL_DAC_FULL_VOLT_HALF_BIAS_SHORT 6
58 +/* Amplitude follow DSP; same bias current setting with “110”, default value */
59 +#define QCA807X_CONTROL_DAC_DSP_VOLT_HALF_BIAS_SHORT 7
60 +
61 +#endif