diff mbox series

[v4,3/5] dt-bindings: bus: Add STM32 ETZPC firewall controller

Message ID 20200701132523.32533-4-benjamin.gaignard@st.com (mailing list archive)
State New, archived
Headers show
Series STM32 ETZPC bus controller | expand

Commit Message

Benjamin GAIGNARD July 1, 2020, 1:25 p.m. UTC
Document STM32 ETZPC firewall controller bindings

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 .../bindings/bus/stm32/st,stm32-etzpc.yaml         | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml

Comments

Rob Herring July 13, 2020, 5:05 p.m. UTC | #1
On Wed, Jul 01, 2020 at 03:25:21PM +0200, Benjamin Gaignard wrote:
> Document STM32 ETZPC firewall controller bindings
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  .../bindings/bus/stm32/st,stm32-etzpc.yaml         | 46 ++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
> new file mode 100644
> index 000000000000..d92865fda40c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bus/stm32/st,stm32-etzpc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STM32 Extended TrustZone Protection controller
> +
> +maintainers:
> +  - Benjamin Gaignard <benjamin.gaignard@st.com>
> +
> +description: STMicroelectronics's STM32 firewall bus controller implementation
> +
> +allOf:
> +  - $ref: "firewall-provider.yaml#"
> +  - $ref: /schemas/simple-bus.yaml#

Your bus has controls/setup, it's not a simple-bus.

Do you expect an old kernel or one with support for "st,stm32-etzpc-bus" 
disabled to work? How's it going to know if certain nodes can't be 
accessed without that support? 

> +
> +properties:
> +  compatible:
> +    contains:
> +      enum:
> +        - st,stm32-etzpc-bus
> +
> +  reg:
> +   maxItems: 1
> +
> +  '#firewall-cells':
> +    const: 2
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#firewall-cells'
> +
> +examples:
> +  - |
> +    soc@5c007000 {
> +      compatible = "st,stm32-etzpc-bus", "simple-bus";
> +      reg = <0x5c007000 0x400>;
> +      #firewall-cells = <2>;
> +      #address-cells = <1>;
> +      #size-cells = <1>;
> +      ranges;
> +    };
> +
> +...
> -- 
> 2.15.0
>
Benjamin GAIGNARD July 20, 2020, 9:21 a.m. UTC | #2
On 7/13/20 7:05 PM, Rob Herring wrote:
> On Wed, Jul 01, 2020 at 03:25:21PM +0200, Benjamin Gaignard wrote:
>> Document STM32 ETZPC firewall controller bindings
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
>> ---
>>   .../bindings/bus/stm32/st,stm32-etzpc.yaml         | 46 ++++++++++++++++++++++
>>   1 file changed, 46 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
>> new file mode 100644
>> index 000000000000..d92865fda40c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
>> @@ -0,0 +1,46 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/bus/stm32/st,stm32-etzpc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: STM32 Extended TrustZone Protection controller
>> +
>> +maintainers:
>> +  - Benjamin Gaignard <benjamin.gaignard@st.com>
>> +
>> +description: STMicroelectronics's STM32 firewall bus controller implementation
>> +
>> +allOf:
>> +  - $ref: "firewall-provider.yaml#"
>> +  - $ref: /schemas/simple-bus.yaml#
> Your bus has controls/setup, it's not a simple-bus.
>
> Do you expect an old kernel or one with support for "st,stm32-etzpc-bus"
> disabled to work? How's it going to know if certain nodes can't be
> accessed without that support?
It already works with simple bus.
The goal behind implementing firewall bus controllers is to expose this 
in the DT
rather than hide it in the boot stages.

>
>> +
>> +properties:
>> +  compatible:
>> +    contains:
>> +      enum:
>> +        - st,stm32-etzpc-bus
>> +
>> +  reg:
>> +   maxItems: 1
>> +
>> +  '#firewall-cells':
>> +    const: 2
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - '#firewall-cells'
>> +
>> +examples:
>> +  - |
>> +    soc@5c007000 {
>> +      compatible = "st,stm32-etzpc-bus", "simple-bus";
>> +      reg = <0x5c007000 0x400>;
>> +      #firewall-cells = <2>;
>> +      #address-cells = <1>;
>> +      #size-cells = <1>;
>> +      ranges;
>> +    };
>> +
>> +...
>> -- 
>> 2.15.0
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
new file mode 100644
index 000000000000..d92865fda40c
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/stm32/st,stm32-etzpc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STM32 Extended TrustZone Protection controller
+
+maintainers:
+  - Benjamin Gaignard <benjamin.gaignard@st.com>
+
+description: STMicroelectronics's STM32 firewall bus controller implementation
+
+allOf:
+  - $ref: "firewall-provider.yaml#"
+  - $ref: /schemas/simple-bus.yaml#
+
+properties:
+  compatible:
+    contains:
+      enum:
+        - st,stm32-etzpc-bus
+
+  reg:
+   maxItems: 1
+
+  '#firewall-cells':
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - '#firewall-cells'
+
+examples:
+  - |
+    soc@5c007000 {
+      compatible = "st,stm32-etzpc-bus", "simple-bus";
+      reg = <0x5c007000 0x400>;
+      #firewall-cells = <2>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+      ranges;
+    };
+
+...