]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: marvell: add IGNORE COMPHY type
authorStefan Roese <sr@denx.de>
Mon, 24 Apr 2017 15:45:24 +0000 (18:45 +0300)
committerStefan Roese <sr@denx.de>
Tue, 9 May 2017 11:38:18 +0000 (13:38 +0200)
This type tells u-boot to preserve the COMPHY settings as is
it is usefull in situations where the COMPHY was initialized by
earlier firmware.
Note that IGNORE is different from UNCONNECTED since setting
UNCONNECTED type will disconnect the COMPHY in the COMPHY MUX
which is a desired behaviour

Signed-off-by: Yehuda Yitschak <yehuday@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Igal Liberman <igall@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/phy/marvell/comphy_core.c
drivers/phy/marvell/comphy_cp110.c
drivers/phy/marvell/comphy_mux.c
include/dt-bindings/comphy/comphy_data.h

index d8877e81e277088d9b5817a7e49a8d77f1577dc4..84f4e5f1895e40d4f76f12f38416b6a28d3afedc 100644 (file)
@@ -37,7 +37,7 @@ static char *get_type_string(u32 type)
                                "SGMII1", "SGMII2", "SGMII3", "QSGMII",
                                "USB3_HOST0", "USB3_HOST1", "USB3_DEVICE",
                                "XAUI0", "XAUI1", "XAUI2", "XAUI3",
-                               "RXAUI0", "RXAUI1", "SFI"};
+                               "RXAUI0", "RXAUI1", "SFI", "IGNORE"};
 
        if (type < 0 || type > PHY_TYPE_MAX)
                return "invalid";
index 8bec0abf75d8e998b20e00b2681ae420b424cd38..499aa68368454cedc0b652fe9b7a4ae96cd2b228 100644 (file)
@@ -1663,6 +1663,7 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
                }
                switch (ptr_comphy_map->type) {
                case PHY_TYPE_UNCONNECTED:
+               case PHY_TYPE_IGNORE:
                        continue;
                        break;
                case PHY_TYPE_PEX0:
index 1dc7426b638cf5eb7c16c23a8e51a723e6fea3e7..b036fb13b9c5ec62738cacca73c608a794485ac6 100644 (file)
@@ -27,6 +27,10 @@ static void comphy_mux_check_config(struct comphy_mux_data *mux_data,
 
        for (lane = 0; lane < comphy_max_lanes;
             lane++, comphy_map_data++, mux_data++) {
+               /* Don't check ignored COMPHYs */
+               if (comphy_map_data->type == PHY_TYPE_IGNORE)
+                       continue;
+
                mux_opt = mux_data->mux_values;
                for (opt = 0, valid = 0; opt < mux_data->max_lane_values;
                     opt++, mux_opt++) {
@@ -83,6 +87,9 @@ static void comphy_mux_reg_write(struct comphy_mux_data *mux_data,
 
        for (lane = 0; lane < comphy_max_lanes;
             lane++, comphy_map_data++, mux_data++) {
+               if (comphy_map_data->type == PHY_TYPE_IGNORE)
+                       continue;
+
                offset = lane * bitcount;
                mask = (((1 << bitcount) - 1) << offset);
                value = (comphy_mux_get_mux_value(mux_data,
index d127388371bc40ecae300f7ce5daa73ace018e31..5eb32ef684660ac758d889534279a5d372623207 100644 (file)
@@ -43,7 +43,8 @@
 #define PHY_TYPE_RXAUI0                        21
 #define PHY_TYPE_RXAUI1                        22
 #define PHY_TYPE_SFI                   23
-#define PHY_TYPE_MAX                   24
+#define PHY_TYPE_IGNORE                        24
+#define PHY_TYPE_MAX                   25
 #define PHY_TYPE_INVALID               0xff
 
 #define PHY_POLARITY_NO_INVERT         0