Commit 6fda93b95e388c82a84c201324f77997d82fada2
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes
Merge "at91: fixes for 3.19 #1 (ter)" from Nicolas Ferre: First fixes batch for AT91 on 3.19: - fix some DT entries - correct clock entry for the at91sam9263 LCD - add a phy_fixup for Eth1 on sama5d4 * tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree ARM: at91/dt: sam9263: Add missing clocks to lcdc node ARM: at91: sama5d3: dt: correct the sound route ARM: at91/dt: sama5d4: fix the timer reg length Signed-off-by: Olof Johansson <olof@lixom.net>
Showing 4 changed files Side-by-side Diff
arch/arm/boot/dts/at91sam9263.dtsi
arch/arm/boot/dts/sama5d3xmb.dtsi
arch/arm/boot/dts/sama5d4.dtsi
arch/arm/mach-at91/board-dt-sama5.c
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | #include <linux/of_platform.h> |
18 | 18 | #include <linux/phy.h> |
19 | 19 | #include <linux/clk-provider.h> |
20 | +#include <linux/phy.h> | |
20 | 21 | |
21 | 22 | #include <asm/setup.h> |
22 | 23 | #include <asm/irq.h> |
23 | 24 | |
... | ... | @@ -26,8 +27,25 @@ |
26 | 27 | |
27 | 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 | 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 | 49 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
32 | 50 | } |
33 | 51 |