From 609f4bcf811584c9de7ddf7980dd75bb4c419c02 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Thu, 15 Aug 2013 11:31:34 +0530 Subject: [PATCH 1/5] ARM: davinci: da850: add DT node for mdio device Add mdio device tree node information to da850 by providing register details and bus frequency of mdio. Signed-off-by: Lad, Prabhakar Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-evm.dts | 6 ++++++ arch/arm/boot/dts/da850.dtsi | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 5bce7cc55cf3..1f8cfdd50da1 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -90,6 +90,12 @@ partition@5 { }; }; }; + mdio: mdio@1e24000 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + bus_freq = <2200000>; + }; }; nand_cs3@62000000 { status = "okay"; diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index d70ba5504481..33306f2760a3 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -125,6 +125,13 @@ spi1_cs0_pin: pinmux_spi1_cs0 { 0x14 0x00000010 0x000000f0 >; }; + mdio_pins: pinmux_mdio_pins { + pinctrl-single,bits = < + /* MDIO_CLK, MDIO_D */ + 0x10 0x00000088 0x000000ff + >; + }; + }; serial0: serial@1c42000 { compatible = "ns16550a"; @@ -216,6 +223,12 @@ spi1: spi@1f0e000 { interrupts = <56>; status = "disabled"; }; + mdio: mdio@1e24000 { + compatible = "ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x224000 0x1000>; + }; }; nand_cs3@62000000 { compatible = "ti,davinci-nand"; From 73db59516120b5380a9237c6034e7cadbbef5d3a Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Thu, 15 Aug 2013 11:31:35 +0530 Subject: [PATCH 2/5] ARM: davinci: da850: add OF_DEV_AUXDATA entry for mdio. Add OF_DEV_AUXDATA for mdio driver in da850 board dt file to use mdio clock. Signed-off-by: Lad, Prabhakar Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 9683cbd1f6c8..d172563acaee 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -43,6 +43,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ns16550a", 0x01c42000, "serial8250.0", NULL), OF_DEV_AUXDATA("ns16550a", 0x01d0c000, "serial8250.1", NULL), OF_DEV_AUXDATA("ns16550a", 0x01d0d000, "serial8250.2", NULL), + OF_DEV_AUXDATA("ti,davinci_mdio", 0x01e24000, "davinci_mdio.0", NULL), {} }; From 235d8cd99954dd53c38635a1a8a09a0f09b28750 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Fri, 16 Aug 2013 19:41:02 +0530 Subject: [PATCH 3/5] ARM: davinci: da850: add OF_DEV_AUXDATA entry for davinci_emac Add OF_DEV_AUXDATA for ethernet davinci_emac driver in da850 board dt file to use emac clock. Signed-off-by: Lad, Prabhakar Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index d172563acaee..d2bc574ae172 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -44,6 +44,8 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ns16550a", 0x01d0c000, "serial8250.1", NULL), OF_DEV_AUXDATA("ns16550a", 0x01d0d000, "serial8250.2", NULL), OF_DEV_AUXDATA("ti,davinci_mdio", 0x01e24000, "davinci_mdio.0", NULL), + OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1", + NULL), {} }; From dd7deaf218bfbb270b6e3b7d45371eff3900e8c2 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Fri, 16 Aug 2013 22:37:09 +0530 Subject: [PATCH 4/5] ARM: davinci: da850: add DT node for ethernet Add ethernet device tree node information and pinmux for mii to da850 by providing interrupt details and local mac address. Signed-off-by: Lad, Prabhakar Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-evm.dts | 5 +++++ arch/arm/boot/dts/da850.dtsi | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 1f8cfdd50da1..588ce58a2959 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -96,6 +96,11 @@ mdio: mdio@1e24000 { pinctrl-0 = <&mdio_pins>; bus_freq = <2200000>; }; + eth0: ethernet@1e20000 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&mii_pins>; + }; }; nand_cs3@62000000 { status = "okay"; diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 33306f2760a3..98f380dae3d2 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -131,6 +131,22 @@ mdio_pins: pinmux_mdio_pins { 0x10 0x00000088 0x000000ff >; }; + mii_pins: pinmux_mii_pins { + pinctrl-single,bits = < + /* + * MII_TXEN, MII_TXCLK, MII_COL + * MII_TXD_3, MII_TXD_2, MII_TXD_1 + * MII_TXD_0 + */ + 0x8 0x88888880 0xfffffff0 + /* + * MII_RXER, MII_CRS, MII_RXCLK + * MII_RXDV, MII_RXD_3, MII_RXD_2 + * MII_RXD_1, MII_RXD_0 + */ + 0xc 0x88888888 0xffffffff + >; + }; }; serial0: serial@1c42000 { @@ -229,6 +245,20 @@ mdio: mdio@1e24000 { #size-cells = <0>; reg = <0x224000 0x1000>; }; + eth0: ethernet@1e20000 { + compatible = "ti,davinci-dm6467-emac"; + reg = <0x220000 0x4000>; + ti,davinci-ctrl-reg-offset = <0x3000>; + ti,davinci-ctrl-mod-reg-offset = <0x2000>; + ti,davinci-ctrl-ram-offset = <0>; + ti,davinci-ctrl-ram-size = <0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <33 + 34 + 35 + 36 + >; + }; }; nand_cs3@62000000 { compatible = "ti,davinci-nand"; From 29864962f79e3dab645a5b00ccc7d4da96e9db33 Mon Sep 17 00:00:00 2001 From: "Manjunathappa, Prakash" Date: Wed, 19 Jun 2013 14:45:40 +0530 Subject: [PATCH 5/5] ARM: davinci: da850: do not specify clock_frequency for UART DT node DT kernel on da850-evm comes up with garbled UART logs. This is because of mismatch in actual module clock rate and rate specified(clock-frequency) in DT blob. kernel should not assume or depend on bootloaders clock configuration, instead let it find the clock rate at runtime. Issue discussed here before arriving on this implementation: "ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes" https://patchwork.kernel.org/patch/2162271/ Signed-off-by: Manjunathappa, Prakash Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 98f380dae3d2..8d17346f9702 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -152,7 +152,6 @@ mii_pins: pinmux_mii_pins { serial0: serial@1c42000 { compatible = "ns16550a"; reg = <0x42000 0x100>; - clock-frequency = <150000000>; reg-shift = <2>; interrupts = <25>; status = "disabled"; @@ -160,7 +159,6 @@ serial0: serial@1c42000 { serial1: serial@1d0c000 { compatible = "ns16550a"; reg = <0x10c000 0x100>; - clock-frequency = <150000000>; reg-shift = <2>; interrupts = <53>; status = "disabled"; @@ -168,7 +166,6 @@ serial1: serial@1d0c000 { serial2: serial@1d0d000 { compatible = "ns16550a"; reg = <0x10d000 0x100>; - clock-frequency = <150000000>; reg-shift = <2>; interrupts = <61>; status = "disabled";