From patchwork Tue Sep 13 11:53:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1677307 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=DBcFwGd2; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MRkZl1CGkz1yhR for ; Tue, 13 Sep 2022 23:19:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1192D82A4B; Tue, 13 Sep 2022 15:19:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="DBcFwGd2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1CA1584A99; Tue, 13 Sep 2022 13:53:43 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 2538782A4B for ; Tue, 13 Sep 2022 13:53:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com Received: by mail-pf1-x435.google.com with SMTP id e5so11532536pfl.2 for ; Tue, 13 Sep 2022 04:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=NBKKsuzxRDcdjr0LEEw6WzyfA05sjJBdRBO9GsBumoI=; b=DBcFwGd2GoKvEUtAPIU6ctASoNfvsOf+uYqcQjfkl7N4f7Zr4EcnMi2oCWtVKYVPxq oQqMq12UA0KDMAe0SD5lJBiX61ddjEyathC96lnEjqy0custc4XyetNXLtcKACekNQVX JPh7K7rLfGDaJi8rmGfIoMWlLj1gRjOUIhx5A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=NBKKsuzxRDcdjr0LEEw6WzyfA05sjJBdRBO9GsBumoI=; b=Rjyv8rhC9nMF+9aBCFUpkQxr2qXR21gF6BSHHxeH0RakwFU2zOT7L2bKUiEjsxuwjv 7dLupcN/E3Qo5J8Wtqyl4BA9YcwkZp6PV2rSW7KU8xojo2kNdeATQtm0c/6rFMsccODz rXRUX/sjVjDDsL9JMQy4H2FneomghQD3v6qdGV2WLXluNL5QGllLt33B2HRB+8MDl+NK OiyRL3Hno8qfUxZJTWSAe3MWOXovnGeSaxV8VF9eBeBAoSKFgRh3nnakKMftTfZSV2Gk tZC3tvdHN2XKHj3hr2Hsl/8UaEIYLB3M7tkHMKK25uoMrZNrjWkrlHdCQgrDAeydQ++U M8DA== X-Gm-Message-State: ACgBeo0Eqlf1/vOp+yllDn8DAQMKtuMhShY4pDKkgXVekhJER1Rw594G lhsPWzeLv9ODmTV31wXCKfkecw== X-Google-Smtp-Source: AA6agR6aQTXC3cjdMwGw3sx73oBZRjQ+u4pwcRAzpscLhWVypoYhFIWiGxNNHEXWN/z873Bbnah19A== X-Received: by 2002:a65:6b8f:0:b0:42b:77c3:9564 with SMTP id d15-20020a656b8f000000b0042b77c39564mr27619979pgw.91.1663070018390; Tue, 13 Sep 2022 04:53:38 -0700 (PDT) Received: from localhost.localdomain ([183.83.136.224]) by smtp.gmail.com with ESMTPSA id z7-20020a1709028f8700b001708c4ebbaesm7871613plo.309.2022.09.13.04.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 04:53:37 -0700 (PDT) From: Manoj Sai To: Simon Glass , Philipp Tomsich , Kever Yang , Johan Jonker , Alper Nebi Yasak , "Marty E . Plummer" Cc: Da Xue , dsx724 , linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki , Suniel Mahesh , Michael Nazzareno Trimarchi , Manoj Sai Subject: [PATCH v2] configs:rockchip: roc-rk3399-pc: Enable the preboot configuration , USB 1.1 support , crypto RNG support and increase the spi flash default speed Date: Tue, 13 Sep 2022 17:23:26 +0530 Message-Id: <20220913115326.48577-1-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220902082444.83788-2-abbaraju.manojsai@amarulasolutions.com> References: <20220902082444.83788-2-abbaraju.manojsai@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 13 Sep 2022 15:19:21 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean This Patch enables the following details of configs to rockchip based roc-rk3399-pc board : 1) Enable preboot configuration to enable usb devices . 2) Fix up USB config options so keyboards and other USB devices work and update the number of ports of the Usb root hub to configuration of CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS . - with this addition the updated USB device Tree : USB device tree: 1 Hub (12 Mb/s, 0mA) U-Boot Root Hub 1 Hub (12 Mb/s, 0mA) | U-Boot Root Hub | +-2 Hub (12 Mb/s, 100mA) USB 2.0 Hub [MTT] 1 Hub (5 Gb/s, 0mA) U-Boot XHCI Host Controller 3) enable crypto RNG ( random number generator ) support 4) Set the maximum slave SPI speed to 30MHz : - This patch increases the maximum SPI slave device speed and SPI flash max frequency for environment from 10Mhz to 30MHz . - difference in time of erase and update a region of SPI flash from memory with 10Mhz and 30Mhz frequencey range updation follows :- with 10 Mhz frequency updation :- => sf update 0x300000 0x800000 0x400000 4194304 bytes written, 0 bytes skipped in 36.819s, speed 119837 B/s with 30Mhz frequency updation :- => sf update 0x300000 0x800000 0x400000 4194304 bytes written, 0 bytes skipped in 20.319s, speed 220752 B/s Signed-off-by: Manoj Sai Signed-off-by: Da Xue Signed-off-by: dsx724 --- Changes for v2 :- - fixed prefix in commit message . - squash the all four patches into single patch . --- configs/roc-pc-rk3399_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 4625e47537..7754cb8388 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -20,6 +20,7 @@ CONFIG_DEBUG_UART=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 # CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x2e000 @@ -44,6 +45,7 @@ CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_ENV_SPI_MAX_HZ=30000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_ROCKCHIP_GPIO=y @@ -54,6 +56,7 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SF_DEFAULT_BUS=1 +CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_WINBOND=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y @@ -66,6 +69,8 @@ CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_RK3399_LPDDR4=y CONFIG_DM_RESET=y +CONFIG_DM_RNG=y +CONFIG_RNG_ROCKCHIP=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_ROCKCHIP_SPI=y @@ -75,6 +80,9 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_GENERIC=y +CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2 CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_KEYBOARD=y