Skip to content

Commit 035cc39

Browse files
Axe Yangstorulf
authored andcommitted
dt-bindings: mmc: mtk-sd: extend interrupts and pinctrls properties
Extend interrupts and pinctrls for SDIO wakeup interrupt feature. This feature allow SDIO devices alarm asynchronous interrupt to host even when host stop providing clock to SDIO card. An extra wakeup interrupt and pinctrl states for SDIO DAT1 pin state switching are required in this scenario. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Axe Yang <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent d2f35ed commit 035cc39

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

Documentation/devicetree/bindings/mmc/mtk-sd.yaml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,27 @@ properties:
7070
- const: ahb_cg
7171

7272
interrupts:
73-
maxItems: 1
73+
description:
74+
Should at least contain MSDC GIC interrupt. To support SDIO in-band wakeup, an extended
75+
interrupt is required and be configured as wakeup source irq.
76+
minItems: 1
77+
maxItems: 2
78+
79+
interrupt-names:
80+
items:
81+
- const: msdc
82+
- const: sdio_wakeup
7483

7584
pinctrl-names:
85+
description:
86+
Should at least contain default and state_uhs. To support SDIO in-band wakeup, dat1 pin
87+
will be switched between GPIO mode and SDIO DAT1 mode, state_eint is mandatory in this
88+
scenario.
89+
minItems: 2
7690
items:
7791
- const: default
7892
- const: state_uhs
93+
- const: state_eint
7994

8095
pinctrl-0:
8196
description:
@@ -87,6 +102,11 @@ properties:
87102
should contain uhs mode pin ctrl.
88103
maxItems: 1
89104

105+
pinctrl-2:
106+
description:
107+
should switch dat1 pin to GPIO mode.
108+
maxItems: 1
109+
90110
assigned-clocks:
91111
description:
92112
PLL of the source clock.
@@ -206,4 +226,32 @@ examples:
206226
mediatek,hs400-cmd-resp-sel-rising;
207227
};
208228
229+
mmc3: mmc@11260000 {
230+
compatible = "mediatek,mt8173-mmc";
231+
reg = <0x11260000 0x1000>;
232+
clock-names = "source", "hclk";
233+
clocks = <&pericfg CLK_PERI_MSDC30_3>,
234+
<&topckgen CLK_TOP_MSDC50_2_H_SEL>;
235+
interrupt-names = "msdc", "sdio_wakeup";
236+
interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_LOW 0>,
237+
<&pio 23 IRQ_TYPE_LEVEL_LOW>;
238+
pinctrl-names = "default", "state_uhs", "state_eint";
239+
pinctrl-0 = <&mmc2_pins_default>;
240+
pinctrl-1 = <&mmc2_pins_uhs>;
241+
pinctrl-2 = <&mmc2_pins_eint>;
242+
bus-width = <4>;
243+
max-frequency = <200000000>;
244+
cap-sd-highspeed;
245+
sd-uhs-sdr104;
246+
keep-power-in-suspend;
247+
wakeup-source;
248+
cap-sdio-irq;
249+
no-mmc;
250+
no-sd;
251+
non-removable;
252+
vmmc-supply = <&sdio_fixed_3v3>;
253+
vqmmc-supply = <&mt6397_vgp3_reg>;
254+
mmc-pwrseq = <&wifi_pwrseq>;
255+
};
256+
209257
...

0 commit comments

Comments
 (0)