<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dissonant.dev/index.php?action=history&amp;feed=atom&amp;title=Mainline%3AExynos_4%2FEMMC_and_SDHCI</id>
	<title>Mainline:Exynos 4/EMMC and SDHCI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dissonant.dev/index.php?action=history&amp;feed=atom&amp;title=Mainline%3AExynos_4%2FEMMC_and_SDHCI"/>
	<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;action=history"/>
	<updated>2026-04-15T02:20:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;diff=43&amp;oldid=prev</id>
		<title>Knuxify at 16:45, 21 January 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;diff=43&amp;oldid=prev"/>
		<updated>2025-01-21T16:45:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:45, 21 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Converting from those structs:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Converting from those structs:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;== &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_MSHC&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_MSHC&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt;: note down the GPIO and read on to “Regulator” section.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt;: note down the GPIO and read on to “Regulator” section.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;== &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_DWMCI&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_DWMCI&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Clocks are already set up&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Clocks are already set up&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;== Pinctrl &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Pinctrl ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pinctrl may need to be set up according to width; see &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; for DWMCI, &amp;lt;code&amp;gt;arch/arm/mach-exynos/setup-mshci-gpio.c&amp;lt;/code&amp;gt; for MSHCI. There are premade pinctrl defaults &amp;lt;code&amp;gt;sdX_bus1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sdX_bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sdX_bus8&amp;lt;/code&amp;gt; for width 1, 4 and 8 respectively (see midas DTSI for an example).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pinctrl may need to be set up according to width; see &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; for DWMCI, &amp;lt;code&amp;gt;arch/arm/mach-exynos/setup-mshci-gpio.c&amp;lt;/code&amp;gt; for MSHCI. There are premade pinctrl defaults &amp;lt;code&amp;gt;sdX_bus1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sdX_bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sdX_bus8&amp;lt;/code&amp;gt; for width 1, 4 and 8 respectively (see midas DTSI for an example).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Replace &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; with 0 or 4, depending on the contents of &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; (or equivalent &amp;lt;code&amp;gt;.cfg_gpio&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; struct) function: if for width 8 it does &amp;lt;code&amp;gt;s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));&amp;lt;/code&amp;gt;, then 4, else 0. (The only difference between these two is the pin-function that’s set, see &amp;lt;code&amp;gt;exynos4x12-pinctrl.dtsi&amp;lt;/code&amp;gt;.) In width 8, add both &amp;lt;code&amp;gt;bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bus8&amp;lt;/code&amp;gt; (each has 4 pins, coming together to 8 pins total).  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Replace &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; with 0 or 4, depending on the contents of &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; (or equivalent &amp;lt;code&amp;gt;.cfg_gpio&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; struct) function: if for width 8 it does &amp;lt;code&amp;gt;s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));&amp;lt;/code&amp;gt;, then 4, else 0. (The only difference between these two is the pin-function that’s set, see &amp;lt;code&amp;gt;exynos4x12-pinctrl.dtsi&amp;lt;/code&amp;gt;.) In width 8, add both &amp;lt;code&amp;gt;bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bus8&amp;lt;/code&amp;gt; (each has 4 pins, coming together to 8 pins total).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;== Regulator &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Regulator ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This depends on your device. Midas has a &amp;lt;code&amp;gt;VMEM_VDD_2.8V&amp;lt;/code&amp;gt; regulator in its PMIC, your device might have something similar - check schematics. This will have to be enabled by the GPIO listed as &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; struct, probably &amp;lt;code&amp;gt;gpk0-2&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This depends on your device. Midas has a &amp;lt;code&amp;gt;VMEM_VDD_2.8V&amp;lt;/code&amp;gt; regulator in its PMIC, your device might have something similar - check schematics. This will have to be enabled by the GPIO listed as &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; struct, probably &amp;lt;code&amp;gt;gpk0-2&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you’re unsure, or if there’s no such regulator in your case, then you can create a &amp;lt;code&amp;gt;regulator-fixed&amp;lt;/code&amp;gt; with a min/max voltage of 2.8V and enabled/disabled by said GPIO, and give &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to it, or ignore it entirely and give the &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to the &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt; node.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you’re unsure, or if there’s no such regulator in your case, then you can create a &amp;lt;code&amp;gt;regulator-fixed&amp;lt;/code&amp;gt; with a min/max voltage of 2.8V and enabled/disabled by said GPIO, and give &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to it, or ignore it entirely and give the &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to the &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt; node.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;== Timing values &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Timing values ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Timing values are written to the &amp;lt;code&amp;gt;clksel&amp;lt;/code&amp;gt; register on the MMC host, at offset &amp;lt;code&amp;gt;0x9c&amp;lt;/code&amp;gt;. The timing values in mainline are the &amp;lt;code&amp;gt;sample&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;drive&amp;lt;/code&amp;gt; values respectively.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Timing values are written to the &amp;lt;code&amp;gt;clksel&amp;lt;/code&amp;gt; register on the MMC host, at offset &amp;lt;code&amp;gt;0x9c&amp;lt;/code&amp;gt;. The timing values in mainline are the &amp;lt;code&amp;gt;sample&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;drive&amp;lt;/code&amp;gt; values respectively.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-42:rev-43:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Knuxify</name></author>
	</entry>
	<entry>
		<id>https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;diff=42&amp;oldid=prev</id>
		<title>Knuxify at 16:45, 21 January 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;diff=42&amp;oldid=prev"/>
		<updated>2025-01-21T16:45:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:45, 21 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Clocks are already set up&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Clocks are already set up&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span id=&quot;pinctrl&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Pinctrl ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Pinctrl ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pinctrl may need to be set up according to width; see &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; for DWMCI, &amp;lt;code&amp;gt;arch/arm/mach-exynos/setup-mshci-gpio.c&amp;lt;/code&amp;gt; for MSHCI. There are premade pinctrl defaults &amp;lt;code&amp;gt;sdX_bus1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sdX_bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sdX_bus8&amp;lt;/code&amp;gt; for width 1, 4 and 8 respectively (see midas DTSI for an example).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pinctrl may need to be set up according to width; see &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; for DWMCI, &amp;lt;code&amp;gt;arch/arm/mach-exynos/setup-mshci-gpio.c&amp;lt;/code&amp;gt; for MSHCI. There are premade pinctrl defaults &amp;lt;code&amp;gt;sdX_bus1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sdX_bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sdX_bus8&amp;lt;/code&amp;gt; for width 1, 4 and 8 respectively (see midas DTSI for an example).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Replace &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; with 0 or 4, depending on the contents of &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; (or equivalent &amp;lt;code&amp;gt;.cfg_gpio&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; struct) function: if for width 8 it does &amp;lt;code&amp;gt;s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));&amp;lt;/code&amp;gt;, then 4, else 0. (The only difference between these two is the pin-function that’s set, see &amp;lt;code&amp;gt;exynos4x12-pinctrl.dtsi&amp;lt;/code&amp;gt;.) In width 8, add both &amp;lt;code&amp;gt;bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bus8&amp;lt;/code&amp;gt; (each has 4 pins, coming together to 8 pins total). &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;### &lt;/del&gt;Regulator&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Replace &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; with 0 or 4, depending on the contents of &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; (or equivalent &amp;lt;code&amp;gt;.cfg_gpio&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; struct) function: if for width 8 it does &amp;lt;code&amp;gt;s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));&amp;lt;/code&amp;gt;, then 4, else 0. (The only difference between these two is the pin-function that’s set, see &amp;lt;code&amp;gt;exynos4x12-pinctrl.dtsi&amp;lt;/code&amp;gt;.) In width 8, add both &amp;lt;code&amp;gt;bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bus8&amp;lt;/code&amp;gt; (each has 4 pins, coming together to 8 pins total).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== &lt;/ins&gt;Regulator &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This depends on your device. Midas has a &amp;lt;code&amp;gt;VMEM_VDD_2.8V&amp;lt;/code&amp;gt; regulator in its PMIC, your device might have something similar - check schematics. This will have to be enabled by the GPIO listed as &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; struct, probably &amp;lt;code&amp;gt;gpk0-2&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This depends on your device. Midas has a &amp;lt;code&amp;gt;VMEM_VDD_2.8V&amp;lt;/code&amp;gt; regulator in its PMIC, your device might have something similar - check schematics. This will have to be enabled by the GPIO listed as &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; struct, probably &amp;lt;code&amp;gt;gpk0-2&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you’re unsure, or if there’s no such regulator in your case, then you can create a &amp;lt;code&amp;gt;regulator-fixed&amp;lt;/code&amp;gt; with a min/max voltage of 2.8V and enabled/disabled by said GPIO, and give &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to it, or ignore it entirely and give the &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to the &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt; node.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you’re unsure, or if there’s no such regulator in your case, then you can create a &amp;lt;code&amp;gt;regulator-fixed&amp;lt;/code&amp;gt; with a min/max voltage of 2.8V and enabled/disabled by said GPIO, and give &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to it, or ignore it entirely and give the &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to the &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt; node.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span id=&quot;timing-values&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Timing values ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Timing values ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-41:rev-42:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Knuxify</name></author>
	</entry>
	<entry>
		<id>https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;diff=41&amp;oldid=prev</id>
		<title>Knuxify: Created page with &quot;This page contains notes regarding porting downstream kernel SDHCI/EMMC data to mainline.  Main EMMC node is &lt;code&gt;mshc_0&lt;/code&gt;; the data for it is stored in structs &lt;code&gt;exynos_dwmci_pdata&lt;/code&gt; and &lt;code&gt;exynos4_mshc_pdata&lt;/code&gt;.  See &lt;code&gt;Documentation/devicetree/bindings/mmc/mmc-controller.yaml&lt;/code&gt;.  Converting from those structs:  === &lt;code&gt;exynos4_mshc_pdata&lt;/code&gt; ===  &#039;&#039;&#039;Only if your device has &lt;code&gt;CONFIG_EXYNOS4_DEV_MSHC&lt;/code&gt; enabled.&#039;&#039;&#039;  * &lt;code&gt;cd_...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Exynos_4/EMMC_and_SDHCI&amp;diff=41&amp;oldid=prev"/>
		<updated>2025-01-21T16:44:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This page contains notes regarding porting downstream kernel SDHCI/EMMC data to mainline.  Main EMMC node is &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt;; the data for it is stored in structs &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt;.  See &amp;lt;code&amp;gt;Documentation/devicetree/bindings/mmc/mmc-controller.yaml&amp;lt;/code&amp;gt;.  Converting from those structs:  === &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; ===  &amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_MSHC&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;  * &amp;lt;code&amp;gt;cd_...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page contains notes regarding porting downstream kernel SDHCI/EMMC data to mainline.&lt;br /&gt;
