Skip to content

Commit c92aa5c

Browse files
Added 6.12 kernel trixie patches for amd-pensando elba platform (#538)
Signed-off-by: Sahil Chaudhari <sahilc@pensando.io>
1 parent 60a8675 commit c92aa5c

32 files changed

Lines changed: 810 additions & 1362 deletions

File tree

patches-sonic/0000-Add-support-for-the-TI-TPS53659.patch renamed to patches-sonic/0001-Add-support-for-the-TI-TPS53659.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 770f3b2e6f2fca2267994f4a74b921b59d9cb9a8 Mon Sep 17 00:00:00 2001
1+
From 982710678c41ae201d90fe8220e7fb7a4929e95b Mon Sep 17 00:00:00 2001
22
From: Shantanu Shrivastava <shanshri@amd.com>
33
Date: Tue, 24 Oct 2023 08:25:24 +0000
4-
Subject: [PATCH] Add support for the TI TPS53659
4+
Subject: [PATCH 01/27] Add support for the TI TPS53659
55

66
This patch adds support for the Texas Instruments TPS53659.
77

@@ -14,7 +14,7 @@ Signed-off-by: Shantanu Shrivastava <shanshri@amd.com>
1414
1 file changed, 8 insertions(+), 1 deletion(-)
1515

1616
diff --git a/drivers/hwmon/pmbus/tps53679.c b/drivers/hwmon/pmbus/tps53679.c
17-
index 81b9d8136..df05e7498 100644
17+
index 5c94662..2c8597f 100644
1818
--- a/drivers/hwmon/pmbus/tps53679.c
1919
+++ b/drivers/hwmon/pmbus/tps53679.c
2020
@@ -16,7 +16,7 @@
@@ -38,15 +38,15 @@ index 81b9d8136..df05e7498 100644
3838
case tps53679:
3939
case tps53688:
4040
info->pages = TPS53679_PAGE_NUM;
41-
@@ -274,6 +279,7 @@ static const struct i2c_device_id tps53679_id[] = {
41+
@@ -274,6 +279,7 @@ static int tps53679_probe(struct i2c_client *client)
4242
{"bmr474", tps53676},
4343
{"tps53647", tps53647},
4444
{"tps53667", tps53667},
4545
+ {"tps53659", tps53659},
4646
{"tps53676", tps53676},
4747
{"tps53679", tps53679},
4848
{"tps53681", tps53681},
49-
@@ -286,6 +292,7 @@ MODULE_DEVICE_TABLE(i2c, tps53679_id);
49+
@@ -286,6 +292,7 @@ static int tps53679_probe(struct i2c_client *client)
5050
static const struct of_device_id __maybe_unused tps53679_of_match[] = {
5151
{.compatible = "ti,tps53647", .data = (void *)tps53647},
5252
{.compatible = "ti,tps53667", .data = (void *)tps53667},
@@ -55,5 +55,5 @@ index 81b9d8136..df05e7498 100644
5555
{.compatible = "ti,tps53679", .data = (void *)tps53679},
5656
{.compatible = "ti,tps53681", .data = (void *)tps53681},
5757
--
58-
2.39.2
58+
1.8.3.1
5959

patches-sonic/0001-Adding-support-LTC3888.patch renamed to patches-sonic/0002-Adding-support-LTC3888.patch

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 8d398701b1062464c2618b95aed5798dc749a941 Mon Sep 17 00:00:00 2001
1+
From 1f7f624747ff66df7b9bf02e98541ebb81447f8c Mon Sep 17 00:00:00 2001
22
From: Shantanu Shrivastava <shanshri@amd.com>
33
Date: Tue, 24 Oct 2023 08:29:14 +0000
4-
Subject: [PATCH] Adding support LTC3888
4+
Subject: [PATCH 02/27] Adding support LTC3888
55

66
This patch adds support for the LTC3888 VRM.
77

@@ -11,41 +11,41 @@ https://www.analog.com/media/en/technical-documentation/data-sheets/ltc3888-3888
1111
Signed-off-by: David Clear <dclear@amd.com>
1212
Signed-off-by: Shantanu Shrivastava <shanshri@amd.com>
1313
---
14-
drivers/hwmon/pmbus/ltc2978.c | 43 ++++++++++++++++++++++++++++++++++-
14+
drivers/hwmon/pmbus/ltc2978.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
1515
1 file changed, 42 insertions(+), 1 deletion(-)
1616

1717
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
18-
index 6d2592731..057278736 100644
18+
index 73a86f4..6ad6d0d 100644
1919
--- a/drivers/hwmon/pmbus/ltc2978.c
2020
+++ b/drivers/hwmon/pmbus/ltc2978.c
21-
@@ -23,7 +23,8 @@ enum chips {
21+
@@ -23,7 +23,7 @@ enum chips {
2222
/* Managers */
2323
ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
2424
/* Controllers */
25-
- ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7880,
26-
+ ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3888, ltc3889,
27-
+ ltc7880,
25+
- ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132, ltc7880,
26+
+ ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3888, ltc3889, ltc7132, ltc7880,
2827
/* Modules */
2928
ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
3029
ltm4700,
31-
@@ -53,6 +54,8 @@ enum chips {
32-
/* LTC3883, LTC3884, LTC3886, LTC3889 and LTC7880 only */
30+
@@ -53,6 +53,9 @@ enum chips {
31+
/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7880 */
3332
#define LTC3883_MFR_IIN_PEAK 0xe1
3433

3534
+/* LTC3888 only */
3635
+#define LTC3888_MFR_TOTAL_IOUT 0xe1
37-
36+
+
3837
/* LTC2975 only */
3938
#define LTC2975_MFR_IIN_PEAK 0xc4
40-
@@ -79,6 +82,8 @@ enum chips {
39+
#define LTC2975_MFR_IIN_MIN 0xc5
40+
@@ -78,6 +81,8 @@ enum chips {
4141
#define LTC3884_ID 0x4C00
4242
#define LTC3886_ID 0x4600
4343
#define LTC3887_ID 0x4700
4444
+#define LTC3888_ID 0x4800
4545
+#define LTC3888_ID_D1 0x4880 /* Dash 1 */
46-
#define LTM2987_ID_A 0x8010 /* A/B for two die IDs */
47-
#define LTM2987_ID_B 0x8020
4846
#define LTC3889_ID 0x4900
47+
#define LTC7132_ID 0x4CE0
48+
#define LTC7880_ID 0x49E0
4949
@@ -467,6 +472,26 @@ static int ltc3883_read_word_data(struct i2c_client *client, int page,
5050
return ret;
5151
}
@@ -73,24 +73,24 @@ index 6d2592731..057278736 100644
7373
static int ltc2978_clear_peaks(struct ltc2978_data *data,
7474
struct i2c_client *client, int page)
7575
{
76-
@@ -546,6 +571,7 @@ static const struct i2c_device_id ltc2978_id[] = {
76+
@@ -546,6 +571,7 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,
7777
{"ltc3884", ltc3884},
7878
{"ltc3886", ltc3886},
7979
{"ltc3887", ltc3887},
8080
+ {"ltc3888", ltc3888},
8181
{"ltc3889", ltc3889},
82+
{"ltc7132", ltc7132},
8283
{"ltc7880", ltc7880},
83-
{"ltm2987", ltm2987},
84-
@@ -649,6 +675,8 @@ static int ltc2978_get_id(struct i2c_client *client)
84+
@@ -650,6 +676,8 @@ static int ltc2978_get_id(struct i2c_client *client)
8585
return ltc3886;
8686
else if (chip_id == LTC3887_ID)
8787
return ltc3887;
8888
+ else if (chip_id == LTC3888_ID || chip_id == LTC3888_ID_D1)
8989
+ return ltc3888;
9090
else if (chip_id == LTC3889_ID)
9191
return ltc3889;
92-
else if (chip_id == LTC7880_ID)
93-
@@ -850,6 +878,18 @@ static int ltc2978_probe(struct i2c_client *client)
92+
else if (chip_id == LTC7132_ID)
93+
@@ -854,6 +882,18 @@ static int ltc2978_probe(struct i2c_client *client)
9494
| PMBUS_HAVE_POUT
9595
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
9696
break;
@@ -109,14 +109,14 @@ index 6d2592731..057278736 100644
109109
default:
110110
return -ENODEV;
111111
}
112-
@@ -901,6 +941,7 @@ static const struct of_device_id ltc2978_of_match[] = {
112+
@@ -905,6 +945,7 @@ static int ltc2978_probe(struct i2c_client *client)
113113
{ .compatible = "lltc,ltc3884" },
114114
{ .compatible = "lltc,ltc3886" },
115115
{ .compatible = "lltc,ltc3887" },
116116
+ { .compatible = "lltc,ltc3888" },
117117
{ .compatible = "lltc,ltc3889" },
118+
{ .compatible = "lltc,ltc7132" },
118119
{ .compatible = "lltc,ltc7880" },
119-
{ .compatible = "lltc,ltm2987" },
120120
--
121-
2.39.2
121+
1.8.3.1
122122

patches-sonic/0002-i2c-designware-Support-stuck-SDA-line-recovery.patch renamed to patches-sonic/0003-i2c-designware-Support-stuck-SDA-line-recovery.patch

Lines changed: 54 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From f3c0cb78c3982c60e9a5e2705c9939f1eef84002 Mon Sep 17 00:00:00 2001
1+
From 697b2b39c8e473c8a41b0a5d0947d36480b35354 Mon Sep 17 00:00:00 2001
22
From: Shantanu Shrivastava <shanshri@amd.com>
33
Date: Tue, 24 Oct 2023 08:36:35 +0000
4-
Subject: [PATCH] i2c-designware: Support stuck SDA line recovery
4+
Subject: [PATCH 03/27] i2c-designware: Support stuck SDA line recovery
55

66
This patch supports the Designware I2C stuck bus recovery feature.
77
The procedure for stuck SDA recovery involves a polling loop in
@@ -14,17 +14,16 @@ a hard maximum on time in the recovery loop.
1414
Signed-off-by: David Clear <dclear@amd.com>
1515
Signed-off-by: Shantanu Shrivastava <shanshri@amd.com>
1616
---
17-
drivers/i2c/busses/i2c-designware-common.c | 2 +
18-
drivers/i2c/busses/i2c-designware-core.h | 11 +++
19-
drivers/i2c/busses/i2c-designware-master.c | 87 ++++++++++++++++++++-
20-
drivers/i2c/busses/i2c-designware-platdrv.c | 3 +
21-
4 files changed, 101 insertions(+), 2 deletions(-)
17+
drivers/i2c/busses/i2c-designware-common.c | 2 +
18+
drivers/i2c/busses/i2c-designware-core.h | 9 +++
19+
drivers/i2c/busses/i2c-designware-master.c | 88 +++++++++++++++++++++++++++++-
20+
3 files changed, 96 insertions(+), 3 deletions(-)
2221

2322
diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
24-
index 6fdb25a5f..8ac32dd41 100644
23+
index b328278..e6f1b29 100644
2524
--- a/drivers/i2c/busses/i2c-designware-common.c
2625
+++ b/drivers/i2c/busses/i2c-designware-common.c
27-
@@ -57,6 +57,8 @@ static char *abort_sources[] = {
26+
@@ -63,6 +63,8 @@
2827
"slave lost the bus while transmitting data to a remote master",
2928
[ABRT_SLAVE_RD_INTX] =
3029
"incorrect slave-transmitter mode configuration",
@@ -34,70 +33,59 @@ index 6fdb25a5f..8ac32dd41 100644
3433

3534
static int dw_reg_read(void *context, unsigned int reg, unsigned int *val)
3635
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h
37-
index 56a029da4..54e6c44e6 100644
36+
index 2d32896..59d1eba 100644
3837
--- a/drivers/i2c/busses/i2c-designware-core.h
3938
+++ b/drivers/i2c/busses/i2c-designware-core.h
40-
@@ -37,6 +37,7 @@
41-
#define DW_IC_CON_STOP_DET_IFADDRESSED BIT(7)
42-
#define DW_IC_CON_TX_EMPTY_CTRL BIT(8)
43-
#define DW_IC_CON_RX_FIFO_FULL_HLD_CTRL BIT(9)
44-
+#define DW_IC_CON_BUS_CLEAR_FEATURE_CTL BIT(11)
45-
46-
#define DW_IC_DATA_CMD_DAT GENMASK(7, 0)
47-
48-
@@ -77,6 +78,8 @@
49-
#define DW_IC_TX_ABRT_SOURCE 0x80
50-
#define DW_IC_ENABLE_STATUS 0x9c
51-
#define DW_IC_CLR_RESTART_DET 0xa8
39+
@@ -78,6 +78,8 @@
40+
#define DW_IC_TX_ABRT_SOURCE 0x80
41+
#define DW_IC_ENABLE_STATUS 0x9c
42+
#define DW_IC_CLR_RESTART_DET 0xa8
5243
+#define DW_IC_SCL_STUCK_AT_LOW 0xac
5344
+#define DW_IC_SDA_STUCK_AT_LOW 0xb0
54-
#define DW_IC_COMP_PARAM_1 0xf4
55-
#define DW_IC_COMP_VERSION 0xf8
56-
#define DW_IC_SDA_HOLD_MIN_VERS 0x3131312A
57-
@@ -96,6 +99,7 @@
58-
#define DW_IC_INTR_START_DET BIT(10)
59-
#define DW_IC_INTR_GEN_CALL BIT(11)
60-
#define DW_IC_INTR_RESTART_DET BIT(12)
45+
#define DW_IC_COMP_PARAM_1 0xf4
46+
#define DW_IC_COMP_VERSION 0xf8
47+
#define DW_IC_SDA_HOLD_MIN_VERS 0x3131312A /* "111*" == v1.11* */
48+
@@ -98,6 +100,7 @@
49+
#define DW_IC_INTR_GEN_CALL BIT(11)
50+
#define DW_IC_INTR_RESTART_DET BIT(12)
51+
#define DW_IC_INTR_MST_ON_HOLD BIT(13)
6152
+#define DW_IC_INTR_SCL_STUCK_AT_LOW BIT(14)
6253

63-
#define DW_IC_INTR_DEFAULT_MASK (DW_IC_INTR_RX_FULL | \
64-
DW_IC_INTR_TX_ABRT | \
65-
@@ -107,14 +111,18 @@
66-
DW_IC_INTR_RX_UNDER | \
67-
DW_IC_INTR_RD_REQ)
54+
#define DW_IC_INTR_DEFAULT_MASK (DW_IC_INTR_RX_FULL | \
55+
DW_IC_INTR_TX_ABRT | \
56+
@@ -111,12 +114,15 @@
57+
#define DW_IC_ENABLE_ENABLE BIT(0)
58+
#define DW_IC_ENABLE_ABORT BIT(1)
6859

6960
+#define DW_IC_SDA_STUCK_RECOVERY_ENABLE BIT(3)
7061
+
71-
#define DW_IC_STATUS_ACTIVITY BIT(0)
72-
#define DW_IC_STATUS_TFE BIT(2)
73-
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
74-
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
62+
#define DW_IC_STATUS_ACTIVITY BIT(0)
63+
#define DW_IC_STATUS_TFE BIT(2)
64+
#define DW_IC_STATUS_RFNE BIT(3)
65+
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
66+
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
67+
#define DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY BIT(7)
7568
+#define DW_IC_STATUS_SDA_STUCK_NOT_RECOVERED BIT(11)
7669

77-
#define DW_IC_SDA_HOLD_RX_SHIFT 16
78-
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
79-
80-
+
81-
#define DW_IC_ERR_TX_ABRT 0x1
82-
83-
#define DW_IC_TAR_10BITADDR_MASTER BIT(12)
84-
@@ -156,6 +164,7 @@
85-
#define ABRT_SLAVE_FLUSH_TXFIFO 13
86-
#define ABRT_SLAVE_ARBLOST 14
87-
#define ABRT_SLAVE_RD_INTX 15
88-
+#define ABRT_SDA_STUCK_AT_LOW 17
70+
#define DW_IC_SDA_HOLD_RX_SHIFT 16
71+
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
72+
@@ -162,6 +168,7 @@
73+
#define ABRT_SLAVE_FLUSH_TXFIFO 13
74+
#define ABRT_SLAVE_ARBLOST 14
75+
#define ABRT_SLAVE_RD_INTX 15
76+
+#define ABRT_SDA_STUCK_AT_LOW 17
8977

9078
#define DW_IC_TX_ABRT_7B_ADDR_NOACK BIT(ABRT_7B_ADDR_NOACK)
9179
#define DW_IC_TX_ABRT_10ADDR1_NOACK BIT(ABRT_10ADDR1_NOACK)
92-
@@ -168,6 +177,7 @@
80+
@@ -174,6 +181,7 @@
9381
#define DW_IC_TX_ABRT_10B_RD_NORSTRT BIT(ABRT_10B_RD_NORSTRT)
9482
#define DW_IC_TX_ABRT_MASTER_DIS BIT(ABRT_MASTER_DIS)
9583
#define DW_IC_TX_ARB_LOST BIT(ARB_LOST)
9684
+#define DW_IC_TX_ABRT_SDA_STUCK_AT_LOW BIT(ABRT_SDA_STUCK_AT_LOW)
9785
#define DW_IC_RX_ABRT_SLAVE_RD_INTX BIT(ABRT_SLAVE_RD_INTX)
9886
#define DW_IC_RX_ABRT_SLAVE_ARBLOST BIT(ABRT_SLAVE_ARBLOST)
9987
#define DW_IC_RX_ABRT_SLAVE_FLUSH_TXFIFO BIT(ABRT_SLAVE_FLUSH_TXFIFO)
100-
@@ -277,6 +287,7 @@ struct dw_i2c_dev {
88+
@@ -283,6 +291,7 @@ struct dw_i2c_dev {
10189
int rx_outstanding;
10290
struct i2c_timings timings;
10391
u32 sda_hold_time;
@@ -106,10 +94,10 @@ index 56a029da4..54e6c44e6 100644
10694
u16 ss_lcnt;
10795
u16 fs_hcnt;
10896
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
109-
index dc3c5a15a..9834137a0 100644
97+
index 52dc666..18423d0 100644
11098
--- a/drivers/i2c/busses/i2c-designware-master.c
11199
+++ b/drivers/i2c/busses/i2c-designware-master.c
112-
@@ -37,6 +37,45 @@ static void i2c_dw_configure_fifo_master(struct dw_i2c_dev *dev)
100+
@@ -41,6 +41,45 @@ static void i2c_dw_configure_fifo_master(struct dw_i2c_dev *dev)
113101
regmap_write(dev->map, DW_IC_CON, dev->master_cfg);
114102
}
115103

@@ -154,10 +142,10 @@ index dc3c5a15a..9834137a0 100644
154142
+
155143
static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev)
156144
{
157-
u32 comp_param1;
158-
@@ -599,6 +638,14 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
159-
goto done;
160-
}
145+
unsigned int comp_param1;
146+
@@ -846,6 +885,14 @@ static int i2c_dw_wait_transfer(struct dw_i2c_dev *dev)
147+
if (i2c_dw_is_controller_active(dev))
148+
dev_err(dev->dev, "controller active\n");
161149

162150
+ /* Look for a stuck bus */
163151
+ if (dev->cmd_err == DW_IC_ERR_TX_ABRT &&
@@ -170,7 +158,7 @@ index dc3c5a15a..9834137a0 100644
170158
/*
171159
* We must disable the adapter before returning and signaling the end
172160
* of the current transfer. Otherwise the hardware might continue
173-
@@ -826,6 +873,39 @@ static void i2c_dw_unprepare_recovery(struct i2c_adapter *adap)
161+
@@ -940,6 +987,39 @@ static void i2c_dw_unprepare_recovery(struct i2c_adapter *adap)
174162
i2c_dw_init_master(dev);
175163
}
176164

@@ -192,14 +180,14 @@ index dc3c5a15a..9834137a0 100644
192180
+ * bit in IC_CON. If the bit reads back set, then the feature is
193181
+ * available, otherwise it is not.
194182
+ */
195-
+ regmap_write(dev->map, DW_IC_CON, DW_IC_CON_BUS_CLEAR_FEATURE_CTL);
183+
+ regmap_write(dev->map, DW_IC_CON, DW_IC_DATA_CMD_FIRST_DATA_BYTE);
196184
+ regmap_read(dev->map, DW_IC_CON, &con);
197-
+ if (!(con & DW_IC_CON_BUS_CLEAR_FEATURE_CTL))
185+
+ if (!(con & DW_IC_DATA_CMD_FIRST_DATA_BYTE))
198186
+ goto out;
199187
+ dev_info(dev->dev, "running with controller bus clear recovery mode!");
200188
+ timeout = i2c_dw_clk_rate(dev) * dev->sda_timeout_ms; /* clk in kHz */
201189
+ regmap_write(dev->map, DW_IC_SDA_STUCK_AT_LOW, timeout);
202-
+ dev->master_cfg |= DW_IC_CON_BUS_CLEAR_FEATURE_CTL;
190+
+ dev->master_cfg |= DW_IC_DATA_CMD_FIRST_DATA_BYTE;
203191
+out:
204192
+ regmap_write(dev->map, DW_IC_CON, dev->master_cfg);
205193
+ i2c_dw_release_lock(dev);
@@ -210,34 +198,21 @@ index dc3c5a15a..9834137a0 100644
210198
static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
211199
{
212200
struct i2c_bus_recovery_info *rinfo = &dev->rinfo;
213-
@@ -833,8 +913,11 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
201+
@@ -947,9 +1027,11 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
214202
struct gpio_desc *gpio;
215203

216204
gpio = devm_gpiod_get_optional(dev->dev, "scl", GPIOD_OUT_HIGH);
217205
- if (IS_ERR_OR_NULL(gpio))
218206
- return PTR_ERR_OR_ZERO(gpio);
207+
-
219208
+ if (IS_ERR_OR_NULL(gpio)) {
220209
+ if (IS_ERR(gpio))
221210
+ return PTR_ERR(gpio);
222211
+ return i2c_dw_probe_bus_clear_feature(dev);
223212
+ }
224-
225213
rinfo->scl_gpiod = gpio;
226214

227-
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
228-
index 74182db03..7466d748b 100644
229-
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
230-
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
231-
@@ -136,6 +136,9 @@ static int dw_i2c_of_configure(struct platform_device *pdev)
232-
{
233-
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
234-
235-
+ device_property_read_u32(&pdev->dev, "snps,sda-timeout-ms",
236-
+ &dev->sda_timeout_ms);
237-
+
238-
switch (dev->flags & MODEL_MASK) {
239-
case MODEL_MSCC_OCELOT:
240-
dev->ext = devm_platform_ioremap_resource(pdev, 1);
215+
gpio = devm_gpiod_get_optional(dev->dev, "sda", GPIOD_IN);
241216
--
242-
2.39.2
217+
1.8.3.1
243218

0 commit comments

Comments
 (0)