Re: [beagleboard] PocketBeagle SD Card Extra Storage
Hi Karishma, Since Jason and Robert helped me out so much there shouldn't be too much to do. Beagle bone green and pocket beagle use the same debian version. So I'd assume you just have to load the latest version and then edit the uEnv.txt like I did. https://github.com/beagleboard/pocketbeagle/wiki/Click-boards™ If that doesn't work for you I'd suggest posting a new question because I am by no means an expert. Regards, Jack On Thursday, May 14, 2020 at 10:14:49 AM UTC-5, Karishma jaiswal wrote: > > Hi > I am trying the same thing with Beagle bone green board. > Can u help me in this as you mentioned that it worked for you. > Thanks > Karishma > > On Thursday, February 22, 2018 at 6:11:02 PM UTC+5:30, jackfh...@gmail.com > wrote: >> >> I've gotten the sd card overlay working, thank you for the help! Now I'm >> trying to read and write a file to it in python but am struggling finding >> the directory that it is in. Any idea on how to locate this path? >> >> On Sunday, February 11, 2018 at 11:49:20 PM UTC-6, Jason Kridner wrote: >>> >>> With Robert’s integration, there’s no longer a need to debug my steps. >>> Use /opt/scripts/tools/update_kernel.sh to get the latest 4.9 kernel. >>> Googling for that script name should get sufficient instructions. Once on >>> that kernel, do the /boot/uEnv.txt edit as indicated. >>> >>> On Feb 11, 2018, at 7:34 PM, jackg...@tamu.edu wrote: >>> >>> Im having trouble executing this command >>> >>> >>> git fetch origin/4.9 --depth 1 >>> >>> >>> Im consistently getting the error >>> >>> >>> fatal: 'origin/4.9' does not appear to be a git repository >>> fatal: Could not read from remote repository. >>> >>> Please make sure you have the correct access rights >>> and the repository exists.4 >>> >>> >>> How can I get the correct access rights to run the 4.9 kernel? >>> >>> >>> On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote: On Fri, Feb 2, 2018 at 5:00 PM Robert Nelson wrote: > On Fri, Feb 2, 2018 at 9:15 AM, Jack_H wrote: > > Hello all. > > > > > > I was wondering if there were any resources for adding an additional > > microSD card to the pocketbeagle for storage. I currently have a > microSD > > click from MikroElektronika but it’s not listed under the > pocketbeagle > > "working" mikrobus. > > Oh, that's easy, prove it can work, and provide a pull request here > for both spix positions: > > https://github.com/beagleboard/bb.org-overlays/ > > Then update the wiki. > > Just because I haven't purchased that click doesn't mean it 'will not' > work.. ;) > > > > I currently have an ethernet click working with my pocketbealge and > > beaglebone black using very similar code snippets. I have found > resources > > for using a microSD card for the beaglebone black from > > > > here > > > > and here > > > > and this tutorial > > > > Will any of this translate over to the pocketbeagle? > > There's a new driver in v4.14.x? and a device tree node; "mmc-slot" > CONFIG_MMC_SPI > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt I found it in the 4.9 driver and made an attempt to build it natively as a module and give it a try: https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa I optimized the loading time for the git clone with a shallow checkout. The build happens pretty fast. It didn't load for me at first. I was able to load it, by doing a depmod and modprobe manually, but it never reports anything beyond: mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff So, got any ideas? How should I specify the interrupts? sudo apt-get update sudo apt-get install linux-headers-`uname -r` cd mkdir linux cd linux/ git init git config core.sparsecheckout true git remote add origin https://github.com/beagleboard/linux echo drivers/mmc/host > .git/info/sparse-checkout git fetch origin/4.9 --depth 1 git checkout 4.9 cd drivers/mmc/host CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD sudo make -C /lib/modules/`uname -r`/build M=$PWD INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install cd /lib/modules/`uname -r` sudo depmod -a sudo /opt/scripts/tools/developers/update_initrd.sh cd /opt/source/bb.org-overlays echo < src/arm/PB-SPI1-MICROSD-CLICK.dts /* * Copyright (C) 2018 Texas Instruments, Jason Kridner * * 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.
Re: [beagleboard] PocketBeagle SD Card Extra Storage
Hi I am trying the same thing with Beagle bone green board. Can u help me in this as you mentioned that it worked for you. Thanks Karishma On Thursday, February 22, 2018 at 6:11:02 PM UTC+5:30, jackfh...@gmail.com wrote: > > I've gotten the sd card overlay working, thank you for the help! Now I'm > trying to read and write a file to it in python but am struggling finding > the directory that it is in. Any idea on how to locate this path? > > On Sunday, February 11, 2018 at 11:49:20 PM UTC-6, Jason Kridner wrote: >> >> With Robert’s integration, there’s no longer a need to debug my steps. >> Use /opt/scripts/tools/update_kernel.sh to get the latest 4.9 kernel. >> Googling for that script name should get sufficient instructions. Once on >> that kernel, do the /boot/uEnv.txt edit as indicated. >> >> On Feb 11, 2018, at 7:34 PM, jackg...@tamu.edu wrote: >> >> Im having trouble executing this command >> >> >> git fetch origin/4.9 --depth 1 >> >> >> Im consistently getting the error >> >> >> fatal: 'origin/4.9' does not appear to be a git repository >> fatal: Could not read from remote repository. >> >> Please make sure you have the correct access rights >> and the repository exists.4 >> >> >> How can I get the correct access rights to run the 4.9 kernel? >> >> >> On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote: >>> >>> On Fri, Feb 2, 2018 at 5:00 PM Robert Nelson >>> wrote: >>> On Fri, Feb 2, 2018 at 9:15 AM, Jack_H wrote: > Hello all. > > > I was wondering if there were any resources for adding an additional > microSD card to the pocketbeagle for storage. I currently have a microSD > click from MikroElektronika but it’s not listed under the pocketbeagle > "working" mikrobus. Oh, that's easy, prove it can work, and provide a pull request here for both spix positions: https://github.com/beagleboard/bb.org-overlays/ Then update the wiki. Just because I haven't purchased that click doesn't mean it 'will not' work.. ;) > I currently have an ethernet click working with my pocketbealge and > beaglebone black using very similar code snippets. I have found resources > for using a microSD card for the beaglebone black from > > here > > and here > > and this tutorial > > Will any of this translate over to the pocketbeagle? There's a new driver in v4.14.x? and a device tree node; "mmc-slot" CONFIG_MMC_SPI https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt >>> >>> >>> I found it in the 4.9 driver and made an attempt to build it natively as >>> a module and give it a try: >>> >>> https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa >>> >>> I optimized the loading time for the git clone with a shallow checkout. >>> The build happens pretty fast. It didn't load for me at first. I was able >>> to load it, by doing a depmod and modprobe manually, but it never reports >>> anything beyond: >>> >>> mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff >>> >>> So, got any ideas? How should I specify the interrupts? >>> >>> sudo apt-get update >>> sudo apt-get install linux-headers-`uname -r` >>> cd >>> mkdir linux >>> cd linux/ >>> git init >>> git config core.sparsecheckout true >>> git remote add origin https://github.com/beagleboard/linux >>> echo drivers/mmc/host > .git/info/sparse-checkout >>> >>> git fetch origin/4.9 --depth 1 >>> git checkout 4.9 >>> cd drivers/mmc/host >>> CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD >>> sudo make -C /lib/modules/`uname -r`/build M=$PWD >>> INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install >>> >>> cd /lib/modules/`uname -r` >>> sudo depmod -a >>> >>> sudo /opt/scripts/tools/developers/update_initrd.sh >>> cd /opt/source/bb.org-overlays >>> echo < src/arm/PB-SPI1-MICROSD-CLICK.dts >>> /* >>> * Copyright (C) 2018 Texas Instruments, Jason Kridner >>> * >>> * 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. >>> * >>> * https://www.mikroe.com/microsd-click >>> * >>> https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf >>> */ >>> >>> /dts-v1/; >>> /plugin/; >>> >>> #include >>> #include >>> #include >>> >>> / { >>> /* >>> * Free up the pins used by the cape from the pinmux helpers. >>> */ >>> fragment@0 { >>> target = <>; >>> __overlay__ { >>> P1_36_pinmux { status = "disabled"; }; /* CD - >>> gpio3_14*/ >>> P2_25_pinmux { status = "disabled"; }; /* MOSI - >>> gpio1_9 */ >>> P2_27_pinmux { status =
Re: [beagleboard] PocketBeagle SD Card Extra Storage
I've gotten the sd card overlay working, thank you for the help! Now I'm trying to read and write a file to it in python but am struggling finding the directory that it is in. Any idea on how to locate this path? On Sunday, February 11, 2018 at 11:49:20 PM UTC-6, Jason Kridner wrote: > > With Robert’s integration, there’s no longer a need to debug my steps. Use > /opt/scripts/tools/update_kernel.sh to get the latest 4.9 kernel. Googling > for that script name should get sufficient instructions. Once on that > kernel, do the /boot/uEnv.txt edit as indicated. > > On Feb 11, 2018, at 7:34 PM, jackg...@tamu.edu wrote: > > Im having trouble executing this command > > > git fetch origin/4.9 --depth 1 > > > Im consistently getting the error > > > fatal: 'origin/4.9' does not appear to be a git repository > fatal: Could not read from remote repository. > > Please make sure you have the correct access rights > and the repository exists.4 > > > How can I get the correct access rights to run the 4.9 kernel? > > > On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote: >> >> On Fri, Feb 2, 2018 at 5:00 PM Robert Nelsonwrote: >> >>> On Fri, Feb 2, 2018 at 9:15 AM, Jack_H wrote: >>> > Hello all. >>> > >>> > >>> > I was wondering if there were any resources for adding an additional >>> > microSD card to the pocketbeagle for storage. I currently have a >>> microSD >>> > click from MikroElektronika but it’s not listed under the pocketbeagle >>> > "working" mikrobus. >>> >>> Oh, that's easy, prove it can work, and provide a pull request here >>> for both spix positions: >>> >>> https://github.com/beagleboard/bb.org-overlays/ >>> >>> Then update the wiki. >>> >>> Just because I haven't purchased that click doesn't mean it 'will not' >>> work.. ;) >>> >>> >>> > I currently have an ethernet click working with my pocketbealge and >>> > beaglebone black using very similar code snippets. I have found >>> resources >>> > for using a microSD card for the beaglebone black from >>> > >>> > here >>> > >>> > and here >>> > >>> > and this tutorial >>> > >>> > Will any of this translate over to the pocketbeagle? >>> >>> There's a new driver in v4.14.x? and a device tree node; "mmc-slot" >>> CONFIG_MMC_SPI >>> >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt >> >> >> I found it in the 4.9 driver and made an attempt to build it natively as >> a module and give it a try: >> >> https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa >> >> I optimized the loading time for the git clone with a shallow checkout. >> The build happens pretty fast. It didn't load for me at first. I was able >> to load it, by doing a depmod and modprobe manually, but it never reports >> anything beyond: >> >> mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff >> >> So, got any ideas? How should I specify the interrupts? >> >> sudo apt-get update >> sudo apt-get install linux-headers-`uname -r` >> cd >> mkdir linux >> cd linux/ >> git init >> git config core.sparsecheckout true >> git remote add origin https://github.com/beagleboard/linux >> echo drivers/mmc/host > .git/info/sparse-checkout >> >> git fetch origin/4.9 --depth 1 >> git checkout 4.9 >> cd drivers/mmc/host >> CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD >> sudo make -C /lib/modules/`uname -r`/build M=$PWD >> INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install >> >> cd /lib/modules/`uname -r` >> sudo depmod -a >> >> sudo /opt/scripts/tools/developers/update_initrd.sh >> cd /opt/source/bb.org-overlays >> echo < src/arm/PB-SPI1-MICROSD-CLICK.dts >> /* >> * Copyright (C) 2018 Texas Instruments, Jason Kridner >> * >> * 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. >> * >> * https://www.mikroe.com/microsd-click >> * >> https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf >> */ >> >> /dts-v1/; >> /plugin/; >> >> #include >> #include >> #include >> >> / { >> /* >> * Free up the pins used by the cape from the pinmux helpers. >> */ >> fragment@0 { >> target = <>; >> __overlay__ { >> P1_36_pinmux { status = "disabled"; }; /* CD - >> gpio3_14*/ >> P2_25_pinmux { status = "disabled"; }; /* MOSI - >> gpio1_9 */ >> P2_27_pinmux { status = "disabled"; }; /* MISO - >> gpio1_8 */ >> P2_29_pinmux { status = "disabled"; }; /* CLK - >> gpio0_7 */ >> P2_31_pinmux { status = "disabled"; }; /* CS - >> gpio0_19 */ >> cape-universal { status = "disabled"; }; >> cape-universal@1
Re: [beagleboard] PocketBeagle SD Card Extra Storage
With Robert’s integration, there’s no longer a need to debug my steps. Use /opt/scripts/tools/update_kernel.sh to get the latest 4.9 kernel. Googling for that script name should get sufficient instructions. Once on that kernel, do the /boot/uEnv.txt edit as indicated. > On Feb 11, 2018, at 7:34 PM, jackgig2...@tamu.edu wrote: > > Im having trouble executing this command > > git fetch origin/4.9 --depth 1 > > Im consistently getting the error > > fatal: 'origin/4.9' does not appear to be a git repository > fatal: Could not read from remote repository. > > Please make sure you have the correct access rights > and the repository exists.4 > > How can I get the correct access rights to run the 4.9 kernel? > >> On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote: >>> On Fri, Feb 2, 2018 at 5:00 PM Robert Nelsonwrote: >>> On Fri, Feb 2, 2018 at 9:15 AM, Jack_H wrote: >>> > Hello all. >>> > >>> > >>> > I was wondering if there were any resources for adding an additional >>> > microSD card to the pocketbeagle for storage. I currently have a microSD >>> > click from MikroElektronika but it’s not listed under the pocketbeagle >>> > "working" mikrobus. >>> >>> Oh, that's easy, prove it can work, and provide a pull request here >>> for both spix positions: >>> >>> https://github.com/beagleboard/bb.org-overlays/ >>> >>> Then update the wiki. >>> >>> Just because I haven't purchased that click doesn't mean it 'will not' >>> work.. ;) >>> >>> >>> > I currently have an ethernet click working with my pocketbealge and >>> > beaglebone black using very similar code snippets. I have found resources >>> > for using a microSD card for the beaglebone black from >>> > >>> > here >>> > >>> > and here >>> > >>> > and this tutorial >>> > >>> > Will any of this translate over to the pocketbeagle? >>> >>> There's a new driver in v4.14.x? and a device tree node; "mmc-slot" >>> CONFIG_MMC_SPI >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt >> >> I found it in the 4.9 driver and made an attempt to build it natively as a >> module and give it a try: >> >> https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa >> >> I optimized the loading time for the git clone with a shallow checkout. The >> build happens pretty fast. It didn't load for me at first. I was able to >> load it, by doing a depmod and modprobe manually, but it never reports >> anything beyond: >> mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff >> >> So, got any ideas? How should I specify the interrupts? >> >> >> sudo apt-get update >> sudo apt-get install linux-headers-`uname -r` >> cd >> mkdir linux >> cd linux/ >> git init >> git config core.sparsecheckout true >> git remote add origin https://github.com/beagleboard/linux >> echo drivers/mmc/host > .git/info/sparse-checkout >> >> git fetch origin/4.9 --depth 1 >> git checkout 4.9 >> cd drivers/mmc/host >> CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD >> sudo make -C /lib/modules/`uname -r`/build M=$PWD >> INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install >> >> cd /lib/modules/`uname -r` >> sudo depmod -a >> sudo /opt/scripts/tools/developers/update_initrd.sh >> cd /opt/source/bb.org-overlays >> echo < src/arm/PB-SPI1-MICROSD-CLICK.dts >> /* >> * Copyright (C) 2018 Texas Instruments, Jason Kridner >> * >> * 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. >> * >> * https://www.mikroe.com/microsd-click >> * >> https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf >> */ >> >> /dts-v1/; >> /plugin/; >> >> #include >> #include >> #include >> >> / { >> /* >> * Free up the pins used by the cape from the pinmux helpers. >> */ >> fragment@0 { >> target = <>; >> __overlay__ { >> P1_36_pinmux { status = "disabled"; }; /* CD - >> gpio3_14*/ >> P2_25_pinmux { status = "disabled"; }; /* MOSI - >> gpio1_9 */ >> P2_27_pinmux { status = "disabled"; }; /* MISO - >> gpio1_8 */ >> P2_29_pinmux { status = "disabled"; }; /* CLK - >> gpio0_7 */ >> P2_31_pinmux { status = "disabled"; }; /* CS - >> gpio0_19 */ >> cape-universal { status = "disabled"; }; >> cape-universal@1 { status = "disabled"; }; >> }; >> }; >> >> fragment@1 { >> target = <>; >> __overlay__ { >> #address-cells = <1>; >> #size-cells = <0>; >> status = "okay"; >> >>
Re: [beagleboard] PocketBeagle SD Card Extra Storage
Im having trouble executing this command git fetch origin/4.9 --depth 1 Im consistently getting the error fatal: 'origin/4.9' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.4 How can I get the correct access rights to run the 4.9 kernel? On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote: > > On Fri, Feb 2, 2018 at 5:00 PM Robert Nelson> wrote: > >> On Fri, Feb 2, 2018 at 9:15 AM, Jack_H >> wrote: >> > Hello all. >> > >> > >> > I was wondering if there were any resources for adding an additional >> > microSD card to the pocketbeagle for storage. I currently have a microSD >> > click from MikroElektronika but it’s not listed under the pocketbeagle >> > "working" mikrobus. >> >> Oh, that's easy, prove it can work, and provide a pull request here >> for both spix positions: >> >> https://github.com/beagleboard/bb.org-overlays/ >> >> Then update the wiki. >> >> Just because I haven't purchased that click doesn't mean it 'will not' >> work.. ;) >> >> >> > I currently have an ethernet click working with my pocketbealge and >> > beaglebone black using very similar code snippets. I have found >> resources >> > for using a microSD card for the beaglebone black from >> > >> > here >> > >> > and here >> > >> > and this tutorial >> > >> > Will any of this translate over to the pocketbeagle? >> >> There's a new driver in v4.14.x? and a device tree node; "mmc-slot" >> CONFIG_MMC_SPI >> >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt > > > I found it in the 4.9 driver and made an attempt to build it natively as a > module and give it a try: > > https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa > > I optimized the loading time for the git clone with a shallow checkout. > The build happens pretty fast. It didn't load for me at first. I was able > to load it, by doing a depmod and modprobe manually, but it never reports > anything beyond: > > mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff > > So, got any ideas? How should I specify the interrupts? > > sudo apt-get update > sudo apt-get install linux-headers-`uname -r` > cd > mkdir linux > cd linux/ > git init > git config core.sparsecheckout true > git remote add origin https://github.com/beagleboard/linux > echo drivers/mmc/host > .git/info/sparse-checkout > > git fetch origin/4.9 --depth 1 > git checkout 4.9 > cd drivers/mmc/host > CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD > sudo make -C /lib/modules/`uname -r`/build M=$PWD > INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install > > cd /lib/modules/`uname -r` > sudo depmod -a > > sudo /opt/scripts/tools/developers/update_initrd.sh > cd /opt/source/bb.org-overlays > echo < src/arm/PB-SPI1-MICROSD-CLICK.dts > /* > * Copyright (C) 2018 Texas Instruments, Jason Kridner > > * > * 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. > * > * https://www.mikroe.com/microsd-click > * > https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf > */ > > /dts-v1/; > /plugin/; > > #include > #include > #include > > / { > /* >* Free up the pins used by the cape from the pinmux helpers. >*/ > fragment@0 { > target = <>; > __overlay__ { > P1_36_pinmux { status = "disabled"; }; /* CD - > gpio3_14*/ > P2_25_pinmux { status = "disabled"; }; /* MOSI - > gpio1_9 */ > P2_27_pinmux { status = "disabled"; }; /* MISO - > gpio1_8 */ > P2_29_pinmux { status = "disabled"; }; /* CLK - > gpio0_7 */ > P2_31_pinmux { status = "disabled"; }; /* CS - > gpio0_19 */ > cape-universal { status = "disabled"; }; > cape-universal@1 { status = "disabled"; }; > }; > }; > > fragment@1 { > target = <>; > __overlay__ { > #address-cells = <1>; > #size-cells = <0>; > status = "okay"; > > channel@0 { > status = "disabled"; > }; > channel@1 { > status = "disabled"; > }; > > mikroe_microsd: mikroe_microsd@0{ > compatible = "mmc-spi-slot"; > pinctrl-names = "default"; > pinctrl-0 = < >
Re: [beagleboard] PocketBeagle SD Card Extra Storage
Okay i got Jason's overlay working: CD isn't working, looks more like a driver problem: https://github.com/beagleboard/bb.org-overlays/commit/d83490f8f4d0b61e123ad2086b057f48dc84b3c0 debian@beaglebone:~$ sudo hdparm -tT /dev/mmcblk0 /dev/mmcblk0: Timing cached reads: 476 MB in 2.00 seconds = 237.65 MB/sec Timing buffered disk reads: 66 MB in 3.03 seconds = 21.80 MB/sec debian@beaglebone:~$ sudo hdparm -tT /dev/mmcblk1 /dev/mmcblk1: Timing cached reads: 100 MB in 2.00 seconds = 49.96 MB/sec Timing buffered disk reads: 4 MB in 3.29 seconds = 1.22 MB/sec debian@beaglebone:~$ dmesg | grep mmc1 [0.909930] mmc_spi spi0.0: SD/MMC host mmc1, no WP, no poweroff, cd polling [0.954369] mmc1: host does not support reading read-only switch, assuming write-enable [0.954396] mmc1: new SDHC card on SPI [0.956952] mmcblk1: mmc1: 0 14.6 GiB debian@beaglebone:~$ cat /boot/uEnv.txt | grep SPI uboot_overlay_addr0=/lib/firmware/PB-SPI0-MICROSD-CLICK.dtbo debian@beaglebone:~$ zcat /proc/config.gz | grep MMC_SPI CONFIG_MMC_SPI=y Regards, -- Robert Nelson https://rcn-ee.com/ -- 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/CAOCHtYh5hehNugFcbSPdF%3DC11KbT3yQ0MuU0qcfRYk%2BYtPJWGg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] PocketBeagle SD Card Extra Storage
On Fri, Feb 2, 2018 at 5:00 PM Robert Nelsonwrote: > On Fri, Feb 2, 2018 at 9:15 AM, Jack_H wrote: > > Hello all. > > > > > > I was wondering if there were any resources for adding an additional > > microSD card to the pocketbeagle for storage. I currently have a microSD > > click from MikroElektronika but it’s not listed under the pocketbeagle > > "working" mikrobus. > > Oh, that's easy, prove it can work, and provide a pull request here > for both spix positions: > > https://github.com/beagleboard/bb.org-overlays/ > > Then update the wiki. > > Just because I haven't purchased that click doesn't mean it 'will not' > work.. ;) > > > > I currently have an ethernet click working with my pocketbealge and > > beaglebone black using very similar code snippets. I have found resources > > for using a microSD card for the beaglebone black from > > > > here > > > > and here > > > > and this tutorial > > > > Will any of this translate over to the pocketbeagle? > > There's a new driver in v4.14.x? and a device tree node; "mmc-slot" > CONFIG_MMC_SPI > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt I found it in the 4.9 driver and made an attempt to build it natively as a module and give it a try: https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa I optimized the loading time for the git clone with a shallow checkout. The build happens pretty fast. It didn't load for me at first. I was able to load it, by doing a depmod and modprobe manually, but it never reports anything beyond: mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff So, got any ideas? How should I specify the interrupts? sudo apt-get update sudo apt-get install linux-headers-`uname -r` cd mkdir linux cd linux/ git init git config core.sparsecheckout true git remote add origin https://github.com/beagleboard/linux echo drivers/mmc/host > .git/info/sparse-checkout git fetch origin/4.9 --depth 1 git checkout 4.9 cd drivers/mmc/host CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD sudo make -C /lib/modules/`uname -r`/build M=$PWD INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install cd /lib/modules/`uname -r` sudo depmod -a sudo /opt/scripts/tools/developers/update_initrd.sh cd /opt/source/bb.org-overlays echo < src/arm/PB-SPI1-MICROSD-CLICK.dts /* * Copyright (C) 2018 Texas Instruments, Jason Kridner * * 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. * * https://www.mikroe.com/microsd-click * https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf */ /dts-v1/; /plugin/; #include #include #include / { /* * Free up the pins used by the cape from the pinmux helpers. */ fragment@0 { target = <>; __overlay__ { P1_36_pinmux { status = "disabled"; }; /* CD - gpio3_14*/ P2_25_pinmux { status = "disabled"; }; /* MOSI - gpio1_9 */ P2_27_pinmux { status = "disabled"; }; /* MISO - gpio1_8 */ P2_29_pinmux { status = "disabled"; }; /* CLK - gpio0_7 */ P2_31_pinmux { status = "disabled"; }; /* CS - gpio0_19 */ cape-universal { status = "disabled"; }; cape-universal@1 { status = "disabled"; }; }; }; fragment@1 { target = <>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; channel@0 { status = "disabled"; }; channel@1 { status = "disabled"; }; mikroe_microsd: mikroe_microsd@0{ compatible = "mmc-spi-slot"; pinctrl-names = "default"; pinctrl-0 = < _31_spi_cs_pin _29_spi_sclk_pin _27_spi_pin _25_spi_pin _36_gpio_pin >; reg = <1>; gpios = < 14 0>; voltage-ranges = <3300 3300>; spi-max-frequency = <5000>; }; }; }; }; make sudo make install sudo perl -i -pe 's/^#(.*)/$1PB-SPI1-MICROSD-CLICK/;'
Re: [beagleboard] PocketBeagle SD Card Extra Storage
On Fri, Feb 2, 2018 at 9:15 AM, Jack_Hwrote: > Hello all. > > > I was wondering if there were any resources for adding an additional > microSD card to the pocketbeagle for storage. I currently have a microSD > click from MikroElektronika but it’s not listed under the pocketbeagle > "working" mikrobus. Oh, that's easy, prove it can work, and provide a pull request here for both spix positions: https://github.com/beagleboard/bb.org-overlays/ Then update the wiki. Just because I haven't purchased that click doesn't mean it 'will not' work.. ;) > I currently have an ethernet click working with my pocketbealge and > beaglebone black using very similar code snippets. I have found resources > for using a microSD card for the beaglebone black from > > here > > and here > > and this tutorial > > Will any of this translate over to the pocketbeagle? There's a new driver in v4.14.x? and a device tree node; "mmc-slot" CONFIG_MMC_SPI https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt Regards, -- Robert Nelson https://rcn-ee.com/ -- 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/CAOCHtYgBf3Hbk7_9tP%3Dt%3Dn6UTEhX89wQgacWOBB%2B3W%2Bz%3DbUhWA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.