[v3,2/6] dt-bindings: treewide: add feature-domains description in binding files
Commit Message
feature-domains is an optional property that allows a peripheral to
refer to one or more feature domain controller(s).
Description of this property is added to all peripheral binding files of
the peripheral under the STM32 System Bus. It allows an accurate
representation of the hardware, where various peripherals are connected
to this firewall bus. The firewall can then check the peripheral accesses
before allowing it to probe.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
Patch not present in V1 and V2.
Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml | 5 +++++
Documentation/devicetree/bindings/dma/st,stm32-dma.yaml | 5 +++++
Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml | 5 +++++
Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 5 +++++
Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml | 5 +++++
.../devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 5 +++++
Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml | 5 +++++
Documentation/devicetree/bindings/media/st,stm32-cec.yaml | 5 +++++
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml | 5 +++++
.../bindings/memory-controllers/st,stm32-fmc2-ebi.yaml | 5 +++++
Documentation/devicetree/bindings/mfd/st,stm32-lptimer.yaml | 5 +++++
Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml | 6 ++++++
Documentation/devicetree/bindings/mmc/arm,pl18x.yaml | 5 +++++
Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 5 +++++
.../devicetree/bindings/phy/phy-stm32-usbphyc.yaml | 5 +++++
.../devicetree/bindings/regulator/st,stm32-vrefbuf.yaml | 5 +++++
Documentation/devicetree/bindings/rng/st,stm32-rng.yaml | 5 +++++
Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 5 +++++
Documentation/devicetree/bindings/sound/st,stm32-i2s.yaml | 5 +++++
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml | 5 +++++
.../devicetree/bindings/sound/st,stm32-spdifrx.yaml | 5 +++++
Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml | 5 +++++
Documentation/devicetree/bindings/spi/st,stm32-spi.yaml | 5 +++++
Documentation/devicetree/bindings/usb/dwc2.yaml | 5 +++++
24 files changed, 121 insertions(+)
Comments
On Fri, 27 Jan 2023 17:40:36 +0100
Gatien Chevallier <gatien.chevallier@foss.st.com> wrote:
> feature-domains is an optional property that allows a peripheral to
> refer to one or more feature domain controller(s).
>
> Description of this property is added to all peripheral binding files of
> the peripheral under the STM32 System Bus. It allows an accurate
> representation of the hardware, where various peripherals are connected
> to this firewall bus. The firewall can then check the peripheral accesses
> before allowing it to probe.
>
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
There was probably a cleaner way to ensure that this could go via the various
subsystem trees, but hopefully there won't be any clashes with other work going in
and if there is, the resolution should be simple. Hence I'm fine with
this going via the dt tree.
So for the IIO ones below,
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
> index 1c340c95df16..c68b7b0e1903 100644
> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
> @@ -93,6 +93,11 @@ properties:
> '#size-cells':
> const: 0
>
> + feature-domains:
> + $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
> + minItems: 1
> + maxItems: 3
> +
> allOf:
> - if:
> properties:
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
> index 1970503389aa..d01f60765e48 100644
> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
> @@ -59,6 +59,11 @@ properties:
> If not, SPI CLKOUT frequency will not be accurate.
> maximum: 20000000
>
> + feature-domains:
> + $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
> + minItems: 1
> + maxItems: 3
> +
> required:
> - compatible
> - reg
> diff --git a/Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml b/Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml
> index 0f1bf1110122..f6fe58d2f9b8 100644
> --- a/Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml
> +++ b/Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml
> @@ -45,6 +45,11 @@ properties:
> '#size-cells':
> const: 0
>
> + feature-domains:
> + $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
> + minItems: 1
> + maxItems: 3
> +
> additionalProperties: false
On Fri, Jan 27, 2023 at 05:40:36PM +0100, Gatien Chevallier wrote:
> feature-domains is an optional property that allows a peripheral to
> refer to one or more feature domain controller(s).
>
> Description of this property is added to all peripheral binding files of
> the peripheral under the STM32 System Bus. It allows an accurate
> representation of the hardware, where various peripherals are connected
> to this firewall bus. The firewall can then check the peripheral accesses
> before allowing it to probe.
>
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> ---
>
> Patch not present in V1 and V2.
>
> Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml | 5 +++++
> Documentation/devicetree/bindings/dma/st,stm32-dma.yaml | 5 +++++
> Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml | 5 +++++
> Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 5 +++++
> Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml | 5 +++++
> .../devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 5 +++++
> Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml | 5 +++++
> Documentation/devicetree/bindings/media/st,stm32-cec.yaml | 5 +++++
> Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml | 5 +++++
> .../bindings/memory-controllers/st,stm32-fmc2-ebi.yaml | 5 +++++
> Documentation/devicetree/bindings/mfd/st,stm32-lptimer.yaml | 5 +++++
> Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml | 6 ++++++
> Documentation/devicetree/bindings/mmc/arm,pl18x.yaml | 5 +++++
> Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 5 +++++
> .../devicetree/bindings/phy/phy-stm32-usbphyc.yaml | 5 +++++
> .../devicetree/bindings/regulator/st,stm32-vrefbuf.yaml | 5 +++++
> Documentation/devicetree/bindings/rng/st,stm32-rng.yaml | 5 +++++
> Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 5 +++++
> Documentation/devicetree/bindings/sound/st,stm32-i2s.yaml | 5 +++++
> Documentation/devicetree/bindings/sound/st,stm32-sai.yaml | 5 +++++
> .../devicetree/bindings/sound/st,stm32-spdifrx.yaml | 5 +++++
> Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml | 5 +++++
> Documentation/devicetree/bindings/spi/st,stm32-spi.yaml | 5 +++++
> Documentation/devicetree/bindings/usb/dwc2.yaml | 5 +++++
> 24 files changed, 121 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml b/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml
> index 4ccb335e8063..cb2ad7d5fdb5 100644
> --- a/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml
> +++ b/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml
> @@ -41,6 +41,11 @@ properties:
> maximum: 2
> default: 0
>
> + feature-domains:
> + $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
Not how common properties work. Consumer properties should be in a
schema with 'select: true' (the one you are referencing) and here you
just need to define the entries. Like clocks, power-domains, etc.
> + minItems: 1
> + maxItems: 3
Why is this variable and what is each entry?
I still don't like the naming. Everything is a feature and a domain...
It might be a bit easier to come up with a name with multiple users of
this binding presented. I'm hesistant to define any new common binding
with only 1 user as I've said multiple times on this binding.
Rob
@@ -41,6 +41,11 @@ properties:
maximum: 2
default: 0
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -82,6 +82,11 @@ properties:
description: if defined, it indicates that the controller
supports memory-to-memory transfer
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -28,6 +28,11 @@ properties:
resets:
maxItems: 1
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -99,6 +99,11 @@ properties:
wakeup-source: true
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -93,6 +93,11 @@ properties:
'#size-cells':
const: 0
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
allOf:
- if:
properties:
@@ -59,6 +59,11 @@ properties:
If not, SPI CLKOUT frequency will not be accurate.
maximum: 20000000
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -45,6 +45,11 @@ properties:
'#size-cells':
const: 0
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
additionalProperties: false
required:
@@ -29,6 +29,11 @@ properties:
- const: cec
- const: hdmi-cec
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -36,6 +36,11 @@ properties:
resets:
maxItems: 1
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
port:
$ref: /schemas/graph.yaml#/$defs/port-base
unevaluatedProperties: false
@@ -45,6 +45,11 @@ properties:
Reflects the memory layout with four integer values per bank. Format:
<bank-number> 0 <address of the bank> <size>
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
patternProperties:
"^.*@[0-4],[a-f0-9]+$":
type: object
@@ -44,6 +44,11 @@ properties:
wakeup-source: true
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
pwm:
type: object
additionalProperties: false
@@ -67,6 +67,12 @@ properties:
"#size-cells":
const: 0
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
+
pwm:
type: object
additionalProperties: false
@@ -78,6 +78,11 @@ properties:
- const: rx
- const: tx
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
power-domains: true
resets:
@@ -93,6 +93,11 @@ properties:
select RCC clock instead of ETH_REF_CLK.
type: boolean
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- clocks
@@ -55,6 +55,11 @@ properties:
description: number of clock cells for ck_usbo_48m consumer
const: 0
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
#Required child nodes:
patternProperties:
@@ -30,6 +30,11 @@ properties:
vdda-supply:
description: phandle to the vdda input analog voltage.
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -30,6 +30,11 @@ properties:
type: boolean
description: If set enable the clock detection management
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -77,6 +77,11 @@ properties:
enum: [1, 2, 4, 8, 12, 14, 16]
default: 8
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
allOf:
- $ref: rs485.yaml#
- $ref: serial.yaml#
@@ -61,6 +61,11 @@ properties:
description: Configure the I2S device as MCLK clock provider.
const: 0
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- "#sound-dai-cells"
@@ -48,6 +48,11 @@ properties:
clock-names:
maxItems: 3
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -50,6 +50,11 @@ properties:
resets:
maxItems: 1
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- "#sound-dai-cells"
@@ -46,6 +46,11 @@ properties:
- const: tx
- const: rx
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
required:
- compatible
- reg
@@ -59,6 +59,11 @@ properties:
- const: rx
- const: tx
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
patternProperties:
"^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-f]+$":
type: object
@@ -168,6 +168,11 @@ properties:
tpl-support: true
+ feature-domains:
+ $ref: /schemas/feature-controllers/feature-domain-controller.yaml#/properties/feature-domains
+ minItems: 1
+ maxItems: 3
+
dependencies:
port: [ usb-role-switch ]
role-switch-default-mode: [ usb-role-switch ]