-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
275 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
recipes-kernel/linux/linux-yocto-hailo/0003-emmc-tunning.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c | ||
index 3bc2cdc996a1b..036631f5615b3 100644 | ||
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c | ||
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c | ||
@@ -528,6 +528,12 @@ static int hailo15_dwcmshc_execute_tuning(struct mmc_host *mmc, u32 opcode) | ||
err = sdhci_execute_tuning(mmc, opcode); | ||
if (!err && !host->tuning_err) | ||
pr_info("%s Tuning Success!\n", mmc_hostname(host->mmc)); | ||
+ else { | ||
+ // MSW-6198 - In case of an Error - try one more time (full iteration loop) | ||
+ err = sdhci_execute_tuning(mmc, opcode); | ||
+ if (!err && !host->tuning_err) | ||
+ pr_info("%s Tuning Success!\n", mmc_hostname(host->mmc)); | ||
+ } | ||
|
||
return err; | ||
} | ||
@@ -764,12 +770,16 @@ static void dwcmshc_hailo15_phy_config(struct sdhci_host *host) | ||
reg16 |= DWCMSHC_XFER_MODE_R__MULTI_BLK_SEL; | ||
sdhci_writew(host, reg16, DWCMSHC_XFER_MODE_R); | ||
|
||
- /* Sampling window threshold value is 31 out of 128 taps */ | ||
+ /* Sampling window threshold value */ | ||
reg32 = sdhci_readl(host, DWCMSHC_AT_CTRL_R); | ||
reg32 &= ~DWCMSHC_AT_CTRL_R__SWIN_TH_EN; | ||
reg32 |= DWCMSHC_AT_CTRL_R__SWIN_TH_EN; | ||
reg32 &= ~DWCMSHC_AT_CTRL_R__SWIN_TH_VAL; | ||
- reg32 |= FIELD_PREP(DWCMSHC_AT_CTRL_R__SWIN_TH_VAL,0x1f); | ||
+ if (sdio_phy_config->card_is_emmc) { | ||
+ reg32 |= FIELD_PREP(DWCMSHC_AT_CTRL_R__SWIN_TH_VAL,0x3c); | ||
+ } else { | ||
+ reg32 |= FIELD_PREP(DWCMSHC_AT_CTRL_R__SWIN_TH_VAL,0x1f); | ||
+ } | ||
sdhci_writel(host, reg32, DWCMSHC_AT_CTRL_R); | ||
|
||
pr_debug("%s phy configuration for %s mode done\n", mmc_hostname(host->mmc), sdio_phy_config->card_is_emmc ? "EMMC ": "SD"); | ||
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c | ||
index cf4524a97e37e..b0d7bbbdb18ac 100644 | ||
--- a/drivers/mmc/host/sdhci.c | ||
+++ b/drivers/mmc/host/sdhci.c | ||
@@ -2809,7 +2809,7 @@ static int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode) | ||
|
||
} | ||
|
||
- pr_debug("%s: Tuning failed, falling back to fixed sampling clock\n", | ||
+ pr_err("%s: Tuning failed, falling back to fixed sampling clock\n", | ||
mmc_hostname(host->mmc)); | ||
sdhci_reset_tuning(host); | ||
return -EAGAIN; |
38 changes: 38 additions & 0 deletions
38
recipes-kernel/linux/linux-yocto-hailo/0004-panel-ronbo-fix-gpio.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From fff9f828b6c6ace62b398b17f9411f06ee860711 Mon Sep 17 00:00:00 2001 | ||
From: Mikhail Anikin <mikhail.anikin@solid-run.com> | ||
Date: Tue, 20 Aug 2024 11:29:57 +0300 | ||
Subject: [PATCH 1/4] [panel-ronbo] Use gpiod_set_value_cansleep | ||
|
||
--- | ||
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | ||
index 1fb579a574d9..28088ce1ed64 100644 | ||
--- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | ||
+++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | ||
@@ -54,9 +54,9 @@ static int rb070d30_panel_prepare(struct drm_panel *panel) | ||
} | ||
|
||
msleep(20); | ||
- gpiod_set_value(ctx->gpios.power, 1); | ||
+ gpiod_set_value_cansleep(ctx->gpios.power, 1); | ||
msleep(20); | ||
- gpiod_set_value(ctx->gpios.reset, 1); | ||
+ gpiod_set_value_cansleep(ctx->gpios.reset, 1); | ||
msleep(20); | ||
return 0; | ||
} | ||
@@ -65,8 +65,8 @@ static int rb070d30_panel_unprepare(struct drm_panel *panel) | ||
{ | ||
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel); | ||
|
||
- gpiod_set_value(ctx->gpios.reset, 0); | ||
- gpiod_set_value(ctx->gpios.power, 0); | ||
+ gpiod_set_value_cansleep(ctx->gpios.reset, 0); | ||
+ gpiod_set_value_cansleep(ctx->gpios.power, 0); | ||
regulator_disable(ctx->supply); | ||
|
||
return 0; | ||
-- | ||
2.46.0 |
26 changes: 26 additions & 0 deletions
26
recipes-kernel/linux/linux-yocto-hailo/0005-panel-ronbo-hailo.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
From 434bbb6ac7bf033e54d11ee46c8dad366877e152 Mon Sep 17 00:00:00 2001 | ||
From: Mikhail Anikin <mikhail.anikin@solid-run.com> | ||
Date: Tue, 20 Aug 2024 11:30:45 +0300 | ||
Subject: [PATCH 2/4] [panel-ronbo] Hailo DSI Compatibility | ||
|
||
--- | ||
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | ||
index 28088ce1ed64..9fbab8922edd 100644 | ||
--- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | ||
+++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | ||
@@ -195,7 +195,8 @@ static int rb070d30_panel_dsi_probe(struct mipi_dsi_device *dsi) | ||
|
||
drm_panel_add(&ctx->panel); | ||
|
||
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM; | ||
+ // dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM; | ||
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO; | ||
dsi->format = MIPI_DSI_FMT_RGB888; | ||
dsi->lanes = 4; | ||
|
||
-- | ||
2.46.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters