Commit d62584f3 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'at91-dt2' of git://github.com/at91linux/linux-at91 into next/dt

Pull "Second batch of AT91 DT patches for 3.18" from Nicolas Ferre:

- 2 little fixes for at91sam9x5 and at91sam9n12ek
- removal of a board specific hook for sama5d3xek about phy fixup
  replaced with proper DT property definition.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>

* tag 'at91-dt2' of git://github.com/at91linux/linux-at91:
  ARM: at91: remove phy fixup for sama5d3xek boards
  ARM: at91/dt: describe rgmii ethernet phy connected to sama5d3xek boards
  ARM: at91/dt: sam9n12ek: ohci: add port and vbus property
  ARM: at91/dt: sam9x5: fix ADC compatible string
parents 046ed3cc 5f815730
......@@ -136,6 +136,8 @@ nand0: nand@40000000 {
};
usb0: ohci@00500000 {
num-ports = <1>;
atmel,vbus-gpio = <&pioB 7 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
......
......@@ -968,7 +968,7 @@ uart1: serial@f8044000 {
adc0: adc@f804c000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "atmel,at91sam9260-adc";
compatible = "atmel,at91sam9x5-adc";
reg = <0xf804c000 0x100>;
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&adc_clk>,
......
......@@ -36,6 +36,36 @@ spi0: spi@f0004000 {
macb0: ethernet@f0028000 {
phy-mode = "rgmii";
#address-cells = <1>;
#size-cells = <0>;
ethernet-phy@1 {
reg = <0x1>;
interrupt-parent = <&pioB>;
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
txen-skew-ps = <800>;
txc-skew-ps = <3000>;
rxdv-skew-ps = <400>;
rxc-skew-ps = <3000>;
rxd0-skew-ps = <400>;
rxd1-skew-ps = <400>;
rxd2-skew-ps = <400>;
rxd3-skew-ps = <400>;
};
ethernet-phy@7 {
reg = <0x7>;
interrupt-parent = <&pioB>;
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
txen-skew-ps = <800>;
txc-skew-ps = <3000>;
rxdv-skew-ps = <400>;
rxc-skew-ps = <3000>;
rxd0-skew-ps = <400>;
rxd1-skew-ps = <400>;
rxd2-skew-ps = <400>;
rxd3-skew-ps = <400>;
};
};
pmc: pmc@fffffc00 {
......
......@@ -46,30 +46,8 @@ static void __init at91_dt_init_irq(void)
of_irq_init(irq_of_match);
}
static int ksz9021rn_phy_fixup(struct phy_device *phy)
{
int value;
/* Set delay values */
value = MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW | 0x8000;
phy_write(phy, MICREL_KSZ9021_EXTREG_CTRL, value);
value = 0xF2F4;
phy_write(phy, MICREL_KSZ9021_EXTREG_DATA_WRITE, value);
value = MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW | 0x8000;
phy_write(phy, MICREL_KSZ9021_EXTREG_CTRL, value);
value = 0x2222;
phy_write(phy, MICREL_KSZ9021_EXTREG_DATA_WRITE, value);
return 0;
}
static void __init sama5_dt_device_init(void)
{
if (of_machine_is_compatible("atmel,sama5d3xcm") &&
IS_ENABLED(CONFIG_PHYLIB))
phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
ksz9021rn_phy_fixup);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment