[U-Boot] [PATCH 11/26] dts: mtmips: update reset controller node for mt7628

Mauro Condarelli mc5686 at mclink.it
Thu Jan 2 14:36:53 CET 2020



On 1/2/20 1:30 PM, Stefan Roese wrote:
> Hi Mauro,
>
> On 30.12.19 13:14, Mauro Condarelli wrote:
>>
>>
>> On 12/30/19 11:22 AM, Daniel Schwierzeck wrote:
>>>
>>> Am 30.12.19 um 10:19 schrieb Mauro Condarelli:
>>>> I am having problems with this patch.
>>>>
>>>> Problem is "reset"command fails (for my board) with:
>>>>> => reset
>>>>> resetting ...
>>>>> ### ERROR ### Please RESET the board ###
>>>> I traced down problem to "drivers/sysreset/sysreset-uclass.c"
>>>> requesting
>>>> "uclass_first_device(UCLASS_SYSRESET, &dev)", while
>>>> "drivers/reset/reset-mips.c"
>>>> defines:
>>>>> static const struct udevice_id mtmips_reset_ids[] = {
>>>>>      { .compatible = "mediatek,mtmips-reset" },
>>>>>      { }
>>>>> };
>>>>>
>>>>> U_BOOT_DRIVER(mtmips_reset) = {
>>>>>      .name = "mtmips-reset",
>>>>>      .id = UCLASS_RESET,
>>>> ... so UCLASS_SYSRESET list is empty.
>>>>
>>>> What am I doing wrong?
>>>> TiA!
>>>> Mauro
>>>>
>>> do you have the according node with compatible string
>>> "mediatek,mtmips-reset" in your device-tree?
>> Yes, I do, but problem is elsewhere:
>> "reset" command looks for a UCLASS_SYSRESET while
>> drivers/reset/reset-mips.c
>> (implementing "mediatek,mtmips-reset") provides a UCLASS_RESET.
>>
>> I know too little about u-boot internals to understand which one I
>> should "fix" (if any).
>
> I just tested current mainline U-Boot (top-of-tree) on the GARDENA
> board and the reset works just fine:
>
> => reset
> resetting ...
>
>
> U-Boot 2020.01-rc5-00042-g6cb87cbb14 (Jan 02 2020 - 13:27:15 +0100)
>
> CPU:   MT7628 Rev 1.2 - Boot from XTAL (3-Byte SPI Addr)
> Model: GARDENA smart Gateway (MT7688)
> DRAM:  128 MiB
> WDT:   Started with servicing (60s timeout)
> Loading Environment from SPI Flash... SF: Detected XM25QH64A with page
> size 256 Bytes, erase size 4 KiB, total 8 MiB
> OK
> F-Data:factory-data version 1 detected
> Net:   eth0: eth at 10110000
> Hit any key to stop autoboot:  0
>
> I didn't check the details of this mail thread, so I can't really
> comment on this. Your board is so similar to the GARDENA one (LinkIt)
> that it should work there as well. Do you gave some differences in
> your defconfig?
My defconfig looks very different, mainly due to not having (currently)
any network in u-boot, but I have USB strorage.
I attach the whole vocore2_defconfig.
To me it seems the only difference that *might* be relevant is I don't
have CONFIG_SYSRESET_SYSCON=y.
... enable... compile... load... test...
SUCCESS!!
That was it.
I was thinking reset should have been handled by "reset-mtmips.c"  but
apparently "mfd syscon reboot driver" is needed.
THANKS.
I'll send another iteration of my patches soon after a bit of testing.
> Thanks,
> Stefan
>
Regards
Mauro

-------------- next part --------------
CONFIG_MIPS=y
CONFIG_SYS_TEXT_BASE=0x80010000
CONFIG_ENV_SIZE=0x00001000
CONFIG_ENV_OFFSET=0x00FFE000
CONFIG_ENV_SECT_SIZE=0x00001000
CONFIG_ARCH_MTMIPS=y
CONFIG_BOARD_VOCORE2=y
CONFIG_MIPS_BOOT_FDT=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_SYS_BOOT_GET_CMDLINE=y
CONFIG_SYS_BOOT_GET_KBD=y
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_USE_BOOTARGS=y
CONFIG_LOGLEVEL=8
CONFIG_VERSION_VARIABLE=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
# CONFIG_AUTOBOOT is not set
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
# CONFIG_CMD_XIMG is not set
CONFIG_RANDOM_UUID=y
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_MTD=y
CONFIG_CMD_PART=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
CONFIG_MTDPARTS_DEFAULT="spi0.0:320k(u-boot),2752k(kernel),13304k(filesystem),4k(env),-(factory)"
# CONFIG_ISO_PARTITION is not set
CONFIG_DEFAULT_DEVICE_TREE="vocore_vocore2"
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_ENV_ADDR=0x00FFE000
# CONFIG_NET is not set
# CONFIG_DM_DEVICE_REMOVE is not set
# CONFIG_INPUT is not set
CONFIG_LED=y
CONFIG_LED_BLINK=y
CONFIG_LED_GPIO=y
CONFIG_MMC=y
CONFIG_DM_MMC=y
# CONFIG_MMC_HW_PARTITIONING is not set
CONFIG_MMC_MTK=y
CONFIG_MTD=y
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_MTD=y
# CONFIG_DM_ETH is not set
# CONFIG_RAM_ROCKCHIP_DEBUG is not set
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_CONS_INDEX=3
CONFIG_SPI=y
CONFIG_MT7621_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_LZO=y


More information about the U-Boot mailing list