xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/armada-38x-solidrun-microsom.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device Tree file for SolidRun Armada 38x Microsom
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot *  Copyright (C) 2015 Russell King
6*f126890aSEmmanuel Vadot */
7*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
8*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
9*f126890aSEmmanuel Vadot
10*f126890aSEmmanuel Vadot/ {
11*f126890aSEmmanuel Vadot	memory {
12*f126890aSEmmanuel Vadot		device_type = "memory";
13*f126890aSEmmanuel Vadot		reg = <0x00000000 0x10000000>; /* 256 MB */
14*f126890aSEmmanuel Vadot	};
15*f126890aSEmmanuel Vadot
16*f126890aSEmmanuel Vadot	soc {
17*f126890aSEmmanuel Vadot		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
18*f126890aSEmmanuel Vadot			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
19*f126890aSEmmanuel Vadot			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
20*f126890aSEmmanuel Vadot			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
21*f126890aSEmmanuel Vadot			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot		internal-regs {
24*f126890aSEmmanuel Vadot			rtc@a3800 {
25*f126890aSEmmanuel Vadot				/*
26*f126890aSEmmanuel Vadot				 * If the rtc doesn't work, run "date reset"
27*f126890aSEmmanuel Vadot				 * twice in u-boot.
28*f126890aSEmmanuel Vadot				 */
29*f126890aSEmmanuel Vadot				status = "okay";
30*f126890aSEmmanuel Vadot			};
31*f126890aSEmmanuel Vadot		};
32*f126890aSEmmanuel Vadot	};
33*f126890aSEmmanuel Vadot};
34*f126890aSEmmanuel Vadot
35*f126890aSEmmanuel Vadot&bm {
36*f126890aSEmmanuel Vadot	status = "okay";
37*f126890aSEmmanuel Vadot};
38*f126890aSEmmanuel Vadot
39*f126890aSEmmanuel Vadot&bm_bppi {
40*f126890aSEmmanuel Vadot	status = "okay";
41*f126890aSEmmanuel Vadot};
42*f126890aSEmmanuel Vadot
43*f126890aSEmmanuel Vadot&eth0 {
44*f126890aSEmmanuel Vadot	/* ethernet@70000 */
45*f126890aSEmmanuel Vadot	pinctrl-0 = <&ge0_rgmii_pins>;
46*f126890aSEmmanuel Vadot	pinctrl-names = "default";
47*f126890aSEmmanuel Vadot	phy = <&phy_dedicated>;
48*f126890aSEmmanuel Vadot	phy-mode = "rgmii-id";
49*f126890aSEmmanuel Vadot	buffer-manager = <&bm>;
50*f126890aSEmmanuel Vadot	bm,pool-long = <0>;
51*f126890aSEmmanuel Vadot	bm,pool-short = <1>;
52*f126890aSEmmanuel Vadot	status = "okay";
53*f126890aSEmmanuel Vadot};
54*f126890aSEmmanuel Vadot
55*f126890aSEmmanuel Vadot&mdio {
56*f126890aSEmmanuel Vadot	/*
57*f126890aSEmmanuel Vadot	 * Add the phy clock here, so the phy can be accessed to read its
58*f126890aSEmmanuel Vadot	 * IDs prior to binding with the driver.
59*f126890aSEmmanuel Vadot	 */
60*f126890aSEmmanuel Vadot	pinctrl-0 = <&mdio_pins &microsom_phy_clk_pins>;
61*f126890aSEmmanuel Vadot	pinctrl-names = "default";
62*f126890aSEmmanuel Vadot
63*f126890aSEmmanuel Vadot	phy_dedicated: ethernet-phy@0 {
64*f126890aSEmmanuel Vadot		/*
65*f126890aSEmmanuel Vadot		 * Annoyingly, the marvell phy driver configures the LED
66*f126890aSEmmanuel Vadot		 * register, rather than preserving reset-loaded setting.
67*f126890aSEmmanuel Vadot		 * We undo that rubbish here.
68*f126890aSEmmanuel Vadot		 */
69*f126890aSEmmanuel Vadot		marvell,reg-init = <3 16 0 0x101e>;
70*f126890aSEmmanuel Vadot		reg = <0>;
71*f126890aSEmmanuel Vadot	};
72*f126890aSEmmanuel Vadot};
73*f126890aSEmmanuel Vadot
74*f126890aSEmmanuel Vadot&i2c0 {
75*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
76*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c0_pins>;
77*f126890aSEmmanuel Vadot	pinctrl-names = "default";
78*f126890aSEmmanuel Vadot	status = "okay";
79*f126890aSEmmanuel Vadot
80*f126890aSEmmanuel Vadot	eeprom@53 {
81*f126890aSEmmanuel Vadot		compatible = "atmel,24c02";
82*f126890aSEmmanuel Vadot		reg = <0x53>;
83*f126890aSEmmanuel Vadot		pagesize = <16>;
84*f126890aSEmmanuel Vadot	};
85*f126890aSEmmanuel Vadot};
86*f126890aSEmmanuel Vadot
87*f126890aSEmmanuel Vadot&pinctrl {
88*f126890aSEmmanuel Vadot	microsom_phy_clk_pins: microsom-phy-clk-pins {
89*f126890aSEmmanuel Vadot		marvell,pins = "mpp45";
90*f126890aSEmmanuel Vadot		marvell,function = "ref";
91*f126890aSEmmanuel Vadot	};
92*f126890aSEmmanuel Vadot	/* Optional eMMC */
93*f126890aSEmmanuel Vadot	microsom_sdhci_pins: microsom-sdhci-pins {
94*f126890aSEmmanuel Vadot		marvell,pins = "mpp21", "mpp28", "mpp37",
95*f126890aSEmmanuel Vadot			       "mpp38", "mpp39", "mpp40";
96*f126890aSEmmanuel Vadot		marvell,function = "sd0";
97*f126890aSEmmanuel Vadot	};
98*f126890aSEmmanuel Vadot};
99*f126890aSEmmanuel Vadot
100*f126890aSEmmanuel Vadot&spi1 {
101*f126890aSEmmanuel Vadot	/* The microsom has an optional W25Q32 on board, connected to CS0 */
102*f126890aSEmmanuel Vadot	pinctrl-0 = <&spi1_pins>;
103*f126890aSEmmanuel Vadot
104*f126890aSEmmanuel Vadot	w25q32: flash@0 {
105*f126890aSEmmanuel Vadot		#address-cells = <1>;
106*f126890aSEmmanuel Vadot		#size-cells = <1>;
107*f126890aSEmmanuel Vadot		compatible = "w25q32", "jedec,spi-nor";
108*f126890aSEmmanuel Vadot		reg = <0>; /* Chip select 0 */
109*f126890aSEmmanuel Vadot		spi-max-frequency = <3000000>;
110*f126890aSEmmanuel Vadot	};
111*f126890aSEmmanuel Vadot};
112*f126890aSEmmanuel Vadot
113*f126890aSEmmanuel Vadot&uart0 {
114*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pins>;
115*f126890aSEmmanuel Vadot	pinctrl-names = "default";
116*f126890aSEmmanuel Vadot	status = "okay";
117*f126890aSEmmanuel Vadot};
118