pwr_led_gpio = <&pwr_led>,"gpios:4";
pwr_led_activelow = <&pwr_led>,"gpios:8";
pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
+
+ eth_led0 = <&phy1>,"led-modes:0";
+ eth_led1 = <&phy1>,"led-modes:4";
};
};
eee Enable Energy Efficient Ethernet support for
compatible devices (default "on"). See also
- "tx_lpi_timer".
+ "tx_lpi_timer". Pi3B+ only.
eth_downshift_after Set the number of auto-negotiation failures
after which the 1000Mbps modes are disabled.
Legal values are 2, 3, 4, 5 and 0, where
- 0 means never downshift (default 2).
+ 0 means never downshift (default 2). Pi3B+ only.
- eth_led0 Set mode of LED0 (usually orange) (default
- "1"). The legal values are:
- 0=link/activity 1=link1000/activity
+ eth_led0 Set mode of LED0 (usually orange). The legal
+ values are:
+
+ Pi3B+
+
+ 0=link/activity 1=link1000/activity (default)
2=link100/activity 3=link10/activity
4=link100/1000/activity 5=link10/1000/activity
6=link10/100/activity 14=off 15=on
- eth_led1 Set mode of LED1 (usually green) (default
- "6"). See eth_led0 for legal values.
+ Pi4
+
+ 0=Speed/Activity (default) 1=Speed
+ 2=Speed/Flash activity 3=FDX
+ 4=Off 5=On
+ 6=Alt 7=Speed/Flash
+ 8=Link 9=Activity
+
+ eth_led1 Set mode of LED1 (usually green) (Pi3B+ default
+ "6", Pi4 default "0"). See eth_led0 for legal
+ values.
eth_max_speed Set the maximum speed a link is allowed
to negotiate. Legal values are 10, 100 and
- 1000 (default 1000).
+ 1000 (default 1000). Pi3B+ only.
i2c_arm Set to "on" to enable the ARM's i2c interface
(default "off")
static int bcm54xx_config_init(struct phy_device *phydev)
{
int reg, err, val;
+ u32 led_modes[] = {BCM_LED_MULTICOLOR_LINK_ACT,
+ BCM_LED_MULTICOLOR_LINK_ACT};
+ struct device_node *np = phydev->mdio.dev.of_node;
reg = phy_read(phydev, MII_BCM54XX_ECR);
if (reg < 0)
bcm54xx_phydsp_config(phydev);
+ of_property_read_u32_array(np, "led-modes", led_modes, 2);
+
/* Encode link speed into LED1 and LED3 pair (green/amber).
* Also flash these two LEDs on activity. This means configuring
* them for MULTICOLOR and encoding link/activity into them.
bcm_phy_write_shadow(phydev, BCM5482_SHD_LEDS1, val);
val = BCM_LED_MULTICOLOR_IN_PHASE |
- BCM5482_SHD_LEDS1_LED1(BCM_LED_MULTICOLOR_LINK_ACT) |
- BCM5482_SHD_LEDS1_LED3(BCM_LED_MULTICOLOR_LINK_ACT);
+ BCM5482_SHD_LEDS1_LED1(led_modes[0]) |
+ BCM5482_SHD_LEDS1_LED3(led_modes[1]);
bcm_phy_write_exp(phydev, BCM_EXP_MULTICOLOR, val);
return 0;