am335x-bbb-common.dtsi 7.74 KB
/*
 * 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.
 */

/ {
	cpus {
		cpu@0 {
			cpu0-supply = <&dcdc2_reg>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x80000000 0x20000000>; /* 512 MB */
	};

	vmmcsd_fixed: fixedregulator@0 {
		compatible = "regulator-fixed";
		regulator-name = "vmmcsd_fixed";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};
};

&am33xx_pinmux {
	pinctrl-names = "default";
	pinctrl-0 = <&clkout2_pin &ddr3_vtt_toggle>;

	ddr3_vtt_toggle: ddr3_vtt_toggle {
		pinctrl-single,pins = < 
			 0x164 0x7   /* ecap0_in_pwm0_out.gpio0_7, OUTPUT | MODE7 */
		>;
	};

	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 */
			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)		/* uart0_txd.uart0_txd */
		>;
	};

	clkout2_pin: pinmux_clkout2_pin {
		pinctrl-single,pins = <    
			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)     /* xdma_event_intr1.clkout2 */
		>;
	};	

	cpsw_default: cpsw_default {
		pinctrl-single,pins = <
            /* Slave 1 */
            0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)		/* mii1_txen.rgmii1_tctl */
            0x118 (PIN_INPUT_PULLDOWN  | MUX_MODE2) 	/* mii1_rxdv.rgmii1_rctl */
            0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) 	/* mii1_txd3.rgmii1_td3 */
            0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) 	/* mii1_txd2.rgmii1_td2 */
            0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) 	/* mii1_txd1.rgmii1_td1 */
            0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) 	/* mii1_txd0.rgmii1_td0 */
            0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) 	/* mii1_txclk.rgmii1_tclk */
            0x130 (PIN_INPUT_PULLDOWN  | MUX_MODE2) 	/* mii1_rxclk.rgmii1_rclk */
            0x134 (PIN_INPUT_PULLDOWN  | MUX_MODE2) 	/* mii1_rxd3.rgmii1_rd3 */
            0x138 (PIN_INPUT_PULLDOWN  | MUX_MODE2) 	/* mii1_rxd2.rgmii1_rd2 */
            0x13c (PIN_INPUT_PULLDOWN  | MUX_MODE2) 	/* mii1_rxd1.rgmii1_rd1 */
            0x140 (PIN_INPUT_PULLDOWN  | MUX_MODE2) 	/* mii1_rxd0.rgmii1_rd0 */

		>;
	};

	cpsw_sleep: cpsw_sleep {
		pinctrl-single,pins = <
            /* Slave 1 reset value */
            0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
            0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)

		>;
	};

	davinci_mdio_default: davinci_mdio_default {
		pinctrl-single,pins = <
			/* MDIO */
			0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
			0x14c (PIN_OUTPUT_PULLUP                | MUX_MODE0)	/* mdio_clk.mdio_clk */
		>;
	};

	davinci_mdio_sleep: davinci_mdio_sleep {
		pinctrl-single,pins = <
			/* MDIO reset value */
			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	/* mmc1 */		   
	mmc1_pins: pinmux_mmc1_pins {
		pinctrl-single,pins = <
			0x160 (PIN_INPUT | MUX_MODE7) 			/* GPIO0_6 : Card Detect */
		>;
	};

	/* mmc2 */		   
	emmc_pins: pinmux_emmc_pins {
		pinctrl-single,pins = <
			0x080 (PIN_INPUT_PULLUP | MUX_MODE2) 	/* gpmc_csn1.mmc1_clk */
			0x084 (PIN_INPUT_PULLUP | MUX_MODE2) 	/* gpmc_csn2.mmc1_cmd */
			0x000 (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad0.mmc1_dat0 */
			0x004 (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad1.mmc1_dat1 */
			0x008 (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad2.mmc1_dat2 */
			0x00c (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad3.mmc1_dat3 */
			0x010 (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad4.mmc1_dat4 */
			0x014 (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad5.mmc1_dat5 */
			0x018 (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad6.mmc1_dat6 */
			0x01c (PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad7.mmc1_dat7 */
		>;
	};
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins>;

	status = "okay";
};

&usb {
	status = "okay";
};

&usb_ctrl_mod {
	status = "okay";
};

&usb0_phy {
	status = "okay";
};

&usb1_phy {
	status = "okay";
};

&usb0 {
	status = "disabled";
	dr_mode = "host";	/* peripheral */
};

&usb1 {
	status = "okay";
	dr_mode = "host";
};

&cppi41dma  {
	status = "okay";
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins>;

	status = "okay";
	clock-frequency = <400000>;

	tps: tps@24 {
		reg = <0x24>;
	};
};


/include/ "tps65217.dtsi"

&tps {
	/*
	 * Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only
	 * mode") at poweroff.  Most BeagleBone versions do not support RTC-only
	 * mode and risk hardware damage if this mode is entered.
	 *
	 * For details, see linux-omap mailing list May 2015 thread
	 *	[PATCH] ARM: dts: am335x-bone* enable pmic-shutdown-controller
	 * In particular, messages:
	 *	http://www.spinics.net/lists/linux-omap/msg118585.html
	 *	http://www.spinics.net/lists/linux-omap/msg118615.html
	 *
	 * You can override this later with
	 *	&tps {  /delete-property/ ti,pmic-shutdown-controller;  }
	 * if you want to use RTC-only mode and made sure you are not affected
	 * by the hardware problems. (Tip: double-check by performing a current
	 * measurement after shutdown: it should be less than 1 mA.)
	 */
	ti,pmic-shutdown-controller;

	interrupt-parent = <&intc>;
	interrupts = <7>;	/* NNMI */

	regulators {
		dcdc1_reg: regulator@0 {
			regulator-name = "vdds_dpr";
			regulator-always-on;
		};

		dcdc2_reg: regulator@1 {
			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <1351500>;
			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-name = "vio,vrtc,vdds";
			regulator-always-on;
		};

		ldo2_reg: regulator@4 {
			regulator-name = "vdd_3v3aux";
			regulator-always-on;
		};

		ldo3_reg: regulator@5 {
			regulator-name = "vdd_1v8";
			regulator-always-on;
		};

		ldo4_reg: regulator@6 {
			regulator-name = "vdd_3v3a";
			regulator-always-on;
		};
	};
};

&mac {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&cpsw_default>;
	pinctrl-1 = <&cpsw_sleep>;
	dual_emac = <1>;	/* [FALINUX] 2016.12.22 tsheaven :  slaves = <1>; */
	status = "okay";
};

&davinci_mdio {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;
	status = "okay";
};

&cpsw_emac0 {
	phy_id = <&davinci_mdio>, <0>;
	phy-mode = "rgmii-txid";
	dual_emac_res_vlan = <1>;
};

&cpsw_emac1 {
    phy_id = <&davinci_mdio>, <1>;
    phy-mode = "rgmii-txid";
    dual_emac_res_vlan = <2>;
};

&mmc1 {
	status = "okay";
	bus-width = <0x4>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};

&aes {
	status = "okay";
};

&sham {
	status = "okay";
};

&wkup_m3_ipc {
	ti,scale-data-fw = "am335x-iem-scale-data.bin";
};

&rtc {
	clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
	clock-names = "ext-clk", "int-clk";
	system-power-controller;
};

&sgx {
	status = "okay";
};