Skip to content

Commit 42d3f7e

Browse files
committed
Merge tag 'imx-fixes-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes
i.MX fixes for 5.8: - Fix LDO1 and LDO2 voltage range for a couple of i.MX8M board device trees. - Fix i.MX8MP UID fuse offset in i.MX8M SoC driver. - Fix watchdog configuration in imx6ul-kontron device tree. - Fix one build warning seen on building soc-imx8m driver with x86_64-randconfig. - Add missing put_device() call for a couple of mach-imx PM functions. * tag 'imx-fixes-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx8m: fix build warning ARM: imx6: add missing put_device() call in imx6q_suspend_init() ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram() soc: imx8m: Correct i.MX8MP UID fuse offset ARM: dts: imx6ul-kontron: Change WDOG_ANY signal from push-pull to open-drain ARM: dts: imx6ul-kontron: Move watchdog from Kontron i.MX6UL/ULL board to SoM arm64: dts: imx8mm-beacon: Fix voltages on LDO1 and LDO2 arm64: dts: imx8mn-ddr4-evk: correct ldo1/ldo2 voltage range arm64: dts: imx8mm-evk: correct ldo1/ldo2 voltage range Link: https://lore.kernel.org/r/20200624111725.GA24312@dragon Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 2596ce4 + a721321 commit 42d3f7e

File tree

8 files changed

+36
-28
lines changed

8 files changed

+36
-28
lines changed

arch/arm/boot/dts/imx6ul-kontron-n6x1x-s.dtsi

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,6 @@
232232
status = "okay";
233233
};
234234

235-
&wdog1 {
236-
pinctrl-names = "default";
237-
pinctrl-0 = <&pinctrl_wdog>;
238-
fsl,ext-reset-output;
239-
status = "okay";
240-
};
241-
242235
&iomuxc {
243236
pinctrl-0 = <&pinctrl_reset_out &pinctrl_gpio>;
244237

@@ -409,10 +402,4 @@
409402
MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9
410403
>;
411404
};
412-
413-
pinctrl_wdog: wdoggrp {
414-
fsl,pins = <
415-
MX6UL_PAD_GPIO1_IO09__WDOG1_WDOG_ANY 0x30b0
416-
>;
417-
};
418405
};

arch/arm/boot/dts/imx6ul-kontron-n6x1x-som-common.dtsi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
status = "okay";
5858
};
5959

60+
&wdog1 {
61+
pinctrl-names = "default";
62+
pinctrl-0 = <&pinctrl_wdog>;
63+
fsl,ext-reset-output;
64+
status = "okay";
65+
};
66+
6067
&iomuxc {
6168
pinctrl-names = "default";
6269
pinctrl-0 = <&pinctrl_reset_out>;
@@ -106,4 +113,10 @@
106113
MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09 0x1b0b0
107114
>;
108115
};
116+
117+
pinctrl_wdog: wdoggrp {
118+
fsl,pins = <
119+
MX6UL_PAD_GPIO1_IO09__WDOG1_WDOG_ANY 0x18b0
120+
>;
121+
};
109122
};

arch/arm/mach-imx/pm-imx5.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,14 @@ static int __init imx_suspend_alloc_ocram(
295295
if (!ocram_pool) {
296296
pr_warn("%s: ocram pool unavailable!\n", __func__);
297297
ret = -ENODEV;
298-
goto put_node;
298+
goto put_device;
299299
}
300300

301301
ocram_base = gen_pool_alloc(ocram_pool, size);
302302
if (!ocram_base) {
303303
pr_warn("%s: unable to alloc ocram!\n", __func__);
304304
ret = -ENOMEM;
305-
goto put_node;
305+
goto put_device;
306306
}
307307

308308
phys = gen_pool_virt_to_phys(ocram_pool, ocram_base);
@@ -312,6 +312,8 @@ static int __init imx_suspend_alloc_ocram(
312312
if (virt_out)
313313
*virt_out = virt;
314314

315+
put_device:
316+
put_device(&pdev->dev);
315317
put_node:
316318
of_node_put(node);
317319

arch/arm/mach-imx/pm-imx6.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
493493
if (!ocram_pool) {
494494
pr_warn("%s: ocram pool unavailable!\n", __func__);
495495
ret = -ENODEV;
496-
goto put_node;
496+
goto put_device;
497497
}
498498

499499
ocram_base = gen_pool_alloc(ocram_pool, MX6Q_SUSPEND_OCRAM_SIZE);
500500
if (!ocram_base) {
501501
pr_warn("%s: unable to alloc ocram!\n", __func__);
502502
ret = -ENOMEM;
503-
goto put_node;
503+
goto put_device;
504504
}
505505

506506
ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);
@@ -523,7 +523,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
523523
ret = imx6_pm_get_base(&pm_info->mmdc_base, socdata->mmdc_compat);
524524
if (ret) {
525525
pr_warn("%s: failed to get mmdc base %d!\n", __func__, ret);
526-
goto put_node;
526+
goto put_device;
527527
}
528528

529529
ret = imx6_pm_get_base(&pm_info->src_base, socdata->src_compat);
@@ -570,7 +570,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
570570
&imx6_suspend,
571571
MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info));
572572

