移植imx6记录

/*
* Copyright 2012 Freescale Semiconductor, Inc.
* Copyright 2011 Linaro Ltd.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/

/dts-v1/;

#include <dt-bindings/input/input.h>
#include "imx6q.dtsi"

/* #include "imx6qdl-sabresd.dtsi" */
/ {
    model = "Freescale i.MX6 Quad SABRE Smart Device Board";
    compatible = "fsl,imx6q-sabresd", "fsl,imx6q";

    memory {
        reg = <0x10000000 0x80000000>;
    };
	sound {
		compatible = "fsl,imx-audio-sgtl5000";
		model = "imx6-sgtl5000";
		ssi-controller = <&ssi1>;
		audio-codec = <&codec>;
		audio-routing =
			"MIC_IN", "Mic Jack",
			"Mic Jack", "Mic Bias",
			"Headphone Jack", "HP_OUT";
		mux-int-port = <1>;
		mux-ext-port = <3>;
        /* 
		hp-det-gpios = <&gpio3 32 1>;
        mic-det-gpios = <&gpio1 9 1>; 
        */

	};

	sound-spdif {
		compatible = "fsl,imx-audio-spdif";
		model = "imx-spdif";
		spdif-controller = <&spdif>;
		spdif-out;
	};

    /*
LED灯显示
LED4 --> GPIO3_21(EIM_D21)
LED5 --> GPIO3_22(EIM_D22)
LED6 --> GPIO3_23(EIM_D23)
    */
	leds {
		compatible = "gpio-leds";

        /* 心跳灯 */
		debug-led {
			label = "led4 Heartbeat";
			gpios = <&gpio3 21 0>;
			linux,default-trigger = "heartbeat";
		};
        /* 使SD2读写时闪烁 */
		led-mmc1 {
			label = "led5 mmc1";
			gpios = <&gpio3 22 0>;
			linux,default-trigger = "mmc1";
		};


	};


	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		reg_usb_otg_vbus: regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
			regulator-name = "usb_otg_vbus";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			gpio = <&gpio7 1 0>;
			enable-active-high;
		};

		reg_usb_h1_vbus: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "usb_h1_vbus";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			gpio = <&gpio1 20 0>;
			enable-active-high;
		};
		reg_2p5v: regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "2P5V";
			regulator-min-microvolt = <2500000>;
			regulator-max-microvolt = <2500000>;
			regulator-always-on;
		};

		reg_3p3v: regulator@3 {
			compatible = "regulator-fixed";
			reg = <3>;
			regulator-name = "3P3V";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};


        /*
		reg_audio: regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "wm8962-supply";
			gpio = <&gpio4 10 0>;
			enable-active-high;
		};

		reg_mipi_dsi_pwr_on: mipi_dsi_pwr_on {
			compatible = "regulator-fixed";
			regulator-name = "mipi_dsi_pwr_on";
			gpio = <&gpio6 14 0>;
			enable-active-high;
		};

		reg_sensor: regulator@3 {
			compatible = "regulator-fixed";
			reg = <3>;
			regulator-name = "sensor-supply";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			gpio = <&gpio2 31 0>;
			startup-delay-us = <500>;
			enable-active-high;
		};
        */
	};

    gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_keys>;

        /*
		power {
			label = "Power Button";
			gpios = <&gpio3 29 1>;
			gpio-key,wakeup;
			linux,code = <KEY_POWER>;
		};
                DSP0_CNTRST接 sleep/WAKE
        */



                /*GPIO1_28(NENT_TX_EN 接 HOME */
		home {
			label = "Home";
			gpios = <&gpio1 28 1>;
			gpio-key,wakeup;
			linux,code = <KEY_HOME>;
		};

             /*   GPIO4_5(GPIO_19接 ENTER */
		enter {
			label = "Enter";
			gpios = <&gpio4 5 1>;
			gpio-key,wakeup;
			linux,code = <KEY_ENTER>;
		};
                /* GPIO1_30(ENET_TXD0 接ESC */
		esc {
			label = "Enter";
			gpios = <&gpio1 30 1>;
			gpio-key,wakeup;
			linux,code = <KEY_ESC>;
		};

	};



	aliases {
		mxcfb0 = &mxcfb1;
		mxcfb1 = &mxcfb2;
		mxcfb2 = &mxcfb3;
		mxcfb3 = &mxcfb4;
	};
	mxcfb1: fb@0 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "lcd";
		interface_pix_fmt = "RGB24";
		mode_str ="CLAA-WVGA";
		default_bpp = <16>;
		int_clk = <0>;
		late_init = <0>;
		status = "disabled";
	};

	mxcfb2: fb@1 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "hdmi";
		interface_pix_fmt = "RGB24";
		mode_str ="1920x1080M@60";
		default_bpp = <24>;
		int_clk = <0>;
		late_init = <0>;
		status = "disabled";
	};

	mxcfb3: fb@2 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "lcd";
		interface_pix_fmt = "RGB565";
		mode_str ="CLAA-WVGA";
		default_bpp = <16>;
		int_clk = <0>;
		late_init = <0>;
		status = "disabled";
	};

	mxcfb4: fb@3 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "ldb";
		interface_pix_fmt = "RGB666";
		default_bpp = <16>;
		int_clk = <0>;
		late_init = <0>;
		status = "disabled";
	};

	lcd@0 {
		compatible = "fsl,lcd";
		ipu_id = <0>;
		disp_id = <0>;
		default_ifmt = "RGB565";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ipu1>;
		status = "okay";
	};

	backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm1 0 5000000>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <7>;
		status = "okay";
	};


};

&uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart1_2>;
    status = "okay";
};

&usdhc2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc2>;
    cd-gpios = <&gpio1 4 0>;
    no-1-8-v;
    keep-power-in-suspend;
    enable-sdio-wakeup;
    status = "okay";
};

&iomuxc {
    pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1_2>;

	imx6q-tqimx6q {
    /* uart1 { */
        pinctrl_uart1_2: uart1grp-2 {
            fsl,pins = <
            MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1
            MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1
            >;
        };
    /* }; */
		pinctrl_usdhc2: usdhc2grp {
			fsl,pins = <
				MX6QDL_PAD_SD2_CMD__SD2_CMD		0x17059
				MX6QDL_PAD_SD2_CLK__SD2_CLK		0x10059
				MX6QDL_PAD_SD2_DAT0__SD2_DATA0		0x17059
				MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x17059
				MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x17059
				MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x17059
				MX6QDL_PAD_NANDF_D4__SD2_DATA4		0x17059
				MX6QDL_PAD_NANDF_D5__SD2_DATA5		0x17059
				MX6QDL_PAD_NANDF_D6__SD2_DATA6		0x17059
				MX6QDL_PAD_NANDF_D7__SD2_DATA7		0x17059
			>;
		};

		pinctrl_ipu1: ipu1grp {
			fsl,pins = <
				MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
				MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x10
				MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x10
				MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x10
				MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04        0x80000000
				MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x10
				MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x10
				MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x10
				MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x10
				MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x10
				MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x10
				MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x10
				MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x10
				MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x10
				MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x10
				MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x10
				MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x10
				MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x10
				MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x10
				MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x10
				MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x10
				MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x10
				MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x10
				MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x10
				MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x10
				MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x10
				MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x10
				MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x10
				MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x10
			>;
		};

		pinctrl_ipu1_2: ipu1grp-2 { /* parallel camera */
			fsl,pins = <
				MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000
				MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000
				MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000
				MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000
				MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000
				MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000
				MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000
				MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000
				MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000
				MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000
				MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000
				MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000
			>;
		};

		pinctrl_pwm1: pwm1grp {
			fsl,pins = <
				MX6QDL_PAD_SD1_DAT3__PWM1_OUT		0x1b0b1
			>;
		};

		pinctrl_i2c1: i2c1grp {
			fsl,pins = <
				MX6QDL_PAD_CSI0_DAT8__I2C1_SDA		0x4001b8b1
				MX6QDL_PAD_CSI0_DAT9__I2C1_SCL		0x4001b8b1
			>;
		};
		pinctrl_i2c2: i2c2grp {
			fsl,pins = <
				MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
				MX6QDL_PAD_KEY_ROW3__I2C2_SDA		0x4001b8b1
			>;
		};


		pinctrl_gpio_keys: gpio_keysgrp {
			fsl,pins = <
				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28           0x80000000
				MX6QDL_PAD_GPIO_19__GPIO4_IO05              0x80000000
				MX6QDL_PAD_ENET_TXD0__GPIO1_IO30            0x80000000
                /*
                GPIO1_28(NENT_TX_EN 接 HOME
                GPIO4_5(GPIO_19接 ENTER
                GPIO1_30(ENET_TXD0 接ESC
                DSP0_CNTRST接 sleep/WAKE
                */
			>;
		};
		pinctrl_usdhc4: usdhc4grp {
			fsl,pins = <
				MX6QDL_PAD_SD4_CMD__SD4_CMD		0x17059
				MX6QDL_PAD_SD4_CLK__SD4_CLK		0x10059
				MX6QDL_PAD_SD4_DAT0__SD4_DATA0		0x17059
				MX6QDL_PAD_SD4_DAT1__SD4_DATA1		0x17059
				MX6QDL_PAD_SD4_DAT2__SD4_DATA2		0x17059
				MX6QDL_PAD_SD4_DAT3__SD4_DATA3		0x17059
				MX6QDL_PAD_SD4_DAT4__SD4_DATA4		0x17059
				MX6QDL_PAD_SD4_DAT5__SD4_DATA5		0x17059
				MX6QDL_PAD_SD4_DAT6__SD4_DATA6		0x17059
				MX6QDL_PAD_SD4_DAT7__SD4_DATA7		0x17059
			>;
		};
		pinctrl_usbotg: usbotggrp {
			fsl,pins = <
				MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID	0x17059
			>;
		};

		pinctrl_flexcan1: flexcan1grp {
			fsl,pins = <
				MX6QDL_PAD_GPIO_7__FLEXCAN1_TX      0x80000000
				MX6QDL_PAD_GPIO_8__FLEXCAN1_RX      0x80000000
			>;
		};

		pinctrl_spdif: spdifgrp {
			fsl,pins = <
				MX6QDL_PAD_ENET_RXD0__SPDIF_OUT		0x1b0b0
			>;
		};



    };
	enet {
		pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 {
			fsl,pins = <
				MX6QDL_PAD_ENET_MDIO__ENET_MDIO		0x1b0b0
				MX6QDL_PAD_ENET_MDC__ENET_MDC		0x1b0b0
				/* AR8035 reset */
				MX6QDL_PAD_KEY_ROW4__GPIO4_IO15		0x130b0
				/* AR8035 interrupt */
				MX6QDL_PAD_DI0_PIN2__GPIO4_IO18		0x80000000
				/* GPIO16 -> AR8035 25MHz */
				MX6QDL_PAD_GPIO_16__ENET_REF_CLK	0xc0000000
				MX6QDL_PAD_RGMII_TXC__RGMII_TXC		0x80000000
				MX6QDL_PAD_RGMII_TD0__RGMII_TD0		0x1b0b0
				MX6QDL_PAD_RGMII_TD1__RGMII_TD1		0x1b0b0
				MX6QDL_PAD_RGMII_TD2__RGMII_TD2		0x1b0b0
				MX6QDL_PAD_RGMII_TD3__RGMII_TD3		0x1b0b0
				MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x1b0b0
				/* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
				MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK	0x0a0b1
				/* AR8035 pin strapping: IO voltage: pull up */
				MX6QDL_PAD_RGMII_RXC__RGMII_RXC		0x1b0b0
				/* AR8035 pin strapping: PHYADDR#0: pull down */
				MX6QDL_PAD_RGMII_RD0__RGMII_RD0		0x130b0
				/* AR8035 pin strapping: PHYADDR#1: pull down */
				MX6QDL_PAD_RGMII_RD1__RGMII_RD1		0x130b0
				/* AR8035 pin strapping: MODE#1: pull up */
				MX6QDL_PAD_RGMII_RD2__RGMII_RD2		0x1b0b0
				/* AR8035 pin strapping: MODE#3: pull up */
				MX6QDL_PAD_RGMII_RD3__RGMII_RD3		0x1b0b0
				/* AR8035 pin strapping: MODE#0: pull down */
				MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x130b0

				/*
				 * As the RMII pins are also connected to RGMII
				 * so that an AR8030 can be placed, set these
				 * to high-z with the same pulls as above.
				 * Use the GPIO settings to avoid changing the
				 * input select registers.
				 */
				MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25	0x03000
				MX6QDL_PAD_ENET_RXD0__GPIO1_IO27	0x03000
				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26	0x03000
			>;
		};
	};

};


