Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <arnd@arndb.de>

+42 -11
+2 -2
arch/arm/boot/dts/imx7s.dtsi
··· 1270 1270 clocks = <&clks IMX7D_NAND_USDHC_BUS_RAWNAND_CLK>; 1271 1271 }; 1272 1272 1273 - gpmi: nand-controller@33002000{ 1273 + gpmi: nand-controller@33002000 { 1274 1274 compatible = "fsl,imx7d-gpmi-nand"; 1275 1275 #address-cells = <1>; 1276 - #size-cells = <1>; 1276 + #size-cells = <0>; 1277 1277 reg = <0x33002000 0x2000>, <0x33004000 0x4000>; 1278 1278 reg-names = "gpmi-nand", "bch"; 1279 1279 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+26 -6
arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts
··· 34 34 off-on-delay-us = <12000>; 35 35 }; 36 36 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"; 39 41 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 + }; 42 56 }; 43 57 }; 44 58 ··· 119 105 pinctrl-names = "default"; 120 106 pinctrl-0 = <&pinctrl_usbotg1>; 121 107 dr_mode = "otg"; 122 - extcon = <&extcon_usbotg1>; 123 108 srp-disable; 124 109 hnp-disable; 125 110 adp-disable; 126 111 power-active-high; 127 112 over-current-active-low; 113 + usb-role-switch; 128 114 status = "okay"; 115 + 116 + port { 117 + usb1_drd_sw: endpoint { 118 + remote-endpoint = <&usb_dr_connector>; 119 + }; 120 + }; 129 121 }; 130 122 131 123 &usbotg2 { ··· 251 231 <MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x84>; 252 232 }; 253 233 254 - pinctrl_usb1_extcon: usb1-extcongrp { 234 + pinctrl_usb1_connector: usb1-connectorgrp { 255 235 fsl,pins = <MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x1c0>; 256 236 }; 257 237
+2 -2
arch/arm64/boot/dts/freescale/imx8mm.dtsi
··· 1244 1244 clocks = <&clk IMX8MM_CLK_NAND_USDHC_BUS_RAWNAND_CLK>; 1245 1245 }; 1246 1246 1247 - gpmi: nand-controller@33002000{ 1247 + gpmi: nand-controller@33002000 { 1248 1248 compatible = "fsl,imx8mm-gpmi-nand", "fsl,imx7d-gpmi-nand"; 1249 1249 #address-cells = <1>; 1250 - #size-cells = <1>; 1250 + #size-cells = <0>; 1251 1251 reg = <0x33002000 0x2000>, <0x33004000 0x4000>; 1252 1252 reg-names = "gpmi-nand", "bch"; 1253 1253 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+1 -1
arch/arm64/boot/dts/freescale/imx8mn.dtsi
··· 1102 1102 gpmi: nand-controller@33002000 { 1103 1103 compatible = "fsl,imx8mn-gpmi-nand", "fsl,imx7d-gpmi-nand"; 1104 1104 #address-cells = <1>; 1105 - #size-cells = <1>; 1105 + #size-cells = <0>; 1106 1106 reg = <0x33002000 0x2000>, <0x33004000 0x4000>; 1107 1107 reg-names = "gpmi-nand", "bch"; 1108 1108 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/freescale/imx93-pinfunc.h
+11
drivers/soc/imx/soc-imx8m.c
··· 11 11 #include <linux/platform_device.h> 12 12 #include <linux/arm-smccc.h> 13 13 #include <linux/of.h> 14 + #include <linux/clk.h> 14 15 15 16 #define REV_B1 0x21 16 17 ··· 57 56 void __iomem *ocotp_base; 58 57 u32 magic; 59 58 u32 rev; 59 + struct clk *clk; 60 60 61 61 np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp"); 62 62 if (!np) ··· 65 63 66 64 ocotp_base = of_iomap(np, 0); 67 65 WARN_ON(!ocotp_base); 66 + clk = of_clk_get_by_name(np, NULL); 67 + if (!clk) { 68 + WARN_ON(!clk); 69 + return 0; 70 + } 71 + 72 + clk_prepare_enable(clk); 68 73 69 74 /* 70 75 * SOC revision on older imx8mq is not available in fuses so query ··· 88 79 soc_uid <<= 32; 89 80 soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW); 90 81 82 + clk_disable_unprepare(clk); 83 + clk_put(clk); 91 84 iounmap(ocotp_base); 92 85 of_node_put(np); 93 86