Other Parts Discussed in Thread: CSD
Hi,
We am trying to use THGBMJG6C1LBAU7 EMMC with the AM3357 processor on our hardware. The UBOOT is on the SPI flash and from there it is executing the linux kernel's zImage which fetches the rootfs onto the emmc flash. But it cannot do it because THGBMJG6C1LBAU7 (manufactured by Kioxia prev. Toshiba) is not mounting due to some unrecognizable error.
We tried the same flashing and booting process with the MTFC2GMVEA-0M-WT-Micron EMMC and it is working without any hassle. One thing that is different between the two EMMCs is that one that is working (MTFC2GMVEA-0M-WT-Micron EMMC) has it mentioned in the datasheet that it's backwards compatible with the previous EMMC versions while the one that is not working does not mention this in the datasheet, however some backward-compatibility mode is mentioned, quoting the two points below:
Note 1: The e-MMC must always start with the backward-compatible interface timing. The timing mode can be switched to
high-speed interface timing by the host sending the SWITCH command (CMD6) with the argument for high-speed
interface select.
Note 3: For compatibility with e-MMCs that support the v4.2 standard or earlier, host should not use >26MHz before switching tohigh-speed interface timing.
Please suggest a solution on what can be done in the emmc driver or the device tree to make the emmc available for the kernel use.
Version of Linux Kernel: 4.19.94
Not-working EMMC Flash part No: THGBMJG6C1LBAU7
Working EMMC Flash part no: MTFC2GMVEA-0M-WT-Micron.
Attached is the device tree file of our board. Thanks.
/*
* Copyright (C) 2022 Calixto Systems Pvt Ltd - http://www.calixto.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/*
* AM335x IEC61850 MODULE
* http:// http://www.calixto.co.in/
* Modified from am335x-evmsk
* Modified by Vipin Vijayan <vipin.v@calixto.in>
*/
/dts-v1/;
#include "am33xx.dtsi"
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "AM335X-IEC61850-MODULE";
compatible = "ti,am335x-evm", "ti,am33xx";
aliases {
ethernet0 = &pruss_emac0;
ethernet1 = &pruss_emac1;
};
cpus {
cpu@0 {
cpu0-supply = <&vdd_mpu_supply>;
};
};
memory {
device_type = "memory";
reg = <0x80000000 0x10000000>; /* 256MB */
};
vmmcsd_fixed: fixedregulator@1 {
compatible = "regulator-fixed";
regulator-name = "vmmcsd-regulator";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
regulator-always-on;
};
vdd_mpu_supply: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "vdd-mpu-regulator";
regulator-min-microvolt = <912500>;
regulator-max-microvolt = <1351500>;
regulator-boot-on;
regulator-always-on;
};
leds {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&user_leds_default>;
pinctrl-1 = <&user_leds_sleep>;
compatible = "gpio-leds";
led@1 {
label = "led1";
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led@2 {
label = "led2";
gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led@3 {
label = "led3";
gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@4 {
label = "led4";
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
};
gpio_buttons: gpio_buttons@0 {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_s0>;
#address-cells = <1>;
#size-cells = <0>;
switch@1 {
label = "button0";
linux,code = <0x100>;
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
};
};
aliases {
ethernet0 = &pruss_emac0;
ethernet1 = &pruss_emac1;
};
/* Dual mac ethernet application node on icss */
pruss_eth: pruss_eth {
compatible = "ti,am3359-prueth";
prus = <&pru0>, <&pru1>;
firmware-name = "ti-pruss/am335x-pru0-prueth-fw.elf",
"ti-pruss/am335x-pru1-prueth-fw.elf";
sram = <&ocmcram>;
interrupt-parent = <&pruss_intc>;
mii-rt = <&pruss_mii_rt>;
pinctrl-0 = <&pruss_eth_default>;
pinctrl-names = "default";
interrupts = <20>, <21>;
interrupt-names = "rx_red_hp", "rx_red_lp";
pruss_emac0: ethernet-mii0 {
phy-handle = <&pruss_eth0_phy>;
phy-mode = "mii";
interrupts = <20>, <22>, <23>, <26>;
interrupt-names = "rx", "tx", "hsrprp_ptp_tx",
"emac_ptp_tx";
/* Filled in by bootloader */
local-mac-address = [00 00 00 00 00 00];
};
pruss_emac1: ethernet-mii1 {
phy-handle = <&pruss_eth1_phy>;
phy-mode = "mii";
interrupts = <21>, <23>, <24>, <27>;
interrupt-names = "rx", "tx", "hsrprp_ptp_tx",
"emac_ptp_tx";
/* Filled in by bootloader */
local-mac-address = [00 00 00 00 00 00];
};
};
};
&am33xx_pinmux {
user_leds_default: user_leds_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x800, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (U7) gpmc_ad0.gpio1[0] */
AM33XX_IOPAD(0x814, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (V8) gpmc_ad5.gpio1[5] */
AM33XX_IOPAD(0x87c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (V6) gpmc_csn0.gpio1[29] */
AM33XX_IOPAD(0x884, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (V9) gpmc_csn2.gpio1[31] */
>;
};
user_leds_sleep: user_leds_sleep {
pinctrl-single,pins = <
AM33XX_IOPAD(0x800, PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (U7) gpmc_ad0.gpio1[0] */
AM33XX_IOPAD(0x814, PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (V8) gpmc_ad5.gpio1[5] */
AM33XX_IOPAD(0x87c, PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (V6) gpmc_csn0.gpio1[29] */
AM33XX_IOPAD(0x884, PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (V9) gpmc_csn2.gpio1[31] */
>;
};
gpio_keys_s0: gpio_keys_s0 {
pinctrl-single,pins = <
AM33XX_IOPAD(0x964, PIN_INPUT | MUX_MODE7) /* (C18) eCAP0_in_PWM0_out.gpio0[7] */
>;
};
uart0_pins: pinmux_uart0_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
>;
};
uart1_pins: pinmux_uart1_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* (D16) uart1_rxd.uart1_rxd */
AM33XX_IOPAD(0x984, PIN_OUTPUT | MUX_MODE0) /* (D15) uart1_txd.uart1_txd */
>;
};
mmc1_pins_default: pinmux_mmc1_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x8F0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
AM33XX_IOPAD(0x8F4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
AM33XX_IOPAD(0x8F8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
AM33XX_IOPAD(0x8FC, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
>;
};
mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
pinctrl-single,pins = <
AM33XX_IOPAD(0x8F0, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x8F4, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x8F8, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x8FC, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x900, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x904, PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
spi0_pins: pinmux_spi0_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (A17) spi0_sclk.spi0_sclk */
AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (B17) spi0_d0.spi0_d0 */
AM33XX_IOPAD(0x958, PIN_OUTPUT_PULLUP | MUX_MODE0 ) /* (B16) spi0_d1.spi0_d1 */
AM33XX_IOPAD(0x95c, PIN_OUTPUT_PULLUP | MUX_MODE0 ) /* (A16) spi0_cs0.spi0_cs0 */
>;
};
pruss_mdio_default: pruss_mdio_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */
AM33XX_IOPAD(0x888, (PIN_INPUT | MUX_MODE5)) /* gpmc_csn3.pr1_mdio_data */
AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE7) /* (V13) gpmc_ad14.gpio1[14] */
>;
};
pruss_eth_default: pruss_eth_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */
AM33XX_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */
AM33XX_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */
AM33XX_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */
AM33XX_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */
AM33XX_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */
AM33XX_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */
AM33XX_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */
AM33XX_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */
AM33XX_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */
AM33XX_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */
AM33XX_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */
AM33XX_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */
AM33XX_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */
AM33XX_IOPAD(0x8e8, (PIN_INPUT | MUX_MODE2)) /* dss_pclk.pr1_mii0_crs */
AM33XX_IOPAD(0x840, (PIN_INPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii_mt1_clk */
AM33XX_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd0 */
AM33XX_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd1 */
AM33XX_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd2 */
AM33XX_IOPAD(0x844, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_txd3 */
AM33XX_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd0 */
AM33XX_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii1_rxd1 */
AM33XX_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii1_rxd2 */
AM33XX_IOPAD(0x854, (PIN_INPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_rxd3 */
AM33XX_IOPAD(0x874, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_txen */
AM33XX_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii_mr1_clk */
AM33XX_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxdv */
AM33XX_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxer */
AM33XX_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_ben1.pr1_mii1_rxlink */
AM33XX_IOPAD(0x8ec, (PIN_INPUT | MUX_MODE2)) /* lcd_ac_bias_en.pr1_mii1_crs */
AM33XX_IOPAD(0x870, (PIN_INPUT | MUX_MODE5)) /* gpmc_wait0.pr1_mii1_col */
>;
};
};
&pruss_mdio {
pinctrl-0 = <&pruss_mdio_default>;
pinctrl-names = "default";
reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
reset-delay-us = <11>; /* PHY datasheet states 1uS min */
status = "okay";
pruss_eth0_phy: ethernet-phy@1 {
reg = <1>;
};
pruss_eth1_phy: ethernet-phy@3 {
reg = <3>;
};
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "okay";
};
&mmc1 {
status = "okay";
vmmc-supply = <&vmmcsd_fixed>;
bus-width = <4>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc1_pins_default>;
pinctrl-1 = <&mmc1_pins_sleep>;
};
&rtc {
system-power-controller;
};
&sgx {
status = "okay";
};
&usb {
status = "okay";
};
&usb_ctrl_mod {
status = "okay";
};
&usb0_phy {
status = "okay";
};
&usb1_phy {
status = "okay";
};
&usb0 {
status = "okay";
dr_mode = "otg";
};
&usb1 {
status = "okay";
dr_mode = "otg";
};
&cppi41dma {
status = "okay";
};
/*
* SPI Flash (1MiB)
* 0x000000 - 0x01FFFF : SPL (128KiB)
* 0x020000 - 0x09FFFF : U-Boot (512KiB)
* 0x0A0000 - 0x0BFFFF : First copy of U-Boot Environment (128KiB)
* 0x0C0000 - 0x0DFFFF : Second copy of U-Boot Environment (128KiB)
*/
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
status = "okay";
flash: s25fl064k@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "st,s25fl064k";
spi-max-frequency = <25000000>;
reg = <0>;
partition@0 {
label = "u-boot-spl";
reg = <0x000000 0x020000>;
};
partition@1 {
label = "u-boot";
reg = <0x020000 0x080000>;
};
partition@2 {
label = "env1";
reg = <0x0C0000 0x020000>;
};
partition@3 {
label = "env2";
reg = <0x0E0000 0x020000>;
};
};
};
&pruss_soc_bus {
status = "okay";
pruss: pruss@4a300000 {
status = "okay";
};
};
&tscadc {
status = "okay";
adc {
ti,adc-channels = <0 1 2 3>;
};
};