&lt;br /&gt;
Main EMMC node is &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt;; the data for it is stored in structs &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;Documentation/devicetree/bindings/mmc/mmc-controller.yaml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Converting from those structs:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_MSHC&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;cd_type&amp;lt;/code&amp;gt;: probably S3C_MSHCI_CD_PERMANENT, in which case, &amp;lt;code&amp;gt;non-removable;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;caps&amp;lt;/code&amp;gt;: see mmc-controller.yaml, they’re pretty much the same&lt;br /&gt;
* &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt;: note down the GPIO and read on to “Regulator” section.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Only if your device has &amp;lt;code&amp;gt;CONFIG_EXYNOS4_DEV_DWMCI&amp;lt;/code&amp;gt; enabled.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;quirks&amp;lt;/code&amp;gt;:&lt;br /&gt;
** &amp;lt;code&amp;gt;DW_MCI_QUIRK_BROKEN_CARD_DETECTION&amp;lt;/code&amp;gt; -&amp;amp;gt; &amp;lt;code&amp;gt;broken-cd;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;DW_MCI_QUIRK_HIGHSPEED&amp;lt;/code&amp;gt; -&amp;amp;gt; &amp;lt;code&amp;gt;cap-mmc-highspeed&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;bus_hz&amp;lt;/code&amp;gt; -&amp;amp;gt; &amp;lt;code&amp;gt;clock-frequency: &amp;amp;lt;FIXME&amp;amp;gt;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;caps&amp;lt;/code&amp;gt;: see mmc-controller.yaml, they’re pretty much the same&lt;br /&gt;
** &amp;lt;code&amp;gt;MMC_CAP_CMD23&amp;lt;/code&amp;gt; is enabled by default, no need to add it&lt;br /&gt;
** &amp;lt;code&amp;gt;MMC_CAP_8_BIT_DATA&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;bus-width = &amp;amp;lt;8&amp;amp;gt;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;detect_delay_ms&amp;lt;/code&amp;gt; -&amp;amp;gt; &amp;lt;code&amp;gt;card-detect-delay = &amp;amp;lt;FIXME&amp;amp;gt;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;fifo-depth&amp;lt;/code&amp;gt; -&amp;amp;gt; &amp;lt;code&amp;gt;fifo-depth = &amp;amp;lt;0xFIXME&amp;amp;gt;;&amp;lt;/code&amp;gt; (note: 0x80 is default, so skip this if it’s 0x80 on your device)&lt;br /&gt;
* Clocks are already set up&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;pinctrl&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Pinctrl ===&lt;br /&gt;
&lt;br /&gt;
Pinctrl may need to be set up according to width; see &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; for DWMCI, &amp;lt;code&amp;gt;arch/arm/mach-exynos/setup-mshci-gpio.c&amp;lt;/code&amp;gt; for MSHCI. There are premade pinctrl defaults &amp;lt;code&amp;gt;sdX_bus1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sdX_bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sdX_bus8&amp;lt;/code&amp;gt; for width 1, 4 and 8 respectively (see midas DTSI for an example).&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; with 0 or 4, depending on the contents of &amp;lt;code&amp;gt;exynos_dwmci_cfg_gpio&amp;lt;/code&amp;gt; (or equivalent &amp;lt;code&amp;gt;.cfg_gpio&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;exynos_dwmci_pdata&amp;lt;/code&amp;gt; struct) function: if for width 8 it does &amp;lt;code&amp;gt;s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));&amp;lt;/code&amp;gt;, then 4, else 0. (The only difference between these two is the pin-function that’s set, see &amp;lt;code&amp;gt;exynos4x12-pinctrl.dtsi&amp;lt;/code&amp;gt;.) In width 8, add both &amp;lt;code&amp;gt;bus4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bus8&amp;lt;/code&amp;gt; (each has 4 pins, coming together to 8 pins total). ### Regulator&lt;br /&gt;
&lt;br /&gt;
This depends on your device. Midas has a &amp;lt;code&amp;gt;VMEM_VDD_2.8V&amp;lt;/code&amp;gt; regulator in its PMIC, your device might have something similar - check schematics. This will have to be enabled by the GPIO listed as &amp;lt;code&amp;gt;int_power_gpio&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;exynos4_mshc_pdata&amp;lt;/code&amp;gt; struct, probably &amp;lt;code&amp;gt;gpk0-2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you’re unsure, or if there’s no such regulator in your case, then you can create a &amp;lt;code&amp;gt;regulator-fixed&amp;lt;/code&amp;gt; with a min/max voltage of 2.8V and enabled/disabled by said GPIO, and give &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to it, or ignore it entirely and give the &amp;lt;code&amp;gt;sdX_cd&amp;lt;/code&amp;gt; pinctrl to the &amp;lt;code&amp;gt;mshc_0&amp;lt;/code&amp;gt; node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;timing-values&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Timing values ===&lt;br /&gt;
&lt;br /&gt;
Timing values are written to the &amp;lt;code&amp;gt;clksel&amp;lt;/code&amp;gt; register on the MMC host, at offset &amp;lt;code&amp;gt;0x9c&amp;lt;/code&amp;gt;. The timing values in mainline are the &amp;lt;code&amp;gt;sample&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;drive&amp;lt;/code&amp;gt; values respectively.&lt;br /&gt;
&lt;br /&gt;
For tab3 downstream, they seem to be set in &amp;lt;code&amp;gt;arch/arm/mach-exynos/dev-dwmci.c&amp;lt;/code&amp;gt;, and are the same for all devices.&lt;br /&gt;
&lt;br /&gt;
For MSHCI, the values are hardcoded in &amp;lt;code&amp;gt;drivers/mmc/host/mshci.c&amp;lt;/code&amp;gt; line 1252 and onwards.&lt;br /&gt;
&lt;br /&gt;
DDR value is for DDR_50 mode, SDR is for non-DDR_50. Both of the aforementioned files have ifs for checking this.&lt;br /&gt;
&lt;br /&gt;
To decode a CLKSEL value, run this python script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python3&amp;quot;&amp;gt;value = 0x00010001  # CHANGE THIS&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;Sample:&amp;quot;, (clksel_val &amp;gt;&amp;gt; 0) &amp;amp; 7)&lt;br /&gt;
print(&amp;quot;Drive:&amp;quot;, (clksel_val &amp;gt;&amp;gt; 8) &amp;amp; 7)&lt;br /&gt;
print(&amp;quot;Divider:&amp;quot;, (clksel_val &amp;gt;&amp;gt; 16) &amp;amp; 7)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, the sample value seems to be tuned at runtime using the built-in tune function. Unclear how this works yet, TODO.&lt;br /&gt;
&lt;br /&gt;
Divider is &amp;lt;code&amp;gt;samsung,dw-mshc-ciu-div&amp;lt;/code&amp;gt;, but is ignored for Exynos4412 anyways, TODO? See &amp;lt;code&amp;gt;drivers/mmc/host/dw_mmc-exynos.c&amp;lt;/code&amp;gt; in mainline. Sample and drive are passed to the timing values in that order.&lt;br /&gt;
&lt;br /&gt;
…Our best bet is probably to get those values from a running device, somehow…&lt;/div&gt;</summary>
		<author><name>Knuxify</name></author>
	</entry>
</feed>