From patchwork Thu Aug 27 12:03:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1352511 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=a5Qd5qWG; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BchGY071vz9sT6 for ; Thu, 27 Aug 2020 22:04:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD77F80422; Thu, 27 Aug 2020 14:03:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="a5Qd5qWG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 74AB381260; Thu, 27 Aug 2020 14:03:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AD1128006D for ; Thu, 27 Aug 2020 14:03:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wr1-x443.google.com with SMTP id x7so5142481wro.3 for ; Thu, 27 Aug 2020 05:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Crh9a7RtFi9AQeIjuk8HvZfJZjyk/O2imvKGdGJuCWs=; b=a5Qd5qWGsTSyiCATBZLux8Lnco045uNXv85QQIRLeISjgJLM6/QUdqqoiXkkWUbTfB VjzLoEezt3Wzg4nQSuTfybH7vnt9AryTbfnalLNYNCH3+A0cwa1/pZFxNVQTwcCfBCeb jNJf73fXY4sVbhzDccLWpXs8T38xnVKClPcqb6hptQN9wBaQ2NQezYMLEwEmuE43Koy5 z0LwAjFUxh+TewBsdp3PEeynhCtUsEa1n+sfRGlw6ZljCHs0yo+vQLnRaM6DX8T6D0K8 C8C9wmzkAi4i1tJqBvVwp5Enrr3BchV64crZjDXFagGL5sMK5S9l2LrfQ4yuDao0kKVS z/8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Crh9a7RtFi9AQeIjuk8HvZfJZjyk/O2imvKGdGJuCWs=; b=huK05j9+fKqx3HTFvA55K+EZj6zJL/YPPASWD2uTrSv+57KoMMBzg+3Z7fVm4qEpjW hedVEooJ+eq5GvsYrE3pxsGL6PEyUUkHbkSnuh93Z9pw8IBGsMfTtkWOElIcGRZyEu77 2vR6ulR+hQzrABfC12jc8BefY2L7mSP/1g/WBH88senljPNDDtg64yiX+D0hPyUqIs8O ycukncmEcqELkrvFd2cmTXYz0b8HsF9KbDIut3TH+mi1qE1RxM3jltDtYw/KLG298cPV SdefD8+xXIXd3DTracJIHinPHXvMxzd//Y0tyP8sy/lH4My1TWpJFEQiEpC3Dc1/DqcI kcCQ== X-Gm-Message-State: AOAM531F59Za229i3tZXLUu7jPkjJm5/wd+SDr7kYUgHG2smUM+LOsyp OcIqY7suZR/qjVR0AQ0G+YhDofC079p3KQ== X-Google-Smtp-Source: ABdhPJyLNqu14/f6xzFloH/5nHZT24nZZrLYZqAMK/2cWD4U+JS/bTYMBEeBaOGJL/kSSO5ygwEiWA== X-Received: by 2002:a5d:638c:: with SMTP id p12mr19498219wru.17.1598529829014; Thu, 27 Aug 2020 05:03:49 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id z6sm5622090wrt.91.2020.08.27.05.03.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Aug 2020 05:03:48 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma Subject: [PATCH] configs: xilinx: Enable configs required for ubifs Date: Thu, 27 Aug 2020 14:03:47 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma Enable required configs for using ubifs in uboot. UBIFS testing procedure from u-boot: Let's say we have two partitions in dt as below and want to format partition1 "images" with ubifs. partition@0 { label = "boot"; reg = <0x0 0x1000000>; }; partition@1 { label = "images"; reg = <0x1000000 0x7000000>; }; We will format the partition from linux and copy some files and access from uboot later. First thing, in linux config disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS. this is required as ubifs expects min LEB size as 15*1024 bytes. Use below commands in linux to format "images" partition with ubifs. ubiformat /dev/mtd1 ubiattach /dev/ubi_ctrl -m 1 ubimkvol /dev/ubi0 -N images -m mount -t ubifs ubi0:images /mnt We can copy files to /mnt and unmount it. To access this ubifs partition from uboot, run below commands. (Don't forget to probe device before, e.g. sf probe 0 0 0) setenv mtdids "nor0=nor0" setenv mtdparts "mtdparts=nor0:16m(boot),112m(images)" ubi part images ubifsmount ubi0:images make sure we match "mtdparts" to whatever is given in dt w.r.t partition sizes. "mtdparts" command will list the mtd partitions in u-boot. Once ubifs is mounted, we can use "ubifsls" to list the files in that partition and use "ubifsload " to load files from ubifs partition to DDR. Reading information about mtd layout from DT is not supported. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- configs/xilinx_versal_virt_defconfig | 4 ++++ configs/xilinx_zynqmp_virt_defconfig | 1 + 2 files changed, 5 insertions(+) diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig index 4c463f48eed5..f9edc727176f 100644 --- a/configs/xilinx_versal_virt_defconfig +++ b/configs/xilinx_versal_virt_defconfig @@ -25,12 +25,15 @@ CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_MTD=y CONFIG_CMD_USB=y CONFIG_CMD_TFTPPUT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y CONFIG_OF_BOARD=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y @@ -64,6 +67,7 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_SPI_FLASH_MTD=y CONFIG_PHY_MARVELL=y CONFIG_PHY_NATSEMI=y CONFIG_PHY_REALTEK=y diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig index a0984c804534..00a53f36e47b 100644 --- a/configs/xilinx_zynqmp_virt_defconfig +++ b/configs/xilinx_zynqmp_virt_defconfig @@ -107,6 +107,7 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_SPI_FLASH_MTD=y CONFIG_PHY_MARVELL=y CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ90X1=y