Skip to content

Commit 0d6a10d

Browse files
committed
Merge tag 'imx-fixes-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes
i.MX fixes for 6.1, 2nd round: - Switch to usb-role-switch for fixing USB device mode on tqma8mqml-mba8mx board, so that Dual Role is fully functional. - A series from Marek Vasut to fix dt-schema warning caused by NAND controller size-cells. - Fix file permission of imx93-pinfunc header. - Enable OCOTP clock in soc-imx8m driver to fix a kexec kernel hang issue. * tag 'imx-fixes-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx8m: Enable OCOTP clock before reading the register arm64: dts: imx93-pinfunc: drop execution permission arm64: dts: imx8mn: Fix NAND controller size-cells arm64: dts: imx8mm: Fix NAND controller size-cells ARM: dts: imx7: Fix NAND controller size-cells arm64: dts: imx8mm-tqma8mqml-mba8mx: Fix USB DR Link: https://lore.kernel.org/r/20221116090402.GA1274@T480 Signed-off-by: Arnd Bergmann <[email protected]>
2 parents f9084ec + 836fb30 commit 0d6a10d

File tree

6 files changed

+42
-11
lines changed

6 files changed

+42
-11
lines changed

arch/arm/boot/dts/imx7s.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,10 +1270,10 @@
12701270
clocks = <&clks IMX7D_NAND_USDHC_BUS_RAWNAND_CLK>;
12711271
};
12721272

1273-
gpmi: nand-controller@33002000{
1273+
gpmi: nand-controller@33002000 {
12741274
compatible = "fsl,imx7d-gpmi-nand";
12751275
#address-cells = <1>;
1276-
#size-cells = <1>;
1276+
#size-cells = <0>;
12771277
reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
12781278
reg-names = "gpmi-nand", "bch";
12791279
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;

arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,25 @@
3434
off-on-delay-us = <12000>;
3535
};
3636

37-
extcon_usbotg1: extcon-usbotg1 {
38-
compatible = "linux,extcon-usb-gpio";
37+
connector {
38+
compatible = "gpio-usb-b-connector", "usb-b-connector";
39+
type = "micro";
40+
label = "X19";
3941
pinctrl-names = "default";
40-
pinctrl-0 = <&pinctrl_usb1_extcon>;
41-
id-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
42+
pinctrl-0 = <&pinctrl_usb1_connector>;
43+
id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
44+
45+
ports {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
49+
port@0 {
50+
reg = <0>;
51+
usb_dr_connector: endpoint {
52+
remote-endpoint = <&usb1_drd_sw>;
53+
};
54+
};
55+
};
4256
};
4357
};
4458

@@ -105,13 +119,19 @@
105119
pinctrl-names = "default";
106120
pinctrl-0 = <&pinctrl_usbotg1>;
107121
dr_mode = "otg";
108-
extcon = <&extcon_usbotg1>;
109122
srp-disable;
110123
hnp-disable;
111124
adp-disable;
112125
power-active-high;
113126
over-current-active-low;
127+
usb-role-switch;
114128
status = "okay";
129+
130+
port {
131+
usb1_drd_sw: endpoint {
132+
remote-endpoint = <&usb_dr_connector>;
133+
};
134+
};
115135
};
116136

117137
&usbotg2 {
@@ -231,7 +251,7 @@
231251
<MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x84>;
232252
};
233253

234-
pinctrl_usb1_extcon: usb1-extcongrp {
254+
pinctrl_usb1_connector: usb1-connectorgrp {
235255
fsl,pins = <MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x1c0>;
236256
};
237257

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,10 +1244,10 @@
12441244
clocks = <&clk IMX8MM_CLK_NAND_USDHC_BUS_RAWNAND_CLK>;
12451245
};
12461246

1247-
gpmi: nand-controller@33002000{
1247+
gpmi: nand-controller@33002000 {
12481248
compatible = "fsl,imx8mm-gpmi-nand", "fsl,imx7d-gpmi-nand";
12491249
#address-cells = <1>;
1250-
#size-cells = <1>;
1250+
#size-cells = <0>;
12511251
reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
12521252
reg-names = "gpmi-nand", "bch";
12531253
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@
11021102
gpmi: nand-controller@33002000 {
11031103
compatible = "fsl,imx8mn-gpmi-nand", "fsl,imx7d-gpmi-nand";
11041104
#address-cells = <1>;
1105-
#size-cells = <1>;
1105+
#size-cells = <0>;
11061106
reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
11071107
reg-names = "gpmi-nand", "bch";
11081108
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;

arch/arm64/boot/dts/freescale/imx93-pinfunc.h

100755100644
File mode changed.

drivers/soc/imx/soc-imx8m.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/platform_device.h>
1212
#include <linux/arm-smccc.h>
1313
#include <linux/of.h>
14+
#include <linux/clk.h>
1415

1516
#define REV_B1 0x21
1617

@@ -56,13 +57,21 @@ static u32 __init imx8mq_soc_revision(void)
5657
void __iomem *ocotp_base;
5758
u32 magic;
5859
u32 rev;
60+
struct clk *clk;
5961

6062
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp");
6163
if (!np)
6264
return 0;
6365

6466
ocotp_base = of_iomap(np, 0);
6567
WARN_ON(!ocotp_base);
68+
clk = of_clk_get_by_name(np, NULL);
69+
if (!clk) {
70+
WARN_ON(!clk);
71+
return 0;
72+
}
73+
74+
clk_prepare_enable(clk);
6675

6776
/*
6877
* SOC revision on older imx8mq is not available in fuses so query
@@ -79,6 +88,8 @@ static u32 __init imx8mq_soc_revision(void)
7988
soc_uid <<= 32;
8089
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
8190

91+
clk_disable_unprepare(clk);
92+
clk_put(clk);
8293
iounmap(ocotp_base);
8394
of_node_put(np);
8495

0 commit comments

Comments
 (0)