Merge tag 'fixes-5.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes

Fixes for omap variants

Few fixes for ti-sysc interconnect target module driver for no-idle
quirks that caused nfsroot to fail on some dra7 boards.

And let's fixes to get LCD working again for logicpd board that got
broken a while back with removal of panel-dpi driver. We need to now
use generic CONFIG_DRM_PANEL_SIMPLE instead.

* tag 'fixes-5.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
ARM: dts: am3517-evm: Fix missing video
ARM: dts: logicpd-torpedo-baseboard: Fix missing video
ARM: omap2plus_defconfig: Fix missing video
bus: ti-sysc: Fix handling of invalid clocks
bus: ti-sysc: Fix clock handling for no-idle quirks

Link: https://lore.kernel.org/r/pull-1568819401-72461@atomide.com
Signed-off-by: Olof Johansson <olof@lixom.net>

Changed files
+65 -80
arch
drivers
bus
+4 -19
arch/arm/boot/dts/am3517-evm.dts
··· 124 124 }; 125 125 126 126 lcd0: display@0 { 127 - compatible = "panel-dpi"; 127 + /* This isn't the exact LCD, but the timings meet spec */ 128 + /* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */ 129 + compatible = "newhaven,nhd-4.3-480272ef-atxl"; 128 130 label = "15"; 129 - status = "okay"; 130 - pinctrl-names = "default"; 131 + backlight = <&bl>; 131 132 enable-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>; /* gpio176, lcd INI */ 132 133 vcc-supply = <&vdd_io_reg>; 133 134 ··· 136 135 lcd_in: endpoint { 137 136 remote-endpoint = <&dpi_out>; 138 137 }; 139 - }; 140 - 141 - panel-timing { 142 - clock-frequency = <9000000>; 143 - hactive = <480>; 144 - vactive = <272>; 145 - hfront-porch = <3>; 146 - hback-porch = <2>; 147 - hsync-len = <42>; 148 - vback-porch = <3>; 149 - vfront-porch = <4>; 150 - vsync-len = <11>; 151 - hsync-active = <0>; 152 - vsync-active = <0>; 153 - de-active = <1>; 154 - pixelclk-active = <1>; 155 138 }; 156 139 }; 157 140
+14 -12
arch/arm/boot/dts/logicpd-som-lv.dtsi
··· 228 228 >; 229 229 }; 230 230 231 + i2c2_pins: pinmux_i2c2_pins { 232 + pinctrl-single,pins = < 233 + OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0) /* i2c2_scl */ 234 + OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0) /* i2c2_sda */ 235 + >; 236 + }; 237 + 238 + i2c3_pins: pinmux_i2c3_pins { 239 + pinctrl-single,pins = < 240 + OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0) /* i2c3_scl */ 241 + OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0) /* i2c3_sda */ 242 + >; 243 + }; 244 + 231 245 tsc2004_pins: pinmux_tsc2004_pins { 232 246 pinctrl-single,pins = < 233 247 OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE4) /* mcbsp4_dr.gpio_153 */ ··· 261 247 pinctrl-single,pins = < 262 248 OMAP3_WKUP_IOPAD(0x2a0a, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */ 263 249 OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ 264 - >; 265 - }; 266 - i2c2_pins: pinmux_i2c2_pins { 267 - pinctrl-single,pins = < 268 - OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0) /* i2c2_scl */ 269 - OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0) /* i2c2_sda */ 270 - >; 271 - }; 272 - i2c3_pins: pinmux_i2c3_pins { 273 - pinctrl-single,pins = < 274 - OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0) /* i2c3_scl */ 275 - OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0) /* i2c3_sda */ 276 250 >; 277 251 }; 278 252 };
+7 -32
arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
··· 108 108 &dss { 109 109 status = "ok"; 110 110 vdds_dsi-supply = <&vpll2>; 111 - vdda_video-supply = <&video_reg>; 112 111 pinctrl-names = "default"; 113 112 pinctrl-0 = <&dss_dpi_pins1>; 114 113 port { ··· 123 124 display0 = &lcd0; 124 125 }; 125 126 126 - video_reg: video_reg { 127 + lcd0: display { 128 + /* This isn't the exact LCD, but the timings meet spec */ 129 + /* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */ 130 + compatible = "newhaven,nhd-4.3-480272ef-atxl"; 131 + label = "15"; 127 132 pinctrl-names = "default"; 128 133 pinctrl-0 = <&panel_pwr_pins>; 129 - compatible = "regulator-fixed"; 130 - regulator-name = "fixed-supply"; 131 - regulator-min-microvolt = <3300000>; 132 - regulator-max-microvolt = <3300000>; 133 - gpio = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd INI */ 134 - }; 135 - 136 - lcd0: display { 137 - compatible = "panel-dpi"; 138 - label = "15"; 139 - status = "okay"; 140 - /* default-on; */ 141 - pinctrl-names = "default"; 142 - 134 + backlight = <&bl>; 135 + enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; 143 136 port { 144 137 lcd_in: endpoint { 145 138 remote-endpoint = <&dpi_out>; 146 139 }; 147 - }; 148 - 149 - panel-timing { 150 - clock-frequency = <9000000>; 151 - hactive = <480>; 152 - vactive = <272>; 153 - hfront-porch = <3>; 154 - hback-porch = <2>; 155 - hsync-len = <42>; 156 - vback-porch = <3>; 157 - vfront-porch = <4>; 158 - vsync-len = <11>; 159 - hsync-active = <0>; 160 - vsync-active = <0>; 161 - de-active = <1>; 162 - pixelclk-active = <1>; 163 140 }; 164 141 }; 165 142
+1
arch/arm/configs/omap2plus_defconfig
··· 363 363 CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=m 364 364 CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=m 365 365 CONFIG_DRM_TILCDC=m 366 + CONFIG_DRM_PANEL_SIMPLE=m 366 367 CONFIG_FB=y 367 368 CONFIG_FIRMWARE_EDID=y 368 369 CONFIG_FB_MODE_HELPERS=y
+2 -2
arch/arm/mach-omap2/pdata-quirks.c
··· 491 491 struct clk *fck, struct clk *ick, 492 492 struct ti_sysc_cookie *cookie) 493 493 { 494 - if (fck) 494 + if (!IS_ERR(fck)) 495 495 cookie->clkdm = ti_sysc_find_one_clockdomain(fck); 496 496 if (cookie->clkdm) 497 497 return 0; 498 - if (ick) 498 + if (!IS_ERR(ick)) 499 499 cookie->clkdm = ti_sysc_find_one_clockdomain(ick); 500 500 if (cookie->clkdm) 501 501 return 0;
+37 -15
drivers/bus/ti-sysc.c
··· 280 280 281 281 ddata->clocks[index] = devm_clk_get(ddata->dev, name); 282 282 if (IS_ERR(ddata->clocks[index])) { 283 - if (PTR_ERR(ddata->clocks[index]) == -ENOENT) 284 - return 0; 285 - 286 283 dev_err(ddata->dev, "clock get error for %s: %li\n", 287 284 name, PTR_ERR(ddata->clocks[index])); 288 285 ··· 354 357 continue; 355 358 356 359 error = sysc_get_one_clock(ddata, name); 357 - if (error && error != -ENOENT) 360 + if (error) 358 361 return error; 359 362 } 360 363 ··· 1627 1630 if (error) 1628 1631 return error; 1629 1632 1630 - if (manage_clocks) { 1631 - sysc_clkdm_deny_idle(ddata); 1633 + sysc_clkdm_deny_idle(ddata); 1632 1634 1633 - error = sysc_enable_opt_clocks(ddata); 1634 - if (error) 1635 - return error; 1635 + /* 1636 + * Always enable clocks. The bootloader may or may not have enabled 1637 + * the related clocks. 1638 + */ 1639 + error = sysc_enable_opt_clocks(ddata); 1640 + if (error) 1641 + return error; 1636 1642 1637 - error = sysc_enable_main_clocks(ddata); 1638 - if (error) 1639 - goto err_opt_clocks; 1640 - } 1643 + error = sysc_enable_main_clocks(ddata); 1644 + if (error) 1645 + goto err_opt_clocks; 1641 1646 1642 1647 if (!(ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)) { 1643 1648 error = sysc_rstctrl_reset_deassert(ddata, true); ··· 1657 1658 goto err_main_clocks; 1658 1659 } 1659 1660 1660 - if (!ddata->legacy_mode && manage_clocks) { 1661 + if (!ddata->legacy_mode) { 1661 1662 error = sysc_enable_module(ddata->dev); 1662 1663 if (error) 1663 1664 goto err_main_clocks; ··· 1674 1675 if (manage_clocks) 1675 1676 sysc_disable_main_clocks(ddata); 1676 1677 err_opt_clocks: 1678 + /* No re-enable of clockdomain autoidle to prevent module autoidle */ 1677 1679 if (manage_clocks) { 1678 1680 sysc_disable_opt_clocks(ddata); 1679 1681 sysc_clkdm_allow_idle(ddata); ··· 2355 2355 2356 2356 ddata = container_of(work, struct sysc, idle_work.work); 2357 2357 2358 + /* 2359 + * One time decrement of clock usage counts if left on from init. 2360 + * Note that we disable opt clocks unconditionally in this case 2361 + * as they are enabled unconditionally during init without 2362 + * considering sysc_opt_clks_needed() at that point. 2363 + */ 2364 + if (ddata->cfg.quirks & (SYSC_QUIRK_NO_IDLE | 2365 + SYSC_QUIRK_NO_IDLE_ON_INIT)) { 2366 + sysc_disable_main_clocks(ddata); 2367 + sysc_disable_opt_clocks(ddata); 2368 + sysc_clkdm_allow_idle(ddata); 2369 + } 2370 + 2371 + /* Keep permanent PM runtime usage count for SYSC_QUIRK_NO_IDLE */ 2372 + if (ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE) 2373 + return; 2374 + 2375 + /* 2376 + * Decrement PM runtime usage count for SYSC_QUIRK_NO_IDLE_ON_INIT 2377 + * and SYSC_QUIRK_NO_RESET_ON_INIT 2378 + */ 2358 2379 if (pm_runtime_active(ddata->dev)) 2359 2380 pm_runtime_put_sync(ddata->dev); 2360 2381 } ··· 2460 2439 INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle); 2461 2440 2462 2441 /* At least earlycon won't survive without deferred idle */ 2463 - if (ddata->cfg.quirks & (SYSC_QUIRK_NO_IDLE_ON_INIT | 2442 + if (ddata->cfg.quirks & (SYSC_QUIRK_NO_IDLE | 2443 + SYSC_QUIRK_NO_IDLE_ON_INIT | 2464 2444 SYSC_QUIRK_NO_RESET_ON_INIT)) { 2465 2445 schedule_delayed_work(&ddata->idle_work, 3000); 2466 2446 } else {