/* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ /* * AM335x Starter Kit * http://www.ti.com/tool/tmdssk3358 */ /dts-v1/; #include "am33xx.dtsi" #include / { model = "TI AM335x EVM-SK"; compatible = "ti,am335x-evmsk", "ti,am33xx"; cpus { cpu@0 { /*cpu0-supply = <&vdd1_reg>; commented lahari */ cpu0-supply = <&dcdc2_reg>; }; }; memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */ }; am33xx_pinmux: pinmux@44e10800 { pinctrl-names = "default"; //pinctrl-0 = <&clkout1_pin>; pinctrl-0 = <&clkout1_pin &mmc1_pins &wlan_pins>; /* ddr3_vtt_toggle: ddr3_vtt_toggle { pinctrl-single,pins = < 0x164 0x7 /* ecap0_in_pwm0_out.gpio0_7, OUTPUT | MODE7 */ //>; //}; ecap0_in_pwm0_out is used as mode0 */ lcd_pins_default: lcd_pins_default { pinctrl-single,pins = < 0x20 0x01 /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */ 0x24 0x01 /* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */ 0x28 0x01 /* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */ 0x2c 0x01 /* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */ 0x30 0x01 /* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */ 0x34 0x01 /* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */ 0x38 0x01 /* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */ 0x3c 0x01 /* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */ 0xa0 0x00 /* lcd_data0.lcd_data0, OUTPUT | MODE0 */ 0xa4 0x00 /* lcd_data1.lcd_data1, OUTPUT | MODE0 */ 0xa8 0x00 /* lcd_data2.lcd_data2, OUTPUT | MODE0 */ 0xac 0x00 /* lcd_data3.lcd_data3, OUTPUT | MODE0 */ 0xb0 0x00 /* lcd_data4.lcd_data4, OUTPUT | MODE0 */ 0xb4 0x00 /* lcd_data5.lcd_data5, OUTPUT | MODE0 */ 0xb8 0x00 /* lcd_data6.lcd_data6, OUTPUT | MODE0 */ 0xbc 0x00 /* lcd_data7.lcd_data7, OUTPUT | MODE0 */ 0xc0 0x00 /* lcd_data8.lcd_data8, OUTPUT | MODE0 */ 0xc4 0x00 /* lcd_data9.lcd_data9, OUTPUT | MODE0 */ 0xc8 0x00 /* lcd_data10.lcd_data10, OUTPUT | MODE0 */ 0xcc 0x00 /* lcd_data11.lcd_data11, OUTPUT | MODE0 */ 0xd0 0x00 /* lcd_data12.lcd_data12, OUTPUT | MODE0 */ 0xd4 0x00 /* lcd_data13.lcd_data13, OUTPUT | MODE0 */ 0xd8 0x00 /* lcd_data14.lcd_data14, OUTPUT | MODE0 */ 0xdc 0x00 /* lcd_data15.lcd_data15, OUTPUT | MODE0 */ 0xe0 0x00 /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */ 0xe4 0x00 /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */ 0xe8 0x00 /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */ 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */ >; }; lcd_pins_sleep: lcd_pins_sleep { pinctrl-single,pins = < 0x20 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad8.lcd_data16 */ 0x24 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad9.lcd_data17 */ 0x28 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad10.lcd_data18 */ 0x2c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad11.lcd_data19 */ 0x30 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.lcd_data20 */ 0x34 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.lcd_data21 */ 0x38 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.lcd_data22 */ 0x3c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.lcd_data23 */ 0xa0 (PULL_DISABLE | MUX_MODE7) /* lcd_data0.lcd_data0 */ 0xa4 (PULL_DISABLE | MUX_MODE7) /* lcd_data1.lcd_data1 */ 0xa8 (PULL_DISABLE | MUX_MODE7) /* lcd_data2.lcd_data2 */ 0xac (PULL_DISABLE | MUX_MODE7) /* lcd_data3.lcd_data3 */ 0xb0 (PULL_DISABLE | MUX_MODE7) /* lcd_data4.lcd_data4 */ 0xb4 (PULL_DISABLE | MUX_MODE7) /* lcd_data5.lcd_data5 */ 0xb8 (PULL_DISABLE | MUX_MODE7) /* lcd_data6.lcd_data6 */ 0xbc (PULL_DISABLE | MUX_MODE7) /* lcd_data7.lcd_data7 */ 0xc0 (PULL_DISABLE | MUX_MODE7) /* lcd_data8.lcd_data8 */ 0xc4 (PULL_DISABLE | MUX_MODE7) /* lcd_data9.lcd_data9 */ 0xc8 (PULL_DISABLE | MUX_MODE7) /* lcd_data10.lcd_data10 */ 0xcc (PULL_DISABLE | MUX_MODE7) /* lcd_data11.lcd_data11 */ 0xd0 (PULL_DISABLE | MUX_MODE7) /* lcd_data12.lcd_data12 */ 0xd4 (PULL_DISABLE | MUX_MODE7) /* lcd_data13.lcd_data13 */ 0xd8 (PULL_DISABLE | MUX_MODE7) /* lcd_data14.lcd_data14 */ 0xdc (PULL_DISABLE | MUX_MODE7) /* lcd_data15.lcd_data15 */ 0xe0 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */ 0xe4 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.lcd_hsync */ 0xe8 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.lcd_pclk */ 0xec (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.lcd_ac_bias_en */ >; }; i2c0_pins: pinmux_i2c0_pins { pinctrl-single,pins = < 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ >; }; uart0_pins: pinmux_uart0_pins { pinctrl-single,pins = < 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ //PULL_DISABLE ?? 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ //PULL_DISABLE ?? >; }; clkout1_pin: pinmux_clkout1_pin { pinctrl-single,pins = < 0x1b0 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0.clkout1 */ //pull up >; }; mmc1_pins_default: pinmux_mmc1_pins { pinctrl-single,pins = < 0x0F0 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */ 0x0F4 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */ 0x0F8 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */ 0x0FC (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */ 0x100 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */ //PULL_DISABLE ?? 0x104 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */ 0x160 (PIN_INPUT_PULLUP | MUX_MODE5) /* spi0_cs1.gpio0_6 */ //changed from PIN_INPUT >; }; mmc1_pins_sleep: pinmux_mmc1_pins_sleep { pinctrl-single,pins = < 0x0F0 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x0F4 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x0F8 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x0FC (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x100 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x104 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x160 (PIN_INPUT_PULLDOWN | MUX_MODE7) >; }; mcasp1_pins: mcasp1_pins { pinctrl-single,pins = < 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mii1_crs.mcasp1_aclkx */ //I2C1_SDA -- pull up!! 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mii1_rxerr.mcasp1_fsx */ //I2C1_SCL -- pull up!! 0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */ //PULL_DISABLE ?? 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */ //PULL_DISABLE ?? >; }; mcasp1_sleep_pins: mcasp1_sleep_pins { pinctrl-single,pins = < 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7) >; }; /* wl12xx/wl18xx card on mmc2 */ mmc1_pins: pinmux_mmc1_pins { pinctrl-single,pins = < 0x00 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad0.mmc1_dat0, INPUT_PULLUP | MODE2 */ 0x04 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad1.mmc1_dat1, INPUT_PULLUP | MODE2 */ 0x08 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad2.mmc1_dat2, INPUT_PULLUP | MODE2 */ 0x0C (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad3.mmc1_dat3, INPUT_PULLUP | MODE2 */ 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd, INPUT_PULLUP | MODE2 */ 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk, INPUT_PULLUP | MODE2 */ >; }; /* wl12xx/wl18xx card enable/irq GPIOs. */ wlan_pins: pinmux_wlan_pins { pinctrl-single,pins = < 0x7C (PIN_OUTPUT | MUX_MODE7) /* gpmc_csn0.gpio1_29, OUTPUT | MODE7 */ 0x74 (PIN_INPUT | MUX_MODE7) /* gpmc_wpn.gpio0_31, INPUT | MODE7 */ 0x1B4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0_20, OUTPUT_PULLUP | MODE7 */ >; }; //lahari gpio0_pins: pinmux_gpio0_pins { pinctrl-single,pins = < 0x11c (PIN_OUTPUT_PULLUP| MUX_MODE7) /* mii1_txd3--ADC_START o/p pull */ 0x120 (PIN_INPUT| MUX_MODE7) /* mii1_txd2 -- ADC_DRDY i/p*/ 0x124 (PIN_OUTPUT_PULLUP| MUX_MODE7) /* mii1_txd1 -- ADC_CLK_SCL o/p pull*/ 0x128 (PIN_INPUT| MUX_MODE7) /* mii1_txd0 -- ADC_GPIO1 i/p*/ //0x130 (PIN_INPUT| MUX_MODE7) /* mii1_rxclk -- ON/OFF */ >; }; gpio1_pins: pinmux_gpio1_pins { pinctrl-single,pins = < 0x54 (PIN_OUTPUT_PULLUP| MUX_MODE7) /* GPMC_A5--ADC_RESET o/p pull GPIO1 */ >; }; gpio2_pins: pinmux_gpio2_pins { pinctrl-single,pins = < 0x134 (PIN_INPUT| MUX_MODE7) /* mii1_rxd3 -- ADC_GPIO2 i/p GPIO2*/ >; }; spi0_pins: pinmux_spi0_pins { pinctrl-single,pins = < 0x150 (PIN_INPUT| MUX_MODE0) /* spi0_clk.spi0_clk */ //o/p 0x154 (PIN_OUTPUT_PULLUP| MUX_MODE0) /* spi0_d0.spi0_d0 */ // o/p pull 0x158 (PIN_INPUT| MUX_MODE0) /* spi0_d1.spi0_d1 */ // i/p 0x15c (PIN_OUTPUT_PULLUP| MUX_MODE0) /* spi0_cs0.spi0_cs0 */ //o/p pull >; }; }; ocp { uart0: serial@44e09000 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins>; status = "okay"; }; i2c0: i2c@44e0b000 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; clock-frequency = <400000>; /* Set OPP50 (0.95V) for VDD core */ //lahari sleep-sequence = /bits/ 8 < 0x02 0x24 0x0b 0x6d /* Password unlock 1 */ 0x02 0x24 0x10 0x02 /* Set DCDC3 to 0.95V */ 0x02 0x24 0x0b 0x6d /* Password unlock 2 */ 0x02 0x24 0x10 0x02 /* Set DCDC3 to 0.95V */ 0x02 0x24 0x0b 0x6c /* Password unlock 1 */ 0x02 0x24 0x11 0x86 /* Apply DCDC changes */ 0x02 0x24 0x0b 0x6c /* Password unlock 2 */ 0x02 0x24 0x11 0x86 /* Apply DCDC changes */ >; /* Set OPP100 (1.10V) for VDD core */ wake-sequence = /bits/ 8 < 0x02 0x24 0x0b 0x6d /* Password unlock 1 */ 0x02 0x24 0x10 0x08 /* Set DCDC3 to 1.1V */ 0x02 0x24 0x0b 0x6d /* Password unlock 2 */ 0x02 0x24 0x10 0x08 /* Set DCDC3 to 1.1V */ 0x02 0x24 0x0b 0x6c /* Password unlock 1 */ 0x02 0x24 0x11 0x86 /* Apply DCDC changes */ 0x02 0x24 0x0b 0x6c /* Password unlock 2 */ 0x02 0x24 0x11 0x86 /* Apply DCDC changes */ >; tps: tps@24 { reg = <0x24>; }; }; spi0: spi@48030000 { compatible = "ti,omap-mcspi";//chnged to omap2 frm omap4 #address-cells = <1>; #size-cells = <0>; reg = <0x48030000 0x400>; interrupts = <65>; ti,spi-num-cs = <2>; //chnged to 1 frm 2 pintctrl-names = "default"; pinctrl-0 = <&spi0_pins>; ti,hwmods = "spi0"; clocks = <&dpll_per_m2_div4_ck>; clock-names = "fck"; dmas = <&edma 16 &edma 17 &edma 18 &edma 19>; dma-names = "tx0", "rx0", "tx1", "rx1"; status = "okay"; spidev:spidev@0{ compatible = "spidev"; reg = <0>; spi-max-frequency = <1000000>; }; }; musb: usb@47400000 { status = "okay"; control@44e10000 { status = "okay"; }; usb-phy@47401300 { status = "okay"; }; usb-phy@47401b00 { status = "okay"; }; usb@47401000 { status = "okay"; }; usb@47401800 { status = "okay"; dr_mode = "host"; }; dma-controller@07402000 { status = "okay"; }; }; lcdc: lcdc@0x4830e000 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&lcd_pins_default>; pinctrl-1 = <&lcd_pins_sleep>; status = "okay"; display-timings { 480x272 { hactive = <480>; vactive = <272>; hback-porch = <43>; hfront-porch = <8>; hsync-len = <4>; vback-porch = <12>; vfront-porch = <4>; vsync-len = <10>; clock-frequency = <9000000>; hsync-active = <0>; vsync-active = <0>; }; }; }; }; vbat: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "vbat"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-boot-on; }; /*lis3_reg: fixedregulator@1 { compatible = "regulator-fixed"; regulator-name = "lis3_reg"; regulator-boot-on; };*/ // Added from beaglebone -- lahari vmmcsd_fixed: fixedregulator@1 { compatible = "regulator-fixed"; regulator-name = "vmmcsd_fixed"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; //TBD wlan_en_reg: fixedregulator@2 { compatible = "regulator-fixed"; regulator-name = "wlan-en-regulator"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; /* WLAN_EN GPIO for this board - Bank1, pin29 */ gpio = <&gpio1 29 0>; /* WLAN card specific delay */ startup-delay-us = <70000>; enable-active-high; }; gpio_buttons: gpio_buttons@0 { compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; switch@1 { label = "button0"; linux,code = <0x100>; gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; }; switch@2 { label = "button1"; linux,code = <0x101>; gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; }; switch@3 { label = "button2"; linux,code = <0x102>; gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; gpio-key,wakeup; }; switch@4 { label = "button3"; linux,code = <0x103>; gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; }; }; wlcore { compatible = "wl12xx"; gpio = <31>; /* Bank0, pin31 - WLANIRQ */ /* * TODO: use edge irqs for suspend/resume. * in newer kerenls, we seem to miss interrupts when * working with edge irqs, so revert back to level irqs. */ /* platform-quirks = <1>; */ /* if a 12xx card is there, configure the clock to WL12XX_REFCLOCK_38_XTAL */ board-ref-clock = <4>; }; backlight { compatible = "pwm-backlight"; pwms = <&ecap2 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 58 61 66 75 90 125 170 255>; default-brightness-level = <8>; }; }; &wkup_m3 { ti,needs-vtt-toggle; ti,vtt-gpio-pin = <7>; }; /*lahari - added block of tps*/ #include "tps65217.dtsi" &tps { regulators { dcdc1_reg: regulator@0 { regulator-always-on; }; dcdc2_reg: regulator@1 { /* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>; regulator-max-microvolt = <1378000>; regulator-boot-on; regulator-always-on; }; dcdc3_reg: regulator@2 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>; regulator-max-microvolt = <1150000>; regulator-boot-on; regulator-always-on; }; ldo1_reg: regulator@3 { regulator-always-on; }; ldo2_reg: regulator@4 { regulator-always-on; }; ldo3_reg: regulator@5 { regulator-always-on; }; ldo4_reg: regulator@6 { regulator-always-on; }; }; }; &cpsw_emac0 { phy_id = <&davinci_mdio>, <0>; phy-mode = "rgmii-txid"; }; &cpsw_emac1 { phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii-txid"; }; //lahari /*&gpio0{ pinctrl-names = "default"; pinctrl-0 = <&gpio0_pins>; status = "okay"; };*/ &gpio1{ pinctrl-names = "default"; pinctrl-0 = <&gpio1_pins>; status = "okay"; }; &gpio2{ pinctrl-names = "default"; pinctrl-0 = <&gpio2_pins>; status = "okay"; }; /*&spi0{ pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; status = "okay"; spidev0: spi@0 { compatible = "spidev"; reg = <0x0>; spi-max-frequency = <1000000>; spi-cpha; }; };*/ &tscadc { status = "okay"; tsc { ti,wires = <4>; ti,x-plate-resistance = <200>; ti,coordinate-readouts = <5>; ti,wire-config = <0x00 0x11 0x22 0x33>; }; }; &gpio0 { ti,no-reset; }; &mmc1 { status = "okay"; //vmmc-supply = <&vmmc_reg>; //commented lahari ---ldo4 vmmc-supply = <&vmmcsd_fixed>; bus-width = <4>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mmc1_pins_default>; pinctrl-1 = <&mmc1_pins_sleep>; //cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; &mcasp1 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; pinctrl-1 = <&mcasp1_sleep_pins>; status = "okay"; op-mode = <0>; /* MCASP_IIS_MODE */ tdm-slots = <2>; /* 16 serializer */ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ 0 0 1 2 >; tx-num-evt = <32>; rx-num-evt = <32>; };