Skip to content

Commit 91f1670

Browse files
ukleinekdlech
authored andcommitted
arm: dts: socfpga: Shuffle devices between dtsi files for de10-nano
There are two device tree include files for the de10-nano machine: socfpga_cyclone5_de10_nano.dtsi and socfpga_cyclone5_de10_nano_hps.dtsi. Reorganize such that the former include contains all definitions of the board's actual hardware that doesn't depend on a certain FPGA configuration. and the latter has all the default FPGA stuff. Note that for this separation it's right that the hps dtsi includes the generic one and not the other way round. Accordingly adapt all dts files that include the dtsi, to include the hps one. As devices only were moved between the two dtsi files and all dts files (recursively) included and include both dtsi, nothing relevant was changed for these. The only exception is socfpga_cyclone5_de10_nano_hps.dts. This only included one dtsi (the hps one). Delete that one as it is a subset of socfpga_cyclone5_de10_nano.dts and the latter should work wherever the former does. dtdiff was used to verify that socfpga_cyclone5_de10_nano*.dtb didn't change by this commit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
1 parent eeeb325 commit 91f1670

7 files changed

+240
-253
lines changed

arch/arm/boot/dts/socfpga_cyclone5_de10_nano.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
* Copyright (C) 2020 Analog Devices Inc.
1010
*/
1111
/dts-v1/;
12-
#include "socfpga_cyclone5_de10_nano.dtsi"
12+
#include "socfpga_cyclone5_de10_nano_hps.dtsi"

arch/arm/boot/dts/socfpga_cyclone5_de10_nano.dtsi

Lines changed: 76 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -5,178 +5,102 @@
55
* based on socfpga_cyclone5_de0_nano_soc.dts
66
*/
77

8-
#include "socfpga_cyclone5_de10_nano_hps.dtsi"
8+
#include "socfpga_cyclone5.dtsi"
99
#include <dt-bindings/interrupt-controller/irq.h>
1010
#include <dt-bindings/gpio/gpio.h>
1111

