This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/AM3352: NOR flash issue

Part Number: AM3352

Tool/software: TI C/C++ Compiler

Hi,

I am using 4.14 kernel for my AM3352 custom board with gpmc NOR flash as my boot device. But i am not able to enable my nor flash using compatible cfi-flash.

Same thing is working fine with 3.14 kernel. Issue seen with only 4.14 kernel. My MTD blocks are not enabled.

Please find below logs and device tree.

&gpmc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&nor0_pin>;
gpmc,num-waitpins = <1>;
ranges = <0 0 0x08000000 0x04000000>; //0x08000000 is memory address and 64mb of NOR
#address-cells = <2>;
#size-cells = <1>;
nor@0,0 {
compatible = "cfi-flash";
linux,mtd-name = "winbond,xxxxxxxx";
reg = <0 0x00000000 0x04000000>;//64mb of flash
bank-width = <2>;//16-bit flash i.e width
#address-cells = <1>;
#size-cells = <1>;
use-advanced-sector-protection;

gpmc,mux-add-data = <2>;
gpmc,cs-on-ns = <5>;//20
gpmc,cs-rd-off-ns = <150>;
gpmc,cs-wr-off-ns = <150>;
gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <10>;
gpmc,adv-wr-off-ns = <10>;
gpmc,oe-on-ns = <20>;
gpmc,oe-off-ns = <110>;
gpmc,we-on-ns = <0>;
gpmc,we-off-ns = <110>;
gpmc,rd-cycle-ns = <140>;
gpmc,wr-cycle-ns = <140>;
gpmc,access-ns = <120>;
gpmc,page-burst-access-ns = <30>;
gpmc,bus-turnaround-ns = <20>;
gpmc,cycle2cycle-delay-ns = <30>;
gpmc,wr-data-mux-bus-ns = <70>;
gpmc,wr-access-ns = <120>;


partition@0 {
label = "u-boot";

-------

logs:

[ 1.458116] pinctrl-single 44e10800.pinmux: pin PIN35 already requested by 4c
[ 1.469482] pinctrl-single 44e10800.pinmux: pin-35 (50000000.gpmc) status -22
[ 1.476977] pinctrl-single 44e10800.pinmux: could not request pin 35 (PIN35)e
[ 1.489745] omap-gpmc 50000000.gpmc: Error applying setting, reverse things k
[ 1.497528] omap-gpmc: probe of 50000000.gpmc failed with error -22 ------------------------------->this is the error for gpmc
[ 1.506147] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 1.527153] rtc rtc1: invalid alarm value: 1970-5-25 25:84:0

Please help to solve this issue. Working fine with 3.14

Regards,

Subramanya

  • Hi,

    I solved this gpmc detection issue but stucked at phy enablement.

    Please check logs and device tree

    device tree:

    cpsw_default: cpsw_default {
    pinctrl-single,pins = <
    /* Slave 2 */
    0x040 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* MII2_TXEN */
    0x044 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_RXDV */
    0x048 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* MII2_TXD3 */
    0x04c (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* MII2_TXD2 */
    0x050 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* MII2_TXD1 */
    0x054 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* MII2_TXD0 */
    0x058 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_TXCLK */
    0x05c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_RXCLK */
    0x060 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_RXD3 */
    0x064 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_RXD2 */
    0x068 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_RXD1 */
    0x06c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* MII2_RXD0 */
    /*0x074 (PIN_INPUT_PULLDOWN | MUX_MODE1)*/ /* MII2_RXERR */
    >;
    };

    cpsw_sleep: cpsw_sleep {
    pinctrl-single,pins = <
    /* Slave 2 */
    0x040 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
    0x044 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x048 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
    0x04c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
    0x050 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
    0x054 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
    0x058 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x05c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x060 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x064 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x068 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x06c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    >;
    };

    &mac {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cpsw_default>;
    pinctrl-1 = <&cpsw_sleep>;
    status = "okay";
    /* slaves = <1>;
    */
    };

    &davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&davinci_mdio_default>;
    pinctrl-1 = <&davinci_mdio_sleep>;

    status = "okay";

    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rgmii-txid";
    };

    &cpsw_emac1 {
    phy_id = <&davinci_mdio>, <1>;
    phy-mode = "rgmii-txid";
    };

    &phy_sel {
    phy_swap = <1>;
    };

    logs:

    [ 1.798782] hub 2-0:1.0: USB hub found
    [ 1.802985] hub 2-0:1.0: 1 port detected
    [ 1.808789] omap_gpio 481ae000.gpio: Could not set line 21 debounce to 10000 micr)
    [ 1.818236] input: gpio_keys as /devices/platform/gpio_keys/input/input1
    [ 1.826921] rtc-pcf8563 1-0051: setting system clock to 1970-05-26 03:31:08 UTC ()
    [ 1.836320] lis3_reg: disabling
    [ 1.839651] vmmcsd_fixed: disabling
    [ 1.843917] RAMDISK: gzip image found at block 0
    [ 3.887606] VFS: Mounted root (ext2 filesystem) on device 1:0.
    [ 3.894013] devtmpfs: mounted
    [ 3.898681] Freeing unused kernel memory: 1024K
    Starting logging: Initializing random number generator... [ 4.071372] random: dd:)
    done.
    [ 4.183426] jffs2: notice: (976) jffs2_build_xattr_subsystem: complete building x.
    iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you)
    Perhaps iptables or your kernel needs to be upgraded.
    Segmentation fault
    modprobe: can't change directory to '4.14.79-ge669d52447': No such file or directory
    modprobe: can't change directory to '4.14.79-ge669d52447': No such file or directory
    modprobe: can't change directory to '4.14.79-ge669d52447': No such file or directory
    [ 4.522903] 8192eu: disagrees about version of symbol module_layout
    insmod: can't insert '/usr/bin/8192eu.ko': invalid module format
    modprobe: can't change directory to '4.14.79-ge669d52447': No such file or directory
    [ 7.699383] net eth0: initializing cpsw version 1.12 (0)
    [ 7.746228] RTL8211E Gigabit Ethernet 4a101000.mdio:00: attached PHY driver [RTL8)
    [ 7.760482] net eth0: could not add device link to 4a101000.mdio:01 err -17
    [ 7.768273] RTL8211E Gigabit Ethernet 4a101000.mdio:01: attached PHY driver [RTL8)
    [ 7.788217] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 7.794357] 8021q: adding VLAN 0 to HW filter on device eth0
    [ 7.814451] Unhandled fault: external abort on non-linefetch (0x1818) at 0xb6c4800
    [ 7.822490] pgd = c5ebc000
    [ 7.825320] [b6c48050] *pgd=89c06831, *pte=02000343, *ppte=02000833
    Bus error
    nameif: /etc/mactab: No such file or directory
    [ 7.878048] net eth0: initializing cpsw version 1.12 (0)
    [ 7.885899] RTL8211E Gigabit Ethernet 4a101000.mdio:00: attached PHY driver [RTL8)
    [ 7.900071] net eth0: could not add device link to 4a101000.mdio:01 err -17
    [ 7.907879] RTL8211E Gigabit Ethernet 4a101000.mdio:01: attached PHY driver [RTL8)
    [ 7.926132] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 7.932271] 8021q: adding VLAN 0 to HW filter on device eth0
    iniparser: cannot open /jffs2/system.ini
    Segmentation fault
    chown: unknown user/group admin:root
    chown: unknown user/group admin:root
    sh: 1: unknown operand
    Starting Monit 5.18 daemon with http interface at [*]:2812
    Monit start delay set -- pause for 10s
    sid_str = , sid = 0x0
    ------------------ 3g -------------------
    [oem_customiser]wait ....
    Segmentation fault
    sh: missing ]
    Starting network...
    ifup: option with empty value "address"
    Starting ntpd: OK
    Starting ProFTPD: [ 18.702422] capability: warning: `proftpd' uses 32-bit capabili)
    Device proftpd[1158]: Fatal: User: missing arguments on line 31 of '/etc/proftpd.con'
    FAILED
    [ 18.738220] random: ssh-keygen: uninitialized urandom read (32 bytes read)
    ssh-keygen: generating new host keys: RSA1 DSA ECDSA [ 25.907829] random: crng inie
    ED25519
    Starting sshd: OK
    Starting stunnel: [.] stunnel 5.09 on arm-buildroot-linux-gnueabihf platform
    [.] Compiled/running with OpenSSL 1.0.2 22 Jan 2015
    [.] Threading:FORK Sockets:POLL,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
    [ ] errno: (*__errno_location ())
    [.] Reading configuration from file /etc/stunnel/stunnel.conf
    [.] UTF-8 byte order mark detected
    [ ] Enabling support for engine "capi"
    [!] error queue: 2606A074: error:2606A074:engine routines:ENGINE_by_id:no such engine
    [!] ENGINE_by_id: 260B606D: error:260B606D:engine routines:DYNAMIC_LOAD:init failed
    [!] Line 18: "engine = capi": Failed to open the engine
    FAIL
    Starting IPsec...
    sh: enabled: unknown operand
    Starting udhcpd: cat: can't open '/jffs2/system.ini': No such file or directory
    OK
    Starting iptables: cat: can't open '/jffs2/system.ini': No such file or directory
    OK

    Regards,

    Subramanya

  • Hello Subramanya,

    With regards to phy issues, I am wondering if you could please open another ticket.

    Regards,
    Krunal