u-boot/drivers/firmware/scmi
Patrick Delaunay 55b0affd26 firmware: scmi: use protocol node name to bind the scmi regulator driver
In scmi firmware driver, it is better to bind the scmi protocol driver
"scmi_voltage_domain" with the node name of the protocol 17 and not
the sub-node named "regulator", because is a fixed string which doesn't
provide information and because it is not aligned with the other scmi
protocol nodes.

For example on stm32mp135f-dk board with device tree in stm32mp131.dtsi

scmi: scmi {
	compatible = "linaro,scmi-optee";
	#address-cells = <1>;
	#size-cells = <0>;
	linaro,optee-channel-id = <0>;
	shmem = <&scmi_shm>;
	scmi_clk: protocol@14 {
		reg = <0x14>;
		#clock-cells = <1>;
	};
	scmi_reset: protocol@16 {
		reg = <0x16>;
		#reset-cells = <1>;
	};
	scmi_voltd: protocol@17 {
		reg = <0x17>;
		scmi_regu: regulators {
			#address-cells = <1>;
			#size-cells = <0>;
			scmi_reg11: voltd-reg11 {
				reg = <VOLTD_SCMI_REG11>;
				regulator-name = "reg11";
			};
			scmi_reg18: voltd-reg18 {
				reg = <VOLTD_SCMI_REG18>;
				regulator-name = "reg18";
			};
			scmi_usb33: voltd-usb33 {
				reg = <VOLTD_SCMI_USB33>;
				regulator-name = "usb33";
			};
		};
	};
};

Before the patch:

> dm tree

 scmi_agent    0  [ + ]   scmi-over-optee       |-- scmi
 clk           1  [ + ]   scmi_clk              |   |-- protocol@14
 ...
 reset         1  [   ]   scmi_reset_domain     |   |-- protocol@16
 nop           2  [ + ]   scmi_voltage_domain   |   `-- regulators
 regulator     0  [ + ]   scmi_regulator        |       |-- voltd-reg11
 regulator     1  [ + ]   scmi_regulator        |       |-- voltd-reg18
 regulator     2  [ + ]   scmi_regulator        |       |-- voltd-usb33
 ...

after the patch:

> dm tree

 scmi_agent    0  [ + ]   scmi-over-optee       |-- scmi
 clk           1  [ + ]   scmi_clk              |   |-- protocol@14
 ...
 reset         1  [   ]   scmi_reset_domain     |   |-- protocol@16
 nop           2  [ + ]   scmi_voltage_domain   |   `-- protocol@17
 regulator     0  [ + ]   scmi_regulator        |       |-- voltd-reg11
 regulator     1  [ + ]   scmi_regulator        |       |-- voltd-reg18
 regulator     2  [ + ]   scmi_regulator        |       |-- voltd-usb33
 ...

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-08 09:29:02 -05:00
..
Kconfig firmware: scmi: Add OP-TEE transport 2021-11-23 13:54:43 -05:00
mailbox_agent.c firmware: scmi: fix the multi channel support with CCF 2022-10-12 08:55:31 -04:00
Makefile firmware: scmi: Add OP-TEE transport 2021-11-23 13:54:43 -05:00
optee_agent.c firmware: scmi: fix the multi channel support with CCF 2022-10-12 08:55:31 -04:00
sandbox-scmi_agent.c firmware: scmi: prepare uclass to pass channel reference 2022-06-23 13:12:55 -04:00
sandbox-scmi_devices.c sandbox: scmi: test against a single scmi agent 2022-03-02 17:42:06 -05:00
scmi_agent-uclass.c firmware: scmi: use protocol node name to bind the scmi regulator driver 2022-12-08 09:29:02 -05:00
smccc_agent.c firmware: scmi: fix the multi channel support with CCF 2022-10-12 08:55:31 -04:00
smt.c firmware: scmi: optee: use TEE shared memory for SCMI messages 2022-06-23 13:12:55 -04:00
smt.h firmware: scmi: optee: use TEE shared memory for SCMI messages 2022-06-23 13:12:55 -04:00