Skip to content

Commit

Permalink
Merge tag 'imx-fixes-5.8' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/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]>
  • Loading branch information
arndb committed Jun 28, 2020
2 parents 2596ce4 + a721321 commit 42d3f7e
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 28 deletions.
13 changes: 0 additions & 13 deletions arch/arm/boot/dts/imx6ul-kontron-n6x1x-s.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,6 @@
status = "okay";
};

&wdog1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wdog>;
fsl,ext-reset-output;
status = "okay";
};

&iomuxc {
pinctrl-0 = <&pinctrl_reset_out &pinctrl_gpio>;

Expand Down Expand Up @@ -409,10 +402,4 @@
MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9
>;
};

pinctrl_wdog: wdoggrp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO09__WDOG1_WDOG_ANY 0x30b0
>;
};
};
13 changes: 13 additions & 0 deletions arch/arm/boot/dts/imx6ul-kontron-n6x1x-som-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
status = "okay";
};

&wdog1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wdog>;
fsl,ext-reset-output;
status = "okay";
};

&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_reset_out>;
Expand Down Expand Up @@ -106,4 +113,10 @@
MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09 0x1b0b0
>;
};

pinctrl_wdog: wdoggrp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO09__WDOG1_WDOG_ANY 0x18b0
>;
};
};
6 changes: 4 additions & 2 deletions arch/arm/mach-imx/pm-imx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,14 @@ static int __init imx_suspend_alloc_ocram(
if (!ocram_pool) {
pr_warn("%s: ocram pool unavailable!\n", __func__);
ret = -ENODEV;
goto put_node;
goto put_device;
}

ocram_base = gen_pool_alloc(ocram_pool, size);
if (!ocram_base) {
pr_warn("%s: unable to alloc ocram!\n", __func__);
ret = -ENOMEM;
goto put_node;
goto put_device;
}

phys = gen_pool_virt_to_phys(ocram_pool, ocram_base);
Expand All @@ -312,6 +312,8 @@ static int __init imx_suspend_alloc_ocram(
if (virt_out)
*virt_out = virt;

put_device:
put_device(&pdev->dev);
put_node:
of_node_put(node);

Expand Down
10 changes: 6 additions & 4 deletions arch/arm/mach-imx/pm-imx6.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
if (!ocram_pool) {
pr_warn("%s: ocram pool unavailable!\n", __func__);
ret = -ENODEV;
goto put_node;
goto put_device;
}

ocram_base = gen_pool_alloc(ocram_pool, MX6Q_SUSPEND_OCRAM_SIZE);
if (!ocram_base) {
pr_warn("%s: unable to alloc ocram!\n", __func__);
ret = -ENOMEM;
goto put_node;
goto put_device;
}

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

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

goto put_node;
goto put_device;

pl310_cache_map_failed:
iounmap(pm_info->gpc_base.vbase);
Expand All @@ -580,6 +580,8 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
iounmap(pm_info->src_base.vbase);
src_map_failed:
iounmap(pm_info->mmdc_base.vbase);
put_device:
put_device(&pdev->dev);
put_node:
of_node_put(node);

Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@

ldo1_reg: LDO1 {
regulator-name = "LDO1";
regulator-min-microvolt = <3000000>;
regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};

ldo2_reg: LDO2 {
regulator-name = "LDO2";
regulator-min-microvolt = <900000>;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <900000>;
regulator-boot-on;
regulator-always-on;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/freescale/imx8mm-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@

ldo1_reg: LDO1 {
regulator-name = "LDO1";
regulator-min-microvolt = <3000000>;
regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};

ldo2_reg: LDO2 {
regulator-name = "LDO2";
regulator-min-microvolt = <900000>;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <900000>;
regulator-boot-on;
regulator-always-on;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@

ldo1_reg: LDO1 {
regulator-name = "LDO1";
regulator-min-microvolt = <3000000>;
regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};

ldo2_reg: LDO2 {
regulator-name = "LDO2";
regulator-min-microvolt = <900000>;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <900000>;
regulator-boot-on;
regulator-always-on;
Expand Down
10 changes: 7 additions & 3 deletions drivers/soc/imx/soc-imx8m.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#define OCOTP_UID_LOW 0x410
#define OCOTP_UID_HIGH 0x420

#define IMX8MP_OCOTP_UID_OFFSET 0x10

/* Same as ANADIG_DIGPROG_IMX7D */
#define ANADIG_DIGPROG_IMX8MM 0x800

Expand Down Expand Up @@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
{
void __iomem *ocotp_base;
struct device_node *np;
u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
IMX8MP_OCOTP_UID_OFFSET : 0;

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

soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
soc_uid <<= 32;
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);

iounmap(ocotp_base);
of_node_put(np);
Expand Down Expand Up @@ -146,7 +150,7 @@ static const struct imx8_soc_data imx8mp_soc_data = {
.soc_revision = imx8mm_soc_revision,
};

static const struct of_device_id imx8_soc_match[] = {
static __maybe_unused const struct of_device_id imx8_soc_match[] = {
{ .compatible = "fsl,imx8mq", .data = &imx8mq_soc_data, },
{ .compatible = "fsl,imx8mm", .data = &imx8mm_soc_data, },
{ .compatible = "fsl,imx8mn", .data = &imx8mn_soc_data, },
Expand Down

0 comments on commit 42d3f7e

Please sign in to comment.