&ldb {
	lvds-channel@0 {
		crtc = "ipu2-di0";
	};

	lvds-channel@1 {
		crtc = "ipu2-di1";
	};
};

&mxcfb1 {
	status = "okay";
};

&mxcfb2 {
	status = "okay";
};

&mxcfb3 {
	status = "okay";
};

&mxcfb4 {
	status = "okay";
};


&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
	phy-mode = "rgmii";
	phy-reset-duration = <2>;
	phy-reset-gpios = <&gpio1 26 0>;
	status = "okay";
};


&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	clock-frequency = <400000>;
	status = "okay";

	codec: sgtl5000@0a {
		compatible = "fsl,sgtl5000";
		reg = <0x0a>;
		VDDA-supply = <&reg_2p5v>;
		VDDIO-supply = <&reg_3p3v>;
		clocks = <&clks 201>;
	};
};

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	clock-frequency = <400000>;
	status = "okay";

	ft5x06: ft5x06_ts@38 {
		compatible = "edt-ft5x06";
		reg = <0x38>;
		interrupt-parent = <&gpio1>;
		interrupts = <9 2>;

		cfg-regs {
			id-g-thgroup = <0x46>;
			id-g-thpeak = <0xff>;
			id-g-thcal = <0xff>;
			id-g-thwater = <0x3c>;
			id-g-thtemp = <0x0a>;
			id-g-thdiff = <0x14>;
			id-g-ctrl = <0x0>;
			id-g-timeentermonitor = <0x2>;
			id-g-periodactive = <0x0c>;
			id-g-periodmonitor = <0x28>;
		};
	};

    /*
	touchscreen: tsc2007@48 {
		compatible = "ti,tsc2007";
		reg = <0x48>;
		pinctrl-names = "default";
		//pinctrl-0 = <&tx28_tsc2007_pins>;
		interrupt-parent = <&gpio1>;
		interrupts = <9 0>;
		ti,x-plate-ohms =<16>;
		// pendown-gpio = <&gpio1 5 1>; 
		//ti,x-plate-ohms = /bits/ 16 <660>;
        
	};
    */

    /*
	gpio5: pca953x@20 {
		compatible = "nxp,pca9554";
		reg = <0x20>;
		pinctrl-names = "default";
		pinctrl-0 = <&tx28_pca9554_pins>;
		interrupt-parent = <&gpio3>;
		interrupts = <28 0>;
		gpio-controller;
		#gpio-cells = <2>;
		interrupt-controller;
		#interrupt-cells = <2>;
	};

	polytouch: edt-ft5x06@38 {
		compatible = "edt,edt-ft5x06";
		reg = <0x38>;
		pinctrl-names = "default";
		pinctrl-0 = <&tx28_edt_ft5x06_pins>;
		interrupt-parent = <&gpio2>;
		interrupts = <5 0>;
		reset-gpios = <&gpio2 6 1>;
		wake-gpios = <&gpio4 9 0>;
	};
*/

    /*
	ds1339: rtc@68 {
		compatible = "mxim,ds1339";
		reg = <0x68>;
	};
    */

};

&usdhc4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc4>;
	bus-width = <8>;
	/*
	 * overwrite cd-gpios and wp-gpios since they are reused as eMMC DATA
	 * signals after rework
	 */
	cd-gpios = <>;
	wp-gpios = <>;
	non-removable;
	status = "okay";
};

&usbh1 {
	vbus-supply = <&reg_usb_h1_vbus>;
	status = "okay";
};

&usbotg {
	vbus-supply = <&reg_usb_otg_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbotg>;
	disable-over-current;
	status = "okay";
};

&flexcan1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_flexcan1>;
    /*
	pinctrl-assert-gpios = <&max7310_b 3 GPIO_ACTIVE_HIGH>; 
	trx-en-gpio = <&max7310_b 6 GPIO_ACTIVE_HIGH>;
	trx-stby-gpio = <&max7310_b 5 GPIO_ACTIVE_HIGH>;
    */
	status = "okay";
};

&spdif {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spdif>;
	status = "okay";
};

&ssi1 {
	fsl,mode = "i2s-slave";
	status = "okay";
};

&sata {
	status = "okay";
};


&pwm1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};


你可能感兴趣的:(移植,imx6)