Hi,
Dependencies
============
I think entire patchset should go via one tree (Rob's). Patch #2 depends on
patch #1. Patch #3 could go separate tree as long as others are in the
linux-next. However for simplicity let's push everything through Rob's DT
tree?
Changelog
=========
This is a v2 of this one patch:
https://lore.kernel.org/linux-devicetree/[email protected]/
Changes since v1:
1. Add patches 1 and 2 to fix dt_binding_check and few dtbs_check warnings
Best regards,
Krzysztof
Krzysztof Kozlowski (3):
dt-bindings: intel,ixp4xx-expansion-bus: split out peripheral
properties
dt-bindings: reference MC peripheral properties in relevant devices
dt-bindings: serial: restrict possible child node names
.../ata/intel,ixp4xx-compact-flash.yaml | 1 +
...intel,ixp4xx-expansion-bus-controller.yaml | 64 +--------------
...tel,ixp4xx-expansion-peripheral-props.yaml | 80 +++++++++++++++++++
.../mc-peripheral-props.yaml | 1 +
.../devicetree/bindings/mtd/mtd-physmap.yaml | 1 +
.../devicetree/bindings/serial/8250.yaml | 1 +
.../devicetree/bindings/serial/serial.yaml | 2 +-
.../bindings/watchdog/maxim,max63xx.yaml | 1 +
8 files changed, 87 insertions(+), 64 deletions(-)
create mode 100644 Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
--
2.34.1
The properties of devices in IXP4xx expansion bus need to be also
applied to actual devices' bindings. Prepare for this by splitting them
to separate intel,ixp4xx-expansion-peripheral-props binding, just like
other memory-controller peripheral properties.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
...intel,ixp4xx-expansion-bus-controller.yaml | 64 +--------------
...tel,ixp4xx-expansion-peripheral-props.yaml | 80 +++++++++++++++++++
.../mc-peripheral-props.yaml | 1 +
3 files changed, 82 insertions(+), 63 deletions(-)
create mode 100644 Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
diff --git a/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml b/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
index 5fb4e7bfa4da..a771796ec499 100644
--- a/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
+++ b/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
@@ -56,69 +56,7 @@ patternProperties:
description: Devices attached to chip selects are represented as
subnodes.
type: object
-
- properties:
- intel,ixp4xx-eb-t1:
- description: Address timing, extend address phase with n cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- maximum: 3
-
- intel,ixp4xx-eb-t2:
- description: Setup chip select timing, extend setup phase with n cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- maximum: 3
-
- intel,ixp4xx-eb-t3:
- description: Strobe timing, extend strobe phase with n cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- maximum: 15
-
- intel,ixp4xx-eb-t4:
- description: Hold timing, extend hold phase with n cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- maximum: 3
-
- intel,ixp4xx-eb-t5:
- description: Recovery timing, extend recovery phase with n cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- maximum: 15
-
- intel,ixp4xx-eb-cycle-type:
- description: The type of cycles to use on the expansion bus for this
- chip select. 0 = Intel cycles, 1 = Motorola cycles, 2 = HPI cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1, 2]
-
- intel,ixp4xx-eb-byte-access-on-halfword:
- description: Allow byte read access on half word devices.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
- intel,ixp4xx-eb-hpi-hrdy-pol-high:
- description: Set HPI HRDY polarity to active high when using HPI.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
- intel,ixp4xx-eb-mux-address-and-data:
- description: Multiplex address and data on the data bus.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
- intel,ixp4xx-eb-ahb-split-transfers:
- description: Enable AHB split transfers.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
- intel,ixp4xx-eb-write-enable:
- description: Enable write cycles.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
- intel,ixp4xx-eb-byte-access:
- description: Expansion bus uses only 8 bits. The default is to use
- 16 bits.
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
+ $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
required:
- compatible
diff --git a/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml b/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
new file mode 100644
index 000000000000..8f782c80e88b
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Peripheral properties for Intel IXP4xx Expansion Bus
+
+description: |
+ The IXP4xx expansion bus controller handles access to devices on the
+ memory-mapped expansion bus on the Intel IXP4xx family of system on chips,
+ including IXP42x, IXP43x, IXP45x and IXP46x.
+
+maintainers:
+ - Linus Walleij <[email protected]>
+
+properties:
+ intel,ixp4xx-eb-t1:
+ description: Address timing, extend address phase with n cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 3
+
+ intel,ixp4xx-eb-t2:
+ description: Setup chip select timing, extend setup phase with n cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 3
+
+ intel,ixp4xx-eb-t3:
+ description: Strobe timing, extend strobe phase with n cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 15
+
+ intel,ixp4xx-eb-t4:
+ description: Hold timing, extend hold phase with n cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 3
+
+ intel,ixp4xx-eb-t5:
+ description: Recovery timing, extend recovery phase with n cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 15
+
+ intel,ixp4xx-eb-cycle-type:
+ description: The type of cycles to use on the expansion bus for this
+ chip select. 0 = Intel cycles, 1 = Motorola cycles, 2 = HPI cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
+
+ intel,ixp4xx-eb-byte-access-on-halfword:
+ description: Allow byte read access on half word devices.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ intel,ixp4xx-eb-hpi-hrdy-pol-high:
+ description: Set HPI HRDY polarity to active high when using HPI.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ intel,ixp4xx-eb-mux-address-and-data:
+ description: Multiplex address and data on the data bus.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ intel,ixp4xx-eb-ahb-split-transfers:
+ description: Enable AHB split transfers.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ intel,ixp4xx-eb-write-enable:
+ description: Enable write cycles.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ intel,ixp4xx-eb-byte-access:
+ description: Expansion bus uses only 8 bits. The default is to use
+ 16 bits.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml b/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
index 53ae995462db..5acfcad12bb7 100644
--- a/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
@@ -34,5 +34,6 @@ required:
# The controller specific properties go here.
allOf:
- $ref: st,stm32-fmc2-ebi-props.yaml#
+ - $ref: intel,ixp4xx-expansion-peripheral-props.yaml#
additionalProperties: true
--
2.34.1
Several devices can be attached to memory controllers (or memory-mapped
buses), thus they can come with additional controller-specific
properties, e.g. devices wired under Intel IXP4XX bus: cfi-flash,
intel,ixp4xx-compact-flash, NS8250 serial and MAX6369 watchdog.
Referencing Memory Controller or IXP4XX bus peripheral properties fixes
few dtbs_check warnings like:
intel-ixp42x-gateworks-gw2348.dtb: ide@1,0: Unevaluated properties are not allowed
('intel,ixp4xx-eb-ahb-split-transfers', 'intel,ixp4xx-eb-byte-access', ... ' were unexpected)
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/ata/intel,ixp4xx-compact-flash.yaml | 1 +
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 1 +
Documentation/devicetree/bindings/serial/8250.yaml | 1 +
Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml | 1 +
4 files changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/ata/intel,ixp4xx-compact-flash.yaml b/Documentation/devicetree/bindings/ata/intel,ixp4xx-compact-flash.yaml
index 52e18600ecff..378692010c56 100644
--- a/Documentation/devicetree/bindings/ata/intel,ixp4xx-compact-flash.yaml
+++ b/Documentation/devicetree/bindings/ata/intel,ixp4xx-compact-flash.yaml
@@ -35,6 +35,7 @@ required:
allOf:
- $ref: pata-common.yaml#
+ - $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
index 5df94953c34e..44cd4476d1d3 100644
--- a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
@@ -15,6 +15,7 @@ description: |
allOf:
- $ref: "mtd.yaml#"
+ - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
properties:
compatible:
diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
index 2d0cac642427..4aeecd0abb68 100644
--- a/Documentation/devicetree/bindings/serial/8250.yaml
+++ b/Documentation/devicetree/bindings/serial/8250.yaml
@@ -11,6 +11,7 @@ maintainers:
allOf:
- $ref: serial.yaml#
+ - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
- if:
anyOf:
- required:
diff --git a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
index ab9641e845db..38079e1b6a44 100644
--- a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
+++ b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
@@ -8,6 +8,7 @@ title: Maxim 63xx Watchdog Timers
allOf:
- $ref: "watchdog.yaml#"
+ - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
maintainers:
- Marc Zyngier <[email protected]>
--
2.34.1
The re-usable serial.yaml schema matches every property with ".*"
pattern, thus any other schema referencing it will not report unknown
(unevaluated) properties. This hides several wrong properties. It is
a limitation of dtschema, thus provide a simple workaround: expect
children to be only of few names matching upstream usage (Bluetooth,
GNSS, GPS and MCU).
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/serial/serial.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/serial/serial.yaml b/Documentation/devicetree/bindings/serial/serial.yaml
index e05ad3ac2abc..c9231e501f1f 100644
--- a/Documentation/devicetree/bindings/serial/serial.yaml
+++ b/Documentation/devicetree/bindings/serial/serial.yaml
@@ -96,7 +96,7 @@ then:
rts-gpios: false
patternProperties:
- ".*":
+ "^bluetooth|gnss|gps|mcu$":
if:
type: object
then:
--
2.34.1
On Fri, Jan 27, 2023 at 10:32 AM Krzysztof Kozlowski
<[email protected]> wrote:
> The properties of devices in IXP4xx expansion bus need to be also
> applied to actual devices' bindings. Prepare for this by splitting them
> to separate intel,ixp4xx-expansion-peripheral-props binding, just like
> other memory-controller peripheral properties.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Whoa, this is a complex one!
But I assume you and Marek know what you're doing so:
Acked-by: Linus Walleij <[email protected]>
Maybe I can assign the following external bus interface to the Qcom
people, as it is yet another one of those:
Documentation/devicetree/bindings/bus/qcom,ebi2.txt
I've been uncertain about how I should convert that one over properly.
Yours,
Linus Walleij
On Fri, Jan 27, 2023 at 10:32 AM Krzysztof Kozlowski
<[email protected]> wrote:
> Several devices can be attached to memory controllers (or memory-mapped
> buses), thus they can come with additional controller-specific
> properties, e.g. devices wired under Intel IXP4XX bus: cfi-flash,
> intel,ixp4xx-compact-flash, NS8250 serial and MAX6369 watchdog.
>
> Referencing Memory Controller or IXP4XX bus peripheral properties fixes
> few dtbs_check warnings like:
>
> intel-ixp42x-gateworks-gw2348.dtb: ide@1,0: Unevaluated properties are not allowed
> ('intel,ixp4xx-eb-ahb-split-transfers', 'intel,ixp4xx-eb-byte-access', ... ' were unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Fri, Jan 27, 2023 at 10:32 AM Krzysztof Kozlowski
<[email protected]> wrote:
> The re-usable serial.yaml schema matches every property with ".*"
> pattern, thus any other schema referencing it will not report unknown
> (unevaluated) properties. This hides several wrong properties. It is
> a limitation of dtschema, thus provide a simple workaround: expect
> children to be only of few names matching upstream usage (Bluetooth,
> GNSS, GPS and MCU).
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Fair enough,
Acked-by: Linus Walleij <[email protected]>
However I think V.35 WAN devices (high speed serial network links)
should actually be using this? They are just some fancy serial port
after all. Cf
Documentation/devicetree/bindings/net/intel,ixp4xx-hss.yaml
No big deal I guess since they are mostly an anarchronism and not
on the table right now.
Yours,
Linus Walleij
On 1/27/23 18:32, Krzysztof Kozlowski wrote:
> Several devices can be attached to memory controllers (or memory-mapped
> buses), thus they can come with additional controller-specific
> properties, e.g. devices wired under Intel IXP4XX bus: cfi-flash,
> intel,ixp4xx-compact-flash, NS8250 serial and MAX6369 watchdog.
>
> Referencing Memory Controller or IXP4XX bus peripheral properties fixes
> few dtbs_check warnings like:
>
> intel-ixp42x-gateworks-gw2348.dtb: ide@1,0: Unevaluated properties are not allowed
> ('intel,ixp4xx-eb-ahb-split-transfers', 'intel,ixp4xx-eb-byte-access', ... ' were unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Damien Le Moal <[email protected]>
--
Damien Le Moal
Western Digital Research
On 27/01/2023 14:29, Linus Walleij wrote:
> On Fri, Jan 27, 2023 at 10:32 AM Krzysztof Kozlowski
> <[email protected]> wrote:
>
>> The re-usable serial.yaml schema matches every property with ".*"
>> pattern, thus any other schema referencing it will not report unknown
>> (unevaluated) properties. This hides several wrong properties. It is
>> a limitation of dtschema, thus provide a simple workaround: expect
>> children to be only of few names matching upstream usage (Bluetooth,
>> GNSS, GPS and MCU).
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> Fair enough,
> Acked-by: Linus Walleij <[email protected]>
>
> However I think V.35 WAN devices (high speed serial network links)
> should actually be using this? They are just some fancy serial port
> after all. Cf
> Documentation/devicetree/bindings/net/intel,ixp4xx-hss.yaml
>
> No big deal I guess since they are mostly an anarchronism and not
> on the table right now.
intel,ixp4xx-hss is not part of the expansion bus node.
Best regards,
Krzysztof
Hi Krzysztof,
[email protected] wrote on Fri, 27 Jan 2023 10:32:16 +0100:
> Several devices can be attached to memory controllers (or memory-mapped
> buses), thus they can come with additional controller-specific
> properties, e.g. devices wired under Intel IXP4XX bus: cfi-flash,
> intel,ixp4xx-compact-flash, NS8250 serial and MAX6369 watchdog.
>
> Referencing Memory Controller or IXP4XX bus peripheral properties fixes
> few dtbs_check warnings like:
>
> intel-ixp42x-gateworks-gw2348.dtb: ide@1,0: Unevaluated properties are not allowed
> ('intel,ixp4xx-eb-ahb-split-transfers', 'intel,ixp4xx-eb-byte-access', ... ' were unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Thanks,
Miquèl
On Fri, Jan 27, 2023 at 10:32:15AM +0100, Krzysztof Kozlowski wrote:
> The properties of devices in IXP4xx expansion bus need to be also
> applied to actual devices' bindings. Prepare for this by splitting them
> to separate intel,ixp4xx-expansion-peripheral-props binding, just like
> other memory-controller peripheral properties.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> ...intel,ixp4xx-expansion-bus-controller.yaml | 64 +--------------
> ...tel,ixp4xx-expansion-peripheral-props.yaml | 80 +++++++++++++++++++
Kind of odd to have these in 2 directories. Can we move
intel,ixp4xx-expansion-bus-controller.yaml to
bindings/memory-controllers/?
Or maybe all the external/parallel bus interfaces need their own
directory?
> .../mc-peripheral-props.yaml | 1 +
> 3 files changed, 82 insertions(+), 63 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
>
> diff --git a/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml b/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
> index 5fb4e7bfa4da..a771796ec499 100644
> --- a/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
> +++ b/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
> @@ -56,69 +56,7 @@ patternProperties:
> description: Devices attached to chip selects are represented as
> subnodes.
> type: object
> -
> - properties:
> - intel,ixp4xx-eb-t1:
> - description: Address timing, extend address phase with n cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - maximum: 3
> -
> - intel,ixp4xx-eb-t2:
> - description: Setup chip select timing, extend setup phase with n cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - maximum: 3
> -
> - intel,ixp4xx-eb-t3:
> - description: Strobe timing, extend strobe phase with n cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - maximum: 15
> -
> - intel,ixp4xx-eb-t4:
> - description: Hold timing, extend hold phase with n cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - maximum: 3
> -
> - intel,ixp4xx-eb-t5:
> - description: Recovery timing, extend recovery phase with n cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - maximum: 15
> -
> - intel,ixp4xx-eb-cycle-type:
> - description: The type of cycles to use on the expansion bus for this
> - chip select. 0 = Intel cycles, 1 = Motorola cycles, 2 = HPI cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1, 2]
> -
> - intel,ixp4xx-eb-byte-access-on-halfword:
> - description: Allow byte read access on half word devices.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1]
> -
> - intel,ixp4xx-eb-hpi-hrdy-pol-high:
> - description: Set HPI HRDY polarity to active high when using HPI.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1]
> -
> - intel,ixp4xx-eb-mux-address-and-data:
> - description: Multiplex address and data on the data bus.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1]
> -
> - intel,ixp4xx-eb-ahb-split-transfers:
> - description: Enable AHB split transfers.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1]
> -
> - intel,ixp4xx-eb-write-enable:
> - description: Enable write cycles.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1]
> -
> - intel,ixp4xx-eb-byte-access:
> - description: Expansion bus uses only 8 bits. The default is to use
> - 16 bits.
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [0, 1]
> + $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
>
> required:
> - compatible
> diff --git a/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml b/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
> new file mode 100644
> index 000000000000..8f782c80e88b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
> @@ -0,0 +1,80 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Peripheral properties for Intel IXP4xx Expansion Bus
> +
> +description: |
Don't need '|'.
> + The IXP4xx expansion bus controller handles access to devices on the
> + memory-mapped expansion bus on the Intel IXP4xx family of system on chips,
> + including IXP42x, IXP43x, IXP45x and IXP46x.
> +
> +maintainers:
> + - Linus Walleij <[email protected]>
> +
> +properties:
> + intel,ixp4xx-eb-t1:
> + description: Address timing, extend address phase with n cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maximum: 3
> +
> + intel,ixp4xx-eb-t2:
> + description: Setup chip select timing, extend setup phase with n cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maximum: 3
> +
> + intel,ixp4xx-eb-t3:
> + description: Strobe timing, extend strobe phase with n cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maximum: 15
> +
> + intel,ixp4xx-eb-t4:
> + description: Hold timing, extend hold phase with n cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maximum: 3
> +
> + intel,ixp4xx-eb-t5:
> + description: Recovery timing, extend recovery phase with n cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maximum: 15
> +
> + intel,ixp4xx-eb-cycle-type:
> + description: The type of cycles to use on the expansion bus for this
> + chip select. 0 = Intel cycles, 1 = Motorola cycles, 2 = HPI cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2]
> +
> + intel,ixp4xx-eb-byte-access-on-halfword:
> + description: Allow byte read access on half word devices.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + intel,ixp4xx-eb-hpi-hrdy-pol-high:
> + description: Set HPI HRDY polarity to active high when using HPI.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + intel,ixp4xx-eb-mux-address-and-data:
> + description: Multiplex address and data on the data bus.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + intel,ixp4xx-eb-ahb-split-transfers:
> + description: Enable AHB split transfers.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + intel,ixp4xx-eb-write-enable:
> + description: Enable write cycles.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + intel,ixp4xx-eb-byte-access:
> + description: Expansion bus uses only 8 bits. The default is to use
> + 16 bits.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> +additionalProperties: true
> diff --git a/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml b/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
> index 53ae995462db..5acfcad12bb7 100644
> --- a/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
> +++ b/Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
> @@ -34,5 +34,6 @@ required:
> # The controller specific properties go here.
> allOf:
> - $ref: st,stm32-fmc2-ebi-props.yaml#
> + - $ref: intel,ixp4xx-expansion-peripheral-props.yaml#
>
> additionalProperties: true
> --
> 2.34.1
>
On Sun, Jan 29, 2023 at 4:48 PM Krzysztof Kozlowski
<[email protected]> wrote:
> On 27/01/2023 14:29, Linus Walleij wrote:
> > On Fri, Jan 27, 2023 at 10:32 AM Krzysztof Kozlowski
> > <[email protected]> wrote:
> >
> >> The re-usable serial.yaml schema matches every property with ".*"
> >> pattern, thus any other schema referencing it will not report unknown
> >> (unevaluated) properties. This hides several wrong properties. It is
> >> a limitation of dtschema, thus provide a simple workaround: expect
> >> children to be only of few names matching upstream usage (Bluetooth,
> >> GNSS, GPS and MCU).
> >>
> >> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> >
> > Fair enough,
> > Acked-by: Linus Walleij <[email protected]>
> >
> > However I think V.35 WAN devices (high speed serial network links)
> > should actually be using this? They are just some fancy serial port
> > after all. Cf
> > Documentation/devicetree/bindings/net/intel,ixp4xx-hss.yaml
> >
> > No big deal I guess since they are mostly an anarchronism and not
> > on the table right now.
>
> intel,ixp4xx-hss is not part of the expansion bus node.
True, my point is that WAN V.35 devices in general should be,
so that the pattern properties should include wan.
But we can add it later if a user appears.
Yours,
Linus Walleij
On Fri, Jan 27, 2023 at 10:32:14AM +0100, Krzysztof Kozlowski wrote:
> Hi,
>
> Dependencies
> ============
> I think entire patchset should go via one tree (Rob's). Patch #2 depends on
> patch #1. Patch #3 could go separate tree as long as others are in the
> linux-next. However for simplicity let's push everything through Rob's DT
> tree?
No objection from me:
Acked-by: Greg Kroah-Hartman <[email protected]>
On 30/01/2023 20:12, Rob Herring wrote:
> On Fri, Jan 27, 2023 at 10:32:15AM +0100, Krzysztof Kozlowski wrote:
>> The properties of devices in IXP4xx expansion bus need to be also
>> applied to actual devices' bindings. Prepare for this by splitting them
>> to separate intel,ixp4xx-expansion-peripheral-props binding, just like
>> other memory-controller peripheral properties.
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>> ---
>> ...intel,ixp4xx-expansion-bus-controller.yaml | 64 +--------------
>> ...tel,ixp4xx-expansion-peripheral-props.yaml | 80 +++++++++++++++++++
>
> Kind of odd to have these in 2 directories. Can we move
> intel,ixp4xx-expansion-bus-controller.yaml to
> bindings/memory-controllers/?
Indeed mostly we kept them so far in memory-controllers. Some of these
buses are used for attaching some type of memory, but I don't know if
ixp4xx can work like this.
>
> Or maybe all the external/parallel bus interfaces need their own
> directory?
Except the IXP4xx, I wouldn't know which one goes where... Example is
exynos-srom which can work with memory (SRAM, ROM, flash) or devices.
I'll move it to memory-controllers.
>
>> .../mc-peripheral-props.yaml | 1 +
>> 3 files changed, 82 insertions(+), 63 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml b/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
>> index 5fb4e7bfa4da..a771796ec499 100644
>> --- a/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
>> +++ b/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml
>> @@ -56,69 +56,7 @@ patternProperties:
>> description: Devices attached to chip selects are represented as
>> subnodes.
>> type: object
>> -
>> - properties:
>> - intel,ixp4xx-eb-t1:
>> - description: Address timing, extend address phase with n cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - maximum: 3
>> -
>> - intel,ixp4xx-eb-t2:
>> - description: Setup chip select timing, extend setup phase with n cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - maximum: 3
>> -
>> - intel,ixp4xx-eb-t3:
>> - description: Strobe timing, extend strobe phase with n cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - maximum: 15
>> -
>> - intel,ixp4xx-eb-t4:
>> - description: Hold timing, extend hold phase with n cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - maximum: 3
>> -
>> - intel,ixp4xx-eb-t5:
>> - description: Recovery timing, extend recovery phase with n cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - maximum: 15
>> -
>> - intel,ixp4xx-eb-cycle-type:
>> - description: The type of cycles to use on the expansion bus for this
>> - chip select. 0 = Intel cycles, 1 = Motorola cycles, 2 = HPI cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1, 2]
>> -
>> - intel,ixp4xx-eb-byte-access-on-halfword:
>> - description: Allow byte read access on half word devices.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1]
>> -
>> - intel,ixp4xx-eb-hpi-hrdy-pol-high:
>> - description: Set HPI HRDY polarity to active high when using HPI.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1]
>> -
>> - intel,ixp4xx-eb-mux-address-and-data:
>> - description: Multiplex address and data on the data bus.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1]
>> -
>> - intel,ixp4xx-eb-ahb-split-transfers:
>> - description: Enable AHB split transfers.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1]
>> -
>> - intel,ixp4xx-eb-write-enable:
>> - description: Enable write cycles.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1]
>> -
>> - intel,ixp4xx-eb-byte-access:
>> - description: Expansion bus uses only 8 bits. The default is to use
>> - 16 bits.
>> - $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [0, 1]
>> + $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
>>
>> required:
>> - compatible
>> diff --git a/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml b/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
>> new file mode 100644
>> index 000000000000..8f782c80e88b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml
>> @@ -0,0 +1,80 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Peripheral properties for Intel IXP4xx Expansion Bus
>> +
>> +description: |
>
> Don't need '|'.
Right.
Best regards,
Krzysztof