12+
/ {
13+
model = "Terasic DE10-Nano";
14+
compatible = "altr,socfpga-cyclone5", "altr,socfpga";
1215

13-
&i2c0 {
14-
adv7513: adv7513@39 {
15-
compatible = "adi,adv7513";
16-
reg = <0x39>, <0x3f>;
17-
reg-names = "primary", "edid";
18-
19-
adi,input-depth = <8>;
20-
adi,input-colorspace = "rgb";
21-
adi,input-clock = "1x";
22-
adi,clock-delay = <0>;
23-
24-
#sound-dai-cells = <0>;
25-
26-
ports {
27-
#address-cells = <1>;
28-
#size-cells = <0>;
29-
30-
port@0 {
31-
reg = <0>;
32-
adv7513_in: endpoint {
33-
remote-endpoint = <&axi_hdmi_out>;
34-
};
35-
};
36-
37-
port@1 {
38-
reg = <1>;
39-
};
40-
};
16+
chosen {
17+
bootargs = "earlyprintk";
18+
stdout-path = "serial0:115200n8";
4119
};
42-
};
4320

44-
&fpga_axi {
45-
gpio_in: gpio_in@0x00010100 {
46-
compatible = "altr,pio-18.1", "altr,pio-1.0";
47-
reg = <0x00010100 0x00000010>;
48-
altr,gpio-bank-width = <32>;
49-
altr,interrupt-type = <4>;
50-
altr,interrupt_type = <4>;
51-
level_trigger = <1>;
52-
resetvalue = <0>;
53-
#gpio-cells = <2>;
54-
gpio-controller;
21+
aliases {
22+
ethernet0 = &gmac1;
23+
udc0 = &usb1;
5524
};
5625

57-
gpio_out: gpio_out@0x00109000 {
58-
compatible = "altr,pio-1.0";
59-
reg = <0x00109000 0x00000010>;
60-
altr,gpio-bank-width = <32>;
61-
resetvalue = <0>;
62-
#gpio-cells = <2>;
63-
gpio-controller;
26+
memory {
27+
name = "memory";
28+
device_type = "memory";
29+
reg = <0x0 0x40000000>; /* 1GB */
6430
};
6531

66-
spi@0x00010A000 {
67-
compatible = "altr,spi-18.1", "altr,spi-1.0";
68-
reg = <0x0010a000 0x00000020>;
69-
interrupt-parent = <&intc>;
70-
interrupts = <0 43 IRQ_TYPE_LEVEL_HIGH>;
71-
#address-cells = <0x1>;
72-
#size-cells = <0x0>;
73-
74-
ltc2308: adc@0 {
75-
compatible = "adi,ltc2308";
76-
reg = <0>;
77-
spi-max-frequency = <40000000>;
78-
vref-supply = <&ltc2308_vref>;
79-
cnv-gpios = <&gpio_out 9 GPIO_ACTIVE_HIGH>;
32+
soc {
33+
fpga_axi: axi_h2f_lw_bridge@0xff200000 {
34+
compatible = "simple-bus";
35+
reg = <0xff200000 0x00200000>;
8036
#address-cells = <1>;
81-
#size-cells = <0>;
82-
channel@0 {
83-
reg = <0>;
84-
};
85-
channel@1 {
86-
reg = <1>;
87-
};
88-
channel@2 {
89-
reg = <2>;
90-
};
91-
channel@3 {
92-
reg = <3>;
93-
};
94-
channel@4 {
95-
reg = <4>;
96-
};
97-
channel@5 {
98-
reg = <5>;
99-
};
100-
channel@6 {
101-
reg = <6>;
102-
};
103-
channel@7 {
104-
reg = <7>;
105-
};
37+
#size-cells = <1>;
38+
ranges = <0x00000000 0xff200000 0x00200000>;
10639
};
10740
};
41+
};
10842

109-
axi_sysid_0: axi-sysid-0@00018000 {
110-
compatible = "adi,axi-sysid-1.00.a";
111-
reg = <0x00018000 0x8000>;
112-
};
43+
&gmac1 {
44+
status = "okay";
45+
phy-mode = "rgmii";
46+
47+
rxd0-skew-ps = <420>;
48+
rxd1-skew-ps = <420>;
49+
rxd2-skew-ps = <420>;
50+
rxd3-skew-ps = <420>;
51+
txen-skew-ps = <0>;
52+
txc-skew-ps = <1860>;
53+
rxdv-skew-ps = <420>;
54+
rxc-skew-ps = <1680>;
55+
};
11356

114-
hdmi_tx_dma: dma@0x00080000 {
115-
compatible = "adi,axi-dmac-1.00.a";
116-
reg = <0x00080000 0x00000800>;
117-
interrupt-parent = <&intc>;
118-
interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
119-
#dma-cells = <1>;
120-
clocks = <&sys_clk>;
57+
&gpio0 {
58+
status = "okay";
59+
};
12160

122-
adi,channels {
123-
#size-cells = <0>;
124-
#address-cells = <1>;
61+
&gpio1 {
62+
status = "okay";
63+
};
12564

126-
dma-channel@0 {
127-
reg = <0>;
128-
adi,source-bus-width = <64>;
129-
adi,source-bus-type = <0>;
130-
adi,destination-bus-width = <64>;
131-
adi,destination-bus-type = <1>;
132-
};
133-
};
134-
};
65+
&gpio2 {
66+
status = "okay";
67+
};
13568

136-
axi_hdmi@0x00090000 {
137-
compatible = "adi,axi-hdmi-tx-1.00.a";
138-
reg = <0x00090000 0x10000>;
139-
dmas = <&hdmi_tx_dma 0>;
140-
dma-names = "video";
141-
clocks = <&pixel_clock 0>;
142-
adi,is-rgb;
143-
144-
port {
145-
axi_hdmi_out: endpoint {
146-
remote-endpoint = <&adv7513_in>;
147-
};
148-
};
69+
&i2c0 {
70+
status = "okay";
71+
clock-frequency = <100000>;
72+
73+
adxl345@53 {
74+
compatible = "adi,adxl34x";
75+
reg = <0x53>;
76+
interrupt-parent = <&portc>;
77+
interrupts = <3 2>;
14978
};
79+
};
15080

151-
ref_clk: ref_clk {
152-
#clock-cells = <0x0>;
153-
compatible = "fixed-clock";
154-
clock-frequency = <50000000>;
155-
clock-output-names = "reference_clock";
156-
};
81+
&mmc0 {
82+
status = "okay";
83+
u-boot,dm-pre-reloc;
84+
};
15785

158-
pixel_clock: fpll@0x00100000 {
159-
#clock-cells = <0x1>;
160-
compatible = "altr,c5-fpll";
161-
reg = <0x00100000 0x00000100>;
162-
#address-cells = <1>;
163-
#size-cells = <0>;
164-
clocks = <&ref_clk>;
165-
assigned-clocks = <&pixel_clock 0>, <&pixel_clock 1>;
166-
assigned-clock-rates = <148500000>, <100000000>;
167-
clock-output-names = "c5_out0", "c5_out1", "c5_out2",
168-
"c5_out3", "c5_out4", "c5_out5",
169-
"c5_out6", "c5_out7", "c5_out8";
170-
adi,fractional-carry-bit = <32>;
171-
172-
fpll_c0: channel@0 {
173-
reg = <0>;
174-
adi,extended-name = "PIXEL_CLOCK";
175-
};
86+
&porta {
87+
bank-name = "porta";
88+
};
17689

177-
fpll_c1: channel@1 {
178-
reg = <1>;
179-
adi,extended-name = "DMA_CLOCK";
180-
};
181-
};
90+
&portb {
91+
bank-name = "portb";
92+
};
93+
94+
&portc {
95+
bank-name = "portc";
96+
};
97+
98+
&uart0 {
99+
status = "okay";
100+
clock-frequency = <100000000>;
101+
u-boot,dm-pre-reloc;
102+
};
103+
104+
&usb1 {
105+
status = "okay";
182106
};

arch/arm/boot/dts/socfpga_cyclone5_de10_nano_cn0501.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (C) 2021 Analog Devices Inc.
1010
*/
1111
/dts-v1/;
12-
#include "socfpga_cyclone5_de10_nano.dtsi"
12+
#include "socfpga_cyclone5_de10_nano_hps.dtsi"
1313
#include <dt-bindings/interrupt-controller/irq.h>
1414
#include <dt-bindings/gpio/gpio.h>
1515

arch/arm/boot/dts/socfpga_cyclone5_de10_nano_cn0540.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (C) 2020 Analog Devices Inc.
1212
*/
1313
/dts-v1/;
14-
#include "socfpga_cyclone5_de10_nano.dtsi"
14+
#include "socfpga_cyclone5_de10_nano_hps.dtsi"
1515
#include <dt-bindings/interrupt-controller/irq.h>
1616
#include <dt-bindings/gpio/gpio.h>
1717

arch/arm/boot/dts/socfpga_cyclone5_de10_nano_cn0579_i2c.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (C) 2023 Analog Devices Inc.
1010
*/
11-
#include "socfpga_cyclone5_de10_nano.dtsi"
11+
#include "socfpga_cyclone5_de10_nano_hps.dtsi"
1212
#include <dt-bindings/interrupt-controller/irq.h>
1313
#include <dt-bindings/gpio/gpio.h>
1414

arch/arm/boot/dts/socfpga_cyclone5_de10_nano_hps.dts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)