Add mmc support for dm814x and dra62x
Subsystems (6)
Tony Lindgren
maintainercover Add mmc support for dm814x and dra62x
Hi,
These patches add mmc support for dm814x and dra62x. These patches depend on what's listed at:
http://marc.info/?l=linux-omap&m=144918431819264&w=2
Regards,
Tony
Tony Lindgren (7):
ARM: dts: Add pinctrl macros for dm814x
ARM: dts: Update edma bindings on dm814x to use edma_xbar
ARM: OMAP2+: Add mmc hwmod entries for dm814x
ARM: dts: Add mmc device entries for dm814x
ARM: dts: Add mmc support for dm8148-evm
ARM: dts: Add mmc support for dra62x j5-eco evm
ARM: dts: Enable emmc on hp t410
arch/arm/boot/dts/dm8148-evm.dts | 31 +++++++++ arch/arm/boot/dts/dm8148-t410.dts | 35 ++++++++++ arch/arm/boot/dts/dm814x.dtsi | 101 +++++++++++++++++++++++++---- arch/arm/boot/dts/dra62x-j5eco-evm.dts | 31 +++++++++ arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 93 +++++++++++++++++++++++--- include/dt-bindings/pinctrl/dm814x.h | 48 ++++++++++++++ include/dt-bindings/pinctrl/omap.h | 1 + 7 files changed, 319 insertions(+), 21 deletions(-) create mode 100644 include/dt-bindings/pinctrl/dm814x.h
Signature · 1 line
2.6.2
Tony Lindgren
maintainerPATCH 1/7 ARM: dts: Add pinctrl macros for dm814x
Let's add the DM814X_IOPAD macro the same way as we have for dm816x and am33xx as this allows comparing the registers with the documentation easily. The pinctrl bits are yet again different on dm814x.
--- arch/arm/boot/dts/dm814x.dtsi | 2 +- include/dt-bindings/pinctrl/dm814x.h | 48 ++++++++++++++++++++++++++++++++++++ include/dt-bindings/pinctrl/omap.h | 1 + 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/pinctrl/dm814x.h
arch/arm/boot/dts/dm814x.dtsi +1 -1
@@ -5,7 +5,7 @@ */ #include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/pinctrl/omap.h> +#include <dt-bindings/pinctrl/dm814x.h> #include "skeleton.dtsi"
include/dt-bindings/pinctrl/dm814x.h new file +48 -0
48 lines not on this page · raw message
include/dt-bindings/pinctrl/omap.h +1 -0
@@ -61,6 +61,7 @@#define OMAP3430_CORE2_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x25d8) (val)#define OMAP3630_CORE2_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x25a0) (val)#define OMAP3_WKUP_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x2a00) (val) +#define DM814X_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)#define DM816X_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)#define AM33XX_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)#define AM4372_IOPAD (pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
Signature · 1 line
2.6.2
Tony Lindgren
maintainerPATCH 2/7 ARM: dts: Update edma bindings on dm814x to use edma_xbar
In reply to Tony LindgrenThe edma is the same as on am33xx, except it has four tptc instances. And we need the edma_xbar for at least mmc3, so let's use the edma_xbar and the new binding as suggested by Peter Ujfalusi <[email protected]>.
--- arch/arm/boot/dts/dm814x.dtsi | 68 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 10 deletions(-)
arch/arm/boot/dts/dm814x.dtsi +58 -10
@@ -126,8 +126,8 @@ interrupts = <65>; ti,spi-num-cs = <4>; ti,hwmods = "mcspi1"; - dmas = <&edma 16 &edma 17 - &edma 18 &edma 19>; + dmas = <&edma 16 0 &edma 17 0 + &edma 18 0 &edma 19 0>; dma-names = "tx0", "rx0", "tx1", "rx1"; };
@@ -145,7 +145,7 @@ reg = <0x20000 0x2000>; clock-frequency = <48000000>; interrupts = <72>; - dmas = <&edma 26 &edma 27>; + dmas = <&edma 26 0 &edma 27 0>; dma-names = "tx", "rx"; };
@@ -155,7 +155,7 @@ reg = <0x22000 0x2000>; clock-frequency = <48000000>; interrupts = <73>; - dmas = <&edma 28 &edma 29>; + dmas = <&edma 28 0 &edma 29 0>; dma-names = "tx", "rx"; };
@@ -165,7 +165,7 @@ reg = <0x24000 0x2000>; clock-frequency = <48000000>; interrupts = <74>; - dmas = <&edma 30 &edma 31>; + dmas = <&edma 30 0 &edma 31 0>; dma-names = "tx", "rx"; };
@@ -205,6 +205,14 @@ }; }; + edma_xbar: dma-router at f90 { + compatible = "ti,am335x-edma-crossbar"; + reg = <0xf90 0x40>; + #dma-cells = <3>; + dma-requests = <32>; + dma-masters = <&edma>; + }; + /* * Note that silicon revision 2.1 and older * require input enabled (bit 18 set) for all
@@ -272,12 +280,52 @@ }; edma: edma at 49000000 { - compatible = "ti,edma3"; - ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; - reg = <0x49000000 0x10000>, - <0x44e10f90 0x40>; + compatible = "ti,edma3-tpcc"; + ti,hwmods = "tpcc"; + reg = <0x49000000 0x10000>; + reg-names = "edma3_cc"; interrupts = <12 13 14>; - #dma-cells = <1>; + interrupt-names = "edma3_ccint", "emda3_mperr", + "edma3_ccerrint"; + dma-requests = <64>; + #dma-cells = <2>; + + ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 5>, + <&edma_tptc2 3>, <&edma_tptc3 0>; + + ti,edma-memcpy-channels = /bits/ 16 <20 21>; + }; + + edma_tptc0: tptc at 49800000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc0"; + reg = <0x49800000 0x100000>; + interrupts = <112>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc1: tptc at 49900000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc1"; + reg = <0x49900000 0x100000>; + interrupts = <113>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc2: tptc at 49a00000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc2"; + reg = <0x49a00000 0x100000>; + interrupts = <114>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc3: tptc at 49b00000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc3"; + reg = <0x49b00000 0x100000>; + interrupts = <115>; + interrupt-names = "edma3_tcerrint"; }; /* See TRM "Table 1-318. L4HS Instance Summary" */
Signature · 1 line
2.6.2
PATCH 2/7 ARM: dts: Update edma bindings on dm814x to use edma_xbar
Quoted 7 lines · Tony Lindgren
The edma is the same as on am33xx, except it has four tptc instances. And we need the
edma_xbarfor at least mmc3, so let's use theedma_xbarand the new binding as suggested by Peter Ujfalusi <[email protected]>.Cc Peter Ujfalusi <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
Quoted 120 lines
--- arch/arm/boot/dts/dm814x.dtsi | 68 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 10 deletions(-)arch/arm/boot/dts/dm814x.dtsi +58
-10@@ -126,8 +126,8 @@ interrupts = <65>; ti,spi-num-cs = <4>; ti,hwmods = "mcspi1"; - dmas = <&edma 16 &edma 17 - &edma 18 &edma 19>; + dmas = <&edma 16 0 &edma 17 0 + &edma 18 0 &edma 19 0>; dma-names = "tx0", "rx0", "tx1", "rx1"; };@@ -145,7 +145,7 @@ reg = <0x20000 0x2000>; clock-frequency = <48000000>; interrupts = <72>; - dmas = <&edma 26 &edma 27>; + dmas = <&edma 26 0 &edma 27 0>; dma-names = "tx", "rx"; };@@ -155,7 +155,7 @@ reg = <0x22000 0x2000>; clock-frequency = <48000000>; interrupts = <73>; - dmas = <&edma 28 &edma 29>; + dmas = <&edma 28 0 &edma 29 0>; dma-names = "tx", "rx"; };@@ -165,7 +165,7 @@ reg = <0x24000 0x2000>; clock-frequency = <48000000>; interrupts = <74>; - dmas = <&edma 30 &edma 31>; + dmas = <&edma 30 0 &edma 31 0>; dma-names = "tx", "rx"; };@@ -205,6 +205,14 @@ }; }; + edma_xbar: dma-router at f90 { + compatible = "ti,am335x-edma-crossbar"; + reg = <0xf90 0x40>; + #dma-cells = <3>; + dma-requests = <32>; + dma-masters = <&edma>; + }; + /* * Note that silicon revision 2.1 and older * require input enabled (bit 18 set) for all@@ -272,12 +280,52 @@ }; edma: edma at 49000000 { - compatible = "ti,edma3"; - ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; - reg = <0x49000000 0x10000>, - <0x44e10f90 0x40>; + compatible = "ti,edma3-tpcc"; + ti,hwmods = "tpcc"; + reg = <0x49000000 0x10000>; + reg-names = "edma3_cc"; interrupts = <12 13 14>; - #dma-cells = <1>; + interrupt-names = "edma3_ccint", "emda3_mperr", + "edma3_ccerrint"; + dma-requests = <64>; + #dma-cells = <2>; + + ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 5>, + <&edma_tptc2 3>, <&edma_tptc3 0>; + + ti,edma-memcpy-channels = /bits/ 16 <20 21>; + }; + + edma_tptc0: tptc at 49800000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc0"; + reg = <0x49800000 0x100000>; + interrupts = <112>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc1: tptc at 49900000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc1"; + reg = <0x49900000 0x100000>; + interrupts = <113>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc2: tptc at 49a00000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc2"; + reg = <0x49a00000 0x100000>; + interrupts = <114>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc3: tptc at 49b00000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc3"; + reg = <0x49b00000 0x100000>; + interrupts = <115>; + interrupt-names = "edma3_tcerrint"; }; /* See TRM "Table 1-318. L4HS Instance Summary" */
Signature · 1 line
P?ter
Tony Lindgren
maintainerPATCH 3/7 ARM: OMAP2+: Add mmc hwmod entries for dm814x
In reply to Tony LindgrenLet's add mmc entries for dm814x. To do that, we need to rename some entries to be common for 81xx.
--- arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 93 ++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/omap_hwmod_81xx_data.c +83 -10
@@ -912,7 +912,7 @@ static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = { .user = OCP_USER_MPU, }; -static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = { +static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = { .rev_offs =0x0 , .sysc_offs =0x110 , .syss_offs =0x114 ,
@@ -923,24 +923,94 @@ static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = { .sysc_fields = &omap_hwmod_sysc_type1, }; -static struct omap_hwmod_class dm816x_mmc_class = { +static struct omap_hwmod_class dm81xx_mmc_class = { .name ="mmc" , - .sysc = &dm816x_mmc_sysc, + .sysc = &dm81xx_mmc_sysc, }; -static struct omap_hwmod_opt_clk dm816x_mmc1_opt_clks[] = { +static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = { { .role ="dbck" , .clk ="sysclk18_ck" , }, }; -static struct omap_hsmmc_dev_attr mmc1_dev_attr = { - .flags =OMAP_HSMMC_SUPPORTS_DUAL_VOLT , +static struct omap_hsmmc_dev_attr mmc_dev_attr = { +}; + +static struct omap_hwmod dm814x_mmc1_hwmod = { + .name ="mmc1" , + .clkdm_name ="alwon_l3s_clkdm" , + .opt_clks = dm81xx_mmc_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dm81xx_mmc_opt_clks), + .main_clk ="sysclk8_ck" , + .prcm = { + .omap4 = { + .clkctrl_offs =DM814X_CM_ALWON_MMCHS_0_CLKCTRL , + .modulemode =MODULEMODE_SWCTRL , + }, + }, + .dev_attr = &mmc_dev_attr, + .class = &dm81xx_mmc_class, +}; + +static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = { + .master = &dm81xx_l4_ls_hwmod, + .slave = &dm814x_mmc1_hwmod, + .clk ="sysclk6_ck" , + .user =OCP_USER_MPU , + .flags =OMAP_FIREWALL_L4 +}; + +static struct omap_hwmod dm814x_mmc2_hwmod = { + .name ="mmc2" , + .clkdm_name ="alwon_l3s_clkdm" , + .opt_clks = dm81xx_mmc_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dm81xx_mmc_opt_clks), + .main_clk ="sysclk8_ck" , + .prcm = { + .omap4 = { + .clkctrl_offs =DM814X_CM_ALWON_MMCHS_1_CLKCTRL , + .modulemode =MODULEMODE_SWCTRL , + }, + }, + .dev_attr = &mmc_dev_attr, + .class = &dm81xx_mmc_class, +}; + +static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = { + .master = &dm81xx_l4_ls_hwmod, + .slave = &dm814x_mmc2_hwmod, + .clk ="sysclk6_ck" , + .user =OCP_USER_MPU , + .flags =OMAP_FIREWALL_L4 +}; + +static struct omap_hwmod dm814x_mmc3_hwmod = { + .name ="mmc3" , + .clkdm_name ="alwon_l3_med_clkdm" , + .opt_clks = dm81xx_mmc_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dm81xx_mmc_opt_clks), + .main_clk ="sysclk8_ck" , + .prcm = { + .omap4 = { + .clkctrl_offs =DM814X_CM_ALWON_MMCHS_2_CLKCTRL , + .modulemode =MODULEMODE_SWCTRL , + }, + }, + .dev_attr = &mmc_dev_attr, + .class = &dm81xx_mmc_class, +}; + +static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = { + .master = &dm81xx_alwon_l3_med_hwmod, + .slave = &dm814x_mmc3_hwmod, + .clk ="sysclk4_ck" , + .user =OCP_USER_MPU , };static struct omap_hwmod dm816x_mmc1_hwmod = { .name ="mmc1" , .clkdm_name ="alwon_l3s_clkdm" , - .opt_clks = dm816x_mmc1_opt_clks, - .opt_clks_cnt =ARRAY_SIZE (dm816x_mmc1_opt_clks), + .opt_clks = dm81xx_mmc_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dm81xx_mmc_opt_clks), .main_clk ="sysclk10_ck" , .prcm = { .omap4 = {
@@ -948,8 +1018,8 @@ static struct omap_hwmod dm816x_mmc1_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &mmc1_dev_attr, - .class = &dm816x_mmc_class, + .dev_attr = &mmc_dev_attr, + .class = &dm81xx_mmc_class, }; static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
@@ -1252,6 +1322,8 @@ static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = { &dm81xx_l4_ls__gpio2, &dm81xx_l4_ls__elm, &dm81xx_l4_ls__mcspi1, + &dm814x_l4_ls__mmc1, + &dm814x_l4_ls__mmc2, &dm81xx_alwon_l3_fast__tpcc, &dm81xx_alwon_l3_fast__tptc0, &dm81xx_alwon_l3_fast__tptc1,
@@ -1265,6 +1337,7 @@ static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = { &dm814x_l4_ls__timer2, &dm814x_l4_hs__cpgmac0, &dm814x_cpgmac0__mdio, + &dm814x_alwon_l3_med__mmc3, NULL, };
Signature · 1 line
2.6.2
Tony Lindgren
maintainerPATCH 4/7 ARM: dts: Add mmc device entries for dm814x
In reply to Tony LindgrenAdd mmc device entries for dm814x.
--- arch/arm/boot/dts/dm814x.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/dm814x.dtsi +31 -0
@@ -183,6 +183,28 @@ ti,hwmods = "timer3"; }; + mmc1: mmc at 60000 { + compatible = "ti,omap4-hsmmc"; + ti,hwmods = "mmc1"; + dmas = <&edma 24 0 + &edma 25 0>; + dma-names = "tx", "rx"; + interrupts = <64>; + interrupt-parent = <&intc>; + reg = <0x60000 0x1000>; + }; + + mmc2: mmc at 1d8000 { + compatible = "ti,omap4-hsmmc"; + ti,hwmods = "mmc2"; + dmas = <&edma 2 0 + &edma 3 0>; + dma-names = "tx", "rx"; + interrupts = <28>; + interrupt-parent = <&intc>; + reg = <0x1d8000 0x1000>; + }; + control: control at 140000 { compatible = "ti,dm814-scm", "simple-bus"; reg = <0x140000 0x20000>;
@@ -279,6 +301,15 @@ reg = <0x48200000 0x1000>; }; + /* Board must configure evtmux with edma_xbar for EDMA */ + mmc3: mmc at 47810000 { + compatible = "ti,omap4-hsmmc"; + ti,hwmods = "mmc3"; + interrupts = <29>; + interrupt-parent = <&intc>; + reg = <0x47810000 0x1000>; + }; + edma: edma at 49000000 { compatible = "ti,edma3-tpcc"; ti,hwmods = "tpcc";
Signature · 1 line
2.6.2
Tony Lindgren
maintainerPATCH 5/7 ARM: dts: Add mmc support for dm8148-evm
In reply to Tony LindgrenThere is a mmc slot on the dm8148-evm that's wired to the sd_1 interface.
--- arch/arm/boot/dts/dm8148-evm.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/dm8148-evm.dts +31 -0
@@ -15,6 +15,14 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + /* MIC94060YC6 controlled by SD1_POW pin */ + vmmcsd_fixed: fixedregulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; &cpsw_emac0 {
@@ -26,3 +34,26 @@ phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii"; }; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&sd1_pins>; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <4>; + cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; +}; + +&pincntl { + sd1_pins: pinmux_sd1_pins { + pinctrl-single,pins = < + DM814X_IOPAD(0x0800, PIN_INPUT | 0x1) /* SD1_CLK */ + DM814X_IOPAD(0x0804, PIN_INPUT_PULLUP | 0x1) /* SD1_CMD */ + DM814X_IOPAD(0x0808, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[0] */ + DM814X_IOPAD(0x080c, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[1] */ + DM814X_IOPAD(0x0810, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[2] */ + DM814X_IOPAD(0x0814, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[3] */ + DM814X_IOPAD(0x0924, PIN_OUTPUT | 0x40) /* SD1_POW */ + DM814X_IOPAD(0x093C, PIN_INPUT_PULLUP | 0x80) /* GP1[6] */ + >; + }; +};
Signature · 1 line
2.6.2
Tony Lindgren
maintainerPATCH 6/7 ARM: dts: Add mmc support for dra62x j5-eco evm
In reply to Tony LindgrenThere's mmc interface on j5-eco evm that's wired to the sd_1 interface.
--- arch/arm/boot/dts/dra62x-j5eco-evm.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/dra62x-j5eco-evm.dts +31 -0
@@ -15,6 +15,14 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + /* MIC94060YC6 controlled by SD1_POW pin */ + vmmcsd_fixed: fixedregulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; &cpsw_emac0 {
@@ -26,3 +34,26 @@ phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii"; }; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&sd1_pins>; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <4>; + cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; +}; + +&pincntl { + sd1_pins: pinmux_sd1_pins { + pinctrl-single,pins = < + DM814X_IOPAD(0x0800, PIN_INPUT | 0x1) /* SD1_CLK */ + DM814X_IOPAD(0x0804, PIN_INPUT_PULLUP | 0x1) /* SD1_CMD */ + DM814X_IOPAD(0x0808, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[0] */ + DM814X_IOPAD(0x080c, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[1] */ + DM814X_IOPAD(0x0810, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[2] */ + DM814X_IOPAD(0x0814, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[3] */ + DM814X_IOPAD(0x0924, PIN_OUTPUT | 0x40) /* SD1_POW */ + DM814X_IOPAD(0x093C, PIN_INPUT_PULLUP | 0x80) /* GP1[6] */ + >; + }; +};
Signature · 1 line
2.6.2
Tony Lindgren
maintainerPATCH 7/7 ARM: dts: Enable emmc on hp t410
In reply to Tony LindgrenThere's a 2GB emmc on hp t410 that's wired to the sd_2 interface. Note that we also need to configure the evtmux using edma_xbar for edma channels.
--- arch/arm/boot/dts/dm8148-t410.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/boot/dts/dm8148-t410.dts +35 -0
@@ -15,6 +15,13 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + vmmcsd_fixed: fixedregulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; &cpsw_emac0 {
@@ -26,3 +33,31 @@ phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii"; }; + +&mmc3 { + pinctrl-names = "default"; + pinctrl-0 = <&sd2_pins>; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <8>; + dmas = <&edma_xbar 8 0 1 /* use SDTXEVT1 instead of MCASP0TX */ + &edma_xbar 9 0 2>; /* use SDRXEVT1 instead of MCASP0RX */ + dma-names = "tx", "rx"; +}; + +&pincntl { + sd2_pins: pinmux_sd2_pins { + pinctrl-single,pins = < + DM814X_IOPAD(0x09c0, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[7] */ + DM814X_IOPAD(0x09c4, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[6] */ + DM814X_IOPAD(0x09c8, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[5] */ + DM814X_IOPAD(0x09cc, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[4] */ + DM814X_IOPAD(0x09d0, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[3] */ + DM814X_IOPAD(0x09d4, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[2] */ + DM814X_IOPAD(0x09d8, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[1] */ + DM814X_IOPAD(0x09dc, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[0] */ + DM814X_IOPAD(0x09e0, PIN_INPUT | 0x1) /* SD2_CLK */ + DM814X_IOPAD(0x09f4, PIN_INPUT_PULLUP | 0x2) /* SD2_CMD */ + DM814X_IOPAD(0x0920, PIN_INPUT | 40) /* SD2_SDCD */ + >; + }; +};
Signature · 1 line
2.6.2
PATCH 7/7 ARM: dts: Enable emmc on hp t410
Quoted 5 lines · Tony Lindgren
There's a 2GB emmc on hp t410 that's wired to the
sd_2interface. Note that we also need to configure the evtmux usingedma_xbarfor edma channels.Signed-off-by Tony Lindgren <[email protected]>
One question inlined for the mmc3, other than that:
Quoted 25 lines
--- arch/arm/boot/dts/dm8148-t410.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)arch/arm/boot/dts/dm8148-t410.dts +7
-0@@ -15,6 +15,13 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + vmmcsd_fixed: fixedregulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; &cpsw_emac0 {@@ -26,3 +33,31 @@ phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii";
arch/arm/boot/dts/dm8148-t410.dts line 44
Quoted 10 lines
arch/arm/boot/dts/dm8148-t410.dts +9
-0}; + +&mmc3 { + pinctrl-names = "default"; + pinctrl-0 = <&sd2_pins>; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <8>; + dmas = <&edma_xbar 8 0 1 /* use SDTXEVT1 instead of MCASP0TX */ + &edma_xbar 9 0 2>; /* use SDRXEVT1 instead of MCASP0RX */ + dma-names = "tx", "rx";
Do you happened to know how the audio is connected on the board? The DM814x-EVM seams to be using McASP2 with aic3106 so it is possible that HP copied the design from there...
Quoted 20 lines
arch/arm/boot/dts/dm8148-t410.dts +19
-0+}; + +&pincntl { + sd2_pins: pinmux_sd2_pins { + pinctrl-single,pins = < + DM814X_IOPAD(0x09c0, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[7] */ + DM814X_IOPAD(0x09c4, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[6] */ + DM814X_IOPAD(0x09c8, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[5] */ + DM814X_IOPAD(0x09cc, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[4] */ + DM814X_IOPAD(0x09d0, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[3] */ + DM814X_IOPAD(0x09d4, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[2] */ + DM814X_IOPAD(0x09d8, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[1] */ + DM814X_IOPAD(0x09dc, PIN_INPUT_PULLUP | 0x1) /* SD2_DAT[0] */ + DM814X_IOPAD(0x09e0, PIN_INPUT | 0x1) /* SD2_CLK */ + DM814X_IOPAD(0x09f4, PIN_INPUT_PULLUP | 0x2) /* SD2_CMD */ + DM814X_IOPAD(0x0920, PIN_INPUT | 40) /* SD2_SDCD */ + >; + }; +};
Signature · 1 line
P?ter
Tony Lindgren
maintainerPATCH 7/7 ARM: dts: Enable emmc on hp t410
Quoted 41 lines · Peter Ujfalusi
Quoted 5 lines · Tony Lindgren
There's a 2GB emmc on hp t410 that's wired to the
sd_2interface. Note that we also need to configure the evtmux usingedma_xbarfor edma channels.Signed-off-by Tony Lindgren <[email protected]>One question inlined for the mmc3, other than that:
Reviewed-by Peter Ujfalusi <[email protected]>Quoted 31 lines
--- arch/arm/boot/dts/dm8148-t410.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)arch/arm/boot/dts/dm8148-t410.dts +12
-0@@ -15,6 +15,13 @@ device_type = "memory"; reg = <0x80000000 0x40000000>; /* 1 GB */ }; + + vmmcsd_fixed: fixedregulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; &cpsw_emac0 {@@ -26,3 +33,31 @@ phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii"; }; + +&mmc3 { + pinctrl-names = "default"; + pinctrl-0 = <&sd2_pins>; + vmmc-supply = <&vmmcsd_fixed>;
Quoted 8 lines
arch/arm/boot/dts/dm8148-t410.dts line 44
Quoted 4 lines
arch/arm/boot/dts/dm8148-t410.dts +4
-0+ bus-width = <8>; + dmas = <&edma_xbar 8 0 1 /* use SDTXEVT1 instead of MCASP0TX */ + &edma_xbar 9 0 2>; /* use SDRXEVT1 instead of MCASP0RX */ + dma-names = "tx", "rx";Do you happened to know how the audio is connected on the board? The DM814x-EVM seams to be using McASP2 with aic3106 so it is possible that HP copied the design from there...
I grepped the sources for it and these are the evtmux channels the original code is using. So maybe they have some different audio setup, the hacks in the original board file mention "hdmi-dai".
Regards,
Tony