Skip to contentSkip to conversation

Add SCMI version of ST boards

PATCH In review Alexandre Torgue 7 participants 31 messages Apr 22, 2022 – May 9, 2022

Subsystems (7)
lore
Share & tools
lore

Alexandre Torgue

author maintainer
#0 lore raw

cover Add SCMI version of ST boards

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
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 1/8 dt-bindings: rcc: Add optional external ethernet RX clock properties

From: Marek Vasut <[email protected]>

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]+'

Cc Alexandre Torgue <[email protected]>
Cc Gabriel Fernandez <[email protected]>
Cc Rob Herring <[email protected]>

To: [email protected]

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +8 -0
index a0ae4867ed27..7a251264582d 100644
@@ -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
 
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties

Quoted 23 lines · Alexandre Torgue

From: Marek Vasut <[email protected]>

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]+'

Cc Alexandre Torgue <[email protected]>
Cc Gabriel Fernandez <[email protected]>
Cc Rob Herring <[email protected]>

To: [email protected]

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +1 -0
index a0ae4867ed27..7a251264582d 100644
@@ -59,6 +59,14 @@ properties:
            - st,stm32mp1-rcc
        - const: syscon
 
+  clocks:

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml properties: · line 72

Quoted 10 lines
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +7 -0
+    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 ?

author maintainer
#3 lore raw

Re: [PATCH 1/8] dt-bindings: rcc: Add optional external ethernet RX clock properties

Hi Marek

Quoted 26 lines · Marek Vasut
Quoted 25 lines · Alexandre Torgue

From: Marek Vasut <[email protected]>

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]+'

Cc Alexandre Torgue <[email protected]>
Cc Gabriel Fernandez <[email protected]>
Cc Rob Herring <[email protected]>

To: [email protected]

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +0 -0
index a0ae4867ed27..7a251264582d 100644
@@ -59,6 +59,14 @@ properties:

            - st,stm32mp1-rcc
        - const: syscon
+  clocks:
+    description:
+      Specifies the external RX clock for ethernet MAC. +    maxItems: 1

Quoted 8 lines
Quoted 6 lines
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +4 -0
+
+  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

author maintainer
#4 lore raw

PATCH 2/8 dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

In reply to Alexandre Torgue

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

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +34 -8
index 7a251264582d..bb0e0b92e907 100644
@@ -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:
Signature · 1 line
2.17.1
#5 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Quoted 14 lines · Alexandre Torgue

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

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +0 -0
index 7a251264582d..bb0e0b92e907 100644
@@ -58,14 +58,8 @@ properties:
            - st,stm32mp1-rcc-secure
            - st,stm32mp1-rcc
        - const: syscon

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml properties: · line 62

Quoted 10 lines
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +2 -8
-
-  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

maintainer
#6 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Quoted 32 lines · Marek Vasut
Quoted 14 lines · Alexandre Torgue

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

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +0 -0
index 7a251264582d..bb0e0b92e907 100644
@@ -58,14 +58,8 @@ properties:
            - st,stm32mp1-rcc-secure
            - st,stm32mp1-rcc
        - const: syscon

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml properties: · line 62

Quoted 10 lines
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +2 -8
-
-  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.

Quoted 2 lines

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

#7 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Quoted 33 lines · Rob Herring
Quoted 32 lines · Marek Vasut
Quoted 14 lines · Alexandre Torgue

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

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +0 -0
index 7a251264582d..bb0e0b92e907 100644
@@ -58,14 +58,8 @@ properties:
             - st,stm32mp1-rcc-secure
             - st,stm32mp1-rcc
         - const: syscon

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml properties: · line 62

Quoted 10 lines
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +2 -8
-
-  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.

Quoted 4 lines
Quoted 2 lines

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 ?

maintainer
#8 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Quoted 34 lines · Marek Vasut
Quoted 33 lines · Rob Herring
Quoted 32 lines · Marek Vasut
Quoted 14 lines · Alexandre Torgue

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

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +0 -0
index 7a251264582d..bb0e0b92e907 100644
@@ -58,14 +58,8 @@ properties:
             - st,stm32mp1-rcc-secure
             - st,stm32mp1-rcc
         - const: syscon

Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml properties: · line 62

Quoted 10 lines
Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml +2 -8
-
-  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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

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

#10 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"

In reply to Alexandre Torgue
Quoted 6 lines · Alexandre Torgue

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

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'

author maintainer
#11 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Hi Rob

Quoted 60 lines · Rob Herring
Quoted 6 lines · Alexandre Torgue

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

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

Quoted 2 lines
     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/[email protected]

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

#12 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"

Quoted 82 lines · Alexandre TORGUE

Hi Rob

Quoted 60 lines · Rob Herring
Quoted 6 lines · Alexandre Torgue

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

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

Quoted 2 lines
     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/[email protected]

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

Quoted 7 lines

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

#13 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st, stm32mp1-rcc-secure"

Quoted 88 lines · Rob Herring
Quoted 85 lines · Alexandre TORGUE

Hi Rob

Quoted 60 lines · Rob Herring
Quoted 6 lines · Alexandre Torgue

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

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

Quoted 2 lines
     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/[email protected]

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

Quoted 7 lines
Quoted 4 lines

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

author maintainer
#14 lore raw

Re: [PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Quoted 99 lines · Rob Herring
Quoted 88 lines · Rob Herring
Quoted 85 lines · Alexandre TORGUE

Hi Rob

Quoted 54 lines · Rob Herring
Quoted 6 lines · Alexandre Torgue

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

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:

Quoted 8 lines

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/[email protected]

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

Quoted 7 lines
Quoted 4 lines

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:

Quoted 8 lines

/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

Quoted 2 lines

Rob

author maintainer
#15 lore raw

PATCH 3/8 dt-bindings: clock: stm32mp15: rename CK_SCMI define

In reply to Alexandre Torgue

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

include/dt-bindings/clock/stm32mp1-clks.h +21 -25
index e02770b98e6c..25e8cfd43459 100644
@@ -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_ */
Signature · 1 line
2.17.1
author maintainer
#17 lore raw

PATCH 4/8 dt-bindings: reset: stm32mp15: rename RST_SCMI define

In reply to Alexandre Torgue

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

include/dt-bindings/reset/stm32mp1-resets.h +12 -12
index f3a0ed317835..4ffa7c3612e6 100644
@@ -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_ */
Signature · 1 line
2.17.1
author maintainer
#19 lore raw

PATCH 5/8 ARM: stm32: select OPTEE on MPU family

In reply to Alexandre Torgue

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

arch/arm/mach-stm32/Kconfig +2 -0
index 98145031586f..b322cf2a136f 100644
@@ -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
Signature · 1 line
2.17.1
#20 lore raw

Re: [PATCH 5/8] ARM: stm32: select OPTEE on MPU family

Hello Alex,

Quoted 10 lines · Alexandre Torgue

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

arch/arm/mach-stm32/Kconfig +0 -0
index 98145031586f..b322cf2a136f 100644

arch/arm/mach-stm32/Kconfig menuconfig ARCH_STM32 · line 10

Quoted 5 lines
arch/arm/mach-stm32/Kconfig +2 -0
@@ -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

Quoted 3 lines
arch/arm/mach-stm32/Kconfig +0 -0
 	select ARM_AMBA
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_STM32
Signature · 4 lines
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 |
author maintainer
#21 lore raw

Re: [PATCH 5/8] ARM: stm32: select OPTEE on MPU family

Hi Ahmad,

Quoted 8 lines · Ahmad Fatoum

Hello Alex,

Quoted 5 lines · Alexandre Torgue

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

Quoted 15 lines

arch/arm/mach-stm32/Kconfig menuconfig ARCH_STM32 · line 10

Quoted 10 lines
arch/arm/mach-stm32/Kconfig +2 -0
index 98145031586f..b322cf2a136f 100644
@@ -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

Quoted 11 lines

Cheers,
Ahmad

Quoted 3 lines
arch/arm/mach-stm32/Kconfig +0 -0
  	select ARM_AMBA
  	select ARCH_HAS_RESET_CONTROLLER
  	select CLKSRC_STM32
author maintainer
#22 lore raw

PATCH 6/8 ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15

In reply to Alexandre Torgue

Enable optee and SCMI clocks/reset protocols support.

arch/arm/boot/dts/stm32mp151.dtsi +41 -0
index 7fdc324b3cf9..1b2fd3426a81 100644
@@ -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>;
Signature · 1 line
2.17.1
#23 lore raw

Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15

Quoted 9 lines · Alexandre Torgue

Enable optee and SCMI clocks/reset protocols support.

arch/arm/boot/dts/stm32mp151.dtsi +0 -0
index 7fdc324b3cf9..1b2fd3426a81 100644

arch/arm/boot/dts/stm32mp151.dtsi line 123

Quoted 9 lines
arch/arm/boot/dts/stm32mp151.dtsi +6 -0
@@ -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.

#24 lore raw

Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15

Hello Marek,

Quoted 17 lines

From: Marek Vasut <[email protected]>

Quoted 15 lines · Alexandre Torgue

Enable optee and SCMI clocks/reset protocols support.

arch/arm/boot/dts/stm32mp151.dtsi +0 -0
index 7fdc324b3cf9..1b2fd3426a81 100644
@@ -115,6 +115,33 @@
                 status = "disabled";
         };


