Skip to content

Commit 1800d11

Browse files
authored
AMD-Pensando ELBA SOC support (sonic-net#322)
* amd-pensando elba soc support * AMD-Pensando ELBA SOC support This patchset adds support for AMD-Pensando ELBA SOC. Elba provides a secure, controlled portal to network services, storage, and the data center control plane. This SOC is used in AMD-Pensando PCI Distributed Services Card (DSC). The changes are verified on Pensando DSC2-200 card. There are two uplink ports and one management port. The links and traffic has been tested on all the ports. Signed-off-by: Ashwin H <[email protected]> * Update patchset with review comments addressed Update configs with only platform specific configs Update commit message for few patches Add quirks for pensando qspi controller which was missed in earlier patchset. * Update azp for pensando Added platform along with architecture for azp builds. Default platform is set to 'vs' as per latest change in sonic-linux-kernel * Remove ext3 fs config * Remove legacy configs * make generic config changes for arm64 Some configs part of pensando can be made arm64 generic config. This change is done in this commit. * Fix generic arm64 build --------- Signed-off-by: Ashwin H <[email protected]>
1 parent a2aa335 commit 1800d11

File tree

35 files changed

+13550
-2
lines changed

35 files changed

+13550
-2
lines changed

.azure-pipelines/build-template.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ parameters:
66
- armhf
77
- arm64
88

9+
- name: platform
10+
type: string
11+
values:
12+
- vs
13+
- pensando
14+
default: vs
15+
916
- name: pool
1017
type: string
1118
values:
@@ -28,7 +35,7 @@ parameters:
2835
jobs:
2936
- job:
3037
pool: ${{ parameters.pool }}
31-
displayName: ${{ parameters.arch }}
38+
displayName: ${{ parameters.platform }}-${{ parameters.arch }}
3239
timeoutInMinutes: ${{ parameters.timeout }}
3340

3441
container:
@@ -43,7 +50,7 @@ jobs:
4350
git config --global user.name "Guohan Lu"
4451
export kernel_procure_method=build
4552
cat /proc/cpuinfo
46-
CONFIGURED_ARCH=${{ parameters.arch }} make
53+
CONFIGURED_ARCH=${{ parameters.arch }} CONFIGURED_PLATFORM=${{ parameters.platform }} make
4754
displayName: "Compile sonic kernel"
4855
- publish: $(System.DefaultWorkingDirectory)/
4956
artifact: ${{ parameters.artifact_name }}

azure-pipelines.yml

+7
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,11 @@ stages:
3232
sonic_slave: sonic-slave-bullseye-armhf
3333
artifact_name: sonic-linux-kernel.armhf
3434

35+
- template: .azure-pipelines/build-template.yml
36+
parameters:
37+
arch: arm64
38+
platform: pensando
39+
pool: sonicbld-arm64
40+
sonic_slave: sonic-slave-bullseye-arm64
41+
artifact_name: sonic-linux-kernel.pensando.arm64
3542

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
From 7096c2c942eb2294e42b279f6fd60d780fb13db5 Mon Sep 17 00:00:00 2001
2+
From: Ashwin H <[email protected]>
3+
Date: Tue, 27 Jun 2023 06:32:53 +0000
4+
Subject: [PATCH 01/30] hwmon: (ltc2978) Add support for LTC3888
5+
6+
Add support for LTC3888 and LTC3888-1 driver
7+
Add LTC3888 IOUT support.
8+
9+
Signed-off-by: David Clear <[email protected]>
10+
Signed-off-by: Ashwin H <[email protected]>
11+
---
12+
drivers/hwmon/pmbus/ltc2978.c | 43 ++++++++++++++++++++++++++++++++++-
13+
1 file changed, 42 insertions(+), 1 deletion(-)
14+
15+
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
16+
index 9a024cf70..34129f053 100644
17+
--- a/drivers/hwmon/pmbus/ltc2978.c
18+
+++ b/drivers/hwmon/pmbus/ltc2978.c
19+
@@ -23,7 +23,8 @@ enum chips {
20+
/* Managers */
21+
ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
22+
/* Controllers */
23+
- ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7880,
24+
+ ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3888, ltc3889,
25+
+ ltc7880,
26+
/* Modules */
27+
ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
28+
ltm4700,
29+
@@ -53,6 +54,8 @@ enum chips {
30+
/* LTC3883, LTC3884, LTC3886, LTC3889 and LTC7880 only */
31+
#define LTC3883_MFR_IIN_PEAK 0xe1
32+
33+
+/* LTC3888 only */
34+
+#define LTC3888_MFR_TOTAL_IOUT 0xe1
35+
36+
/* LTC2975 only */
37+
#define LTC2975_MFR_IIN_PEAK 0xc4
38+
@@ -79,6 +82,8 @@ enum chips {
39+
#define LTC3884_ID 0x4C00
40+
#define LTC3886_ID 0x4600
41+
#define LTC3887_ID 0x4700
42+
+#define LTC3888_ID 0x4800
43+
+#define LTC3888_ID_D1 0x4880 /* Dash 1 */
44+
#define LTM2987_ID_A 0x8010 /* A/B for two die IDs */
45+
#define LTM2987_ID_B 0x8020
46+
#define LTC3889_ID 0x4900
47+
@@ -456,6 +461,26 @@ static int ltc3883_read_word_data(struct i2c_client *client, int page,
48+
return ret;
49+
}
50+
51+
+static int ltc3888_read_word_data(struct i2c_client *client, int page,
52+
+ int phase, int reg)
53+
+{
54+
+ const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
55+
+ struct ltc2978_data *data = to_ltc2978_data(info);
56+
+ int ret;
57+
+
58+
+ switch (reg) {
59+
+ case PMBUS_VIRT_READ_IOUT_AVG:
60+
+ ret = ltc_read_word_data(client, page, 0xff,
61+
+ LTC3888_MFR_TOTAL_IOUT);
62+
+ data->iout_max[page] = lin11_to_val(ret);
63+
+ break;
64+
+ default:
65+
+ ret = ltc3880_read_word_data(client, page, phase, reg);
66+
+ break;
67+
+ }
68+
+ return ret;
69+
+}
70+
+
71+
static int ltc2978_clear_peaks(struct ltc2978_data *data,
72+
struct i2c_client *client, int page)
73+
{
74+
@@ -535,6 +560,7 @@ static const struct i2c_device_id ltc2978_id[] = {
75+
{"ltc3884", ltc3884},
76+
{"ltc3886", ltc3886},
77+
{"ltc3887", ltc3887},
78+
+ {"ltc3888", ltc3888},
79+
{"ltc3889", ltc3889},
80+
{"ltc7880", ltc7880},
81+
{"ltm2987", ltm2987},
82+
@@ -621,6 +647,8 @@ static int ltc2978_get_id(struct i2c_client *client)
83+
return ltc3886;
84+
else if (chip_id == LTC3887_ID)
85+
return ltc3887;
86+
+ else if (chip_id == LTC3888_ID || chip_id == LTC3888_ID_D1)
87+
+ return ltc3888;
88+
else if (chip_id == LTC3889_ID)
89+
return ltc3889;
90+
else if (chip_id == LTC7880_ID)
91+
@@ -821,6 +849,18 @@ static int ltc2978_probe(struct i2c_client *client)
92+
| PMBUS_HAVE_POUT
93+
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
94+
break;
95+
+ case ltc3888:
96+
+ data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING;
97+
+ info->read_word_data = ltc3888_read_word_data;
98+
+ info->pages = LTC3880_NUM_PAGES;
99+
+ info->func[0] = PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT
100+
+ | PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_STATUS_TEMP
101+
+ | PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT
102+
+ | PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2;
103+
+ info->func[1] = PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT
104+
+ | PMBUS_HAVE_STATUS_TEMP | PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT
105+
+ | PMBUS_HAVE_TEMP;
106+
+ break;
107+
default:
108+
return -ENODEV;
109+
}
110+
@@ -853,6 +893,7 @@ static const struct of_device_id ltc2978_of_match[] = {
111+
{ .compatible = "lltc,ltc3884" },
112+
{ .compatible = "lltc,ltc3886" },
113+
{ .compatible = "lltc,ltc3887" },
114+
+ { .compatible = "lltc,ltc3888" },
115+
{ .compatible = "lltc,ltc3889" },
116+
{ .compatible = "lltc,ltc7880" },
117+
{ .compatible = "lltc,ltm2987" },
118+
--
119+
2.17.1
120+

0 commit comments

Comments
 (0)