dts: sdhc: Add SDHC DTS bindings

Add generic SDHC dts binding, as well as DTS binding for NXP USDHC.
Update iMX.RT DTS binding to use USDHC compatible

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-02-16 14:16:35 -06:00 committed by David Leach
commit 792cae9f7d
3 changed files with 146 additions and 4 deletions

View file

@ -680,21 +680,29 @@
}; };
usdhc1: usdhc@402c0000 { usdhc1: usdhc@402c0000 {
compatible = "nxp,imx-usdhc"; compatible = "nxp,imx-sdhc";
reg = <0x402c0000 0x4000>; reg = <0x402c0000 0x4000>;
status = "disabled"; status = "disabled";
interrupts = <110 0>; interrupts = <110 0>;
clocks = <&ccm IMX_CCM_USDHC1_CLK 0 0>; clocks = <&ccm IMX_CCM_USDHC1_CLK 0 0>;
label = "USDHC_1"; label = "SDHC_0";
max-current-330 = <1020>;
max-current-180 = <1020>;
max-bus-freq = <208000000>;
min-bus-freq = <400000>;
}; };
usdhc2: usdhc@402c4000 { usdhc2: usdhc@402c4000 {
compatible = "nxp,imx-usdhc"; compatible = "nxp,imx-sdhc";
reg = <0x402c4000 0x4000>; reg = <0x402c4000 0x4000>;
status = "disabled"; status = "disabled";
interrupts = <111 0>; interrupts = <111 0>;
clocks = <&ccm IMX_CCM_USDHC2_CLK 0 0>; clocks = <&ccm IMX_CCM_USDHC2_CLK 0 0>;
label = "USDHC_2"; label = "SDHC_1";
max-current-330 = <120>;
max-current-180 = <45>;
max-bus-freq = <198000000>;
min-bus-freq = <400000>;
}; };
csi: csi@402bc000 { csi: csi@402bc000 {

View file

@ -0,0 +1,79 @@
# Copyright (c) 2022, NXP
# SPDX-License-Identifier: Apache-2.0
description: NXP imx USDHC controller
compatible: "nxp,imx-sdhc"
include: [sdhc.yaml, pinctrl-device.yaml]
properties:
reg:
required: true
label:
required: true
data-timeout:
type: int
required: false
default: 0xF
description: |
Data timeout, as multiple of the SD clock. See DTOCV field of USDHC
read-watermark:
type: int
required: false
default: 0x80
description: |
Number of words used as read watermark level in FIFO queue for USDHC
write-watermark:
type: int
required: false
default: 0x80
description: |
Number of words used as write watermark level in FIFO queue for USDHC
max_current_330:
type: int
required: false
default: 0
description: |
Max drive current in mA at 3.3V. A value of zero indicates no maximum
is specified by the driver.
clocks:
required: true
pwr-gpios:
type: phandle-array
required: false
description: |
Power pin
This pin defaults to active high when consumed by the SD card. The
property value should ensure the flags properly describe the signal
that is presented to the driver.
cd-gpios:
type: phandle-array
required: false
description: |
Detect pin
This pin defaults to active low when produced by the SD card. The
property value should ensure the flags properly describe the signal
that is presented to the driver.
no-1-8-v:
type: boolean
required: false
description: |
When the external SD card circuit does not support 1.8V, add this
property to disable 1.8v card voltage of SD card controller.
detect-dat3:
type: boolean
required: false
description: |
Enable the host to detect an SD card via the DAT3 line of the SD card
connection. Requires the board to define a function to pull DAT3 low or
high using pullup/pulldown resistors.

View file

@ -0,0 +1,55 @@
# Copyright (c) 2022, NXP
# SPDX-License-Identifier: Apache-2.0
# Common fields for SD host controllers
include: base.yaml
properties:
max-current-330:
type: int
required: false
default: 0
description: |
Max drive current in mA at 3.3V. A value of zero indicates no maximum
is specified by the driver.
max-current-300:
type: int
required: false
default: 0
description: |
Max drive current in mA at 3.0V. A value of zero indicates no maximum
is specified by the driver.
max-current-180:
type: int
required: false
default: 0
description: |
Max drive current in mA at 1.8V. A value of zero indicates no maximum
is specified by the driver.
max-bus-freq:
type: int
required: false
default: 400000
description: |
Maximum bus frequency for SD card. This should be the highest frequency
the SDHC is capable of negotiating with cards on the bus.
min-bus-freq:
type: int
required: false
default: 400000
description: |
Minimum bus frequency for SD card. This should be the frequency that
cards first will select when attached to the SDHC bus
power-delay-ms:
type: int
required: false
default: 500
description: |
time in ms for SDHC to delay when toggling power to the SD card. This
delay gives the card time to power up or down fully