sun5i-a10s.dtsi 6.9 KB
Newer Older
1 2 3 4 5
/*
 * Copyright 2013 Maxime Ripard
 *
 * Maxime Ripard <maxime.ripard@free-electrons.com>
 *
6 7 8 9
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
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
 *  a) This library is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This library is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
43 44
 */

45
#include "skeleton.dtsi"
46

47 48
#include "sun5i.dtsi"

49
#include <dt-bindings/dma/sun4i-a10.h>
50
#include <dt-bindings/pinctrl/sun4i-a10.h>
51 52 53 54

/ {
	interrupt-parent = <&intc>;

E
Emilio López 已提交
55 56 57 58
	aliases {
		ethernet0 = &emac;
	};

H
Hans de Goede 已提交
59 60 61 62 63
	chosen {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

64
		framebuffer@0 {
65 66
			compatible = "allwinner,simple-framebuffer",
				     "simple-framebuffer";
67
			allwinner,pipeline = "de_be0-lcd0-hdmi";
68 69
			clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
				 <&ahb_gates 43>, <&ahb_gates 44>;
H
Hans de Goede 已提交
70 71
			status = "disabled";
		};
72 73 74 75 76

		framebuffer@1 {
			compatible = "allwinner,simple-framebuffer",
				     "simple-framebuffer";
			allwinner,pipeline = "de_be0-lcd0";
77 78
			clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
				 <&ahb_gates 44>;
79 80
			status = "disabled";
		};
81 82 83 84 85

		framebuffer@2 {
			compatible = "allwinner,simple-framebuffer",
				     "simple-framebuffer";
			allwinner,pipeline = "de_be0-lcd0-tve0";
86 87
			clocks = <&pll3>, <&pll5 1>, <&ahb_gates 34>,
				 <&ahb_gates 36>, <&ahb_gates 44>;
88 89
			status = "disabled";
		};
H
Hans de Goede 已提交
90 91
	};

92
	clocks {
93
		ahb_gates: clk@01c20060 {
94
			#clock-cells = <1>;
95
			compatible = "allwinner,sun5i-a10s-ahb-gates-clk";
96 97
			reg = <0x01c20060 0x8>;
			clocks = <&ahb>;
M
Maxime Ripard 已提交
98 99 100 101 102 103 104 105 106 107 108
			clock-indices = <0>, <1>,
					<2>, <5>, <6>,
					<7>, <8>, <9>,
					<10>, <13>,
					<14>, <17>, <18>,
					<20>, <21>, <22>,
					<26>, <28>, <32>,
					<34>, <36>, <40>,
					<43>, <44>,
					<46>, <51>,
					<52>;
109 110 111 112 113 114 115 116 117 118 119
			clock-output-names = "ahb_usbotg", "ahb_ehci",
					     "ahb_ohci", "ahb_ss", "ahb_dma",
					     "ahb_bist", "ahb_mmc0", "ahb_mmc1",
					     "ahb_mmc2", "ahb_nand",
					     "ahb_sdram", "ahb_emac", "ahb_ts",
					     "ahb_spi0", "ahb_spi1", "ahb_spi2",
					     "ahb_gps", "ahb_stimer", "ahb_ve",
					     "ahb_tve", "ahb_lcd", "ahb_csi",
					     "ahb_hdmi", "ahb_de_be",
					     "ahb_de_fe", "ahb_iep",
					     "ahb_mali400";
120 121
		};

122
		apb0_gates: clk@01c20068 {
123
			#clock-cells = <1>;
124
			compatible = "allwinner,sun5i-a10s-apb0-gates-clk";
125 126
			reg = <0x01c20068 0x4>;
			clocks = <&apb0>;
M
Maxime Ripard 已提交
127 128 129
			clock-indices = <0>, <3>,
					<5>, <6>,
					<10>;
130 131 132
			clock-output-names = "apb0_codec", "apb0_iis",
					     "apb0_pio", "apb0_ir",
					     "apb0_keypad";
133 134
		};

135
		apb1_gates: clk@01c2006c {
136
			#clock-cells = <1>;
137
			compatible = "allwinner,sun5i-a10s-apb1-gates-clk";
138 139
			reg = <0x01c2006c 0x4>;
			clocks = <&apb1>;
M
Maxime Ripard 已提交
140 141 142 143
			clock-indices = <0>, <1>,
					<2>, <16>,
					<17>, <18>,
					<19>;
144
			clock-output-names = "apb1_i2c0", "apb1_i2c1",
M
Maxime Ripard 已提交
145 146 147
					     "apb1_i2c2", "apb1_uart0",
					     "apb1_uart1", "apb1_uart2",
					     "apb1_uart3";
148 149 150
		};
	};

151
	soc@01c00000 {
152
		emac: ethernet@01c0b000 {
153
			compatible = "allwinner,sun4i-a10-emac";
154 155 156
			reg = <0x01c0b000 0x1000>;
			interrupts = <55>;
			clocks = <&ahb_gates 17>;
157
			allwinner,sram = <&emac_sram 1>;
158 159 160
			status = "disabled";
		};

161
		mdio: mdio@01c0b080 {
162
			compatible = "allwinner,sun4i-a10-mdio";
163 164 165 166 167 168
			reg = <0x01c0b080 0x14>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

169 170 171 172 173 174 175 176
		pwm: pwm@01c20e00 {
			compatible = "allwinner,sun5i-a10s-pwm";
			reg = <0x01c20e00 0xc>;
			clocks = <&osc24M>;
			#pwm-cells = <3>;
			status = "disabled";
		};

177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
		uart0: serial@01c28000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c28000 0x400>;
			interrupts = <1>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&apb1_gates 16>;
			status = "disabled";
		};

		uart2: serial@01c28800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c28800 0x400>;
			interrupts = <3>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&apb1_gates 18>;
			status = "disabled";
		};
196 197
	};
};
198

199 200
&pio {
	compatible = "allwinner,sun5i-a10s-pinctrl";
201

202 203 204 205 206 207
	uart0_pins_a: uart0@0 {
		allwinner,pins = "PB19", "PB20";
		allwinner,function = "uart0";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};
208

209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
	uart2_pins_a: uart2@0 {
		allwinner,pins = "PC18", "PC19";
		allwinner,function = "uart2";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	emac_pins_a: emac0@0 {
		allwinner,pins = "PA0", "PA1", "PA2",
				"PA3", "PA4", "PA5", "PA6",
				"PA7", "PA8", "PA9", "PA10",
				"PA11", "PA12", "PA13", "PA14",
				"PA15", "PA16";
		allwinner,function = "emac";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

227 228 229 230 231 232 233 234 235 236 237
	emac_pins_b: emac0@1 {
		allwinner,pins = "PD6", "PD7", "PD10",
				"PD11", "PD12", "PD13", "PD14",
				"PD15", "PD18", "PD19", "PD20",
				"PD21", "PD22", "PD23", "PD24",
				"PD25", "PD26", "PD27";
		allwinner,function = "emac";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

238
	mmc1_pins_a: mmc1@0 {
239 240
		allwinner,pins = "PG3", "PG4", "PG5",
				 "PG6", "PG7", "PG8";
241 242 243
		allwinner,function = "mmc1";
		allwinner,drive = <SUN4I_PINCTRL_30_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
244 245
	};
};
246 247 248 249 250 251 252 253

&sram_a {
	emac_sram: sram-section@8000 {
		compatible = "allwinner,sun4i-a10-sram-a3-a4";
		reg = <0x8000 0x4000>;
		status = "disabled";
	};
};