Skip to content

Commit 817c6e8

Browse files
authored
Merge pull request #110 from deepakala-k/balcones_backend_dtb
Add new backend device tree for balcones
2 parents 7fa3fed + 427298f commit 817c6e8

File tree

4 files changed

+423
-1
lines changed

4 files changed

+423
-1
lines changed

Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ DT = fake.dts fake-backend.dts fake2.dts fake2-backend.dts \
6565
p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts \
6666
bmc-kernel.dts bmc-kernel-rainier.dts bmc-kernel-everest.dts \
6767
bmc-sbefifo.dts bmc-sbefifo-rainier.dts bmc-sbefifo-everest.dts \
68-
p8-host.dts p9-host.dts p10-host.dts p8.dts p9.dts p10.dts
68+
bmc-sbefifo-balcones.dts bmc-kernel-balcones.dts \
69+
p8-host.dts p9-host.dts p10-host.dts p8.dts p9.dts p10.dts
6970

7071
DT_sources = $(DT:.dts=.dtb.S)
7172
DT_headers = $(DT:.dts=.dt.h)

bmc-kernel-balcones.dts.m4

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
dnl
2+
dnl PIB([addr], [index], [path-index])
3+
dnl
4+
define(`PIB',
5+
`
6+
pib@$1 {
7+
#address-cells = <0x2>;
8+
#size-cells = <0x1>;
9+
reg = <0x0 0x$1 0x7>;
10+
compatible = "ibm,kernel-pib";
11+
index = <0x$2>;
12+
device-path = "/dev/scom$3";
13+
system-path = "/proc$2/pib";
14+
};
15+
')dnl
16+
17+
18+
dnl
19+
dnl PIB_ODY([index], [proc], [path-index], port)
20+
dnl
21+
define(`PIB_ODY',
22+
`
23+
pib_ody@$3$4 {
24+
#address-cells = <0x2>;
25+
#size-cells = <0x1>;
26+
reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/
27+
compatible = "ibm,kernel-pib-ody";
28+
index = <0x$1>;
29+
proc = <0x$2>;
30+
port = <$4>;
31+
device-path = "/dev/scom$3$4";
32+
system-path = "/proc$2/ocmb$1";
33+
};
34+
')dnl
35+
36+
37+
dnl
38+
dnl SBEFIFO([index], [path-index])
39+
dnl
40+
define(`SBEFIFO',
41+
`
42+
sbefifo@2400 { /* Bogus address */
43+
reg = <0x0 0x2400 0x7>;
44+
compatible = "ibm,kernel-sbefifo";
45+
index = <0x$1>;
46+
device-path = "/dev/sbefifo$2";
47+
48+
sbefifo-mem {
49+
compatible = "ibm,sbefifo-mem";
50+
index = <0x$1>;
51+
system-path = "/mem$1";
52+
};
53+
54+
sbefifo-pba {
55+
compatible = "ibm,sbefifo-mem-pba";
56+
index = <0x$1>;
57+
system-path = "/mempba$1";
58+
};
59+
60+
sbefifo-chipop {
61+
compatible = "ibm,sbefifo-chipop";
62+
index = <0x$1>;
63+
};
64+
};
65+
')dnl
66+
67+
dnl
68+
dnl FSI_PRE([addr], [index], [path-index])
69+
dnl
70+
define(`FSI_PRE',
71+
`
72+
fsi@$1 {
73+
#address-cells = <0x2>;
74+
#size-cells = <0x1>;
75+
reg = <0x0 0x$1 0x8000>;
76+
compatible = "ibm,kernel-fsi";
77+
device-path = "/fsi0/slave@00:00/raw";
78+
index = <0x$2>;
79+
system-path = "/proc$2/fsi";
80+
status = "mustexist";
81+
82+
PIB(1000, $2, $3)
83+
SBEFIFO($2, $3)
84+
')dnl
85+
86+
dnl
87+
dnl FSI_POST()
88+
dnl
89+
define(`FSI_POST',
90+
`
91+
};
92+
')dnl
93+
94+
dnl
95+
dnl BMC_I2CBUS([index])
96+
dnl
97+
define(`BMC_I2CBUS',
98+
`
99+
bmc-i2c-bus$1 {
100+
#address-cells = <0x1>;
101+
#size-cells = <0x0>;
102+
index = <$1>;
103+
compatible = "ibm,kernel-i2c-bus";
104+
device-path = "/dev/i2c-$1";
105+
system-path = "/bmc0/i2c-$1";
106+
};
107+
')dnl
108+
109+
110+
dnl
111+
dnl HMFSI([addr], [port], [index], [path-index])
112+
dnl
113+
define(`HMFSI',
114+
`
115+
hmfsi@$1 {
116+
#address-cells = <0x2>;
117+
#size-cells = <0x1>;
118+
reg = <0x0 0x$1 0x8000>;
119+
compatible = "ibm,fsi-hmfsi";
120+
port = <0x$2>;
121+
index = <0x$3>;
122+
system-path = "/proc$3/fsi";
123+
124+
PIB(1000, $3, $4)
125+
SBEFIFO($3, $4)
126+
};
127+
')dnl
128+
129+
//ody ocmb chips are defined in system device tree. The pdbg targets
130+
//that captures the device path to communicate with system ody ocmb
131+
//chips will be defined in backend device tree.
132+
133+
//ody ocmb system device tree targets need to be mapped to backend
134+
//ody pib device tree targets for communication with the ody ocmb targets.
135+
//Mapping is done based on proc, ocmb chip index of the ody ocmb system target
136+
//with the proc, ocmb index and port number defined in the backend kernel device
137+
//tree
138+
139+
//for get or put scom in kernel mode device path defined in PIBODY will be used
140+
//for cfam device-path specified in HMFSIODY will be used
141+
dnl
142+
dnl HMFSI_ODY([index], [proc], [path-index], [port])
143+
dnl
144+
define(`HMFSI_ODY',
145+
`
146+
hmfsi-ody@$3$4 {
147+
#address-cells = <0x2>;
148+
#size-cells = <0x1>;
149+
compatible = "ibm,kernel-fsi-ody";
150+
device-path = "/i2cr$3$4/slave@00:00/raw";
151+
reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/
152+
index = <0x$1>;
153+
proc = <0x$2>;
154+
port = <$4>;
155+
system-path = "/proc$2/ocmb$1/fsi";
156+
157+
PIB_ODY($1, $2, $3, $4)
158+
/*SBE_FIFO not required in kernel mode */
159+
};
160+
')dnl
161+
162+
/dts-v1/;
163+
164+
/ {
165+
#address-cells = <0x1>;
166+
#size-cells = <0x0>;
167+
168+
BMC_I2CBUS(0)
169+
BMC_I2CBUS(1)
170+
BMC_I2CBUS(2)
171+
BMC_I2CBUS(3)
172+
BMC_I2CBUS(4)
173+
BMC_I2CBUS(5)
174+
BMC_I2CBUS(6)
175+
BMC_I2CBUS(7)
176+
BMC_I2CBUS(8)
177+
BMC_I2CBUS(9)
178+
BMC_I2CBUS(10)
179+
BMC_I2CBUS(11)
180+
BMC_I2CBUS(12)
181+
BMC_I2CBUS(13)
182+
BMC_I2CBUS(14)
183+
BMC_I2CBUS(15)
184+
185+
FSI_PRE(0, 0, 1)
186+
187+
HMFSI(100000, 1, 1, 2)
188+
HMFSI(180000, 2, 2, 3)
189+
HMFSI(200000, 3, 3, 4)
190+
HMFSI(280000, 4, 4, 5)
191+
HMFSI(300000, 5, 5, 6)
192+
HMFSI(380000, 6, 6, 7)
193+
HMFSI(400000, 7, 7, 8)
194+
195+
FSI_POST()
196+
197+
HMFSI_ODY(0, 0, 1, 11)
198+
HMFSI_ODY(1, 0, 1, 10)
199+
HMFSI_ODY(2, 0, 1, 12)
200+
HMFSI_ODY(3, 0, 1, 13)
201+
HMFSI_ODY(4, 0, 1, 15)
202+
HMFSI_ODY(5, 0, 1, 00)
203+
HMFSI_ODY(6, 0, 1, 14)
204+
HMFSI_ODY(7, 0, 1, 01)
205+
206+
};

0 commit comments

Comments
 (0)