summaryrefslogtreecommitdiff
path: root/arch/riscv/dts/dubhe_fpga_common.dtsi
blob: 9398205dd3c0c0739c4883469de58b10483dec26 (plain)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2021 StarFive Technology Co., Ltd. */

#include "dubhe-fpga-u-boot.dtsi"

/ {
	model = "StarFive Dubhe FPGA";

	aliases {
		serial0 = &uart0;
		spi0 = &qspi1;
	};

	chosen {
		bootargs = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dhcp";
	};

	cpus {
		timebase-frequency = <25000000>;

	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x0 0x80000000 0x2 0x0>;
	};

	soc {
		fpga_2p5mhz_clk: fpga_2p5mhz_clk {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <2500000>;
		};

		fpga_50mhz_clk: fpga_50mhz_clk {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <50000000>;
		};
	};
};

&gmac0 {
	status = "okay";
	phy-mode = "rgmii-id";
	mac-address = [de ad be ef de ad];
	// clk_csr = <3>;
	// max-speed = <10>;
	phy-handle = <&ethernet_phy0>;
	clocks = <&fpga_2p5mhz_clk>,
		 <&fpga_2p5mhz_clk>,
		 <&fpga_2p5mhz_clk>,
		 <&fpga_50mhz_clk>,
		 <&fpga_50mhz_clk>,
		 <&fpga_2p5mhz_clk>;

	mdio0 {
		compatible = "snps,dwmac-mdio";
		#address-cells = <1>;
		#size-cells = <0>;
		ethernet_phy0: ethernet-phy@0 {
			reg = <0>;
			max-speed = <10>;
		};
	};
};

&spi0 {
	status = "okay";
	mmc@0 {
		compatible = "mmc-spi-slot";
		reg = <0>;
		spi-max-frequency = <20000000>;
		voltage-ranges = <3300 3300>;
		disable-wp;
	};
};

&qspi1 {
	status = "okay";

	flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <20000000>;
                m25p,fast-read;
                spi-tx-bus-width = <1>;
                spi-rx-bus-width = <1>;

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

			partition@0 {
				reg = <0x000000 0x1000>;
				label = "Boot Copier";
				/*read-only;*/
			};

			partition@1000 {
				reg = <0x1000 0x1000>;
				label = "Boot Jump Code";
				/*read-only;*/
			};

			partition@2000 {
				reg = <0x2000 0x40000>;
				label = "U-Boot SPL";
			};

			partition@42000 {
				reg = <0x00042000 0x00100000>;
				label = "U-Boot FIT Image";
			};

			partition@142000 {
				reg = <0x00142000 0x07ebe000>;
				label = "User";
			};
		};
        };

};

&uart0 {
	status = "okay";
};