[PATCHv2-modified dev-4.19 6/7] dts: Aspeed: Add devicetree for Aspeed sdhci
Alexander Amelkin
a.amelkin at yadro.com
Tue Apr 16 20:58:11 AEST 2019
From: Ryan Chen <ryanchen.aspeed at gmail.com>
Add devicetree for Aspeed's sdhci
Signed-off-by: Ryan Chen <ryanchen.aspeed at gmail.com>
---
.../bindings/mmc/aspeed,aspeed-sdhci.txt | 42 ++++++++++++++++++++++
arch/arm/boot/dts/aspeed-ast2500-evb.dts | 14 ++++++++
arch/arm/boot/dts/aspeed-g4.dtsi | 20 +++++++++++
arch/arm/boot/dts/aspeed-g5.dtsi | 20 +++++++++++
4 files changed, 96 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mmc/aspeed,aspeed-sdhci.txt
diff --git a/Documentation/devicetree/bindings/mmc/aspeed,aspeed-sdhci.txt b/Documentation/devicetree/bindings/mmc/aspeed,aspeed-sdhci.txt
new file mode 100644
index 0000000..64ca527
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/aspeed,aspeed-sdhci.txt
@@ -0,0 +1,42 @@
+Device Tree Bindings for the ASPEED SoC SDHCI Controller
+
+This file documents differences between the core properties in mmc.txt
+and the properties present in the ASPEED SDHCI
+
+Required properties:
+- compatible : should be "aspeed,ast2500-sdhci" or "aspeed,ast2400-sdhci"
+- clocks : phandle + clock specifier pair of the external clock
+- interrupts : interrupt number
+- interrupt-parent : interrupt controller for bus, should reference a
+ aspeed,aspeed-sdhci-ic interrupt controller
+
+Example:
+
+sdhci {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x1e740000 0x1000>;
+
+ sdhci_ic: interrupt-controller at 0 {
+ #interrupt-cells = <1>;
+ compatible = "aspeed,aspeed-sdhci-irq";
+ reg = <0x0 0x100>;
+ interrupts = <26>;
+ interrupt-controller;
+ clocks = <&syscon ASPEED_CLK_GATE_SDCLK>;
+ clock-names = "sdclk", "sd_extclk";
+ };
+
+ sdhci_slot0: sdhci_slot0 at 100 {
+ compatible = "aspeed,sdhci-ast2500";
+ reg = <0x100 0x100>;
+ interrupts = <0>;
+ interrupt-parent = <&sdhci_ic>;
+ slot = <0>;
+ sdhci,auto-cmd12;
+ clocks = <&syscon ASPEED_CLK_SDIO>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sd1_default>;
+ };
+};
diff --git a/arch/arm/boot/dts/aspeed-ast2500-evb.dts b/arch/arm/boot/dts/aspeed-ast2500-evb.dts
index 5dbb33c..5578ae0 100644
--- a/arch/arm/boot/dts/aspeed-ast2500-evb.dts
+++ b/arch/arm/boot/dts/aspeed-ast2500-evb.dts
@@ -97,6 +97,20 @@
};
};
+&sdhci_slot0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sd1_default>;
+};
+
+&sdhci_slot1 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sd2_default>;
+};
+
/*
* Enable port A as device (via the virtual hub) and port B as
* host by default on the eval board. This can be easily changed
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index f637a80..c9e7664 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -424,6 +424,26 @@
clocks = <&syscon ASPEED_CLK_GATE_SDCLK>;
};
+ sdhci_slot0: sdhci_slot0 at 100 {
+ compatible = "aspeed,sdhci-ast2400";
+ reg = <0x100 0x100>;
+ interrupts = <0>;
+ interrupt-parent = <&sdhci_ic>;
+ sdhci,auto-cmd12;
+ clocks = <&syscon ASPEED_CLK_SDIO>;
+ status = "disabled";
+ };
+
+ sdhci_slot1: sdhci_slot1 at 200 {
+ compatible = "aspeed,sdhci-ast2400";
+ reg = <0x200 0x100>;
+ interrupts = <1>;
+ interrupt-parent = <&sdhci_ic>;
+ sdhci,auto-cmd12;
+ clocks = <&syscon ASPEED_CLK_SDIO>;
+ status = "disabled";
+ };
+
};
&i2c {
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 53292f4..3b9dbc9 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -528,6 +528,26 @@
clocks = <&syscon ASPEED_CLK_GATE_SDCLK>;
};
+ sdhci_slot0: sdhci_slot0 at 100 {
+ compatible = "aspeed,sdhci-ast2500";
+ reg = <0x100 0x100>;
+ interrupts = <0>;
+ interrupt-parent = <&sdhci_ic>;
+ sdhci,auto-cmd12;
+ clocks = <&syscon ASPEED_CLK_SDIO>;
+ status = "disabled";
+ };
+
+ sdhci_slot1: sdhci_slot1 at 200 {
+ compatible = "aspeed,sdhci-ast2500";
+ reg = <0x200 0x100>;
+ interrupts = <1>;
+ interrupt-parent = <&sdhci_ic>;
+ sdhci,auto-cmd12;
+ clocks = <&syscon ASPEED_CLK_SDIO>;
+ status = "disabled";
+ };
+
};
&i2c {
--
2.7.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190416/2943e2f7/attachment-0001.sig>
More information about the openbmc
mailing list