-
Notifications
You must be signed in to change notification settings - Fork 234
driver: i2c: mv64xxx: cn9130 bus lockup issue #615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| From 340e920894b0f3e7369905d0321221209b40ab30 Mon Sep 17 00:00:00 2001 | ||
| From: hshah <hshah@marvell.com> | ||
| Date: Thu, 27 Aug 2026 13:49:20 -0700 | ||
| Subject: [PATCH] driver: i2c: mv64xxx: cn9130 bus lockup issue | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make it a statement by adding a verb in imperative mood. |
||
|
|
||
| This patch disable offload module, and disable the "i2c debug slave" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please split into two patches, and add a problem description, and why your patch is the solution. |
||
|
|
||
| Signed-off-by: Narendra Hadke <nhadke@marvell.com> | ||
| --- | ||
| drivers/i2c/busses/i2c-mv64xxx.c | 11 ++++++++++- | ||
| 1 file changed, 10 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c | ||
| index 36fdd9b192a9..f2b35f3cc346 100644 | ||
| --- a/drivers/i2c/busses/i2c-mv64xxx.c | ||
| +++ b/drivers/i2c/busses/i2c-mv64xxx.c | ||
| @@ -118,6 +118,7 @@ struct mv64xxx_i2c_regs { | ||
| u8 status; | ||
| u8 clock; | ||
| u8 soft_reset; | ||
| + u8 config_debug; | ||
| }; | ||
|
|
||
| struct mv64xxx_i2c_data { | ||
| @@ -169,6 +170,7 @@ static struct mv64xxx_i2c_regs mv64xxx_i2c_regs_mv64xxx = { | ||
| .status = 0x0c, | ||
| .clock = 0x0c, | ||
| .soft_reset = 0x1c, | ||
| + .config_debug = 0x8c, | ||
| }; | ||
|
|
||
| static struct mv64xxx_i2c_regs mv64xxx_i2c_regs_sun4i = { | ||
| @@ -217,6 +219,13 @@ mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data, | ||
| static void | ||
| mv64xxx_i2c_hw_init(struct mv64xxx_i2c_data *drv_data) | ||
| { | ||
| + u32 data; | ||
| + | ||
| + /* Disable I2C slave */ | ||
| + data = readl(drv_data->reg_base + drv_data->reg_offsets.config_debug); | ||
| + data &= ~BIT(18); | ||
| + writel(data, drv_data->reg_base + drv_data->reg_offsets.config_debug); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| + | ||
| if (drv_data->offload_enabled) { | ||
| writel(0, drv_data->reg_base + MV64XXX_I2C_REG_BRIDGE_CONTROL); | ||
| writel(0, drv_data->reg_base + MV64XXX_I2C_REG_BRIDGE_TIMING); | ||
| @@ -972,7 +981,7 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data, | ||
| * Transaction Generator support and the errata fix. | ||
| */ | ||
| if (of_device_is_compatible(np, "marvell,mv78230-i2c")) { | ||
| - drv_data->offload_enabled = true; | ||
| + drv_data->offload_enabled = false; | ||
| /* The delay is only needed in standard mode (100kHz) */ | ||
| if (bus_freq <= I2C_MAX_STANDARD_MODE_FREQ) | ||
| drv_data->errata_delay = true; | ||
| -- | ||
| 2.25.1 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use your full name.