All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Add SCMI version of ST boards
@ 2022-04-22 15:09 ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

The aim of this series is to add OPTEE and SCMI support for STM32 boards in
order to enable secure services for clocks and resets. New boards have been added
to enable this support in order to not break boot of current STM32 boards users. 

This series targets only boards provided by ST which are:
-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

Some modifications in bindings files (yaml and .h) was needed and OPTEE/TEE
configs are now enabled by default for ARCH_STM32 architecture.

Note that patch [1] "dt-bindings: rcc: Add optional external ethernet RX clock
properties" done by Marek has been already merged in Rob tree.

Thanks
Alex

Alexandre Torgue (7):
  dt-bindings: clock: stm32mp1: describes clocks if
    "st,stm32mp1-rcc-secure"
  dt-bindings: clock: stm32mp15: rename CK_SCMI define
  dt-bindings: reset: stm32mp15: rename RST_SCMI define
  ARM: stm32: select OPTEE on MPU family
  ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  dt-bindings: arm: stm32: Add SCMI version of STM32 boards
    (DK1/DK2/ED1/EV1)
  ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)

Marek Vasut (1):
  dt-bindings: rcc: Add optional external ethernet RX clock properties

 .../devicetree/bindings/arm/stm32/stm32.yaml  |  17 +++
 .../bindings/clock/st,stm32mp1-rcc.yaml       |  34 ++++++
 arch/arm/boot/dts/Makefile                    |   4 +
 arch/arm/boot/dts/stm32mp151.dtsi             |  41 +++++++
 arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts    |  86 +++++++++++++++
 arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts    |  95 +++++++++++++++++
 arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts    |  91 ++++++++++++++++
 arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts    | 100 ++++++++++++++++++
 arch/arm/mach-stm32/Kconfig                   |   2 +
 include/dt-bindings/clock/stm32mp1-clks.h     |  46 ++++----
 include/dt-bindings/reset/stm32mp1-resets.h   |  24 ++---
 11 files changed, 503 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts

-- 
2.17.1


^ permalink raw reply	[flat|nested] 62+ messages in thread

* [PATCH 0/8] Add SCMI version of ST boards
@ 2022-04-22 15:09 ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

The aim of this series is to add OPTEE and SCMI support for STM32 boards in
order to enable secure services for clocks and resets. New boards have been added
to enable this support in order to not break boot of current STM32 boards users. 

This series targets only boards provided by ST which are:
-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

Some modifications in bindings files (yaml and .h) was needed and OPTEE/TEE
configs are now enabled by default for ARCH_STM32 architecture.

Note that patch [1] "dt-bindings: rcc: Add optional external ethernet RX clock
properties" done by Marek has been already merged in Rob tree.

Thanks
Alex

Alexandre Torgue (7):
  dt-bindings: clock: stm32mp1: describes clocks if
    "st,stm32mp1-rcc-secure"
  dt-bindings: clock: stm32mp15: rename CK_SCMI define
  dt-bindings: reset: stm32mp15: rename RST_SCMI define
  ARM: stm32: select OPTEE on MPU family
  ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  dt-bindings: arm: stm32: Add SCMI version of STM32 boards
    (DK1/DK2/ED1/EV1)
  ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)

Marek Vasut (1):
  dt-bindings: rcc: Add optional external ethernet RX clock properties

 .../devicetree/bindings/arm/stm32/stm32.yaml  |  17 +++
 .../bindings/clock/st,stm32mp1-rcc.yaml       |  34 ++++++
 arch/arm/boot/dts/Makefile                    |   4 +
 arch/arm/boot/dts/stm32mp151.dtsi             |  41 +++++++
 arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts    |  86 +++++++++++++++
 arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts    |  95 +++++++++++++++++
 arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts    |  91 ++++++++++++++++
 arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts    | 100 ++++++++++++++++++
 arch/arm/mach-stm32/Kconfig                   |   2 +
 include/dt-bindings/clock/stm32mp1-clks.h     |  46 ++++----
 include/dt-bindings/reset/stm32mp1-resets.h   |  24 ++---
 11 files changed, 503 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

From: Marek Vasut <marex@denx.de>

Describe optional external ethernet RX clock in the DT binding
to fix dtbs_check warnings like:

arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: rcc@50000000: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Cc: Rob Herring <robh+dt@kernel.org>
To: devicetree@vger.kernel.org
Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>

diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
index a0ae4867ed27..7a251264582d 100644
--- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
+++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
@@ -59,6 +59,14 @@ properties:
           - st,stm32mp1-rcc
       - const: syscon
 
+  clocks:
+    description:
+      Specifies the external RX clock for ethernet MAC.
+    maxItems: 1
+
+  clock-names:
+    const: ETH_RX_CLK/ETH_REF_CLK
+
   reg:
     maxItems: 1
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

From: Marek Vasut <marex@denx.de>

Describe optional external ethernet RX clock in the DT binding
to fix dtbs_check warnings like:

arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: rcc@50000000: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Cc: Rob Herring <robh+dt@kernel.org>
To: devicetree@vger.kernel.org
Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>

diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
index a0ae4867ed27..7a251264582d 100644
--- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
+++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
@@ -59,6 +59,14 @@ properties:
           - st,stm32mp1-rcc
       - const: syscon
 
+  clocks:
+    description:
+      Specifies the external RX clock for ethernet MAC.
+    maxItems: 1
+
+  clock-names:
+    const: ETH_RX_CLK/ETH_REF_CLK
+
   reg:
     maxItems: 1
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
security support hardened), "clocks" and "clock-names" describe oscillators
and are required.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
index 7a251264582d..bb0e0b92e907 100644
--- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
+++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
@@ -58,14 +58,8 @@ properties:
           - st,stm32mp1-rcc-secure
           - st,stm32mp1-rcc
       - const: syscon
-
-  clocks:
-    description:
-      Specifies the external RX clock for ethernet MAC.
-    maxItems: 1
-
-  clock-names:
-    const: ETH_RX_CLK/ETH_REF_CLK
+  clocks: true
+  clock-names: true
 
   reg:
     maxItems: 1
@@ -76,6 +70,38 @@ required:
   - compatible
   - reg
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - st,stm32mp1-rcc-secure
+then:
+  properties:
+    clocks:
+      description: Specifies oscillators.
+      maxItems: 5
+
+    clock-names:
+      items:
+        - const: hse
+        - const: hsi
+        - const: csi
+        - const: lse
+        - const: lsi
+  required:
+    - clocks
+    - clock-names
+else:
+  properties:
+    clocks:
+      description:
+        Specifies the external RX clock for ethernet MAC.
+      maxItems: 1
+
+    clock-names:
+      const: ETH_RX_CLK/ETH_REF_CLK
+
 additionalProperties: false
 
 examples:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
security support hardened), "clocks" and "clock-names" describe oscillators
and are required.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
index 7a251264582d..bb0e0b92e907 100644
--- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
+++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
@@ -58,14 +58,8 @@ properties:
           - st,stm32mp1-rcc-secure
           - st,stm32mp1-rcc
       - const: syscon
-
-  clocks:
-    description:
-      Specifies the external RX clock for ethernet MAC.
-    maxItems: 1
-
-  clock-names:
-    const: ETH_RX_CLK/ETH_REF_CLK
+  clocks: true
+  clock-names: true
 
   reg:
     maxItems: 1
@@ -76,6 +70,38 @@ required:
   - compatible
   - reg
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - st,stm32mp1-rcc-secure
+then:
+  properties:
+    clocks:
+      description: Specifies oscillators.
+      maxItems: 5
+
+    clock-names:
+      items:
+        - const: hse
+        - const: hsi
+        - const: csi
+        - const: lse
+        - const: lsi
+  required:
+    - clocks
+    - clock-names
+else:
+  properties:
+    clocks:
+      description:
+        Specifies the external RX clock for ethernet MAC.
+      maxItems: 1
+
+    clock-names:
+      const: ETH_RX_CLK/ETH_REF_CLK
+
 additionalProperties: false
 
 examples:
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 3/8] dt-bindings: clock: stm32mp15: rename CK_SCMI define
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

As we only have one SCMI instance, it's not necessary to add an index to
the name.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/include/dt-bindings/clock/stm32mp1-clks.h b/include/dt-bindings/clock/stm32mp1-clks.h
index e02770b98e6c..25e8cfd43459 100644
--- a/include/dt-bindings/clock/stm32mp1-clks.h
+++ b/include/dt-bindings/clock/stm32mp1-clks.h
@@ -249,30 +249,26 @@
 #define STM32MP1_LAST_CLK 232
 
 /* SCMI clock identifiers */
-#define CK_SCMI0_HSE		0
-#define CK_SCMI0_HSI		1
-#define CK_SCMI0_CSI		2
-#define CK_SCMI0_LSE		3
-#define CK_SCMI0_LSI		4
-#define CK_SCMI0_PLL2_Q		5
-#define CK_SCMI0_PLL2_R		6
-#define CK_SCMI0_MPU		7
-#define CK_SCMI0_AXI		8
-#define CK_SCMI0_BSEC		9
-#define CK_SCMI0_CRYP1		10
-#define CK_SCMI0_GPIOZ		11
-#define CK_SCMI0_HASH1		12
-#define CK_SCMI0_I2C4		13
-#define CK_SCMI0_I2C6		14
-#define CK_SCMI0_IWDG1		15
-#define CK_SCMI0_RNG1		16
-#define CK_SCMI0_RTC		17
-#define CK_SCMI0_RTCAPB		18
-#define CK_SCMI0_SPI6		19
-#define CK_SCMI0_USART1		20
-
-#define CK_SCMI1_PLL3_Q		0
-#define CK_SCMI1_PLL3_R		1
-#define CK_SCMI1_MCU		2
+#define CK_SCMI_HSE		0
+#define CK_SCMI_HSI		1
+#define CK_SCMI_CSI		2
+#define CK_SCMI_LSE		3
+#define CK_SCMI_LSI		4
+#define CK_SCMI_PLL2_Q		5
+#define CK_SCMI_PLL2_R		6
+#define CK_SCMI_MPU		7
+#define CK_SCMI_AXI		8
+#define CK_SCMI_BSEC		9
+#define CK_SCMI_CRYP1		10
+#define CK_SCMI_GPIOZ		11
+#define CK_SCMI_HASH1		12
+#define CK_SCMI_I2C4		13
+#define CK_SCMI_I2C6		14
+#define CK_SCMI_IWDG1		15
+#define CK_SCMI_RNG1		16
+#define CK_SCMI_RTC		17
+#define CK_SCMI_RTCAPB		18
+#define CK_SCMI_SPI6		19
+#define CK_SCMI_USART1		20
 
 #endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 3/8] dt-bindings: clock: stm32mp15: rename CK_SCMI define
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

As we only have one SCMI instance, it's not necessary to add an index to
the name.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/include/dt-bindings/clock/stm32mp1-clks.h b/include/dt-bindings/clock/stm32mp1-clks.h
index e02770b98e6c..25e8cfd43459 100644
--- a/include/dt-bindings/clock/stm32mp1-clks.h
+++ b/include/dt-bindings/clock/stm32mp1-clks.h
@@ -249,30 +249,26 @@
 #define STM32MP1_LAST_CLK 232
 
 /* SCMI clock identifiers */
-#define CK_SCMI0_HSE		0
-#define CK_SCMI0_HSI		1
-#define CK_SCMI0_CSI		2
-#define CK_SCMI0_LSE		3
-#define CK_SCMI0_LSI		4
-#define CK_SCMI0_PLL2_Q		5
-#define CK_SCMI0_PLL2_R		6
-#define CK_SCMI0_MPU		7
-#define CK_SCMI0_AXI		8
-#define CK_SCMI0_BSEC		9
-#define CK_SCMI0_CRYP1		10
-#define CK_SCMI0_GPIOZ		11
-#define CK_SCMI0_HASH1		12
-#define CK_SCMI0_I2C4		13
-#define CK_SCMI0_I2C6		14
-#define CK_SCMI0_IWDG1		15
-#define CK_SCMI0_RNG1		16
-#define CK_SCMI0_RTC		17
-#define CK_SCMI0_RTCAPB		18
-#define CK_SCMI0_SPI6		19
-#define CK_SCMI0_USART1		20
-
-#define CK_SCMI1_PLL3_Q		0
-#define CK_SCMI1_PLL3_R		1
-#define CK_SCMI1_MCU		2
+#define CK_SCMI_HSE		0
+#define CK_SCMI_HSI		1
+#define CK_SCMI_CSI		2
+#define CK_SCMI_LSE		3
+#define CK_SCMI_LSI		4
+#define CK_SCMI_PLL2_Q		5
+#define CK_SCMI_PLL2_R		6
+#define CK_SCMI_MPU		7
+#define CK_SCMI_AXI		8
+#define CK_SCMI_BSEC		9
+#define CK_SCMI_CRYP1		10
+#define CK_SCMI_GPIOZ		11
+#define CK_SCMI_HASH1		12
+#define CK_SCMI_I2C4		13
+#define CK_SCMI_I2C6		14
+#define CK_SCMI_IWDG1		15
+#define CK_SCMI_RNG1		16
+#define CK_SCMI_RTC		17
+#define CK_SCMI_RTCAPB		18
+#define CK_SCMI_SPI6		19
+#define CK_SCMI_USART1		20
 
 #endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 4/8] dt-bindings: reset: stm32mp15: rename RST_SCMI define
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

As we only have one SCMI instance, it's not necessary to add an index to
the name.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/include/dt-bindings/reset/stm32mp1-resets.h b/include/dt-bindings/reset/stm32mp1-resets.h
index f3a0ed317835..4ffa7c3612e6 100644
--- a/include/dt-bindings/reset/stm32mp1-resets.h
+++ b/include/dt-bindings/reset/stm32mp1-resets.h
@@ -107,17 +107,17 @@
 #define GPIOK_R		19786
 
 /* SCMI reset domain identifiers */
-#define RST_SCMI0_SPI6		0
-#define RST_SCMI0_I2C4		1
-#define RST_SCMI0_I2C6		2
-#define RST_SCMI0_USART1	3
-#define RST_SCMI0_STGEN		4
-#define RST_SCMI0_GPIOZ		5
-#define RST_SCMI0_CRYP1		6
-#define RST_SCMI0_HASH1		7
-#define RST_SCMI0_RNG1		8
-#define RST_SCMI0_MDMA		9
-#define RST_SCMI0_MCU		10
-#define RST_SCMI0_MCU_HOLD_BOOT	11
+#define RST_SCMI_SPI6		0
+#define RST_SCMI_I2C4		1
+#define RST_SCMI_I2C6		2
+#define RST_SCMI_USART1	3
+#define RST_SCMI_STGEN		4
+#define RST_SCMI_GPIOZ		5
+#define RST_SCMI_CRYP1		6
+#define RST_SCMI_HASH1		7
+#define RST_SCMI_RNG1		8
+#define RST_SCMI_MDMA		9
+#define RST_SCMI_MCU		10
+#define RST_SCMI_MCU_HOLD_BOOT	11
 
 #endif /* _DT_BINDINGS_STM32MP1_RESET_H_ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 4/8] dt-bindings: reset: stm32mp15: rename RST_SCMI define
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

As we only have one SCMI instance, it's not necessary to add an index to
the name.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/include/dt-bindings/reset/stm32mp1-resets.h b/include/dt-bindings/reset/stm32mp1-resets.h
index f3a0ed317835..4ffa7c3612e6 100644
--- a/include/dt-bindings/reset/stm32mp1-resets.h
+++ b/include/dt-bindings/reset/stm32mp1-resets.h
@@ -107,17 +107,17 @@
 #define GPIOK_R		19786
 
 /* SCMI reset domain identifiers */
-#define RST_SCMI0_SPI6		0
-#define RST_SCMI0_I2C4		1
-#define RST_SCMI0_I2C6		2
-#define RST_SCMI0_USART1	3
-#define RST_SCMI0_STGEN		4
-#define RST_SCMI0_GPIOZ		5
-#define RST_SCMI0_CRYP1		6
-#define RST_SCMI0_HASH1		7
-#define RST_SCMI0_RNG1		8
-#define RST_SCMI0_MDMA		9
-#define RST_SCMI0_MCU		10
-#define RST_SCMI0_MCU_HOLD_BOOT	11
+#define RST_SCMI_SPI6		0
+#define RST_SCMI_I2C4		1
+#define RST_SCMI_I2C6		2
+#define RST_SCMI_USART1	3
+#define RST_SCMI_STGEN		4
+#define RST_SCMI_GPIOZ		5
+#define RST_SCMI_CRYP1		6
+#define RST_SCMI_HASH1		7
+#define RST_SCMI_RNG1		8
+#define RST_SCMI_MDMA		9
+#define RST_SCMI_MCU		10
+#define RST_SCMI_MCU_HOLD_BOOT	11
 
 #endif /* _DT_BINDINGS_STM32MP1_RESET_H_ */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 5/8] ARM: stm32: select OPTEE on MPU family
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Select CONFIG_OPTEE for STM32MP15 and STM32MP13 by default. Final
activation will done thanks to device tree.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index 98145031586f..b322cf2a136f 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -6,6 +6,8 @@ menuconfig ARCH_STM32
 	select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
 	select ARM_GIC if ARCH_MULTI_V7
 	select ARM_PSCI if ARCH_MULTI_V7
+	select TEE if ARCH_MULTI_V7
+	select OPTEE if ARCH_MULTI_V7
 	select ARM_AMBA
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_STM32
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 5/8] ARM: stm32: select OPTEE on MPU family
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Select CONFIG_OPTEE for STM32MP15 and STM32MP13 by default. Final
activation will done thanks to device tree.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index 98145031586f..b322cf2a136f 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -6,6 +6,8 @@ menuconfig ARCH_STM32
 	select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
 	select ARM_GIC if ARCH_MULTI_V7
 	select ARM_PSCI if ARCH_MULTI_V7
+	select TEE if ARCH_MULTI_V7
+	select OPTEE if ARCH_MULTI_V7
 	select ARM_AMBA
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_STM32
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Enable optee and SCMI clocks/reset protocols support.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
index 7fdc324b3cf9..1b2fd3426a81 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -115,6 +115,33 @@
 		status = "disabled";
 	};
 
+	firmware {
+		optee: optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+			status = "disabled";
+		};
+
+		scmi: scmi {
+			compatible = "linaro,scmi-optee";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			linaro,optee-channel-id = <0>;
+			shmem = <&scmi_shm>;
+			status = "disabled";
+
+			scmi_clk: protocol@14 {
+				reg = <0x14>;
+				#clock-cells = <1>;
+			};
+
+			scmi_reset: protocol@16 {
+				reg = <0x16>;
+				#reset-cells = <1>;
+			};
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -122,6 +149,20 @@
 		interrupt-parent = <&intc>;
 		ranges;
 
+		scmi_sram: sram@2ffff000 {
+			compatible = "mmio-sram";
+			reg = <0x2ffff000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x2ffff000 0x1000>;
+
+			scmi_shm: scmi-sram@0 {
+				compatible = "arm,scmi-shmem";
+				reg = <0 0x80>;
+				status = "disabled";
+			};
+		};
+
 		timers2: timer@40000000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Enable optee and SCMI clocks/reset protocols support.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
index 7fdc324b3cf9..1b2fd3426a81 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -115,6 +115,33 @@
 		status = "disabled";
 	};
 
+	firmware {
+		optee: optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+			status = "disabled";
+		};
+
+		scmi: scmi {
+			compatible = "linaro,scmi-optee";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			linaro,optee-channel-id = <0>;
+			shmem = <&scmi_shm>;
+			status = "disabled";
+
+			scmi_clk: protocol@14 {
+				reg = <0x14>;
+				#clock-cells = <1>;
+			};
+
+			scmi_reset: protocol@16 {
+				reg = <0x16>;
+				#reset-cells = <1>;
+			};
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -122,6 +149,20 @@
 		interrupt-parent = <&intc>;
 		ranges;
 
+		scmi_sram: sram@2ffff000 {
+			compatible = "mmio-sram";
+			reg = <0x2ffff000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x2ffff000 0x1000>;
+
+			scmi_shm: scmi-sram@0 {
+				compatible = "arm,scmi-shmem";
+				reg = <0 0x80>;
+				status = "disabled";
+			};
+		};
+
 		timers2: timer@40000000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 7/8] dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Add a "secure" version based on SCMI of STM32 boards. Only boards
provided by STMicroelectronics are concerned:

-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
index fa0a1b84122e..4a3d66da0f1c 100644
--- a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
@@ -75,6 +75,23 @@ properties:
 
           - const: st,stm32mp157
       - items:
+          - const: st,stm32mp157a-dk1-scmi
+          - const: st,stm32mp157a-dk1
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-dk2-scmi
+          - const: st,stm32mp157c-dk2
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-ed1-scmi
+          - const: st,stm32mp157c-ed1
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-ev1
+          - const: st,stm32mp157c-ed1
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-ev1-scmi
           - const: st,stm32mp157c-ev1
           - const: st,stm32mp157c-ed1
           - const: st,stm32mp157
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 7/8] dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Add a "secure" version based on SCMI of STM32 boards. Only boards
provided by STMicroelectronics are concerned:

-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
index fa0a1b84122e..4a3d66da0f1c 100644
--- a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
@@ -75,6 +75,23 @@ properties:
 
           - const: st,stm32mp157
       - items:
+          - const: st,stm32mp157a-dk1-scmi
+          - const: st,stm32mp157a-dk1
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-dk2-scmi
+          - const: st,stm32mp157c-dk2
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-ed1-scmi
+          - const: st,stm32mp157c-ed1
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-ev1
+          - const: st,stm32mp157c-ed1
+          - const: st,stm32mp157
+      - items:
+          - const: st,stm32mp157c-ev1-scmi
           - const: st,stm32mp157c-ev1
           - const: st,stm32mp157c-ed1
           - const: st,stm32mp157
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 8/8] ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-04-22 15:09   ` Alexandre Torgue
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Add a "secure" version based on SCMI of STM32 boards. Only boards
provided by STMicroelectronics are concerned:

-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7c16f8a2b738..a98b2c26f80b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1160,6 +1160,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32mp157a-avenger96.dtb \
 	stm32mp157a-dhcor-avenger96.dtb \
 	stm32mp157a-dk1.dtb \
+	stm32mp157a-dk1-scmi.dtb \
 	stm32mp157a-iot-box.dtb \
 	stm32mp157a-microgea-stm32mp1-microdev2.0.dtb \
 	stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dtb \
@@ -1170,9 +1171,12 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32mp157c-dhcom-pdk2.dtb \
 	stm32mp157c-dhcom-picoitx.dtb \
 	stm32mp157c-dk2.dtb \
+	stm32mp157c-dk2-scmi.dtb \
 	stm32mp157c-ed1.dtb \
+	stm32mp157c-ed1-scmi.dtb \
 	stm32mp157c-emsbc-argon.dtb \
 	stm32mp157c-ev1.dtb \
+	stm32mp157c-ev1-scmi.dtb \
 	stm32mp157c-lxa-mc1.dtb \
 	stm32mp157c-odyssey.dtb
 dtb-$(CONFIG_MACH_SUN4I) += \
diff --git a/arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts b/arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
new file mode 100644
index 000000000000..e3d3f3f30c7d
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157a-dk1.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board";
+	compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157a-dk1", "st,stm32mp157";
+
+	reserved-memory {
+		optee@de000000 {
+			reg = <0xde000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts b/arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
new file mode 100644
index 000000000000..45dcd299aa9e
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157c-dk2.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board";
+	compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157";
+
+	reserved-memory {
+		optee@de000000 {
+			reg = <0xde000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&dsi {
+	clocks = <&rcc DSI_K>, <&scmi_clk CK_SCMI_HSE>, <&rcc DSI_PX>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts b/arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
new file mode 100644
index 000000000000..458e0ca3cded
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157c-ed1.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157C-ED1 SCMI eval daughter";
+	compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157";
+
+	reserved-memory {
+		optee@fe000000 {
+			reg = <0xfe000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts b/arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts
new file mode 100644
index 000000000000..df9c113edb4b
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157c-ev1.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157C-EV1 SCMI eval daughter on eval mother";
+	compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ev1", "st,stm32mp157c-ed1",
+		     "st,stm32mp157";
+
+	reserved-memory {
+		optee@fe000000 {
+			reg = <0xfe000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&dsi {
+	clocks = <&rcc DSI_K>, <&scmi_clk CK_SCMI_HSE>, <&rcc DSI_PX>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&m_can1 {
+	clocks = <&scmi_clk CK_SCMI_HSE>, <&rcc FDCAN_K>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 62+ messages in thread

* [PATCH 8/8] ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
@ 2022-04-22 15:09   ` Alexandre Torgue
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre Torgue @ 2022-04-22 15:09 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, Alexandre Torgue, linux-stm32,
	linux-kernel, Marek Vasut, Ahmad Fatoum, etienne.carriere

Add a "secure" version based on SCMI of STM32 boards. Only boards
provided by STMicroelectronics are concerned:

-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7c16f8a2b738..a98b2c26f80b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1160,6 +1160,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32mp157a-avenger96.dtb \
 	stm32mp157a-dhcor-avenger96.dtb \
 	stm32mp157a-dk1.dtb \
+	stm32mp157a-dk1-scmi.dtb \
 	stm32mp157a-iot-box.dtb \
 	stm32mp157a-microgea-stm32mp1-microdev2.0.dtb \
 	stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dtb \
@@ -1170,9 +1171,12 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32mp157c-dhcom-pdk2.dtb \
 	stm32mp157c-dhcom-picoitx.dtb \
 	stm32mp157c-dk2.dtb \
+	stm32mp157c-dk2-scmi.dtb \
 	stm32mp157c-ed1.dtb \
