Commit f7db192b authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm-omap-fixes-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM OMAP fixes from Arnd Bergmann:
 "The OMAP developers are particularly active at hunting down
  regressions, so this is a separate branch with OMAP specific
  fixes for v5.8:

  As Tony explains
    "The recent display subsystem (DSS) related platform data changes
     caused display related regressions for suspend and resume. Looks
     like I only tested suspend and resume before dropping the legacy
     platform data, and forgot to test it after dropping it. Turns out
     the main issue was that we no longer have platform code calling
     pm_runtime_suspend for DSS like we did for the legacy platform data
     case, and that fix is still being discussed on the dri-devel list
     and will get merged separately. The DSS related testing exposed a
     pile other other display related issues that also need fixing
     though":

   - Fix ti-sysc optional clock handling and reset status checks for
     devices that reset automatically in idle like DSS

   - Ignore ti-sysc clockactivity bit unless separately requested to
     avoid unexpected performance issues

   - Init ti-sysc framedonetv_irq to true and disable for am4

   - Avoid duplicate DSS reset for legacy mode with dts data

   - Remove LCD timings for am4 as they cause warnings now that we're
     using generic panels

  Other OMAP changes from Tony include:

   - Fix omap_prm reset deassert as we still have drivers setting the
     pm_runtime_irq_safe() flag

   - Flush posted write for ti-sysc enable and disable

   - Fix droid4 spi related errors with spi flags

   - Fix am335x USB range and a typo for softreset

   - Fix dra7 timer nodes for clocks for IPU and DSP

   - Drop duplicate mailboxes after mismerge for dra7

   - Prevent pocketgeagle header line signal from accidentally setting
     micro-SD write protection signal by removing the default mux

   - Fix NFSroot flakeyness after resume for duover by switching the
     smsc911x gpio interrupt to back to level sensitive

   - Fix regression for omap4 clockevent source after recent system
     timer changes

   - Yet another ethernet regression fix for the "rgmii" vs "rgmii-rxid"
     phy-mode

   - One patch to convert am3/am4 DT files to use the regular sdhci-omap
     driver instead of the old hsmmc driver, this was meant for the
     merge window but got lost in the process"

* tag 'arm-omap-fixes-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (21 commits)
  ARM: dts: am5729: beaglebone-ai: fix rgmii phy-mode
  ARM: dts: Fix omap4 system timer source clocks
  ARM: dts: Fix duovero smsc interrupt for suspend
  ARM: dts: am335x-pocketbeagle: Fix mmc0 Write Protect
  Revert "bus: ti-sysc: Increase max softreset wait"
  ARM: dts: am437x-epos-evm: remove lcd timings
  ARM: dts: am437x-gp-evm: remove lcd timings
  ARM: dts: am437x-sk-evm: remove lcd timings
  ARM: dts: dra7-evm-common: Fix duplicate mailbox nodes
  ARM: dts: dra7: Fix timer nodes properly for timer_sys_ck clocks
  ARM: dts: Fix am33xx.dtsi ti,sysc-mask wrong softreset flag
  ARM: dts: Fix am33xx.dtsi USB ranges length
  bus: ti-sysc: Increase max softreset wait
  ARM: OMAP2+: Fix legacy mode dss_reset
  bus: ti-sysc: Fix uninitialized framedonetv_irq
  bus: ti-sysc: Ignore clockactivity unless specified as a quirk
  bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit
  ARM: dts: omap4-droid4: Fix spi configuration and increase rate
  bus: ti-sysc: Flush posted write on enable and disable
  soc: ti: omap-prm: use atomic iopoll instead of sleeping one
  ...