+     firmware {

Quoted 8 lines
Quoted 5 lines

+             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

#25 lore raw

Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15

Quoted 1 line · Etienne CARRIERE

Hello Marek,

Hi,

Quoted 26 lines
Quoted 16 lines

From: Marek Vasut <[email protected]>

Quoted 14 lines · Alexandre Torgue

Enable optee and SCMI clocks/reset protocols support.

arch/arm/boot/dts/stm32mp151.dtsi +0 -0
index 7fdc324b3cf9..1b2fd3426a81 100644
@@ -115,6 +115,33 @@
                 status = "disabled";
         };
 
Quoted 9 lines

arch/arm/boot/dts/stm32mp151.dtsi line 123

Quoted 6 lines
arch/arm/boot/dts/stm32mp151.dtsi +6 -0
+     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.

Quoted 1 line

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.

#26 lore raw

Re: [PATCH 6/8] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15

Hi,

Quoted 31 lines · Marek Vasut
Quoted 1 line · Etienne CARRIERE

Hello Marek,

Hi,

Quoted 26 lines
Quoted 25 lines

From: Marek Vasut <[email protected]>

Quoted 11 lines · Alexandre Torgue

Enable optee and SCMI clocks/reset protocols support.

arch/arm/boot/dts/stm32mp151.dtsi +0 -0
index 7fdc324b3cf9..1b2fd3426a81 100644

arch/arm/boot/dts/stm32mp151.dtsi line 123

Quoted 9 lines
arch/arm/boot/dts/stm32mp151.dtsi +6 -0
@@ -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.

Quoted 5 lines
Quoted 1 line

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

Signature · 3 lines
Pengutronix e.K.           | Rouven Czerwinski          |
Steuerwalder Str. 21       | http://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0   |
author maintainer
#27 lore raw

PATCH 7/8 dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)

In reply to Alexandre Torgue

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

Documentation/devicetree/bindings/arm/stm32/stm32.yaml +17 -0
index fa0a1b84122e..4a3d66da0f1c 100644
@@ -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
Signature · 1 line
2.17.1
maintainer Acked-by on v1 7/8
#28 lore raw

Re: [PATCH 7/8] dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)

Quoted 10 lines · Alexandre Torgue

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

(quoted diff) +0 -4
-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1
author maintainer
#29 lore raw

PATCH 8/8 ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)

In reply to Alexandre Torgue

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

arch/arm/boot/dts/Makefile +4 -0
index 7c16f8a2b738..a98b2c26f80b 100644
@@ -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) += \
arch/arm/boot/dts/stm32mp157a-dk1-scmi.dts new file +86 -0

86 lines not on this page · raw message

arch/arm/boot/dts/stm32mp157c-dk2-scmi.dts new file +95 -0

95 lines not on this page · raw message

arch/arm/boot/dts/stm32mp157c-ed1-scmi.dts new file +91 -0

91 lines not on this page · raw message

arch/arm/boot/dts/stm32mp157c-ev1-scmi.dts new file +100 -0

100 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#30 lore raw
In reply to Alexandre Torgue
Quoted 45 lines · Alexandre Torgue

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:

(quoted diff) +0 -4
-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(-)
Quoted 5 lines

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