+	stm32mp157c-ed1-scmi.dtb \
 	stm32mp157c-emsbc-argon.dtb \
 	stm32mp157c-ev1.dtb \
+	stm32mp157c-ev1-scmi.dtb \
 	stm32mp157c-lxa-mc1.dtb \
 	stm32mp157c-odyssey.dtb
 dtb-$(CONFIG_MACH_SUN4I) += \
diff --git a/arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts b/arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
new file mode 100644
index 000000000000..e3d3f3f30c7d
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157a-dk1.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board";
+	compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157a-dk1", "st,stm32mp157";
+
+	reserved-memory {
+		optee@de000000 {
+			reg = <0xde000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts b/arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
new file mode 100644
index 000000000000..45dcd299aa9e
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157c-dk2.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board";
+	compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157";
+
+	reserved-memory {
+		optee@de000000 {
+			reg = <0xde000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&dsi {
+	clocks = <&rcc DSI_K>, <&scmi_clk CK_SCMI_HSE>, <&rcc DSI_PX>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts b/arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
new file mode 100644
index 000000000000..458e0ca3cded
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157c-ed1.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157C-ED1 SCMI eval daughter";
+	compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157";
+
+	reserved-memory {
+		optee@fe000000 {
+			reg = <0xfe000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts b/arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts
new file mode 100644
index 000000000000..df9c113edb4b
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2022 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157c-ev1.dts"
+
+/ {
+	model = "STMicroelectronics STM32MP157C-EV1 SCMI eval daughter on eval mother";
+	compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ev1", "st,stm32mp157c-ed1",
+		     "st,stm32mp157";
+
+	reserved-memory {
+		optee@fe000000 {
+			reg = <0xfe000000 0x2000000>;
+			no-map;
+		};
+	};
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&dsi {
+	clocks = <&rcc DSI_K>, <&scmi_clk CK_SCMI_HSE>, <&rcc DSI_PX>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c4 {
+	clocks = <&scmi_clk CK_SCMI_I2C4>;
+	resets = <&scmi_reset RST_SCMI_I2C4>;
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+};
+
+&m_can1 {
+	clocks = <&scmi_clk CK_SCMI_HSE>, <&rcc FDCAN_K>;
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&mlahb {
+	resets = <&scmi_reset RST_SCMI_MCU>;
+};
+
+&optee {
+	status = "okay";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi {
+	status = "okay";
+};
+
+&scmi_shm {
+	status = "okay";
+};
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 62+ messages in thread

* Re: [PATCH 5/8] ARM: stm32: select OPTEE on MPU family
  2022-04-22 15:09   ` Alexandre Torgue
@ 2022-04-22 15:37     ` Ahmad Fatoum
  -1 siblings, 0 replies; 62+ messages in thread
From: Ahmad Fatoum @ 2022-04-22 15:37 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Marek Vasut, etienne.carriere, Pengutronix Kernel Team

Hello Alex,

On 22.04.22 17:09, Alexandre Torgue wrote:
> Select CONFIG_OPTEE for STM32MP15 and STM32MP13 by default. Final
> activation will done thanks to device tree.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
> index 98145031586f..b322cf2a136f 100644
> --- a/arch/arm/mach-stm32/Kconfig
> +++ b/arch/arm/mach-stm32/Kconfig
> @@ -6,6 +6,8 @@ menuconfig ARCH_STM32
>  	select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
>  	select ARM_GIC if ARCH_MULTI_V7
>  	select ARM_PSCI if ARCH_MULTI_V7
> +	select TEE if ARCH_MULTI_V7
> +	select OPTEE if ARCH_MULTI_V7

Users may want to use OPTEE as a module without it being a SCMI provider
or not use OPTEE at all. I'd prefer you drop this patch and leave it
to users to configure their kernel appropriately.

Cheers,
Ahmad


>  	select ARM_AMBA
>  	select ARCH_HAS_RESET_CONTROLLER
>  	select CLKSRC_STM32




-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 5/8] ARM: stm32: select OPTEE on MPU family
@ 2022-04-22 15:37     ` Ahmad Fatoum
  0 siblings, 0 replies; 62+ messages in thread
From: Ahmad Fatoum @ 2022-04-22 15:37 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Marek Vasut, etienne.carriere, Pengutronix Kernel Team

Hello Alex,

On 22.04.22 17:09, Alexandre Torgue wrote:
> Select CONFIG_OPTEE for STM32MP15 and STM32MP13 by default. Final
> activation will done thanks to device tree.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
> index 98145031586f..b322cf2a136f 100644
> --- a/arch/arm/mach-stm32/Kconfig
> +++ b/arch/arm/mach-stm32/Kconfig
> @@ -6,6 +6,8 @@ menuconfig ARCH_STM32
>  	select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
>  	select ARM_GIC if ARCH_MULTI_V7
>  	select ARM_PSCI if ARCH_MULTI_V7
> +	select TEE if ARCH_MULTI_V7
> +	select OPTEE if ARCH_MULTI_V7

Users may want to use OPTEE as a module without it being a SCMI provider
or not use OPTEE at all. I'd prefer you drop this patch and leave it
to users to configure their kernel appropriately.

Cheers,
Ahmad


>  	select ARM_AMBA
>  	select ARCH_HAS_RESET_CONTROLLER
>  	select CLKSRC_STM32




-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 5/8] ARM: stm32: select OPTEE on MPU family
  2022-04-22 15:37     ` Ahmad Fatoum
@ 2022-04-22 16:23       ` Alexandre TORGUE
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-04-22 16:23 UTC (permalink / raw)
  To: Ahmad Fatoum, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Marek Vasut, etienne.carriere, Pengutronix Kernel Team

Hi Ahmad,

On 4/22/22 17:37, Ahmad Fatoum wrote:
> Hello Alex,
> 
> On 22.04.22 17:09, Alexandre Torgue wrote:
>> Select CONFIG_OPTEE for STM32MP15 and STM32MP13 by default. Final
>> activation will done thanks to device tree.
>>
>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>
>> diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
>> index 98145031586f..b322cf2a136f 100644
>> --- a/arch/arm/mach-stm32/Kconfig
>> +++ b/arch/arm/mach-stm32/Kconfig
>> @@ -6,6 +6,8 @@ menuconfig ARCH_STM32
>>   	select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
>>   	select ARM_GIC if ARCH_MULTI_V7
>>   	select ARM_PSCI if ARCH_MULTI_V7
>> +	select TEE if ARCH_MULTI_V7
>> +	select OPTEE if ARCH_MULTI_V7
> 
> Users may want to use OPTEE as a module without it being a SCMI provider
> or not use OPTEE at all. I'd prefer you drop this patch and leave it
> to users to configure their kernel appropriately.
> 

Yes, I can understand, I did this one too quickly forgetting that every 
multi_v7config users will inherit of this config.

thanks
Alex

> Cheers,
> Ahmad
> 
> 
>>   	select ARM_AMBA
>>   	select ARCH_HAS_RESET_CONTROLLER
>>   	select CLKSRC_STM32
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 5/8] ARM: stm32: select OPTEE on MPU family
@ 2022-04-22 16:23       ` Alexandre TORGUE
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-04-22 16:23 UTC (permalink / raw)
  To: Ahmad Fatoum, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Marek Vasut, etienne.carriere, Pengutronix Kernel Team

Hi Ahmad,

On 4/22/22 17:37, Ahmad Fatoum wrote:
> Hello Alex,
> 
> On 22.04.22 17:09, Alexandre Torgue wrote:
>> Select CONFIG_OPTEE for STM32MP15 and STM32MP13 by default. Final
>> activation will done thanks to device tree.
>>
>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>
>> diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
>> index 98145031586f..b322cf2a136f 100644
>> --- a/arch/arm/mach-stm32/Kconfig
>> +++ b/arch/arm/mach-stm32/Kconfig
>> @@ -6,6 +6,8 @@ menuconfig ARCH_STM32
>>   	select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
>>   	select ARM_GIC if ARCH_MULTI_V7
>>   	select ARM_PSCI if ARCH_MULTI_V7
>> +	select TEE if ARCH_MULTI_V7
>> +	select OPTEE if ARCH_MULTI_V7
> 
> Users may want to use OPTEE as a module without it being a SCMI provider
> or not use OPTEE at all. I'd prefer you drop this patch and leave it
> to users to configure their kernel appropriately.
> 

Yes, I can understand, I did this one too quickly forgetting that every 
multi_v7config users will inherit of this config.

thanks
Alex

> Cheers,
> Ahmad
> 
> 
>>   	select ARM_AMBA
>>   	select ARCH_HAS_RESET_CONTROLLER
>>   	select CLKSRC_STM32
> 
> 
> 
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties
  2022-04-22 15:09   ` Alexandre Torgue
@ 2022-04-22 16:28     ` Marek Vasut
  -1 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-22 16:28 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> From: Marek Vasut <marex@denx.de>
> 
> Describe optional external ethernet RX clock in the DT binding
> to fix dtbs_check warnings like:
> 
> arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: rcc@50000000: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> To: devicetree@vger.kernel.org
> Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
> 
> diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> index a0ae4867ed27..7a251264582d 100644
> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> @@ -59,6 +59,14 @@ properties:
>             - st,stm32mp1-rcc
>         - const: syscon
>   
> +  clocks:
> +    description:
> +      Specifies the external RX clock for ethernet MAC.
> +    maxItems: 1
> +
> +  clock-names:
> +    const: ETH_RX_CLK/ETH_REF_CLK
> +
>     reg:
>       maxItems: 1
>   

Should this patch be part of this series, maybe this was re-sent by 
accident ?

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties
@ 2022-04-22 16:28     ` Marek Vasut
  0 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-22 16:28 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> From: Marek Vasut <marex@denx.de>
> 
> Describe optional external ethernet RX clock in the DT binding
> to fix dtbs_check warnings like:
> 
> arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: rcc@50000000: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> To: devicetree@vger.kernel.org
> Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
> 
> diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> index a0ae4867ed27..7a251264582d 100644
> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> @@ -59,6 +59,14 @@ properties:
>             - st,stm32mp1-rcc
>         - const: syscon
>   
> +  clocks:
> +    description:
> +      Specifies the external RX clock for ethernet MAC.
> +    maxItems: 1
> +
> +  clock-names:
> +    const: ETH_RX_CLK/ETH_REF_CLK
> +
>     reg:
>       maxItems: 1
>   

Should this patch be part of this series, maybe this was re-sent by 
accident ?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-22 15:09   ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Alexandre Torgue
@ 2022-04-22 16:31     ` Marek Vasut
  -1 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-22 16:31 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> security support hardened), "clocks" and "clock-names" describe oscillators
> and are required.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> index 7a251264582d..bb0e0b92e907 100644
> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> @@ -58,14 +58,8 @@ properties:
>             - st,stm32mp1-rcc-secure
>             - st,stm32mp1-rcc
>         - const: syscon
> -
> -  clocks:
> -    description:
> -      Specifies the external RX clock for ethernet MAC.
> -    maxItems: 1
> -
> -  clock-names:
> -    const: ETH_RX_CLK/ETH_REF_CLK
> +  clocks: true
> +  clock-names: true

It looks like this should rather be a property than a compatible string 
-- the compatible string is used by the OS to determine which hardware 
is represented by a node, but here it is the same hardware in either 
case, "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the 
same STM32MP1 RCC block, just configured differently by some bootloader 
stage.

So why not just add one-liner property of the RCC block like ?
st,rcc-in-secure-configuration

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-04-22 16:31     ` Marek Vasut
  0 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-22 16:31 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> security support hardened), "clocks" and "clock-names" describe oscillators
> and are required.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> index 7a251264582d..bb0e0b92e907 100644
> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> @@ -58,14 +58,8 @@ properties:
>             - st,stm32mp1-rcc-secure
>             - st,stm32mp1-rcc
>         - const: syscon
> -
> -  clocks:
> -    description:
> -      Specifies the external RX clock for ethernet MAC.
> -    maxItems: 1
> -
> -  clock-names:
> -    const: ETH_RX_CLK/ETH_REF_CLK
> +  clocks: true
> +  clock-names: true

It looks like this should rather be a property than a compatible string 
-- the compatible string is used by the OS to determine which hardware 
is represented by a node, but here it is the same hardware in either 
case, "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the 
same STM32MP1 RCC block, just configured differently by some bootloader 
stage.

So why not just add one-liner property of the RCC block like ?
st,rcc-in-secure-configuration

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  2022-04-22 15:09   ` Alexandre Torgue
@ 2022-04-22 16:32     ` Marek Vasut
  -1 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-22 16:32 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> Enable optee and SCMI clocks/reset protocols support.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
> index 7fdc324b3cf9..1b2fd3426a81 100644
> --- a/arch/arm/boot/dts/stm32mp151.dtsi
> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> @@ -115,6 +115,33 @@
>   		status = "disabled";
>   	};
>   
> +	firmware {
> +		optee: optee {
> +			compatible = "linaro,optee-tz";
> +			method = "smc";
> +			status = "disabled";
> +		};

Doesn't this TEE node get automatically generated and patched into DT by 
the TEE ? I think OpTee-OS does that.

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
@ 2022-04-22 16:32     ` Marek Vasut
  0 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-22 16:32 UTC (permalink / raw)
  To: Alexandre Torgue, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> Enable optee and SCMI clocks/reset protocols support.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
> index 7fdc324b3cf9..1b2fd3426a81 100644
> --- a/arch/arm/boot/dts/stm32mp151.dtsi
> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> @@ -115,6 +115,33 @@
>   		status = "disabled";
>   	};
>   
> +	firmware {
> +		optee: optee {
> +			compatible = "linaro,optee-tz";
> +			method = "smc";
> +			status = "disabled";
> +		};

Doesn't this TEE node get automatically generated and patched into DT by 
the TEE ? I think OpTee-OS does that.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  2022-04-22 16:32     ` Marek Vasut
@ 2022-04-25 10:19       ` Etienne CARRIERE
  -1 siblings, 0 replies; 62+ messages in thread
From: Etienne CARRIERE @ 2022-04-25 10:19 UTC (permalink / raw)
  To: Marek Vasut, Alexandre TORGUE - foss, arnd, robh+dt,
	Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel, Ahmad Fatoum

Hello Marek,

> From: Marek Vasut <marex@denx.de>
> 
> > On 4/22/22 17:09, Alexandre Torgue wrote:
> > Enable optee and SCMI clocks/reset protocols support.
> > 
> > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > 
> > diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
> > b/arch/arm/boot/dts/stm32mp151.dtsi
> > index 7fdc324b3cf9..1b2fd3426a81 100644
> > --- a/arch/arm/boot/dts/stm32mp151.dtsi
> > +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> > @@ -115,6 +115,33 @@
> >                status = "disabled";
> >        };
> >   
> > +     firmware {
> > +             optee: optee {
> > +                     compatible = "linaro,optee-tz";
> > +                     method = "smc";
> > +                     status = "disabled";
> > +             };
> 
> Doesn't this TEE node get automatically generated and patched into DT by 
> the TEE ? I think OpTee-OS does that.

OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.

Etienne


^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
@ 2022-04-25 10:19       ` Etienne CARRIERE
  0 siblings, 0 replies; 62+ messages in thread
From: Etienne CARRIERE @ 2022-04-25 10:19 UTC (permalink / raw)
  To: Marek Vasut, Alexandre TORGUE - foss, arnd, robh+dt,
	Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel, Ahmad Fatoum

Hello Marek,

> From: Marek Vasut <marex@denx.de>
> 
> > On 4/22/22 17:09, Alexandre Torgue wrote:
> > Enable optee and SCMI clocks/reset protocols support.
> > 
> > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > 
> > diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
> > b/arch/arm/boot/dts/stm32mp151.dtsi
> > index 7fdc324b3cf9..1b2fd3426a81 100644
> > --- a/arch/arm/boot/dts/stm32mp151.dtsi
> > +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> > @@ -115,6 +115,33 @@
> >                status = "disabled";
> >        };
> >   
> > +     firmware {
> > +             optee: optee {
> > +                     compatible = "linaro,optee-tz";
> > +                     method = "smc";
> > +                     status = "disabled";
> > +             };
> 
> Doesn't this TEE node get automatically generated and patched into DT by 
> the TEE ? I think OpTee-OS does that.

OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.

Etienne


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  2022-04-25 10:19       ` Etienne CARRIERE
@ 2022-04-25 10:25         ` Marek Vasut
  -1 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-25 10:25 UTC (permalink / raw)
  To: Etienne CARRIERE, Alexandre TORGUE - foss, arnd, robh+dt,
	Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel, Ahmad Fatoum

On 4/25/22 12:19, Etienne CARRIERE wrote:
> Hello Marek,

Hi,

>> From: Marek Vasut <marex@denx.de>
>>
>>> On 4/22/22 17:09, Alexandre Torgue wrote:
>>> Enable optee and SCMI clocks/reset protocols support.
>>>
>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>
>>> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
>>> b/arch/arm/boot/dts/stm32mp151.dtsi
>>> index 7fdc324b3cf9..1b2fd3426a81 100644
>>> --- a/arch/arm/boot/dts/stm32mp151.dtsi
>>> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
>>> @@ -115,6 +115,33 @@
>>>                  status = "disabled";
>>>          };
>>>     
>>> +     firmware {
>>> +             optee: optee {
>>> +                     compatible = "linaro,optee-tz";
>>> +                     method = "smc";
>>> +                     status = "disabled";
>>> +             };
>>
>> Doesn't this TEE node get automatically generated and patched into DT by
>> the TEE ? I think OpTee-OS does that.
> 
> OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.

Shouldn't that be something to fix ?

I think R-Car3 does that already.

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
@ 2022-04-25 10:25         ` Marek Vasut
  0 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-25 10:25 UTC (permalink / raw)
  To: Etienne CARRIERE, Alexandre TORGUE - foss, arnd, robh+dt,
	Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel, Ahmad Fatoum

On 4/25/22 12:19, Etienne CARRIERE wrote:
> Hello Marek,

Hi,

>> From: Marek Vasut <marex@denx.de>
>>
>>> On 4/22/22 17:09, Alexandre Torgue wrote:
>>> Enable optee and SCMI clocks/reset protocols support.
>>>
>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>
>>> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
>>> b/arch/arm/boot/dts/stm32mp151.dtsi
>>> index 7fdc324b3cf9..1b2fd3426a81 100644
>>> --- a/arch/arm/boot/dts/stm32mp151.dtsi
>>> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
>>> @@ -115,6 +115,33 @@
>>>                  status = "disabled";
>>>          };
>>>     
>>> +     firmware {
>>> +             optee: optee {
>>> +                     compatible = "linaro,optee-tz";
>>> +                     method = "smc";
>>> +                     status = "disabled";
>>> +             };
>>
>> Doesn't this TEE node get automatically generated and patched into DT by
>> the TEE ? I think OpTee-OS does that.
> 
> OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.

Shouldn't that be something to fix ?

I think R-Car3 does that already.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
  2022-04-25 10:25         ` Marek Vasut
@ 2022-04-25 10:30           ` Rouven Czerwinski
  -1 siblings, 0 replies; 62+ messages in thread
From: Rouven Czerwinski @ 2022-04-25 10:30 UTC (permalink / raw)
  To: Marek Vasut, Etienne CARRIERE, Alexandre TORGUE - foss, arnd,
	robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel, Ahmad Fatoum

Hi,

On Mon, 2022-04-25 at 12:25 +0200, Marek Vasut wrote:
> On 4/25/22 12:19, Etienne CARRIERE wrote:
> > Hello Marek,
> 
> Hi,
> 
> > > From: Marek Vasut <marex@denx.de>
> > > 
> > > > On 4/22/22 17:09, Alexandre Torgue wrote:
> > > > Enable optee and SCMI clocks/reset protocols support.
> > > > 
> > > > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > > > 
> > > > diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
> > > > b/arch/arm/boot/dts/stm32mp151.dtsi
> > > > index 7fdc324b3cf9..1b2fd3426a81 100644
> > > > --- a/arch/arm/boot/dts/stm32mp151.dtsi
> > > > +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> > > > @@ -115,6 +115,33 @@
> > > >                  status = "disabled";
> > > >          };
> > > >     
> > > > +     firmware {
> > > > +             optee: optee {
> > > > +                     compatible = "linaro,optee-tz";
> > > > +                     method = "smc";
> > > > +                     status = "disabled";
> > > > +             };
> > > 
> > > Doesn't this TEE node get automatically generated and patched into DT by
> > > the TEE ? I think OpTee-OS does that.
> > 
> > OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.
> 
> Shouldn't that be something to fix ?
> 
> I think R-Car3 does that already.

FWIW it's also possible for OP-TEE to generate a device tree overlay
which can be applied by later boot stages.

Drawback is that you either need an additional parameter to pass
between boot stages (address of the DT overlay) or it needs to be
hardcoded. Hardcoding has it's own bag of drawbacks, but it's what we
do for some i.MX6 platforms within barebox. However there is no TF-A
there, so only OP-TEE and Barebox need to agree on the fixed location
beforehand.

Best regards,
Rouven Czerwinski

-- 
Pengutronix e.K.           | Rouven Czerwinski          |
Steuerwalder Str. 21       | http://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0   |


^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
@ 2022-04-25 10:30           ` Rouven Czerwinski
  0 siblings, 0 replies; 62+ messages in thread
From: Rouven Czerwinski @ 2022-04-25 10:30 UTC (permalink / raw)
  To: Marek Vasut, Etienne CARRIERE, Alexandre TORGUE - foss, arnd,
	robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel, Ahmad Fatoum

Hi,

On Mon, 2022-04-25 at 12:25 +0200, Marek Vasut wrote:
> On 4/25/22 12:19, Etienne CARRIERE wrote:
> > Hello Marek,
> 
> Hi,
> 
> > > From: Marek Vasut <marex@denx.de>
> > > 
> > > > On 4/22/22 17:09, Alexandre Torgue wrote:
> > > > Enable optee and SCMI clocks/reset protocols support.
> > > > 
> > > > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > > > 
> > > > diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
> > > > b/arch/arm/boot/dts/stm32mp151.dtsi
> > > > index 7fdc324b3cf9..1b2fd3426a81 100644
> > > > --- a/arch/arm/boot/dts/stm32mp151.dtsi
> > > > +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> > > > @@ -115,6 +115,33 @@
> > > >                  status = "disabled";
> > > >          };
> > > >     
> > > > +     firmware {
> > > > +             optee: optee {
> > > > +                     compatible = "linaro,optee-tz";
> > > > +                     method = "smc";
> > > > +                     status = "disabled";
> > > > +             };
> > > 
> > > Doesn't this TEE node get automatically generated and patched into DT by
> > > the TEE ? I think OpTee-OS does that.
> > 
> > OP-TEE OS does that if it gets passed the DT from early boot stage which is not always the case.
> 
> Shouldn't that be something to fix ?
> 
> I think R-Car3 does that already.

FWIW it's also possible for OP-TEE to generate a device tree overlay
which can be applied by later boot stages.

Drawback is that you either need an additional parameter to pass
between boot stages (address of the DT overlay) or it needs to be
hardcoded. Hardcoding has it's own bag of drawbacks, but it's what we
do for some i.MX6 platforms within barebox. However there is no TF-A
there, so only OP-TEE and Barebox need to agree on the fixed location
beforehand.

Best regards,
Rouven Czerwinski

-- 
Pengutronix e.K.           | Rouven Czerwinski          |
Steuerwalder Str. 21       | http://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0   |


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties
  2022-04-22 16:28     ` Marek Vasut
@ 2022-04-25 17:21       ` Alexandre TORGUE
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-04-25 17:21 UTC (permalink / raw)
  To: Marek Vasut, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

Hi Marek

On 4/22/22 18:28, Marek Vasut wrote:
> On 4/22/22 17:09, Alexandre Torgue wrote:
>> From: Marek Vasut <marex@denx.de>
>>
>> Describe optional external ethernet RX clock in the DT binding
>> to fix dtbs_check warnings like:
>>
>> arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: rcc@50000000: 
>> 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks', 
>> 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
>> Cc: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> To: devicetree@vger.kernel.org
>> Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>>
>> diff --git 
>> a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml 
>> b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>> index a0ae4867ed27..7a251264582d 100644
>> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>> @@ -59,6 +59,14 @@ properties:
>>             - st,stm32mp1-rcc
>>         - const: syscon
>> +  clocks:
>> +    description:
>> +      Specifies the external RX clock for ethernet MAC.
>> +    maxItems: 1
>> +
>> +  clock-names:
>> +    const: ETH_RX_CLK/ETH_REF_CLK
>> +
>>     reg:
>>       maxItems: 1
> 
> Should this patch be part of this series, maybe this was re-sent by 
> accident ?

Not by accident. As your patch is already merged in Rob tree (I guess), 
I added it in this series to avoid merge conflict later. I added a late 
note in the cover-letter.

regards
alex

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties
@ 2022-04-25 17:21       ` Alexandre TORGUE
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-04-25 17:21 UTC (permalink / raw)
  To: Marek Vasut, arnd, robh+dt, Krzysztof Kozlowski, soc,
	Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Ahmad Fatoum, etienne.carriere

Hi Marek

On 4/22/22 18:28, Marek Vasut wrote:
> On 4/22/22 17:09, Alexandre Torgue wrote:
>> From: Marek Vasut <marex@denx.de>
>>
>> Describe optional external ethernet RX clock in the DT binding
>> to fix dtbs_check warnings like:
>>
>> arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: rcc@50000000: 
>> 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks', 
>> 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
>> Cc: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> To: devicetree@vger.kernel.org
>> Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>>
>> diff --git 
>> a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml 
>> b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>> index a0ae4867ed27..7a251264582d 100644
>> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>> @@ -59,6 +59,14 @@ properties:
>>             - st,stm32mp1-rcc
>>         - const: syscon
>> +  clocks:
>> +    description:
>> +      Specifies the external RX clock for ethernet MAC.
>> +    maxItems: 1
>> +
>> +  clock-names:
>> +    const: ETH_RX_CLK/ETH_REF_CLK
>> +
>>     reg:
>>       maxItems: 1
> 
> Should this patch be part of this series, maybe this was re-sent by 
> accident ?

Not by accident. As your patch is already merged in Rob tree (I guess), 
I added it in this series to avoid merge conflict later. I added a late 
note in the cover-letter.

regards
alex

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-22 16:31     ` Marek Vasut
@ 2022-04-25 19:11       ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-04-25 19:11 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Alexandre Torgue, arnd, Krzysztof Kozlowski, soc, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree, linux-stm32,
	linux-kernel, Ahmad Fatoum, etienne.carriere

On Fri, Apr 22, 2022 at 06:31:25PM +0200, Marek Vasut wrote:
> On 4/22/22 17:09, Alexandre Torgue wrote:
> > In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> > security support hardened), "clocks" and "clock-names" describe oscillators
> > and are required.
> > 
> > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > index 7a251264582d..bb0e0b92e907 100644
> > --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > @@ -58,14 +58,8 @@ properties:
> >             - st,stm32mp1-rcc-secure
> >             - st,stm32mp1-rcc
> >         - const: syscon
> > -
> > -  clocks:
> > -    description:
> > -      Specifies the external RX clock for ethernet MAC.
> > -    maxItems: 1
> > -
> > -  clock-names:
> > -    const: ETH_RX_CLK/ETH_REF_CLK
> > +  clocks: true
> > +  clock-names: true
> 
> It looks like this should rather be a property than a compatible string --
> the compatible string is used by the OS to determine which hardware is
> represented by a node, but here it is the same hardware in either case,
> "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the same
> STM32MP1 RCC block, just configured differently by some bootloader stage.
> 
> So why not just add one-liner property of the RCC block like ?
> st,rcc-in-secure-configuration

Because using compatible was already decided.

Rob

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-04-25 19:11       ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-04-25 19:11 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Alexandre Torgue, arnd, Krzysztof Kozlowski, soc, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree, linux-stm32,
	linux-kernel, Ahmad Fatoum, etienne.carriere

On Fri, Apr 22, 2022 at 06:31:25PM +0200, Marek Vasut wrote:
> On 4/22/22 17:09, Alexandre Torgue wrote:
> > In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> > security support hardened), "clocks" and "clock-names" describe oscillators
> > and are required.
> > 
> > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > index 7a251264582d..bb0e0b92e907 100644
> > --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > @@ -58,14 +58,8 @@ properties:
> >             - st,stm32mp1-rcc-secure
> >             - st,stm32mp1-rcc
> >         - const: syscon
> > -
> > -  clocks:
> > -    description:
> > -      Specifies the external RX clock for ethernet MAC.
> > -    maxItems: 1
> > -
> > -  clock-names:
> > -    const: ETH_RX_CLK/ETH_REF_CLK
> > +  clocks: true
> > +  clock-names: true
> 
> It looks like this should rather be a property than a compatible string --
> the compatible string is used by the OS to determine which hardware is
> represented by a node, but here it is the same hardware in either case,
> "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the same
> STM32MP1 RCC block, just configured differently by some bootloader stage.
> 
> So why not just add one-liner property of the RCC block like ?
> st,rcc-in-secure-configuration

Because using compatible was already decided.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-25 19:11       ` Rob Herring
@ 2022-04-25 19:35         ` Marek Vasut
  -1 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-25 19:35 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alexandre Torgue, arnd, Krzysztof Kozlowski, soc, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree, linux-stm32,
	linux-kernel, Ahmad Fatoum, etienne.carriere

On 4/25/22 21:11, Rob Herring wrote:
> On Fri, Apr 22, 2022 at 06:31:25PM +0200, Marek Vasut wrote:
>> On 4/22/22 17:09, Alexandre Torgue wrote:
>>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>>> security support hardened), "clocks" and "clock-names" describe oscillators
>>> and are required.
>>>
>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>>> index 7a251264582d..bb0e0b92e907 100644
>>> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>>> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>>> @@ -58,14 +58,8 @@ properties:
>>>              - st,stm32mp1-rcc-secure
>>>              - st,stm32mp1-rcc
>>>          - const: syscon
>>> -
>>> -  clocks:
>>> -    description:
>>> -      Specifies the external RX clock for ethernet MAC.
>>> -    maxItems: 1
>>> -
>>> -  clock-names:
>>> -    const: ETH_RX_CLK/ETH_REF_CLK
>>> +  clocks: true
>>> +  clock-names: true
>>
>> It looks like this should rather be a property than a compatible string --
>> the compatible string is used by the OS to determine which hardware is
>> represented by a node, but here it is the same hardware in either case,
>> "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the same
>> STM32MP1 RCC block, just configured differently by some bootloader stage.
>>
>> So why not just add one-liner property of the RCC block like ?
>> st,rcc-in-secure-configuration
> 
> Because using compatible was already decided.

I see ... may I ask why compatible is OK in this case even though this 
is encoding a policy (secure/non-secure configuration of the same clock 
IP) into DT ?

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-04-25 19:35         ` Marek Vasut
  0 siblings, 0 replies; 62+ messages in thread
From: Marek Vasut @ 2022-04-25 19:35 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alexandre Torgue, arnd, Krzysztof Kozlowski, soc, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree, linux-stm32,
	linux-kernel, Ahmad Fatoum, etienne.carriere

On 4/25/22 21:11, Rob Herring wrote:
> On Fri, Apr 22, 2022 at 06:31:25PM +0200, Marek Vasut wrote:
>> On 4/22/22 17:09, Alexandre Torgue wrote:
>>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>>> security support hardened), "clocks" and "clock-names" describe oscillators
>>> and are required.
>>>
>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>>> index 7a251264582d..bb0e0b92e907 100644
>>> --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>>> +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
>>> @@ -58,14 +58,8 @@ properties:
>>>              - st,stm32mp1-rcc-secure
>>>              - st,stm32mp1-rcc
>>>          - const: syscon
>>> -
>>> -  clocks:
>>> -    description:
>>> -      Specifies the external RX clock for ethernet MAC.
>>> -    maxItems: 1
>>> -
>>> -  clock-names:
>>> -    const: ETH_RX_CLK/ETH_REF_CLK
>>> +  clocks: true
>>> +  clock-names: true
>>
>> It looks like this should rather be a property than a compatible string --
>> the compatible string is used by the OS to determine which hardware is
>> represented by a node, but here it is the same hardware in either case,
>> "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the same
>> STM32MP1 RCC block, just configured differently by some bootloader stage.
>>
>> So why not just add one-liner property of the RCC block like ?
>> st,rcc-in-secure-configuration
> 
> Because using compatible was already decided.

I see ... may I ask why compatible is OK in this case even though this 
is encoding a policy (secure/non-secure configuration of the same clock 
IP) into DT ?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-25 19:35         ` Marek Vasut
@ 2022-04-26 18:44           ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-04-26 18:44 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Alexandre Torgue, arnd, Krzysztof Kozlowski, soc, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree, linux-stm32,
	linux-kernel, Ahmad Fatoum, etienne.carriere

On Mon, Apr 25, 2022 at 09:35:13PM +0200, Marek Vasut wrote:
> On 4/25/22 21:11, Rob Herring wrote:
> > On Fri, Apr 22, 2022 at 06:31:25PM +0200, Marek Vasut wrote:
> > > On 4/22/22 17:09, Alexandre Torgue wrote:
> > > > In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> > > > security support hardened), "clocks" and "clock-names" describe oscillators
> > > > and are required.
> > > > 
> > > > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > > > index 7a251264582d..bb0e0b92e907 100644
> > > > --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > > > +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > > > @@ -58,14 +58,8 @@ properties:
> > > >              - st,stm32mp1-rcc-secure
> > > >              - st,stm32mp1-rcc
> > > >          - const: syscon
> > > > -
> > > > -  clocks:
> > > > -    description:
> > > > -      Specifies the external RX clock for ethernet MAC.
> > > > -    maxItems: 1
> > > > -
> > > > -  clock-names:
> > > > -    const: ETH_RX_CLK/ETH_REF_CLK
> > > > +  clocks: true
> > > > +  clock-names: true
> > > 
> > > It looks like this should rather be a property than a compatible string --
> > > the compatible string is used by the OS to determine which hardware is
> > > represented by a node, but here it is the same hardware in either case,
> > > "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the same
> > > STM32MP1 RCC block, just configured differently by some bootloader stage.
> > > 
> > > So why not just add one-liner property of the RCC block like ?
> > > st,rcc-in-secure-configuration
> > 
> > Because using compatible was already decided.
> 
> I see ... may I ask why compatible is OK in this case even though this is
> encoding a policy (secure/non-secure configuration of the same clock IP)
> into DT ?

I see 'compatible' as an encoding of what is the programming model of 
the device. Secure vs. non-secure have different models. PCIe hosts vs 
endpoint mode is a similar case where we mostly have 2 compatibles (but 
not always).

I wouldn't say which way we do things is set in stone, but in this case 
we already decided something.

Rob

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-04-26 18:44           ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-04-26 18:44 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Alexandre Torgue, arnd, Krzysztof Kozlowski, soc, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree, linux-stm32,
	linux-kernel, Ahmad Fatoum, etienne.carriere

On Mon, Apr 25, 2022 at 09:35:13PM +0200, Marek Vasut wrote:
> On 4/25/22 21:11, Rob Herring wrote:
> > On Fri, Apr 22, 2022 at 06:31:25PM +0200, Marek Vasut wrote:
> > > On 4/22/22 17:09, Alexandre Torgue wrote:
> > > > In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> > > > security support hardened), "clocks" and "clock-names" describe oscillators
> > > > and are required.
> > > > 
> > > > Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > > > index 7a251264582d..bb0e0b92e907 100644
> > > > --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > > > +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> > > > @@ -58,14 +58,8 @@ properties:
> > > >              - st,stm32mp1-rcc-secure
> > > >              - st,stm32mp1-rcc
> > > >          - const: syscon
> > > > -
> > > > -  clocks:
> > > > -    description:
> > > > -      Specifies the external RX clock for ethernet MAC.
> > > > -    maxItems: 1
> > > > -
> > > > -  clock-names:
> > > > -    const: ETH_RX_CLK/ETH_REF_CLK
> > > > +  clocks: true
> > > > +  clock-names: true
> > > 
> > > It looks like this should rather be a property than a compatible string --
> > > the compatible string is used by the OS to determine which hardware is
> > > represented by a node, but here it is the same hardware in either case,
> > > "st,stm32mp1-rcc" and "st,stm32mp1-rcc-secure", it is still the same
> > > STM32MP1 RCC block, just configured differently by some bootloader stage.
> > > 
> > > So why not just add one-liner property of the RCC block like ?
> > > st,rcc-in-secure-configuration
> > 
> > Because using compatible was already decided.
> 
> I see ... may I ask why compatible is OK in this case even though this is
> encoding a policy (secure/non-secure configuration of the same clock IP)
> into DT ?

I see 'compatible' as an encoding of what is the programming model of 
the device. Secure vs. non-secure have different models. PCIe hosts vs 
endpoint mode is a similar case where we mostly have 2 compatibles (but 
not always).

I wouldn't say which way we do things is set in stone, but in this case 
we already decided something.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-22 15:09   ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Alexandre Torgue
@ 2022-05-02 21:13     ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:13 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: etienne.carriere, arnd, Ahmad Fatoum, Marek Vasut, soc, robh+dt,
	linux-arm-kernel, linux-stm32, Krzysztof Kozlowski, linux-kernel,
	Philipp Zabel, Stephen Boyd, devicetree

On Fri, 22 Apr 2022 17:09:46 +0200, Alexandre Torgue wrote:
> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> security support hardened), "clocks" and "clock-names" describe oscillators
> and are required.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-05-02 21:13     ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:13 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: etienne.carriere, arnd, Ahmad Fatoum, Marek Vasut, soc, robh+dt,
	linux-arm-kernel, linux-stm32, Krzysztof Kozlowski, linux-kernel,
	Philipp Zabel, Stephen Boyd, devicetree

On Fri, 22 Apr 2022 17:09:46 +0200, Alexandre Torgue wrote:
> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> security support hardened), "clocks" and "clock-names" describe oscillators
> and are required.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 3/8] dt-bindings: clock: stm32mp15: rename CK_SCMI define
  2022-04-22 15:09   ` Alexandre Torgue
@ 2022-05-02 21:26     ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:26 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: devicetree, Stephen Boyd, soc, Philipp Zabel, arnd, linux-kernel,
	Marek Vasut, Ahmad Fatoum, robh+dt, linux-arm-kernel,
	linux-stm32, etienne.carriere, Krzysztof Kozlowski

On Fri, 22 Apr 2022 17:09:47 +0200, Alexandre Torgue wrote:
> As we only have one SCMI instance, it's not necessary to add an index to
> the name.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 3/8] dt-bindings: clock: stm32mp15: rename CK_SCMI define
@ 2022-05-02 21:26     ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:26 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: devicetree, Stephen Boyd, soc, Philipp Zabel, arnd, linux-kernel,
	Marek Vasut, Ahmad Fatoum, robh+dt, linux-arm-kernel,
	linux-stm32, etienne.carriere, Krzysztof Kozlowski

On Fri, 22 Apr 2022 17:09:47 +0200, Alexandre Torgue wrote:
> As we only have one SCMI instance, it's not necessary to add an index to
> the name.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 4/8] dt-bindings: reset: stm32mp15: rename RST_SCMI define
  2022-04-22 15:09   ` Alexandre Torgue
@ 2022-05-02 21:27     ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:27 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: robh+dt, etienne.carriere, Stephen Boyd, linux-arm-kernel,
	Philipp Zabel, devicetree, linux-stm32, Marek Vasut,
	Ahmad Fatoum, arnd, soc, linux-kernel, Krzysztof Kozlowski

On Fri, 22 Apr 2022 17:09:48 +0200, Alexandre Torgue wrote:
> As we only have one SCMI instance, it's not necessary to add an index to
> the name.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 4/8] dt-bindings: reset: stm32mp15: rename RST_SCMI define
@ 2022-05-02 21:27     ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:27 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: robh+dt, etienne.carriere, Stephen Boyd, linux-arm-kernel,
	Philipp Zabel, devicetree, linux-stm32, Marek Vasut,
	Ahmad Fatoum, arnd, soc, linux-kernel, Krzysztof Kozlowski

On Fri, 22 Apr 2022 17:09:48 +0200, Alexandre Torgue wrote:
> As we only have one SCMI instance, it's not necessary to add an index to
> the name.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 7/8] dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
  2022-04-22 15:09   ` Alexandre Torgue
@ 2022-05-02 21:28     ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:28 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: arnd, etienne.carriere, linux-arm-kernel, devicetree,
	Philipp Zabel, linux-stm32, Krzysztof Kozlowski, Marek Vasut,
	robh+dt, Ahmad Fatoum, linux-kernel, soc, Stephen Boyd

On Fri, 22 Apr 2022 17:09:51 +0200, Alexandre Torgue wrote:
> Add a "secure" version based on SCMI of STM32 boards. Only boards
> provided by STMicroelectronics are concerned:
> 
> -STM32MP157A-DK1
> -STM32MP157C-DK2
> -STM32MP157C-ED1
> -STM32MP157C-EV1
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 7/8] dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
@ 2022-05-02 21:28     ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-02 21:28 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: arnd, etienne.carriere, linux-arm-kernel, devicetree,
	Philipp Zabel, linux-stm32, Krzysztof Kozlowski, Marek Vasut,
	robh+dt, Ahmad Fatoum, linux-kernel, soc, Stephen Boyd

On Fri, 22 Apr 2022 17:09:51 +0200, Alexandre Torgue wrote:
> Add a "secure" version based on SCMI of STM32 boards. Only boards
> provided by STMicroelectronics are concerned:
> 
> -STM32MP157A-DK1
> -STM32MP157C-DK2
> -STM32MP157C-ED1
> -STM32MP157C-EV1
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 0/8] Add SCMI version of ST boards
  2022-04-22 15:09 ` Alexandre Torgue
@ 2022-05-03 14:51   ` Alexandre TORGUE
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-05-03 14:51 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Marek Vasut, Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> The aim of this series is to add OPTEE and SCMI support for STM32 boards in
> order to enable secure services for clocks and resets. New boards have been added
> to enable this support in order to not break boot of current STM32 boards users.
> 
> This series targets only boards provided by ST which are:
> -STM32MP157A-DK1
> -STM32MP157C-DK2
> -STM32MP157C-ED1
> -STM32MP157C-EV1
> 
> Some modifications in bindings files (yaml and .h) was needed and OPTEE/TEE
> configs are now enabled by default for ARCH_STM32 architecture.
> 
> Note that patch [1] "dt-bindings: rcc: Add optional external ethernet RX clock
> properties" done by Marek has been already merged in Rob tree.
> 
> Thanks
> Alex
> 
> Alexandre Torgue (7):
>    dt-bindings: clock: stm32mp1: describes clocks if
>      "st,stm32mp1-rcc-secure"
>    dt-bindings: clock: stm32mp15: rename CK_SCMI define
>    dt-bindings: reset: stm32mp15: rename RST_SCMI define
>    ARM: stm32: select OPTEE on MPU family
>    ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
>    dt-bindings: arm: stm32: Add SCMI version of STM32 boards
>      (DK1/DK2/ED1/EV1)
>    ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
> 
> Marek Vasut (1):
>    dt-bindings: rcc: Add optional external ethernet RX clock properties
> 
>   .../devicetree/bindings/arm/stm32/stm32.yaml  |  17 +++
>   .../bindings/clock/st,stm32mp1-rcc.yaml       |  34 ++++++
>   arch/arm/boot/dts/Makefile                    |   4 +
>   arch/arm/boot/dts/stm32mp151.dtsi             |  41 +++++++
>   arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts    |  86 +++++++++++++++
>   arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts    |  95 +++++++++++++++++
>   arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts    |  91 ++++++++++++++++
>   arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts    | 100 ++++++++++++++++++
>   arch/arm/mach-stm32/Kconfig                   |   2 +
>   include/dt-bindings/clock/stm32mp1-clks.h     |  46 ++++----
>   include/dt-bindings/reset/stm32mp1-resets.h   |  24 ++---
>   11 files changed, 503 insertions(+), 37 deletions(-)
>   create mode 100644 arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts
> 

Series applied on stm32-next. Patch[5] has been dropped.

Alex

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 0/8] Add SCMI version of ST boards
@ 2022-05-03 14:51   ` Alexandre TORGUE
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-05-03 14:51 UTC (permalink / raw)
  To: arnd, robh+dt, Krzysztof Kozlowski, soc, Stephen Boyd, Philipp Zabel
  Cc: linux-arm-kernel, devicetree, linux-stm32, linux-kernel,
	Marek Vasut, Ahmad Fatoum, etienne.carriere

On 4/22/22 17:09, Alexandre Torgue wrote:
> The aim of this series is to add OPTEE and SCMI support for STM32 boards in
> order to enable secure services for clocks and resets. New boards have been added
> to enable this support in order to not break boot of current STM32 boards users.
> 
> This series targets only boards provided by ST which are:
> -STM32MP157A-DK1
> -STM32MP157C-DK2
> -STM32MP157C-ED1
> -STM32MP157C-EV1
> 
> Some modifications in bindings files (yaml and .h) was needed and OPTEE/TEE
> configs are now enabled by default for ARCH_STM32 architecture.
> 
> Note that patch [1] "dt-bindings: rcc: Add optional external ethernet RX clock
> properties" done by Marek has been already merged in Rob tree.
> 
> Thanks
> Alex
> 
> Alexandre Torgue (7):
>    dt-bindings: clock: stm32mp1: describes clocks if
>      "st,stm32mp1-rcc-secure"
>    dt-bindings: clock: stm32mp15: rename CK_SCMI define
>    dt-bindings: reset: stm32mp15: rename RST_SCMI define
>    ARM: stm32: select OPTEE on MPU family
>    ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
>    dt-bindings: arm: stm32: Add SCMI version of STM32 boards
>      (DK1/DK2/ED1/EV1)
>    ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
> 
> Marek Vasut (1):
>    dt-bindings: rcc: Add optional external ethernet RX clock properties
> 
>   .../devicetree/bindings/arm/stm32/stm32.yaml  |  17 +++
>   .../bindings/clock/st,stm32mp1-rcc.yaml       |  34 ++++++
>   arch/arm/boot/dts/Makefile                    |   4 +
>   arch/arm/boot/dts/stm32mp151.dtsi             |  41 +++++++
>   arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts    |  86 +++++++++++++++
>   arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts    |  95 +++++++++++++++++
>   arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts    |  91 ++++++++++++++++
>   arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts    | 100 ++++++++++++++++++
>   arch/arm/mach-stm32/Kconfig                   |   2 +
>   include/dt-bindings/clock/stm32mp1-clks.h     |  46 ++++----
>   include/dt-bindings/reset/stm32mp1-resets.h   |  24 ++---
>   11 files changed, 503 insertions(+), 37 deletions(-)
>   create mode 100644 arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts
> 

Series applied on stm32-next. Patch[5] has been dropped.

Alex

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-04-22 15:09   ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Alexandre Torgue
@ 2022-05-05 14:11     ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-05 14:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
<alexandre.torgue@foss.st.com> wrote:
>
> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> security support hardened), "clocks" and "clock-names" describe oscillators
> and are required.
>
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

This is now failing in linux-next:

make[1]: *** Deleting file
'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
duplicate key "clocks" with value "{}" (original value: "True")
make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
Error 1
./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
[error] duplication of key "clocks" in mapping (key-duplicates)
./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
[error] duplication of key "clock-names" in mapping (key-duplicates)
Traceback (most recent call last):
  File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
    testtree = dtschema.load(filename, line_number=line_number)
  File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
914, in load
    return yaml.load(f.read())
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
line 434, in load
    return constructor.get_single_data()
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 121, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 131, in construct_document
    for _dummy in generator:
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 674, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 445, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 263, in construct_mapping
    if self.check_mapping_key(node, key_node, mapping, key, value):
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 294, in check_mapping_key
    raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
  in "<unicode string>", line 49, column 3
found duplicate key "clocks" with value "{}" (original value: "True")
  in "<unicode string>", line 64, column 3
To suppress this check see:
    http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/dt-doc-validate", line 74, in <module>
    ret = check_doc(f)
  File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
    print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
AttributeError: 'DuplicateKeyError' object has no attribute 'path'

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"
@ 2022-05-05 14:11     ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-05 14:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
<alexandre.torgue@foss.st.com> wrote:
>
> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> security support hardened), "clocks" and "clock-names" describe oscillators
> and are required.
>
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

This is now failing in linux-next:

make[1]: *** Deleting file
'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
duplicate key "clocks" with value "{}" (original value: "True")
make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
Error 1
./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
[error] duplication of key "clocks" in mapping (key-duplicates)
./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
[error] duplication of key "clock-names" in mapping (key-duplicates)
Traceback (most recent call last):
  File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
    testtree = dtschema.load(filename, line_number=line_number)
  File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
914, in load
    return yaml.load(f.read())
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
line 434, in load
    return constructor.get_single_data()
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 121, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 131, in construct_document
    for _dummy in generator:
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 674, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 445, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 263, in construct_mapping
    if self.check_mapping_key(node, key_node, mapping, key, value):
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
line 294, in check_mapping_key
    raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
  in "<unicode string>", line 49, column 3
found duplicate key "clocks" with value "{}" (original value: "True")
  in "<unicode string>", line 64, column 3
To suppress this check see:
    http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/dt-doc-validate", line 74, in <module>
    ret = check_doc(f)
  File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
    print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
AttributeError: 'DuplicateKeyError' object has no attribute 'path'

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-05-05 14:11     ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Rob Herring
@ 2022-05-06 10:02       ` Alexandre TORGUE
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-05-06 10:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

Hi Rob

On 5/5/22 16:11, Rob Herring wrote:
> On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
> <alexandre.torgue@foss.st.com> wrote:
>>
>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>> security support hardened), "clocks" and "clock-names" describe oscillators
>> and are required.
>>
>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> This is now failing in linux-next:
> 
> make[1]: *** Deleting file
> 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
> duplicate key "clocks" with value "{}" (original value: "True")
> make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
> Error 1
> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
> [error] duplication of key "clocks" in mapping (key-duplicates)
> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
> [error] duplication of key "clock-names" in mapping (key-duplicates)
> Traceback (most recent call last):
>    File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
>      testtree = dtschema.load(filename, line_number=line_number)
>    File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
> 914, in load
>      return yaml.load(f.read())
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
> line 434, in load
>      return constructor.get_single_data()
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 121, in get_single_data
>      return self.construct_document(node)
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 131, in construct_document
>      for _dummy in generator:
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 674, in construct_yaml_map
>      value = self.construct_mapping(node)
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 445, in construct_mapping
>      return BaseConstructor.construct_mapping(self, node, deep=deep)
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 263, in construct_mapping
>      if self.check_mapping_key(node, key_node, mapping, key, value):
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 294, in check_mapping_key
>      raise DuplicateKeyError(*args)
> ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
>    in "<unicode string>", line 49, column 3
> found duplicate key "clocks" with value "{}" (original value: "True")
>    in "<unicode string>", line 64, column 3
> To suppress this check see:
>      http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>    File "/usr/local/bin/dt-doc-validate", line 74, in <module>
>      ret = check_doc(f)
>    File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
>      print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
> AttributeError: 'DuplicateKeyError' object has no attribute 'path'

It seems that we have a merge issue between:

patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de

and this one (dt-bindings: clock: stm32mp1: describes clocks if 
"st,stm32mp1-rcc-secure)

On linux-next following part remains and creates issue above:

   clocks:
     description:
       Specifies the external RX clock for ethernet MAC.
     maxItems: 1

   clock-names:
     const: ETH_RX_CLK/ETH_REF_CLK

I don't know why this part is remaining. In my tree, I took care to take 
Marek patch first to avoid this kind of issue.

Btw, how to fix that ?

Note, that as soon as we will fix this point I'll send a fix to avoid 
issue in example build.

cheers
Alex








^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-05-06 10:02       ` Alexandre TORGUE
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-05-06 10:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

Hi Rob

On 5/5/22 16:11, Rob Herring wrote:
> On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
> <alexandre.torgue@foss.st.com> wrote:
>>
>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>> security support hardened), "clocks" and "clock-names" describe oscillators
>> and are required.
>>
>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> This is now failing in linux-next:
> 
> make[1]: *** Deleting file
> 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
> duplicate key "clocks" with value "{}" (original value: "True")
> make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
> Error 1
> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
> [error] duplication of key "clocks" in mapping (key-duplicates)
> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
> [error] duplication of key "clock-names" in mapping (key-duplicates)
> Traceback (most recent call last):
>    File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
>      testtree = dtschema.load(filename, line_number=line_number)
>    File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
> 914, in load
>      return yaml.load(f.read())
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
> line 434, in load
>      return constructor.get_single_data()
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 121, in get_single_data
>      return self.construct_document(node)
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 131, in construct_document
>      for _dummy in generator:
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 674, in construct_yaml_map
>      value = self.construct_mapping(node)
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 445, in construct_mapping
>      return BaseConstructor.construct_mapping(self, node, deep=deep)
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 263, in construct_mapping
>      if self.check_mapping_key(node, key_node, mapping, key, value):
>    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> line 294, in check_mapping_key
>      raise DuplicateKeyError(*args)
> ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
>    in "<unicode string>", line 49, column 3
> found duplicate key "clocks" with value "{}" (original value: "True")
>    in "<unicode string>", line 64, column 3
> To suppress this check see:
>      http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>    File "/usr/local/bin/dt-doc-validate", line 74, in <module>
>      ret = check_doc(f)
>    File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
>      print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
> AttributeError: 'DuplicateKeyError' object has no attribute 'path'

It seems that we have a merge issue between:

patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de

and this one (dt-bindings: clock: stm32mp1: describes clocks if 
"st,stm32mp1-rcc-secure)

On linux-next following part remains and creates issue above:

   clocks:
     description:
       Specifies the external RX clock for ethernet MAC.
     maxItems: 1

   clock-names:
     const: ETH_RX_CLK/ETH_REF_CLK

I don't know why this part is remaining. In my tree, I took care to take 
Marek patch first to avoid this kind of issue.

Btw, how to fix that ?

Note, that as soon as we will fix this point I'll send a fix to avoid 
issue in example build.

cheers
Alex








_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-05-06 10:02       ` Alexandre TORGUE
@ 2022-05-06 16:21         ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-06 16:21 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
<alexandre.torgue@foss.st.com> wrote:
>
> Hi Rob
>
> On 5/5/22 16:11, Rob Herring wrote:
> > On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
> > <alexandre.torgue@foss.st.com> wrote:
> >>
> >> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> >> security support hardened), "clocks" and "clock-names" describe oscillators
> >> and are required.
> >>
> >> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> >
> > This is now failing in linux-next:
> >
> > make[1]: *** Deleting file
> > 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
> > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
> > duplicate key "clocks" with value "{}" (original value: "True")
> > make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
> > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
> > Error 1
> > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
> > [error] duplication of key "clocks" in mapping (key-duplicates)
> > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
> > [error] duplication of key "clock-names" in mapping (key-duplicates)
> > Traceback (most recent call last):
> >    File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
> >      testtree = dtschema.load(filename, line_number=line_number)
> >    File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
> > 914, in load
> >      return yaml.load(f.read())
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
> > line 434, in load
> >      return constructor.get_single_data()
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 121, in get_single_data
> >      return self.construct_document(node)
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 131, in construct_document
> >      for _dummy in generator:
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 674, in construct_yaml_map
> >      value = self.construct_mapping(node)
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 445, in construct_mapping
> >      return BaseConstructor.construct_mapping(self, node, deep=deep)
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 263, in construct_mapping
> >      if self.check_mapping_key(node, key_node, mapping, key, value):
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 294, in check_mapping_key
> >      raise DuplicateKeyError(*args)
> > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
> >    in "<unicode string>", line 49, column 3
> > found duplicate key "clocks" with value "{}" (original value: "True")
> >    in "<unicode string>", line 64, column 3
> > To suppress this check see:
> >      http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
> > During handling of the above exception, another exception occurred:
> > Traceback (most recent call last):
> >    File "/usr/local/bin/dt-doc-validate", line 74, in <module>
> >      ret = check_doc(f)
> >    File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
> >      print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
> > AttributeError: 'DuplicateKeyError' object has no attribute 'path'
>
> It seems that we have a merge issue between:
>
> patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
> https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
>
> and this one (dt-bindings: clock: stm32mp1: describes clocks if
> "st,stm32mp1-rcc-secure)
>
> On linux-next following part remains and creates issue above:
>
>    clocks:
>      description:
>        Specifies the external RX clock for ethernet MAC.
>      maxItems: 1
>
>    clock-names:
>      const: ETH_RX_CLK/ETH_REF_CLK
>
> I don't know why this part is remaining. In my tree, I took care to take
> Marek patch first to avoid this kind of issue.
>
> Btw, how to fix that ?

Looks like I applied "dt-bindings: rcc: Add optional external ethernet
RX clock properties" too. I've reverted it in my tree.

Rob

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"
@ 2022-05-06 16:21         ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-06 16:21 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
<alexandre.torgue@foss.st.com> wrote:
>
> Hi Rob
>
> On 5/5/22 16:11, Rob Herring wrote:
> > On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
> > <alexandre.torgue@foss.st.com> wrote:
> >>
> >> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> >> security support hardened), "clocks" and "clock-names" describe oscillators
> >> and are required.
> >>
> >> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> >
> > This is now failing in linux-next:
> >
> > make[1]: *** Deleting file
> > 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
> > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
> > duplicate key "clocks" with value "{}" (original value: "True")
> > make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
> > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
> > Error 1
> > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
> > [error] duplication of key "clocks" in mapping (key-duplicates)
> > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
> > [error] duplication of key "clock-names" in mapping (key-duplicates)
> > Traceback (most recent call last):
> >    File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
> >      testtree = dtschema.load(filename, line_number=line_number)
> >    File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
> > 914, in load
> >      return yaml.load(f.read())
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
> > line 434, in load
> >      return constructor.get_single_data()
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 121, in get_single_data
> >      return self.construct_document(node)
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 131, in construct_document
> >      for _dummy in generator:
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 674, in construct_yaml_map
> >      value = self.construct_mapping(node)
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 445, in construct_mapping
> >      return BaseConstructor.construct_mapping(self, node, deep=deep)
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 263, in construct_mapping
> >      if self.check_mapping_key(node, key_node, mapping, key, value):
> >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > line 294, in check_mapping_key
> >      raise DuplicateKeyError(*args)
> > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
> >    in "<unicode string>", line 49, column 3
> > found duplicate key "clocks" with value "{}" (original value: "True")
> >    in "<unicode string>", line 64, column 3
> > To suppress this check see:
> >      http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
> > During handling of the above exception, another exception occurred:
> > Traceback (most recent call last):
> >    File "/usr/local/bin/dt-doc-validate", line 74, in <module>
> >      ret = check_doc(f)
> >    File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
> >      print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
> > AttributeError: 'DuplicateKeyError' object has no attribute 'path'
>
> It seems that we have a merge issue between:
>
> patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
> https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
>
> and this one (dt-bindings: clock: stm32mp1: describes clocks if
> "st,stm32mp1-rcc-secure)
>
> On linux-next following part remains and creates issue above:
>
>    clocks:
>      description:
>        Specifies the external RX clock for ethernet MAC.
>      maxItems: 1
>
>    clock-names:
>      const: ETH_RX_CLK/ETH_REF_CLK
>
> I don't know why this part is remaining. In my tree, I took care to take
> Marek patch first to avoid this kind of issue.
>
> Btw, how to fix that ?

Looks like I applied "dt-bindings: rcc: Add optional external ethernet
RX clock properties" too. I've reverted it in my tree.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-05-06 16:21         ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Rob Herring
@ 2022-05-09 12:36           ` Rob Herring
  -1 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-09 12:36 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On Fri, May 6, 2022 at 11:21 AM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
> <alexandre.torgue@foss.st.com> wrote:
> >
> > Hi Rob
> >
> > On 5/5/22 16:11, Rob Herring wrote:
> > > On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
> > > <alexandre.torgue@foss.st.com> wrote:
> > >>
> > >> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> > >> security support hardened), "clocks" and "clock-names" describe oscillators
> > >> and are required.
> > >>
> > >> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > >
> > > This is now failing in linux-next:
> > >
> > > make[1]: *** Deleting file
> > > 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
> > > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
> > > duplicate key "clocks" with value "{}" (original value: "True")
> > > make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
> > > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
> > > Error 1
> > > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
> > > [error] duplication of key "clocks" in mapping (key-duplicates)
> > > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
> > > [error] duplication of key "clock-names" in mapping (key-duplicates)
> > > Traceback (most recent call last):
> > >    File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
> > >      testtree = dtschema.load(filename, line_number=line_number)
> > >    File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
> > > 914, in load
> > >      return yaml.load(f.read())
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
> > > line 434, in load
> > >      return constructor.get_single_data()
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 121, in get_single_data
> > >      return self.construct_document(node)
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 131, in construct_document
> > >      for _dummy in generator:
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 674, in construct_yaml_map
> > >      value = self.construct_mapping(node)
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 445, in construct_mapping
> > >      return BaseConstructor.construct_mapping(self, node, deep=deep)
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 263, in construct_mapping
> > >      if self.check_mapping_key(node, key_node, mapping, key, value):
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 294, in check_mapping_key
> > >      raise DuplicateKeyError(*args)
> > > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
> > >    in "<unicode string>", line 49, column 3
> > > found duplicate key "clocks" with value "{}" (original value: "True")
> > >    in "<unicode string>", line 64, column 3
> > > To suppress this check see:
> > >      http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
> > > During handling of the above exception, another exception occurred:
> > > Traceback (most recent call last):
> > >    File "/usr/local/bin/dt-doc-validate", line 74, in <module>
> > >      ret = check_doc(f)
> > >    File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
> > >      print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
> > > AttributeError: 'DuplicateKeyError' object has no attribute 'path'
> >
> > It seems that we have a merge issue between:
> >
> > patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
> > https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
> >
> > and this one (dt-bindings: clock: stm32mp1: describes clocks if
> > "st,stm32mp1-rcc-secure)
> >
> > On linux-next following part remains and creates issue above:
> >
> >    clocks:
> >      description:
> >        Specifies the external RX clock for ethernet MAC.
> >      maxItems: 1
> >
> >    clock-names:
> >      const: ETH_RX_CLK/ETH_REF_CLK
> >
> > I don't know why this part is remaining. In my tree, I took care to take
> > Marek patch first to avoid this kind of issue.
> >
> > Btw, how to fix that ?
>
> Looks like I applied "dt-bindings: rcc: Add optional external ethernet
> RX clock properties" too. I've reverted it in my tree.

Now with it reverted in today's next:

/builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
rcc@50000000: 'clocks' is a required property
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
/builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
rcc@50000000: 'clock-names' is a required property
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml

The example needs updating.

Rob

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"
@ 2022-05-09 12:36           ` Rob Herring
  0 siblings, 0 replies; 62+ messages in thread
From: Rob Herring @ 2022-05-09 12:36 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On Fri, May 6, 2022 at 11:21 AM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
> <alexandre.torgue@foss.st.com> wrote:
> >
> > Hi Rob
> >
> > On 5/5/22 16:11, Rob Herring wrote:
> > > On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
> > > <alexandre.torgue@foss.st.com> wrote:
> > >>
> > >> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
> > >> security support hardened), "clocks" and "clock-names" describe oscillators
> > >> and are required.
> > >>
> > >> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > >
> > > This is now failing in linux-next:
> > >
> > > make[1]: *** Deleting file
> > > 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
> > > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
> > > duplicate key "clocks" with value "{}" (original value: "True")
> > > make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
> > > Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
> > > Error 1
> > > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
> > > [error] duplication of key "clocks" in mapping (key-duplicates)
> > > ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
> > > [error] duplication of key "clock-names" in mapping (key-duplicates)
> > > Traceback (most recent call last):
> > >    File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
> > >      testtree = dtschema.load(filename, line_number=line_number)
> > >    File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
> > > 914, in load
> > >      return yaml.load(f.read())
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
> > > line 434, in load
> > >      return constructor.get_single_data()
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 121, in get_single_data
> > >      return self.construct_document(node)
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 131, in construct_document
> > >      for _dummy in generator:
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 674, in construct_yaml_map
> > >      value = self.construct_mapping(node)
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 445, in construct_mapping
> > >      return BaseConstructor.construct_mapping(self, node, deep=deep)
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 263, in construct_mapping
> > >      if self.check_mapping_key(node, key_node, mapping, key, value):
> > >    File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
> > > line 294, in check_mapping_key
> > >      raise DuplicateKeyError(*args)
> > > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
> > >    in "<unicode string>", line 49, column 3
> > > found duplicate key "clocks" with value "{}" (original value: "True")
> > >    in "<unicode string>", line 64, column 3
> > > To suppress this check see:
> > >      http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
> > > During handling of the above exception, another exception occurred:
> > > Traceback (most recent call last):
> > >    File "/usr/local/bin/dt-doc-validate", line 74, in <module>
> > >      ret = check_doc(f)
> > >    File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
> > >      print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
> > > AttributeError: 'DuplicateKeyError' object has no attribute 'path'
> >
> > It seems that we have a merge issue between:
> >
> > patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
> > https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
> >
> > and this one (dt-bindings: clock: stm32mp1: describes clocks if
> > "st,stm32mp1-rcc-secure)
> >
> > On linux-next following part remains and creates issue above:
> >
> >    clocks:
> >      description:
> >        Specifies the external RX clock for ethernet MAC.
> >      maxItems: 1
> >
> >    clock-names:
> >      const: ETH_RX_CLK/ETH_REF_CLK
> >
> > I don't know why this part is remaining. In my tree, I took care to take
> > Marek patch first to avoid this kind of issue.
> >
> > Btw, how to fix that ?
>
> Looks like I applied "dt-bindings: rcc: Add optional external ethernet
> RX clock properties" too. I've reverted it in my tree.

Now with it reverted in today's next:

/builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
rcc@50000000: 'clocks' is a required property
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
/builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
rcc@50000000: 'clock-names' is a required property
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml

The example needs updating.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
  2022-05-09 12:36           ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Rob Herring
@ 2022-05-09 12:55             ` Alexandre TORGUE
  -1 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-05-09 12:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On 5/9/22 14:36, Rob Herring wrote:
> On Fri, May 6, 2022 at 11:21 AM Rob Herring <robh+dt@kernel.org> wrote:
>>
>> On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
>> <alexandre.torgue@foss.st.com> wrote:
>>>
>>> Hi Rob
>>>
>>> On 5/5/22 16:11, Rob Herring wrote:
>>>> On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
>>>> <alexandre.torgue@foss.st.com> wrote:
>>>>>
>>>>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>>>>> security support hardened), "clocks" and "clock-names" describe oscillators
>>>>> and are required.
>>>>>
>>>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>>
>>>> This is now failing in linux-next:
>>>>
>>>> make[1]: *** Deleting file
>>>> 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
>>>> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
>>>> duplicate key "clocks" with value "{}" (original value: "True")
>>>> make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
>>>> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
>>>> Error 1
>>>> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
>>>> [error] duplication of key "clocks" in mapping (key-duplicates)
>>>> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
>>>> [error] duplication of key "clock-names" in mapping (key-duplicates)
>>>> Traceback (most recent call last):
>>>>     File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
>>>>       testtree = dtschema.load(filename, line_number=line_number)
>>>>     File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
>>>> 914, in load
>>>>       return yaml.load(f.read())
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
>>>> line 434, in load
>>>>       return constructor.get_single_data()
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 121, in get_single_data
>>>>       return self.construct_document(node)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 131, in construct_document
>>>>       for _dummy in generator:
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 674, in construct_yaml_map
>>>>       value = self.construct_mapping(node)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 445, in construct_mapping
>>>>       return BaseConstructor.construct_mapping(self, node, deep=deep)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 263, in construct_mapping
>>>>       if self.check_mapping_key(node, key_node, mapping, key, value):
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 294, in check_mapping_key
>>>>       raise DuplicateKeyError(*args)
>>>> ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
>>>>     in "<unicode string>", line 49, column 3
>>>> found duplicate key "clocks" with value "{}" (original value: "True")
>>>>     in "<unicode string>", line 64, column 3
>>>> To suppress this check see:
>>>>       http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
>>>> During handling of the above exception, another exception occurred:
>>>> Traceback (most recent call last):
>>>>     File "/usr/local/bin/dt-doc-validate", line 74, in <module>
>>>>       ret = check_doc(f)
>>>>     File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
>>>>       print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
>>>> AttributeError: 'DuplicateKeyError' object has no attribute 'path'
>>>
>>> It seems that we have a merge issue between:
>>>
>>> patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
>>> https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
>>>
>>> and this one (dt-bindings: clock: stm32mp1: describes clocks if
>>> "st,stm32mp1-rcc-secure)
>>>
>>> On linux-next following part remains and creates issue above:
>>>
>>>     clocks:
>>>       description:
>>>         Specifies the external RX clock for ethernet MAC.
>>>       maxItems: 1
>>>
>>>     clock-names:
>>>       const: ETH_RX_CLK/ETH_REF_CLK
>>>
>>> I don't know why this part is remaining. In my tree, I took care to take
>>> Marek patch first to avoid this kind of issue.
>>>
>>> Btw, how to fix that ?
>>
>> Looks like I applied "dt-bindings: rcc: Add optional external ethernet
>> RX clock properties" too. I've reverted it in my tree.
> 
> Now with it reverted in today's next:
> 
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
> rcc@50000000: 'clocks' is a required property
>   From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
> rcc@50000000: 'clock-names' is a required property
>   From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> 
> The example needs updating.

Sure, I send an update.

Alex

> 
> Rob


^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"
@ 2022-05-09 12:55             ` Alexandre TORGUE
  0 siblings, 0 replies; 62+ messages in thread
From: Alexandre TORGUE @ 2022-05-09 12:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, Krzysztof Kozlowski, SoC Team, Stephen Boyd,
	Philipp Zabel, linux-arm-kernel, devicetree,
	moderated list:ARM/STM32 ARCHITECTURE, linux-kernel, Marek Vasut,
	Ahmad Fatoum, Etienne Carriere

On 5/9/22 14:36, Rob Herring wrote:
> On Fri, May 6, 2022 at 11:21 AM Rob Herring <robh+dt@kernel.org> wrote:
>>
>> On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
>> <alexandre.torgue@foss.st.com> wrote:
>>>
>>> Hi Rob
>>>
>>> On 5/5/22 16:11, Rob Herring wrote:
>>>> On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
>>>> <alexandre.torgue@foss.st.com> wrote:
>>>>>
>>>>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>>>>> security support hardened), "clocks" and "clock-names" describe oscillators
>>>>> and are required.
>>>>>
>>>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>>
>>>> This is now failing in linux-next:
>>>>
>>>> make[1]: *** Deleting file
>>>> 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
>>>> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
>>>> duplicate key "clocks" with value "{}" (original value: "True")
>>>> make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
>>>> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
>>>> Error 1
>>>> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
>>>> [error] duplication of key "clocks" in mapping (key-duplicates)
>>>> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
>>>> [error] duplication of key "clock-names" in mapping (key-duplicates)
>>>> Traceback (most recent call last):
>>>>     File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
>>>>       testtree = dtschema.load(filename, line_number=line_number)
>>>>     File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
>>>> 914, in load
>>>>       return yaml.load(f.read())
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
>>>> line 434, in load
>>>>       return constructor.get_single_data()
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 121, in get_single_data
>>>>       return self.construct_document(node)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 131, in construct_document
>>>>       for _dummy in generator:
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 674, in construct_yaml_map
>>>>       value = self.construct_mapping(node)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 445, in construct_mapping
>>>>       return BaseConstructor.construct_mapping(self, node, deep=deep)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 263, in construct_mapping
>>>>       if self.check_mapping_key(node, key_node, mapping, key, value):
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 294, in check_mapping_key
>>>>       raise DuplicateKeyError(*args)
>>>> ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
>>>>     in "<unicode string>", line 49, column 3
>>>> found duplicate key "clocks" with value "{}" (original value: "True")
>>>>     in "<unicode string>", line 64, column 3
>>>> To suppress this check see:
>>>>       http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
>>>> During handling of the above exception, another exception occurred:
>>>> Traceback (most recent call last):
>>>>     File "/usr/local/bin/dt-doc-validate", line 74, in <module>
>>>>       ret = check_doc(f)
>>>>     File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
>>>>       print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
>>>> AttributeError: 'DuplicateKeyError' object has no attribute 'path'
>>>
>>> It seems that we have a merge issue between:
>>>
>>> patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
>>> https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
>>>
>>> and this one (dt-bindings: clock: stm32mp1: describes clocks if
>>> "st,stm32mp1-rcc-secure)
>>>
>>> On linux-next following part remains and creates issue above:
>>>
>>>     clocks:
>>>       description:
>>>         Specifies the external RX clock for ethernet MAC.
>>>       maxItems: 1
>>>
>>>     clock-names:
>>>       const: ETH_RX_CLK/ETH_REF_CLK
>>>
>>> I don't know why this part is remaining. In my tree, I took care to take
>>> Marek patch first to avoid this kind of issue.
>>>
>>> Btw, how to fix that ?
>>
>> Looks like I applied "dt-bindings: rcc: Add optional external ethernet
>> RX clock properties" too. I've reverted it in my tree.
> 
> Now with it reverted in today's next:
> 
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
> rcc@50000000: 'clocks' is a required property
>   From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
> rcc@50000000: 'clock-names' is a required property
>   From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> 
> The example needs updating.

Sure, I send an update.

Alex

> 
> Rob


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2022-05-09 12:57 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 15:09 [PATCH 0/8] Add SCMI version of ST boards Alexandre Torgue
2022-04-22 15:09 ` Alexandre Torgue
2022-04-22 15:09 ` [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-04-22 16:28   ` Marek Vasut
2022-04-22 16:28     ` Marek Vasut
2022-04-25 17:21     ` Alexandre TORGUE
2022-04-25 17:21       ` Alexandre TORGUE
2022-04-22 15:09 ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure" Alexandre Torgue
2022-04-22 15:09   ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Alexandre Torgue
2022-04-22 16:31   ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure" Marek Vasut
2022-04-22 16:31     ` Marek Vasut
2022-04-25 19:11     ` Rob Herring
2022-04-25 19:11       ` Rob Herring
2022-04-25 19:35       ` Marek Vasut
2022-04-25 19:35         ` Marek Vasut
2022-04-26 18:44         ` Rob Herring
2022-04-26 18:44           ` Rob Herring
2022-05-02 21:13   ` Rob Herring
2022-05-02 21:13     ` Rob Herring
2022-05-05 14:11   ` Rob Herring
2022-05-05 14:11     ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Rob Herring
2022-05-06 10:02     ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure" Alexandre TORGUE
2022-05-06 10:02       ` Alexandre TORGUE
2022-05-06 16:21       ` Rob Herring
2022-05-06 16:21         ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Rob Herring
2022-05-09 12:36         ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure" Rob Herring
2022-05-09 12:36           ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure" Rob Herring
2022-05-09 12:55           ` [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure" Alexandre TORGUE
2022-05-09 12:55             ` Alexandre TORGUE
2022-04-22 15:09 ` [PATCH 3/8] dt-bindings: clock: stm32mp15: rename CK_SCMI define Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-05-02 21:26   ` Rob Herring
2022-05-02 21:26     ` Rob Herring
2022-04-22 15:09 ` [PATCH 4/8] dt-bindings: reset: stm32mp15: rename RST_SCMI define Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-05-02 21:27   ` Rob Herring
2022-05-02 21:27     ` Rob Herring
2022-04-22 15:09 ` [PATCH 5/8] ARM: stm32: select OPTEE on MPU family Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-04-22 15:37   ` Ahmad Fatoum
2022-04-22 15:37     ` Ahmad Fatoum
2022-04-22 16:23     ` Alexandre TORGUE
2022-04-22 16:23       ` Alexandre TORGUE
2022-04-22 15:09 ` [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15 Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-04-22 16:32   ` Marek Vasut
2022-04-22 16:32     ` Marek Vasut
2022-04-25 10:19     ` Etienne CARRIERE
2022-04-25 10:19       ` Etienne CARRIERE
2022-04-25 10:25       ` Marek Vasut
2022-04-25 10:25         ` Marek Vasut
2022-04-25 10:30         ` Rouven Czerwinski
2022-04-25 10:30           ` Rouven Czerwinski
2022-04-22 15:09 ` [PATCH 7/8] dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1) Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-05-02 21:28   ` Rob Herring
2022-05-02 21:28     ` Rob Herring
2022-04-22 15:09 ` [PATCH 8/8] ARM: dts: " Alexandre Torgue
2022-04-22 15:09   ` Alexandre Torgue
2022-05-03 14:51 ` [PATCH 0/8] Add SCMI version of ST boards Alexandre TORGUE
2022-05-03 14:51   ` Alexandre TORGUE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.