Explorar o código

fix(esp_eth): Add model number 0x13 to list of suported models

Add model number 0x13 to KSZ80xx driver's list of supported models
corresonding to KSZ8041RLNI.
Bogdan Kolendovskyy %!s(int64=2) %!d(string=hai) anos
pai
achega
303d2c2dc6
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      components/esp_eth/src/esp_eth_phy_ksz80xx.c

+ 4 - 0
components/esp_eth/src/esp_eth_phy_ksz80xx.c

@@ -20,6 +20,7 @@
 typedef enum
 {
     KSZ80XX_MODEL_NUMBER_11 = 0x11,     // KSZ8041
+    KSZ80XX_MODEL_NUMBER_13 = 0x13,     // KSZ8041RLNI
     KSZ80XX_MODEL_NUMBER_15 = 0x15,     // KSZ8021/31
     KSZ80XX_MODEL_NUMBER_16 = 0x16,     // KSZ8051/81/91
     KSZ80XX_MODEL_NUMBER_17 = 0x17,     // KSZ8061
@@ -37,6 +38,7 @@ typedef struct
 static const uint8_t supported_model_numbers[] =
 {
     KSZ80XX_MODEL_NUMBER_11,
+    KSZ80XX_MODEL_NUMBER_13,
     KSZ80XX_MODEL_NUMBER_15,
     KSZ80XX_MODEL_NUMBER_16,
     KSZ80XX_MODEL_NUMBER_17,
@@ -45,6 +47,7 @@ static const uint8_t supported_model_numbers[] =
 
 static const char *model_names[] = {
     "41",           // models with model number 0x11
+    "41RLNI",       // models with model number 0x13
     "21/31",        // models with model number 0x15
     "51/81/91",     // models with model number 0x16
     "61",           // models with model number 0x17
@@ -128,6 +131,7 @@ static bool ksz80xx_init_model(phy_ksz80xx_t *ksz80xx)
     switch (ksz80xx->model_number) {
     case KSZ80XX_MODEL_NUMBER_21:   // models KSZ8001
     case KSZ80XX_MODEL_NUMBER_11:   // models KSZ8041
+    case KSZ80XX_MODEL_NUMBER_13:   // models KSZ8041RLNI
         ksz80xx->op_mode_reg = KSZ80XX_PC2R_REG_ADDR;
         ksz80xx->op_mode_offset = 2; // bits 4:2
         break;