dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
Subsystems (2)
PATCH 4/9 dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
Add device tree binding documentation for the Black Sesame Technologies (BST) DWCMSHC SDHCI controller.
This binding describes the required and optional properties for the bst,dwcmshc-sdhci compatible controller, including register layout, interrupts, bus width, clock configuration, and other controller-specific features.
--- .../bindings/mmc/bst,dwcmshc-sdhci.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.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/mmc/bst,dwcmshc-sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Black Sesame Technologies DWCMSHC SDHCI Controller + +maintainers: + - Ge Gordon <[email protected]> + +description: | + The BST DWCMSHC SDHCI controller is a Synopsys DesignWare Mobile Storage Host + Controller IP integrated in BST SoCs. + + This documents the differences between the core properties in mmc.yaml and the + properties used by the sdhci-bst driver. + +properties: + compatible: + const: bst,dwcmshc-sdhci + + reg-names: + const: base + description: Specify the register name + + reg: + maxItems: 1 + description: Host controller base address + + interrupts: + maxItems: 1 + description: One MMC interrupt should be described here + + interrupt-names: + items: + - const: IRQDWMMC0 + + non-removable: + type: boolean + description: Non-removable slot (like eMMC) + + bus-width: + description: Number of data lines + enum: [1, 4, 8] + + clock-frequency: + description: Base clock frequency in Hz + + max-frequency: + description: Maximum clock frequency in Hz + + fifo-depth: + description: | + FIFO depth in bytes. If this property is not specified, the default value + of the fifo size is determined from the controller registers. + + mmc_crm_base: + description: Base address of MMC CRM registers + $ref: /schemas/types.yaml#/definitions/uint32 + + mmc_crm_size: + description: Size of MMC CRM registers + $ref: /schemas/types.yaml#/definitions/uint32 + + memory-region: + maxItems: 1 + description: Specify the MMC DMA buffer range + + sdhci,auto-cmd12: + type: boolean + description: Enable auto CMD12 support + + dma-coherent: + type: boolean + description: Enable coherent DMA operations + +required: + - compatible + - reg-names + - reg + - interrupts + - interrupt-names + - non-removable + - bus-width + - clock-frequency + - max-frequency + - fifo-depth + - mmc_crm_base + - mmc_crm_size + +examples: + - | + dwmmc0@22200000 { + status = "okay"; + compatible = "bst,dwcmshc-sdhci"; + reg-names = "base"; + reg = <0x0 0x22200000 0x0 0x1000>; + interrupts = <0x0 0x90 0x4>; + interrupt-names = "IRQDWMMC0"; + #address-cells = <0x2>; + #size-cells = <0x0>; + clock-frequency = <200000000>; + max-frequency = <200000000>; + mmc_crm_base = <0x23006000>; + mmc_crm_size = <0x1000>; + fifo-depth = <0x400>; + bus-width = <8>; + non-removable; + sdhci,auto-cmd12; + dma-coherent; + memory-region = <&mmc_dma_buf>; + }; + +additionalProperties: true
Signature · 1 line
2.25.1
Quoted 7 lines · Albert Yang
Add device tree binding documentation for the Black Sesame Technologies (BST) DWCMSHC SDHCI controller.
This binding describes the required and optional properties for the bst,dwcmshc-sdhci compatible controller, including register layout, interrupts, bus width, clock configuration, and other controller-specific features.
Completely redundant paragraph, drop.
A nit, subject: drop second/last, redundant "bindings for". The "dt-bindings" prefix is already stating that these are bindings. See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
Quoted 21 lines
Signed-off-by Ge Gordon <[email protected]>Signed-off-by Albert Yang <[email protected]>--- .../bindings/mmc/bst,dwcmshc-sdhci.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yamlDocumentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +7
-0@@ -0,0 +1,115 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/bst,dwcmshc-sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Black Sesame Technologies DWCMSHC SDHCI Controller
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +10
-0+ +maintainers: + - Ge Gordon <[email protected]> + +description: | + The BST DWCMSHC SDHCI controller is a Synopsys DesignWare Mobile Storage Host + Controller IP integrated in BST SoCs. + + This documents the differences between the core properties in mmc.yaml and the + properties used by the sdhci-bst driver.
redundant paragraph, drop.
Missing ref to proper schema. Look how other bindings do it.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 21
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ +properties: + compatible: + const: bst,dwcmshc-sdhci
You have to use soc specific compatibles. Just look at other bindings.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 25
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ + reg-names: + const: base + description: Specify the register name
Drop reg-names, useless.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 29
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ + reg: + maxItems: 1 + description: Host controller base address
Drop description, redundant.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 33
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ + interrupts: + maxItems: 1 + description: One MMC interrupt should be described here
Drop description, redundant.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 37
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ + interrupt-names: + items: + - const: IRQDWMMC0
Drop interrupt-names
Quoted 10 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +10
-0+ + non-removable: + type: boolean + description: Non-removable slot (like eMMC) + + bus-width: + description: Number of data lines + enum: [1, 4, 8] + + clock-frequency:
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 57
Quoted 10 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +10
-0+ description: Base clock frequency in Hz + + max-frequency: + description: Maximum clock frequency in Hz + + fifo-depth: + description: | + FIFO depth in bytes. If this property is not specified, the default value + of the fifo size is determined from the controller registers. +
All of above are redundant, drop.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 64
Quoted 7 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +7
-0+ mmc_crm_base: + description: Base address of MMC CRM registers + $ref: /schemas/types.yaml#/definitions/uint32 + + mmc_crm_size: + description: Size of MMC CRM registers + $ref: /schemas/types.yaml#/definitions/uint32
No clue what are these but they look completely wrong. Why would you define address size as different property than reg?
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 72
Quoted 8 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +8
-0+ + memory-region: + maxItems: 1 + description: Specify the MMC DMA buffer range + + sdhci,auto-cmd12: + type: boolean + description: Enable auto CMD12 support
Drop, your compatible defines it, there is no vendor sdhci and this is I think legacy
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 76
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ + dma-coherent: + type: boolean + description: Enable coherent DMA operations
Drop description, redundant.
Quoted 8 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +8
-0+ +required: + - compatible + - reg-names + - reg + - interrupts + - interrupt-names + - non-removable
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +10
-0+ - bus-width + - clock-frequency + - max-frequency + - fifo-depth + - mmc_crm_base + - mmc_crm_size + +examples: + - | + dwmmc0@22200000 {
Never tested
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 95
Quoted 1 line
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +1
-0+ status = "okay";
Drop
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 97
Quoted 2 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +2
-0+ compatible = "bst,dwcmshc-sdhci"; + reg-names = "base";
Follow DTS coding style for order and naming style.
Quoted 8 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +8
-0+ reg = <0x0 0x22200000 0x0 0x1000>; + interrupts = <0x0 0x90 0x4>; + interrupt-names = "IRQDWMMC0"; + #address-cells = <0x2>; + #size-cells = <0x0>; + clock-frequency = <200000000>; + max-frequency = <200000000>; + mmc_crm_base = <0x23006000>;
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 115
Quoted 10 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +10
-0+ mmc_crm_size = <0x1000>; + fifo-depth = <0x400>; + bus-width = <8>; + non-removable; + sdhci,auto-cmd12; + dma-coherent; + memory-region = <&mmc_dma_buf>; + }; + +additionalProperties: true
This cannot be true. Do you see any device binding like that? No. This means you are doing something completely different. Please do not reinvent this but take latest reviewed binding and customize it.
Quoted 1 line
\ No newline at end of file
You have patch warnings.
Best regards,
Krzysztof