[U-Boot] [Patch] for drivers/net/phy/smsc.c to support SMSC LAN8741
Hello, Be mild with me - my first patch to u-boot. Signed-off-by: Arno Steffens diff -Nur u-boot-2017.11/drivers/net/phy/smsc.c u-boot-2017.11_patched/drivers/net/phy/smsc.c --- u-boot-2017.11/drivers/net/phy/smsc.c 2017-11-14 02:08:06.0 +0100 +++ u-boot-2017.11_patched/drivers/net/phy/smsc.c 2018-01-24 12:17:39.326055469 +0100 @@ -83,6 +83,16 @@ .shutdown = _shutdown, }; +static struct phy_driver lan8741_driver = { + .name = "SMSC LAN8741", + .uid = 0x0007c120, + .mask = 0x0, + .features = PHY_BASIC_FEATURES, + .config = _config_aneg, + .startup = _startup, + .shutdown = _shutdown, +}; + static struct phy_driver lan8742_driver = { .name = "SMSC LAN8742", .uid = 0x0007c130, @@ -99,6 +109,7 @@ phy_register(_driver); phy_register(_driver); phy_register(_driver); + phy_register(_driver); phy_register(_driver); return 0; ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] U-Boot Tool: fw_setenv - kernel option?
After using a plain vanilla instead of a vendor kernel I do have problems with fw_setenv. Althoug fw_printenv still works fine, after usage of fw_setenv the environment is destroyed, CRC error. I checked a lot of things, changed u-boot, devicetree, fw_setenv ... and finally came to the point, that it just depends on the kernel. Only changing the kernel makes the difference. I assume that there is an option not enabled. Honestly, I am lost with the differences - I couldn't identify the one that makes difference. Using an older config file, with lot more options, than it works also with a newer kernel. Someone has an idea, which of the million settings is my friend? CONFIG_CRC16 and 32 are both enabled. Best regards Arno ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Bug in emmc subsystem
Some news here. With help of Diego I found, that GP partition can be addressed: This works with Zynq> mmc dev 0 4 MMC: block number 0x1 exceeds max(0x0) switch to partitions #4, OK mmc0(part 4) is current device (0 is the user data area, 1 and 2 the first and second boot partitions, 3 the RPMB partition and 4, 5, 6 and 7 the up to four general purpose partitions). Still a potential problem is the message "MMC: block number 0x1 exceeds max(0x0)" After that I can see the capacity: Zynq> mmc info Device: sdhci@e010 Manufacturer ID: 13 OEM: 14e Name: Q1J54 Tran Speed: 5200 Rd Block Len: 512 MMC version 5.0 High Capacity: Yes Capacity: 1.8 GiB Bus Width: 4-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 0 Bytes WRREL Boot Capacity: 2 MiB ENH RPMB Capacity: 512 KiB ENH GP1 Capacity: 1.8 GiB ENH WRREL But even after activating the GP partition a load fails, neither load mmc 0:1 8000 /bin/busy nor load mmc 0:4 8000 /bin/busy nor load mmc 0:0 8000 /bin/busy give anything else back than ** Bad device size - mmc 0 ** And: "mmc info", shows that this command switches back to user mode, as capacity is zero again. Even this seems not ok to me: Zynq> mmc dev 0 4 MMC: block number 0x1 exceeds max(0x0) switch to partitions #4, OK mmc0(part 4) is current device Zynq> mmc dev MMC: block number 0x1 exceeds max(0x0) switch to partitions #0, OK mmc0(part 0) is current device It should just sow the partition, not set it again (without parameter) Best regards Arno > Gesendet: Freitag, 07. April 2017 um 04:07 Uhr > Von: "Jaehoon Chung" <jh80.ch...@samsung.com> > An: "Arno Steffens" <s...@gmx.li> > Betreff: Re: [U-Boot] Bug in emmc subsystem > > Hi Arno, > > On 04/07/2017 04:36 AM, Arno Steffens wrote: > > Dear Jeahoon Chung, > > > > I am in office earliest on Monday. > > > > From what I remember there is not much additional debug information to be > > expected (from the code I have in mind). But I will check this to give you > > as much support as I can. > > Which files do you want me to enable debug and what command shall I send to > > create useful information for you? > > If enabled CONFIG_DEBUG, maybe all debug message will be printed. > I want to see the mmc command's debug message. > > Which u-boot version do you use? Well, i can't check in more detail on today. > :) > But i think this is not bug..because my all boards are working fine with > SD-card and eMMC4.41/4.5/5.0. > > If it's bug in subsystem, maybe i might see the similar thing...but it's just > assumption.. > So i need to check whether it's really mmc subsystem bug or not. > > > > > This board is a custom board - most eval boards have SDcard instead of > > fixed emmc. > > Do you use SD-card? Not eMMC? > > > Is there any trick to get access to the GP partition? > > I couldn't found something about this. > > > > So before converting to GP / pseudoSingleLevelCell-mode (to extend > > reliablility) I accessed it with > > “if ext4load mmc 0:1 ${addr_ld} /{file_name} … ”, but this doesn’t work > > anymore - it returns with: ** Bad device size - mmc 0 ** > > > > But maybe I just have to use other command for accessing GP? > > > > Best regards > > Arno > > > > > > Am 06.04.2017 um 14:08 schrieb Jaehoon Chung: > >> Hi, > >> > >> On 04/06/2017 03:55 AM, Arno Steffens wrote: > >>> There seems to be a problem handling emmc with configured GP partition. > >>> > >>> Below the "mmc info". The problem might be that user capacity is > >>> calculated/shown as "0". > >>> At least it shows the GP1 partition with correct size - which is not the > >>> case for "mmc hwpartition" - it denies its existence ;) > >>> > >>> Can someone help me to fix this? > >> > >> Which board do you use? It seems that the initializing mmc might be failed. > >> After enabling debug option, share the log about mmc. > >> > >> Best Regards, > >> Jaehoon Chung > >> > >>> > >>> Thanks a lot. > >>> - Arno > >>> > >>> > >>>> mmc info > >>> Device: sdhci at e010 > >>> Manufacturer ID: 13 > >>> OEM: 14e > >>> Name: Q1J54 > >>> Tran Speed: 5200 > >>> Rd Block Len: 512 > >>> MMC version 5.0 > >>> High Capacity: Yes > >>> Capacity: 0 Bytes > >>> Bus Width: 4-bit > >>> Erase Group Size: 512 KiB > >>> HC
Re: [U-Boot] Bug in emmc subsystem
Hi, I am using latest release: U-boot 2017.03. The board is a custom board, simular to Zynq-MicroZed board. But MicroZed board has SD card, while our board has a fixed mounted emmc vom Micron. I compiled it again with #define DEBUG 1 in cmd/mmc.c cmd/parts.c cmd/mtdparts.c driver/mmc/mmc.c driver/mmc/zynq_sdhci.c driver/mmc/sdhci.c driver/mmc/mmc_write.c driver/mmc/mmc_uclass.c driver/mmc/mmc_legacy.c But this doesn't give me more information for the commands "mmc info" and mmc hwpartition". As it works with "normal" formatted mmc - have you ever tried to use enhanced partitions? What is correct command to access a GP partition? For me it is not 100% sure how the commands are working, but because of the non consistence in "mmc info" and "mmc hwpartition" about the existence of a GP1 partition it must be a bug in U-boot. My main problems to debug this - I have no comparison to a working system (to know what is wrong and what is ok) and how it works. There is no help/doc about this enhanced partition I found something here: https://lists.denx.de/pipermail/u-boot/2014-April/177378.html What is strange to me: mmc_startup seems not to know MMC Version 5.0. There is a switch matrix, which only goes up to 4.0 ?!? Let me know if I can do something to go ahead with this bug. Thanks Arno > Gesendet: Donnerstag, 06. April 2017 um 14:08 Uhr > Von: "Jaehoon Chung" <jh80.ch...@samsung.com> > An: "Arno Steffens" <s...@gmx.li>, u-boot@lists.denx.de > Betreff: Re: [U-Boot] Bug in emmc subsystem > > Hi, > > On 04/06/2017 03:55 AM, Arno Steffens wrote: > > There seems to be a problem handling emmc with configured GP partition. > > > > Below the "mmc info". The problem might be that user capacity is > > calculated/shown as "0". > > At least it shows the GP1 partition with correct size - which is not the > > case for "mmc hwpartition" - it denies its existence ;) > > > > Can someone help me to fix this? > > Which board do you use? It seems that the initializing mmc might be failed. > After enabling debug option, share the log about mmc. > > Best Regards, > Jaehoon Chung > > > > > Thanks a lot. > > - Arno > > > > > >>mmc info > > Device: sdhci at e010 > > Manufacturer ID: 13 > > OEM: 14e > > Name: Q1J54 > > Tran Speed: 5200 > > Rd Block Len: 512 > > MMC version 5.0 > > High Capacity: Yes > > Capacity: 0 Bytes > > Bus Width: 4-bit > > Erase Group Size: 512 KiB > > HC WP Group Size: 8 MiB > > User Capacity: 0 Bytes WRREL > > Boot Capacity: 2 MiB ENH > > RPMB Capacity: 512 KiB ENH > > GP1 Capacity: 1.8 GiB ENH WRREL > > > >>mmc hwpartition > > Partition configuration: > > No enhanced user data area > > No GP1 partition > > No GP2 partition > > No GP3 partition > > No GP4 partition > > Card already partitioned > > Failed! > > > >>mmc read 0 0 1 > > MMC read: dev # 0, block # 0, count 1 ... MMC: block number 0x1 exceeds > > max(0x0) > > 0 blocks read: ERROR > > > >>mmc dev 0 0 > > MMC: block number 0x1 exceeds max(0x0) > > switch to partitions #0, OK > > mmc0(part 0) is current device > > > > BTW: > > The GP partiton was created in Linux by the mmc-utils with > > “mmc gp create -y 1908736 1 1 0 /dev/mmcblk0” > > > > Linux can handle this as you can see in boot message: > > [1.248426] mmc0: new high speed MMC card at address 0001 > > [1.264301] mmcblk0: mmc0:0001 Q1J54A 0 B > > [1.268525] mmcblk0boot0: mmc0:0001 Q1J54A partition 1 2.00 MiB > > [1.284605] mmcblk0boot1: mmc0:0001 Q1J54A partition 2 2.00 MiB > > [1.300666] mmcblk0gp0: mmc0:0001 Q1J54A partition 4 1.82 GiB > > [1.316563] mmcblk0rpmb: mmc0:0001 Q1J54A partition 3 512 KiB > > [1.325255] mmcblk0gp0: p1 p2 p3 > > … > > [3.083325] EXT4-fs (mmcblk0gp0p1): INFO: recovery required on readonly > > filesystem > > [3.090893] EXT4-fs (mmcblk0gp0p1): write access will be enabled during > > recovery > > [3.189597] EXT4-fs (mmcblk0gp0p1): recovery complete > > [3.196310] EXT4-fs (mmcblk0gp0p1): mounted filesystem with ordered data > > mode. Opts: (null) > > ___ > > U-Boot mailing list > > U-Boot@lists.denx.de > > https://lists.denx.de/listinfo/u-boot > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Bug in emmc subsystem
There seems to be a problem handling emmc with configured GP partition. Below the "mmc info". The problem might be that user capacity is calculated/shown as "0". At least it shows the GP1 partition with correct size - which is not the case for "mmc hwpartition" - it denies its existence ;) Can someone help me to fix this? Thanks a lot. - Arno >mmc info Device: sdhci at e010 Manufacturer ID: 13 OEM: 14e Name: Q1J54 Tran Speed: 5200 Rd Block Len: 512 MMC version 5.0 High Capacity: Yes Capacity: 0 Bytes Bus Width: 4-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 0 Bytes WRREL Boot Capacity: 2 MiB ENH RPMB Capacity: 512 KiB ENH GP1 Capacity: 1.8 GiB ENH WRREL >mmc hwpartition Partition configuration: No enhanced user data area No GP1 partition No GP2 partition No GP3 partition No GP4 partition Card already partitioned Failed! >mmc read 0 0 1 MMC read: dev # 0, block # 0, count 1 ... MMC: block number 0x1 exceeds max(0x0) 0 blocks read: ERROR >mmc dev 0 0 MMC: block number 0x1 exceeds max(0x0) switch to partitions #0, OK mmc0(part 0) is current device BTW: The GP partiton was created in Linux by the mmc-utils with “mmc gp create -y 1908736 1 1 0 /dev/mmcblk0” Linux can handle this as you can see in boot message: [1.248426] mmc0: new high speed MMC card at address 0001 [1.264301] mmcblk0: mmc0:0001 Q1J54A 0 B [1.268525] mmcblk0boot0: mmc0:0001 Q1J54A partition 1 2.00 MiB [1.284605] mmcblk0boot1: mmc0:0001 Q1J54A partition 2 2.00 MiB [1.300666] mmcblk0gp0: mmc0:0001 Q1J54A partition 4 1.82 GiB [1.316563] mmcblk0rpmb: mmc0:0001 Q1J54A partition 3 512 KiB [1.325255] mmcblk0gp0: p1 p2 p3 … [3.083325] EXT4-fs (mmcblk0gp0p1): INFO: recovery required on readonly filesystem [3.090893] EXT4-fs (mmcblk0gp0p1): write access will be enabled during recovery [3.189597] EXT4-fs (mmcblk0gp0p1): recovery complete [3.196310] EXT4-fs (mmcblk0gp0p1): mounted filesystem with ordered data mode. Opts: (null) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot