ARM: dts: Add support for Ethernet on some N900 macro boards
authorTony Lindgren <tony@atomide.com>
Thu, 18 Sep 2014 16:03:36 +0000 (09:03 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 18 Sep 2014 16:03:36 +0000 (09:03 -0700)
As we have support for this in board-rx51-peripherals.c, let's
add it to the .dts files too.

Note that the reset GPIO will eventually go to the driver.
For now let's just pull it down and skip any further reset
in case the bootloader has configured the MAC address so
NFSroot works.

Also note that after 3430-sdp are using proper GPMC timings
we can remove the tests for smsc,lan91c94 in gpmc.c.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap3-n900.dts
arch/arm/mach-omap2/pdata-quirks.c

index f0d82369ef135301f14a914720ee00479d14a9a0..19a585773abed5b990b47138d90853d7763e005d 100644 (file)
                >;
        };
 
+       ethernet_pins: pinmux_ethernet_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20b4, PIN_INPUT_PULLDOWN | MUX_MODE4)       /* gpmc_ncs3.gpio_54 */
+                       OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE4)               /* dss_data16.gpio_86 */
+                       OMAP3_CORE1_IOPAD(0x219c, PIN_OUTPUT | MUX_MODE4)               /* uart3_rts_sd.gpio_164 */
+               >;
+       };
+
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
                        0x18a (PIN_INPUT | MUX_MODE0)           /* i2c1_scl */
 
 &gpmc {
        ranges = <0 0 0x04000000 0x10000000>; /* 256MB */
+       ranges = <0 0 0x01000000 0x01000000>,   /* 16 MB for OneNAND */
+                <1 0 0x02000000 0x01000000>;   /* 16 MB for smc91c96 */
 
        /* gpio-irq for dma: 65 */
 
                        reg = <0x004c0000 0x0fb40000>;
                };
        };
+
+       ethernet@gpmc {
+               compatible = "smsc,lan91c94";
+               interrupt-parent = <&gpio2>;
+               interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;  /* gpio54 */
+               reg = <1 0x300 0xf>;            /* 16 byte IO range at offset 0x300 */
+               bank-width = <2>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ethernet_pins>;
+               gpmc,device-width = <2>;
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <48>;
+               gpmc,cs-wr-off-ns = <24>;
+               gpmc,adv-on-ns = <0>;
+               gpmc,adv-rd-off-ns = <0>;
+               gpmc,adv-wr-off-ns = <0>;
+               gpmc,we-on-ns = <12>;
+               gpmc,we-off-ns = <18>;
+               gpmc,oe-on-ns = <12>;
+               gpmc,oe-off-ns = <48>;
+               gpmc,page-burst-access-ns = <0>;
+               gpmc,access-ns = <42>;
+               gpmc,rd-cycle-ns = <180>;
+               gpmc,wr-cycle-ns = <180>;
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,wait-monitoring-ns = <0>;
+               gpmc,clk-activation-ns = <0>;
+               gpmc,wr-access-ns = <0>;
+               gpmc,wr-data-mux-bus-ns = <12>;
+       };
 };
 
 &mcspi1 {
index b9d091b4d98332b093b4f783f23063afab774c4e..61e8394a7d13f5d4923c6837cc1a310fbb4e7f14 100644 (file)
@@ -252,6 +252,9 @@ static void __init nokia_n900_legacy_init(void)
                platform_device_register(&omap3_rom_rng_device);
 
        }
+
+       /* Only on some development boards */
+       gpio_request_one(164, GPIOF_OUT_INIT_LOW, "smc91x reset");
 }
 
 static void __init omap3_tao3530_legacy_init(void)