YAML conversion of several Freescale/PowerPC DT bindings
Subsystems (14)
v2 cover YAML conversion of several Freescale/PowerPC DT bindings
This is a spin-off of the series titled "powerpc: MPC83xx cleanup and LANCOM NWAPP2 board".
During the development of that series, it became clear that many devicetree bindings for Freescale MPC8xxx platforms are still in the old plain-text format, or don't exist at all, and in any case don't mention all valid compatible strings.
---
Changes in v2:
- rebased on v6.14-rc1
- various style cleanups, both in YAML and in DTS examples
- minor improvements to the commit messages
- Link to v1: https://lore.kernel.org/r/[email protected]
---
J. Neuschäfer (12):
dt-bindings: powerpc: Add Freescale/NXP MPC83xx SoCs
dt-bindings: ata: Convert fsl,pq-sata to YAML
dt-bindings: crypto: Convert fsl,sec-2.0 to YAML
dt-bindings: mfd: Convert fsl,mcu-mpc8349emitx to YAML
dt-bindings: dma: Convert fsl,elo*-dma to YAML
dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML
dt-bindings: watchdog: Convert mpc8xxx-wdt to YAML
dt-bindings: spi: Convert Freescale SPI bindings to YAML
dt-bindings: memory-controllers: Convert fsl,elbc to YAML
dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio
dt-bindings: nand: Add fsl,elbc-fcm-nand
dt-bindings: mtd: raw-nand-chip: Relax node name pattern
.../devicetree/bindings/ata/fsl,pq-sata.yaml | 59 ++++++ Documentation/devicetree/bindings/ata/fsl-sata.txt | 28 --- .../devicetree/bindings/crypto/fsl,sec2.0.yaml | 142 ++++++++++++++ .../devicetree/bindings/crypto/fsl-sec2.txt | 65 ------- .../devicetree/bindings/dma/fsl,elo-dma.yaml | 140 ++++++++++++++ .../devicetree/bindings/dma/fsl,elo3-dma.yaml | 123 +++++++++++++ .../devicetree/bindings/dma/fsl,eloplus-dma.yaml | 134 ++++++++++++++ .../memory-controllers/fsl,elbc-gpcm-uio.yaml | 59 ++++++ .../bindings/memory-controllers/fsl,elbc.yaml | 146 +++++++++++++++ .../bindings/mfd/fsl,mcu-mpc8349emitx.yaml | 53 ++++++ .../devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml | 68 +++++++ .../devicetree/bindings/mtd/raw-nand-chip.yaml | 2 +- .../devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml | 115 ++++++++++++ Documentation/devicetree/bindings/pci/fsl,pci.txt | 27 --- .../devicetree/bindings/powerpc/fsl/dma.txt | 204 --------------------- .../bindings/powerpc/fsl/fsl,mpc83xx.yaml | 67 +++++++ .../devicetree/bindings/powerpc/fsl/lbc.txt | 43 ----- .../bindings/powerpc/fsl/mcu-mpc8349emitx.txt | 17 -- .../devicetree/bindings/spi/fsl,espi.yaml | 64 +++++++ Documentation/devicetree/bindings/spi/fsl,spi.yaml | 73 ++++++++ Documentation/devicetree/bindings/spi/fsl-spi.txt | 62 ------- .../devicetree/bindings/watchdog/mpc8xxx-wdt.txt | 25 --- .../devicetree/bindings/watchdog/mpc8xxx-wdt.yaml | 64 +++++++ 23 files changed, 1308 insertions(+), 472 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250126-ppcyaml-680ccd8b3fc2
Best regards,
Signature · 1 line
J. Neuschäfer <[email protected]>
PATCH v2 1/12 dt-bindings: powerpc: Add Freescale/NXP MPC83xx SoCs
Add a new binding for MPC83xx platforms, describing the board compatible strings used in currently existing device trees.
Note that the SoC bus is called immr@... in many existing devicetrees, but this contradicts the simple-bus binding.
---
V2:
- trim subject line
- fix property order to comply with dts coding style
- add Rob Herrings's R-b tag
--- .../bindings/powerpc/fsl/fsl,mpc83xx.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+)
Documentation/devicetree/bindings/powerpc/fsl/fsl,mpc83xx.yaml new file +67 -0
@@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/powerpc/fsl/fsl,mpc83xx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale PowerQUICC II Pro (MPC83xx) platforms + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - description: MPC83xx Reference Design Boards + items: + - enum: + - fsl,mpc8308rdb + - fsl,mpc8315erdb + - fsl,mpc8360rdk + - fsl,mpc8377rdb + - fsl,mpc8377wlan + - fsl,mpc8378rdb + - fsl,mpc8379rdb + +patternProperties: + "^soc@.*$": + type: object + properties: + compatible: + oneOf: + - items: + - enum: + - fsl,mpc8315-immr + - fsl,mpc8308-immr + - const: simple-bus + - items: + - const: fsl,mpc8360-immr + - const: fsl,immr + - const: fsl,soc + - const: simple-bus + - const: simple-bus + +additionalProperties: true + +examples: + - | + / { + compatible = "fsl,mpc8315erdb"; + model = "MPC8315E-RDB"; + #address-cells = <1>; + #size-cells = <1>; + + soc@e0000000 { + compatible = "fsl,mpc8315-immr", "simple-bus"; + reg = <0xe0000000 0x00000200>; + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + ranges = <0 0xe0000000 0x00100000>; + bus-frequency = <0>; + }; + }; + +...
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
PATCH v2 2/12 dt-bindings: ata: Convert fsl,pq-sata to YAML
In reply to J. NeuschäferConvert the Freescale PowerQUICC SATA controller binding from text form to YAML. The list of compatible strings reflects current usage.
To clarify the description, I changed it to mention "each SATA controller" instead of each port.
---
V2:
- remove unnecessary multiline marker (|)
- clarified controllers vs. ports in the description
- trim subject line (remove "binding")
--- .../devicetree/bindings/ata/fsl,pq-sata.yaml | 59 ++++++++++++++++++++++ Documentation/devicetree/bindings/ata/fsl-sata.txt | 28 ---------- 2 files changed, 59 insertions(+), 28 deletions(-)
Documentation/devicetree/bindings/ata/fsl,pq-sata.yaml new file +59 -0
@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ata/fsl,pq-sata.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale 8xxx/3.0 Gb/s SATA nodes + +maintainers: + - J. Neuschäfer <[email protected]> + +description: + SATA nodes are defined to describe on-chip Serial ATA controllers. + Each SATA controller should have its own node. + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,mpc8377-sata + - fsl,mpc8536-sata + - fsl,mpc8315-sata + - fsl,mpc8379-sata + - const: fsl,pq-sata + - const: fsl,pq-sata-v2 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3, 4] + description: | + 1 for controller @ 0x18000 + 2 for controller @ 0x19000 + 3 for controller @ 0x1a000 + 4 for controller @ 0x1b000 + +required: + - compatible + - interrupts + - cell-index + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + sata@18000 { + compatible = "fsl,mpc8379-sata", "fsl,pq-sata"; + reg = <0x18000 0x1000>; + cell-index = <1>; + interrupts = <44 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&ipic>; + };
Documentation/devicetree/bindings/ata/fsl-sata.txt deleted +0 -28
@@ -1,28 +0,0 @@ -* Freescale 8xxx/3.0 Gb/s SATA nodes - -SATA nodes are defined to describe on-chip Serial ATA controllers. -Each SATA port should have its own node. - -Required properties: -- compatible : compatible list, contains 2 entries, first is - "fsl,CHIP-sata", where CHIP is the processor - (mpc8315, mpc8379, etc.) and the second is - "fsl,pq-sata" -- interrupts : <interrupt mapping for SATA IRQ> -- cell-index : controller index. - 1 for controller @ 0x18000 - 2 for controller @ 0x19000 - 3 for controller @ 0x1a000 - 4 for controller @ 0x1b000 - -Optional properties: -- reg : <registers mapping> - -Example: - sata@18000 { - compatible = "fsl,mpc8379-sata", "fsl,pq-sata"; - reg = <0x18000 0x1000>; - cell-index = <1>; - interrupts = <2c 8>; - interrupt-parent = < &ipic >; - };
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 02/12] dt-bindings: ata: Convert fsl,pq-sata to YAML
Quoted 10 lines · On 2/8/25 06:30, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Convert the Freescale PowerQUICC SATA controller binding from text form to YAML. The list of compatible strings reflects current usage.
To clarify the description, I changed it to mention "each SATA controller" instead of each port.
Reviewed-by Rob Herring (Arm) <[email protected]>Signed-off-by J. Neuschäfer <[email protected]>
Signature · 2 lines
Damien Le Moal Western Digital Research
PATCH v2 3/12 dt-bindings: crypto: Convert fsl,sec-2.0 to YAML
In reply to J. NeuschäferConvert the Freescale security engine (crypto accelerator) binding from text form to YAML. The list of compatible strings reflects what was previously described in prose; not all combinations occur in existing devicetrees.
---
V2:
- several improvements suggested by Rob Herring:
- remove unnecessary multiline markers
- constrain fsl,num-channels to enum: [1,4]
- constrain fsl,channel-fifo-len to plausible limits
- constrain fsl,exec-units-mask to maximum=0xfff
- trim subject line (remove "binding")
--- .../devicetree/bindings/crypto/fsl,sec2.0.yaml | 142 +++++++++++++++++++++ .../devicetree/bindings/crypto/fsl-sec2.txt | 65 ---------- 2 files changed, 142 insertions(+), 65 deletions(-)
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +142 -0
@@ -0,0 +1,142 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/fsl,sec2.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale SoC SEC Security Engines versions 1.x-2.x-3.x + +maintainers: + - J. Neuschäfer <[email protected]. + +properties: + compatible: + description: + Should contain entries for this and backward compatible SEC versions, + high to low. Warning - SEC1 and SEC2 are mutually exclusive. + oneOf: + - items: + - const: fsl,sec3.3 + - const: fsl,sec3.1 + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec3.1 + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.0 + - items: + - const: fsl,sec1.2 + - const: fsl,sec1.0 + - items: + - const: fsl,sec1.0 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,num-channels: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 1, 4 ] + description: An integer representing the number of channels available. + + fsl,channel-fifo-len: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 100 + description: + An integer representing the number of descriptor pointers each channel + fetch fifo can hold. + + fsl,exec-units-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 0xfff + description: | + The bitmask representing what execution units (EUs) are available. + EU information should be encoded following the SEC's Descriptor Header + Dword EU_SEL0 field documentation, i.e. as follows: + + bit 0 = reserved - should be 0 + bit 1 = set if SEC has the ARC4 EU (AFEU) + bit 2 = set if SEC has the DES/3DES EU (DEU) + bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A) + bit 4 = set if SEC has the random number generator EU (RNG) + bit 5 = set if SEC has the public key EU (PKEU) + bit 6 = set if SEC has the AES EU (AESU) + bit 7 = set if SEC has the Kasumi EU (KEU) + bit 8 = set if SEC has the CRC EU (CRCU) + bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B) + + remaining bits are reserved for future SEC EUs. + + fsl,descriptor-types-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The bitmask representing what descriptors are available. Descriptor type + information should be encoded following the SEC's Descriptor Header Dword + DESC_TYPE field documentation, i.e. as follows: + + bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type + bit 1 = set if SEC supports the ipsec_esp descriptor type + bit 2 = set if SEC supports the common_nonsnoop desc. type + bit 3 = set if SEC supports the 802.11i AES ccmp desc. type + bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type + bit 5 = set if SEC supports the srtp descriptor type + bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type + bit 7 = set if SEC supports the pkeu_assemble descriptor type + bit 8 = set if SEC supports the aesu_key_expand_output desc.type + bit 9 = set if SEC supports the pkeu_ptmul descriptor type + bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type + bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type + + ..and so on and so forth. + +required: + - compatible + - reg + - fsl,num-channels + - fsl,channel-fifo-len + - fsl,exec-units-mask + - fsl,descriptor-types-mask + +unevaluatedProperties: false + +examples: + - | + /* MPC8548E */ + crypto@30000 { + compatible = "fsl,sec2.1", "fsl,sec2.0"; + reg = <0x30000 0x10000>; + interrupts = <29 2>; + interrupt-parent = <&mpic>; + fsl,num-channels = <4>; + fsl,channel-fifo-len = <24>; + fsl,exec-units-mask = <0xfe>; + fsl,descriptor-types-mask = <0x12b0ebf>; + };
Documentation/devicetree/bindings/crypto/fsl-sec2.txt deleted +0 -65
65 lines not on this page · raw message
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 03/12] dt-bindings: crypto: Convert fsl,sec-2.0 to YAMLy
Quoted 8 lines · On Fri, Feb 07, 2025 at 10:30:20PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Convert the Freescale security engine (crypto accelerator) binding from text form to YAML. The list of compatible strings reflects what was previously described in prose; not all combinations occur in existing devicetrees.
Signed-off-by J. Neuschäfer <[email protected]>
Quoted 238 lines
---
V2:
- several improvements suggested by Rob Herring:
- remove unnecessary multiline markers
- constrain fsl,num-channels to enum: [1,4]
- constrain fsl,channel-fifo-len to plausible limits
- constrain fsl,exec-units-mask to maximum=0xfff
- trim subject line (remove "binding")--- .../devicetree/bindings/crypto/fsl,sec2.0.yaml | 142 +++++++++++++++++++++ .../devicetree/bindings/crypto/fsl-sec2.txt | 65 ---------- 2 files changed, 142 insertions(+), 65 deletions(-)Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +142
-0@@ -0,0 +1,142 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/fsl,sec2.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale SoC SEC Security Engines versions 1.x-2.x-3.x + +maintainers: + - J. Neuschäfer <[email protected]. + +properties: + compatible: + description: + Should contain entries for this and backward compatible SEC versions, + high to low. Warning - SEC1 and SEC2 are mutually exclusive. + oneOf: + - items: + - const: fsl,sec3.3 + - const: fsl,sec3.1 + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec3.1 + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.0 + - items: + - const: fsl,sec1.2 + - const: fsl,sec1.0 + - items: + - const: fsl,sec1.0 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,num-channels: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 1, 4 ] + description: An integer representing the number of channels available. + + fsl,channel-fifo-len: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 100 + description: + An integer representing the number of descriptor pointers each channel + fetch fifo can hold. + + fsl,exec-units-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 0xfff + description: | + The bitmask representing what execution units (EUs) are available. + EU information should be encoded following the SEC's Descriptor Header + Dword EU_SEL0 field documentation, i.e. as follows: + + bit 0 = reserved - should be 0 + bit 1 = set if SEC has the ARC4 EU (AFEU) + bit 2 = set if SEC has the DES/3DES EU (DEU) + bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A) + bit 4 = set if SEC has the random number generator EU (RNG) + bit 5 = set if SEC has the public key EU (PKEU) + bit 6 = set if SEC has the AES EU (AESU) + bit 7 = set if SEC has the Kasumi EU (KEU) + bit 8 = set if SEC has the CRC EU (CRCU) + bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B) + + remaining bits are reserved for future SEC EUs. + + fsl,descriptor-types-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The bitmask representing what descriptors are available. Descriptor type + information should be encoded following the SEC's Descriptor Header Dword + DESC_TYPE field documentation, i.e. as follows: + + bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type + bit 1 = set if SEC supports the ipsec_esp descriptor type + bit 2 = set if SEC supports the common_nonsnoop desc. type + bit 3 = set if SEC supports the 802.11i AES ccmp desc. type + bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type + bit 5 = set if SEC supports the srtp descriptor type + bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type + bit 7 = set if SEC supports the pkeu_assemble descriptor type + bit 8 = set if SEC supports the aesu_key_expand_output desc.type + bit 9 = set if SEC supports the pkeu_ptmul descriptor type + bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type + bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type + + ..and so on and so forth. + +required: + - compatible + - reg + - fsl,num-channels + - fsl,channel-fifo-len + - fsl,exec-units-mask + - fsl,descriptor-types-mask + +unevaluatedProperties: false + +examples: + - | + /* MPC8548E */ + crypto@30000 { + compatible = "fsl,sec2.1", "fsl,sec2.0"; + reg = <0x30000 0x10000>; + interrupts = <29 2>; + interrupt-parent = <&mpic>; + fsl,num-channels = <4>; + fsl,channel-fifo-len = <24>; + fsl,exec-units-mask = <0xfe>; + fsl,descriptor-types-mask = <0x12b0ebf>; + };Documentation/devicetree/bindings/crypto/fsl-sec2.txt deleted +0
-66@@ -1,65 +0,0 @@ -Freescale SoC SEC Security Engines versions 1.x-2.x-3.x - -Required properties: - -- compatible : Should contain entries for this and backward compatible - SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0" (SEC2/3) - e.g., "fsl,sec1.2", "fsl,sec1.0" (SEC1) - warning: SEC1 and SEC2 are mutually exclusive -- reg : Offset and length of the register set for the device -- interrupts : the SEC's interrupt number -- fsl,num-channels : An integer representing the number of channels - available. -- fsl,channel-fifo-len : An integer representing the number of - descriptor pointers each channel fetch fifo can hold. -- fsl,exec-units-mask : The bitmask representing what execution units - (EUs) are available. It's a single 32-bit cell. EU information - should be encoded following the SEC's Descriptor Header Dword - EU_SEL0 field documentation, i.e. as follows: - - bit 0 = reserved - should be 0 - bit 1 = set if SEC has the ARC4 EU (AFEU) - bit 2 = set if SEC has the DES/3DES EU (DEU) - bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A) - bit 4 = set if SEC has the random number generator EU (RNG) - bit 5 = set if SEC has the public key EU (PKEU) - bit 6 = set if SEC has the AES EU (AESU) - bit 7 = set if SEC has the Kasumi EU (KEU) - bit 8 = set if SEC has the CRC EU (CRCU) - bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B) - -remaining bits are reserved for future SEC EUs. - -- fsl,descriptor-types-mask : The bitmask representing what descriptors - are available. It's a single 32-bit cell. Descriptor type information - should be encoded following the SEC's Descriptor Header Dword DESC_TYPE - field documentation, i.e. as follows: - - bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type - bit 1 = set if SEC supports the ipsec_esp descriptor type - bit 2 = set if SEC supports the common_nonsnoop desc. type - bit 3 = set if SEC supports the 802.11i AES ccmp desc. type - bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type - bit 5 = set if SEC supports the srtp descriptor type - bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type - bit 7 = set if SEC supports the pkeu_assemble descriptor type - bit 8 = set if SEC supports the aesu_key_expand_output desc.type - bit 9 = set if SEC supports the pkeu_ptmul descriptor type - bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type - bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type - - ..and so on and so forth. - -Example: - - /* MPC8548E */ - crypto@30000 { - compatible = "fsl,sec2.1", "fsl,sec2.0"; - reg = <0x30000 0x10000>; - interrupts = <29 2>; - interrupt-parent = <&mpic>; - fsl,num-channels = <4>; - fsl,channel-fifo-len = <24>; - fsl,exec-units-mask = <0xfe>; - fsl,descriptor-types-mask = <0x12b0ebf>; - }; --2.48.0.rc1.219.gb6b6757d772
Rob Herring
maintainerRe: [PATCH v2 03/12] dt-bindings: crypto: Convert fsl,sec-2.0 to YAML
In reply to J. NeuschäferQuoted 26 lines · J. Neuschäfer
Convert the Freescale security engine (crypto accelerator) binding from text form to YAML. The list of compatible strings reflects what was previously described in prose; not all combinations occur in existing devicetrees.
Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- several improvements suggested by Rob Herring:
- remove unnecessary multiline markers
- constrain fsl,num-channels to enum: [1,4]
- constrain fsl,channel-fifo-len to plausible limits
- constrain fsl,exec-units-mask to maximum=0xfff
- trim subject line (remove "binding")--- .../devicetree/bindings/crypto/fsl,sec2.0.yaml | 142 +++++++++++++++++++++ .../devicetree/bindings/crypto/fsl-sec2.txt | 65 ---------- 2 files changed, 142 insertions(+), 65 deletions(-)Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +0
-0
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml line 10
Quoted 10 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +10
-0@@ -0,0 +1,142 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/fsl,sec2.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale SoC SEC Security Engines versions 1.x-2.x-3.x + +maintainers: + - J. Neuschäfer <[email protected].
missing >
Quoted 96 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +96
-0+ +properties: + compatible: + description: + Should contain entries for this and backward compatible SEC versions, + high to low. Warning - SEC1 and SEC2 are mutually exclusive. + oneOf: + - items: + - const: fsl,sec3.3 + - const: fsl,sec3.1 + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec3.1 + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec3.0 + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.4 + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.2 + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.1 + - const: fsl,sec2.0 + - items: + - const: fsl,sec2.0 + - items: + - const: fsl,sec1.2 + - const: fsl,sec1.0 + - items: + - const: fsl,sec1.0 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,num-channels: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 1, 4 ] + description: An integer representing the number of channels available. + + fsl,channel-fifo-len: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 100 + description: + An integer representing the number of descriptor pointers each channel + fetch fifo can hold. + + fsl,exec-units-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 0xfff + description: | + The bitmask representing what execution units (EUs) are available. + EU information should be encoded following the SEC's Descriptor Header + Dword EU_SEL0 field documentation, i.e. as follows: + + bit 0 = reserved - should be 0 + bit 1 = set if SEC has the ARC4 EU (AFEU) + bit 2 = set if SEC has the DES/3DES EU (DEU) + bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A) + bit 4 = set if SEC has the random number generator EU (RNG) + bit 5 = set if SEC has the public key EU (PKEU) + bit 6 = set if SEC has the AES EU (AESU) + bit 7 = set if SEC has the Kasumi EU (KEU) + bit 8 = set if SEC has the CRC EU (CRCU) + bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B) + + remaining bits are reserved for future SEC EUs. + + fsl,descriptor-types-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The bitmask representing what descriptors are available. Descriptor type + information should be encoded following the SEC's Descriptor Header Dword + DESC_TYPE field documentation, i.e. as follows: + + bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type + bit 1 = set if SEC supports the ipsec_esp descriptor type
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml line 116
Quoted 10 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +10
-0+ bit 2 = set if SEC supports the common_nonsnoop desc. type + bit 3 = set if SEC supports the 802.11i AES ccmp desc. type + bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type + bit 5 = set if SEC supports the srtp descriptor type + bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type + bit 7 = set if SEC supports the pkeu_assemble descriptor type + bit 8 = set if SEC supports the aesu_key_expand_output desc.type + bit 9 = set if SEC supports the pkeu_ptmul descriptor type + bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type + bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type
Why 3 variations of 'descriptor type'?
Quoted 101 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +26
-0+ + ..and so on and so forth. + +required: + - compatible + - reg + - fsl,num-channels + - fsl,channel-fifo-len + - fsl,exec-units-mask + - fsl,descriptor-types-mask + +unevaluatedProperties: false + +examples: + - | + /* MPC8548E */ + crypto@30000 { + compatible = "fsl,sec2.1", "fsl,sec2.0"; + reg = <0x30000 0x10000>; + interrupts = <29 2>; + interrupt-parent = <&mpic>; + fsl,num-channels = <4>; + fsl,channel-fifo-len = <24>; + fsl,exec-units-mask = <0xfe>; + fsl,descriptor-types-mask = <0x12b0ebf>; + };Documentation/devicetree/bindings/crypto/fsl-sec2.txt deleted +0
-65@@ -1,65 +0,0 @@ -Freescale SoC SEC Security Engines versions 1.x-2.x-3.x - -Required properties: - -- compatible : Should contain entries for this and backward compatible - SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0" (SEC2/3) - e.g., "fsl,sec1.2", "fsl,sec1.0" (SEC1) - warning: SEC1 and SEC2 are mutually exclusive -- reg : Offset and length of the register set for the device -- interrupts : the SEC's interrupt number -- fsl,num-channels : An integer representing the number of channels - available. -- fsl,channel-fifo-len : An integer representing the number of - descriptor pointers each channel fetch fifo can hold. -- fsl,exec-units-mask : The bitmask representing what execution units - (EUs) are available. It's a single 32-bit cell. EU information - should be encoded following the SEC's Descriptor Header Dword - EU_SEL0 field documentation, i.e. as follows: - - bit 0 = reserved - should be 0 - bit 1 = set if SEC has the ARC4 EU (AFEU) - bit 2 = set if SEC has the DES/3DES EU (DEU) - bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A) - bit 4 = set if SEC has the random number generator EU (RNG) - bit 5 = set if SEC has the public key EU (PKEU) - bit 6 = set if SEC has the AES EU (AESU) - bit 7 = set if SEC has the Kasumi EU (KEU) - bit 8 = set if SEC has the CRC EU (CRCU) - bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B) - -remaining bits are reserved for future SEC EUs. - -- fsl,descriptor-types-mask : The bitmask representing what descriptors - are available. It's a single 32-bit cell. Descriptor type information - should be encoded following the SEC's Descriptor Header Dword DESC_TYPE - field documentation, i.e. as follows: - - bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type - bit 1 = set if SEC supports the ipsec_esp descriptor type - bit 2 = set if SEC supports the common_nonsnoop desc. type - bit 3 = set if SEC supports the 802.11i AES ccmp desc. type - bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type - bit 5 = set if SEC supports the srtp descriptor type - bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type - bit 7 = set if SEC supports the pkeu_assemble descriptor type - bit 8 = set if SEC supports the aesu_key_expand_output desc.type - bit 9 = set if SEC supports the pkeu_ptmul descriptor type - bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type - bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type - - ..and so on and so forth. - -Example: - - /* MPC8548E */ - crypto@30000 { - compatible = "fsl,sec2.1", "fsl,sec2.0"; - reg = <0x30000 0x10000>; - interrupts = <29 2>; - interrupt-parent = <&mpic>; - fsl,num-channels = <4>; - fsl,channel-fifo-len = <24>; - fsl,exec-units-mask = <0xfe>; - fsl,descriptor-types-mask = <0x12b0ebf>; - };Signature · 2 lines
-- 2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 03/12] dt-bindings: crypto: Convert fsl,sec-2.0 to YAML
Quoted 20 lines · Rob Herring
Quoted 19 lines · J. Neuschäfer
Convert the Freescale security engine (crypto accelerator) binding from text form to YAML. The list of compatible strings reflects what was previously described in prose; not all combinations occur in existing devicetrees.
Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- several improvements suggested by Rob Herring:
- remove unnecessary multiline markers
- constrain fsl,num-channels to enum: [1,4]
- constrain fsl,channel-fifo-len to plausible limits
- constrain fsl,exec-units-mask to maximum=0xfff
- trim subject line (remove "binding")--- .../devicetree/bindings/crypto/fsl,sec2.0.yaml | 142 +++++++++++++++++++++ .../devicetree/bindings/crypto/fsl-sec2.txt | 65 ---------- 2 files changed, 142 insertions(+), 65 deletions(-)
[...]
Quoted 6 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml line 10
Quoted 4 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +4
-0+title: Freescale SoC SEC Security Engines versions 1.x-2.x-3.x + +maintainers: + - J. Neuschäfer <[email protected].missing >
Good catch, will fix.
Quoted 20 lines
Quoted 9 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +9
-0+ fsl,descriptor-types-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The bitmask representing what descriptors are available. Descriptor type + information should be encoded following the SEC's Descriptor Header Dword + DESC_TYPE field documentation, i.e. as follows: + + bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type + bit 1 = set if SEC supports the ipsec_esp descriptor typeDocumentation/devicetree/bindings/crypto/fsl,sec2.0.yaml line 116
Quoted 10 lines
Documentation/devicetree/bindings/crypto/fsl,sec2.0.yaml new file +10
-0+ bit 2 = set if SEC supports the common_nonsnoop desc. type + bit 3 = set if SEC supports the 802.11i AES ccmp desc. type + bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type + bit 5 = set if SEC supports the srtp descriptor type + bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type + bit 7 = set if SEC supports the pkeu_assemble descriptor type + bit 8 = set if SEC supports the aesu_key_expand_output desc.type + bit 9 = set if SEC supports the pkeu_ptmul descriptor type + bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type + bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type
Quoted 1 line
Why 3 variations of 'descriptor type'?
The reasons have been lost in time, I suppose. I'll normalize the spelling.
Thanks,
J. Neuschäfer
PATCH v2 4/12 dt-bindings: mfd: Convert fsl,mcu-mpc8349emitx to YAML
In reply to J. NeuschäferConvert mcu-mpc8349emitx.txt to YAML and list the compatible strings currently in use.
---
V2:
- trim subject line (remove "binding")
- fix property order to comply with dts coding style
--- .../bindings/mfd/fsl,mcu-mpc8349emitx.yaml | 53 ++++++++++++++++++++++ .../bindings/powerpc/fsl/mcu-mpc8349emitx.txt | 17 ------- 2 files changed, 53 insertions(+), 17 deletions(-)
Documentation/devicetree/bindings/mfd/fsl,mcu-mpc8349emitx.yaml new file +53 -0
@@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/fsl,mcu-mpc8349emitx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MPC8349E-mITX-compatible Power Management Micro Controller Unit (MCU) + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,mc9s08qg8-mpc8315erdb + - fsl,mc9s08qg8-mpc8349emitx + - fsl,mc9s08qg8-mpc8377erdb + - fsl,mc9s08qg8-mpc8378erdb + - fsl,mc9s08qg8-mpc8379erdb + - const: fsl,mcu-mpc8349emitx + + reg: + maxItems: 1 + + "#gpio-cells": + const: 2 + + gpio-controller: true + +required: + - compatible + - reg + - "#gpio-cells" + - gpio-controller + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mcu@a { + compatible = "fsl,mc9s08qg8-mpc8349emitx", + "fsl,mcu-mpc8349emitx"; + reg = <0x0a>; + #gpio-cells = <2>; + gpio-controller; + }; + };
Documentation/devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt deleted +0 -17
@@ -1,17 +0,0 @@ -Freescale MPC8349E-mITX-compatible Power Management Micro Controller Unit (MCU) - -Required properties: -- compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx". -- reg : should specify I2C address (0x0a). -- #gpio-cells : should be 2. -- gpio-controller : should be present. - -Example: - -mcu@a { - #gpio-cells = <2>; - compatible = "fsl,mc9s08qg8-mpc8349emitx", - "fsl,mcu-mpc8349emitx"; - reg = <0x0a>; - gpio-controller; -};
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
PATCH v2 5/12 dt-bindings: dma: Convert fsl,elo*-dma to YAML
In reply to J. NeuschäferThe devicetree bindings for Freescale DMA engines have so far existed as a text file. This patch converts them to YAML, and specifies all the compatible strings currently in use in arch/powerpc/boot/dts.
---
V2:
- remove unnecessary multiline markers
- fix additionalProperties to always be false
- add description/maxItems to interrupts
- add missing #address-cells/#size-cells properties
- convert "Note on DMA channel compatible properties" to YAML by listing fsl,ssi-dma-channel as a valid compatible value
- fix property ordering in examples: compatible and reg come first
- add missing newlines in examples
- trim subject line (remove "bindings")
--- .../devicetree/bindings/dma/fsl,elo-dma.yaml | 140 ++++++++++++++ .../devicetree/bindings/dma/fsl,elo3-dma.yaml | 123 +++++++++++++ .../devicetree/bindings/dma/fsl,eloplus-dma.yaml | 134 ++++++++++++++ .../devicetree/bindings/powerpc/fsl/dma.txt | 204 --------------------- 4 files changed, 397 insertions(+), 204 deletions(-)
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +140 -0
@@ -0,0 +1,140 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/fsl,elo-dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Elo DMA Controller + +maintainers: + - J. Neuschäfer <[email protected]> + +description: + This is a little-endian 4-channel DMA controller, used in Freescale mpc83xx + series chips such as mpc8315, mpc8349, mpc8379 etc. + +properties: + compatible: + items: + - enum: + - fsl,mpc8313-dma + - fsl,mpc8315-dma + - fsl,mpc8323-dma + - fsl,mpc8347-dma + - fsl,mpc8349-dma + - fsl,mpc8360-dma + - fsl,mpc8377-dma + - fsl,mpc8378-dma + - fsl,mpc8379-dma + - const: fsl,elo-dma + + reg: + maxItems: 1 + description: + DMA General Status Register, i.e. DGSR which contains status for + all the 4 DMA channels. + + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Controller index. 0 for controller @ 0x8100. + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + interrupts: + maxItems: 1 + description: Controller interrupt. + +required: + - compatible + - reg + +patternProperties: + "^dma-channel@.*$": + type: object + additionalProperties: false + + properties: + compatible: + oneOf: + # native DMA channel + - items: + - enum: + - fsl,mpc8315-dma-channel + - fsl,mpc8323-dma-channel + - fsl,mpc8347-dma-channel + - fsl,mpc8349-dma-channel + - fsl,mpc8360-dma-channel + - fsl,mpc8377-dma-channel + - fsl,mpc8378-dma-channel + - fsl,mpc8379-dma-channel + - const: fsl,elo-dma-channel + + # audio DMA channel, see fsl,ssi.yaml + - const: fsl,ssi-dma-channel + + reg: + maxItems: 1 + + cell-index: + description: DMA channel index starts at 0. + + interrupts: + maxItems: 1 + description: + Per-channel interrupt. Only necessary if no controller interrupt has + been provided. + +additionalProperties: false + +examples: + - | + dma@82a8 { + compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; + reg = <0x82a8 4>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8100 0x1a4>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + cell-index = <0>; + + dma-channel@0 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0 0x80>; + cell-index = <0>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@80 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@100 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@180 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + }; + +...
Documentation/devicetree/bindings/dma/fsl,elo3-dma.yaml new file +123 -0
123 lines not on this page · raw message
Documentation/devicetree/bindings/dma/fsl,eloplus-dma.yaml new file +134 -0
134 lines not on this page · raw message
Documentation/devicetree/bindings/powerpc/fsl/dma.txt deleted +0 -204
204 lines not on this page · raw message
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Frank Li
maintainerRe: [PATCH v2 05/12] dt-bindings: dma: Convert fsl,elo*-dma to YAML
Quoted 57 lines · On Fri, Feb 07, 2025 at 10:30:22PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
The devicetree bindings for Freescale DMA engines have so far existed as a text file. This patch converts them to YAML, and specifies all the compatible strings currently in use in
arch/powerpc/boot/dts.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- remove unnecessary multiline markers
- fix additionalProperties to always be false
- add description/maxItems to interrupts
- add missing #address-cells/#size-cells properties
- convert "Note on DMA channel compatible properties" to YAML by listing fsl,ssi-dma-channel as a valid compatible value
- fix property ordering in examples: compatible and reg come first
- add missing newlines in examples
- trim subject line (remove "bindings")--- .../devicetree/bindings/dma/fsl,elo-dma.yaml | 140 ++++++++++++++ .../devicetree/bindings/dma/fsl,elo3-dma.yaml | 123 +++++++++++++ .../devicetree/bindings/dma/fsl,eloplus-dma.yaml | 134 ++++++++++++++ .../devicetree/bindings/powerpc/fsl/dma.txt | 204 --------------------- 4 files changed, 397 insertions(+), 204 deletions(-)Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +25
-0@@ -0,0 +1,140 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/fsl,elo-dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Elo DMA Controller + +maintainers: + - J. Neuschäfer <[email protected]> + +description: + This is a little-endian 4-channel DMA controller, used in Freescale mpc83xx + series chips such as mpc8315, mpc8349, mpc8379 etc. + +properties: + compatible: + items: + - enum: + - fsl,mpc8313-dma + - fsl,mpc8315-dma + - fsl,mpc8323-dma + - fsl,mpc8347-dma + - fsl,mpc8349-dma + - fsl,mpc8360-dma
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 35
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ - fsl,mpc8377-dma + - fsl,mpc8378-dma + - fsl,mpc8379-dma + - const: fsl,elo-dma + + reg: + maxItems: 1 + description: + DMA General Status Register, i.e. DGSR which contains status for + all the 4 DMA channels.
needn't maxItems
items:
- description: DMA ...
Quoted 6 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +6
-0+ + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Controller index. 0 for controller @ 0x8100. + + ranges: true
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 51
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + interrupts: + maxItems: 1 + description: Controller interrupt.
Needn't description because no any additional informaiton.
Quoted 32 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +32
-0+ +required: + - compatible + - reg + +patternProperties: + "^dma-channel@.*$": + type: object + additionalProperties: false + + properties: + compatible: + oneOf: + # native DMA channel + - items: + - enum: + - fsl,mpc8315-dma-channel + - fsl,mpc8323-dma-channel + - fsl,mpc8347-dma-channel + - fsl,mpc8349-dma-channel + - fsl,mpc8360-dma-channel + - fsl,mpc8377-dma-channel + - fsl,mpc8378-dma-channel + - fsl,mpc8379-dma-channel + - const: fsl,elo-dma-channel + + # audio DMA channel, see fsl,ssi.yaml + - const: fsl,ssi-dma-channel + + reg: + maxItems: 1 +
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 93
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ cell-index: + description: DMA channel index starts at 0. + + interrupts: + maxItems: 1 + description: + Per-channel interrupt. Only necessary if no controller interrupt has + been provided. + +additionalProperties: false
Need ref to dma-common.yaml?
Quoted 9 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +9
-0+ +examples: + - | + dma@82a8 { + compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; + reg = <0x82a8 4>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8100 0x1a4>;
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 112
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ interrupt-parent = <&ipic>; + interrupts = <71 8>; + cell-index = <0>; + + dma-channel@0 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0 0x80>; + cell-index = <0>; + interrupt-parent = <&ipic>; + interrupts = <71 8>;
'8', use predefine MACRO for irq type.
Frank
Quoted 27 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +27
-0+ }; + + dma-channel@80 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@100 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@180 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + }; +
...
Quoted 4 lines
--
2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 05/12] dt-bindings: dma: Convert fsl,elo*-dma to YAML
Quoted 26 lines · Frank Li
Quoted 25 lines · On Fri, Feb 07, 2025 at 10:30:22PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
The devicetree bindings for Freescale DMA engines have so far existed as a text file. This patch converts them to YAML, and specifies all the compatible strings currently in use in
arch/powerpc/boot/dts.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- remove unnecessary multiline markers
- fix additionalProperties to always be false
- add description/maxItems to interrupts
- add missing #address-cells/#size-cells properties
- convert "Note on DMA channel compatible properties" to YAML by listing fsl,ssi-dma-channel as a valid compatible value
- fix property ordering in examples: compatible and reg come first
- add missing newlines in examples
- trim subject line (remove "bindings")--- .../devicetree/bindings/dma/fsl,elo-dma.yaml | 140 ++++++++++++++ .../devicetree/bindings/dma/fsl,elo3-dma.yaml | 123 +++++++++++++ .../devicetree/bindings/dma/fsl,eloplus-dma.yaml | 134 ++++++++++++++ .../devicetree/bindings/powerpc/fsl/dma.txt | 204 --------------------- 4 files changed, 397 insertions(+), 204 deletions(-)
[...]
Quoted 9 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 35
Quoted 5 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +5
-0+ reg: + maxItems: 1 + description: + DMA General Status Register, i.e. DGSR which contains status for + all the 4 DMA channels.needn't maxItems
items:
- description: DMA ...
Good point, I'll do that.
Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Controller index. 0 for controller @ 0x8100. + + ranges: true + + "#address-cells": + const: 1 +
Quoted 8 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 51
Quoted 6 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +6
-0+ "#size-cells": + const: 1 + + interrupts: + maxItems: 1 + description: Controller interrupt.Needn't description because no any additional informaiton.
True.
Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +4
-0+ +required: + - compatible + - reg
[...]
Quoted 3 lines
Quoted 1 line
+additionalProperties: false
Need ref to
dma-common.yaml?
Sounds good, but I'm not sure what to do about the #dma-cells property, which is required by dma-common.yaml.
There aren't many examples of DMA channels being explicitly declared in device trees. One example that I could find is the the xilinx_dma.txt binding:
axi_vdma_0: axivdma@40030000 {
compatible = "xlnx,axi-vdma-1.00.a";
#dma_cells = <1>;
reg = < 0x40030000 0x10000 >;
dma-ranges = <0x00000000 0x00000000 0x40000000>;
xlnx,num-fstores = <0x8>;
xlnx,flush-fsync = <0x1>;
xlnx,addrwidth = <0x20>;
clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
"m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
dma-channel@40030000 {
compatible = "xlnx,axi-vdma-mm2s-channel";
interrupts = < 0 54 4 >;
xlnx,datawidth = <0x40>;
};
dma-channel@40030030 {
compatible = "xlnx,axi-vdma-s2mm-channel";
interrupts = < 0 53 4 >;
xlnx,datawidth = <0x40>;
};
};
...
vdmatest_0: vdmatest@0 {
compatible ="xlnx,axi-vdma-test-1.00.a";
dmas = <&axi_vdma_0 0
&axi_vdma_0 1>;
dma-names = "vdma0", "vdma1";
};It has #dma_cells (I'm sure #dma-cells was intended) on the controller.
Another example is in arch/powerpc/boot/dts/fsl/p1022si-post.dtsi:
dma@c300 {
dma00: dma-channel@0 {
compatible = "fsl,ssi-dma-channel";
};
dma01: dma-channel@80 {
compatible = "fsl,ssi-dma-channel";
};
};
...
ssi@15000 {
compatible = "fsl,mpc8610-ssi";
cell-index = <0>;
reg = <0x15000 0x100>;
interrupts = <75 2 0 0>;
fsl,playback-dma = <&dma00>;
fsl,capture-dma = <&dma01>;
fsl,fifo-depth = <15>;
};There, the DMA channels are used directly and without additional information (i.e. #dma-cells = <0>, althought it isn't specified).
Quoted 8 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 112
Quoted 6 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +6
-0+ dma-channel@0 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0 0x80>; + cell-index = <0>; + interrupt-parent = <&ipic>; + interrupts = <71 8>;'8', use predefine MACRO for irq type.
Good catch, will do
Quoted 2 lines
Frank
Thanks for your review!
J. Neuschäfer
Re: [PATCH v2 05/12] dt-bindings: dma: Convert fsl,elo*-dma to YAML
Quoted 10 lines · J. Neuschäfer
Quoted 9 lines · Frank Li
Quoted 8 lines · On Fri, Feb 07, 2025 at 10:30:22PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
The devicetree bindings for Freescale DMA engines have so far existed as a text file. This patch converts them to YAML, and specifies all the compatible strings currently in use in
arch/powerpc/boot/dts.Signed-off-by J. Neuschäfer <[email protected]>---
[...]
Quoted 69 lines
Quoted 1 line
Need ref to
dma-common.yaml?Sounds good, but I'm not sure what to do about the #dma-cells property, which is required by
dma-common.yaml.There aren't many examples of DMA channels being explicitly declared in device trees. One example that I could find is the the xilinx_dma.txt binding:
axi_vdma_0: axivdma@40030000 { compatible = "xlnx,axi-vdma-1.00.a"; #dma_cells = <1>; reg = < 0x40030000 0x10000 >; dma-ranges = <0x00000000 0x00000000 0x40000000>; xlnx,num-fstores = <0x8>; xlnx,flush-fsync = <0x1>; xlnx,addrwidth = <0x20>; clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>; clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk", "m_axis_mm2s_aclk", "s_axis_s2mm_aclk"; dma-channel@40030000 { compatible = "xlnx,axi-vdma-mm2s-channel"; interrupts = < 0 54 4 >; xlnx,datawidth = <0x40>; }; dma-channel@40030030 { compatible = "xlnx,axi-vdma-s2mm-channel"; interrupts = < 0 53 4 >; xlnx,datawidth = <0x40>; }; }; ... vdmatest_0: vdmatest@0 { compatible ="xlnx,axi-vdma-test-1.00.a"; dmas = <&axi_vdma_0 0 &axi_vdma_0 1>; dma-names = "vdma0", "vdma1"; };It has #dma_cells (I'm sure #dma-cells was intended) on the controller.
Another example is in
arch/powerpc/boot/dts/fsl/p1022si-post.dtsi:dma@c300 { dma00: dma-channel@0 { compatible = "fsl,ssi-dma-channel"; }; dma01: dma-channel@80 { compatible = "fsl,ssi-dma-channel"; }; }; ... ssi@15000 { compatible = "fsl,mpc8610-ssi"; cell-index = <0>; reg = <0x15000 0x100>; interrupts = <75 2 0 0>; fsl,playback-dma = <&dma00>; fsl,capture-dma = <&dma01>; fsl,fifo-depth = <15>; };
Quoted 2 lines
There, the DMA channels are used directly and without additional information (i.e. #dma-cells = <0>, althought it isn't specified).
I had another look at dma-common.yaml and it explicitly requires #dma-cells to have a value of at least 1, so this second idea won't work.
Best regards,
J. Neuschäfer
Rob Herring
maintainerRe: [PATCH v2 05/12] dt-bindings: dma: Convert fsl,elo*-dma to YAML
In reply to J. NeuschäferQuoted 78 lines · J. Neuschäfer
The devicetree bindings for Freescale DMA engines have so far existed as a text file. This patch converts them to YAML, and specifies all the compatible strings currently in use in
arch/powerpc/boot/dts.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- remove unnecessary multiline markers
- fix additionalProperties to always be false
- add description/maxItems to interrupts
- add missing #address-cells/#size-cells properties
- convert "Note on DMA channel compatible properties" to YAML by listing fsl,ssi-dma-channel as a valid compatible value
- fix property ordering in examples: compatible and reg come first
- add missing newlines in examples
- trim subject line (remove "bindings")--- .../devicetree/bindings/dma/fsl,elo-dma.yaml | 140 ++++++++++++++ .../devicetree/bindings/dma/fsl,elo3-dma.yaml | 123 +++++++++++++ .../devicetree/bindings/dma/fsl,eloplus-dma.yaml | 134 ++++++++++++++ .../devicetree/bindings/powerpc/fsl/dma.txt | 204 --------------------- 4 files changed, 397 insertions(+), 204 deletions(-)Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +48
-0@@ -0,0 +1,140 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/fsl,elo-dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Elo DMA Controller + +maintainers: + - J. Neuschäfer <[email protected]> + +description: + This is a little-endian 4-channel DMA controller, used in Freescale mpc83xx + series chips such as mpc8315, mpc8349, mpc8379 etc. + +properties: + compatible: + items: + - enum: + - fsl,mpc8313-dma + - fsl,mpc8315-dma + - fsl,mpc8323-dma + - fsl,mpc8347-dma + - fsl,mpc8349-dma + - fsl,mpc8360-dma + - fsl,mpc8377-dma + - fsl,mpc8378-dma + - fsl,mpc8379-dma + - const: fsl,elo-dma + + reg: + maxItems: 1 + description: + DMA General Status Register, i.e. DGSR which contains status for + all the 4 DMA channels. + + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Controller index. 0 for controller @ 0x8100. + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 +
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 58
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ interrupts: + maxItems: 1 + description: Controller interrupt. + +required: + - compatible + - reg + +patternProperties: + "^dma-channel@.*$":
You need to define the unit-address format.
Quoted 29 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +29
-0+ type: object + additionalProperties: false + + properties: + compatible: + oneOf: + # native DMA channel + - items: + - enum: + - fsl,mpc8315-dma-channel + - fsl,mpc8323-dma-channel + - fsl,mpc8347-dma-channel + - fsl,mpc8349-dma-channel + - fsl,mpc8360-dma-channel + - fsl,mpc8377-dma-channel + - fsl,mpc8378-dma-channel + - fsl,mpc8379-dma-channel + - const: fsl,elo-dma-channel + + # audio DMA channel, see fsl,ssi.yaml + - const: fsl,ssi-dma-channel + + reg: + maxItems: 1 + + cell-index: + description: DMA channel index starts at 0. + + interrupts:
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 97
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ maxItems: 1 + description: + Per-channel interrupt. Only necessary if no controller interrupt has + been provided. + +additionalProperties: false + +examples: + - | + dma@82a8 {
dma-controller@...
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 103
Quoted 6 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +6
-0+ compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; + reg = <0x82a8 4>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8100 0x1a4>; + interrupt-parent = <&ipic>;
Drop interrupt-parent everywhere.
Quoted 27 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +27
-0+ interrupts = <71 8>; + cell-index = <0>; + + dma-channel@0 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0 0x80>; + cell-index = <0>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@80 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + + dma-channel@100 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; +
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml line 140
Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,elo-dma.yaml new file +10
-0+ dma-channel@180 { + compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupt-parent = <&ipic>; + interrupts = <71 8>; + }; + }; + +...
Similar comments on the others.
Rob
PATCH v2 6/12 dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML
In reply to J. NeuschäferFormalise the binding for the PCI controllers in the Freescale MPC8xxx chip family. Information about PCI-X-specific properties was taken from fsl,pci.txt. The examples were taken from mpc8315erdb.dts and xpedite5200_xmon.dts.
---
V2:
- merge fsl,pci.txt into fsl,mpc8xxx-pci.yaml
- regroup compatible strings, list single-item values in one enum
- trim subject line (remove "binding")
- fix property order to comply with dts coding style
--- .../devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml | 115 +++++++++++++++++++++ Documentation/devicetree/bindings/pci/fsl,pci.txt | 27 ----- 2 files changed, 115 insertions(+), 27 deletions(-)
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +115 -0
@@ -0,0 +1,115 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/pci/fsl,mpc8xxx-pci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MPC83xx PCI/PCI-X/PCIe controllers + +description: | + Binding for the PCI/PCI-X/PCIe host bridges on MPC8xxx SoCs. + See also: Documentation/devicetree/bindings/pci/fsl,pci.txt + +maintainers: + - J. Neuschäfer <[email protected]> + +allOf: + - $ref: /schemas/pci/pci-host-bridge.yaml# + +properties: + compatible: + oneOf: + - enum: + - fsl,mpc8314-pcie + - fsl,mpc8349-pci + - fsl,mpc8540-pci + - fsl,mpc8548-pcie + - fsl,mpc8641-pcie + - items: + - enum: + - fsl,mpc8308-pcie + - fsl,mpc8315-pcie + - fsl,mpc8377-pcie + - fsl,mpc8378-pcie + - const: fsl,mpc8314-pcie + - items: + - const: fsl,mpc8360-pci + - const: fsl,mpc8349-pci + - items: + - const: fsl,mpc8540-pcix + - const: fsl,mpc8540-pci + + reg: + minItems: 1 + items: + - description: internal registers + - description: config space access registers + + clock-frequency: true + + interrupts: + items: + - description: Consolidated PCI interrupt + + fsl,pci-agent-force-enum: + type: boolean + description: + Typically any Freescale PCI-X bridge hardware strapped into Agent mode is + prevented from enumerating the bus. The PrPMC form-factor requires all + mezzanines to be PCI-X Agents, but one per system may still enumerate the + bus. + + This property allows a PCI-X bridge to be used for bus enumeration + despite being strapped into Agent mode. + +required: + - reg + - compatible + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + pcie@e0009000 { + compatible = "fsl,mpc8315-pcie", "fsl,mpc8314-pcie"; + reg = <0xe0009000 0x00001000>; + ranges = <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 + 0x01000000 0 0x00000000 0xb1000000 0 0x00800000>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + device_type = "pci"; + bus-range = <0 255>; + interrupt-map-mask = <0xf800 0 0 7>; + interrupt-map = <0 0 0 1 &ipic 1 IRQ_TYPE_LEVEL_LOW + 0 0 0 2 &ipic 1 IRQ_TYPE_LEVEL_LOW + 0 0 0 3 &ipic 1 IRQ_TYPE_LEVEL_LOW + 0 0 0 4 &ipic 1 IRQ_TYPE_LEVEL_LOW>; + clock-frequency = <0>; + }; + + - | + pci@ef008000 { + compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; + reg = <0xef008000 0x1000>; + ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000 + 0x01000000 0 0x00000000 0xd0000000 0 0x01000000>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + clock-frequency = <33333333>; + interrupt-map-mask = <0xf800 0x0 0x0 0x7>; + interrupt-map = </* IDSEL */ + 0xe000 0 0 1 &mpic 2 1 + 0xe000 0 0 2 &mpic 3 1>; + interrupts-extended = <&mpic 24 2>; + bus-range = <0 0>; + fsl,pci-agent-force-enum; + }; + + +...
Documentation/devicetree/bindings/pci/fsl,pci.txt deleted +0 -27
@@ -1,27 +0,0 @@ -* Bus Enumeration by Freescale PCI-X Agent - -Typically any Freescale PCI-X bridge hardware strapped into Agent mode -is prevented from enumerating the bus. The PrPMC form-factor requires -all mezzanines to be PCI-X Agents, but one per system may still -enumerate the bus. - -The property defined below will allow a PCI-X bridge to be used for bus -enumeration despite being strapped into Agent mode. - -Required properties: -- fsl,pci-agent-force-enum : There is no value associated with this - property. The property itself is treated as a boolean. - -Example: - - /* PCI-X bridge known to be PrPMC Monarch */ - pci0: pci@ef008000 { - fsl,pci-agent-force-enum; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; - device_type = "pci"; - ... - ... - };
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Rob Herring (Arm)
maintainerRe: [PATCH v2 06/12] dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML
Quoted 13 lines · J. Neuschäfer
Formalise the binding for the PCI controllers in the Freescale MPC8xxx chip family. Information about PCI-X-specific properties was taken from fsl,pci.txt. The examples were taken from
mpc8315erdb.dtsandxpedite5200_xmon.dts.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- merge fsl,pci.txt into fsl,mpc8xxx-pci.yaml
- regroup compatible strings, list single-item values in one enum
- trim subject line (remove "binding")
- fix property order to comply with dts coding style
Quoted 5 lines
--- .../devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml | 115 +++++++++++++++++++++ Documentation/devicetree/bindings/pci/fsl,pci.txt | 27 ----- 2 files changed, 115 insertions(+), 27 deletions(-)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml references a file that doesn't exist: Documentation/devicetree/bindings/pci/fsl,pci.txt Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml: Documentation/devicetree/bindings/pci/fsl,pci.txt
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
kernel test robot
build botRe: [PATCH v2 06/12] dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML
In reply to J. Neuschäferkernel test robot noticed the following build warnings:
Hi Neuschäfer,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 2014c95afecee3e76ca4a56956a936e23283f05b]
url: https://github.com/intel-lab-lkp/linux/commits/J-Neusch-fer-via-B4-Relay/dt-bindings-powerpc-Add-Freescale-NXP-MPC83xx-SoCs/20250208-053519 base: 2014c95afecee3e76ca4a56956a936e23283f05b patch link: https://lore.kernel.org/r/20250207-ppcyaml-v2-6-8137b0c42526%40posteo.net patch subject: [PATCH v2 06/12] dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML reproduce: (https://download.01.org/0day-ci/archive/20250208/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
Warning: Documentation/arch/powerpc/cxl.rst references a file that doesn't exist: Documentation/ABI/testing/sysfs-class-cxl
>> Warning: Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml references a file that doesn't exist: Documentation/devicetree/bindings/pci/fsl,pci.txt
Warning: Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
Warning: Documentation/hwmon/g762.rst references a file that doesn't exist: Documentation/devicetree/bindings/hwmon/g762.txt
Warning: Documentation/translations/ja_JP/SubmittingPatches references a file that doesn't exist: linux-2.6.12-vanilla/Documentation/dontdiff
Warning: Documentation/translations/zh_CN/admin-guide/README.rst references a file that doesn't exist: Documentation/dev-tools/kgdb.rst
Warning: Documentation/translations/zh_CN/dev-tools/gdb-kernel-debugging.rst references a file that doesn't exist: Documentation/dev-tools/gdb-kernel-debugging.rst
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 06/12] dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML
In reply to J. NeuschäferQuoted 28 lines · On Fri, Feb 07, 2025 at 10:30:23PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Formalise the binding for the PCI controllers in the Freescale MPC8xxx chip family. Information about PCI-X-specific properties was taken from fsl,pci.txt. The examples were taken from
mpc8315erdb.dtsandxpedite5200_xmon.dts.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- merge fsl,pci.txt into fsl,mpc8xxx-pci.yaml
- regroup compatible strings, list single-item values in one enum
- trim subject line (remove "binding")
- fix property order to comply with dts coding style--- .../devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml | 115 +++++++++++++++++++++ Documentation/devicetree/bindings/pci/fsl,pci.txt | 27 ----- 2 files changed, 115 insertions(+), 27 deletions(-)Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +2
-0@@ -0,0 +1,115 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml line 12
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +10
-0+--- + +$id: http://devicetree.org/schemas/pci/fsl,mpc8xxx-pci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MPC83xx PCI/PCI-X/PCIe controllers + +description: | + Binding for the PCI/PCI-X/PCIe host bridges on MPC8xxx SoCs. + See also: Documentation/devicetree/bindings/pci/fsl,pci.txt
This is obviously a bit wrong; I ended up putting the information from fsl,pci.txt entirely under the fsl,pci-agent-force-enum property, but forgot to remove the reference to the old txt file.
Quoted 1 line
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +1
-0+properties:
[...]
Quoted 14 lines
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +14
-0+ fsl,pci-agent-force-enum: + type: boolean + description: + Typically any Freescale PCI-X bridge hardware strapped into Agent mode is + prevented from enumerating the bus. The PrPMC form-factor requires all + mezzanines to be PCI-X Agents, but one per system may still enumerate the + bus. + + This property allows a PCI-X bridge to be used for bus enumeration + despite being strapped into Agent mode. + +required: + - reg + - compatible
Rob Herring
maintainerRe: [PATCH v2 06/12] dt-bindings: pci: Convert fsl,mpc83xx-pcie to YAML
Quoted 35 lines · J. Neuschäfer
Quoted 34 lines · On Fri, Feb 07, 2025 at 10:30:23PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Formalise the binding for the PCI controllers in the Freescale MPC8xxx chip family. Information about PCI-X-specific properties was taken from fsl,pci.txt. The examples were taken from
mpc8315erdb.dtsandxpedite5200_xmon.dts.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- merge fsl,pci.txt into fsl,mpc8xxx-pci.yaml
- regroup compatible strings, list single-item values in one enum
- trim subject line (remove "binding")
- fix property order to comply with dts coding style--- .../devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml | 115 +++++++++++++++++++++ Documentation/devicetree/bindings/pci/fsl,pci.txt | 27 ----- 2 files changed, 115 insertions(+), 27 deletions(-)Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +8
-0@@ -0,0 +1,115 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/pci/fsl,mpc8xxx-pci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MPC83xx PCI/PCI-X/PCIe controllers
Quoted 8 lines
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml line 12
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,mpc8xxx-pci.yaml new file +4
-0+ +description: | + Binding for the PCI/PCI-X/PCIe host bridges on MPC8xxx SoCs. + See also: Documentation/devicetree/bindings/pci/fsl,pci.txtThis is obviously a bit wrong; I ended up putting the information from fsl,pci.txt entirely under the fsl,pci-agent-force-enum property, but forgot to remove the reference to the old txt file.
Looks fine other than that.
Rob
PATCH v2 7/12 dt-bindings: watchdog: Convert mpc8xxx-wdt to YAML
In reply to J. NeuschäferConvert mpc83xx-wdt.txt to YAML to enable automatic schema validation.
---
V2:
- trim subject line (remove "binding")
- fix property order to comply with dts coding style
--- .../devicetree/bindings/watchdog/mpc8xxx-wdt.txt | 25 --------- .../devicetree/bindings/watchdog/mpc8xxx-wdt.yaml | 64 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 25 deletions(-)
Documentation/devicetree/bindings/watchdog/mpc8xxx-wdt.txt deleted +0 -25
@@ -1,25 +0,0 @@ -* Freescale mpc8xxx watchdog driver (For 83xx, 86xx and 8xx) - -Required properties: -- compatible: Shall contain one of the following: - "mpc83xx_wdt" for an mpc83xx - "fsl,mpc8610-wdt" for an mpc86xx - "fsl,mpc823-wdt" for an mpc8xx -- reg: base physical address and length of the area hosting the - watchdog registers. - On the 83xx, "Watchdog Timer Registers" area: <0x200 0x100> - On the 86xx, "Watchdog Timer Registers" area: <0xe4000 0x100> - On the 8xx, "General System Interface Unit" area: <0x0 0x10> - -Optional properties: -- reg: additional physical address and length (4) of location of the - Reset Status Register (called RSTRSCR on the mpc86xx) - On the 83xx, it is located at offset 0x910 - On the 86xx, it is located at offset 0xe0094 - On the 8xx, it is located at offset 0x288 - -Example: - WDT: watchdog@0 { - compatible = "fsl,mpc823-wdt"; - reg = <0x0 0x10 0x288 0x4>; - };
Documentation/devicetree/bindings/watchdog/mpc8xxx-wdt.yaml new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
PATCH v2 8/12 dt-bindings: spi: Convert Freescale SPI bindings to YAML
In reply to J. Neuschäferfsl-spi.txt contains the bindings for the fsl,spi and fsl,espi contollers. Convert them to YAML.
---
V2:
- add missing end-of-document ("...") markers
- add missing constraints to interrupts, fsl,espi-num-chipselects, fsl,csbef and fsl,csaft properties
- remove unnecessary type from clock-frequency property
- fix property order to comply with dts coding style
--- .../devicetree/bindings/spi/fsl,espi.yaml | 64 +++++++++++++++++++ Documentation/devicetree/bindings/spi/fsl,spi.yaml | 73 ++++++++++++++++++++++ Documentation/devicetree/bindings/spi/fsl-spi.txt | 62 ------------------ 3 files changed, 137 insertions(+), 62 deletions(-)
Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/fsl,espi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale eSPI (Enhanced Serial Peripheral Interface) controller + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + const: fsl,mpc8536-espi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,espi-num-chipselects: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 1, 4 ] + description: The number of the chipselect signals. + + fsl,csbef: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: Chip select assertion time in bits before frame starts + + fsl,csaft: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: Chip select negation time in bits after frame ends + +required: + - compatible + - reg + - interrupts + - fsl,espi-num-chipselects + +allOf: + - $ref: spi-controller.yaml# + +unevaluatedProperties: false + +examples: + - | + spi@110000 { + compatible = "fsl,mpc8536-espi"; + reg = <0x110000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <53 0x2>; + interrupt-parent = <&mpic>; + fsl,espi-num-chipselects = <4>; + fsl,csbef = <1>; + fsl,csaft = <1>; + }; + +...
Documentation/devicetree/bindings/spi/fsl,spi.yaml new file +73 -0
73 lines not on this page · raw message
Documentation/devicetree/bindings/spi/fsl-spi.txt deleted +0 -62
62 lines not on this page · raw message
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Frank Li
maintainerRe: [PATCH v2 08/12] dt-bindings: spi: Convert Freescale SPI bindings to YAML
Quoted 73 lines · On Fri, Feb 07, 2025 at 10:30:25PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
fsl-spi.txt contains the bindings for the fsl,spi and fsl,espi contollers. Convert them to YAML.
Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- add missing end-of-document ("...") markers
- add missing constraints to interrupts, fsl,espi-num-chipselects, fsl,csbef and fsl,csaft properties
- remove unnecessary type from clock-frequency property
- fix property order to comply with dts coding style--- .../devicetree/bindings/spi/fsl,espi.yaml | 64 +++++++++++++++++++ Documentation/devicetree/bindings/spi/fsl,spi.yaml | 73 ++++++++++++++++++++++ Documentation/devicetree/bindings/spi/fsl-spi.txt | 62 ------------------ 3 files changed, 137 insertions(+), 62 deletions(-)Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +47
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/fsl,espi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale eSPI (Enhanced Serial Peripheral Interface) controller + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + const: fsl,mpc8536-espi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,espi-num-chipselects: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 1, 4 ] + description: The number of the chipselect signals. + + fsl,csbef: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: Chip select assertion time in bits before frame starts + + fsl,csaft: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: Chip select negation time in bits after frame ends + +required: + - compatible + - reg + - interrupts + - fsl,espi-num-chipselects + +allOf: + - $ref: spi-controller.yaml# +
Documentation/devicetree/bindings/spi/fsl,espi.yaml line 57
Quoted 10 lines
Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +10
-0+unevaluatedProperties: false + +examples: + - | + spi@110000 { + compatible = "fsl,mpc8536-espi"; + reg = <0x110000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <53 0x2>;
Use predefine's irq type macro.
Quoted 73 lines
Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +7
-0+ interrupt-parent = <&mpic>; + fsl,espi-num-chipselects = <4>; + fsl,csbef = <1>; + fsl,csaft = <1>; + }; + +...Documentation/devicetree/bindings/spi/fsl,spi.yaml new file +60
-0@@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/fsl,spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale SPI (Serial Peripheral Interface) controller + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + enum: + - fsl,spi + - aeroflexgaisler,spictrl + + reg: + maxItems: 1 + + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + QE SPI subblock index. + 0: QE subblock SPI1 + 1: QE subblock SPI2 + + mode: + description: SPI operation mode + enum: + - cpu + - cpu-qe + + interrupts: + maxItems: 1 + + clock-frequency: + description: input clock frequency to non FSL_SOC cores + + cs-gpios: true + + fsl,spisel_boot: + $ref: /schemas/types.yaml#/definitions/flag + description: + For the MPC8306 and MPC8309, specifies that the SPISEL_BOOT signal is used + as chip select for a slave device. Use reg = <number of gpios> in the + corresponding child node, i.e. 0 if the cs-gpios property is not present. + +required: + - compatible + - reg + - mode + - interrupts + +allOf: + - $ref: spi-controller.yaml# + +unevaluatedProperties: false + +examples:
Documentation/devicetree/bindings/spi/fsl,spi.yaml line 70
Quoted 10 lines
Documentation/devicetree/bindings/spi/fsl,spi.yaml new file +10
-0+ - | + spi@4c0 { + compatible = "fsl,spi"; + reg = <0x4c0 0x40>; + cell-index = <0>; + interrupts = <82 0>; + interrupt-parent = <&intc>; + mode = "cpu"; + cs-gpios = <&gpio 18 1 // device reg=<0> + &gpio 19 1>; // device reg=<1>
use predefine gpio level macro
Frank
Quoted 76 lines
Documentation/devicetree/bindings/spi/fsl,spi.yaml new file +3
-0+ }; + +...Documentation/devicetree/bindings/spi/fsl-spi.txt deleted +0
-63@@ -1,62 +0,0 @@ -* SPI (Serial Peripheral Interface) - -Required properties: -- cell-index : QE SPI subblock index. - 0: QE subblock SPI1 - 1: QE subblock SPI2 -- compatible : should be "fsl,spi" or "aeroflexgaisler,spictrl". -- mode : the SPI operation mode, it can be "cpu" or "cpu-qe". -- reg : Offset and length of the register set for the device -- interrupts : <a b> where a is the interrupt number and b is a - field that represents an encoding of the sense and level - information for the interrupt. This should be encoded based on - the information in section 2) depending on the type of interrupt - controller you have. -- clock-frequency : input clock frequency to non FSL_SOC cores - -Optional properties: -- cs-gpios : specifies the gpio pins to be used for chipselects. - The gpios will be referred to as reg = <index> in the SPI child nodes. - If unspecified, a single SPI device without a chip select can be used. -- fsl,spisel_boot : for the MPC8306 and MPC8309, specifies that the - SPISEL_BOOT signal is used as chip select for a slave device. Use - reg = <number of gpios> in the corresponding child node, i.e. 0 if - the cs-gpios property is not present. - -Example: - spi@4c0 { - cell-index = <0>; - compatible = "fsl,spi"; - reg = <4c0 40>; - interrupts = <82 0>; - interrupt-parent = <700>; - mode = "cpu"; - cs-gpios = <&gpio 18 1 // device reg=<0> - &gpio 19 1>; // device reg=<1> - }; - - -* eSPI (Enhanced Serial Peripheral Interface) - -Required properties: -- compatible : should be "fsl,mpc8536-espi". -- reg : Offset and length of the register set for the device. -- interrupts : should contain eSPI interrupt, the device has one interrupt. -- fsl,espi-num-chipselects : the number of the chipselect signals. - -Optional properties: -- fsl,csbef: chip select assertion time in bits before frame starts -- fsl,csaft: chip select negation time in bits after frame ends - -Example: - spi@110000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,mpc8536-espi"; - reg = <0x110000 0x1000>; - interrupts = <53 0x2>; - interrupt-parent = <&mpic>; - fsl,espi-num-chipselects = <4>; - fsl,csbef = <1>; - fsl,csaft = <1>; - }; --2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 08/12] dt-bindings: spi: Convert Freescale SPI bindings to YAML
In reply to J. NeuschäferQuoted 72 lines · J. Neuschäfer
fsl-spi.txt contains the bindings for the fsl,spi and fsl,espi contollers. Convert them to YAML.
Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- add missing end-of-document ("...") markers
- add missing constraints to interrupts, fsl,espi-num-chipselects, fsl,csbef and fsl,csaft properties
- remove unnecessary type from clock-frequency property
- fix property order to comply with dts coding style--- .../devicetree/bindings/spi/fsl,espi.yaml | 64 +++++++++++++++++++ Documentation/devicetree/bindings/spi/fsl,spi.yaml | 73 ++++++++++++++++++++++ Documentation/devicetree/bindings/spi/fsl-spi.txt | 62 ------------------ 3 files changed, 137 insertions(+), 62 deletions(-)Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +48
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/fsl,espi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale eSPI (Enhanced Serial Peripheral Interface) controller + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + const: fsl,mpc8536-espi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,espi-num-chipselects: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 1, 4 ] + description: The number of the chipselect signals. + + fsl,csbef: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: Chip select assertion time in bits before frame starts + + fsl,csaft: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + description: Chip select negation time in bits after frame ends + +required: + - compatible + - reg + - interrupts + - fsl,espi-num-chipselects + +allOf: + - $ref: spi-controller.yaml# + +unevaluatedProperties: false
Documentation/devicetree/bindings/spi/fsl,espi.yaml line 58
Quoted 10 lines
Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +10
-0+ +examples: + - | + spi@110000 { + compatible = "fsl,mpc8536-espi"; + reg = <0x110000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <53 0x2>; + interrupt-parent = <&mpic>;
Drop interrupt-parent. Otherwise,
Quoted 6 lines
Documentation/devicetree/bindings/spi/fsl,espi.yaml new file +6
-0+ fsl,espi-num-chipselects = <4>; + fsl,csbef = <1>; + fsl,csaft = <1>; + }; + +...
PATCH v2 9/12 dt-bindings: memory-controllers: Convert fsl,elbc to YAML
In reply to J. NeuschäferConvert the Freescale localbus controller bindings from text form to YAML. The updated list of compatible strings reflects current usage in arch/powerpc/boot/dts/, except that many existing device trees erroneously specify "simple-bus" in addition to fsl,*elbc.
Changes compared to the txt version:
- removed the board-control (fsl,mpc8272ads-bcsr) node because it only appears in this example and nowhere else
- added a new example with NAND flash
- updated list of compatible strings
---
V2:
- fix order of properties in examples, according to dts coding style
- move to Documentation/devicetree/bindings/memory-controllers
- clarify the commit message a tiny bit
- remove unnecessary multiline markers (|)
- define address format in patternProperties
- trim subject line (remove "binding")
- remove use of "simple-bus", because it's technically incorrect
--- .../bindings/memory-controllers/fsl,elbc.yaml | 146 +++++++++++++++++++++ .../devicetree/bindings/powerpc/fsl/lbc.txt | 43 ------ 2 files changed, 146 insertions(+), 43 deletions(-)
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +146 -0
@@ -0,0 +1,146 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/fsl,elbc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Enhanced Local Bus Controller + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + $nodename: + pattern: "^localbus@[0-9a-f]+$" + + compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-elbc + - fsl,mpc8315-elbc + - fsl,mpc8377-elbc + - fsl,mpc8378-elbc + - fsl,mpc8379-elbc + - fsl,mpc8536-elbc + - fsl,mpc8569-elbc + - fsl,mpc8572-elbc + - fsl,p1020-elbc + - fsl,p1021-elbc + - fsl,p1023-elbc + - fsl,p2020-elbc + - fsl,p2041-elbc + - fsl,p3041-elbc + - fsl,p4080-elbc + - fsl,p5020-elbc + - fsl,p5040-elbc + - const: fsl,elbc + + - items: + - const: fsl,mpc8272-localbus + - const: fsl,pq2-localbus + + - items: + - enum: + - fsl,mpc8247-localbus + - fsl,mpc8248-localbus + - fsl,mpc8360-localbus + - const: fsl,pq2pro-localbus + + - items: + - enum: + - fsl,mpc8540-localbus + - fsl,mpc8544-lbc + - fsl,mpc8544-localbus + - fsl,mpc8548-lbc + - fsl,mpc8548-localbus + - fsl,mpc8560-localbus + - fsl,mpc8568-localbus + - const: fsl,pq3-localbus + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#address-cells": + enum: [2, 3] + description: + The first cell is the chipselect number, and the remaining cells are the + offset into the chipselect. + + "#size-cells": + enum: [1, 2] + description: + Either one or two, depending on how large each chipselect can be. + + ranges: + description: + Each range corresponds to a single chipselect, and covers the entire + access window as configured. + +patternProperties: + # format: name@chipselect,address + "^.*@[0-9a-f]+,[0-9a-f]+$": + type: object + +additionalProperties: false + +examples: + - | + localbus@f0010100 { + compatible = "fsl,mpc8272-localbus", + "fsl,pq2-localbus"; + reg = <0xf0010100 0x40>; + ranges = <0x0 0x0 0xfe000000 0x02000000 + 0x1 0x0 0xf4500000 0x00008000 + 0x2 0x0 0xfd810000 0x00010000>; + #address-cells = <2>; + #size-cells = <1>; + + flash@0,0 { + compatible = "jedec-flash"; + reg = <0x0 0x0 0x2000000>; + bank-width = <4>; + device-width = <1>; + }; + + simple-periph@2,0 { + compatible = "fsl,elbc-gpcm-uio"; + reg = <0x2 0x0 0x10000>; + elbc-gpcm-br = <0xfd810800>; + elbc-gpcm-or = <0xffff09f7>; + }; + }; + + - | + localbus@e0005000 { + compatible = "fsl,mpc8315-elbc", "fsl,elbc"; + reg = <0xe0005000 0x1000>; + ranges = <0x0 0x0 0xfe000000 0x00800000 + 0x1 0x0 0xe0600000 0x00002000 + 0x2 0x0 0xf0000000 0x00020000 + 0x3 0x0 0xfa000000 0x00008000>; + #address-cells = <2>; + #size-cells = <1>; + interrupts = <77 0x8>; + interrupt-parent = <&ipic>; + + flash@0,0 { + compatible = "cfi-flash"; + reg = <0x0 0x0 0x800000>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + device-width = <1>; + }; + + nand@1,0 { + compatible = "fsl,mpc8315-fcm-nand", + "fsl,elbc-fcm-nand"; + reg = <0x1 0x0 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + }; + };
Documentation/devicetree/bindings/powerpc/fsl/lbc.txt deleted +0 -43
43 lines not on this page · raw message
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Rob Herring (Arm)
maintainerRe: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Quoted 22 lines · J. Neuschäfer
Convert the Freescale localbus controller bindings from text form to YAML. The updated list of compatible strings reflects current usage in
arch/powerpc/boot/dts/, except that many existing device trees erroneously specify "simple-bus" in addition to fsl,*elbc.Changes compared to the txt version:
- removed the board-control (fsl,mpc8272ads-bcsr) node because it only appears in this example and nowhere else
- added a new example with NAND flash
- updated list of compatible stringsSigned-off-by J. Neuschäfer <[email protected]>---
V2:
- fix order of properties in examples, according to dts coding style
- move toDocumentation/devicetree/bindings/memory-controllers
- clarify the commit message a tiny bit
- remove unnecessary multiline markers (|)
- define address format in patternProperties
- trim subject line (remove "binding")
- remove use of "simple-bus", because it's technically incorrect
Quoted 5 lines
--- .../bindings/memory-controllers/fsl,elbc.yaml | 146 +++++++++++++++++++++ .../devicetree/bindings/powerpc/fsl/lbc.txt | 43 ------ 2 files changed, 146 insertions(+), 43 deletions(-)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-0/localbus@f0010100/simple-periph@2,0: failed to match any schema with compatible: ['fsl,elbc-gpcm-uio'] Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand'] Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']
doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/display/ssd1289fb.txt references a file that doesn't exist: Documentation/devicetree/bindings/powerpc/fsl/lbc.txt Documentation/devicetree/bindings/display/ssd1289fb.txt: Documentation/devicetree/bindings/powerpc/fsl/lbc.txt
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Quoted 1 line · Rob Herring (Arm)
On Fri, 07 Feb 2025 22:30:26 +0100, J. Neuschäfer wrote:
[...]
Quoted 3 lines
Quoted 3 lines
.../bindings/memory-controllers/fsl,elbc.yaml | 146 +++++++++++++++++++++ .../devicetree/bindings/powerpc/fsl/lbc.txt | 43 ------ 2 files changed, 146 insertions(+), 43 deletions(-)
[...]
Quoted 4 lines
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-0/localbus@f0010100/simple-periph@2,0: failed to match any schema with compatible: ['fsl,elbc-gpcm-uio']Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']
I think this is due to how the patches are ordered in the series. This patch uses fsl,elbc-gpcm-uio and fsl,elbc-fcm-nand in examples, but comes before the patches that define the corresponding bindings.
Krzysztof Kozlowski
maintainerRe: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Quoted 6 lines · J. Neuschäfer
Quoted 1 line · Rob Herring (Arm)
On Fri, 07 Feb 2025 22:30:26 +0100, J. Neuschäfer wrote:
[...]
Quoted 3 lines
Quoted 3 lines
.../bindings/memory-controllers/fsl,elbc.yaml | 146 +++++++++++++++++++++ .../devicetree/bindings/powerpc/fsl/lbc.txt | 43 ------ 2 files changed, 146 insertions(+), 43 deletions(-)
Quoted 7 lines
[...]
Quoted 4 lines
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-0/localbus@f0010100/simple-periph@2,0: failed to match any schema with compatible: ['fsl,elbc-gpcm-uio']Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']I think this is due to how the patches are ordered in the series.
If that's possible, this should be fixed, e.g. by re-ordering the patches.
Quoted 2 lines
This patch uses fsl,elbc-gpcm-uio and fsl,elbc-fcm-nand in examples, but comes before the patches that define the corresponding bindings.
Best regards,
Krzysztof
Re: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Quoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · J. Neuschäfer
Quoted 1 line · Rob Herring (Arm)
On Fri, 07 Feb 2025 22:30:26 +0100, J. Neuschäfer wrote:
[...]
Quoted 3 lines
Quoted 3 lines
.../bindings/memory-controllers/fsl,elbc.yaml | 146 +++++++++++++++++++++ .../devicetree/bindings/powerpc/fsl/lbc.txt | 43 ------ 2 files changed, 146 insertions(+), 43 deletions(-)[...]
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-0/localbus@f0010100/simple-periph@2,0: failed to match any schema with compatible: ['fsl,elbc-gpcm-uio']Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: /example-1/localbus@e0005000/nand@1,0: failed to match any schema with compatible: ['fsl,mpc8315-fcm-nand', 'fsl,elbc-fcm-nand']I think this is due to how the patches are ordered in the series.
If that's possible, this should be fixed, e.g. by re-ordering the patches.
Yes, I'll do that for the next iteration
Best regards,
J. Neuschäfer
Crystal Wood
maintainerRe: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
In reply to J. NeuschäferQuoted 16 lines · On Fri, Feb 07, 2025 at 10:30:26PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Convert the Freescale localbus controller bindings from text form to YAML. The updated list of compatible strings reflects current usage in
arch/powerpc/boot/dts/, except that many existing device trees erroneously specify "simple-bus" in addition to fsl,*elbc.Changes compared to the txt version:
- removed the board-control (fsl,mpc8272ads-bcsr) node because it only appears in this example and nowhere else
- added a new example with NAND flash
- updated list of compatible stringsSigned-off-by J. Neuschäfer <[email protected]>---
Quoted 8 lines
V2:
- fix order of properties in examples, according to dts coding style
- move toDocumentation/devicetree/bindings/memory-controllers
- clarify the commit message a tiny bit
- remove unnecessary multiline markers (|)
- define address format in patternProperties
- trim subject line (remove "binding")
- remove use of "simple-bus", because it's technically incorrect
While I admit I haven't been following recent developments in this area, as someone who was involved when "simple-bus" was created (and was on the ePAPR committee that standardized it) I'm surprised to hear simple-bus being called "erroneous" or "technically incorrect" here.
For non-NAND devices this bus generally meets the definition of "an internal I/O bus that cannot be probed for devices" where "devices on the bus can be accessed directly without additional configuration required". NAND flash is an exception, but those devices have compatibles that are specific to the bus controller.
The fact that the address encoding is non-linear is irrelevant; the addresses can still be translated using the standard "ranges" mechanism. This seems to be a disconnect between the schema verification and the way the compatible has previously been defined and used.
And as a practical matter, unless I'm missing something (which I might be since I haven't been in devicetree-land for nearly a decade), Linux is relying on simple-bus to probe these devices. There is a driver that binds to the bus itself but that is just for error interrupts and NAND.
You'd probably need something like commit 3e25f800afb82bd9e5f8 ("memory:fsl_ifc: populate child devices without relying on simple-bus") and the subsequent fix in dd8adc713b1656 ("memory: fsl_ifc: populate child nodes of buses and mfd devices")...
I'm curious what the reasoning was for removing simple-bus from IFC. It seems that the schema verification also played a role in that:
https://www.spinics.net/lists/devicetree/msg220418.html
...but there's also the comment in 985ede63a045eabf3f9d ("dt-bindings:
memory: fsl: convert ifc binding to yaml schema") that "this will help to enforce the correct probe order between parent device and child devices", but was that really not already guaranteed by the parent/child relationship (and again, it should only really matter for NAND except for the possibility of missing error reports during early boot)?
Quoted 12 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +12
-0+ compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-elbc + - fsl,mpc8315-elbc + - fsl,mpc8377-elbc + - fsl,mpc8378-elbc + - fsl,mpc8379-elbc + - fsl,mpc8536-elbc + - fsl,mpc8569-elbc + - fsl,mpc8572-elbc
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml line 37
Quoted 10 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +10
-0+ - fsl,p1020-elbc + - fsl,p1021-elbc + - fsl,p1023-elbc + - fsl,p2020-elbc + - fsl,p2041-elbc + - fsl,p3041-elbc + - fsl,p4080-elbc + - fsl,p5020-elbc + - fsl,p5040-elbc + - const: fsl,elbc
Is it really necessary to list every single chip?
And then it would need to be updated when new ones came out? I know this particular line of chips is not going to see any new members at this point, but as far as the general approach goes...
Does the schema validation complain if it sees an extra compatible it doesn't recognize? If so that's obnoxious.
Quoted 15 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +15
-0+examples: + - | + localbus@f0010100 { + compatible = "fsl,mpc8272-localbus", + "fsl,pq2-localbus"; + reg = <0xf0010100 0x40>; + ranges = <0x0 0x0 0xfe000000 0x02000000 + 0x1 0x0 0xf4500000 0x00008000 + 0x2 0x0 0xfd810000 0x00010000>; + #address-cells = <2>; + #size-cells = <1>; + + flash@0,0 { + compatible = "jedec-flash"; + reg = <0x0 0x0 0x2000000>;
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml line 114
Quoted 10 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +10
-0+ bank-width = <4>; + device-width = <1>; + }; + + simple-periph@2,0 { + compatible = "fsl,elbc-gpcm-uio"; + reg = <0x2 0x0 0x10000>; + elbc-gpcm-br = <0xfd810800>; + elbc-gpcm-or = <0xffff09f7>; + };
I know this isn't new, but... since we're using this as an example, where is the documentation for this fsl,elbc-gpcm-uio and elbc-gpcm-br/or? What exactly is a simple-periph?
There are no in-tree device trees that use this either. The bcsr node was actually a much more normal example, despite that particular platform having been removed. There are other bcsr nodes that still exist that could be used instead.
-Crystal
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Crystal Wood
maintainerRe: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Quoted 8 lines · Crystal Wood
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml line 114
Quoted 6 lines · On Fri, Feb 07, 2025 at 10:30:26PM +0100, J. Neuschäfer via B4 Relay wrote:
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +6
-0+ simple-periph@2,0 { + compatible = "fsl,elbc-gpcm-uio"; + reg = <0x2 0x0 0x10000>; + elbc-gpcm-br = <0xfd810800>; + elbc-gpcm-or = <0xffff09f7>; + };
Quoted 8 lines
I know this isn't new, but... since we're using this as an example, where is the documentation for this fsl,elbc-gpcm-uio and elbc-gpcm-br/or? What exactly is a simple-periph?
There are no in-tree device trees that use this either. The bcsr node was actually a much more normal example, despite that particular platform having been removed. There are other bcsr nodes that still exist that could be used instead.
OK, I noticed patch 10 after I sent this :-P
Seems I didn't like it too much when it was new either:
https://lkml.org/lkml/2014/12/9/530
And it's still a bad example for how GPCM devices on this bus should normally be represented.
-Crystal
Re: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
In reply to Crystal WoodQuoted 26 lines · Crystal Wood
Quoted 16 lines · On Fri, Feb 07, 2025 at 10:30:26PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Convert the Freescale localbus controller bindings from text form to YAML. The updated list of compatible strings reflects current usage in
arch/powerpc/boot/dts/, except that many existing device trees erroneously specify "simple-bus" in addition to fsl,*elbc.Changes compared to the txt version:
- removed the board-control (fsl,mpc8272ads-bcsr) node because it only appears in this example and nowhere else
- added a new example with NAND flash
- updated list of compatible stringsSigned-off-by J. Neuschäfer <[email protected]>---
Quoted 8 lines
V2:
- fix order of properties in examples, according to dts coding style
- move toDocumentation/devicetree/bindings/memory-controllers
- clarify the commit message a tiny bit
- remove unnecessary multiline markers (|)
- define address format in patternProperties
- trim subject line (remove "binding")
- remove use of "simple-bus", because it's technically incorrect
Quoted 4 lines
While I admit I haven't been following recent developments in this area, as someone who was involved when "simple-bus" was created (and was on the ePAPR committee that standardized it) I'm surprised to hear simple-bus being called "erroneous" or "technically incorrect" here.
It is quite possible that my understanding of it is incomplete or wrong.
Quoted 11 lines
For non-NAND devices this bus generally meets the definition of "an internal I/O bus that cannot be probed for devices" where "devices on the bus can be accessed directly without additional configuration required". NAND flash is an exception, but those devices have compatibles that are specific to the bus controller.
The fact that the address encoding is non-linear is irrelevant; the addresses can still be translated using the standard "ranges" mechanism. This seems to be a disconnect between the schema verification and the way the compatible has previously been defined and used.
This is what led me to my assumptions: The simple-bus validation logic in dtc complains about unit addresses such as nand@1,0 which are quite appropriate for the eLBC.
Quoted 5 lines
And as a practical matter, unless I'm missing something (which I might be since I haven't been in devicetree-land for nearly a decade), Linux is relying on simple-bus to probe these devices. There is a driver that binds to the bus itself but that is just for error interrupts and NAND.
As of now, yes, that's correct. Without simple-bus, a current Linux kernel doesn't find the device nodes inside such a localbus.
Quoted 5 lines
You'd probably need something like commit
3e25f800afb82bd9e5f8("memory:fsl_ifc: populate child devices without relying on simple-bus") and the subsequent fix indd8adc713b1656("memory:fsl_ifc: populate child nodes of buses and mfd devices")...
I have prepared such a patch, based on the same assumptions:
[PATCH] powerpc/fsl_lbc: Explicitly populate bus
https://lore.kernel.org/lkml/[email protected]/
Quoted 4 lines
I'm curious what the reasoning was for removing simple-bus from IFC. It seems that the schema verification also played a role in that:
https://www.spinics.net/lists/devicetree/msg220418.html
Yes, that's the same as my reasoning.
Quoted 7 lines
...but there's also the comment in
985ede63a045eabf3f9d("dt-bindings:
memory: fsl: convert ifc binding to yaml schema") that "this will help to enforce the correct probe order between parent device and child devices", but was that really not already guaranteed by the parent/child relationship (and again, it should only really matter for NAND except for the possibility of missing error reports during early boot)?
I'm inclined to agree with you, but it's somewhat beyond my skill level.
I'll let Li Yang or Rob Herring comment on that.
Quoted 24 lines
Quoted 13 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +12
-0+ compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-elbc + - fsl,mpc8315-elbc + - fsl,mpc8377-elbc + - fsl,mpc8378-elbc + - fsl,mpc8379-elbc + - fsl,mpc8536-elbc + - fsl,mpc8569-elbc + - fsl,mpc8572-elbcDocumentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml line 37
Quoted 10 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +10
-0+ - fsl,p1020-elbc + - fsl,p1021-elbc + - fsl,p1023-elbc + - fsl,p2020-elbc + - fsl,p2041-elbc + - fsl,p3041-elbc + - fsl,p4080-elbc + - fsl,p5020-elbc + - fsl,p5040-elbc + - const: fsl,elbc
Quoted 5 lines
Is it really necessary to list every single chip?
And then it would need to be updated when new ones came out? I know this particular line of chips is not going to see any new members at this point, but as far as the general approach goes...
As far as I'm aware, this reflects common practice today.
Quoted 3 lines
Does the schema validation complain if it sees an extra compatible it doesn't recognize? If so that's obnoxious.
Yes.
Quoted 22 lines
Quoted 22 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +21
-0+examples: + - | + localbus@f0010100 { + compatible = "fsl,mpc8272-localbus", + "fsl,pq2-localbus"; + reg = <0xf0010100 0x40>; + ranges = <0x0 0x0 0xfe000000 0x02000000 + 0x1 0x0 0xf4500000 0x00008000 + 0x2 0x0 0xfd810000 0x00010000>; + #address-cells = <2>; + #size-cells = <1>; + + flash@0,0 { + compatible = "jedec-flash"; + reg = <0x0 0x0 0x2000000>; + bank-width = <4>; + device-width = <1>; + }; + + simple-periph@2,0 { + compatible = "fsl,elbc-gpcm-uio";
Quoted 8 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml line 114
Quoted 4 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +4
-0+ reg = <0x2 0x0 0x10000>; + elbc-gpcm-br = <0xfd810800>; + elbc-gpcm-or = <0xffff09f7>; + };I know this isn't new, but... since we're using this as an example, where is the documentation for this fsl,elbc-gpcm-uio and elbc-gpcm-br/or? What exactly is a simple-periph?
fsl,elbc-gpcm-uio is handled in the following patch (dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio).
simple-periph is something I haven't thought about, because this whole example comes from the old txt-format binding. The whole purpose of fsl,elbc-gpcm-uio is to allow userspace drivers to interact with localbus devices, so that doesn't make the intention any clearer, either.
Quoted 5 lines
There are no in-tree device trees that use this either. The bcsr node was actually a much more normal example, despite that particular platform having been removed. There are other bcsr nodes that still exist that could be used instead.
Ah, fsl,mpc8568mds-bcsr for example, good point. I'll add it back.
Quoted 2 lines
-Crystal
Thank you for reaching out!
Best regards,
J. Neuschäfer
Rob Herring
maintainerRe: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
In reply to Crystal WoodQuoted 26 lines · Crystal Wood
Quoted 16 lines · On Fri, Feb 07, 2025 at 10:30:26PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Convert the Freescale localbus controller bindings from text form to YAML. The updated list of compatible strings reflects current usage in
arch/powerpc/boot/dts/, except that many existing device trees erroneously specify "simple-bus" in addition to fsl,*elbc.Changes compared to the txt version:
- removed the board-control (fsl,mpc8272ads-bcsr) node because it only appears in this example and nowhere else
- added a new example with NAND flash
- updated list of compatible stringsSigned-off-by J. Neuschäfer <[email protected]>---
Quoted 8 lines
V2:
- fix order of properties in examples, according to dts coding style
- move toDocumentation/devicetree/bindings/memory-controllers
- clarify the commit message a tiny bit
- remove unnecessary multiline markers (|)
- define address format in patternProperties
- trim subject line (remove "binding")
- remove use of "simple-bus", because it's technically incorrect
Quoted 4 lines
While I admit I haven't been following recent developments in this area, as someone who was involved when "simple-bus" was created (and was on the ePAPR committee that standardized it) I'm surprised to hear simple-bus being called "erroneous" or "technically incorrect" here.
Erroneous because the binding did not say "simple-bus" was used. Not uncommon with the old .txt bindings.
Generally, if a bus has control registers or resources like clocks, then we tend not to call them 'simple-bus'. And '"specific-bus", "simple-bus"' gives some problems around what driver if any do you bind to.
If you have chip selects, then you have config registers for those. Not really "simple" if you ask me. That being said, you could keep 'simple-bus' here. I would tend to err on making the schema match the actual .dts rather than updating the .dts files on older platforms like these.
Quoted 5 lines
For non-NAND devices this bus generally meets the definition of "an internal I/O bus that cannot be probed for devices" where "devices on the bus can be accessed directly without additional configuration required". NAND flash is an exception, but those devices have compatibles that are specific to the bus controller.
NAND bindings have evolved quite a bit if you haven't been paying attention.
Quoted 10 lines
The fact that the address encoding is non-linear is irrelevant; the addresses can still be translated using the standard "ranges" mechanism. This seems to be a disconnect between the schema verification and the way the compatible has previously been defined and used.
And as a practical matter, unless I'm missing something (which I might be since I haven't been in devicetree-land for nearly a decade), Linux is relying on simple-bus to probe these devices. There is a driver that binds to the bus itself but that is just for error interrupts and NAND.
Quoted 8 lines
You'd probably need something like commit
3e25f800afb82bd9e5f8("memory:fsl_ifc: populate child devices without relying on simple-bus") and the subsequent fix indd8adc713b1656("memory:fsl_ifc: populate child nodes of buses and mfd devices")...I'm curious what the reasoning was for removing simple-bus from IFC. It seems that the schema verification also played a role in that:
https://www.spinics.net/lists/devicetree/msg220418.html
If a kernel change is needed to support changed .dts files, then we shouldn't be doing that here (being mature platforms). That would mean new DTB will not work with existing kernels.
Quoted 31 lines
...but there's also the comment in
985ede63a045eabf3f9d("dt-bindings:
memory: fsl: convert ifc binding to yaml schema") that "this will help to enforce the correct probe order between parent device and child devices", but was that really not already guaranteed by the parent/child relationship (and again, it should only really matter for NAND except for the possibility of missing error reports during early boot)?Quoted 12 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +12
-0+ compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-elbc + - fsl,mpc8315-elbc + - fsl,mpc8377-elbc + - fsl,mpc8378-elbc + - fsl,mpc8379-elbc + - fsl,mpc8536-elbc + - fsl,mpc8569-elbc + - fsl,mpc8572-elbcDocumentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml line 37
Quoted 10 lines
Documentation/devicetree/bindings/memory-controllers/fsl,elbc.yaml new file +10
-0+ - fsl,p1020-elbc + - fsl,p1021-elbc + - fsl,p1023-elbc + - fsl,p2020-elbc + - fsl,p2041-elbc + - fsl,p3041-elbc + - fsl,p4080-elbc + - fsl,p5020-elbc + - fsl,p5040-elbc + - const: fsl,elbc
Quoted 1 line
Is it really necessary to list every single chip?
Yes. If they exist, they have to be documented.
Quoted 7 lines
And then it would need to be updated when new ones came out? I know this particular line of chips is not going to see any new members at this point, but as far as the general approach goes...
Does the schema validation complain if it sees an extra compatible it doesn't recognize? If so that's obnoxious.
Yes.
More annoying is having to boot and debug typos:
compatible = "foo,bar", "simplebus";
Rob
Re: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
Quoted 39 lines · Rob Herring
Quoted 26 lines · Crystal Wood
Quoted 16 lines · On Fri, Feb 07, 2025 at 10:30:26PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Convert the Freescale localbus controller bindings from text form to YAML. The updated list of compatible strings reflects current usage in
arch/powerpc/boot/dts/, except that many existing device trees erroneously specify "simple-bus" in addition to fsl,*elbc.Changes compared to the txt version:
- removed the board-control (fsl,mpc8272ads-bcsr) node because it only appears in this example and nowhere else
- added a new example with NAND flash
- updated list of compatible stringsSigned-off-by J. Neuschäfer <[email protected]>---
Quoted 8 lines
V2:
- fix order of properties in examples, according to dts coding style
- move toDocumentation/devicetree/bindings/memory-controllers
- clarify the commit message a tiny bit
- remove unnecessary multiline markers (|)
- define address format in patternProperties
- trim subject line (remove "binding")
- remove use of "simple-bus", because it's technically incorrectQuoted 4 lines
While I admit I haven't been following recent developments in this area, as someone who was involved when "simple-bus" was created (and was on the ePAPR committee that standardized it) I'm surprised to hear simple-bus being called "erroneous" or "technically incorrect" here.
Erroneous because the binding did not say "simple-bus" was used. Not uncommon with the old .txt bindings.
Generally, if a bus has control registers or resources like clocks, then we tend not to call them 'simple-bus'. And '"specific-bus", "simple-bus"' gives some problems around what driver if any do you bind to.
[...]
Quoted 5 lines
Quoted 5 lines
You'd probably need something like commit
3e25f800afb82bd9e5f8("memory:fsl_ifc: populate child devices without relying on simple-bus") and the subsequent fix indd8adc713b1656("memory:fsl_ifc: populate child nodes of buses and mfd devices")...
Quoted 7 lines
Quoted 3 lines
I'm curious what the reasoning was for removing simple-bus from IFC. It seems that the schema verification also played a role in that:
https://www.spinics.net/lists/devicetree/msg220418.htmlIf a kernel change is needed to support changed .dts files, then we shouldn't be doing that here (being mature platforms). That would mean new DTB will not work with existing kernels.
Alright, I'll keep simple-bus in the eLBC binding for historical compatibility.
Thank you both for your discussion.
J. Neuschäfer
Crystal Wood
maintainerRe: [PATCH v2 09/12] dt-bindings: memory-controllers: Convert fsl,elbc to YAML
In reply to Rob HerringQuoted 4 lines · Rob Herring
Generally, if a bus has control registers or resources like clocks, then we tend not to call them 'simple-bus'. And '"specific-bus", "simple-bus"' gives some problems around what driver if any do you bind to.
Isn't the general idea that you bind to the first one in the list that you have a driver for, since it goes from most to least specific?
Quoted 5 lines
If you have chip selects, then you have config registers for those. Not really "simple" if you ask me. That being said, you could keep 'simple-bus' here. I would tend to err on making the schema match the actual .dts rather than updating the .dts files on older platforms like these.
By that definition I wonder how much truly qualifies. Even with IMMR/CCSR, firmware needs to at least set the base register (which is itself inside CCSR, so there's no way to avoid relying on knowledge of what the firmware did, except on 8xx). Though I acknowledge that eLBC is a stretch, with FCM and UPM being exceptions. FCM didn't exist in the original LBC, and UPM was... kind of considered a fringe use case until someone hooked NAND up to it. :-P
The point back then wasn't that such registers don't exist, but that the OS can use the devices without having to care. But of course, there's subjectivity there about what the OS might care about (e.g. UPM).
FWIW, on these chips (especially the later ones) there were all sorts of things (in general, not specifically LBC-related) that firmware had to set up to present a coherent system to the OS. Not all the choices made there were great, but if we tried to describe all the gory details from the start I'm sure we would have made an even bigger mess of it.
Quoted 8 lines
Quoted 5 lines
For non-NAND devices this bus generally meets the definition of "an internal I/O bus that cannot be probed for devices" where "devices on the bus can be accessed directly without additional configuration required". NAND flash is an exception, but those devices have compatibles that are specific to the bus controller.
NAND bindings have evolved quite a bit if you haven't been paying attention.
I haven't, as I acknowledged... but I was describing how eLBC does it, and just meant that we're not binding to drivers that don't know about the bus in that case. The NAND control registers are part of eLBC/IFC, not a separate block (the reg in the NAND node itself is just the SRAM used as a buffer). I'm not sure what that would be expected to look like these days.
-Crystal
PATCH v2 10/12 dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio
In reply to J. NeuschäferFormalize the binding already supported by the uio_fsl_elbc_gpcm.c driver.
---
V2:
- split out from fsl,elbc patch
- add description
- remove "device_type" property
- move to bindings/memory-controllers
--- .../memory-controllers/fsl,elbc-gpcm-uio.yaml | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+)
Documentation/devicetree/bindings/memory-controllers/fsl,elbc-gpcm-uio.yaml new file +59 -0
@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/fsl,elbc-gpcm-uio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Userspace I/O interface for Freescale eLBC devices + +description: + The Freescale Enhanced Local Bus controller (eLBC) supports flexible access + to memory devices, through the General-Purpose Chip-select Machine (GPCM). + The purpose of this binding is to designate devices attached to eLBC/GPMC for + use by userspace. + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + const: fsl,elbc-gpcm-uio + + reg: + maxItems: 1 + + elbc-gpcm-br: + description: Base Register (BR) value to set + $ref: /schemas/types.yaml#/definitions/uint32 + + elbc-gpcm-or: + description: Option Register (OR) value to set + $ref: /schemas/types.yaml#/definitions/uint32 + + interrupts: + maxItems: 1 + + uio_name: + $ref: /schemas/types.yaml#/definitions/string + +required: + - compatible + - reg + - elbc-gpcm-br + - elbc-gpcm-or + +additionalProperties: false + +examples: + - | + localbus { + #address-cells = <2>; + #size-cells = <1>; + + simple-periph@2,0 { + compatible = "fsl,elbc-gpcm-uio"; + reg = <0x2 0x0 0x10000>; + elbc-gpcm-br = <0xfd810800>; + elbc-gpcm-or = <0xffff09f7>; + }; + };
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 10/12] dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio
Quoted 6 lines · On Fri, Feb 07, 2025 at 10:30:27PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Formalize the binding already supported by the
uio_fsl_elbc_gpcm.cdriver.Signed-off-by J. Neuschäfer <[email protected]>
Quoted 81 lines
---
V2:
- split out from fsl,elbc patch
- add description
- remove "device_type" property
- move to bindings/memory-controllers--- .../memory-controllers/fsl,elbc-gpcm-uio.yaml | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+)Documentation/devicetree/bindings/memory-controllers/fsl,elbc-gpcm-uio.yaml new file +59
-1@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/fsl,elbc-gpcm-uio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Userspace I/O interface for Freescale eLBC devices + +description: + The Freescale Enhanced Local Bus controller (eLBC) supports flexible access + to memory devices, through the General-Purpose Chip-select Machine (GPCM). + The purpose of this binding is to designate devices attached to eLBC/GPMC for + use by userspace. + +maintainers: + - J. Neuschäfer <[email protected]> + +properties: + compatible: + const: fsl,elbc-gpcm-uio + + reg: + maxItems: 1 + + elbc-gpcm-br: + description: Base Register (BR) value to set + $ref: /schemas/types.yaml#/definitions/uint32 + + elbc-gpcm-or: + description: Option Register (OR) value to set + $ref: /schemas/types.yaml#/definitions/uint32 + + interrupts: + maxItems: 1 + + uio_name: + $ref: /schemas/types.yaml#/definitions/string + +required: + - compatible + - reg + - elbc-gpcm-br + - elbc-gpcm-or + +additionalProperties: false + +examples: + - | + localbus { + #address-cells = <2>; + #size-cells = <1>; + + simple-periph@2,0 { + compatible = "fsl,elbc-gpcm-uio"; + reg = <0x2 0x0 0x10000>; + elbc-gpcm-br = <0xfd810800>; + elbc-gpcm-or = <0xffff09f7>; + }; + }; --2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 10/12] dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio
In reply to J. NeuschäferQuoted 6 lines · J. Neuschäfer
Formalize the binding already supported by the
uio_fsl_elbc_gpcm.cdriver.Signed-off-by J. Neuschäfer <[email protected]>---
Quoted 9 lines
V2:
- split out from fsl,elbc patch
- add description
- remove "device_type" property
- move to bindings/memory-controllers--- .../memory-controllers/fsl,elbc-gpcm-uio.yaml | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+)
PATCH v2 11/12 dt-bindings: nand: Add fsl,elbc-fcm-nand
In reply to J. NeuschäferFormalize the binding already supported by the fsl_elbc_nand.c driver and used in several device trees in arch/powerpc/boot/dts/.
---
V2:
- split out from fsl,elbc binding patch
- constrain #address-cells and #size-cells
- add a general description
- use unevaluatedProperties=false instead of additionalProperties=false
- fix property order to comply with dts coding style
- include raw-nand-chip.yaml instead of nand-chip.yaml
--- .../devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+)
Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml new file +68 -0
@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NAND flash attached to Freescale eLBC + +description: + The Freescale Enhanced Local Bus controller (eLBC) contains logic to + interface with NAND flash, called the NAND Flash Control Machine (FCM). + This binding describes flash attached to an eLBC using the FCM. + +maintainers: + - J. Neuschäfer <[email protected]> + +allOf: + - $ref: raw-nand-chip.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-fcm-nand + - fsl,mpc8315-fcm-nand + - fsl,mpc8377-fcm-nand + - fsl,mpc8378-fcm-nand + - fsl,mpc8379-fcm-nand + - fsl,mpc8536-fcm-nand + - fsl,mpc8569-fcm-nand + - fsl,mpc8572-fcm-nand + - fsl,p1020-fcm-nand + - fsl,p1021-fcm-nand + - fsl,p1025-fcm-nand + - fsl,p2020-fcm-nand + - const: fsl,elbc-fcm-nand + - const: fsl,elbc-fcm-nand + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + localbus { + #address-cells = <2>; + #size-cells = <1>; + + nand@1,0 { + compatible = "fsl,mpc8315-fcm-nand", + "fsl,elbc-fcm-nand"; + reg = <0x1 0x0 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + }; + };
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Rob Herring (Arm)
maintainerRe: [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nand
Quoted 13 lines · J. Neuschäfer
Formalize the binding already supported by the
fsl_elbc_nand.cdriver and used in several device trees inarch/powerpc/boot/dts/.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- split out from fsl,elbc binding patch
- constrain #address-cells and #size-cells
- add a general description
- use unevaluatedProperties=false instead of additionalProperties=false
- fix property order to comply with dts coding style
- includeraw-nand-chip.yamlinstead ofnand-chip.yaml
Quoted 4 lines
--- .../devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.example.dtb: nand@1,0: $nodename:0: 'nand@1,0' does not match '^nand@[a-f0-9]$'
from schema $id: http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/memory-controllers/fsl,elbc.example.dtb: nand@1,0: $nodename:0: 'nand@1,0' does not match '^nand@[a-f0-9]$'
from schema $id: http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nandy
In reply to J. NeuschäferQuoted 81 lines · On Fri, Feb 07, 2025 at 10:30:28PM +0100, J. Neuschäfer via B4 Relay wrote:
From: "J. Neuschäfer" <[email protected]>
Formalize the binding already supported by the
fsl_elbc_nand.cdriver and used in several device trees inarch/powerpc/boot/dts/.Signed-off-by J. Neuschäfer <[email protected]>---
V2:
- split out from fsl,elbc binding patch
- constrain #address-cells and #size-cells
- add a general description
- use unevaluatedProperties=false instead of additionalProperties=false
- fix property order to comply with dts coding style
- includeraw-nand-chip.yamlinstead ofnand-chip.yaml--- .../devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+)Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml new file +56
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NAND flash attached to Freescale eLBC + +description: + The Freescale Enhanced Local Bus controller (eLBC) contains logic to + interface with NAND flash, called the NAND Flash Control Machine (FCM). + This binding describes flash attached to an eLBC using the FCM. + +maintainers: + - J. Neuschäfer <[email protected]> + +allOf: + - $ref: raw-nand-chip.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-fcm-nand + - fsl,mpc8315-fcm-nand + - fsl,mpc8377-fcm-nand + - fsl,mpc8378-fcm-nand + - fsl,mpc8379-fcm-nand + - fsl,mpc8536-fcm-nand + - fsl,mpc8569-fcm-nand + - fsl,mpc8572-fcm-nand + - fsl,p1020-fcm-nand + - fsl,p1021-fcm-nand + - fsl,p1025-fcm-nand + - fsl,p2020-fcm-nand + - const: fsl,elbc-fcm-nand + - const: fsl,elbc-fcm-nand + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - |
Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml line 66
Quoted 10 lines
Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml new file +10
-0+ localbus { + #address-cells = <2>; + #size-cells = <1>; + + nand@1,0 { + compatible = "fsl,mpc8315-fcm-nand", + "fsl,elbc-fcm-nand"; + reg = <0x1 0x0 0x2000>; + #address-cells = <1>; + #size-cells = <1>;
needn't #address-cells and #size-cells because no children nodes.
Frank
Quoted 7 lines
Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml new file +2
-1+ }; + }; --2.48.0.rc1.219.gb6b6757d772
Rob Herring
maintainerRe: [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nand
In reply to J. NeuschäferQuoted 6 lines · J. Neuschäfer
Formalize the binding already supported by the
fsl_elbc_nand.cdriver and used in several device trees inarch/powerpc/boot/dts/.Signed-off-by J. Neuschäfer <[email protected]>---
Quoted 7 lines
V2:
- split out from fsl,elbc binding patch
- constrain #address-cells and #size-cells
- add a general description
- use unevaluatedProperties=false instead of additionalProperties=false
- fix property order to comply with dts coding style
- includeraw-nand-chip.yamlinstead ofnand-chip.yaml
Why? Doesn't look like you use anything from it. I think the correct thing to use here is just mtd.yaml to pick up partitions.
Quoted 82 lines
--- .../devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+)Documentation/devicetree/bindings/mtd/fsl,elbc-fcm-nand.yaml new file +68
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NAND flash attached to Freescale eLBC + +description: + The Freescale Enhanced Local Bus controller (eLBC) contains logic to + interface with NAND flash, called the NAND Flash Control Machine (FCM). + This binding describes flash attached to an eLBC using the FCM. + +maintainers: + - J. Neuschäfer <[email protected]> + +allOf: + - $ref: raw-nand-chip.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,mpc8313-fcm-nand + - fsl,mpc8315-fcm-nand + - fsl,mpc8377-fcm-nand + - fsl,mpc8378-fcm-nand + - fsl,mpc8379-fcm-nand + - fsl,mpc8536-fcm-nand + - fsl,mpc8569-fcm-nand + - fsl,mpc8572-fcm-nand + - fsl,p1020-fcm-nand + - fsl,p1021-fcm-nand + - fsl,p1025-fcm-nand + - fsl,p2020-fcm-nand + - const: fsl,elbc-fcm-nand + - const: fsl,elbc-fcm-nand + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + localbus { + #address-cells = <2>; + #size-cells = <1>; + + nand@1,0 { + compatible = "fsl,mpc8315-fcm-nand", + "fsl,elbc-fcm-nand"; + reg = <0x1 0x0 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + }; + };Signature · 2 lines
-- 2.48.0.rc1.219.gb6b6757d772
Re: [PATCH v2 11/12] dt-bindings: nand: Add fsl,elbc-fcm-nand
Quoted 15 lines · Rob Herring
Quoted 6 lines · J. Neuschäfer
Formalize the binding already supported by the
fsl_elbc_nand.cdriver and used in several device trees inarch/powerpc/boot/dts/.Signed-off-by J. Neuschäfer <[email protected]>---
Quoted 7 lines
V2:
- split out from fsl,elbc binding patch
- constrain #address-cells and #size-cells
- add a general description
- use unevaluatedProperties=false instead of additionalProperties=false
- fix property order to comply with dts coding style
- includeraw-nand-chip.yamlinstead ofnand-chip.yaml
Quoted 2 lines
Why? Doesn't look like you use anything from it. I think the correct thing to use here is just
mtd.yamlto pick up partitions.
There is one example of properties from nand-chip.yaml being used on an fsl,elbc-fcm-nand node: arch/powerpc/boot/dts/turris1x.dts uses nand-ecc-mode and nand-ecc-algo.
Thanks,
J. Neuschäfer
PATCH v2 12/12 dt-bindings: mtd: raw-nand-chip: Relax node name pattern
In reply to J. NeuschäferIn some scenarios, such as under the Freescale eLBC bus, there are raw NAND chips with a unit address that has a comma in it (cs,offset). Relax the $nodename pattern in raw-nand-chip.yaml to allow such unit addresses.
---
V2:
- new patch
--- Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml +1 -1
@@ -25,7 +25,7 @@ description: | properties: $nodename: - pattern: "^nand@[a-f0-9]$" + pattern: "^nand@[a-f0-9](,[0-9a-f]*)?$" reg: description:
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Miquel Raynal
maintainerRe: [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern
Hello,
Quoted 6 lines · On 07/02/2025 at 22:30:29 +01, J. Neuschäfer via B4 Relay…
From: "J. Neuschäfer" <[email protected]>
In some scenarios, such as under the Freescale eLBC bus, there are raw NAND chips with a unit address that has a comma in it (cs,offset). Relax the $nodename pattern in
raw-nand-chip.yamlto allow such unit addresses.
This is super specific to this controller, I'd rather avoid that in the main (shared) files. I believe you can force another node name in the controller's binding instead?
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern
Quoted 6 lines · Miquel Raynal
Hello,
Quoted 2 lines · On 07/02/2025 at 22:30:29 +01, J. Neuschäfer via B4 Relay…
From: "J. Neuschäfer" <[email protected]>
Quoted 8 lines
Quoted 4 lines
In some scenarios, such as under the Freescale eLBC bus, there are raw NAND chips with a unit address that has a comma in it (cs,offset). Relax the $nodename pattern in
raw-nand-chip.yamlto allow such unit addresses.This is super specific to this controller, I'd rather avoid that in the main (shared) files. I believe you can force another node name in the controller's binding instead?
It's a bit tricky. AFAICS, when I declare a node name pattern in my specific binding in addition to the generic binding, the result is that both of them apply, so I can't relax stricter requirements:
# raw-nand-chip.yaml
properties:
$nodename:
pattern: "^nand@[a-f0-9]$"# fsl,elbc-fcm-nand.yaml
properties:
$nodename:
pattern: "^nand@[a-f0-9](,[0-9a-f]*)?$"
# dtc
/.../fsl,elbc-fcm-nand.example.dtb:
nand@1,0: $nodename:0: 'nand@1,0' does not match '^nand@[a-f0-9]$'
from schema $id:
http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml#(I changed the second pattern to nand-fail@... and dtc warned about it
mismatching too.)
Perhaps I'm missing a DT-schema trick to override a value/pattern.
Alternatively (pending discussion on patch 11/12), I might end up not referencing raw-nand-chip.yaml.
Best regards,
J. Neuschäfer
Miquel Raynal
maintainerRe: [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern
Hello,
Quoted 18 lines
Quoted 8 lines
Quoted 4 lines
In some scenarios, such as under the Freescale eLBC bus, there are raw NAND chips with a unit address that has a comma in it (cs,offset). Relax the $nodename pattern in
raw-nand-chip.yamlto allow such unit addresses.This is super specific to this controller, I'd rather avoid that in the main (shared) files. I believe you can force another node name in the controller's binding instead?
It's a bit tricky. AFAICS, when I declare a node name pattern in my specific binding in addition to the generic binding, the result is that both of them apply, so I can't relax stricter requirements:
# raw-nand-chip.yaml properties: $nodename: pattern: "^nand@[a-f0-9]$"
Quoted 4 lines
# fsl,elbc-fcm-nand.yaml
properties:
$nodename:pattern: "^nand@[a-f0-9](,[0-9a-f]*)?$"
Well, I guess this is creating a second possible node name.
Quoted 5 lines
# dtc
/.../fsl,elbc-fcm-nand.example.dtb:
nand@1,0: $nodename:0: 'nand@1,0' does not match '^nand@[a-f0-9]$'
from schema $id:
http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml#What about fixing the DT instead?
Quoted 7 lines
(I changed the second pattern to nand-fail@... and dtc warned about it
mismatching too.)Perhaps I'm missing a DT-schema trick to override a value/pattern.
Alternatively (pending discussion on patch 11/12), I might end up not referencing
raw-nand-chip.yaml.
Ok.
Thanks,
Miquèl
Re: [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern
Quoted 27 lines · Miquel Raynal
Hello,
Quoted 18 lines
Quoted 8 lines
Quoted 4 lines
In some scenarios, such as under the Freescale eLBC bus, there are raw NAND chips with a unit address that has a comma in it (cs,offset). Relax the $nodename pattern in
raw-nand-chip.yamlto allow such unit addresses.This is super specific to this controller, I'd rather avoid that in the main (shared) files. I believe you can force another node name in the controller's binding instead?
It's a bit tricky. AFAICS, when I declare a node name pattern in my specific binding in addition to the generic binding, the result is that both of them apply, so I can't relax stricter requirements:
# raw-nand-chip.yaml properties: $nodename: pattern: "^nand@[a-f0-9]$"Quoted 4 lines
# fsl,elbc-fcm-nand.yaml
properties:
$nodename:pattern: "^nand@[a-f0-9](,[0-9a-f]*)?$"Well, I guess this is creating a second possible node name.
Quoted 7 lines
Quoted 5 lines
# dtc /.../fsl,elbc-fcm-nand.example.dtb: nand@1,0: $nodename:0: 'nand@1,0' does not match '^nand@[a-f0-9]$' from schema $id: http://devicetree.org/schemas/mtd/fsl,elbc-fcm-nand.yaml#What about fixing the DT instead?
In this particular context under the Freescale eLBC ("enhanced Local Bus Controller"), nand@1,0 makes complete sense, because it refers to chip select 1, offset 0. The eLBC binding (which has existed without YAML formalization for a long time) specifies that each device address includes a chip select and a base address under that CS.
The alternative of spelling it as nand@100000000 makes readability strictly worse (IMO).
Due to the conflicting requirements of keeping compatibility with historic device trees and complying with modern DT conventions, I'm already ignoring a validation warning from dtc, which suggests to use nand@100000000 instead of nand@1,0 because the eLBC bus has historically been specified with compatible = ..., "simple-bus", so I guess the fsl,elbc-fcm-nand binding can't be perfect anyway.
In any case, I'll drop this patch during further development.
Thank you for your inputs,
J. Neuschäfer
Mark Brown
maintainerQuoted 7 lines · On Fri, Feb 07, 2025 at 10:30:17PM +0100, J. Neuschäfer via B4 Relay wrote:
This is a spin-off of the series titled "powerpc: MPC83xx cleanup and LANCOM NWAPP2 board".
During the development of that series, it became clear that many devicetree bindings for Freescale MPC8xxx platforms are still in the old plain-text format, or don't exist at all, and in any case don't mention all valid compatible strings.
What's the story with dependencies here - why is all this stuff in one series? Normally I'd expect bindings conversions to be standalone.
Quoted 5 lines · Mark Brown
Quoted 2 lines · On Fri, Feb 07, 2025 at 10:30:17PM +0100, J. Neuschäfer via B4 Relay wrote:
This is a spin-off of the series titled "powerpc: MPC83xx cleanup and LANCOM NWAPP2 board".
Quoted 7 lines
Quoted 4 lines
During the development of that series, it became clear that many devicetree bindings for Freescale MPC8xxx platforms are still in the old plain-text format, or don't exist at all, and in any case don't mention all valid compatible strings.
What's the story with dependencies here - why is all this stuff in one series?
The patches are independent of each other, except for the four elbc/nand patches. They are in the same series because they came up during the same project and achieve similar goals, but it isn't necessary.
Quoted 1 line
Normally I'd expect bindings conversions to be standalone.
Noted.
J. Neuschäfer
Mark Brown
maintainerQuoted 8 lines · J. Neuschäfer
Quoted 2 lines · Mark Brown
What's the story with dependencies here - why is all this stuff in one series?
The patches are independent of each other, except for the four elbc/nand patches. They are in the same series because they came up during the same project and achieve similar goals, but it isn't necessary.
Please don't do this, it just makes it harder to merge things since it makes it look like there's cross tree merges needed when that's not the case, complicating merging, and puts the entire series in everyone's inbox which makes things more noisy.
Quoted 6 lines · Mark Brown
Quoted 4 lines · J. Neuschäfer
Quoted 2 lines · Mark Brown
What's the story with dependencies here - why is all this stuff in one series?
Quoted 8 lines
Quoted 3 lines
The patches are independent of each other, except for the four elbc/nand patches. They are in the same series because they came up during the same project and achieve similar goals, but it isn't necessary.
Please don't do this, it just makes it harder to merge things since it makes it look like there's cross tree merges needed when that's not the case, complicating merging, and puts the entire series in everyone's inbox which makes things more noisy.
How should I proceed with this series, in your opinion? I see potential advantages (less of the issues you describe) and disadvantages (somewhat harder to track patches) of splitting it up before sending v3.
(Outside of this series, the conclusion is clear and simple)
J. Neuschäfer
Mark Brown
maintainerQuoted 11 lines · J. Neuschäfer
Quoted 4 lines · Mark Brown
Please don't do this, it just makes it harder to merge things since it makes it look like there's cross tree merges needed when that's not the case, complicating merging, and puts the entire series in everyone's inbox which makes things more noisy.
How should I proceed with this series, in your opinion? I see potential advantages (less of the issues you describe) and disadvantages (somewhat harder to track patches) of splitting it up before sending v3.
I'd rather that at least the SPI stuff were sent separately (well, ideally what you've done already is fine and it doesn't need a resend at all).