Skip to content

Commit 7ad8b2f

Browse files
committed
Merge tag 'imx-fixes-5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes
i.MX fixes for 5.16, round 3: - Fix imx6qdl-wandboard Ethernet support by adding 'qca,clk-out-frequency' property. - Fix scl-gpios property typo in LX2160A device tree. * tag 'imx-fixes-5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: lx2160a: fix scl-gpios property name ARM: dts: imx6qdl-wandboard: Fix Ethernet support 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 arm64: dts: ten64: remove redundant interrupt declaration for gpio-keys arm64: dts: lx2160abluebox3: update RGMII delays for sja1105 switch ARM: dts: ls1021a-tsn: update RGMII delays for sja1105 switch ARM: dts: imx6qp-prtwd3: update RGMII delays for sja1105 switch Link: https://lore.kernel.org/r/20211218052003.GA25102@dragon Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 8d674d0 + 849e087 commit 7ad8b2f

File tree

10 files changed

+35
-7
lines changed

10 files changed

+35
-7
lines changed

arch/arm/boot/dts/imx6qdl-wandboard.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@
309309

310310
ethphy: ethernet-phy@1 {
311311
reg = <1>;
312+
qca,clk-out-frequency = <125000000>;
312313
};
313314
};
314315
};

arch/arm/boot/dts/imx6qp-prtwd3.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
label = "cpu";
179179
ethernet = <&fec>;
180180
phy-mode = "rgmii-id";
181+
rx-internal-delay-ps = <2000>;
182+
tx-internal-delay-ps = <2000>;
181183

182184
fixed-link {
183185
speed = <100>;

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/arm/boot/dts/ls1021a-tsn.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
/* Internal port connected to eth2 */
9292
ethernet = <&enet2>;
9393
phy-mode = "rgmii";
94+
rx-internal-delay-ps = <0>;
95+
tx-internal-delay-ps = <0>;
9496
reg = <4>;
9597

9698
fixed-link {

arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@
3838
powerdn {
3939
label = "External Power Down";
4040
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
41-
interrupts = <&gpio1 17 IRQ_TYPE_EDGE_FALLING>;
4241
linux,code = <KEY_POWER>;
4342
};
4443

4544
/* Rear Panel 'ADMIN' button (GPIO_H) */
4645
admin {
4746
label = "ADMIN button";
4847
gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
49-
interrupts = <&gpio3 8 IRQ_TYPE_EDGE_RISING>;
5048
linux,code = <KEY_WPS_BUTTON>;
5149
};
5250
};

arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@
386386
reg = <2>;
387387
ethernet = <&dpmac17>;
388388
phy-mode = "rgmii-id";
389+
rx-internal-delay-ps = <2000>;
390+
tx-internal-delay-ps = <2000>;
389391

390392
fixed-link {
391393
speed = <1000>;
@@ -529,6 +531,8 @@
529531
reg = <2>;
530532
ethernet = <&dpmac18>;
531533
phy-mode = "rgmii-id";
534+
rx-internal-delay-ps = <2000>;
535+
tx-internal-delay-ps = <2000>;
532536

533537
fixed-link {
534538
speed = <1000>;

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@
719719
clock-names = "i2c";
720720
clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
721721
QORIQ_CLK_PLL_DIV(16)>;
722-
scl-gpio = <&gpio2 15 GPIO_ACTIVE_HIGH>;
722+
scl-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
723723
status = "disabled";
724724
};
725725

@@ -768,7 +768,7 @@
768768
clock-names = "i2c";
769769
clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
770770
QORIQ_CLK_PLL_DIV(16)>;
771-
scl-gpio = <&gpio2 16 GPIO_ACTIVE_HIGH>;
771+
scl-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
772772
status = "disabled";
773773
};
774774

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)