diff options
Diffstat (limited to 'arch/arm/mach-at91/board-dt-sama5.c')
| -rw-r--r-- | arch/arm/mach-at91/board-dt-sama5.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index 8fb9ef5333f1..97f7367d32b8 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
| 18 | #include <linux/phy.h> | 18 | #include <linux/phy.h> |
| 19 | #include <linux/clk-provider.h> | 19 | #include <linux/clk-provider.h> |
| 20 | #include <linux/phy.h> | ||
| 20 | 21 | ||
| 21 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
| 22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
| @@ -26,8 +27,25 @@ | |||
| 26 | 27 | ||
| 27 | #include "generic.h" | 28 | #include "generic.h" |
| 28 | 29 | ||
| 30 | static int ksz8081_phy_fixup(struct phy_device *phy) | ||
| 31 | { | ||
| 32 | int value; | ||
| 33 | |||
| 34 | value = phy_read(phy, 0x16); | ||
| 35 | value &= ~0x20; | ||
| 36 | phy_write(phy, 0x16, value); | ||
| 37 | |||
| 38 | return 0; | ||
| 39 | } | ||
| 40 | |||
| 29 | static void __init sama5_dt_device_init(void) | 41 | static void __init sama5_dt_device_init(void) |
| 30 | { | 42 | { |
| 43 | if (of_machine_is_compatible("atmel,sama5d4ek") && | ||
| 44 | IS_ENABLED(CONFIG_PHYLIB)) { | ||
| 45 | phy_register_fixup_for_id("fc028000.etherne:00", | ||
| 46 | ksz8081_phy_fixup); | ||
| 47 | } | ||
| 48 | |||
| 31 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 49 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 32 | } | 50 | } |
| 33 | 51 | ||
