Commit 3e899c72 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'armsoc-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "This is a larger than normal update for Arm SoC specific code, most of
  it in device trees, but also drivers and the omap and at91/sama7
  platforms:

   - There are four new entries to the MAINTAINERS file: Sven Peter and
     Alyssa Rosenzweig for Apple M1, Romain Perier for Mstar/sigmastar,
     and Vignesh Raghavendra for TI K3

   - Build fixes to address randconfig warnings in sharpsl, dove, omap1,
     and qcom platforms as well as the scmi and op-tee subsystems

   - Regression fixes for missing CONFIG_FB and other options for
     several defconfigs

   - Several bug fixes for the newly added Microchip SAMA7 platform,
     mostly regarding power management

   - Missing SMP barriers to protect accesses to SCMI virtio device

   - Regression fixes for TI OMAP, including a boot-time hang on am335x.

   - Lots of bug fixes for NXP i.MX, mostly addressing incorrect
     settings in devicetree files, and one revert for broken suspend.

   - Fixes for ARM Juno/Vexpress devicetree files, addressing a couple
     of schema warnings.

   - Regression fixes for qualcomm SoC specific drivers and devicetree
     files, reverting an mdt_loader change and at least pastially
     reverting some of the 5.15 DTS changes, plus some minor bugfixes"

* tag 'armsoc-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (64 commits)
  MAINTAINERS: Add Sven Peter as ARM/APPLE MACHINE maintainer
  MAINTAINERS: Add Alyssa Rosenzweig as M1 reviewer
  firmware: arm_scmi: Add proper barriers to scmi virtio device
  firmware: arm_scmi: Simplify spinlocks in virtio transport
  ARM: dts: omap3430-sdp: Fix NAND device node
  bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
  ARM: sharpsl_param: work around -Wstringop-overread warning
  ARM: defconfig: gemini: Restore framebuffer
  ARM: dove: mark 'putc' as inline
  ARM: omap1: move omap15xx local bus handling to usb.c
  MAINTAINERS: Add Vignesh to TI K3 platform maintainership
  arm64: dts: imx8m*-venice-gw7902: fix M2_RST# gpio
  ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence
  arm64: dts: ls1028a: fix eSDHC2 node
  arm64: dts: imx8mm-kontron-n801x-som: do not allow to switch off buck2
  ARM: dts: at91: sama7g5ek: to not touch slew-rate for SDMMC pins
  ARM: dts: at91: sama7g5ek: use proper slew-rate settings for GMACs
  ARM: at91: pm: preload base address of controllers in tlb
  ARM: at91: pm: group constants and addresses loading
  ARM: dts: at91: sama7g5ek: add suspend voltage for ddr3l rail
  ...
parents 7041503d 897c2e74
...@@ -1276,6 +1276,7 @@ F: drivers/input/mouse/bcm5974.c ...@@ -1276,6 +1276,7 @@ F: drivers/input/mouse/bcm5974.c
APPLE DART IOMMU DRIVER APPLE DART IOMMU DRIVER
M: Sven Peter <sven@svenpeter.dev> M: Sven Peter <sven@svenpeter.dev>
R: Alyssa Rosenzweig <alyssa@rosenzweig.io>
L: iommu@lists.linux-foundation.org L: iommu@lists.linux-foundation.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/iommu/apple,dart.yaml F: Documentation/devicetree/bindings/iommu/apple,dart.yaml
...@@ -1712,6 +1713,8 @@ F: drivers/*/*alpine* ...@@ -1712,6 +1713,8 @@ F: drivers/*/*alpine*
ARM/APPLE MACHINE SUPPORT ARM/APPLE MACHINE SUPPORT
M: Hector Martin <marcan@marcan.st> M: Hector Martin <marcan@marcan.st>
M: Sven Peter <sven@svenpeter.dev>
R: Alyssa Rosenzweig <alyssa@rosenzweig.io>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
W: https://asahilinux.org W: https://asahilinux.org
...@@ -2237,6 +2240,7 @@ F: arch/arm/mach-pxa/mioa701.c ...@@ -2237,6 +2240,7 @@ F: arch/arm/mach-pxa/mioa701.c
ARM/MStar/Sigmastar Armv7 SoC support ARM/MStar/Sigmastar Armv7 SoC support
M: Daniel Palmer <daniel@thingy.jp> M: Daniel Palmer <daniel@thingy.jp>
M: Romain Perier <romain.perier@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
W: http://linux-chenxing.org/ W: http://linux-chenxing.org/
...@@ -2713,6 +2717,7 @@ F: drivers/power/reset/keystone-reset.c ...@@ -2713,6 +2717,7 @@ F: drivers/power/reset/keystone-reset.c
ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE
M: Nishanth Menon <nm@ti.com> M: Nishanth Menon <nm@ti.com>
M: Vignesh Raghavendra <vigneshr@ti.com>
M: Tero Kristo <kristo@kernel.org> M: Tero Kristo <kristo@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Supported S: Supported
......
...@@ -71,7 +71,6 @@ apb { ...@@ -71,7 +71,6 @@ apb {
isc: isc@f0008000 { isc: isc@f0008000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>; pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>;
status = "okay";
}; };
qspi1: spi@f0024000 { qspi1: spi@f0024000 {
......
...@@ -196,11 +196,13 @@ vddioddr: VDD_DDR { ...@@ -196,11 +196,13 @@ vddioddr: VDD_DDR {
regulator-state-standby { regulator-state-standby {
regulator-on-in-suspend; regulator-on-in-suspend;
regulator-suspend-microvolt = <1350000>;
regulator-mode = <4>; regulator-mode = <4>;
}; };
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;
regulator-suspend-microvolt = <1350000>;
regulator-mode = <4>; regulator-mode = <4>;
}; };
}; };
...@@ -353,7 +355,10 @@ &gmac0 { ...@@ -353,7 +355,10 @@ &gmac0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gmac0_default &pinctrl_gmac0_txck_default &pinctrl_gmac0_phy_irq>; pinctrl-0 = <&pinctrl_gmac0_default
&pinctrl_gmac0_mdio_default
&pinctrl_gmac0_txck_default
&pinctrl_gmac0_phy_irq>;
phy-mode = "rgmii-id"; phy-mode = "rgmii-id";
status = "okay"; status = "okay";
...@@ -368,7 +373,9 @@ &gmac1 { ...@@ -368,7 +373,9 @@ &gmac1 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gmac1_default &pinctrl_gmac1_phy_irq>; pinctrl-0 = <&pinctrl_gmac1_default
&pinctrl_gmac1_mdio_default
&pinctrl_gmac1_phy_irq>;
phy-mode = "rmii"; phy-mode = "rmii";
status = "okay"; status = "okay";
...@@ -423,14 +430,20 @@ pinctrl_gmac0_default: gmac0_default { ...@@ -423,14 +430,20 @@ pinctrl_gmac0_default: gmac0_default {
<PIN_PA15__G0_TXEN>, <PIN_PA15__G0_TXEN>,
<PIN_PA30__G0_RXCK>, <PIN_PA30__G0_RXCK>,
<PIN_PA18__G0_RXDV>, <PIN_PA18__G0_RXDV>,
<PIN_PA22__G0_MDC>,
<PIN_PA23__G0_MDIO>,
<PIN_PA25__G0_125CK>; <PIN_PA25__G0_125CK>;
slew-rate = <0>;
bias-disable;
};
pinctrl_gmac0_mdio_default: gmac0_mdio_default {
pinmux = <PIN_PA22__G0_MDC>,
<PIN_PA23__G0_MDIO>;
bias-disable; bias-disable;
}; };
pinctrl_gmac0_txck_default: gmac0_txck_default { pinctrl_gmac0_txck_default: gmac0_txck_default {
pinmux = <PIN_PA24__G0_TXCK>; pinmux = <PIN_PA24__G0_TXCK>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
...@@ -447,8 +460,13 @@ pinctrl_gmac1_default: gmac1_default { ...@@ -447,8 +460,13 @@ pinctrl_gmac1_default: gmac1_default {
<PIN_PD25__G1_RX0>, <PIN_PD25__G1_RX0>,
<PIN_PD26__G1_RX1>, <PIN_PD26__G1_RX1>,
<PIN_PD27__G1_RXER>, <PIN_PD27__G1_RXER>,
<PIN_PD24__G1_RXDV>, <PIN_PD24__G1_RXDV>;
<PIN_PD28__G1_MDC>, slew-rate = <0>;
bias-disable;
};
pinctrl_gmac1_mdio_default: gmac1_mdio_default {
pinmux = <PIN_PD28__G1_MDC>,
<PIN_PD29__G1_MDIO>; <PIN_PD29__G1_MDIO>;
bias-disable; bias-disable;
}; };
...@@ -540,6 +558,7 @@ cmd_data { ...@@ -540,6 +558,7 @@ cmd_data {
<PIN_PA8__SDMMC0_DAT5>, <PIN_PA8__SDMMC0_DAT5>,
<PIN_PA9__SDMMC0_DAT6>, <PIN_PA9__SDMMC0_DAT6>,
<PIN_PA10__SDMMC0_DAT7>; <PIN_PA10__SDMMC0_DAT7>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
...@@ -547,6 +566,7 @@ ck_cd_rstn_vddsel { ...@@ -547,6 +566,7 @@ ck_cd_rstn_vddsel {
pinmux = <PIN_PA0__SDMMC0_CK>, pinmux = <PIN_PA0__SDMMC0_CK>,
<PIN_PA2__SDMMC0_RSTN>, <PIN_PA2__SDMMC0_RSTN>,
<PIN_PA11__SDMMC0_DS>; <PIN_PA11__SDMMC0_DS>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
}; };
...@@ -558,6 +578,7 @@ cmd_data { ...@@ -558,6 +578,7 @@ cmd_data {
<PIN_PC0__SDMMC1_DAT1>, <PIN_PC0__SDMMC1_DAT1>,
<PIN_PC1__SDMMC1_DAT2>, <PIN_PC1__SDMMC1_DAT2>,
<PIN_PC2__SDMMC1_DAT3>; <PIN_PC2__SDMMC1_DAT3>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
...@@ -566,6 +587,7 @@ ck_cd_rstn_vddsel { ...@@ -566,6 +587,7 @@ ck_cd_rstn_vddsel {
<PIN_PB28__SDMMC1_RSTN>, <PIN_PB28__SDMMC1_RSTN>,
<PIN_PC5__SDMMC1_1V8SEL>, <PIN_PC5__SDMMC1_1V8SEL>,
<PIN_PC4__SDMMC1_CD>; <PIN_PC4__SDMMC1_CD>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
}; };
...@@ -577,11 +599,13 @@ cmd_data { ...@@ -577,11 +599,13 @@ cmd_data {
<PIN_PD6__SDMMC2_DAT1>, <PIN_PD6__SDMMC2_DAT1>,
<PIN_PD7__SDMMC2_DAT2>, <PIN_PD7__SDMMC2_DAT2>,
<PIN_PD8__SDMMC2_DAT3>; <PIN_PD8__SDMMC2_DAT3>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
ck { ck {
pinmux = <PIN_PD4__SDMMC2_CK>; pinmux = <PIN_PD4__SDMMC2_CK>;
slew-rate = <0>;
bias-pull-up; bias-pull-up;
}; };
}; };
...@@ -634,6 +658,15 @@ &sdmmc2 { ...@@ -634,6 +658,15 @@ &sdmmc2 {
pinctrl-0 = <&pinctrl_sdmmc2_default>; pinctrl-0 = <&pinctrl_sdmmc2_default>;
}; };
&shdwc {
atmel,shdwc-debouncer = <976>;
status = "okay";
input@0 {
reg = <0>;
};
};
&spdifrx { &spdifrx {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spdifrx_default>; pinctrl-0 = <&pinctrl_spdifrx_default>;
......
...@@ -56,6 +56,7 @@ eth { ...@@ -56,6 +56,7 @@ eth {
panel { panel {
compatible = "edt,etm0700g0dh6"; compatible = "edt,etm0700g0dh6";
pinctrl-0 = <&pinctrl_display_gpio>; pinctrl-0 = <&pinctrl_display_gpio>;
pinctrl-names = "default";
enable-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
port { port {
...@@ -76,8 +77,7 @@ reg_usbh1_vbus: regulator-usbh1-vbus { ...@@ -76,8 +77,7 @@ reg_usbh1_vbus: regulator-usbh1-vbus {
regulator-name = "vbus"; regulator-name = "vbus";
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>; gpio = <&gpio1 2 0>;
enable-active-high;
}; };
}; };
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pwm/pwm.h> #include <dt-bindings/pwm/pwm.h>
/ { / {
...@@ -277,6 +278,7 @@ chan@0 { ...@@ -277,6 +278,7 @@ chan@0 {
led-cur = /bits/ 8 <0x20>; led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>; max-cur = /bits/ 8 <0x60>;
reg = <0>; reg = <0>;
color = <LED_COLOR_ID_RED>;
}; };
chan@1 { chan@1 {
...@@ -284,6 +286,7 @@ chan@1 { ...@@ -284,6 +286,7 @@ chan@1 {
led-cur = /bits/ 8 <0x20>; led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>; max-cur = /bits/ 8 <0x60>;
reg = <1>; reg = <1>;
color = <LED_COLOR_ID_GREEN>;
}; };
chan@2 { chan@2 {
...@@ -291,6 +294,7 @@ chan@2 { ...@@ -291,6 +294,7 @@ chan@2 {
led-cur = /bits/ 8 <0x20>; led-cur = /bits/ 8 <0x20>;
max-cur = /bits/ 8 <0x60>; max-cur = /bits/ 8 <0x60>;
reg = <2>; reg = <2>;
color = <LED_COLOR_ID_BLUE>;
}; };
chan@3 { chan@3 {
...@@ -298,6 +302,7 @@ chan@3 { ...@@ -298,6 +302,7 @@ chan@3 {
led-cur = /bits/ 8 <0x0>; led-cur = /bits/ 8 <0x0>;
max-cur = /bits/ 8 <0x0>; max-cur = /bits/ 8 <0x0>;
reg = <3>; reg = <3>;
color = <LED_COLOR_ID_WHITE>;
}; };
}; };
......
...@@ -176,7 +176,18 @@ &fec { ...@@ -176,7 +176,18 @@ &fec {
pinctrl-0 = <&pinctrl_enet>; pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii-id"; phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; phy-reset-gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
phy-handle = <&phy>;
status = "okay"; status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy: ethernet-phy@1 {
reg = <1>;
qca,clk-out-frequency = <125000000>;
};
};
}; };
&hdmi { &hdmi {
......
...@@ -114,7 +114,7 @@ flash0: n25q256a@0 { ...@@ -114,7 +114,7 @@ flash0: n25q256a@0 {
compatible = "micron,n25q256a", "jedec,spi-nor"; compatible = "micron,n25q256a", "jedec,spi-nor";
spi-max-frequency = <29000000>; spi-max-frequency = <29000000>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
reg = <0>; reg = <0>;
}; };
...@@ -124,7 +124,7 @@ flash1: n25q256a@2 { ...@@ -124,7 +124,7 @@ flash1: n25q256a@2 {
compatible = "micron,n25q256a", "jedec,spi-nor"; compatible = "micron,n25q256a", "jedec,spi-nor";
spi-max-frequency = <29000000>; spi-max-frequency = <29000000>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
reg = <2>; reg = <2>;
}; };
}; };
......
...@@ -292,7 +292,7 @@ flash0: n25q256a@0 { ...@@ -292,7 +292,7 @@ flash0: n25q256a@0 {
compatible = "micron,n25q256a", "jedec,spi-nor"; compatible = "micron,n25q256a", "jedec,spi-nor";
spi-max-frequency = <29000000>; spi-max-frequency = <29000000>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
reg = <0>; reg = <0>;
}; };
}; };
......
...@@ -101,7 +101,7 @@ partition@280000 { ...@@ -101,7 +101,7 @@ partition@280000 {
nand@1,0 { nand@1,0 {
compatible = "ti,omap2-nand"; compatible = "ti,omap2-nand";
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */ reg = <1 0 4>; /* CS1, offset 0, IO size 4 */
interrupt-parent = <&gpmc>; interrupt-parent = <&gpmc>;
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */ <1 IRQ_TYPE_NONE>; /* termcount */
......
...@@ -198,7 +198,7 @@ cxo_board: cxo_board { ...@@ -198,7 +198,7 @@ cxo_board: cxo_board {
clock-frequency = <19200000>; clock-frequency = <19200000>;
}; };
pxo_board { pxo_board: pxo_board {
compatible = "fixed-clock"; compatible = "fixed-clock";
#clock-cells = <0>; #clock-cells = <0>;
clock-frequency = <27000000>; clock-frequency = <27000000>;
...@@ -1148,22 +1148,21 @@ tcsr: syscon@1a400000 { ...@@ -1148,22 +1148,21 @@ tcsr: syscon@1a400000 {
}; };
gpu: adreno-3xx@4300000 { gpu: adreno-3xx@4300000 {
compatible = "qcom,adreno-3xx"; compatible = "qcom,adreno-320.2", "qcom,adreno";
reg = <0x04300000 0x20000>; reg = <0x04300000 0x20000>;
reg-names = "kgsl_3d0_reg_memory"; reg-names = "kgsl_3d0_reg_memory";
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "kgsl_3d0_irq"; interrupt-names = "kgsl_3d0_irq";
clock-names = clock-names =
"core_clk", "core",
"iface_clk", "iface",
"mem_clk", "mem",
"mem_iface_clk"; "mem_iface";
clocks = clocks =
<&mmcc GFX3D_CLK>, <&mmcc GFX3D_CLK>,
<&mmcc GFX3D_AHB_CLK>, <&mmcc GFX3D_AHB_CLK>,
<&mmcc GFX3D_AXI_CLK>, <&mmcc GFX3D_AXI_CLK>,
<&mmcc MMSS_IMEM_AHB_CLK>; <&mmcc MMSS_IMEM_AHB_CLK>;
qcom,chipid = <0x03020002>;
iommus = <&gfx3d 0 iommus = <&gfx3d 0
&gfx3d 1 &gfx3d 1
...@@ -1306,7 +1305,7 @@ dsi0_phy: dsi-phy@4700200 { ...@@ -1306,7 +1305,7 @@ dsi0_phy: dsi-phy@4700200 {
reg-names = "dsi_pll", "dsi_phy", "dsi_phy_regulator"; reg-names = "dsi_pll", "dsi_phy", "dsi_phy_regulator";
clock-names = "iface_clk", "ref"; clock-names = "iface_clk", "ref";
clocks = <&mmcc DSI_M_AHB_CLK>, clocks = <&mmcc DSI_M_AHB_CLK>,
<&cxo_board>; <&pxo_board>;
}; };
......
...@@ -75,6 +75,17 @@ soc { ...@@ -75,6 +75,17 @@ soc {
#size-cells = <1>; #size-cells = <1>;
ranges; ranges;
securam: securam@e0000000 {
compatible = "microchip,sama7g5-securam", "atmel,sama5d2-securam", "mmio-sram";
reg = <0xe0000000 0x4000>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 18>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0xe0000000 0x4000>;
no-memory-wc;
status = "okay";
};
secumod: secumod@e0004000 { secumod: secumod@e0004000 {
compatible = "microchip,sama7g5-secumod", "atmel,sama5d2-secumod", "syscon"; compatible = "microchip,sama7g5-secumod", "atmel,sama5d2-secumod", "syscon";
reg = <0xe0004000 0x4000>; reg = <0xe0004000 0x4000>;
...@@ -111,6 +122,17 @@ pmc: pmc@e0018000 { ...@@ -111,6 +122,17 @@ pmc: pmc@e0018000 {
clock-names = "td_slck", "md_slck", "main_xtal"; clock-names = "td_slck", "md_slck", "main_xtal";
}; };
shdwc: shdwc@e001d010 {
compatible = "microchip,sama7g5-shdwc", "syscon";
reg = <0xe001d010 0x10>;
clocks = <&clk32k 0>;
#address-cells = <1>;
#size-cells = <0>;
atmel,wakeup-rtc-timer;
atmel,wakeup-rtt-timer;
status = "disabled";
};
rtt: rtt@e001d020 { rtt: rtt@e001d020 {
compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"; compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
reg = <0xe001d020 0x30>; reg = <0xe001d020 0x30>;
...@@ -137,6 +159,11 @@ ps_wdt: watchdog@e001d180 { ...@@ -137,6 +159,11 @@ ps_wdt: watchdog@e001d180 {
clocks = <&clk32k 0>; clocks = <&clk32k 0>;
}; };
chipid@e0020000 {
compatible = "microchip,sama7g5-chipid";
reg = <0xe0020000 0x8>;
};
sdmmc0: mmc@e1204000 { sdmmc0: mmc@e1204000 {
compatible = "microchip,sama7g5-sdhci", "microchip,sam9x60-sdhci"; compatible = "microchip,sama7g5-sdhci", "microchip,sam9x60-sdhci";
reg = <0xe1204000 0x4000>; reg = <0xe1204000 0x4000>;
...@@ -515,6 +542,18 @@ spi11: spi@400 { ...@@ -515,6 +542,18 @@ spi11: spi@400 {
}; };
}; };
uddrc: uddrc@e3800000 {
compatible = "microchip,sama7g5-uddrc";
reg = <0xe3800000 0x4000>;
status = "okay";
};
ddr3phy: ddr3phy@e3804000 {
compatible = "microchip,sama7g5-ddr3phy";
reg = <0xe3804000 0x1000>;
status = "okay";
};
gic: interrupt-controller@e8c11000 { gic: interrupt-controller@e8c11000 {
compatible = "arm,cortex-a7-gic"; compatible = "arm,cortex-a7-gic";
#interrupt-cells = <3>; #interrupt-cells = <3>;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* TAKE CARE WHEN MAINTAINING THIS FILE TO PROPAGATE ANY RELEVANT * TAKE CARE WHEN MAINTAINING THIS FILE TO PROPAGATE ANY RELEVANT
* CHANGES TO vexpress-v2m.dtsi! * CHANGES TO vexpress-v2m.dtsi!
*/ */
#include <dt-bindings/interrupt-controller/arm-gic.h>
/ { / {
v2m_fixed_3v3: fixed-regulator-0 { v2m_fixed_3v3: fixed-regulator-0 {
...@@ -101,16 +102,68 @@ led-8 { ...@@ -101,16 +102,68 @@ led-8 {
}; };
bus@8000000 { bus@8000000 {
motherboard-bus { compatible = "simple-bus";
model = "V2M-P1"; #address-cells = <1>;
#size-cells = <1>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 63>;
interrupt-map = <0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
<0 1 &gic GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
<0 2 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
<0 3 &gic GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
<0 4 &gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
<0 5 &gic GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
<0 6 &gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
<0 7 &gic GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
<0 8 &gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
<0 9 &gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
<0 10 &gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
<0 11 &gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
<0 12 &gic GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
<0 13 &gic GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
<0 14 &gic GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
<0 15 &gic GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
<0 16 &gic GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
<0 17 &gic GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
<0 18 &gic GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
<0 19 &gic GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<0 20 &gic GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
<0 21 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
<0 22 &gic GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
<0 23 &gic GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
<0 24 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
<0 25 &gic GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
<0 26 &gic GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
<0 27 &gic GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
<0 28 &gic GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
<0 29 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
<0 30 &gic GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
<0 31 &gic GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
<0 32 &gic GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
<0 33 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
<0 34 &gic GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
<0 35 &gic GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
<0 36 &gic GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
<0 37 &gic GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
<0 38 &gic GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
<0 39 &gic GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
<0 40 &gic GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<0 41 &gic GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
<0 42 &gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
motherboard-bus@8000000 {
arm,hbi = <0x190>; arm,hbi = <0x190>;
arm,vexpress,site = <0>; arm,vexpress,site = <0>;
arm,v2m-memory-map = "rs1";
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
#interrupt-cells = <1>; ranges = <0 0 0x08000000 0x04000000>,
ranges; <1 0 0x14000000 0x04000000>,
<2 0 0x18000000 0x04000000>,
<3 0 0x1c000000 0x04000000>,
<4 0 0x0c000000 0x04000000>,
<5 0 0x10000000 0x04000000>;
nor_flash: flash@0 { nor_flash: flash@0 {
compatible = "arm,vexpress-flash", "cfi-flash"; compatible = "arm,vexpress-flash", "cfi-flash";
...@@ -215,7 +268,7 @@ aaci@40000 { ...@@ -215,7 +268,7 @@ aaci@40000 {
clock-names = "apb_pclk"; clock-names = "apb_pclk";
}; };
mmci@50000 { mmc@50000 {
compatible = "arm,pl180", "arm,primecell"; compatible = "arm,pl180", "arm,primecell";
reg = <0x050000 0x1000>; reg = <0x050000 0x1000>;
interrupts = <9>, <10>; interrupts = <9>, <10>;
...@@ -275,7 +328,7 @@ v2m_serial3: serial@c0000 { ...@@ -275,7 +328,7 @@ v2m_serial3: serial@c0000 {
clock-names = "uartclk", "apb_pclk"; clock-names = "uartclk", "apb_pclk";
}; };
wdt@f0000 { watchdog@f0000 {
compatible = "arm,sp805", "arm,primecell"; compatible = "arm,sp805", "arm,primecell";
reg = <0x0f0000 0x1000>; reg = <0x0f0000 0x1000>;
interrupts = <0>; interrupts = <0>;
......
...@@ -17,18 +17,73 @@ ...@@ -17,18 +17,73 @@
* TAKE CARE WHEN MAINTAINING THIS FILE TO PROPAGATE ANY RELEVANT * TAKE CARE WHEN MAINTAINING THIS FILE TO PROPAGATE ANY RELEVANT
* CHANGES TO vexpress-v2m-rs1.dtsi! * CHANGES TO vexpress-v2m-rs1.dtsi!
*/ */
#include <dt-bindings/interrupt-controller/arm-gic.h>
/ { / {
bus@4000000 { bus@40000000 {
motherboard { compatible = "simple-bus";
model = "V2M-P1"; #address-cells = <1>;
#size-cells = <1>;
ranges = <0x40000000 0x40000000 0x10000000>,
<0x10000000 0x10000000 0x00020000>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 63>;
interrupt-map = <0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
<0 1 &gic GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
<0 2 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
<0 3 &gic GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
<0 4 &gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
<0 5 &gic GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
<0 6 &gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
<0 7 &gic GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
<0 8 &gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
<0 9 &gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
<0 10 &gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
<0 11 &gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
<0 12 &gic GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
<0 13 &gic GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
<0 14 &gic GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
<0 15 &gic GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
<0 16 &gic GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
<0 17 &gic GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
<0 18 &gic GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
<0 19 &gic GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<0 20 &gic GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
<0 21 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
<0 22 &gic GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
<0 23 &gic GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
<0 24 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
<0 25 &gic GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
<0 26 &gic GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
<0 27 &gic GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
<0 28 &gic GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
<0 29 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
<0 30 &gic GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
<0 31 &gic GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
<0 32 &gic GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
<0 33 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
<0 34 &gic GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
<0 35 &gic GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
<0 36 &gic GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
<0 37 &gic GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
<0 38 &gic GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
<0 39 &gic GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
<0 40 &gic GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<0 41 &gic GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
<0 42 &gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
motherboard-bus@40000000 {
arm,hbi = <0x190>; arm,hbi = <0x190>;
arm,vexpress,site = <0>; arm,vexpress,site = <0>;
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
#interrupt-cells = <1>; ranges = <0 0 0x40000000 0x04000000>,
ranges; <1 0 0x44000000 0x04000000>,
<2 0 0x48000000 0x04000000>,
<3 0 0x4c000000 0x04000000>,
<7 0 0x10000000 0x00020000>;
flash@0,00000000 { flash@0,00000000 {
compatible = "arm,vexpress-flash", "cfi-flash"; compatible = "arm,vexpress-flash", "cfi-flash";
......
...@@ -237,62 +237,7 @@ energy { ...@@ -237,62 +237,7 @@ energy {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus"; ranges = <0x8000000 0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 4>,
<0 0 1 &gic 0 1 4>,
<0 0 2 &gic 0 2 4>,
<0 0 3 &gic 0 3 4>,
<0 0 4 &gic 0 4 4>,
<0 0 5 &gic 0 5 4>,
<0 0 6 &gic 0 6 4>,
<0 0 7 &gic 0 7 4>,
<0 0 8 &gic 0 8 4>,
<0 0 9 &gic 0 9 4>,
<0 0 10 &gic 0 10 4>,
<0 0 11 &gic 0 11 4>,
<0 0 12 &gic 0 12 4>,
<0 0 13 &gic 0 13 4>,
<0 0 14 &gic 0 14 4>,
<0 0 15 &gic 0 15 4>,
<0 0 16 &gic 0 16 4>,
<0 0 17 &gic 0 17 4>,
<0 0 18 &gic 0 18 4>,
<0 0 19 &gic 0 19 4>,
<0 0 20 &gic 0 20 4>,
<0 0 21 &gic 0 21 4>,
<0 0 22 &gic 0 22 4>,
<0 0 23 &gic 0 23 4>,
<0 0 24 &gic 0 24 4>,
<0 0 25 &gic 0 25 4>,
<0 0 26 &gic 0 26 4>,
<0 0 27 &gic 0 27 4>,
<0 0 28 &gic 0 28 4>,
<0 0 29 &gic 0 29 4>,
<0 0 30 &gic 0 30 4>,
<0 0 31 &gic 0 31 4>,
<0 0 32 &gic 0 32 4>,
<0 0 33 &gic 0 33 4>,
<0 0 34 &gic 0 34 4>,
<0 0 35 &gic 0 35 4>,
<0 0 36 &gic 0 36 4>,
<0 0 37 &gic 0 37 4>,
<0 0 38 &gic 0 38 4>,
<0 0 39 &gic 0 39 4>,
<0 0 40 &gic 0 40 4>,
<0 0 41 &gic 0 41 4>,
<0 0 42 &gic 0 42 4>;
}; };
site2: hsb@40000000 { site2: hsb@40000000 {
......
...@@ -609,62 +609,7 @@ etm2_out_port: endpoint { ...@@ -609,62 +609,7 @@ etm2_out_port: endpoint {
}; };
smb: bus@8000000 { smb: bus@8000000 {
compatible = "simple-bus"; ranges = <0x8000000 0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 4>,
<0 0 1 &gic 0 1 4>,
<0 0 2 &gic 0 2 4>,
<0 0 3 &gic 0 3 4>,
<0 0 4 &gic 0 4 4>,
<0 0 5 &gic 0 5 4>,
<0 0 6 &gic 0 6 4>,
<0 0 7 &gic 0 7 4>,
<0 0 8 &gic 0 8 4>,
<0 0 9 &gic 0 9 4>,
<0 0 10 &gic 0 10 4>,
<0 0 11 &gic 0 11 4>,
<0 0 12 &gic 0 12 4>,
<0 0 13 &gic 0 13 4>,
<0 0 14 &gic 0 14 4>,
<0 0 15 &gic 0 15 4>,
<0 0 16 &gic 0 16 4>,
<0 0 17 &gic 0 17 4>,
<0 0 18 &gic 0 18 4>,
<0 0 19 &gic 0 19 4>,
<0 0 20 &gic 0 20 4>,
<0 0 21 &gic 0 21 4>,
<0 0 22 &gic 0 22 4>,
<0 0 23 &gic 0 23 4>,
<0 0 24 &gic 0 24 4>,
<0 0 25 &gic 0 25 4>,
<0 0 26 &gic 0 26 4>,
<0 0 27 &gic 0 27 4>,
<0 0 28 &gic 0 28 4>,
<0 0 29 &gic 0 29 4>,
<0 0 30 &gic 0 30 4>,
<0 0 31 &gic 0 31 4>,
<0 0 32 &gic 0 32 4>,
<0 0 33 &gic 0 33 4>,
<0 0 34 &gic 0 34 4>,
<0 0 35 &gic 0 35 4>,
<0 0 36 &gic 0 36 4>,
<0 0 37 &gic 0 37 4>,
<0 0 38 &gic 0 38 4>,
<0 0 39 &gic 0 39 4>,
<0 0 40 &gic 0 40 4>,
<0 0 41 &gic 0 41 4>,
<0 0 42 &gic 0 42 4>;
}; };
site2: hsb@40000000 { site2: hsb@40000000 {
......
...@@ -207,62 +207,7 @@ temp-dcc { ...@@ -207,62 +207,7 @@ temp-dcc {
}; };
smb: bus@8000000 { smb: bus@8000000 {
compatible = "simple-bus"; ranges = <0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x08000000 0x04000000>,
<1 0 0x14000000 0x04000000>,
<2 0 0x18000000 0x04000000>,
<3 0 0x1c000000 0x04000000>,
<4 0 0x0c000000 0x04000000>,
<5 0 0x10000000 0x04000000>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 4>,
<0 0 1 &gic 0 1 4>,
<0 0 2 &gic 0 2 4>,
<0 0 3 &gic 0 3 4>,
<0 0 4 &gic 0 4 4>,
<0 0 5 &gic 0 5 4>,
<0 0 6 &gic 0 6 4>,
<0 0 7 &gic 0 7 4>,
<0 0 8 &gic 0 8 4>,
<0 0 9 &gic 0 9 4>,
<0 0 10 &gic 0 10 4>,
<0 0 11 &gic 0 11 4>,
<0 0 12 &gic 0 12 4>,
<0 0 13 &gic 0 13 4>,
<0 0 14 &gic 0 14 4>,
<0 0 15 &gic 0 15 4>,
<0 0 16 &gic 0 16 4>,
<0 0 17 &gic 0 17 4>,
<0 0 18 &gic 0 18 4>,
<0 0 19 &gic 0 19 4>,
<0 0 20 &gic 0 20 4>,
<0 0 21 &gic 0 21 4>,
<0 0 22 &gic 0 22 4>,
<0 0 23 &gic 0 23 4>,
<0 0 24 &gic 0 24 4>,
<0 0 25 &gic 0 25 4>,
<0 0 26 &gic 0 26 4>,
<0 0 27 &gic 0 27 4>,
<0 0 28 &gic 0 28 4>,
<0 0 29 &gic 0 29 4>,
<0 0 30 &gic 0 30 4>,
<0 0 31 &gic 0 31 4>,
<0 0 32 &gic 0 32 4>,
<0 0 33 &gic 0 33 4>,
<0 0 34 &gic 0 34 4>,
<0 0 35 &gic 0 35 4>,
<0 0 36 &gic 0 36 4>,
<0 0 37 &gic 0 37 4>,
<0 0 38 &gic 0 38 4>,
<0 0 39 &gic 0 39 4>,
<0 0 40 &gic 0 40 4>,
<0 0 41 &gic 0 41 4>,
<0 0 42 &gic 0 42 4>;
}; };
site2: hsb@40000000 { site2: hsb@40000000 {
......
...@@ -295,64 +295,6 @@ power-vd10-s3 { ...@@ -295,64 +295,6 @@ power-vd10-s3 {
}; };
}; };
smb: bus@4000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x40000000 0x04000000>,
<1 0 0x44000000 0x04000000>,
<2 0 0x48000000 0x04000000>,
<3 0 0x4c000000 0x04000000>,
<7 0 0x10000000 0x00020000>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 4>,
<0 0 1 &gic 0 1 4>,
<0 0 2 &gic 0 2 4>,
<0 0 3 &gic 0 3 4>,
<0 0 4 &gic 0 4 4>,
<0 0 5 &gic 0 5 4>,
<0 0 6 &gic 0 6 4>,
<0 0 7 &gic 0 7 4>,
<0 0 8 &gic 0 8 4>,
<0 0 9 &gic 0 9 4>,
<0 0 10 &gic 0 10 4>,
<0 0 11 &gic 0 11 4>,
<0 0 12 &gic 0 12 4>,
<0 0 13 &gic 0 13 4>,
<0 0 14 &gic 0 14 4>,
<0 0 15 &gic 0 15 4>,
<0 0 16 &gic 0 16 4>,
<0 0 17 &gic 0 17 4>,
<0 0 18 &gic 0 18 4>,
<0 0 19 &gic 0 19 4>,
<0 0 20 &gic 0 20 4>,
<0 0 21 &gic 0 21 4>,
<0 0 22 &gic 0 22 4>,
<0 0 23 &gic 0 23 4>,
<0 0 24 &gic 0 24 4>,
<0 0 25 &gic 0 25 4>,
<0 0 26 &gic 0 26 4>,
<0 0 27 &gic 0 27 4>,
<0 0 28 &gic 0 28 4>,
<0 0 29 &gic 0 29 4>,
<0 0 30 &gic 0 30 4>,
<0 0 31 &gic 0 31 4>,
<0 0 32 &gic 0 32 4>,
<0 0 33 &gic 0 33 4>,
<0 0 34 &gic 0 34 4>,
<0 0 35 &gic 0 35 4>,
<0 0 36 &gic 0 36 4>,
<0 0 37 &gic 0 37 4>,
<0 0 38 &gic 0 38 4>,
<0 0 39 &gic 0 39 4>,
<0 0 40 &gic 0 40 4>,
<0 0 41 &gic 0 41 4>,
<0 0 42 &gic 0 42 4>;
};
site2: hsb@e0000000 { site2: hsb@e0000000 {
compatible = "simple-bus"; compatible = "simple-bus";
#address-cells = <1>; #address-cells = <1>;
......
...@@ -40,7 +40,9 @@ EXPORT_SYMBOL(sharpsl_param); ...@@ -40,7 +40,9 @@ EXPORT_SYMBOL(sharpsl_param);
void sharpsl_save_param(void) void sharpsl_save_param(void)
{ {
memcpy(&sharpsl_param, param_start(PARAM_BASE), sizeof(struct sharpsl_param_info)); struct sharpsl_param_info *params = param_start(PARAM_BASE);
memcpy(&sharpsl_param, params, sizeof(*params));
if (sharpsl_param.comadj_keyword != COMADJ_MAGIC) if (sharpsl_param.comadj_keyword != COMADJ_MAGIC)
sharpsl_param.comadj=-1; sharpsl_param.comadj=-1;
......
...@@ -76,6 +76,7 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y ...@@ -76,6 +76,7 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_DRM=y CONFIG_DRM=y
CONFIG_DRM_PANEL_ILITEK_IL9322=y CONFIG_DRM_PANEL_ILITEK_IL9322=y
CONFIG_DRM_TVE200=y CONFIG_DRM_TVE200=y
CONFIG_FB=y
CONFIG_LOGO=y CONFIG_LOGO=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_MON=y CONFIG_USB_MON=y
......
...@@ -292,6 +292,7 @@ CONFIG_DRM_IMX_LDB=y ...@@ -292,6 +292,7 @@ CONFIG_DRM_IMX_LDB=y
CONFIG_DRM_IMX_HDMI=y CONFIG_DRM_IMX_HDMI=y
CONFIG_DRM_ETNAVIV=y CONFIG_DRM_ETNAVIV=y
CONFIG_DRM_MXSFB=y CONFIG_DRM_MXSFB=y
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y CONFIG_FB_MODE_HELPERS=y
CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_L4F00242T03=y CONFIG_LCD_L4F00242T03=y
......
...@@ -456,6 +456,7 @@ CONFIG_PINCTRL_STMFX=y ...@@ -456,6 +456,7 @@ CONFIG_PINCTRL_STMFX=y
CONFIG_PINCTRL_PALMAS=y CONFIG_PINCTRL_PALMAS=y
CONFIG_PINCTRL_OWL=y CONFIG_PINCTRL_OWL=y
CONFIG_PINCTRL_S500=y CONFIG_PINCTRL_S500=y
CONFIG_PINCTRL_MSM=y
CONFIG_PINCTRL_APQ8064=y CONFIG_PINCTRL_APQ8064=y
CONFIG_PINCTRL_APQ8084=y CONFIG_PINCTRL_APQ8084=y
CONFIG_PINCTRL_IPQ8064=y CONFIG_PINCTRL_IPQ8064=y
...@@ -725,6 +726,7 @@ CONFIG_DRM_PL111=m ...@@ -725,6 +726,7 @@ CONFIG_DRM_PL111=m
CONFIG_DRM_LIMA=m CONFIG_DRM_LIMA=m
CONFIG_DRM_PANFROST=m CONFIG_DRM_PANFROST=m
CONFIG_DRM_ASPEED_GFX=m CONFIG_DRM_ASPEED_GFX=m
CONFIG_FB=y
CONFIG_FB_EFI=y CONFIG_FB_EFI=y
CONFIG_FB_WM8505=y CONFIG_FB_WM8505=y
CONFIG_FB_SH_MOBILE_LCDC=y CONFIG_FB_SH_MOBILE_LCDC=y
...@@ -1122,6 +1124,7 @@ CONFIG_PHY_DM816X_USB=m ...@@ -1122,6 +1124,7 @@ CONFIG_PHY_DM816X_USB=m
CONFIG_OMAP_USB2=y CONFIG_OMAP_USB2=y
CONFIG_TI_PIPE3=y CONFIG_TI_PIPE3=y
CONFIG_TWL4030_USB=m CONFIG_TWL4030_USB=m
CONFIG_RAS=y
CONFIG_NVMEM_IMX_OCOTP=y CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_ROCKCHIP_EFUSE=m CONFIG_ROCKCHIP_EFUSE=m
CONFIG_NVMEM_SUNXI_SID=y CONFIG_NVMEM_SUNXI_SID=y
......
...@@ -47,12 +47,26 @@ struct at91_pm_bu { ...@@ -47,12 +47,26 @@ struct at91_pm_bu {
unsigned long ddr_phy_calibration[BACKUP_DDR_PHY_CALIBRATION]; unsigned long ddr_phy_calibration[BACKUP_DDR_PHY_CALIBRATION];
}; };
/*
* struct at91_pm_sfrbu_offsets: registers mapping for SFRBU
* @pswbu: power switch BU control registers
*/
struct at91_pm_sfrbu_regs {
struct {
u32 key;
u32 ctrl;
u32 state;
u32 softsw;
} pswbu;
};
/** /**
* struct at91_soc_pm - AT91 SoC power management data structure * struct at91_soc_pm - AT91 SoC power management data structure
* @config_shdwc_ws: wakeup sources configuration function for SHDWC * @config_shdwc_ws: wakeup sources configuration function for SHDWC
* @config_pmc_ws: wakeup srouces configuration function for PMC * @config_pmc_ws: wakeup srouces configuration function for PMC
* @ws_ids: wakup sources of_device_id array * @ws_ids: wakup sources of_device_id array
* @data: PM data to be used on last phase of suspend * @data: PM data to be used on last phase of suspend
* @sfrbu_regs: SFRBU registers mapping
* @bu: backup unit mapped data (for backup mode) * @bu: backup unit mapped data (for backup mode)
* @memcs: memory chip select * @memcs: memory chip select
*/ */
...@@ -62,6 +76,7 @@ struct at91_soc_pm { ...@@ -62,6 +76,7 @@ struct at91_soc_pm {
const struct of_device_id *ws_ids; const struct of_device_id *ws_ids;
struct at91_pm_bu *bu; struct at91_pm_bu *bu;
struct at91_pm_data data; struct at91_pm_data data;
struct at91_pm_sfrbu_regs sfrbu_regs;
void *memcs; void *memcs;
}; };
...@@ -356,9 +371,36 @@ static int at91_suspend_finish(unsigned long val) ...@@ -356,9 +371,36 @@ static int at91_suspend_finish(unsigned long val)
return 0; return 0;
} }
static void at91_pm_switch_ba_to_vbat(void)
{
unsigned int offset = offsetof(struct at91_pm_sfrbu_regs, pswbu);
unsigned int val;
/* Just for safety. */
if (!soc_pm.data.sfrbu)
return;
val = readl(soc_pm.data.sfrbu + offset);
/* Already on VBAT. */
if (!(val & soc_pm.sfrbu_regs.pswbu.state))
return;
val &= ~soc_pm.sfrbu_regs.pswbu.softsw;
val |= soc_pm.sfrbu_regs.pswbu.key | soc_pm.sfrbu_regs.pswbu.ctrl;
writel(val, soc_pm.data.sfrbu + offset);
/* Wait for update. */
val = readl(soc_pm.data.sfrbu + offset);
while (val & soc_pm.sfrbu_regs.pswbu.state)
val = readl(soc_pm.data.sfrbu + offset);
}
static void at91_pm_suspend(suspend_state_t state) static void at91_pm_suspend(suspend_state_t state)
{ {
if (soc_pm.data.mode == AT91_PM_BACKUP) { if (soc_pm.data.mode == AT91_PM_BACKUP) {
at91_pm_switch_ba_to_vbat();
cpu_suspend(0, at91_suspend_finish); cpu_suspend(0, at91_suspend_finish);
/* The SRAM is lost between suspend cycles */ /* The SRAM is lost between suspend cycles */
...@@ -589,18 +631,22 @@ static const struct of_device_id ramc_phy_ids[] __initconst = { ...@@ -589,18 +631,22 @@ static const struct of_device_id ramc_phy_ids[] __initconst = {
{ /* Sentinel. */ }, { /* Sentinel. */ },
}; };
static __init void at91_dt_ramc(bool phy_mandatory) static __init int at91_dt_ramc(bool phy_mandatory)
{ {
struct device_node *np; struct device_node *np;
const struct of_device_id *of_id; const struct of_device_id *of_id;
int idx = 0; int idx = 0;
void *standby = NULL; void *standby = NULL;
const struct ramc_info *ramc; const struct ramc_info *ramc;
int ret;
for_each_matching_node_and_match(np, ramc_ids, &of_id) { for_each_matching_node_and_match(np, ramc_ids, &of_id) {
soc_pm.data.ramc[idx] = of_iomap(np, 0); soc_pm.data.ramc[idx] = of_iomap(np, 0);
if (!soc_pm.data.ramc[idx]) if (!soc_pm.data.ramc[idx]) {
panic(pr_fmt("unable to map ramc[%d] cpu registers\n"), idx); pr_err("unable to map ramc[%d] cpu registers\n", idx);
ret = -ENOMEM;
goto unmap_ramc;
}
ramc = of_id->data; ramc = of_id->data;
if (ramc) { if (ramc) {
...@@ -612,25 +658,42 @@ static __init void at91_dt_ramc(bool phy_mandatory) ...@@ -612,25 +658,42 @@ static __init void at91_dt_ramc(bool phy_mandatory)
idx++; idx++;
} }
if (!idx) if (!idx) {
panic(pr_fmt("unable to find compatible ram controller node in dtb\n")); pr_err("unable to find compatible ram controller node in dtb\n");
ret = -ENODEV;
goto unmap_ramc;
}
/* Lookup for DDR PHY node, if any. */ /* Lookup for DDR PHY node, if any. */
for_each_matching_node_and_match(np, ramc_phy_ids, &of_id) { for_each_matching_node_and_match(np, ramc_phy_ids, &of_id) {
soc_pm.data.ramc_phy = of_iomap(np, 0); soc_pm.data.ramc_phy = of_iomap(np, 0);
if (!soc_pm.data.ramc_phy) if (!soc_pm.data.ramc_phy) {
panic(pr_fmt("unable to map ramc phy cpu registers\n")); pr_err("unable to map ramc phy cpu registers\n");
ret = -ENOMEM;
goto unmap_ramc;
}
} }
if (phy_mandatory && !soc_pm.data.ramc_phy) if (phy_mandatory && !soc_pm.data.ramc_phy) {
panic(pr_fmt("DDR PHY is mandatory!\n")); pr_err("DDR PHY is mandatory!\n");
ret = -ENODEV;
goto unmap_ramc;
}
if (!standby) { if (!standby) {
pr_warn("ramc no standby function available\n"); pr_warn("ramc no standby function available\n");
return; return 0;
} }
at91_cpuidle_device.dev.platform_data = standby; at91_cpuidle_device.dev.platform_data = standby;
return 0;
unmap_ramc:
while (idx)
iounmap(soc_pm.data.ramc[--idx]);
return ret;
} }
static void at91rm9200_idle(void) static void at91rm9200_idle(void)
...@@ -1017,6 +1080,8 @@ static void __init at91_pm_init(void (*pm_idle)(void)) ...@@ -1017,6 +1080,8 @@ static void __init at91_pm_init(void (*pm_idle)(void))
void __init at91rm9200_pm_init(void) void __init at91rm9200_pm_init(void)
{ {
int ret;
if (!IS_ENABLED(CONFIG_SOC_AT91RM9200)) if (!IS_ENABLED(CONFIG_SOC_AT91RM9200))
return; return;
...@@ -1028,7 +1093,9 @@ void __init at91rm9200_pm_init(void) ...@@ -1028,7 +1093,9 @@ void __init at91rm9200_pm_init(void)
soc_pm.data.standby_mode = AT91_PM_STANDBY; soc_pm.data.standby_mode = AT91_PM_STANDBY;
soc_pm.data.suspend_mode = AT91_PM_ULP0; soc_pm.data.suspend_mode = AT91_PM_ULP0;
at91_dt_ramc(false); ret = at91_dt_ramc(false);
if (ret)
return;
/* /*
* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. * AT91RM9200 SDRAM low-power mode cannot be used with self-refresh.
...@@ -1046,13 +1113,17 @@ void __init sam9x60_pm_init(void) ...@@ -1046,13 +1113,17 @@ void __init sam9x60_pm_init(void)
static const int iomaps[] __initconst = { static const int iomaps[] __initconst = {
[AT91_PM_ULP1] = AT91_PM_IOMAP(SHDWC), [AT91_PM_ULP1] = AT91_PM_IOMAP(SHDWC),
}; };
int ret;
if (!IS_ENABLED(CONFIG_SOC_SAM9X60)) if (!IS_ENABLED(CONFIG_SOC_SAM9X60))
return; return;
at91_pm_modes_validate(modes, ARRAY_SIZE(modes)); at91_pm_modes_validate(modes, ARRAY_SIZE(modes));
at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps)); at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
at91_dt_ramc(false); ret = at91_dt_ramc(false);
if (ret)
return;
at91_pm_init(NULL); at91_pm_init(NULL);
soc_pm.ws_ids = sam9x60_ws_ids; soc_pm.ws_ids = sam9x60_ws_ids;
...@@ -1061,6 +1132,8 @@ void __init sam9x60_pm_init(void) ...@@ -1061,6 +1132,8 @@ void __init sam9x60_pm_init(void)
void __init at91sam9_pm_init(void) void __init at91sam9_pm_init(void)
{ {
int ret;
if (!IS_ENABLED(CONFIG_SOC_AT91SAM9)) if (!IS_ENABLED(CONFIG_SOC_AT91SAM9))
return; return;
...@@ -1072,7 +1145,10 @@ void __init at91sam9_pm_init(void) ...@@ -1072,7 +1145,10 @@ void __init at91sam9_pm_init(void)
soc_pm.data.standby_mode = AT91_PM_STANDBY; soc_pm.data.standby_mode = AT91_PM_STANDBY;
soc_pm.data.suspend_mode = AT91_PM_ULP0; soc_pm.data.suspend_mode = AT91_PM_ULP0;
at91_dt_ramc(false); ret = at91_dt_ramc(false);
if (ret)
return;
at91_pm_init(at91sam9_idle); at91_pm_init(at91sam9_idle);
} }
...@@ -1081,12 +1157,16 @@ void __init sama5_pm_init(void) ...@@ -1081,12 +1157,16 @@ void __init sama5_pm_init(void)
static const int modes[] __initconst = { static const int modes[] __initconst = {
AT91_PM_STANDBY, AT91_PM_ULP0, AT91_PM_ULP0_FAST, AT91_PM_STANDBY, AT91_PM_ULP0, AT91_PM_ULP0_FAST,
}; };
int ret;
if (!IS_ENABLED(CONFIG_SOC_SAMA5)) if (!IS_ENABLED(CONFIG_SOC_SAMA5))
return; return;
at91_pm_modes_validate(modes, ARRAY_SIZE(modes)); at91_pm_modes_validate(modes, ARRAY_SIZE(modes));
at91_dt_ramc(false); ret = at91_dt_ramc(false);
if (ret)
return;
at91_pm_init(NULL); at91_pm_init(NULL);
} }
...@@ -1101,18 +1181,27 @@ void __init sama5d2_pm_init(void) ...@@ -1101,18 +1181,27 @@ void __init sama5d2_pm_init(void)
[AT91_PM_BACKUP] = AT91_PM_IOMAP(SHDWC) | [AT91_PM_BACKUP] = AT91_PM_IOMAP(SHDWC) |
AT91_PM_IOMAP(SFRBU), AT91_PM_IOMAP(SFRBU),
}; };
int ret;
if (!IS_ENABLED(CONFIG_SOC_SAMA5D2)) if (!IS_ENABLED(CONFIG_SOC_SAMA5D2))
return; return;
at91_pm_modes_validate(modes, ARRAY_SIZE(modes)); at91_pm_modes_validate(modes, ARRAY_SIZE(modes));
at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps)); at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
at91_dt_ramc(false); ret = at91_dt_ramc(false);
if (ret)
return;
at91_pm_init(NULL); at91_pm_init(NULL);
soc_pm.ws_ids = sama5d2_ws_ids; soc_pm.ws_ids = sama5d2_ws_ids;
soc_pm.config_shdwc_ws = at91_sama5d2_config_shdwc_ws; soc_pm.config_shdwc_ws = at91_sama5d2_config_shdwc_ws;
soc_pm.config_pmc_ws = at91_sama5d2_config_pmc_ws; soc_pm.config_pmc_ws = at91_sama5d2_config_pmc_ws;
soc_pm.sfrbu_regs.pswbu.key = (0x4BD20C << 8);
soc_pm.sfrbu_regs.pswbu.ctrl = BIT(0);
soc_pm.sfrbu_regs.pswbu.softsw = BIT(1);
soc_pm.sfrbu_regs.pswbu.state = BIT(3);
} }
void __init sama7_pm_init(void) void __init sama7_pm_init(void)
...@@ -1127,18 +1216,27 @@ void __init sama7_pm_init(void) ...@@ -1127,18 +1216,27 @@ void __init sama7_pm_init(void)
[AT91_PM_BACKUP] = AT91_PM_IOMAP(SFRBU) | [AT91_PM_BACKUP] = AT91_PM_IOMAP(SFRBU) |
AT91_PM_IOMAP(SHDWC), AT91_PM_IOMAP(SHDWC),
}; };
int ret;
if (!IS_ENABLED(CONFIG_SOC_SAMA7)) if (!IS_ENABLED(CONFIG_SOC_SAMA7))
return; return;
at91_pm_modes_validate(modes, ARRAY_SIZE(modes)); at91_pm_modes_validate(modes, ARRAY_SIZE(modes));
at91_dt_ramc(true); ret = at91_dt_ramc(true);
if (ret)
return;
at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps)); at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
at91_pm_init(NULL); at91_pm_init(NULL);
soc_pm.ws_ids = sama7g5_ws_ids; soc_pm.ws_ids = sama7g5_ws_ids;
soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws; soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
soc_pm.sfrbu_regs.pswbu.key = (0x4BD20C << 8);
soc_pm.sfrbu_regs.pswbu.ctrl = BIT(0);
soc_pm.sfrbu_regs.pswbu.softsw = BIT(1);
soc_pm.sfrbu_regs.pswbu.state = BIT(2);
} }
static int __init at91_pm_modes_select(char *str) static int __init at91_pm_modes_select(char *str)
......
...@@ -1014,31 +1014,55 @@ ENTRY(at91_pm_suspend_in_sram) ...@@ -1014,31 +1014,55 @@ ENTRY(at91_pm_suspend_in_sram)
mov tmp1, #0 mov tmp1, #0
mcr p15, 0, tmp1, c7, c10, 4 mcr p15, 0, tmp1, c7, c10, 4
/* Flush tlb. */
mov r4, #0
mcr p15, 0, r4, c8, c7, 0
ldr tmp1, [r0, #PM_DATA_PMC_MCKR_OFFSET]
str tmp1, .mckr_offset
ldr tmp1, [r0, #PM_DATA_PMC_VERSION]
str tmp1, .pmc_version
ldr tmp1, [r0, #PM_DATA_MEMCTRL]
str tmp1, .memtype
ldr tmp1, [r0, #PM_DATA_MODE]
str tmp1, .pm_mode
/*
* ldrne below are here to preload their address in the TLB as access
* to RAM may be limited while in self-refresh.
*/
ldr tmp1, [r0, #PM_DATA_PMC] ldr tmp1, [r0, #PM_DATA_PMC]
str tmp1, .pmc_base str tmp1, .pmc_base
cmp tmp1, #0
ldrne tmp2, [tmp1, #0]
ldr tmp1, [r0, #PM_DATA_RAMC0] ldr tmp1, [r0, #PM_DATA_RAMC0]
str tmp1, .sramc_base str tmp1, .sramc_base
cmp tmp1, #0
ldrne tmp2, [tmp1, #0]
ldr tmp1, [r0, #PM_DATA_RAMC1] ldr tmp1, [r0, #PM_DATA_RAMC1]
str tmp1, .sramc1_base str tmp1, .sramc1_base
cmp tmp1, #0
ldrne tmp2, [tmp1, #0]
#ifndef CONFIG_SOC_SAM_V4_V5
/* ldrne below are here to preload their address in the TLB */
ldr tmp1, [r0, #PM_DATA_RAMC_PHY] ldr tmp1, [r0, #PM_DATA_RAMC_PHY]
str tmp1, .sramc_phy_base str tmp1, .sramc_phy_base
ldr tmp1, [r0, #PM_DATA_MEMCTRL] cmp tmp1, #0
str tmp1, .memtype ldrne tmp2, [tmp1, #0]
ldr tmp1, [r0, #PM_DATA_MODE]
str tmp1, .pm_mode
ldr tmp1, [r0, #PM_DATA_PMC_MCKR_OFFSET]
str tmp1, .mckr_offset
ldr tmp1, [r0, #PM_DATA_PMC_VERSION]
str tmp1, .pmc_version
/* Both ldrne below are here to preload their address in the TLB */
ldr tmp1, [r0, #PM_DATA_SHDWC] ldr tmp1, [r0, #PM_DATA_SHDWC]
str tmp1, .shdwc str tmp1, .shdwc
cmp tmp1, #0 cmp tmp1, #0
ldrne tmp2, [tmp1, #0] ldrne tmp2, [tmp1, #0]
ldr tmp1, [r0, #PM_DATA_SFRBU] ldr tmp1, [r0, #PM_DATA_SFRBU]
str tmp1, .sfrbu str tmp1, .sfrbu
cmp tmp1, #0 cmp tmp1, #0
ldrne tmp2, [tmp1, #0x10] ldrne tmp2, [tmp1, #0x10]
#endif
/* Active the self-refresh mode */ /* Active the self-refresh mode */
at91_sramc_self_refresh_ena at91_sramc_self_refresh_ena
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define LSR_THRE 0x20 #define LSR_THRE 0x20
static void putc(const char c) static inline void putc(const char c)
{ {
int i; int i;
...@@ -24,7 +24,7 @@ static void putc(const char c) ...@@ -24,7 +24,7 @@ static void putc(const char c)
*UART_THR = c; *UART_THR = c;
} }
static void flush(void) static inline void flush(void)
{ {
} }
......
...@@ -172,6 +172,9 @@ static void __init imx6q_init_machine(void) ...@@ -172,6 +172,9 @@ static void __init imx6q_init_machine(void)
imx_get_soc_revision()); imx_get_soc_revision());
imx6q_enet_phy_init(); imx6q_enet_phy_init();
of_platform_default_populate(NULL, NULL, NULL);
imx_anatop_init(); imx_anatop_init();
cpu_is_imx6q() ? imx6q_pm_init() : imx6dl_pm_init(); cpu_is_imx6q() ? imx6q_pm_init() : imx6dl_pm_init();
imx6q_1588_init(); imx6q_1588_init();
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/genalloc.h> #include <linux/genalloc.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -619,6 +620,7 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata ...@@ -619,6 +620,7 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata
static void imx6_pm_stby_poweroff(void) static void imx6_pm_stby_poweroff(void)
{ {
gic_cpu_if_down(0);
imx6_set_lpm(STOP_POWER_OFF); imx6_set_lpm(STOP_POWER_OFF);
imx6q_suspend_finish(0); imx6q_suspend_finish(0);
......
...@@ -9,16 +9,4 @@ ...@@ -9,16 +9,4 @@
/* REVISIT: omap1 legacy drivers still rely on this */ /* REVISIT: omap1 legacy drivers still rely on this */
#include <mach/soc.h> #include <mach/soc.h>
/*
* Bus address is physical address, except for OMAP-1510 Local Bus.
* OMAP-1510 bus address is translated into a Local Bus address if the
* OMAP bus type is lbus. We do the address translation based on the
* device overriding the defaults used in the dma-mapping API.
*/
/*
* OMAP-1510 Local Bus address offset
*/
#define OMAP1510_LB_OFFSET UL(0x30000000)
#endif #endif
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/dma-map-ops.h> #include <linux/dma-map-ops.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -206,8 +207,6 @@ static inline void udc_device_init(struct omap_usb_config *pdata) ...@@ -206,8 +207,6 @@ static inline void udc_device_init(struct omap_usb_config *pdata)
#endif #endif
#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
/* The dmamask must be set for OHCI to work */ /* The dmamask must be set for OHCI to work */
static u64 ohci_dmamask = ~(u32)0; static u64 ohci_dmamask = ~(u32)0;
...@@ -236,20 +235,15 @@ static struct platform_device ohci_device = { ...@@ -236,20 +235,15 @@ static struct platform_device ohci_device = {
static inline void ohci_device_init(struct omap_usb_config *pdata) static inline void ohci_device_init(struct omap_usb_config *pdata)
{ {
if (!IS_ENABLED(CONFIG_USB_OHCI_HCD))
return;
if (cpu_is_omap7xx()) if (cpu_is_omap7xx())
ohci_resources[1].start = INT_7XX_USB_HHC_1; ohci_resources[1].start = INT_7XX_USB_HHC_1;
pdata->ohci_device = &ohci_device; pdata->ohci_device = &ohci_device;
pdata->ocpi_enable = &ocpi_enable; pdata->ocpi_enable = &ocpi_enable;
} }
#else
static inline void ohci_device_init(struct omap_usb_config *pdata)
{
}
#endif
#if defined(CONFIG_USB_OTG) && defined(CONFIG_ARCH_OMAP_OTG) #if defined(CONFIG_USB_OTG) && defined(CONFIG_ARCH_OMAP_OTG)
static struct resource otg_resources[] = { static struct resource otg_resources[] = {
...@@ -534,33 +528,87 @@ static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup) ...@@ -534,33 +528,87 @@ static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
} }
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
/* OMAP-1510 OHCI has its own MMU for DMA */
#define OMAP1510_LB_MEMSIZE 32 /* Should be same as SDRAM size */
#define OMAP1510_LB_CLOCK_DIV 0xfffec10c
#define OMAP1510_LB_MMU_CTL 0xfffec208
#define OMAP1510_LB_MMU_LCK 0xfffec224
#define OMAP1510_LB_MMU_LD_TLB 0xfffec228
#define OMAP1510_LB_MMU_CAM_H 0xfffec22c
#define OMAP1510_LB_MMU_CAM_L 0xfffec230
#define OMAP1510_LB_MMU_RAM_H 0xfffec234
#define OMAP1510_LB_MMU_RAM_L 0xfffec238
/* ULPD_DPLL_CTRL */ /*
#define DPLL_IOB (1 << 13) * Bus address is physical address, except for OMAP-1510 Local Bus.
#define DPLL_PLL_ENABLE (1 << 4) * OMAP-1510 bus address is translated into a Local Bus address if the
#define DPLL_LOCK (1 << 0) * OMAP bus type is lbus.
*/
#define OMAP1510_LB_OFFSET UL(0x30000000)
/* ULPD_APLL_CTRL */ /*
#define APLL_NDPLL_SWITCH (1 << 0) * OMAP-1510 specific Local Bus clock on/off
*/
static int omap_1510_local_bus_power(int on)
{
if (on) {
omap_writel((1 << 1) | (1 << 0), OMAP1510_LB_MMU_CTL);
udelay(200);
} else {
omap_writel(0, OMAP1510_LB_MMU_CTL);
}
static int omap_1510_usb_ohci_notifier(struct notifier_block *nb, return 0;
unsigned long event, void *data) }
/*
* OMAP-1510 specific Local Bus initialization
* NOTE: This assumes 32MB memory size in OMAP1510LB_MEMSIZE.
* See also arch/mach-omap/memory.h for __virt_to_dma() and
* __dma_to_virt() which need to match with the physical
* Local Bus address below.
*/
static int omap_1510_local_bus_init(void)
{ {
struct device *dev = data; unsigned int tlb;
unsigned long lbaddr, physaddr;
omap_writel((omap_readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4,
OMAP1510_LB_CLOCK_DIV);
/* Configure the Local Bus MMU table */
for (tlb = 0; tlb < OMAP1510_LB_MEMSIZE; tlb++) {
lbaddr = tlb * 0x00100000 + OMAP1510_LB_OFFSET;
physaddr = tlb * 0x00100000 + PHYS_OFFSET;
omap_writel((lbaddr & 0x0fffffff) >> 22, OMAP1510_LB_MMU_CAM_H);
omap_writel(((lbaddr & 0x003ffc00) >> 6) | 0xc,
OMAP1510_LB_MMU_CAM_L);
omap_writel(physaddr >> 16, OMAP1510_LB_MMU_RAM_H);
omap_writel((physaddr & 0x0000fc00) | 0x300, OMAP1510_LB_MMU_RAM_L);
omap_writel(tlb << 4, OMAP1510_LB_MMU_LCK);
omap_writel(0x1, OMAP1510_LB_MMU_LD_TLB);
}
if (event != BUS_NOTIFY_ADD_DEVICE) /* Enable the walking table */
return NOTIFY_DONE; omap_writel(omap_readl(OMAP1510_LB_MMU_CTL) | (1 << 3), OMAP1510_LB_MMU_CTL);
udelay(200);
if (strncmp(dev_name(dev), "ohci", 4) == 0 && return 0;
dma_direct_set_offset(dev, PHYS_OFFSET, OMAP1510_LB_OFFSET,
(u64)-1))
WARN_ONCE(1, "failed to set DMA offset\n");
return NOTIFY_OK;
} }
static struct notifier_block omap_1510_usb_ohci_nb = { static void omap_1510_local_bus_reset(void)
.notifier_call = omap_1510_usb_ohci_notifier, {
}; omap_1510_local_bus_power(1);
omap_1510_local_bus_init();
}
/* ULPD_DPLL_CTRL */
#define DPLL_IOB (1 << 13)
#define DPLL_PLL_ENABLE (1 << 4)
#define DPLL_LOCK (1 << 0)
/* ULPD_APLL_CTRL */
#define APLL_NDPLL_SWITCH (1 << 0)
static void __init omap_1510_usb_init(struct omap_usb_config *config) static void __init omap_1510_usb_init(struct omap_usb_config *config)
{ {
...@@ -616,19 +664,19 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config) ...@@ -616,19 +664,19 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config)
} }
#endif #endif
#if IS_ENABLED(CONFIG_USB_OHCI_HCD) if (IS_ENABLED(CONFIG_USB_OHCI_HCD) && config->register_host) {
if (config->register_host) {
int status; int status;
bus_register_notifier(&platform_bus_type,
&omap_1510_usb_ohci_nb);
ohci_device.dev.platform_data = config; ohci_device.dev.platform_data = config;
dma_direct_set_offset(&ohci_device.dev, PHYS_OFFSET,
OMAP1510_LB_OFFSET, (u64)-1);
status = platform_device_register(&ohci_device); status = platform_device_register(&ohci_device);
if (status) if (status)
pr_debug("can't register OHCI device, %d\n", status); pr_debug("can't register OHCI device, %d\n", status);
/* hcd explicitly gates 48MHz */ /* hcd explicitly gates 48MHz */
config->lb_reset = omap_1510_local_bus_reset;
} }
#endif
} }
#else #else
......
...@@ -3614,6 +3614,8 @@ int omap_hwmod_init_module(struct device *dev, ...@@ -3614,6 +3614,8 @@ int omap_hwmod_init_module(struct device *dev,
oh->flags |= HWMOD_SWSUP_SIDLE_ACT; oh->flags |= HWMOD_SWSUP_SIDLE_ACT;
if (data->cfg->quirks & SYSC_QUIRK_SWSUP_MSTANDBY) if (data->cfg->quirks & SYSC_QUIRK_SWSUP_MSTANDBY)
oh->flags |= HWMOD_SWSUP_MSTANDBY; oh->flags |= HWMOD_SWSUP_MSTANDBY;
if (data->cfg->quirks & SYSC_QUIRK_CLKDM_NOAUTO)
oh->flags |= HWMOD_CLKDM_NOAUTO;
error = omap_hwmod_check_module(dev, oh, data, sysc_fields, error = omap_hwmod_check_module(dev, oh, data, sysc_fields,
rev_offs, sysc_offs, syss_offs, rev_offs, sysc_offs, syss_offs,
......
...@@ -115,7 +115,6 @@ v2m_refclk32khz: refclk32khz { ...@@ -115,7 +115,6 @@ v2m_refclk32khz: refclk32khz {
bus@8000000 { bus@8000000 {
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
arm,v2m-memory-map = "rs1";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
......
...@@ -192,32 +192,9 @@ panel_in: endpoint { ...@@ -192,32 +192,9 @@ panel_in: endpoint {
remote-endpoint = <&clcd_pads>; remote-endpoint = <&clcd_pads>;
}; };
}; };
panel-timing {
clock-frequency = <63500127>;
hactive = <1024>;
hback-porch = <152>;
hfront-porch = <48>;
hsync-len = <104>;
vactive = <768>;
vback-porch = <23>;
vfront-porch = <3>;
vsync-len = <4>;
};
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic 0 0 GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
......
...@@ -27,8 +27,6 @@ mailbox: mhu@2b1f0000 { ...@@ -27,8 +27,6 @@ mailbox: mhu@2b1f0000 {
reg = <0x0 0x2b1f0000 0x0 0x1000>; reg = <0x0 0x2b1f0000 0x0 0x1000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mhu_lpri_rx",
"mhu_hpri_rx";
#mbox-cells = <1>; #mbox-cells = <1>;
clocks = <&soc_refclk100mhz>; clocks = <&soc_refclk100mhz>;
clock-names = "apb_pclk"; clock-names = "apb_pclk";
...@@ -804,16 +802,6 @@ memory@80000000 { ...@@ -804,16 +802,6 @@ memory@80000000 {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 15>; interrupt-map-mask = <0 0 15>;
interrupt-map = <0 0 0 &gic 0 GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic 0 GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
......
...@@ -92,16 +92,23 @@ nmi-button { ...@@ -92,16 +92,23 @@ nmi-button {
}; };
bus@8000000 { bus@8000000 {
motherboard-bus { compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0x8000000 0 0x8000000 0x18000000>;
motherboard-bus@8000000 {
compatible = "arm,vexpress,v2p-p1", "simple-bus"; compatible = "arm,vexpress,v2p-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
#interrupt-cells = <1>; ranges = <0 0 0 0x08000000 0x04000000>,
ranges; <1 0 0 0x14000000 0x04000000>,
model = "V2M-Juno"; <2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
arm,hbi = <0x252>; arm,hbi = <0x252>;
arm,vexpress,site = <0>; arm,vexpress,site = <0>;
arm,v2m-memory-map = "rs1";
flash@0 { flash@0 {
/* 2 * 32MiB NOR Flash memory mounted on CS0 */ /* 2 * 32MiB NOR Flash memory mounted on CS0 */
...@@ -218,7 +225,7 @@ led7 { ...@@ -218,7 +225,7 @@ led7 {
}; };
}; };
mmci@50000 { mmc@50000 {
compatible = "arm,pl180", "arm,primecell"; compatible = "arm,pl180", "arm,primecell";
reg = <0x050000 0x1000>; reg = <0x050000 0x1000>;
interrupts = <5>; interrupts = <5>;
...@@ -246,7 +253,7 @@ kmi@70000 { ...@@ -246,7 +253,7 @@ kmi@70000 {
clock-names = "KMIREFCLK", "apb_pclk"; clock-names = "KMIREFCLK", "apb_pclk";
}; };
wdt@f0000 { watchdog@f0000 {
compatible = "arm,sp805", "arm,primecell"; compatible = "arm,sp805", "arm,primecell";
reg = <0x0f0000 0x10000>; reg = <0x0f0000 0x10000>;
interrupts = <7>; interrupts = <7>;
......
...@@ -133,17 +133,6 @@ panel_in: endpoint { ...@@ -133,17 +133,6 @@ panel_in: endpoint {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
/ { / {
bus@8000000 { bus@8000000 {
motherboard-bus { motherboard-bus@8000000 {
arm,v2m-memory-map = "rs2"; arm,v2m-memory-map = "rs2";
iofpga-bus@300000000 { iofpga-bus@300000000 {
......
...@@ -77,13 +77,21 @@ dvimode { ...@@ -77,13 +77,21 @@ dvimode {
}; };
bus@8000000 { bus@8000000 {
motherboard-bus { compatible = "simple-bus";
arm,v2m-memory-map = "rs1"; #address-cells = <2>;
#size-cells = <1>;
ranges = <0 0x8000000 0 0x8000000 0x18000000>;
motherboard-bus@8000000 {
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
#interrupt-cells = <1>; ranges = <0 0 0 0x08000000 0x04000000>,
ranges; <1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
flash@0 { flash@0 {
compatible = "arm,vexpress-flash", "cfi-flash"; compatible = "arm,vexpress-flash", "cfi-flash";
...@@ -130,7 +138,7 @@ aaci@40000 { ...@@ -130,7 +138,7 @@ aaci@40000 {
clock-names = "apb_pclk"; clock-names = "apb_pclk";
}; };
mmci@50000 { mmc@50000 {
compatible = "arm,pl180", "arm,primecell"; compatible = "arm,pl180", "arm,primecell";
reg = <0x050000 0x1000>; reg = <0x050000 0x1000>;
interrupts = <9>, <10>; interrupts = <9>, <10>;
...@@ -190,7 +198,7 @@ v2m_serial3: serial@c0000 { ...@@ -190,7 +198,7 @@ v2m_serial3: serial@c0000 {
clock-names = "uartclk", "apb_pclk"; clock-names = "uartclk", "apb_pclk";
}; };
wdt@f0000 { watchdog@f0000 {
compatible = "arm,sp805", "arm,primecell"; compatible = "arm,sp805", "arm,primecell";
reg = <0x0f0000 0x1000>; reg = <0x0f0000 0x1000>;
interrupts = <0>; interrupts = <0>;
......
...@@ -145,61 +145,6 @@ temp-fpga { ...@@ -145,61 +145,6 @@ temp-fpga {
}; };
smb: bus@8000000 { smb: bus@8000000 {
compatible = "simple-bus"; ranges = <0x8000000 0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
<0 0 1 &gic GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
<0 0 2 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
<0 0 3 &gic GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
<0 0 4 &gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
<0 0 5 &gic GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
<0 0 6 &gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
<0 0 7 &gic GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
<0 0 8 &gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
<0 0 9 &gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
<0 0 10 &gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
<0 0 11 &gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
<0 0 12 &gic GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
<0 0 13 &gic GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
<0 0 14 &gic GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
<0 0 15 &gic GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
<0 0 16 &gic GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
<0 0 17 &gic GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
<0 0 18 &gic GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
<0 0 19 &gic GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<0 0 20 &gic GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
<0 0 21 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
<0 0 22 &gic GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
<0 0 23 &gic GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
<0 0 24 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
<0 0 25 &gic GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
<0 0 26 &gic GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
<0 0 27 &gic GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
<0 0 28 &gic GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
<0 0 29 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
<0 0 30 &gic GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
<0 0 31 &gic GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
<0 0 32 &gic GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
<0 0 33 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
<0 0 34 &gic GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
<0 0 35 &gic GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
<0 0 36 &gic GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
<0 0 37 &gic GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
<0 0 38 &gic GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
<0 0 39 &gic GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
<0 0 40 &gic GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<0 0 41 &gic GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
<0 0 42 &gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
}; };
}; };
...@@ -405,9 +405,9 @@ esdhc1: mmc@2150000 { ...@@ -405,9 +405,9 @@ esdhc1: mmc@2150000 {
interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <0>; /* fixed up by bootloader */ clock-frequency = <0>; /* fixed up by bootloader */
clocks = <&clockgen QORIQ_CLK_HWACCEL 1>; clocks = <&clockgen QORIQ_CLK_HWACCEL 1>;
voltage-ranges = <1800 1800 3300 3300>; voltage-ranges = <1800 1800>;
sdhci,auto-cmd12; sdhci,auto-cmd12;
broken-cd; non-removable;
little-endian; little-endian;
bus-width = <4>; bus-width = <4>;
status = "disabled"; status = "disabled";
......
...@@ -91,7 +91,7 @@ flash@0 { ...@@ -91,7 +91,7 @@ flash@0 {
#size-cells = <1>; #size-cells = <1>;
compatible = "jedec,spi-nor"; compatible = "jedec,spi-nor";
spi-max-frequency = <80000000>; spi-max-frequency = <80000000>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
}; };
}; };
......
...@@ -48,7 +48,7 @@ flash@0 { ...@@ -48,7 +48,7 @@ flash@0 {
#size-cells = <1>; #size-cells = <1>;
compatible = "jedec,spi-nor"; compatible = "jedec,spi-nor";
spi-max-frequency = <80000000>; spi-max-frequency = <80000000>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
}; };
}; };
......
...@@ -102,6 +102,7 @@ reg_vdd_arm: BUCK2 { ...@@ -102,6 +102,7 @@ reg_vdd_arm: BUCK2 {
regulator-min-microvolt = <850000>; regulator-min-microvolt = <850000>;
regulator-max-microvolt = <950000>; regulator-max-microvolt = <950000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <3125>; regulator-ramp-delay = <3125>;
nxp,dvs-run-voltage = <950000>; nxp,dvs-run-voltage = <950000>;
nxp,dvs-standby-voltage = <850000>; nxp,dvs-standby-voltage = <850000>;
......
...@@ -647,7 +647,7 @@ &iomuxc { ...@@ -647,7 +647,7 @@ &iomuxc {
pinctrl_hog: hoggrp { pinctrl_hog: hoggrp {
fsl,pins = < fsl,pins = <
MX8MM_IOMUXC_NAND_CE0_B_GPIO3_IO1 0x40000159 /* M2_GDIS# */ MX8MM_IOMUXC_NAND_CE0_B_GPIO3_IO1 0x40000159 /* M2_GDIS# */
MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x40000041 /* M2_RST# */ MX8MM_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x40000041 /* M2_RST# */
MX8MM_IOMUXC_NAND_DATA01_GPIO3_IO7 0x40000119 /* M2_OFF# */ MX8MM_IOMUXC_NAND_DATA01_GPIO3_IO7 0x40000119 /* M2_OFF# */
MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x40000159 /* M2_WDIS# */ MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x40000159 /* M2_WDIS# */
MX8MM_IOMUXC_SAI1_TXD2_GPIO4_IO14 0x40000041 /* AMP GPIO1 */ MX8MM_IOMUXC_SAI1_TXD2_GPIO4_IO14 0x40000041 /* AMP GPIO1 */
......
...@@ -101,7 +101,7 @@ flash@0 { ...@@ -101,7 +101,7 @@ flash@0 {
#size-cells = <1>; #size-cells = <1>;
compatible = "jedec,spi-nor"; compatible = "jedec,spi-nor";
spi-max-frequency = <80000000>; spi-max-frequency = <80000000>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
}; };
}; };
......
...@@ -633,7 +633,7 @@ &iomuxc { ...@@ -633,7 +633,7 @@ &iomuxc {
pinctrl_hog: hoggrp { pinctrl_hog: hoggrp {
fsl,pins = < fsl,pins = <
MX8MN_IOMUXC_NAND_CE0_B_GPIO3_IO1 0x40000159 /* M2_GDIS# */ MX8MN_IOMUXC_NAND_CE0_B_GPIO3_IO1 0x40000159 /* M2_GDIS# */
MX8MN_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x40000041 /* M2_RST# */ MX8MN_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x40000041 /* M2_RST# */
MX8MN_IOMUXC_NAND_DATA01_GPIO3_IO7 0x40000119 /* M2_OFF# */ MX8MN_IOMUXC_NAND_DATA01_GPIO3_IO7 0x40000119 /* M2_OFF# */
MX8MN_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x40000159 /* M2_WDIS# */ MX8MN_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x40000159 /* M2_WDIS# */
MX8MN_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x40000041 /* APP GPIO1 */ MX8MN_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x40000041 /* APP GPIO1 */
......
...@@ -74,7 +74,7 @@ som_flash: flash@0 { ...@@ -74,7 +74,7 @@ som_flash: flash@0 {
compatible = "jedec,spi-nor"; compatible = "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <80000000>; spi-max-frequency = <80000000>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
}; };
}; };
......
...@@ -337,6 +337,8 @@ n25q256a: flash@0 { ...@@ -337,6 +337,8 @@ n25q256a: flash@0 {
#size-cells = <1>; #size-cells = <1>;
compatible = "micron,n25q256a", "jedec,spi-nor"; compatible = "micron,n25q256a", "jedec,spi-nor";
spi-max-frequency = <29000000>; spi-max-frequency = <29000000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
}; };
}; };
......
...@@ -281,7 +281,7 @@ flash@0 { ...@@ -281,7 +281,7 @@ flash@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
reg = <0>; reg = <0>;
spi-tx-bus-width = <4>; spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
m25p,fast-read; m25p,fast-read;
spi-max-frequency = <50000000>; spi-max-frequency = <50000000>;
......
...@@ -48,8 +48,10 @@ pm8150_0: pmic@0 { ...@@ -48,8 +48,10 @@ pm8150_0: pmic@0 {
#size-cells = <0>; #size-cells = <0>;
pon: power-on@800 { pon: power-on@800 {
compatible = "qcom,pm8916-pon"; compatible = "qcom,pm8998-pon";
reg = <0x0800>; reg = <0x0800>;
mode-bootloader = <0x2>;
mode-recovery = <0x1>;
pon_pwrkey: pwrkey { pon_pwrkey: pwrkey {
compatible = "qcom,pm8941-pwrkey"; compatible = "qcom,pm8941-pwrkey";
......
...@@ -804,6 +804,16 @@ lt9611_rst_pin: lt9611-rst-pin { ...@@ -804,6 +804,16 @@ lt9611_rst_pin: lt9611-rst-pin {
}; };
}; };
&pon_pwrkey {
status = "okay";
};
&pon_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
};
&qupv3_id_0 { &qupv3_id_0 {
status = "okay"; status = "okay";
}; };
......
...@@ -273,7 +273,6 @@ sound: sound { ...@@ -273,7 +273,6 @@ sound: sound {
"Headphone Jack", "HPOL", "Headphone Jack", "HPOL",
"Headphone Jack", "HPOR"; "Headphone Jack", "HPOR";
#sound-dai-cells = <0>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -301,11 +300,11 @@ sound_multimedia1_codec: codec { ...@@ -301,11 +300,11 @@ sound_multimedia1_codec: codec {
}; };
}; };
dai-link@2 { dai-link@5 {
link-name = "MultiMedia2"; link-name = "MultiMedia2";
reg = <2>; reg = <LPASS_DP_RX>;
cpu { cpu {
sound-dai = <&lpass_cpu 2>; sound-dai = <&lpass_cpu LPASS_DP_RX>;
}; };
codec { codec {
...@@ -782,7 +781,7 @@ secondary_mi2s: mi2s@1 { ...@@ -782,7 +781,7 @@ secondary_mi2s: mi2s@1 {
qcom,playback-sd-lines = <0>; qcom,playback-sd-lines = <0>;
}; };
hdmi-primary@0 { hdmi@5 {
reg = <LPASS_DP_RX>; reg = <LPASS_DP_RX>;
}; };
}; };
......
...@@ -1850,9 +1850,9 @@ rpmhcc: clock-controller { ...@@ -1850,9 +1850,9 @@ rpmhcc: clock-controller {
cpufreq_hw: cpufreq@18591000 { cpufreq_hw: cpufreq@18591000 {
compatible = "qcom,cpufreq-epss"; compatible = "qcom,cpufreq-epss";
reg = <0 0x18591100 0 0x900>, reg = <0 0x18591000 0 0x1000>,
<0 0x18592100 0 0x900>, <0 0x18592000 0 0x1000>,
<0 0x18593100 0 0x900>; <0 0x18593000 0 0x1000>;
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_GPLL0>; clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_GPLL0>;
clock-names = "xo", "alternate"; clock-names = "xo", "alternate";
#freq-domain-cells = <1>; #freq-domain-cells = <1>;
......
...@@ -654,9 +654,20 @@ a2noc: interconnect@1704000 { ...@@ -654,9 +654,20 @@ a2noc: interconnect@1704000 {
compatible = "qcom,sdm660-a2noc"; compatible = "qcom,sdm660-a2noc";
reg = <0x01704000 0xc100>; reg = <0x01704000 0xc100>;
#interconnect-cells = <1>; #interconnect-cells = <1>;
clock-names = "bus", "bus_a"; clock-names = "bus",
"bus_a",
"ipa",
"ufs_axi",
"aggre2_ufs_axi",
"aggre2_usb3_axi",
"cfg_noc_usb2_axi";
clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>, clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
<&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>; <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
<&rpmcc RPM_SMD_IPA_CLK>,
<&gcc GCC_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_USB3_AXI_CLK>,
<&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
}; };
mnoc: interconnect@1745000 { mnoc: interconnect@1745000 {
......
...@@ -128,23 +128,28 @@ camera_mem: memory@8bf00000 { ...@@ -128,23 +128,28 @@ camera_mem: memory@8bf00000 {
no-map; no-map;
}; };
wlan_msa_mem: memory@8c400000 { ipa_fw_mem: memory@8c400000 {
reg = <0 0x8c400000 0 0x100000>; reg = <0 0x8c400000 0 0x10000>;
no-map; no-map;
}; };
gpu_mem: memory@8c515000 { ipa_gsi_mem: memory@8c410000 {
reg = <0 0x8c515000 0 0x2000>; reg = <0 0x8c410000 0 0x5000>;
no-map; no-map;
}; };
ipa_fw_mem: memory@8c517000 { gpu_mem: memory@8c415000 {
reg = <0 0x8c517000 0 0x5a000>; reg = <0 0x8c415000 0 0x2000>;
no-map; no-map;
}; };
adsp_mem: memory@8c600000 { adsp_mem: memory@8c500000 {
reg = <0 0x8c600000 0 0x1a00000>; reg = <0 0x8c500000 0 0x1a00000>;
no-map;
};
wlan_msa_mem: memory@8df00000 {
reg = <0 0x8df00000 0 0x100000>;
no-map; no-map;
}; };
......
...@@ -16,6 +16,17 @@ ...@@ -16,6 +16,17 @@
#include "sdm850.dtsi" #include "sdm850.dtsi"
#include "pm8998.dtsi" #include "pm8998.dtsi"
/*
* Update following upstream (sdm845.dtsi) reserved
* memory mappings for firmware loading to succeed
* and enable the IPA device.
*/
/delete-node/ &ipa_fw_mem;
/delete-node/ &ipa_gsi_mem;
/delete-node/ &gpu_mem;
/delete-node/ &adsp_mem;
/delete-node/ &wlan_msa_mem;
/ { / {
model = "Lenovo Yoga C630"; model = "Lenovo Yoga C630";
compatible = "lenovo,yoga-c630", "qcom,sdm845"; compatible = "lenovo,yoga-c630", "qcom,sdm845";
...@@ -58,6 +69,29 @@ panel_in_edp: endpoint { ...@@ -58,6 +69,29 @@ panel_in_edp: endpoint {
}; };
}; };
/* Reserved memory changes for IPA */
reserved-memory {
wlan_msa_mem: memory@8c400000 {
reg = <0 0x8c400000 0 0x100000>;
no-map;
};
gpu_mem: memory@8c515000 {
reg = <0 0x8c515000 0 0x2000>;
no-map;
};
ipa_fw_mem: memory@8c517000 {
reg = <0 0x8c517000 0 0x5a000>;
no-map;
};
adsp_mem: memory@8c600000 {
reg = <0 0x8c600000 0 0x1a00000>;
no-map;
};
};
sn65dsi86_refclk: sn65dsi86-refclk { sn65dsi86_refclk: sn65dsi86-refclk {
compatible = "fixed-clock"; compatible = "fixed-clock";
#clock-cells = <0>; #clock-cells = <0>;
......
...@@ -1464,6 +1464,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { ...@@ -1464,6 +1464,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
/* Quirks that need to be set based on detected module */ /* Quirks that need to be set based on detected module */
SYSC_QUIRK("aess", 0, 0, 0x10, -ENODEV, 0x40000000, 0xffffffff, SYSC_QUIRK("aess", 0, 0, 0x10, -ENODEV, 0x40000000, 0xffffffff,
SYSC_MODULE_QUIRK_AESS), SYSC_MODULE_QUIRK_AESS),
/* Errata i893 handling for dra7 dcan1 and 2 */
SYSC_QUIRK("dcan", 0x4ae3c000, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff,
SYSC_QUIRK_CLKDM_NOAUTO),
SYSC_QUIRK("dcan", 0x48480000, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff, SYSC_QUIRK("dcan", 0x48480000, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff,
SYSC_QUIRK_CLKDM_NOAUTO), SYSC_QUIRK_CLKDM_NOAUTO),
SYSC_QUIRK("dss", 0x4832a000, 0, 0x10, 0x14, 0x00000020, 0xffffffff, SYSC_QUIRK("dss", 0x4832a000, 0, 0x10, 0x14, 0x00000020, 0xffffffff,
...@@ -2954,6 +2957,7 @@ static int sysc_init_soc(struct sysc *ddata) ...@@ -2954,6 +2957,7 @@ static int sysc_init_soc(struct sysc *ddata)
break; break;
case SOC_AM3: case SOC_AM3:
sysc_add_disabled(0x48310000); /* rng */ sysc_add_disabled(0x48310000); /* rng */
break;
default: default:
break; break;
} }
......
...@@ -204,7 +204,7 @@ config INTEL_STRATIX10_RSU ...@@ -204,7 +204,7 @@ config INTEL_STRATIX10_RSU
config QCOM_SCM config QCOM_SCM
tristate "Qcom SCM driver" tristate "Qcom SCM driver"
depends on ARM || ARM64 depends on ARCH_QCOM || COMPILE_TEST
depends on HAVE_ARM_SMCCC depends on HAVE_ARM_SMCCC
select RESET_CONTROLLER select RESET_CONTROLLER
......
...@@ -68,7 +68,7 @@ config ARM_SCMI_TRANSPORT_SMC ...@@ -68,7 +68,7 @@ config ARM_SCMI_TRANSPORT_SMC
config ARM_SCMI_TRANSPORT_VIRTIO config ARM_SCMI_TRANSPORT_VIRTIO
bool "SCMI transport based on VirtIO" bool "SCMI transport based on VirtIO"
depends on VIRTIO depends on VIRTIO=y || VIRTIO=ARM_SCMI_PROTOCOL
select ARM_SCMI_HAVE_TRANSPORT select ARM_SCMI_HAVE_TRANSPORT
select ARM_SCMI_HAVE_MSG select ARM_SCMI_HAVE_MSG
help help
......
...@@ -110,18 +110,16 @@ static void scmi_finalize_message(struct scmi_vio_channel *vioch, ...@@ -110,18 +110,16 @@ static void scmi_finalize_message(struct scmi_vio_channel *vioch,
if (vioch->is_rx) { if (vioch->is_rx) {
scmi_vio_feed_vq_rx(vioch, msg); scmi_vio_feed_vq_rx(vioch, msg);
} else { } else {
unsigned long flags; /* Here IRQs are assumed to be already disabled by the caller */
spin_lock(&vioch->lock);
spin_lock_irqsave(&vioch->lock, flags);
list_add(&msg->list, &vioch->free_list); list_add(&msg->list, &vioch->free_list);
spin_unlock_irqrestore(&vioch->lock, flags); spin_unlock(&vioch->lock);
} }
} }
static void scmi_vio_complete_cb(struct virtqueue *vqueue) static void scmi_vio_complete_cb(struct virtqueue *vqueue)
{ {
unsigned long ready_flags; unsigned long ready_flags;
unsigned long flags;
unsigned int length; unsigned int length;
struct scmi_vio_channel *vioch; struct scmi_vio_channel *vioch;
struct scmi_vio_msg *msg; struct scmi_vio_msg *msg;
...@@ -140,7 +138,8 @@ static void scmi_vio_complete_cb(struct virtqueue *vqueue) ...@@ -140,7 +138,8 @@ static void scmi_vio_complete_cb(struct virtqueue *vqueue)
goto unlock_ready_out; goto unlock_ready_out;
} }
spin_lock_irqsave(&vioch->lock, flags); /* IRQs already disabled here no need to irqsave */
spin_lock(&vioch->lock);
if (cb_enabled) { if (cb_enabled) {
virtqueue_disable_cb(vqueue); virtqueue_disable_cb(vqueue);
cb_enabled = false; cb_enabled = false;
...@@ -151,7 +150,7 @@ static void scmi_vio_complete_cb(struct virtqueue *vqueue) ...@@ -151,7 +150,7 @@ static void scmi_vio_complete_cb(struct virtqueue *vqueue)
goto unlock_out; goto unlock_out;
cb_enabled = true; cb_enabled = true;
} }
spin_unlock_irqrestore(&vioch->lock, flags); spin_unlock(&vioch->lock);
if (msg) { if (msg) {
msg->rx_len = length; msg->rx_len = length;
...@@ -161,11 +160,18 @@ static void scmi_vio_complete_cb(struct virtqueue *vqueue) ...@@ -161,11 +160,18 @@ static void scmi_vio_complete_cb(struct virtqueue *vqueue)
scmi_finalize_message(vioch, msg); scmi_finalize_message(vioch, msg);
} }
/*
* Release ready_lock and re-enable IRQs between loop iterations
* to allow virtio_chan_free() to possibly kick in and set the
* flag vioch->ready to false even in between processing of
* messages, so as to force outstanding messages to be ignored
* when system is shutting down.
*/
spin_unlock_irqrestore(&vioch->ready_lock, ready_flags); spin_unlock_irqrestore(&vioch->ready_lock, ready_flags);
} }
unlock_out: unlock_out:
spin_unlock_irqrestore(&vioch->lock, flags); spin_unlock(&vioch->lock);
unlock_ready_out: unlock_ready_out:
spin_unlock_irqrestore(&vioch->ready_lock, ready_flags); spin_unlock_irqrestore(&vioch->ready_lock, ready_flags);
} }
...@@ -384,8 +390,11 @@ static int scmi_vio_probe(struct virtio_device *vdev) ...@@ -384,8 +390,11 @@ static int scmi_vio_probe(struct virtio_device *vdev)
struct virtqueue *vqs[VIRTIO_SCMI_VQ_MAX_CNT]; struct virtqueue *vqs[VIRTIO_SCMI_VQ_MAX_CNT];
/* Only one SCMI VirtiO device allowed */ /* Only one SCMI VirtiO device allowed */
if (scmi_vdev) if (scmi_vdev) {
return -EINVAL; dev_err(dev,
"One SCMI Virtio device was already initialized: only one allowed.\n");
return -EBUSY;
}
have_vq_rx = scmi_vio_have_vq_rx(vdev); have_vq_rx = scmi_vio_have_vq_rx(vdev);
vq_cnt = have_vq_rx ? VIRTIO_SCMI_VQ_MAX_CNT : 1; vq_cnt = have_vq_rx ? VIRTIO_SCMI_VQ_MAX_CNT : 1;
...@@ -428,16 +437,25 @@ static int scmi_vio_probe(struct virtio_device *vdev) ...@@ -428,16 +437,25 @@ static int scmi_vio_probe(struct virtio_device *vdev)
} }
vdev->priv = channels; vdev->priv = channels;
scmi_vdev = vdev; /* Ensure initialized scmi_vdev is visible */
smp_store_mb(scmi_vdev, vdev);
return 0; return 0;
} }
static void scmi_vio_remove(struct virtio_device *vdev) static void scmi_vio_remove(struct virtio_device *vdev)
{ {
/*
* Once we get here, virtio_chan_free() will have already been called by
* the SCMI core for any existing channel and, as a consequence, all the
* virtio channels will have been already marked NOT ready, causing any
* outstanding message on any vqueue to be ignored by complete_cb: now
* we can just stop processing buffers and destroy the vqueues.
*/
vdev->config->reset(vdev); vdev->config->reset(vdev);
vdev->config->del_vqs(vdev); vdev->config->del_vqs(vdev);
scmi_vdev = NULL; /* Ensure scmi_vdev is visible as NULL */
smp_store_mb(scmi_vdev, NULL);
} }
static int scmi_vio_validate(struct virtio_device *vdev) static int scmi_vio_validate(struct virtio_device *vdev)
...@@ -476,7 +494,7 @@ static int __init virtio_scmi_init(void) ...@@ -476,7 +494,7 @@ static int __init virtio_scmi_init(void)
return register_virtio_driver(&virtio_scmi_driver); return register_virtio_driver(&virtio_scmi_driver);
} }
static void __exit virtio_scmi_exit(void) static void virtio_scmi_exit(void)
{ {
unregister_virtio_driver(&virtio_scmi_driver); unregister_virtio_driver(&virtio_scmi_driver);
} }
......
...@@ -98,7 +98,7 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len) ...@@ -98,7 +98,7 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len)
if (ehdr->e_phnum < 2) if (ehdr->e_phnum < 2)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
if (phdrs[0].p_type == PT_LOAD || phdrs[1].p_type == PT_LOAD) if (phdrs[0].p_type == PT_LOAD)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
if ((phdrs[1].p_flags & QCOM_MDT_TYPE_MASK) != QCOM_MDT_TYPE_HASH) if ((phdrs[1].p_flags & QCOM_MDT_TYPE_MASK) != QCOM_MDT_TYPE_HASH)
......
...@@ -628,7 +628,7 @@ static int qcom_socinfo_probe(struct platform_device *pdev) ...@@ -628,7 +628,7 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
/* Feed the soc specific unique data into entropy pool */ /* Feed the soc specific unique data into entropy pool */
add_device_randomness(info, item_size); add_device_randomness(info, item_size);
platform_set_drvdata(pdev, qs->soc_dev); platform_set_drvdata(pdev, qs);
return 0; return 0;
} }
......
...@@ -825,25 +825,28 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, ...@@ -825,25 +825,28 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev,
writel_relaxed(v, reset->prm->base + reset->prm->data->rstctrl); writel_relaxed(v, reset->prm->base + reset->prm->data->rstctrl);
spin_unlock_irqrestore(&reset->lock, flags); spin_unlock_irqrestore(&reset->lock, flags);
if (!has_rstst) /* wait for the reset bit to clear */
goto exit; ret = readl_relaxed_poll_timeout_atomic(reset->prm->base +
reset->prm->data->rstctrl,
v, !(v & BIT(id)), 1,
OMAP_RESET_MAX_WAIT);
if (ret)
pr_err("%s: timedout waiting for %s:%lu\n", __func__,
reset->prm->data->name, id);
/* wait for the status to be set */ /* wait for the status to be set */
ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + if (has_rstst) {
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);
if (ret) if (ret)
pr_err("%s: timedout waiting for %s:%lu\n", __func__, pr_err("%s: timedout waiting for %s:%lu\n", __func__,
reset->prm->data->name, id); reset->prm->data->name, id);
}
exit: if (reset->clkdm)
if (reset->clkdm) {
/* At least dra7 iva needs a delay before clkdm idle */
if (has_rstst)
udelay(1);
pdata->clkdm_allow_idle(reset->clkdm); pdata->clkdm_allow_idle(reset->clkdm);
}
return ret; return ret;
} }
......
...@@ -35,7 +35,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm, ...@@ -35,7 +35,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
unsigned int nr_pages = 1 << order, i; unsigned int nr_pages = 1 << order, i;
struct page **pages; struct page **pages;
pages = kcalloc(nr_pages, sizeof(pages), GFP_KERNEL); pages = kcalloc(nr_pages, sizeof(*pages), GFP_KERNEL);
if (!pages) { if (!pages) {
rc = -ENOMEM; rc = -ENOMEM;
goto err; goto err;
......
...@@ -40,17 +40,6 @@ ...@@ -40,17 +40,6 @@
#include <mach/usb.h> #include <mach/usb.h>
/* OMAP-1510 OHCI has its own MMU for DMA */
#define OMAP1510_LB_MEMSIZE 32 /* Should be same as SDRAM size */
#define OMAP1510_LB_CLOCK_DIV 0xfffec10c
#define OMAP1510_LB_MMU_CTL 0xfffec208
#define OMAP1510_LB_MMU_LCK 0xfffec224
#define OMAP1510_LB_MMU_LD_TLB 0xfffec228
#define OMAP1510_LB_MMU_CAM_H 0xfffec22c
#define OMAP1510_LB_MMU_CAM_L 0xfffec230
#define OMAP1510_LB_MMU_RAM_H 0xfffec234
#define OMAP1510_LB_MMU_RAM_L 0xfffec238
#define DRIVER_DESC "OHCI OMAP driver" #define DRIVER_DESC "OHCI OMAP driver"
struct ohci_omap_priv { struct ohci_omap_priv {
...@@ -104,61 +93,6 @@ static int omap_ohci_transceiver_power(struct ohci_omap_priv *priv, int on) ...@@ -104,61 +93,6 @@ static int omap_ohci_transceiver_power(struct ohci_omap_priv *priv, int on)
return 0; return 0;
} }
#ifdef CONFIG_ARCH_OMAP15XX
/*
* OMAP-1510 specific Local Bus clock on/off
*/
static int omap_1510_local_bus_power(int on)
{
if (on) {
omap_writel((1 << 1) | (1 << 0), OMAP1510_LB_MMU_CTL);
udelay(200);
} else {
omap_writel(0, OMAP1510_LB_MMU_CTL);
}
return 0;
}
/*
* OMAP-1510 specific Local Bus initialization
* NOTE: This assumes 32MB memory size in OMAP1510LB_MEMSIZE.
* See also arch/mach-omap/memory.h for __virt_to_dma() and
* __dma_to_virt() which need to match with the physical
* Local Bus address below.
*/
static int omap_1510_local_bus_init(void)
{
unsigned int tlb;
unsigned long lbaddr, physaddr;
omap_writel((omap_readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4,
OMAP1510_LB_CLOCK_DIV);
/* Configure the Local Bus MMU table */
for (tlb = 0; tlb < OMAP1510_LB_MEMSIZE; tlb++) {
lbaddr = tlb * 0x00100000 + OMAP1510_LB_OFFSET;
physaddr = tlb * 0x00100000 + PHYS_OFFSET;
omap_writel((lbaddr & 0x0fffffff) >> 22, OMAP1510_LB_MMU_CAM_H);
omap_writel(((lbaddr & 0x003ffc00) >> 6) | 0xc,
OMAP1510_LB_MMU_CAM_L);
omap_writel(physaddr >> 16, OMAP1510_LB_MMU_RAM_H);
omap_writel((physaddr & 0x0000fc00) | 0x300, OMAP1510_LB_MMU_RAM_L);
omap_writel(tlb << 4, OMAP1510_LB_MMU_LCK);
omap_writel(0x1, OMAP1510_LB_MMU_LD_TLB);
}
/* Enable the walking table */
omap_writel(omap_readl(OMAP1510_LB_MMU_CTL) | (1 << 3), OMAP1510_LB_MMU_CTL);
udelay(200);
return 0;
}
#else
#define omap_1510_local_bus_power(x) {}
#define omap_1510_local_bus_init() {}
#endif
#ifdef CONFIG_USB_OTG #ifdef CONFIG_USB_OTG
static void start_hnp(struct ohci_hcd *ohci) static void start_hnp(struct ohci_hcd *ohci)
...@@ -229,10 +163,8 @@ static int ohci_omap_reset(struct usb_hcd *hcd) ...@@ -229,10 +163,8 @@ static int ohci_omap_reset(struct usb_hcd *hcd)
omap_ohci_clock_power(priv, 1); omap_ohci_clock_power(priv, 1);
if (cpu_is_omap15xx()) { if (config->lb_reset)
omap_1510_local_bus_power(1); config->lb_reset();
omap_1510_local_bus_init();
}
ret = ohci_setup(hcd); ret = ohci_setup(hcd);
if (ret < 0) if (ret < 0)
......
...@@ -48,6 +48,8 @@ struct omap_usb_config { ...@@ -48,6 +48,8 @@ struct omap_usb_config {
u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup);
int (*ocpi_enable)(void); int (*ocpi_enable)(void);
void (*lb_reset)(void);
}; };
#endif /* __LINUX_USB_OMAP1_H */ #endif /* __LINUX_USB_OMAP1_H */
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