573-
goto put_node;
573+
goto put_device;
574574

575575
pl310_cache_map_failed:
576576
iounmap(pm_info->gpc_base.vbase);
@@ -580,6 +580,8 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
580580
iounmap(pm_info->src_base.vbase);
581581
src_map_failed:
582582
iounmap(pm_info->mmdc_base.vbase);
583+
put_device:
584+
put_device(&pdev->dev);
583585
put_node:
584586
of_node_put(node);
585587

arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@
136136

137137
ldo1_reg: LDO1 {
138138
regulator-name = "LDO1";
139-
regulator-min-microvolt = <3000000>;
139+
regulator-min-microvolt = <1600000>;
140140
regulator-max-microvolt = <3300000>;
141141
regulator-boot-on;
142142
regulator-always-on;
143143
};
144144

145145
ldo2_reg: LDO2 {
146146
regulator-name = "LDO2";
147-
regulator-min-microvolt = <900000>;
147+
regulator-min-microvolt = <800000>;
148148
regulator-max-microvolt = <900000>;
149149
regulator-boot-on;
150150
regulator-always-on;

arch/arm64/boot/dts/freescale/imx8mm-evk.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@
208208

209209
ldo1_reg: LDO1 {
210210
regulator-name = "LDO1";
211-
regulator-min-microvolt = <3000000>;
211+
regulator-min-microvolt = <1600000>;
212212
regulator-max-microvolt = <3300000>;
213213
regulator-boot-on;
214214
regulator-always-on;
215215
};
216216

217217
ldo2_reg: LDO2 {
218218
regulator-name = "LDO2";
219-
regulator-min-microvolt = <900000>;
219+
regulator-min-microvolt = <800000>;
220220
regulator-max-microvolt = <900000>;
221221
regulator-boot-on;
222222
regulator-always-on;

arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@
113113

114114
ldo1_reg: LDO1 {
115115
regulator-name = "LDO1";
116-
regulator-min-microvolt = <3000000>;
116+
regulator-min-microvolt = <1600000>;
117117
regulator-max-microvolt = <3300000>;
118118
regulator-boot-on;
119119
regulator-always-on;
120120
};
121121

122122
ldo2_reg: LDO2 {
123123
regulator-name = "LDO2";
124-
regulator-min-microvolt = <900000>;
124+
regulator-min-microvolt = <800000>;
125125
regulator-max-microvolt = <900000>;
126126
regulator-boot-on;
127127
regulator-always-on;

drivers/soc/imx/soc-imx8m.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#define OCOTP_UID_LOW 0x410
2323
#define OCOTP_UID_HIGH 0x420
2424

25+
#define IMX8MP_OCOTP_UID_OFFSET 0x10
26+
2527
/* Same as ANADIG_DIGPROG_IMX7D */
2628
#define ANADIG_DIGPROG_IMX8MM 0x800
2729

@@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
8789
{
8890
void __iomem *ocotp_base;
8991
struct device_node *np;
92+
u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
93+
IMX8MP_OCOTP_UID_OFFSET : 0;
9094

9195
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
9296
if (!np)
@@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void)
9599
ocotp_base = of_iomap(np, 0);
96100
WARN_ON(!ocotp_base);
97101

98-
soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
102+
soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
99103
soc_uid <<= 32;
100-
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
104+
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);
101105

102106
iounmap(ocotp_base);
103107
of_node_put(np);
@@ -146,7 +150,7 @@ static const struct imx8_soc_data imx8mp_soc_data = {
146150
.soc_revision = imx8mm_soc_revision,
147151
};
148152

149-
static const struct of_device_id imx8_soc_match[] = {
153+
static __maybe_unused const struct of_device_id imx8_soc_match[] = {
150154
{ .compatible = "fsl,imx8mq", .data = &imx8mq_soc_data, },
151155
{ .compatible = "fsl,imx8mm", .data = &imx8mm_soc_data, },
152156
{ .compatible = "fsl,imx8mn", .data = &imx8mn_soc_data, },

0 commit comments

Comments
 (0)