Skip to content

Commit e3c68ab

Browse files
committed
Merge tag 'imx-fixes-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes
i.MX fixes for 5.16, round 2: - One fix on imx8m-blk-ctrl driver to get i.MX8MM MIPI reset work properly - Fix CSI_DATA07__ESAI_TX0 pad name in i.MX7ULL pin function header - Remove interconnect property from i.MX8MQ LCDIF device to fix the regression that LCDIF driver stops probe, because interconnect provider driver (imx-bus) hasn't been fully working. - Fix soc-imx driver to register SoC device only on i.MX platform. * tag 'imx-fixes-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: Register SoC device only on i.MX boards soc: imx: imx8m-blk-ctrl: Fix imx8mm mipi reset ARM: dts: imx6ull-pinfunc: Fix CSI_DATA07__ESAI_TX0 pad name arm64: dts: imx8mq: remove interconnect property from lcdif Link: https://lore.kernel.org/r/20211211015625.GK4216@dragon Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 7ad1a90 + 4ebd29f commit e3c68ab

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

arch/arm/boot/dts/imx6ull-pinfunc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@
8282
#define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0
8383
#define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0
8484
#define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0
85-
#define MX6ULL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0
85+
#define MX6ULL_PAD_CSI_DATA07__ESAI_TX0 0x0200 0x048C 0x0000 0x9 0x0
8686

8787
#endif /* __DTS_IMX6ULL_PINFUNC_H */

arch/arm64/boot/dts/freescale/imx8mq.dtsi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,6 @@
524524
<&clk IMX8MQ_VIDEO_PLL1>,
525525
<&clk IMX8MQ_VIDEO_PLL1_OUT>;
526526
assigned-clock-rates = <0>, <0>, <0>, <594000000>;
527-
interconnects = <&noc IMX8MQ_ICM_LCDIF &noc IMX8MQ_ICS_DRAM>;
528-
interconnect-names = "dram";
529527
status = "disabled";
530528

531529
port@0 {

drivers/soc/imx/imx8m-blk-ctrl.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#define BLK_SFT_RSTN 0x0
1919
#define BLK_CLK_EN 0x4
20+
#define BLK_MIPI_RESET_DIV 0x8 /* Mini/Nano DISPLAY_BLK_CTRL only */
2021

2122
struct imx8m_blk_ctrl_domain;
2223

@@ -36,6 +37,15 @@ struct imx8m_blk_ctrl_domain_data {
3637
const char *gpc_name;
3738
u32 rst_mask;
3839
u32 clk_mask;
40+
41+
/*
42+
* i.MX8M Mini and Nano have a third DISPLAY_BLK_CTRL register
43+
* which is used to control the reset for the MIPI Phy.
44+
* Since it's only present in certain circumstances,
45+
* an if-statement should be used before setting and clearing this
46+
* register.
47+
*/
48+
u32 mipi_phy_rst_mask;
3949
};
4050

4151
#define DOMAIN_MAX_CLKS 3
@@ -78,6 +88,8 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd)
7888

7989
/* put devices into reset */
8090
regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask);
91+
if (data->mipi_phy_rst_mask)
92+
regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
8193

8294
/* enable upstream and blk-ctrl clocks to allow reset to propagate */
8395
ret = clk_bulk_prepare_enable(data->num_clks, domain->clks);
@@ -99,6 +111,8 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd)
99111

100112
/* release reset */
101113
regmap_set_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask);
114+
if (data->mipi_phy_rst_mask)
115+
regmap_set_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
102116

103117
/* disable upstream clocks */
104118
clk_bulk_disable_unprepare(data->num_clks, domain->clks);
@@ -120,6 +134,9 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd)
120134
struct imx8m_blk_ctrl *bc = domain->bc;
121135

122136
/* put devices into reset and disable clocks */
137+
if (data->mipi_phy_rst_mask)
138+
regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
139+
123140
regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask);
124141
regmap_clear_bits(bc->regmap, BLK_CLK_EN, data->clk_mask);
125142

@@ -480,6 +497,7 @@ static const struct imx8m_blk_ctrl_domain_data imx8mm_disp_blk_ctl_domain_data[]
480497
.gpc_name = "mipi-dsi",
481498
.rst_mask = BIT(5),
482499
.clk_mask = BIT(8) | BIT(9),
500+
.mipi_phy_rst_mask = BIT(17),
483501
},
484502
[IMX8MM_DISPBLK_PD_MIPI_CSI] = {
485503
.name = "dispblk-mipi-csi",
@@ -488,6 +506,7 @@ static const struct imx8m_blk_ctrl_domain_data imx8mm_disp_blk_ctl_domain_data[]
488506
.gpc_name = "mipi-csi",
489507
.rst_mask = BIT(3) | BIT(4),
490508
.clk_mask = BIT(10) | BIT(11),
509+
.mipi_phy_rst_mask = BIT(16),
491510
},
492511
};
493512

drivers/soc/imx/soc-imx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ static int __init imx_soc_device_init(void)
3636
int ret;
3737
int i;
3838

39+
/* Return early if this is running on devices with different SoCs */
40+
if (!__mxc_cpu_type)
41+
return 0;
42+
3943
if (of_machine_is_compatible("fsl,ls1021a"))
4044
return 0;
4145

0 commit comments

Comments
 (0)