提交 decad3e1 编写于 作者: L Linus Torvalds

Merge tag 'arm-soc-fixes-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Olof Johansson:
 "A set of fixes that have been coming in over the last few weeks, the
  usual mix of fixes:

   - DT fixups for TI K3

   - SATA drive detection fix for TI DRA7

   - Power management fixes and a few build warning removals for OMAP

   - OP-TEE fix to use standard API for UUID exporting

   - DT fixes for a handful of i.MX boards

  And a few other smaller items"

* tag 'arm-soc-fixes-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (29 commits)
  arm64: meson: select COMMON_CLK
  soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe()
  ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power
  bus: ti-sysc: Fix flakey idling of uarts and stop using swsup_sidle_act
  ARM: dts: imx: emcon-avari: Fix nxp,pca8574 #gpio-cells
  ARM: dts: imx7d-pico: Fix the 'tuning-step' property
  ARM: dts: imx7d-meerkat96: Fix the 'tuning-step' property
  arm64: dts: freescale: sl28: var1: fix RGMII clock and voltage
  arm64: dts: freescale: sl28: var4: fix RGMII clock and voltage
  ARM: imx: pm-imx27: Include "common.h"
  arm64: dts: zii-ultra: fix 12V_MAIN voltage
  arm64: dts: zii-ultra: remove second GEN_3V3 regulator instance
  arm64: dts: ls1028a: fix memory node
  bus: ti-sysc: Fix am335x resume hang for usb otg module
  ARM: OMAP2+: Fix build warning when mmc_omap is not built
  ARM: OMAP1: isp1301-omap: Add missing gpiod_add_lookup_table function
  ARM: OMAP1: Fix use of possibly uninitialized irq variable
  optee: use export_uuid() to copy client UUID
  arm64: dts: ti: k3*: Introduce reg definition for interrupt routers
  arm64: dts: ti: k3-am65|j721e|am64: Map the dma / navigator subsystem via explicit ranges
  ...
...@@ -105,9 +105,13 @@ ...@@ -105,9 +105,13 @@
phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
phy-reset-duration = <20>; phy-reset-duration = <20>;
phy-supply = <&sw2_reg>; phy-supply = <&sw2_reg>;
phy-handle = <&ethphy0>;
status = "okay"; status = "okay";
fixed-link {
speed = <1000>;
full-duplex;
};
mdio { mdio {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -406,6 +406,18 @@ ...@@ -406,6 +406,18 @@
vin-supply = <&sw1_reg>; vin-supply = <&sw1_reg>;
}; };
&reg_pu {
vin-supply = <&sw1_reg>;
};
&reg_vdd1p1 {
vin-supply = <&sw2_reg>;
};
&reg_vdd2p5 {
vin-supply = <&sw2_reg>;
};
&uart1 { &uart1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>; pinctrl-0 = <&pinctrl_uart1>;
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
compatible = "nxp,pca8574"; compatible = "nxp,pca8574";
reg = <0x3a>; reg = <0x3a>;
gpio-controller; gpio-controller;
#gpio-cells = <1>; #gpio-cells = <2>;
}; };
}; };
......
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1>; pinctrl-0 = <&pinctrl_usdhc1>;
keep-power-in-suspend; keep-power-in-suspend;
tuning-step = <2>; fsl,tuning-step = <2>;
vmmc-supply = <&reg_3p3v>; vmmc-supply = <&reg_3p3v>;
no-1-8-v; no-1-8-v;
broken-cd; broken-cd;
......
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
pinctrl-2 = <&pinctrl_usdhc1_200mhz>; pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
bus-width = <4>; bus-width = <4>;
tuning-step = <2>; fsl,tuning-step = <2>;
vmmc-supply = <&reg_3p3v>; vmmc-supply = <&reg_3p3v>;
wakeup-source; wakeup-source;
no-1-8-v; no-1-8-v;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/io.h> #include <linux/io.h>
#include "common.h"
#include "hardware.h" #include "hardware.h"
static int mx27_suspend_enter(suspend_state_t state) static int mx27_suspend_enter(suspend_state_t state)
......
...@@ -458,20 +458,6 @@ static struct gpiod_lookup_table leds_gpio_table = { ...@@ -458,20 +458,6 @@ static struct gpiod_lookup_table leds_gpio_table = {
#ifdef CONFIG_LEDS_TRIGGERS #ifdef CONFIG_LEDS_TRIGGERS
DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger); DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
static int ams_delta_camera_power(struct device *dev, int power)
{
/*
* turn on camera LED
*/
if (power)
led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
else
led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
return 0;
}
#else
#define ams_delta_camera_power NULL
#endif #endif
static struct platform_device ams_delta_audio_device = { static struct platform_device ams_delta_audio_device = {
......
...@@ -320,7 +320,7 @@ static int tps_setup(struct i2c_client *client, void *context) ...@@ -320,7 +320,7 @@ static int tps_setup(struct i2c_client *client, void *context)
{ {
if (!IS_BUILTIN(CONFIG_TPS65010)) if (!IS_BUILTIN(CONFIG_TPS65010))
return -ENOSYS; return -ENOSYS;
tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V | tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V |
TPS_LDO1_ENABLE | TPS_VLDO1_3_0V); TPS_LDO1_ENABLE | TPS_VLDO1_3_0V);
...@@ -394,6 +394,8 @@ static void __init h2_init(void) ...@@ -394,6 +394,8 @@ static void __init h2_init(void)
BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0); BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
gpio_direction_input(H2_NAND_RB_GPIO_PIN); gpio_direction_input(H2_NAND_RB_GPIO_PIN);
gpiod_add_lookup_table(&isp1301_gpiod_table);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE); omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
......
...@@ -655,9 +655,13 @@ static int __init omap_pm_init(void) ...@@ -655,9 +655,13 @@ static int __init omap_pm_init(void)
irq = INT_7XX_WAKE_UP_REQ; irq = INT_7XX_WAKE_UP_REQ;
else if (cpu_is_omap16xx()) else if (cpu_is_omap16xx())
irq = INT_1610_WAKE_UP_REQ; irq = INT_1610_WAKE_UP_REQ;
if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", else
NULL)) irq = -1;
pr_err("Failed to request irq %d (peripheral wakeup)\n", irq);
if (irq >= 0) {
if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", NULL))
pr_err("Failed to request irq %d (peripheral wakeup)\n", irq);
}
/* Program new power ramp-up time /* Program new power ramp-up time
* (0 for most boards since we don't lower voltage when in deep sleep) * (0 for most boards since we don't lower voltage when in deep sleep)
......
...@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot) ...@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
static void n8x0_mmc_callback(void *data, u8 card_mask) static void n8x0_mmc_callback(void *data, u8 card_mask)
{ {
#ifdef CONFIG_MMC_OMAP
int bit, *openp, index; int bit, *openp, index;
if (board_is_n800()) { if (board_is_n800()) {
...@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) ...@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
else else
*openp = 0; *openp = 0;
#ifdef CONFIG_MMC_OMAP
omap_mmc_notify_cover_event(mmc_device, index, *openp); omap_mmc_notify_cover_event(mmc_device, index, *openp);
#else #else
pr_warn("MMC: notify cover event not available\n"); pr_warn("MMC: notify cover event not available\n");
......
...@@ -165,6 +165,7 @@ config ARCH_MEDIATEK ...@@ -165,6 +165,7 @@ config ARCH_MEDIATEK
config ARCH_MESON config ARCH_MESON
bool "Amlogic Platforms" bool "Amlogic Platforms"
select COMMON_CLK
select MESON_IRQ_GPIO select MESON_IRQ_GPIO
help help
This enables support for the arm64 based Amlogic SoCs This enables support for the arm64 based Amlogic SoCs
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
eee-broken-100tx; eee-broken-100tx;
qca,clk-out-frequency = <125000000>; qca,clk-out-frequency = <125000000>;
qca,clk-out-strength = <AR803X_STRENGTH_FULL>; qca,clk-out-strength = <AR803X_STRENGTH_FULL>;
vddio-supply = <&vddh>; qca,keep-pll-enabled;
vddio-supply = <&vddio>;
vddio: vddio-regulator { vddio: vddio-regulator {
regulator-name = "VDDIO"; regulator-name = "VDDIO";
......
...@@ -31,11 +31,10 @@ ...@@ -31,11 +31,10 @@
reg = <0x4>; reg = <0x4>;
eee-broken-1000t; eee-broken-1000t;
eee-broken-100tx; eee-broken-100tx;
qca,clk-out-frequency = <125000000>; qca,clk-out-frequency = <125000000>;
qca,clk-out-strength = <AR803X_STRENGTH_FULL>; qca,clk-out-strength = <AR803X_STRENGTH_FULL>;
qca,keep-pll-enabled;
vddio-supply = <&vddh>; vddio-supply = <&vddio>;
vddio: vddio-regulator { vddio: vddio-regulator {
regulator-name = "VDDIO"; regulator-name = "VDDIO";
......
...@@ -197,8 +197,8 @@ ...@@ -197,8 +197,8 @@
ddr: memory-controller@1080000 { ddr: memory-controller@1080000 {
compatible = "fsl,qoriq-memory-controller"; compatible = "fsl,qoriq-memory-controller";
reg = <0x0 0x1080000 0x0 0x1000>; reg = <0x0 0x1080000 0x0 0x1000>;
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
big-endian; little-endian;
}; };
dcfg: syscon@1e00000 { dcfg: syscon@1e00000 {
......
...@@ -88,11 +88,11 @@ ...@@ -88,11 +88,11 @@
pinctrl-0 = <&pinctrl_codec2>; pinctrl-0 = <&pinctrl_codec2>;
reg = <0x18>; reg = <0x18>;
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
HPVDD-supply = <&reg_3p3v>; HPVDD-supply = <&reg_gen_3p3>;
SPRVDD-supply = <&reg_3p3v>; SPRVDD-supply = <&reg_gen_3p3>;
SPLVDD-supply = <&reg_3p3v>; SPLVDD-supply = <&reg_gen_3p3>;
AVDD-supply = <&reg_3p3v>; AVDD-supply = <&reg_gen_3p3>;
IOVDD-supply = <&reg_3p3v>; IOVDD-supply = <&reg_gen_3p3>;
DVDD-supply = <&vgen4_reg>; DVDD-supply = <&vgen4_reg>;
reset-gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
}; };
......
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
reg_12p0_main: regulator-12p0-main { reg_12p0_main: regulator-12p0-main {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "12V_MAIN"; regulator-name = "12V_MAIN";
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <12000000>;
regulator-always-on; regulator-always-on;
}; };
...@@ -77,15 +77,6 @@ ...@@ -77,15 +77,6 @@
regulator-always-on; regulator-always-on;
}; };
reg_3p3v: regulator-3p3v {
compatible = "regulator-fixed";
vin-supply = <&reg_3p3_main>;
regulator-name = "GEN_3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
reg_usdhc2_vmmc: regulator-vsd-3v3 { reg_usdhc2_vmmc: regulator-vsd-3v3 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_reg_usdhc2>; pinctrl-0 = <&pinctrl_reg_usdhc2>;
...@@ -415,11 +406,11 @@ ...@@ -415,11 +406,11 @@
pinctrl-0 = <&pinctrl_codec1>; pinctrl-0 = <&pinctrl_codec1>;
reg = <0x18>; reg = <0x18>;
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
HPVDD-supply = <&reg_3p3v>; HPVDD-supply = <&reg_gen_3p3>;
SPRVDD-supply = <&reg_3p3v>; SPRVDD-supply = <&reg_gen_3p3>;
SPLVDD-supply = <&reg_3p3v>; SPLVDD-supply = <&reg_gen_3p3>;
AVDD-supply = <&reg_3p3v>; AVDD-supply = <&reg_gen_3p3>;
IOVDD-supply = <&reg_3p3v>; IOVDD-supply = <&reg_gen_3p3>;
DVDD-supply = <&vgen4_reg>; DVDD-supply = <&vgen4_reg>;
reset-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>; reset-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
}; };
......
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
}; };
}; };
dmss: dmss { dmss: bus@48000000 {
compatible = "simple-mfd"; compatible = "simple-mfd";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
dma-ranges; dma-ranges;
ranges; ranges = <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>;
ti,sci-dev-id = <25>; ti,sci-dev-id = <25>;
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
}; };
}; };
dmsc: dmsc@44043000 { dmsc: system-controller@44043000 {
compatible = "ti,k2g-sci"; compatible = "ti,k2g-sci";
ti,host-id = <12>; ti,host-id = <12>;
mbox-names = "rx", "tx"; mbox-names = "rx", "tx";
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
#power-domain-cells = <2>; #power-domain-cells = <2>;
}; };
k3_clks: clocks { k3_clks: clock-controller {
compatible = "ti,k2g-sci-clk"; compatible = "ti,k2g-sci-clk";
#clock-cells = <2>; #clock-cells = <2>;
}; };
...@@ -373,8 +373,9 @@ ...@@ -373,8 +373,9 @@
clocks = <&k3_clks 145 0>; clocks = <&k3_clks 145 0>;
}; };
main_gpio_intr: interrupt-controller0 { main_gpio_intr: interrupt-controller@a00000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x00a00000 0x00 0x800>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -74,8 +74,9 @@ ...@@ -74,8 +74,9 @@
clocks = <&k3_clks 148 0>; clocks = <&k3_clks 148 0>;
}; };
mcu_gpio_intr: interrupt-controller1 { mcu_gpio_intr: interrupt-controller@4210000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x04210000 0x00 0x200>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -433,8 +433,9 @@ ...@@ -433,8 +433,9 @@
#phy-cells = <0>; #phy-cells = <0>;
}; };
intr_main_gpio: interrupt-controller0 { intr_main_gpio: interrupt-controller@a00000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x0 0x00a00000 0x0 0x400>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
...@@ -444,18 +445,19 @@ ...@@ -444,18 +445,19 @@
ti,interrupt-ranges = <0 392 32>; ti,interrupt-ranges = <0 392 32>;
}; };
main-navss { main_navss: bus@30800000 {
compatible = "simple-mfd"; compatible = "simple-mfd";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
ranges; ranges = <0x0 0x30800000 0x0 0x30800000 0x0 0xbc00000>;
dma-coherent; dma-coherent;
dma-ranges; dma-ranges;
ti,sci-dev-id = <118>; ti,sci-dev-id = <118>;
intr_main_navss: interrupt-controller1 { intr_main_navss: interrupt-controller@310e0000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x0 0x310e0000 0x0 0x2000>;
ti,intr-trigger-type = <4>; ti,intr-trigger-type = <4>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -116,11 +116,11 @@ ...@@ -116,11 +116,11 @@
}; };
}; };
mcu-navss { mcu_navss: bus@28380000 {
compatible = "simple-mfd"; compatible = "simple-mfd";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
ranges; ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
dma-coherent; dma-coherent;
dma-ranges; dma-ranges;
......
...@@ -6,24 +6,24 @@ ...@@ -6,24 +6,24 @@
*/ */
&cbass_wakeup { &cbass_wakeup {
dmsc: dmsc { dmsc: system-controller@44083000 {
compatible = "ti,am654-sci"; compatible = "ti,am654-sci";
ti,host-id = <12>; ti,host-id = <12>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
mbox-names = "rx", "tx"; mbox-names = "rx", "tx";
mboxes= <&secure_proxy_main 11>, mboxes= <&secure_proxy_main 11>,
<&secure_proxy_main 13>; <&secure_proxy_main 13>;
reg-names = "debug_messages";
reg = <0x44083000 0x1000>;
k3_pds: power-controller { k3_pds: power-controller {
compatible = "ti,sci-pm-domain"; compatible = "ti,sci-pm-domain";
#power-domain-cells = <2>; #power-domain-cells = <2>;
}; };
k3_clks: clocks { k3_clks: clock-controller {
compatible = "ti,k2g-sci-clk"; compatible = "ti,k2g-sci-clk";
#clock-cells = <2>; #clock-cells = <2>;
}; };
...@@ -69,8 +69,9 @@ ...@@ -69,8 +69,9 @@
power-domains = <&k3_pds 115 TI_SCI_PD_EXCLUSIVE>; power-domains = <&k3_pds 115 TI_SCI_PD_EXCLUSIVE>;
}; };
intr_wkup_gpio: interrupt-controller2 { intr_wkup_gpio: interrupt-controller@42200000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x42200000 0x200>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -85,12 +85,6 @@ ...@@ -85,12 +85,6 @@
gpios = <&wkup_gpio0 27 GPIO_ACTIVE_LOW>; gpios = <&wkup_gpio0 27 GPIO_ACTIVE_LOW>;
}; };
}; };
clk_ov5640_fixed: clock {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
};
}; };
&wkup_pmx0 { &wkup_pmx0 {
...@@ -287,23 +281,6 @@ ...@@ -287,23 +281,6 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>; pinctrl-0 = <&main_i2c1_pins_default>;
clock-frequency = <400000>; clock-frequency = <400000>;
ov5640: camera@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
clocks = <&clk_ov5640_fixed>;
clock-names = "xclk";
port {
csi2_cam0: endpoint {
remote-endpoint = <&csi2_phy0>;
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
};
}; };
&main_i2c2 { &main_i2c2 {
...@@ -496,14 +473,6 @@ ...@@ -496,14 +473,6 @@
}; };
}; };
&csi2_0 {
csi2_phy0: endpoint {
remote-endpoint = <&csi2_cam0>;
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
&mcu_cpsw { &mcu_cpsw {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>; pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
......
...@@ -68,8 +68,9 @@ ...@@ -68,8 +68,9 @@
}; };
}; };
main_gpio_intr: interrupt-controller0 { main_gpio_intr: interrupt-controller@a00000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x00a00000 0x00 0x800>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
...@@ -85,9 +86,12 @@ ...@@ -85,9 +86,12 @@
#size-cells = <2>; #size-cells = <2>;
ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>; ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
ti,sci-dev-id = <199>; ti,sci-dev-id = <199>;
dma-coherent;
dma-ranges;
main_navss_intr: interrupt-controller1 { main_navss_intr: interrupt-controller@310e0000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x310e0000 0x00 0x4000>;
ti,intr-trigger-type = <4>; ti,intr-trigger-type = <4>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
&cbass_mcu_wakeup { &cbass_mcu_wakeup {
dmsc: dmsc@44083000 { dmsc: system-controller@44083000 {
compatible = "ti,k2g-sci"; compatible = "ti,k2g-sci";
ti,host-id = <12>; ti,host-id = <12>;
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#power-domain-cells = <2>; #power-domain-cells = <2>;
}; };
k3_clks: clocks { k3_clks: clock-controller {
compatible = "ti,k2g-sci-clk"; compatible = "ti,k2g-sci-clk";
#clock-cells = <2>; #clock-cells = <2>;
}; };
...@@ -96,8 +96,9 @@ ...@@ -96,8 +96,9 @@
clock-names = "fclk"; clock-names = "fclk";
}; };
wkup_gpio_intr: interrupt-controller2 { wkup_gpio_intr: interrupt-controller@42200000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x42200000 0x00 0x400>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -76,8 +76,9 @@ ...@@ -76,8 +76,9 @@
}; };
}; };
main_gpio_intr: interrupt-controller0 { main_gpio_intr: interrupt-controller@a00000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x00a00000 0x00 0x800>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
...@@ -87,18 +88,19 @@ ...@@ -87,18 +88,19 @@
ti,interrupt-ranges = <8 392 56>; ti,interrupt-ranges = <8 392 56>;
}; };
main-navss { main_navss: bus@30000000 {
compatible = "simple-mfd"; compatible = "simple-mfd";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
ranges; ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
dma-coherent; dma-coherent;
dma-ranges; dma-ranges;
ti,sci-dev-id = <199>; ti,sci-dev-id = <199>;
main_navss_intr: interrupt-controller1 { main_navss_intr: interrupt-controller@310e0000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x0 0x310e0000 0x0 0x4000>;
ti,intr-trigger-type = <4>; ti,intr-trigger-type = <4>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
&cbass_mcu_wakeup { &cbass_mcu_wakeup {
dmsc: dmsc@44083000 { dmsc: system-controller@44083000 {
compatible = "ti,k2g-sci"; compatible = "ti,k2g-sci";
ti,host-id = <12>; ti,host-id = <12>;
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#power-domain-cells = <2>; #power-domain-cells = <2>;
}; };
k3_clks: clocks { k3_clks: clock-controller {
compatible = "ti,k2g-sci-clk"; compatible = "ti,k2g-sci-clk";
#clock-cells = <2>; #clock-cells = <2>;
}; };
...@@ -96,8 +96,9 @@ ...@@ -96,8 +96,9 @@
clock-names = "fclk"; clock-names = "fclk";
}; };
wkup_gpio_intr: interrupt-controller2 { wkup_gpio_intr: interrupt-controller@42200000 {
compatible = "ti,sci-intr"; compatible = "ti,sci-intr";
reg = <0x00 0x42200000 0x00 0x400>;
ti,intr-trigger-type = <1>; ti,intr-trigger-type = <1>;
interrupt-controller; interrupt-controller;
interrupt-parent = <&gic500>; interrupt-parent = <&gic500>;
...@@ -249,11 +250,11 @@ ...@@ -249,11 +250,11 @@
}; };
}; };
mcu-navss { mcu_navss: bus@28380000 {
compatible = "simple-mfd"; compatible = "simple-mfd";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
ranges; ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
dma-coherent; dma-coherent;
dma-ranges; dma-ranges;
......
...@@ -1334,6 +1334,34 @@ static int __maybe_unused sysc_runtime_resume(struct device *dev) ...@@ -1334,6 +1334,34 @@ static int __maybe_unused sysc_runtime_resume(struct device *dev)
return error; return error;
} }
static int sysc_reinit_module(struct sysc *ddata, bool leave_enabled)
{
struct device *dev = ddata->dev;
int error;
/* Disable target module if it is enabled */
if (ddata->enabled) {
error = sysc_runtime_suspend(dev);
if (error)
dev_warn(dev, "reinit suspend failed: %i\n", error);
}
/* Enable target module */
error = sysc_runtime_resume(dev);
if (error)
dev_warn(dev, "reinit resume failed: %i\n", error);
if (leave_enabled)
return error;
/* Disable target module if no leave_enabled was set */
error = sysc_runtime_suspend(dev);
if (error)
dev_warn(dev, "reinit suspend failed: %i\n", error);
return error;
}
static int __maybe_unused sysc_noirq_suspend(struct device *dev) static int __maybe_unused sysc_noirq_suspend(struct device *dev)
{ {
struct sysc *ddata; struct sysc *ddata;
...@@ -1344,12 +1372,18 @@ static int __maybe_unused sysc_noirq_suspend(struct device *dev) ...@@ -1344,12 +1372,18 @@ static int __maybe_unused sysc_noirq_suspend(struct device *dev)
(SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE)) (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE))
return 0; return 0;
return pm_runtime_force_suspend(dev); if (!ddata->enabled)
return 0;
ddata->needs_resume = 1;
return sysc_runtime_suspend(dev);
} }
static int __maybe_unused sysc_noirq_resume(struct device *dev) static int __maybe_unused sysc_noirq_resume(struct device *dev)
{ {
struct sysc *ddata; struct sysc *ddata;
int error = 0;
ddata = dev_get_drvdata(dev); ddata = dev_get_drvdata(dev);
...@@ -1357,7 +1391,19 @@ static int __maybe_unused sysc_noirq_resume(struct device *dev) ...@@ -1357,7 +1391,19 @@ static int __maybe_unused sysc_noirq_resume(struct device *dev)
(SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE)) (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE))
return 0; return 0;
return pm_runtime_force_resume(dev); if (ddata->cfg.quirks & SYSC_QUIRK_REINIT_ON_RESUME) {
error = sysc_reinit_module(ddata, ddata->needs_resume);
if (error)
dev_warn(dev, "noirq_resume failed: %i\n", error);
} else if (ddata->needs_resume) {
error = sysc_runtime_resume(dev);
if (error)
dev_warn(dev, "noirq_resume failed: %i\n", error);
}
ddata->needs_resume = 0;
return error;
} }
static const struct dev_pm_ops sysc_pm_ops = { static const struct dev_pm_ops sysc_pm_ops = {
...@@ -1408,9 +1454,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { ...@@ -1408,9 +1454,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
/* Uarts on omap4 and later */ /* Uarts on omap4 and later */
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x50411e03, 0xffff00ff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x50411e03, 0xffff00ff,
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
/* Quirks that need to be set based on the module address */ /* Quirks that need to be set based on the module address */
SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff, SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
...@@ -1459,6 +1505,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { ...@@ -1459,6 +1505,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
SYSC_QUIRK("tptc", 0, 0, -ENODEV, -ENODEV, 0x40007c00, 0xffffffff, SYSC_QUIRK("tptc", 0, 0, -ENODEV, -ENODEV, 0x40007c00, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
SYSC_QUIRK("sata", 0, 0xfc, 0x1100, -ENODEV, 0x5e412000, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -ENODEV, 0x50700101, 0xffffffff, SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -ENODEV, 0x50700101, 0xffffffff,
...@@ -1466,7 +1514,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { ...@@ -1466,7 +1514,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050, SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -ENODEV, 0x4ea2080d, 0xffffffff, SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -ENODEV, 0x4ea2080d, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY |
SYSC_QUIRK_REINIT_ON_RESUME),
SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0, SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
SYSC_MODULE_QUIRK_WDT), SYSC_MODULE_QUIRK_WDT),
/* PRUSS on am3, am4 and am5 */ /* PRUSS on am3, am4 and am5 */
...@@ -1524,7 +1573,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { ...@@ -1524,7 +1573,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x40000400, 0xffffffff, 0), SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x40000400, 0xffffffff, 0),
SYSC_QUIRK("rfbi", 0x4832a800, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0), SYSC_QUIRK("rfbi", 0x4832a800, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
SYSC_QUIRK("rfbi", 0x58002000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0), SYSC_QUIRK("rfbi", 0x58002000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
SYSC_QUIRK("sata", 0, 0xfc, 0x1100, -ENODEV, 0x5e412000, 0xffffffff, 0),
SYSC_QUIRK("scm", 0, 0, 0x10, -ENODEV, 0x40000900, 0xffffffff, 0), SYSC_QUIRK("scm", 0, 0, 0x10, -ENODEV, 0x40000900, 0xffffffff, 0),
SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4e8b0100, 0xffffffff, 0), SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4e8b0100, 0xffffffff, 0),
SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4f000100, 0xffffffff, 0), SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4f000100, 0xffffffff, 0),
......
...@@ -626,10 +626,8 @@ static int meson_msr_probe(struct platform_device *pdev) ...@@ -626,10 +626,8 @@ static int meson_msr_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res); base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) { if (IS_ERR(base))
dev_err(&pdev->dev, "io resource mapping failed\n");
return PTR_ERR(base); return PTR_ERR(base);
}
priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
&meson_clk_msr_regmap_config); &meson_clk_msr_regmap_config);
......
...@@ -220,6 +220,7 @@ int optee_open_session(struct tee_context *ctx, ...@@ -220,6 +220,7 @@ int optee_open_session(struct tee_context *ctx,
struct optee_msg_arg *msg_arg; struct optee_msg_arg *msg_arg;
phys_addr_t msg_parg; phys_addr_t msg_parg;
struct optee_session *sess = NULL; struct optee_session *sess = NULL;
uuid_t client_uuid;
/* +2 for the meta parameters added below */ /* +2 for the meta parameters added below */
shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg);
...@@ -240,10 +241,11 @@ int optee_open_session(struct tee_context *ctx, ...@@ -240,10 +241,11 @@ int optee_open_session(struct tee_context *ctx,
memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid));
msg_arg->params[1].u.value.c = arg->clnt_login; msg_arg->params[1].u.value.c = arg->clnt_login;
rc = tee_session_calc_client_uuid((uuid_t *)&msg_arg->params[1].u.value, rc = tee_session_calc_client_uuid(&client_uuid, arg->clnt_login,
arg->clnt_login, arg->clnt_uuid); arg->clnt_uuid);
if (rc) if (rc)
goto out; goto out;
export_uuid(msg_arg->params[1].u.octets, &client_uuid);
rc = optee_to_msg_param(msg_arg->params + 2, arg->num_params, param); rc = optee_to_msg_param(msg_arg->params + 2, arg->num_params, param);
if (rc) if (rc)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <linux/types.h> #include <linux/types.h>
/* /*
* This file defines the OP-TEE message protocol used to communicate * This file defines the OP-TEE message protocol (ABI) used to communicate
* with an instance of OP-TEE running in secure world. * with an instance of OP-TEE running in secure world.
* *
* This file is divided into two sections. * This file is divided into two sections.
...@@ -144,9 +144,10 @@ struct optee_msg_param_value { ...@@ -144,9 +144,10 @@ struct optee_msg_param_value {
* @tmem: parameter by temporary memory reference * @tmem: parameter by temporary memory reference
* @rmem: parameter by registered memory reference * @rmem: parameter by registered memory reference
* @value: parameter by opaque value * @value: parameter by opaque value
* @octets: parameter by octet string
* *
* @attr & OPTEE_MSG_ATTR_TYPE_MASK indicates if tmem, rmem or value is used in * @attr & OPTEE_MSG_ATTR_TYPE_MASK indicates if tmem, rmem or value is used in
* the union. OPTEE_MSG_ATTR_TYPE_VALUE_* indicates value, * the union. OPTEE_MSG_ATTR_TYPE_VALUE_* indicates value or octets,
* OPTEE_MSG_ATTR_TYPE_TMEM_* indicates @tmem and * OPTEE_MSG_ATTR_TYPE_TMEM_* indicates @tmem and
* OPTEE_MSG_ATTR_TYPE_RMEM_* indicates @rmem, * OPTEE_MSG_ATTR_TYPE_RMEM_* indicates @rmem,
* OPTEE_MSG_ATTR_TYPE_NONE indicates that none of the members are used. * OPTEE_MSG_ATTR_TYPE_NONE indicates that none of the members are used.
...@@ -157,6 +158,7 @@ struct optee_msg_param { ...@@ -157,6 +158,7 @@ struct optee_msg_param {
struct optee_msg_param_tmem tmem; struct optee_msg_param_tmem tmem;
struct optee_msg_param_rmem rmem; struct optee_msg_param_rmem rmem;
struct optee_msg_param_value value; struct optee_msg_param_value value;
u8 octets[24];
} u; } u;
}; };
......
...@@ -50,6 +50,7 @@ struct sysc_regbits { ...@@ -50,6 +50,7 @@ struct sysc_regbits {
s8 emufree_shift; s8 emufree_shift;
}; };
#define SYSC_QUIRK_REINIT_ON_RESUME BIT(27)
#define SYSC_QUIRK_GPMC_DEBUG BIT(26) #define SYSC_QUIRK_GPMC_DEBUG BIT(26)
#define SYSC_MODULE_QUIRK_ENA_RESETDONE BIT(25) #define SYSC_MODULE_QUIRK_ENA_RESETDONE BIT(25)
#define SYSC_MODULE_QUIRK_PRUSS BIT(24) #define SYSC_MODULE_QUIRK_PRUSS BIT(24)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册