Commit 738590a3 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'scmi-updates-5.4' of...

Merge tag 'scmi-updates-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers

ARM SCMI updates/fixes for v5.4

Handful of fixes/updates including:
1. SCMI v2.0(recently released) support for:
	- Performance protocol fast channels
	- Reset Management Protocol
2. SCMI infrastructure/core support for recieve(Rx) channels,
   asynchronous commands and delayed response
3. Usage of asynchronous commands for clock rate setting and sensor
   reading based on the attributes read from the firmware
4. Miscellaneous cleanups(typos, naming alignment with specification,
   and SPDX License identifier)
5. Couple of fixes: removal of extra check for invalid length and
   additional check to ensure platform/firmware has released shared
   memory before using it in OSPM

* tag 'scmi-updates-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (22 commits)
  reset: Add support for resets provided by SCMI
  firmware: arm_scmi: Add RESET protocol in SCMI v2.0
  dt-bindings: arm: Extend SCMI to support new reset protocol
  firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol
  firmware: arm_scmi: Add discovery of SCMI v2.0 performance fastchannels
  firmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors
  firmware: arm_scmi: Use asynchronous CLOCK_RATE_SET when possible
  firmware: arm_scmi: Drop config flag in clk_ops->rate_set
  firmware: arm_scmi: Add asynchronous sensor read if it supports
  firmware: arm_scmi: Drop async flag in sensor_ops->reading_get
  firmware: arm_scmi: Add support for asynchronous commands and delayed response
  firmware: arm_scmi: Add mechanism to unpack message headers
  firmware: arm_scmi: Separate out tx buffer handling and prepare to add rx
  firmware: arm_scmi: Add receive channel support for notifications
  firmware: arm_scmi: Segregate tx channel handling and prepare to add rx
  firmware: arm_scmi: Reorder some functions to avoid forward declarations
  firmware: arm_scmi: Check if platform has released shmem before using
  firmware: arm_scmi: Use the term 'message' instead of 'command'
  firmware: arm_scmi: Fix few trivial typos in comments
  firmware: arm_scmi: Remove extra check for invalid length message responses
  ...

Link: https://lore.kernel.org/r/20190814172454.26191-1-sudeep.holla@arm.com


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 8c9e465b c8ae9c2d
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -73,6 +73,16 @@ Required properties:
			 as used by the firmware. Refer to  platform details
			 for your implementation for the IDs to use.

Reset signal bindings for the reset domains based on SCMI Message Protocol
------------------------------------------------------------

This binding for the SCMI reset domain providers uses the generic reset
signal binding[5].

Required properties:
 - #reset-cells : Should be 1. Contains the reset domain ID value used
		  by SCMI commands.

SRAM and Shared Memory for SCMI
-------------------------------

@@ -93,6 +103,7 @@ Required sub-node properties:
[2] Documentation/devicetree/bindings/power/power_domain.txt
[3] Documentation/devicetree/bindings/thermal/thermal.txt
[4] Documentation/devicetree/bindings/sram/sram.txt
[5] Documentation/devicetree/bindings/reset/reset.txt

Example:

@@ -152,6 +163,11 @@ firmware {
			reg = <0x15>;
			#thermal-sensor-cells = <1>;
		};

		scmi_reset: protocol@16 {
			reg = <0x16>;
			#reset-cells = <1>;
		};
	};
};

@@ -166,6 +182,7 @@ hdlcd@7ff60000 {
	reg = <0 0x7ff60000 0 0x1000>;
	clocks = <&scmi_clk 4>;
	power-domains = <&scmi_devpd 1>;
	resets = <&scmi_reset 10>;
};

thermal-zones {
+1 −0
Original line number Diff line number Diff line
@@ -15557,6 +15557,7 @@ F: drivers/clk/clk-sc[mp]i.c
F:	drivers/cpufreq/sc[mp]i-cpufreq.c
F:	drivers/firmware/arm_scpi.c
F:	drivers/firmware/arm_scmi/
F:	drivers/reset/reset-scmi.c
F:	include/linux/sc[mp]i_protocol.h

SYSTEM RESET/SHUTDOWN DRIVERS
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ static int scmi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
{
	struct scmi_clk *clk = to_scmi_clk(hw);

	return clk->handle->clk_ops->rate_set(clk->handle, clk->id, 0, rate);
	return clk->handle->clk_ops->rate_set(clk->handle, clk->id, rate);
}

static int scmi_clk_enable(struct clk_hw *hw)
+1 −1
Original line number Diff line number Diff line
@@ -2,5 +2,5 @@
obj-y	= scmi-bus.o scmi-driver.o scmi-protocols.o
scmi-bus-y = bus.o
scmi-driver-y = driver.o
scmi-protocols-y = base.o clock.o perf.o power.o sensors.o
scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o
obj-$(CONFIG_ARM_SCMI_POWER_DOMAIN) += scmi_pm_domain.o
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ static int scmi_base_discover_agent_get(const struct scmi_handle *handle,
	if (ret)
		return ret;

	*(__le32 *)t->tx.buf = cpu_to_le32(id);
	put_unaligned_le32(id, t->tx.buf);

	ret = scmi_do_xfer(handle, t);
	if (!ret)
Loading