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
Unified · Split
| @@ -124,10 +124,11 @@ · 123 unmodified lines | ||
| 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,22 +137,6 @@ · 2 unmodified lines | ||
| 136 | 137 | remote-endpoint = <&dpi_out>; |
| 137 | 138 | }; |
| 138 | 139 | }; |
| 139 | − | |
| 140 | − panel-timing { | |
| 141 | − clock-frequency = <9000000>; | |
| 142 | − hactive = <480>; | |
| 143 | − vactive = <272>; | |
| 144 | − hfront-porch = <3>; | |
| 145 | − hback-porch = <2>; | |
| 146 | − hsync-len = <42>; | |
| 147 | − vback-porch = <3>; | |
| 148 | − vfront-porch = <4>; | |
| 149 | − vsync-len = <11>; | |
| 150 | − hsync-active = <0>; | |
| 151 | − vsync-active = <0>; | |
| 152 | − de-active = <1>; | |
| 153 | − pixelclk-active = <1>; | |
| 154 | − }; | |
| 155 | 140 | }; |
| 156 | 141 | |
| 157 | 142 | bl: backlight { |
| @@ -228,6 +228,20 @@ · 227 unmodified lines | ||
| 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 */ |
| @@ -249,18 +263,6 @@ · 15 unmodified lines | ||
| 249 | 263 | OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ |
| 250 | 264 | >; |
| 251 | 265 | }; |
| 252 | − i2c2_pins: pinmux_i2c2_pins { | |
| 253 | − pinctrl-single,pins = < | |
| 254 | − OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0) /* i2c2_scl */ | |
| 255 | − OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0) /* i2c2_sda */ | |
| 256 | − >; | |
| 257 | − }; | |
| 258 | − i2c3_pins: pinmux_i2c3_pins { | |
| 259 | − pinctrl-single,pins = < | |
| 260 | − OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0) /* i2c3_scl */ | |
| 261 | − OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0) /* i2c3_sda */ | |
| 262 | − >; | |
| 263 | − }; | |
| 264 | 266 | }; |
| 265 | 267 | |
| 266 | 268 | &omap3_pmx_core2 { |
| @@ -108,7 +108,6 @@ · 107 unmodified lines | ||
| 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 { |
| @@ -124,44 +123,20 @@ · 9 unmodified lines | ||
| 124 | 123 | display0 = &lcd0; |
| 125 | 124 | }; |
| 126 | 125 | |
| 127 | − video_reg: video_reg { | |
| 128 | − pinctrl-names = "default"; | |
| 129 | − pinctrl-0 = <&panel_pwr_pins>; | |
| 130 | − compatible = "regulator-fixed"; | |
| 131 | − regulator-name = "fixed-supply"; | |
| 132 | − regulator-min-microvolt = <3300000>; | |
| 133 | − regulator-max-microvolt = <3300000>; | |
| 134 | − gpio = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd INI */ | |
| 135 | − }; | |
| 136 | − | |
| 137 | 126 | lcd0: display { |
| 138 | − 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"; | |
| 139 | 130 | label = "15"; |
| 140 | − status = "okay"; | |
| 141 | − /* default-on; */ | |
| 142 | 131 | pinctrl-names = "default"; |
| 143 | − | |
| 132 | + pinctrl-0 = <&panel_pwr_pins>; | |
| 133 | + backlight = <&bl>; | |
| 134 | + enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; | |
| 144 | 135 | port { |
| 145 | 136 | lcd_in: endpoint { |
| 146 | 137 | remote-endpoint = <&dpi_out>; |
| 147 | 138 | }; |
| 148 | 139 | }; |
| 149 | − | |
| 150 | − panel-timing { | |
| 151 | − clock-frequency = <9000000>; | |
| 152 | − hactive = <480>; | |
| 153 | − vactive = <272>; | |
| 154 | − hfront-porch = <3>; | |
| 155 | − hback-porch = <2>; | |
| 156 | − hsync-len = <42>; | |
| 157 | − vback-porch = <3>; | |
| 158 | − vfront-porch = <4>; | |
| 159 | − vsync-len = <11>; | |
| 160 | − hsync-active = <0>; | |
| 161 | − vsync-active = <0>; | |
| 162 | − de-active = <1>; | |
| 163 | − pixelclk-active = <1>; | |
| 164 | − }; | |
| 165 | 140 | }; |
| 166 | 141 | |
| 167 | 142 | bl: backlight { |
| @@ -363,6 +363,7 @@ CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=m · 362 unmodified lines | ||
| 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 |
| @@ -491,11 +491,11 @@ static int ti_sysc_clkdm_init(struct device *dev, · 490 unmodified lines | ||
| 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; |
| @@ -280,9 +280,6 @@ static int sysc_get_one_clock(struct sysc *ddata, const char *name) · 279 unmodified lines | ||
| 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 | |
| @@ -357,7 +354,7 @@ static int sysc_get_clocks(struct sysc *ddata) · 68 unmodified lines | ||
| 357 | 354 | continue; |
| 358 | 355 | |
| 359 | 356 | error = sysc_get_one_clock(ddata, name); |
| 360 | − if (error && error != -ENOENT) | |
| 357 | + if (error) | |
| 361 | 358 | return error; |
| 362 | 359 | } |
| 363 | 360 | |
| @@ -1630,17 +1627,19 @@ static int sysc_init_module(struct sysc *ddata) · 1266 unmodified lines | ||
| 1630 | 1627 | if (error) |
| 1631 | 1628 | return error; |
| 1632 | 1629 | |
| 1633 | − if (manage_clocks) { | |
| 1634 | − sysc_clkdm_deny_idle(ddata); | |
| 1630 | + sysc_clkdm_deny_idle(ddata); | |
| 1635 | 1631 | |
| 1636 | − error = sysc_enable_opt_clocks(ddata); | |
| 1637 | − if (error) | |
| 1638 | − return error; | |
| 1632 | + /* | |
| 1633 | + * Always enable clocks. The bootloader may or may not have enabled | |
| 1634 | + * the related clocks. | |
| 1635 | + */ | |
| 1636 | + error = sysc_enable_opt_clocks(ddata); | |
| 1637 | + if (error) | |
| 1638 | + return error; | |
| 1639 | 1639 | |
| 1640 | − error = sysc_enable_main_clocks(ddata); | |
| 1641 | − if (error) | |
| 1642 | − goto err_opt_clocks; | |
| 1643 | − } | |
| 1640 | + error = sysc_enable_main_clocks(ddata); | |
| 1641 | + if (error) | |
| 1642 | + goto err_opt_clocks; | |
| 1644 | 1643 | |
| 1645 | 1644 | if (!(ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)) { |
| 1646 | 1645 | error = sysc_rstctrl_reset_deassert(ddata, true); |
| @@ -1658,7 +1657,7 @@ static int sysc_init_module(struct sysc *ddata) · 11 unmodified lines | ||
| 1658 | 1657 | goto err_main_clocks; |
| 1659 | 1658 | } |
| 1660 | 1659 | |
| 1661 | − if (!ddata->legacy_mode && manage_clocks) { | |
| 1660 | + if (!ddata->legacy_mode) { | |
| 1662 | 1661 | error = sysc_enable_module(ddata->dev); |
| 1663 | 1662 | if (error) |
| 1664 | 1663 | goto err_main_clocks; |
| @@ -1675,6 +1674,7 @@ err_main_clocks: · 10 unmodified lines | ||
| 1675 | 1674 | if (manage_clocks) |
| 1676 | 1675 | sysc_disable_main_clocks(ddata); |
| 1677 | 1676 | err_opt_clocks: |
| 1677 | + /* No re-enable of clockdomain autoidle to prevent module autoidle */ | |
| 1678 | 1678 | if (manage_clocks) { |
| 1679 | 1679 | sysc_disable_opt_clocks(ddata); |
| 1680 | 1680 | sysc_clkdm_allow_idle(ddata); |
| @@ -2355,6 +2355,27 @@ static void ti_sysc_idle(struct work_struct *work) · 674 unmodified lines | ||
| 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 | } |
| @@ -2439,7 +2460,8 @@ static int sysc_probe(struct platform_device *pdev) · 78 unmodified lines | ||
| 2439 | 2460 | INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle); |
| 2440 | 2461 | |
| 2441 | 2462 | /* At least earlycon won't survive without deferred idle */ |
| 2442 | − if (ddata->cfg.quirks & (SYSC_QUIRK_NO_IDLE_ON_INIT | | |
| 2463 | + if (ddata->cfg.quirks & (SYSC_QUIRK_NO_IDLE | | |
| 2464 | + SYSC_QUIRK_NO_IDLE_ON_INIT | | |
| 2443 | 2465 | SYSC_QUIRK_NO_RESET_ON_INIT)) { |
| 2444 | 2466 | schedule_delayed_work(&ddata->idle_work, 3000); |
| 2445 | 2467 | } else { |