parents e44b59cd d528945d
...@@ -369,7 +369,7 @@ &mmc1 { ...@@ -369,7 +369,7 @@ &mmc1 {
&mmc2 { &mmc2 {
status = "okay"; status = "okay";
vmmc-supply = <&wl12xx_vmmc>; vmmc-supply = <&wl12xx_vmmc>;
ti,non-removable; non-removable;
bus-width = <4>; bus-width = <4>;
cap-power-off-card; cap-power-off-card;
pinctrl-names = "default"; pinctrl-names = "default";
......
...@@ -22,6 +22,7 @@ &mmc2 { ...@@ -22,6 +22,7 @@ &mmc2 {
pinctrl-0 = <&emmc_pins>; pinctrl-0 = <&emmc_pins>;
bus-width = <8>; bus-width = <8>;
status = "okay"; status = "okay";
non-removable;
}; };
&am33xx_pinmux { &am33xx_pinmux {
......
...@@ -75,7 +75,6 @@ &mmc3 { ...@@ -75,7 +75,6 @@ &mmc3 {
bus-width = <4>; bus-width = <4>;
non-removable; non-removable;
cap-power-off-card; cap-power-off-card;
ti,needs-special-hs-handling;
keep-power-in-suspend; keep-power-in-suspend;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins &wl18xx_pins>; pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
......
...@@ -367,7 +367,6 @@ &mmc3 { ...@@ -367,7 +367,6 @@ &mmc3 {
bus-width = <4>; bus-width = <4>;
non-removable; non-removable;
cap-power-off-card; cap-power-off-card;
ti,needs-special-hs-handling;
keep-power-in-suspend; keep-power-in-suspend;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins &wl18xx_pins>; pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
......
...@@ -75,7 +75,6 @@ &mmc3 { ...@@ -75,7 +75,6 @@ &mmc3 {
bus-width = <4>; bus-width = <4>;
non-removable; non-removable;
cap-power-off-card; cap-power-off-card;
ti,needs-special-hs-handling;
keep-power-in-suspend; keep-power-in-suspend;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins &wl18xx_pins>; pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
......
...@@ -743,8 +743,7 @@ xbar-event-map element */ ...@@ -743,8 +743,7 @@ xbar-event-map element */
bus-width = <4>; bus-width = <4>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins &wlan_pins>; pinctrl-0 = <&mmc3_pins &wlan_pins>;
ti,non-removable; non-removable;
ti,needs-special-hs-handling;
cap-power-off-card; cap-power-off-card;
keep-power-in-suspend; keep-power-in-suspend;
......
...@@ -655,7 +655,7 @@ &gpio0 { ...@@ -655,7 +655,7 @@ &gpio0 {
&mmc2 { &mmc2 {
status = "okay"; status = "okay";
vmmc-supply = <&wl12xx_vmmc>; vmmc-supply = <&wl12xx_vmmc>;
ti,non-removable; non-removable;
bus-width = <4>; bus-width = <4>;
cap-power-off-card; cap-power-off-card;
keep-power-in-suspend; keep-power-in-suspend;
......
...@@ -339,7 +339,7 @@ &mmc2 { ...@@ -339,7 +339,7 @@ &mmc2 {
pinctrl-0 = <&emmc_pins>; pinctrl-0 = <&emmc_pins>;
vmmc-supply = <&vmmcsd_fixed>; vmmc-supply = <&vmmcsd_fixed>;
bus-width = <8>; bus-width = <8>;
ti,non-removable; non-removable;
status = "okay"; status = "okay";
}; };
...@@ -159,7 +159,7 @@ &mmc2 { ...@@ -159,7 +159,7 @@ &mmc2 {
vmmc-supply = <&vmmcsd_fixed>; vmmc-supply = <&vmmcsd_fixed>;
bus-width = <8>; bus-width = <8>;
pinctrl-0 = <&mmc1_pins_default>; pinctrl-0 = <&mmc1_pins_default>;
ti,non-removable; non-removable;
status = "okay"; status = "okay";
}; };
......
...@@ -451,7 +451,7 @@ &mmc3 { ...@@ -451,7 +451,7 @@ &mmc3 {
vmmc-supply = <&vmmcsd_fixed>; vmmc-supply = <&vmmcsd_fixed>;
bus-width = <8>; bus-width = <8>;
pinctrl-0 = <&mmc2_pins_default>; pinctrl-0 = <&mmc2_pins_default>;
ti,non-removable; non-removable;
status = "okay"; status = "okay";
}; };
......
...@@ -341,7 +341,7 @@ &mmc2 { ...@@ -341,7 +341,7 @@ &mmc2 {
pinctrl-0 = <&emmc_pins>; pinctrl-0 = <&emmc_pins>;
vmmc-supply = <&ldo3_reg>; vmmc-supply = <&ldo3_reg>;
bus-width = <8>; bus-width = <8>;
ti,non-removable; non-removable;
}; };
&mmc3 { &mmc3 {
...@@ -351,7 +351,7 @@ &mmc3 { ...@@ -351,7 +351,7 @@ &mmc3 {
pinctrl-0 = <&wireless_pins>; pinctrl-0 = <&wireless_pins>;
vmmmc-supply = <&v3v3c_reg>; vmmmc-supply = <&v3v3c_reg>;
bus-width = <4>; bus-width = <4>;
ti,non-removable; non-removable;
dmas = <&edma_xbar 12 0 1 dmas = <&edma_xbar 12 0 1
&edma_xbar 13 0 2>; &edma_xbar 13 0 2>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
......
...@@ -69,7 +69,7 @@ &mmc2 { ...@@ -69,7 +69,7 @@ &mmc2 {
pinctrl-0 = <&emmc_pins>; pinctrl-0 = <&emmc_pins>;
vmmc-supply = <&vmmc_reg>; vmmc-supply = <&vmmc_reg>;
bus-width = <8>; bus-width = <8>;
ti,non-removable; non-removable;
status = "disabled"; status = "disabled";
}; };
......
...@@ -88,7 +88,6 @@ AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0) ...@@ -88,7 +88,6 @@ AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT, MUX_MODE4) /* (B12) mcasp0_aclkr.mmc0_sdwp */
>; >;
}; };
......
...@@ -1335,10 +1335,8 @@ SYSC_OMAP2_SOFTRESET | ...@@ -1335,10 +1335,8 @@ SYSC_OMAP2_SOFTRESET |
ranges = <0x0 0x60000 0x1000>; ranges = <0x0 0x60000 0x1000>;
mmc1: mmc@0 { mmc1: mmc@0 {
compatible = "ti,omap4-hsmmc"; compatible = "ti,am335-sdhci";
ti,dual-volt;
ti,needs-special-reset; ti,needs-special-reset;
ti,needs-special-hs-handling;
dmas = <&edma_xbar 24 0 0 dmas = <&edma_xbar 24 0 0
&edma_xbar 25 0 0>; &edma_xbar 25 0 0>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
...@@ -1816,7 +1814,7 @@ SYSC_OMAP2_SOFTRESET | ...@@ -1816,7 +1814,7 @@ SYSC_OMAP2_SOFTRESET |
ranges = <0x0 0xd8000 0x1000>; ranges = <0x0 0xd8000 0x1000>;
mmc2: mmc@0 { mmc2: mmc@0 {
compatible = "ti,omap4-hsmmc"; compatible = "ti,am335-sdhci";
ti,needs-special-reset; ti,needs-special-reset;
dmas = <&edma 2 0 dmas = <&edma 2 0
&edma 3 0>; &edma 3 0>;
......
...@@ -322,10 +322,11 @@ SYSC_OMAP2_SOFTRESET | ...@@ -322,10 +322,11 @@ SYSC_OMAP2_SOFTRESET |
ranges = <0x0 0x47810000 0x1000>; ranges = <0x0 0x47810000 0x1000>;
mmc3: mmc@0 { mmc3: mmc@0 {
compatible = "ti,omap4-hsmmc"; compatible = "ti,am335-sdhci";
ti,needs-special-reset; ti,needs-special-reset;
interrupts = <29>; interrupts = <29>;
reg = <0x0 0x1000>; reg = <0x0 0x1000>;
status = "disabled";
}; };
}; };
...@@ -335,7 +336,7 @@ usb: target-module@47400000 { ...@@ -335,7 +336,7 @@ usb: target-module@47400000 {
<0x47400010 0x4>; <0x47400010 0x4>;
reg-names = "rev", "sysc"; reg-names = "rev", "sysc";
ti,sysc-mask = <(SYSC_OMAP4_FREEEMU | ti,sysc-mask = <(SYSC_OMAP4_FREEEMU |
SYSC_OMAP2_SOFTRESET)>; SYSC_OMAP4_SOFTRESET)>;
ti,sysc-midle = <SYSC_IDLE_FORCE>, ti,sysc-midle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>, <SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>; <SYSC_IDLE_SMART>;
...@@ -347,7 +348,7 @@ usb: target-module@47400000 { ...@@ -347,7 +348,7 @@ usb: target-module@47400000 {
clock-names = "fck"; clock-names = "fck";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0x0 0x47400000 0x5000>; ranges = <0x0 0x47400000 0x8000>;
usb0_phy: usb-phy@1300 { usb0_phy: usb-phy@1300 {
compatible = "ti,am335x-usb-phy"; compatible = "ti,am335x-usb-phy";
......
...@@ -316,10 +316,11 @@ SYSC_OMAP2_SOFTRESET | ...@@ -316,10 +316,11 @@ SYSC_OMAP2_SOFTRESET |
ranges = <0x0 0x47810000 0x1000>; ranges = <0x0 0x47810000 0x1000>;
mmc3: mmc@0 { mmc3: mmc@0 {
compatible = "ti,omap4-hsmmc"; compatible = "ti,am437-sdhci";
ti,needs-special-reset; ti,needs-special-reset;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0x1000>; reg = <0x0 0x1000>;
status = "disabled";
}; };
}; };
......
...@@ -291,7 +291,7 @@ &mmc2 { ...@@ -291,7 +291,7 @@ &mmc2 {
pinctrl-0 = <&emmc_pins>; pinctrl-0 = <&emmc_pins>;
vmmc-supply = <&vmmc_3v3>; vmmc-supply = <&vmmc_3v3>;
bus-width = <8>; bus-width = <8>;
ti,non-removable; non-removable;
}; };
&spi0 { &spi0 {
......
...@@ -91,22 +91,6 @@ lcd0: display { ...@@ -91,22 +91,6 @@ lcd0: display {
backlight = <&lcd_bl>; backlight = <&lcd_bl>;
panel-timing {
clock-frequency = <33000000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <210>;
hback-porch = <16>;
hsync-len = <30>;
vback-porch = <10>;
vfront-porch = <22>;
vsync-len = <13>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};
port { port {
lcd_in: endpoint { lcd_in: endpoint {
remote-endpoint = <&dpi_out>; remote-endpoint = <&dpi_out>;
...@@ -869,7 +853,7 @@ &mmc2 { ...@@ -869,7 +853,7 @@ &mmc2 {
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
pinctrl-0 = <&emmc_pins_default>; pinctrl-0 = <&emmc_pins_default>;
pinctrl-1 = <&emmc_pins_sleep>; pinctrl-1 = <&emmc_pins_sleep>;
ti,non-removable; non-removable;
}; };
&mmc3 { &mmc3 {
...@@ -886,7 +870,7 @@ xbar-event-map element */ ...@@ -886,7 +870,7 @@ xbar-event-map element */
pinctrl-1 = <&mmc3_pins_sleep>; pinctrl-1 = <&mmc3_pins_sleep>;
cap-power-off-card; cap-power-off-card;
keep-power-in-suspend; keep-power-in-suspend;
ti,non-removable; non-removable;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -1083,9 +1083,8 @@ SYSC_OMAP2_SOFTRESET | ...@@ -1083,9 +1083,8 @@ SYSC_OMAP2_SOFTRESET |
ranges = <0x0 0x60000 0x1000>; ranges = <0x0 0x60000 0x1000>;
mmc1: mmc@0 { mmc1: mmc@0 {
compatible = "ti,omap4-hsmmc"; compatible = "ti,am437-sdhci";
reg = <0x0 0x1000>; reg = <0x0 0x1000>;
ti,dual-volt;
ti,needs-special-reset; ti,needs-special-reset;
dmas = <&edma 24 0>, dmas = <&edma 24 0>,
<&edma 25 0>; <&edma 25 0>;
...@@ -1598,7 +1597,7 @@ SYSC_OMAP2_SOFTRESET | ...@@ -1598,7 +1597,7 @@ SYSC_OMAP2_SOFTRESET |
ranges = <0x0 0xd8000 0x1000>; ranges = <0x0 0xd8000 0x1000>;
mmc2: mmc@0 { mmc2: mmc@0 {
compatible = "ti,omap4-hsmmc"; compatible = "ti,am437-sdhci";
reg = <0x0 0x1000>; reg = <0x0 0x1000>;
ti,needs-special-reset; ti,needs-special-reset;
dmas = <&edma 2 0>, dmas = <&edma 2 0>,
......
...@@ -134,22 +134,6 @@ lcd0: display { ...@@ -134,22 +134,6 @@ lcd0: display {
enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
panel-timing {
clock-frequency = <9000000>;
hactive = <480>;
vactive = <272>;
hfront-porch = <2>;
hback-porch = <2>;
hsync-len = <41>;
vfront-porch = <2>;
vback-porch = <2>;
vsync-len = <10>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};
port { port {
lcd_in: endpoint { lcd_in: endpoint {
remote-endpoint = <&dpi_out>; remote-endpoint = <&dpi_out>;
...@@ -719,7 +703,7 @@ &mmc3 { ...@@ -719,7 +703,7 @@ &mmc3 {
pinctrl-1 = <&mmc3_pins_sleep>; pinctrl-1 = <&mmc3_pins_sleep>;
cap-power-off-card; cap-power-off-card;
keep-power-in-suspend; keep-power-in-suspend;
ti,non-removable; non-removable;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -47,22 +47,6 @@ lcd0: display { ...@@ -47,22 +47,6 @@ lcd0: display {
backlight = <&lcd_bl>; backlight = <&lcd_bl>;
panel-timing {
clock-frequency = <33000000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <210>;
hback-porch = <16>;
hsync-len = <30>;
vback-porch = <10>;
vfront-porch = <22>;
vsync-len = <13>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};
port { port {
lcd_in: endpoint { lcd_in: endpoint {
remote-endpoint = <&dpi_out>; remote-endpoint = <&dpi_out>;
......
...@@ -505,7 +505,7 @@ &mac { ...@@ -505,7 +505,7 @@ &mac {
&cpsw_emac0 { &cpsw_emac0 {
phy-handle = <&phy0>; phy-handle = <&phy0>;
phy-mode = "rgmii"; phy-mode = "rgmii-rxid";
}; };
&ocp { &ocp {
......
...@@ -245,26 +245,6 @@ &mcasp3 { ...@@ -245,26 +245,6 @@ &mcasp3 {
rx-num-evt = <32>; rx-num-evt = <32>;
}; };
&mailbox5 {
status = "okay";
mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
status = "okay";
};
mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
status = "okay";
};
};
&mailbox6 {
status = "okay";
mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
status = "okay";
};
mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
status = "okay";
};
};
&pcie1_rc { &pcie1_rc {
status = "okay"; status = "okay";
}; };
......
...@@ -1207,9 +1207,8 @@ target-module@36000 { /* 0x48036000, ap 9 4e.0 */ ...@@ -1207,9 +1207,8 @@ target-module@36000 { /* 0x48036000, ap 9 4e.0 */
<SYSC_IDLE_SMART>, <SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>; <SYSC_IDLE_SMART_WKUP>;
/* Domains (P, C): l4per_pwrdm, l4per_clkdm */ /* Domains (P, C): l4per_pwrdm, l4per_clkdm */
clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 0>, clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 0>;
<&timer_sys_clk_div>; clock-names = "fck";
clock-names = "fck", "timer_sys_ck";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0x0 0x36000 0x1000>; ranges = <0x0 0x36000 0x1000>;
...@@ -3352,8 +3351,8 @@ target-module@20000 { /* 0x48820000, ap 5 08.0 */ ...@@ -3352,8 +3351,8 @@ target-module@20000 { /* 0x48820000, ap 5 08.0 */
<SYSC_IDLE_SMART>, <SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>; <SYSC_IDLE_SMART_WKUP>;
/* Domains (P, C): ipu_pwrdm, ipu_clkdm */ /* Domains (P, C): ipu_pwrdm, ipu_clkdm */
clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 0>, <&timer_sys_clk_div>; clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 0>;
clock-names = "fck", "timer_sys_ck"; clock-names = "fck";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0x0 0x20000 0x1000>; ranges = <0x0 0x20000 0x1000>;
...@@ -3361,8 +3360,8 @@ target-module@20000 { /* 0x48820000, ap 5 08.0 */ ...@@ -3361,8 +3360,8 @@ target-module@20000 { /* 0x48820000, ap 5 08.0 */
timer5: timer@0 { timer5: timer@0 {
compatible = "ti,omap5430-timer"; compatible = "ti,omap5430-timer";
reg = <0x0 0x80>; reg = <0x0 0x80>;
clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 24>; clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 24>, <&timer_sys_clk_div>;
clock-names = "fck"; clock-names = "fck", "timer_sys_ck";
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
}; };
}; };
...@@ -3379,9 +3378,8 @@ target-module@22000 { /* 0x48822000, ap 7 24.0 */ ...@@ -3379,9 +3378,8 @@ target-module@22000 { /* 0x48822000, ap 7 24.0 */
<SYSC_IDLE_SMART>, <SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>; <SYSC_IDLE_SMART_WKUP>;
/* Domains (P, C): ipu_pwrdm, ipu_clkdm */ /* Domains (P, C): ipu_pwrdm, ipu_clkdm */
clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 0>, clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 0>;
<&timer_sys_clk_div>; clock-names = "fck";
clock-names = "fck", "timer_sys_ck";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0x0 0x22000 0x1000>; ranges = <0x0 0x22000 0x1000>;
...@@ -3389,8 +3387,8 @@ target-module@22000 { /* 0x48822000, ap 7 24.0 */ ...@@ -3389,8 +3387,8 @@ target-module@22000 { /* 0x48822000, ap 7 24.0 */
timer6: timer@0 { timer6: timer@0 {
compatible = "ti,omap5430-timer"; compatible = "ti,omap5430-timer";
reg = <0x0 0x80>; reg = <0x0 0x80>;
clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 24>; clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 24>, <&timer_sys_clk_div>;
clock-names = "fck"; clock-names = "fck", "timer_sys_ck";
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
}; };
}; };
...@@ -3498,8 +3496,8 @@ target-module@2a000 { /* 0x4882a000, ap 15 10.0 */ ...@@ -3498,8 +3496,8 @@ target-module@2a000 { /* 0x4882a000, ap 15 10.0 */
timer14: timer@0 { timer14: timer@0 {
compatible = "ti,omap5430-timer"; compatible = "ti,omap5430-timer";
reg = <0x0 0x80>; reg = <0x0 0x80>;
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER14_CLKCTRL 24>; clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER14_CLKCTRL 24>, <&timer_sys_clk_div>;
clock-names = "fck"; clock-names = "fck", "timer_sys_ck";
interrupts = <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>;
ti,timer-pwm; ti,timer-pwm;
}; };
...@@ -3526,8 +3524,8 @@ target-module@2c000 { /* 0x4882c000, ap 17 02.0 */ ...@@ -3526,8 +3524,8 @@ target-module@2c000 { /* 0x4882c000, ap 17 02.0 */
timer15: timer@0 { timer15: timer@0 {
compatible = "ti,omap5430-timer"; compatible = "ti,omap5430-timer";
reg = <0x0 0x80>; reg = <0x0 0x80>;
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER15_CLKCTRL 24>; clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER15_CLKCTRL 24>, <&timer_sys_clk_div>;
clock-names = "fck"; clock-names = "fck", "timer_sys_ck";
interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>;
ti,timer-pwm; ti,timer-pwm;
}; };
...@@ -3554,8 +3552,8 @@ target-module@2e000 { /* 0x4882e000, ap 19 14.0 */ ...@@ -3554,8 +3552,8 @@ target-module@2e000 { /* 0x4882e000, ap 19 14.0 */
timer16: timer@0 { timer16: timer@0 {
compatible = "ti,omap5430-timer"; compatible = "ti,omap5430-timer";
reg = <0x0 0x80>; reg = <0x0 0x80>;
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER16_CLKCTRL 24>; clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER16_CLKCTRL 24>, <&timer_sys_clk_div>;
clock-names = "fck"; clock-names = "fck", "timer_sys_ck";
interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>;
ti,timer-pwm; ti,timer-pwm;
}; };
......
...@@ -13,8 +13,10 @@ cpcap: pmic@0 { ...@@ -13,8 +13,10 @@ cpcap: pmic@0 {
#interrupt-cells = <2>; #interrupt-cells = <2>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
spi-max-frequency = <3000000>; spi-max-frequency = <9600000>;
spi-cs-high; spi-cs-high;
spi-cpol;
spi-cpha;
cpcap_adc: adc { cpcap_adc: adc {
compatible = "motorola,mapphone-cpcap-adc"; compatible = "motorola,mapphone-cpcap-adc";
......
...@@ -139,7 +139,7 @@ &gpmc { ...@@ -139,7 +139,7 @@ &gpmc {
ethernet@gpmc { ethernet@gpmc {
reg = <5 0 0xff>; reg = <5 0 0xff>;
interrupt-parent = <&gpio2>; interrupt-parent = <&gpio2>;
interrupts = <12 IRQ_TYPE_EDGE_FALLING>; /* gpio_44 */ interrupts = <12 IRQ_TYPE_LEVEL_LOW>; /* gpio_44 */
phy-mode = "mii"; phy-mode = "mii";
......
...@@ -662,6 +662,6 @@ &timer1_target { ...@@ -662,6 +662,6 @@ &timer1_target {
ti,no-idle; ti,no-idle;
timer@0 { timer@0 {
assigned-clocks = <&l4_wkup_clkctrl OMAP4_TIMER1_CLKCTRL 24>; assigned-clocks = <&l4_wkup_clkctrl OMAP4_TIMER1_CLKCTRL 24>;
assigned-clock-parents = <&sys_clkin_ck>; assigned-clock-parents = <&sys_32k_ck>;
}; };
}; };
...@@ -3489,7 +3489,7 @@ static const struct omap_hwmod_reset dra7_reset_quirks[] = { ...@@ -3489,7 +3489,7 @@ static const struct omap_hwmod_reset dra7_reset_quirks[] = {
}; };
static const struct omap_hwmod_reset omap_reset_quirks[] = { static const struct omap_hwmod_reset omap_reset_quirks[] = {
{ .match = "dss", .len = 3, .reset = omap_dss_reset, }, { .match = "dss_core", .len = 8, .reset = omap_dss_reset, },
{ .match = "hdq1w", .len = 5, .reset = omap_hdq1w_reset, }, { .match = "hdq1w", .len = 5, .reset = omap_hdq1w_reset, },
{ .match = "i2c", .len = 3, .reset = omap_i2c_reset, }, { .match = "i2c", .len = 3, .reset = omap_i2c_reset, },
{ .match = "wd_timer", .len = 8, .reset = omap2_wd_timer_reset, }, { .match = "wd_timer", .len = 8, .reset = omap2_wd_timer_reset, },
......
...@@ -221,6 +221,35 @@ static u32 sysc_read_sysstatus(struct sysc *ddata) ...@@ -221,6 +221,35 @@ static u32 sysc_read_sysstatus(struct sysc *ddata)
return sysc_read(ddata, offset); return sysc_read(ddata, offset);
} }
/* Poll on reset status */
static int sysc_wait_softreset(struct sysc *ddata)
{
u32 sysc_mask, syss_done, rstval;
int syss_offset, error = 0;
syss_offset = ddata->offsets[SYSC_SYSSTATUS];
sysc_mask = BIT(ddata->cap->regbits->srst_shift);
if (ddata->cfg.quirks & SYSS_QUIRK_RESETDONE_INVERTED)
syss_done = 0;
else
syss_done = ddata->cfg.syss_mask;
if (syss_offset >= 0) {
error = readx_poll_timeout(sysc_read_sysstatus, ddata, rstval,
(rstval & ddata->cfg.syss_mask) ==
syss_done,
100, MAX_MODULE_SOFTRESET_WAIT);
} else if (ddata->cfg.quirks & SYSC_QUIRK_RESET_STATUS) {
error = readx_poll_timeout(sysc_read_sysconfig, ddata, rstval,
!(rstval & sysc_mask),
100, MAX_MODULE_SOFTRESET_WAIT);
}
return error;
}
static int sysc_add_named_clock_from_child(struct sysc *ddata, static int sysc_add_named_clock_from_child(struct sysc *ddata,
const char *name, const char *name,
const char *optfck_name) const char *optfck_name)
...@@ -925,18 +954,47 @@ static int sysc_enable_module(struct device *dev) ...@@ -925,18 +954,47 @@ static int sysc_enable_module(struct device *dev)
struct sysc *ddata; struct sysc *ddata;
const struct sysc_regbits *regbits; const struct sysc_regbits *regbits;
u32 reg, idlemodes, best_mode; u32 reg, idlemodes, best_mode;
int error;
ddata = dev_get_drvdata(dev); ddata = dev_get_drvdata(dev);
/*
* Some modules like DSS reset automatically on idle. Enable optional
* reset clocks and wait for OCP softreset to complete.
*/
if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET) {
error = sysc_enable_opt_clocks(ddata);
if (error) {
dev_err(ddata->dev,
"Optional clocks failed for enable: %i\n",
error);
return error;
}
}
error = sysc_wait_softreset(ddata);
if (error)
dev_warn(ddata->dev, "OCP softreset timed out\n");
if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
sysc_disable_opt_clocks(ddata);
/*
* Some subsystem private interconnects, like DSS top level module,
* need only the automatic OCP softreset handling with no sysconfig
* register bits to configure.
*/
if (ddata->offsets[SYSC_SYSCONFIG] == -ENODEV) if (ddata->offsets[SYSC_SYSCONFIG] == -ENODEV)
return 0; return 0;
regbits = ddata->cap->regbits; regbits = ddata->cap->regbits;
reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]); reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
/* Set CLOCKACTIVITY, we only use it for ick */ /*
* Set CLOCKACTIVITY, we only use it for ick. And we only configure it
* based on the SYSC_QUIRK_USE_CLOCKACT flag, not based on the hardware
* capabilities. See the old HWMOD_SET_DEFAULT_CLOCKACT flag.
*/
if (regbits->clkact_shift >= 0 && if (regbits->clkact_shift >= 0 &&
(ddata->cfg.quirks & SYSC_QUIRK_USE_CLOCKACT || (ddata->cfg.quirks & SYSC_QUIRK_USE_CLOCKACT))
ddata->cfg.sysc_val & BIT(regbits->clkact_shift)))
reg |= SYSC_CLOCACT_ICK << regbits->clkact_shift; reg |= SYSC_CLOCACT_ICK << regbits->clkact_shift;
/* Set SIDLE mode */ /* Set SIDLE mode */
...@@ -991,6 +1049,9 @@ static int sysc_enable_module(struct device *dev) ...@@ -991,6 +1049,9 @@ static int sysc_enable_module(struct device *dev)
sysc_write_sysconfig(ddata, reg); sysc_write_sysconfig(ddata, reg);
} }
/* Flush posted write */
sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
if (ddata->module_enable_quirk) if (ddata->module_enable_quirk)
ddata->module_enable_quirk(ddata); ddata->module_enable_quirk(ddata);
...@@ -1071,6 +1132,9 @@ static int sysc_disable_module(struct device *dev) ...@@ -1071,6 +1132,9 @@ static int sysc_disable_module(struct device *dev)
reg |= 1 << regbits->autoidle_shift; reg |= 1 << regbits->autoidle_shift;
sysc_write_sysconfig(ddata, reg); sysc_write_sysconfig(ddata, reg);
/* Flush posted write */
sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
return 0; return 0;
} }
...@@ -1488,7 +1552,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset, ...@@ -1488,7 +1552,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
bool lcd_en, digit_en, lcd2_en = false, lcd3_en = false; bool lcd_en, digit_en, lcd2_en = false, lcd3_en = false;
const int lcd_en_mask = BIT(0), digit_en_mask = BIT(1); const int lcd_en_mask = BIT(0), digit_en_mask = BIT(1);
int manager_count; int manager_count;
bool framedonetv_irq; bool framedonetv_irq = true;
u32 val, irq_mask = 0; u32 val, irq_mask = 0;
switch (sysc_soc->soc) { switch (sysc_soc->soc) {
...@@ -1505,6 +1569,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset, ...@@ -1505,6 +1569,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
break; break;
case SOC_AM4: case SOC_AM4:
manager_count = 1; manager_count = 1;
framedonetv_irq = false;
break; break;
case SOC_UNKNOWN: case SOC_UNKNOWN:
default: default:
...@@ -1822,11 +1887,10 @@ static int sysc_legacy_init(struct sysc *ddata) ...@@ -1822,11 +1887,10 @@ static int sysc_legacy_init(struct sysc *ddata)
*/ */
static int sysc_reset(struct sysc *ddata) static int sysc_reset(struct sysc *ddata)
{ {
int sysc_offset, syss_offset, sysc_val, rstval, error = 0; int sysc_offset, sysc_val, error;
u32 sysc_mask, syss_done; u32 sysc_mask;
sysc_offset = ddata->offsets[SYSC_SYSCONFIG]; sysc_offset = ddata->offsets[SYSC_SYSCONFIG];
syss_offset = ddata->offsets[SYSC_SYSSTATUS];
if (ddata->legacy_mode || if (ddata->legacy_mode ||
ddata->cap->regbits->srst_shift < 0 || ddata->cap->regbits->srst_shift < 0 ||
...@@ -1835,11 +1899,6 @@ static int sysc_reset(struct sysc *ddata) ...@@ -1835,11 +1899,6 @@ static int sysc_reset(struct sysc *ddata)
sysc_mask = BIT(ddata->cap->regbits->srst_shift); sysc_mask = BIT(ddata->cap->regbits->srst_shift);
if (ddata->cfg.quirks & SYSS_QUIRK_RESETDONE_INVERTED)
syss_done = 0;
else
syss_done = ddata->cfg.syss_mask;
if (ddata->pre_reset_quirk) if (ddata->pre_reset_quirk)
ddata->pre_reset_quirk(ddata); ddata->pre_reset_quirk(ddata);
...@@ -1856,18 +1915,9 @@ static int sysc_reset(struct sysc *ddata) ...@@ -1856,18 +1915,9 @@ static int sysc_reset(struct sysc *ddata)
if (ddata->post_reset_quirk) if (ddata->post_reset_quirk)
ddata->post_reset_quirk(ddata); ddata->post_reset_quirk(ddata);
/* Poll on reset status */ error = sysc_wait_softreset(ddata);
if (syss_offset >= 0) { if (error)
error = readx_poll_timeout(sysc_read_sysstatus, ddata, rstval, dev_warn(ddata->dev, "OCP softreset timed out\n");
(rstval & ddata->cfg.syss_mask) ==
syss_done,
100, MAX_MODULE_SOFTRESET_WAIT);
} else if (ddata->cfg.quirks & SYSC_QUIRK_RESET_STATUS) {
error = readx_poll_timeout(sysc_read_sysconfig, ddata, rstval,
!(rstval & sysc_mask),
100, MAX_MODULE_SOFTRESET_WAIT);
}
if (ddata->reset_done_quirk) if (ddata->reset_done_quirk)
ddata->reset_done_quirk(ddata); ddata->reset_done_quirk(ddata);
......
...@@ -256,7 +256,7 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, ...@@ -256,7 +256,7 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev,
goto exit; goto exit;
/* wait for the status to be set */ /* wait for the status to be set */
ret = readl_relaxed_poll_timeout(reset->prm->base + ret = readl_relaxed_poll_timeout_atomic(reset->prm->base +
reset->prm->data->rstst, reset->prm->data->rstst,
v, v & BIT(st_bit), 1, v, v & BIT(st_bit), 1,
OMAP_RESET_MAX_WAIT); OMAP_RESET_MAX_WAIT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment