Add SCMI regulators desciption on STM32MP25
cover Add SCMI regulators desciption on STM32MP25
Add the description for SCMI regulators provided by OP-TEE firmware. The binding file named st,stm32mp25-regulator.h will be also used in the OP-TEE firmware.
Pascal Paillet (4):
dt-bindings: add STM32MP25 regulator bindings
arm64: dts: st: add scmi regulators on stm32mp25
arm64: dts: st: describe power supplies for stm32mp257f-ev1 board
arm64: stm32: enable scmi regulator for stm32
arch/arm64/Kconfig.platforms | 1 + arch/arm64/boot/dts/st/stm32mp251.dtsi | 35 ++++++++++++++ arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 43 +++++++++++++---- .../regulator/st,stm32mp25-regulator.h | 48 +++++++++++++++++++ 4 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 include/dt-bindings/regulator/st,stm32mp25-regulator.h
Signature · 1 line
2.34.1
PATCH 1/4 dt-bindings: add STM32MP25 regulator bindings
These bindings will be used for the SCMI voltage domain.
--- .../regulator/st,stm32mp25-regulator.h | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/dt-bindings/regulator/st,stm32mp25-regulator.h
include/dt-bindings/regulator/st,stm32mp25-regulator.h new file +48 -0
@@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Copyright (C) 2024, STMicroelectronics - All Rights Reserved +*/ + +#ifndef __DT_BINDINGS_REGULATOR_ST_STM32MP25_REGULATOR_H +#define __DT_BINDINGS_REGULATOR_ST_STM32MP25_REGULATOR_H + +/* SCMI voltage domains identifiers */ + +/* SOC Internal regulators */ +#define VOLTD_SCMI_VDDIO1 0 +#define VOLTD_SCMI_VDDIO2 1 +#define VOLTD_SCMI_VDDIO3 2 +#define VOLTD_SCMI_VDDIO4 3 +#define VOLTD_SCMI_VDDIO 4 +#define VOLTD_SCMI_UCPD 5 +#define VOLTD_SCMI_USB33 6 +#define VOLTD_SCMI_ADC 7 +#define VOLTD_SCMI_GPU 8 +#define VOLTD_SCMI_VREFBUF 9 + +/* STPMIC2 regulators */ +#define VOLTD_SCMI_STPMIC2_BUCK1 10 +#define VOLTD_SCMI_STPMIC2_BUCK2 11 +#define VOLTD_SCMI_STPMIC2_BUCK3 12 +#define VOLTD_SCMI_STPMIC2_BUCK4 13 +#define VOLTD_SCMI_STPMIC2_BUCK5 14 +#define VOLTD_SCMI_STPMIC2_BUCK6 15 +#define VOLTD_SCMI_STPMIC2_BUCK7 16 +#define VOLTD_SCMI_STPMIC2_LDO1 17 +#define VOLTD_SCMI_STPMIC2_LDO2 18 +#define VOLTD_SCMI_STPMIC2_LDO3 19 +#define VOLTD_SCMI_STPMIC2_LDO4 20 +#define VOLTD_SCMI_STPMIC2_LDO5 21 +#define VOLTD_SCMI_STPMIC2_LDO6 22 +#define VOLTD_SCMI_STPMIC2_LDO7 23 +#define VOLTD_SCMI_STPMIC2_LDO8 24 +#define VOLTD_SCMI_STPMIC2_REFDDR 25 + +/* External regulators */ +#define VOLTD_SCMI_REGU0 26 +#define VOLTD_SCMI_REGU1 27 +#define VOLTD_SCMI_REGU2 28 +#define VOLTD_SCMI_REGU3 29 +#define VOLTD_SCMI_REGU4 30 + +#endif /*__DT_BINDINGS_REGULATOR_ST_STM32MP25_REGULATOR_H */
Signature · 1 line
2.34.1
PATCH 2/4 arm64: dts: st: add scmi regulators on stm32mp25
In reply to Pascal PailletAdd SCMI regulators description on STM32MP25.
--- arch/arm64/boot/dts/st/stm32mp251.dtsi | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/st/stm32mp251.dtsi +35 -0
@@ -6,6 +6,7 @@ #include <dt-bindings/clock/st,stm32mp25-rcc.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/reset/st,stm32mp25-rcc.h> +#include <dt-bindings/regulator/st,stm32mp25-regulator.h> / { #address-cells = <2>;
@@ -75,6 +76,40 @@ 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_vddio1: regulator@0 { + reg = <VOLTD_SCMI_VDDIO1>; + regulator-name = "vddio1"; + }; + scmi_vddio2: regulator@1 { + reg = <VOLTD_SCMI_VDDIO2>; + regulator-name = "vddio2"; + }; + scmi_vddio3: regulator@2 { + reg = <VOLTD_SCMI_VDDIO3>; + regulator-name = "vddio3"; + }; + scmi_vddio4: regulator@3 { + reg = <VOLTD_SCMI_VDDIO4>; + regulator-name = "vddio4"; + }; + scmi_vdd33ucpd: regulator@5 { + reg = <VOLTD_SCMI_UCPD>; + regulator-name = "vdd33ucpd"; + }; + scmi_vdda18adc: regulator@7 { + reg = <VOLTD_SCMI_ADC>; + regulator-name = "vdda18adc"; + }; + }; + }; }; };
Signature · 1 line
2.34.1
PATCH 3/4 arm64: dts: st: describe power supplies for stm32mp257f-ev1 board
In reply to Pascal PailletDescribe power supplies for stm32mp257f-ev1 board.
--- arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 43 +++++++++++++++++----- 1 file changed, 34 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts +34 -9
@@ -7,6 +7,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/regulator/st,stm32mp25-regulator.h> #include "stm32mp257.dtsi" #include "stm32mp25xf.dtsi" #include "stm32mp25-pinctrl.dtsi"
@@ -41,14 +42,6 @@ fw@80000000 { no-map; }; }; - - vdd_sdcard: vdd-sdcard { - compatible = "regulator-fixed"; - regulator-name = "vdd_sdcard"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; }; &arm_wdt {
@@ -56,6 +49,37 @@ &arm_wdt { status = "okay"; }; +&scmi_regu { + scmi_vddio1: regulator@0 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + scmi_vddcore: regulator@11 { + reg = <VOLTD_SCMI_STPMIC2_BUCK2>; + regulator-name = "vddcore"; + }; + scmi_v1v8: regulator@14 { + reg = <VOLTD_SCMI_STPMIC2_BUCK5>; + regulator-name = "v1v8"; + }; + scmi_v3v3: regulator@16 { + reg = <VOLTD_SCMI_STPMIC2_BUCK7>; + regulator-name = "v3v3"; + }; + scmi_vdd_emmc: regulator@18 { + reg = <VOLTD_SCMI_STPMIC2_LDO2>; + regulator-name = "vdd_emmc"; + }; + scmi_vdd3v3_usb: regulator@20 { + reg = <VOLTD_SCMI_STPMIC2_LDO4>; + regulator-name = "vdd3v3_usb"; + }; + scmi_vdd_sdcard: regulator@23 { + reg = <VOLTD_SCMI_STPMIC2_LDO7>; + regulator-name = "vdd_sdcard"; + }; +}; + &i2c2 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&i2c2_pins_a>;
@@ -85,7 +109,8 @@ &sdmmc1 { disable-wp; st,neg-edge; bus-width = <4>; - vmmc-supply = <&vdd_sdcard>; + vmmc-supply = <&scmi_vdd_sdcard>; + vqmmc-supply = <&scmi_vddio1>; status = "okay"; };
Signature · 1 line
2.34.1
PATCH 4/4 arm64: stm32: enable scmi regulator for stm32
In reply to Pascal PailletAdd SCMI ARM REGULATOR configuration for stm32.
--- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
@@ -312,6 +312,7 @@ config ARCH_STM32 select STM32_EXTI select ARM_SMC_MBOX select ARM_SCMI_PROTOCOL + select REGULATOR_ARM_SCMI select COMMON_CLK_SCMI select STM32_FIREWALL help
Signature · 1 line
2.34.1
Re: [PATCH 1/4] dt-bindings: add STM32MP25 regulator bindings
In reply to Pascal PailletQuoted 3 lines · Pascal Paillet
These bindings will be used for the SCMI voltage domain.
Signed-off-by Pascal Paillet <[email protected]>
Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
regulator: dt-bindings:
A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
Quoted 1 line
---
Best regards,
Krzysztof
kernel test robot
build botRe: [PATCH 4/4] arm64: stm32: enable scmi regulator for stm32
In reply to Pascal Pailletkernel test robot noticed the following build warnings:
Hi Pascal,
kernel test robot noticed the following build warnings:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on atorgue-stm32/stm32-next robh/for-next linus/master v6.10-rc4 next-20240620] [cannot apply to arm-perf/for-next/perf]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pascal-Paillet/dt-bindings-add-STM32MP25-regulator-bindings/20240619-163908 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core patch link: https://lore.kernel.org/r/20240619083602.33007-5-p.paillet%40foss.st.com patch subject: [PATCH 4/4] arm64: stm32: enable scmi regulator for stm32 config: arm64-kismet-CONFIG_REGULATOR_ARM_SCMI-CONFIG_ARCH_STM32-0-0 (https://download.01.org/0day-ci/archive/20240621/[email protected]/config) reproduce: (https://download.01.org/0day-ci/archive/20240621/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for REGULATOR_ARM_SCMI when selected by ARCH_STM32
WARNING: unmet direct dependencies detected for REGULATOR_ARM_SCMI
Depends on [n]: REGULATOR [=n] && ARM_SCMI_PROTOCOL [=y] && OF [=y] Selected by [y]:
- ARCH_STM32 [=y]
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki