Message ID | 20220601233743.56317-6-virag.david003@gmail.com |
---|---|
State | New |
Headers | show |
Series | Bring up internal eMMC on Samsung Galaxy A8 (2018) | expand |
On 02/06/2022 01:37, David Virag wrote: > Add the nodes relevant to provide clocks for Exynos7885 eMMC and to > support eMMC. eMMC is the internal storage used in the Samsung Galaxy A8 > (2018) (jackpotlte), and all other known devices using the Exynos7885 > SoC. > > Signed-off-by: David Virag <virag.david003@gmail.com> > --- > .../boot/dts/exynos/exynos7885-jackpotlte.dts | 20 ++++++++++++ > arch/arm64/boot/dts/exynos/exynos7885.dtsi | 32 +++++++++++++++++++ > 2 files changed, 52 insertions(+) > > diff --git a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > index 4cf9aa25f618..5db9a81ac7bb 100644 > --- a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > +++ b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > @@ -60,6 +60,26 @@ power-key { > }; > }; > > +&mmc_0 { > + status = "okay"; > + mmc-hs200-1_8v; > + mmc-hs400-1_8v; > + cap-mmc-highspeed; > + non-removable; > + mmc-hs400-enhanced-strobe; > + card-detect-delay = <200>; > + clock-frequency = <800000000>; Is this real property for MMC? Neither mmc nor DW MSHC bindings mention it. Best regards, Krzysztof
On Thu, 2022-06-02 at 14:01 +0200, Krzysztof Kozlowski wrote: > On 02/06/2022 01:37, David Virag wrote: > > Add the nodes relevant to provide clocks for Exynos7885 eMMC and to > > support eMMC. eMMC is the internal storage used in the Samsung > > Galaxy A8 > > (2018) (jackpotlte), and all other known devices using the > > Exynos7885 > > SoC. > > > > Signed-off-by: David Virag <virag.david003@gmail.com> > > --- > > .../boot/dts/exynos/exynos7885-jackpotlte.dts | 20 ++++++++++++ > > arch/arm64/boot/dts/exynos/exynos7885.dtsi | 32 > > +++++++++++++++++++ > > 2 files changed, 52 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > > b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > > index 4cf9aa25f618..5db9a81ac7bb 100644 > > --- a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > > +++ b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts > > @@ -60,6 +60,26 @@ power-key { > > }; > > }; > > > > +&mmc_0 { > > + status = "okay"; > > + mmc-hs200-1_8v; > > + mmc-hs400-1_8v; > > + cap-mmc-highspeed; > > + non-removable; > > + mmc-hs400-enhanced-strobe; > > + card-detect-delay = <200>; > > + clock-frequency = <800000000>; > > Is this real property for MMC? Neither mmc nor DW MSHC bindings > mention it. It is, but I don't remember trying without it. Seems like it is not documented then. It is used in dw_mmc.c in the following places: https://github.com/torvalds/linux/blob/master/drivers/mmc/host/dw_mmc.c#L3242-L3243 https://github.com/torvalds/linux/blob/master/drivers/mmc/host/dw_mmc.c#L3306-L3325 The Exynos850 device tree has the same property in it's mmc node. > > Best regards, > Krzysztof Best regards, David
On 03/06/2022 00:18, David Virag wrote: > On Thu, 2022-06-02 at 14:01 +0200, Krzysztof Kozlowski wrote: >> On 02/06/2022 01:37, David Virag wrote: >>> Add the nodes relevant to provide clocks for Exynos7885 eMMC and to >>> support eMMC. eMMC is the internal storage used in the Samsung >>> Galaxy A8 >>> (2018) (jackpotlte), and all other known devices using the >>> Exynos7885 >>> SoC. >>> >>> Signed-off-by: David Virag <virag.david003@gmail.com> >>> --- >>> .../boot/dts/exynos/exynos7885-jackpotlte.dts | 20 ++++++++++++ >>> arch/arm64/boot/dts/exynos/exynos7885.dtsi | 32 >>> +++++++++++++++++++ >>> 2 files changed, 52 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts >>> b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts >>> index 4cf9aa25f618..5db9a81ac7bb 100644 >>> --- a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts >>> +++ b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts >>> @@ -60,6 +60,26 @@ power-key { >>> }; >>> }; >>> >>> +&mmc_0 { >>> + status = "okay"; >>> + mmc-hs200-1_8v; >>> + mmc-hs400-1_8v; >>> + cap-mmc-highspeed; >>> + non-removable; >>> + mmc-hs400-enhanced-strobe; >>> + card-detect-delay = <200>; >>> + clock-frequency = <800000000>; >> >> Is this real property for MMC? Neither mmc nor DW MSHC bindings >> mention it. > > It is, but I don't remember trying without it. Seems like it is not > documented then. It is used in dw_mmc.c in the following places: > > https://github.com/torvalds/linux/blob/master/drivers/mmc/host/dw_mmc.c#L3242-L3243 > > https://github.com/torvalds/linux/blob/master/drivers/mmc/host/dw_mmc.c#L3306-L3325 > > The Exynos850 device tree has the same property in it's mmc node. Indeed, it's fine then. I'll check the bindings and convert them to DT schema. Best regards, Krzysztof
On Thu, 2 Jun 2022 01:37:43 +0200, David Virag wrote: > Add the nodes relevant to provide clocks for Exynos7885 eMMC and to > support eMMC. eMMC is the internal storage used in the Samsung Galaxy A8 > (2018) (jackpotlte), and all other known devices using the Exynos7885 > SoC. > > Applied, thanks! [5/5] arm64: dts: exynos: Add internal eMMC support to jackpotlte https://git.kernel.org/krzk/linux/c/ced37411d7f597129fecc0c3ca2324f44e33f4c8 Best regards,
diff --git a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts index 4cf9aa25f618..5db9a81ac7bb 100644 --- a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts +++ b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts @@ -60,6 +60,26 @@ power-key { }; }; +&mmc_0 { + status = "okay"; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + cap-mmc-highspeed; + non-removable; + mmc-hs400-enhanced-strobe; + card-detect-delay = <200>; + clock-frequency = <800000000>; + bus-width = <8>; + samsung,dw-mshc-ciu-div = <3>; + samsung,dw-mshc-sdr-timing = <0 4>; + samsung,dw-mshc-ddr-timing = <2 4>; + samsung,dw-mshc-hs400-timing = <0 2>; + + pinctrl-names = "default"; + pinctrl-0 = <&sd0_clk_fast_slew_rate_3x &sd0_cmd &sd0_rdqs + &sd0_bus1 &sd0_bus4 &sd0_bus8>; +}; + &oscclk { clock-frequency = <26000000>; }; diff --git a/arch/arm64/boot/dts/exynos/exynos7885.dtsi b/arch/arm64/boot/dts/exynos/exynos7885.dtsi index 9c233c56558c..23c2e0bb0a2c 100644 --- a/arch/arm64/boot/dts/exynos/exynos7885.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7885.dtsi @@ -240,6 +240,25 @@ cmu_top: clock-controller@12060000 { clock-names = "oscclk"; }; + cmu_fsys: clock-controller@13400000 { + compatible = "samsung,exynos7885-cmu-fsys"; + reg = <0x13400000 0x8000>; + #clock-cells = <1>; + + clocks = <&oscclk>, + <&cmu_top CLK_DOUT_FSYS_BUS>, + <&cmu_top CLK_DOUT_FSYS_MMC_CARD>, + <&cmu_top CLK_DOUT_FSYS_MMC_EMBD>, + <&cmu_top CLK_DOUT_FSYS_MMC_SDIO>, + <&cmu_top CLK_DOUT_FSYS_USB30DRD>; + clock-names = "oscclk", + "dout_fsys_bus", + "dout_fsys_mmc_card", + "dout_fsys_mmc_embd", + "dout_fsys_mmc_sdio", + "dout_fsys_usb30drd"; + }; + pinctrl_alive: pinctrl@11cb0000 { compatible = "samsung,exynos7885-pinctrl"; reg = <0x11cb0000 0x1000>; @@ -274,6 +293,19 @@ pmu_system_controller: system-controller@11c80000 { reg = <0x11c80000 0x10000>; }; + mmc_0: mmc@13500000 { + compatible = "samsung,exynos7-dw-mshc-smu"; + reg = <0x13500000 0x2000>; + interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_fsys CLK_GOUT_MMC_EMBD_ACLK>, + <&cmu_fsys CLK_GOUT_MMC_EMBD_SDCLKIN>; + clock-names = "biu", "ciu"; + fifo-depth = <0x40>; + status = "disabled"; + }; + serial_0: serial@13800000 { compatible = "samsung,exynos5433-uart"; reg = <0x13800000 0x100>;
Add the nodes relevant to provide clocks for Exynos7885 eMMC and to support eMMC. eMMC is the internal storage used in the Samsung Galaxy A8 (2018) (jackpotlte), and all other known devices using the Exynos7885 SoC. Signed-off-by: David Virag <virag.david003@gmail.com> --- .../boot/dts/exynos/exynos7885-jackpotlte.dts | 20 ++++++++++++ arch/arm64/boot/dts/exynos/exynos7885.dtsi | 32 +++++++++++++++++++ 2 files changed, 52 insertions(+)