at91-nattis-2-natte-2.dts 5.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
// SPDX-License-Identifier: GPL-2.0+
/*
 * at91-nattis-2-natte-2.dts - Device Tree file for the Linea/Nattis board
 *
 * Copyright (C) 2017 Axentia Technologies AB
 *
 * Author: Peter Rosin <peda@axentia.se>
 */
/dts-v1/;
#include "at91-linea.dtsi"
#include "sama5d3_lcd.dtsi"
#include "at91-natte.dtsi"

/ {
	model = "Axentia Linea-Nattis v2 Natte v2";
	compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea",
		     "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";

	ahb {
		apb {
			pinctrl@fffff200 {
				nattis {
					pinctrl_usba_vbus: usba_vbus {
						atmel,pins =
							<AT91_PIOD 28
							 AT91_PERIPH_GPIO
							 AT91_PINCTRL_DEGLITCH>;
					};

					pinctrl_mmc0_cd: mmc0_cd {
						atmel,pins =
							<AT91_PIOD 5
							 AT91_PERIPH_GPIO
							 AT91_PINCTRL_PULL_UP_DEGLITCH>;
					};

37
					pinctrl_lvds_prlud0: lvds_prlud0 {
38 39 40
						atmel,pins =
							<AT91_PIOA 21
							 AT91_PERIPH_GPIO
41 42
							 (AT91_PINCTRL_OUTPUT |
							  AT91_PINCTRL_OUTPUT_VAL(0))>;
43 44
					};

45
					pinctrl_lvds_hipow0: lvds_hipow0 {
46 47 48
						atmel,pins =
							<AT91_PIOA 23
							 AT91_PERIPH_GPIO
49 50
							 (AT91_PINCTRL_OUTPUT |
							  AT91_PINCTRL_OUTPUT_VAL(0))>;
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
					};
				};
			};

			watchdog@fffffe40 {
				status = "okay";
			};
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		wakeup {
			label = "Wakeup";
			linux,code = <10>;
			gpio-key,wakeup;
			gpios = <&pioB 27 GPIO_ACTIVE_LOW>;
		};
	};

	panel_reg: panel-regulator {
		compatible = "regulator-fixed";
		regulator-name = "panel-VCC";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	bl_reg: backlight-regulator {
		compatible = "regulator-fixed";
		regulator-name = "panel-VDD";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
	};

	panel_bl: backlight {
		compatible = "pwm-backlight";
		pwms = <&hlcdc_pwm 0 100000 0>;

		brightness-levels = < 0  1  2  3  4  5  6  7  8  9
				     10 11 12 13 14 15 16 17 18 19
				     20 21 22 23 24 25 26 27 28 29
				     30 31 32 33 34 35 36 37 38 39
				     40 41 42 43 44 45 46 47 48 49
				     50 51 52 53 54 55 56 57 58 59
				     60 61 62 63 64 65 66 67 68 69
				     70 71 72 73 74 75 76 77 78 79
				     80 81 82 83 84 85 86 87 88 89
				     90 91 92 93 94 95 96 97 98 99
				    100>;
		default-brightness-level = <40>;

		power-supply = <&bl_reg>;
		enable-gpios = <&pioA 20 GPIO_ACTIVE_HIGH>;
	};

	panel: panel {
		compatible = "sharp,lq150x1lg11";
		backlight = <&panel_bl>;
		power-supply = <&panel_reg>;

		port {
			panel_input: endpoint {
114 115 116 117 118 119
				remote-endpoint = <&lvds_encoder_output>;
			};
		};
	};

	lvds-encoder {
120
		compatible = "ti,ds90c185", "lvds-encoder";
121

122 123 124
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lvds_prlud0 &pinctrl_lvds_hipow0>;

125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;

				lvds_encoder_input: endpoint {
					remote-endpoint = <&hlcdc_output>;
				};
			};

			port@1 {
				reg = <1>;

				lvds_encoder_output: endpoint {
					remote-endpoint = <&panel_input>;
				};
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
			};
		};
	};

	sound {
		compatible = "simple-audio-card";

		simple-audio-card,name = "nattis-tfa9879";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&cpu_dai>;
		simple-audio-card,frame-master = <&cpu_dai>;
		simple-audio-card,widgets = "Line", "Line Out Jack";
		simple-audio-card,routing = "Line Out Jack", "LINEOUT";

		cpu_dai: simple-audio-card,cpu {
			sound-dai = <&ssc0>;
		};

		simple-audio-card,codec {
			sound-dai = <&amp>;
		};
	};
};

&i2c0 {
	status = "okay";

	clock-frequency = <100000>;

	temp@18 {
		compatible = "nxp,se97b", "jedec,jc-42.4-temp";
		reg = <0x18>;
		smbus-timeout-disable;
	};

	eeprom@50 {
179
		compatible = "nxp,se97b", "atmel,24c02";
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
		reg = <0x50>;
		pagesize = <16>;
	};

	amp: amplifier@6c {
		 compatible = "nxp,tfa9879";
		 reg = <0x6c>;
		 #sound-dai-cells = <0>;
	};
};

&ssc0 {
	status = "okay";

	atmel,clk-from-rk-pin;
	#sound-dai-cells = <0>;
};

&hlcdc {
	status = "okay";

	hlcdc-display-controller {
		pinctrl-names = "default";
203
		pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>;
204 205

		port@0 {
206 207
			hlcdc_output: endpoint {
				remote-endpoint = <&lvds_encoder_input>;
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
			};
		};
	};
};

&mmc0 {
	status = "okay";

	pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0
		     &pinctrl_mmc0_dat1_3
		     &pinctrl_mmc0_cd>;

	slot@0 {
		reg = <0>;
		bus-width = <4>;
		cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
224
		cd-inverted;
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
	};
};

&usart0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart0>;
	atmel,use-dma-rx;
};

&nand {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		at91bootstrap@0 {
			label = "at91bootstrap";
			reg = <0x0 0x40000>;
		};

247 248 249
		barebox@40000 {
			label = "barebox";
			reg = <0x40000 0x60000>;
250 251
		};

252 253 254
		bareboxenv@c0000 {
			label = "bareboxenv";
			reg = <0xc0000 0x40000>;
255 256
		};

257 258 259 260 261 262 263 264
		bareboxenv2@100000 {
			label = "bareboxenv2";
			reg = <0x100000 0x40000>;
		};

		oftree@180000 {
			label = "oftree";
			reg = <0x180000 0x20000>;
265 266 267 268
		};

		kernel@200000 {
			label = "kernel";
269
			reg = <0x200000 0x500000>;
270 271 272 273
		};

		rootfs@800000 {
			label = "rootfs";
274
			reg = <0x800000 0x1f800000>;
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
		};
	};
};

&dbgu {
	status = "okay";

	atmel,use-dma-rx;
};

&usb0 {
	status = "okay";

	atmel,vbus-gpio = <&pioD 28 GPIO_ACTIVE_HIGH>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usba_vbus>;
};