at91sam9n12ek.dts 4.0 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * at91sam9n12ek.dts - Device Tree file for AT91SAM9N12-EK board
 *
 *  Copyright (C) 2012 Atmel,
 *                2012 Hong Xu <hong.xu@atmel.com>
 *
 * Licensed under GPLv2 or later.
 */
/dts-v1/;
10
#include "at91sam9n12.dtsi"
11 12 13 14 15 16

/ {
	model = "Atmel AT91SAM9N12-EK";
	compatible = "atmel,at91sam9n12ek", "atmel,at91sam9n12", "atmel,at91sam9";

	chosen {
17 18
		bootargs = "root=/dev/mtdblock1 rw rootfstype=jffs2";
		stdout-path = "serial0:115200n8";
19 20 21
	};

	memory {
22
		reg = <0x20000000 0x8000000>;
23 24 25 26 27 28 29 30 31 32 33
	};

	clocks {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		main_clock: clock@0 {
			compatible = "atmel,osc", "fixed-clock";
			clock-frequency = <16000000>;
		};
34 35 36 37 38 39 40 41

		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <16000000>;
		};
42 43 44 45 46 47 48
	};

	ahb {
		apb {
			dbgu: serial@fffff200 {
				status = "okay";
			};
49

50 51 52 53
			ssc0: ssc@f0010000 {
				status = "okay";
			};

54 55
			i2c0: i2c@f8010000 {
				status = "okay";
56

57
				wm8904: codec@1a {
58
					compatible = "wlf,wm8904";
59
					reg = <0x1a>;
60 61
					clocks = <&pck0>;
					clock-names = "mclk";
62 63
				};

64 65 66 67 68 69 70 71
				qt1070: keyboard@1b {
					compatible = "qt1070";
					reg = <0x1b>;
					interrupt-parent = <&pioA>;
					interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
					pinctrl-names = "default";
					pinctrl-0 = <&pinctrl_qt1070_irq>;
				};
72 73 74 75 76
			};

			i2c1: i2c@f8014000 {
				status = "okay";
			};
77 78

			mmc0: mmc@f0008000 {
79 80 81 82
				pinctrl-0 = <
					&pinctrl_board_mmc0
					&pinctrl_mmc0_slot0_clk_cmd_dat0
					&pinctrl_mmc0_slot0_dat1_3>;
83 84 85 86
				status = "okay";
				slot@0 {
					reg = <0>;
					bus-width = <4>;
87
					cd-gpios = <&pioA 7 GPIO_ACTIVE_HIGH>;
88 89
				};
			};
90 91 92 93 94

			pinctrl@fffff400 {
				mmc0 {
					pinctrl_board_mmc0: mmc0-board {
						atmel,pins =
95
							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* PA7 gpio CD pin pull up and deglitch */
96 97
					};
				};
98 99 100 101 102 103 104

				qt1070 {
					pinctrl_qt1070_irq: qt1070_irq {
						atmel,pins =
							<AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
					};
				};
105 106 107 108 109 110 111

				sound {
					pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
						atmel,pins =
							<AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
					};
				};
112 113 114 115 116 117 118

				usb1 {
					pinctrl_usb1_vbus_sense: usb1_vbus_sense {
						atmel,pins =
							<AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;	/* PB16 gpio usb vbus sense, no pull up and deglitch */
					};
				};
119
			};
120 121 122 123 124 125 126 127 128 129

			spi0: spi@f0000000 {
				status = "okay";
				cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
				m25p80@0 {
					compatible = "atmel,at25df321a";
					spi-max-frequency = <50000000>;
					reg = <0>;
				};
			};
130

131 132 133 134 135 136 137
			usb1: gadget@f803c000 {
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_usb1_vbus_sense>;
				atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
				status = "okay";
			};

138 139 140
			watchdog@fffffe40 {
				status = "okay";
			};
141 142 143 144

			rtc@fffffeb0 {
				status = "okay";
			};
145 146 147 148
		};

		nand0: nand@40000000 {
			nand-bus-width = <8>;
149 150 151 152
			nand-ecc-mode = "hw";
			atmel,has-pmecc;
			atmel,pmecc-cap = <2>;
			atmel,pmecc-sector-size = <512>;
153 154 155
			nand-on-flash-bbt;
			status = "okay";
		};
156 157

		usb0: ohci@00500000 {
158 159
			num-ports = <1>;
			atmel,vbus-gpio = <&pioB 7 GPIO_ACTIVE_LOW>;
160 161
			status = "okay";
		};
162 163 164 165 166 167 168
	};

	leds {
		compatible = "gpio-leds";

		d8 {
			label = "d8";
169
			gpios = <&pioB 4 GPIO_ACTIVE_LOW>;
170 171 172 173 174
			linux,default-trigger = "mmc0";
		};

		d9 {
			label = "d6";
175
			gpios = <&pioB 5 GPIO_ACTIVE_LOW>;
176 177 178 179 180
			linux,default-trigger = "nand-disk";
		};

		d10 {
			label = "d7";
181
			gpios = <&pioB 6 GPIO_ACTIVE_HIGH>;
182 183 184 185 186 187 188 189 190
			linux,default-trigger = "heartbeat";
		};
	};

	gpio_keys {
		compatible = "gpio-keys";

		enter {
			label = "Enter";
191
			gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
192 193 194 195
			linux,code = <28>;
			gpio-key,wakeup;
		};
	};
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213

	sound {
		compatible = "atmel,asoc-wm8904";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;

		atmel,model = "wm8904 @ AT91SAM9N12";
		atmel,audio-routing =
			"Headphone Jack", "HPOUTL",
			"Headphone Jack", "HPOUTR",
			"IN2L", "Line In Jack",
			"IN2R", "Line In Jack",
			"Mic", "MICBIAS",
			"IN1L", "Mic";

		atmel,ssc-controller = <&ssc0>;
		atmel,audio-codec = <&wm8904>;
	};
214
};