Skip to content

Commit

Permalink
Merge branch 'bugfix/ksz8041_model_number_0x13' into 'master'
Browse files Browse the repository at this point in the history
esp_eth: Add model number 0x13 to the list of suported ksz80xx models

Closes IDFGH-9134

See merge request espressif/esp-idf!26121
  • Loading branch information
kostaond committed Sep 27, 2023
2 parents 346d13c + 303d2c2 commit 962c7c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/esp_eth/src/esp_eth_phy_ksz80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 962c7c0

Please sign in to comment.