I found the pinmux state is differnet between the emmc boot and sd card boot. I set the spi0 pins (/ce, sclk, d1, d0) with MODE0 in am335x-bone-common.dtsi. When the board runs in sd card boot, the spi0 pins mode is MODE 0. but in emmc boot, the spi0 pins mode is MODE 7. So, in emmc boot mode, I cannot access to spi-nor flash.
I set the pin mux state in am335x0-bone-common.dtsi like this: ........ spi0_pins: spi0_pins { pinctrl-single,pins = < AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT_PULLUP, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_INPUT_PULLUP, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_OUTPUT_PULLUP, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_OUTPUT_PULLUP, MUX_MODE0) >; }; ........... &spi0 { pinctrl-name = "default"; pinctrl-0 = <&spi0_pins>; status = "okay"; spi-flash@0 { #address-cells = <0x1>; #size-cells = <0x1>; compatible = "jedec,spi-nor"; reg = <0x0>; spi-max-frequency = <500000>; partition@0 { label = "partition1"; reg = <0x0 0x10000>; }; partition@200000 { label = "partition2"; reg = <0x10000 0x10000>; }; }; }; I don't know why the pin mode state is different between the emmc and sd card boot mode. Is there any factor to effect for the spi0 pins mode to differ beween emmc and sd card boot? Thanks in advance. J.Hwan Kim 2021년 2월 2일 화요일 오전 10시 16분 35초 UTC+9에 JeongHwan Kim님이 작성: > Hi, > > I connected SPI-nor flash with BBB. The SPI-nor flash is SST25VF080B. When > I boot the BBB with SDCard mode, the communication with spi0-nor flash is > OK. But, when I boot the BBB with eMMC mode with same kernel, the > commuincation with spi0-nor flash is NOT ok. (BBB cannot read the chip ID > of the flash). > > This is log of SD card mode booting: > [ 2.419205] spi-nor spi0.0: sst25vf080b (1024 Kbytes) [ 2.424333] 2 > fixed-partitions partitions found on MTD device spi0.0 [ 2.430748] Creating > 2 MTD partitions on "spi0.0": [ 2.435601] 0x000000000000-0x000000010000 : > "partition1" [ 2.447042] 0x000000010000-0x000000020000 : "partition2" > > This is log of eMMC mode booting: > [ 2.423553] spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00 > [ 2.430502] spi-nor: probe of spi0.0 failed with error -2 > > How can I resolve this problem? Can you give me an inforamtion on this > case? > > J.Hwan Kim > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/b5354beb-23d8-44f9-80c8-dd387ac94373n%40googlegroups.com.