Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mmc: sdhci-sprd: convert to YAML

Covert the Spreadtrum SDHCI controller bindings to DT schema.
Rename the file to match compatible. Drop assigned-* properties as
these should not be needed.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Link: https://lore.kernel.org/r/ZozY+tOkzK9yfjbo@standask-GA-A55M-S2HP
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Stanislav Jakubek and committed by
Ulf Hansson
cb1f1c7d ca04fff3

+112 -67
-67
Documentation/devicetree/bindings/mmc/sdhci-sprd.txt
··· 1 - * Spreadtrum SDHCI controller (sdhci-sprd) 2 - 3 - The Secure Digital (SD) Host controller on Spreadtrum SoCs provides an interface 4 - for MMC, SD and SDIO types of cards. 5 - 6 - This file documents differences between the core properties in mmc.txt 7 - and the properties used by the sdhci-sprd driver. 8 - 9 - Required properties: 10 - - compatible: Should contain "sprd,sdhci-r11". 11 - - reg: physical base address of the controller and length. 12 - - interrupts: Interrupts used by the SDHCI controller. 13 - - clocks: Should contain phandle for the clock feeding the SDHCI controller 14 - - clock-names: Should contain the following: 15 - "sdio" - SDIO source clock (required) 16 - "enable" - gate clock which used for enabling/disabling the device (required) 17 - "2x_enable" - gate clock controlling the device for some special platforms (optional) 18 - 19 - Optional properties: 20 - - assigned-clocks: the same with "sdio" clock 21 - - assigned-clock-parents: the default parent of "sdio" clock 22 - - pinctrl-names: should be "default", "state_uhs" 23 - - pinctrl-0: should contain default/high speed pin control 24 - - pinctrl-1: should contain uhs mode pin control 25 - 26 - PHY DLL delays are used to delay the data valid window, and align the window 27 - to sampling clock. PHY DLL delays can be configured by following properties, 28 - and each property contains 4 cells which are used to configure the clock data 29 - write line delay value, clock read command line delay value, clock read data 30 - positive edge delay value and clock read data negative edge delay value. 31 - Each cell's delay value unit is cycle of the PHY clock. 32 - 33 - - sprd,phy-delay-legacy: Delay value for legacy timing. 34 - - sprd,phy-delay-sd-highspeed: Delay value for SD high-speed timing. 35 - - sprd,phy-delay-sd-uhs-sdr50: Delay value for SD UHS SDR50 timing. 36 - - sprd,phy-delay-sd-uhs-sdr104: Delay value for SD UHS SDR50 timing. 37 - - sprd,phy-delay-mmc-highspeed: Delay value for MMC high-speed timing. 38 - - sprd,phy-delay-mmc-ddr52: Delay value for MMC DDR52 timing. 39 - - sprd,phy-delay-mmc-hs200: Delay value for MMC HS200 timing. 40 - - sprd,phy-delay-mmc-hs400: Delay value for MMC HS400 timing. 41 - - sprd,phy-delay-mmc-hs400es: Delay value for MMC HS400 enhanced strobe timing. 42 - 43 - Examples: 44 - 45 - sdio0: sdio@20600000 { 46 - compatible = "sprd,sdhci-r11"; 47 - reg = <0 0x20600000 0 0x1000>; 48 - interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 49 - 50 - clock-names = "sdio", "enable"; 51 - clocks = <&ap_clk CLK_EMMC_2X>, 52 - <&apahb_gate CLK_EMMC_EB>; 53 - assigned-clocks = <&ap_clk CLK_EMMC_2X>; 54 - assigned-clock-parents = <&rpll CLK_RPLL_390M>; 55 - 56 - pinctrl-names = "default", "state_uhs"; 57 - pinctrl-0 = <&sd0_pins_default>; 58 - pinctrl-1 = <&sd0_pins_uhs>; 59 - 60 - sprd,phy-delay-sd-uhs-sdr104 = <0x3f 0x7f 0x2e 0x2e>; 61 - bus-width = <8>; 62 - non-removable; 63 - no-sdio; 64 - no-sd; 65 - cap-mmc-hw-reset; 66 - status = "okay"; 67 - };
+112
Documentation/devicetree/bindings/mmc/sprd,sdhci-r11.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mmc/sprd,sdhci-r11.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Spreadtrum SDHCI controller 8 + 9 + maintainers: 10 + - Orson Zhai <orsonzhai@gmail.com> 11 + - Baolin Wang <baolin.wang7@gmail.com> 12 + - Chunyan Zhang <zhang.lyra@gmail.com> 13 + 14 + properties: 15 + compatible: 16 + const: sprd,sdhci-r11 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + interrupts: 22 + maxItems: 1 23 + 24 + clocks: 25 + minItems: 2 26 + items: 27 + - description: SDIO source clock 28 + - description: gate clock for enabling/disabling the device 29 + - description: gate clock controlling the device for some special platforms (optional) 30 + 31 + clock-names: 32 + minItems: 2 33 + items: 34 + - const: sdio 35 + - const: enable 36 + - const: 2x_enable 37 + 38 + pinctrl-0: 39 + description: default/high speed pin control 40 + maxItems: 1 41 + 42 + pinctrl-1: 43 + description: UHS mode pin control 44 + maxItems: 1 45 + 46 + pinctrl-names: 47 + minItems: 1 48 + items: 49 + - const: default 50 + - const: state_uhs 51 + 52 + patternProperties: 53 + "^sprd,phy-delay-(legacy|mmc-(ddr52|highspeed|hs[24]00|hs400es)|sd-(highspeed|uhs-sdr(50|104)))$": 54 + $ref: /schemas/types.yaml#/definitions/uint32-array 55 + items: 56 + - description: clock data write line delay value 57 + - description: clock read command line delay value 58 + - description: clock read data positive edge delay value 59 + - description: clock read data negative edge delay value 60 + description: 61 + PHY DLL delays are used to delay the data valid window, and align 62 + the window to the sampling clock. Each cell's delay value unit is 63 + cycle of the PHY clock. 64 + 65 + required: 66 + - compatible 67 + - reg 68 + - interrupts 69 + - clocks 70 + - clock-names 71 + 72 + allOf: 73 + - $ref: sdhci-common.yaml# 74 + 75 + unevaluatedProperties: false 76 + 77 + examples: 78 + - | 79 + #include <dt-bindings/clock/sprd,sc9860-clk.h> 80 + #include <dt-bindings/interrupt-controller/arm-gic.h> 81 + #include <dt-bindings/interrupt-controller/irq.h> 82 + 83 + mmc@50430000 { 84 + compatible = "sprd,sdhci-r11"; 85 + reg = <0x50430000 0x1000>; 86 + interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; 87 + 88 + clocks = <&aon_prediv CLK_EMMC_2X>, 89 + <&apahb_gate CLK_EMMC_EB>, 90 + <&aon_gate CLK_EMMC_2X_EN>; 91 + clock-names = "sdio", "enable", "2x_enable"; 92 + 93 + pinctrl-0 = <&sd0_pins_default>; 94 + pinctrl-1 = <&sd0_pins_uhs>; 95 + pinctrl-names = "default", "state_uhs"; 96 + 97 + bus-width = <8>; 98 + cap-mmc-hw-reset; 99 + mmc-hs400-enhanced-strobe; 100 + mmc-hs400-1_8v; 101 + mmc-hs200-1_8v; 102 + mmc-ddr-1_8v; 103 + non-removable; 104 + no-sdio; 105 + no-sd; 106 + 107 + sprd,phy-delay-mmc-ddr52 = <0x3f 0x75 0x14 0x14>; 108 + sprd,phy-delay-mmc-hs200 = <0x0 0x8c 0x8c 0x8c>; 109 + sprd,phy-delay-mmc-hs400 = <0x44 0x7f 0x2e 0x2e>; 110 + sprd,phy-delay-mmc-hs400es = <0x3f 0x3f 0x2e 0x2e>; 111 + }; 112 + ...