Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f217794 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

mmc: dt: Consolidate DT bindings



This patch unifies the current DT MMC bindings documentation and code,
adds generic MMC DT bindings documentation, and updates .dts files for
consistency.

[cjb: typo fixes, addition of max-frequency property]
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent e6511df4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -11,9 +11,11 @@ Required properties:
  - interrupt-parent : interrupt source phandle.
  - clock-frequency : specifies eSDHC base clock frequency.
  - sdhci,wp-inverted : (optional) specifies that eSDHC controller
    reports inverted write-protect state;
    reports inverted write-protect state; New devices should use
    the generic "wp-inverted" property.
  - sdhci,1-bit-only : (optional) specifies that a controller can
    only handle 1-bit data transfers.
    only handle 1-bit data transfers. New devices should use the
    generic "bus-width = <1>" property.
  - sdhci,auto-cmd12: (optional) specifies that a controller can
    only handle auto CMD12.

+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ Required properties:
- interrupts : Should contain eSDHC interrupt

Optional properties:
- fsl,card-wired : Indicate the card is wired to host permanently
- non-removable : Indicate the card is wired to host permanently
- fsl,cd-internal : Indicate to use controller internal card detection
- fsl,wp-internal : Indicate to use controller internal write protection
- cd-gpios : Specify GPIOs for card detection
+2 −1
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@ Required properties:

Optional properties:
- gpios : may specify GPIOs in this order: Card-Detect GPIO,
  Write-Protect GPIO.
  Write-Protect GPIO. Note that this does not follow the
  binding from mmc.txt, for historic reasons.
- interrupts : the interrupt of a card detect interrupt.
- interrupt-parent : the phandle for the interrupt controller that
  services interrupts for this device.
+27 −0
Original line number Diff line number Diff line
These properties are common to multiple MMC host controllers. Any host
that requires the respective functionality should implement them using
these definitions.

Required properties:
- bus-width: Number of data lines, can be <1>, <4>, or <8>

Optional properties:
- cd-gpios : Specify GPIOs for card detection, see gpio binding
- wp-gpios : Specify GPIOs for write protection, see gpio binding
- cd-inverted: when present, polarity on the wp gpio line is inverted
- wp-inverted: when present, polarity on the wp gpio line is inverted
- non-removable: non-removable slot (like eMMC)
- max-frequency: maximum operating clock frequency

Example:

sdhci@ab000000 {
	compatible = "sdhci";
	reg = <0xab000000 0x200>;
	interrupts = <23>;
	bus-width = <4>;
	cd-gpios = <&gpio 69 0>;
	cd-inverted;
	wp-gpios = <&gpio 70 0>;
	max-frequency = <50000000>;
}
+2 −2
Original line number Diff line number Diff line
@@ -7,12 +7,12 @@ Required properties:
- compatible : Should be "nvidia,<chip>-sdhci"
- reg : Should contain SD/MMC registers location and length
- interrupts : Should contain SD/MMC interrupt
- bus-width : Number of data lines, can be <1>, <4>, or <8>

Optional properties:
- cd-gpios : Specify GPIOs for card detection
- wp-gpios : Specify GPIOs for write protection
- power-gpios : Specify GPIOs for power control
- support-8bit : Boolean, indicates if 8-bit mode should be used.

Example:

@@ -23,5 +23,5 @@ sdhci@c8000200 {
	cd-gpios = <&gpio 69 0>; /* gpio PI5 */
	wp-gpios = <&gpio 57 0>; /* gpio PH1 */
	power-gpios = <&gpio 155 0>; /* gpio PT3 */
	support-8bit;
	bus-width = <8>;
};
Loading