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: 2358 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 10E0E3F1C8 for ; Tue, 13 Sep 2022 13:53:40 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id r126-20020a632b84000000b004393806c06esf1567832pgr.4 for ; Tue, 13 Sep 2022 04:53:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663070019; cv=pass; d=google.com; s=arc-20160816; b=w/SMN1mFAv4SZWcHYGEHzUX5iJW+rDD74GGV/wnt0dbQpw9G18dEGSn9ssjBCFvAhH 04I+r29+sOX3zvP0pbWGhbYKRV+G5kNyP+9JBwvb/ZF64NKMMLfU7WMSqr5zvbPZTuIc wUw/0oHcFo+HjEA5fd4RRCvxK1zuDl0KOITNKPE+/C10WC9D6r4Q9qMM8Q06B+i6nm+/ 2gmI/DDvFNjD+uE+pmpXNYGItWdXkslgfcSSK2hFNUZm+gy+Lcvg7pxMegNlXKHppLpg D+OnQis571j5kTCWmRnQ8e6ZaST9XaGBo4kfN/U1VaawiiwTn86pB+8FdUW38qFzEeqY fdpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Fna5lRHkCiYiOrqwNLhvBdNoAMd+vzFBTHzV34ik7eI=; b=d3vqSF3Nyx6pRuQdSR9FI8tqEYhMvfwvkwRZ+UnTIOZyo9ESi6AxEGnENnY3euRgEy s6o4Ik8NTXXrXOjwCvJVdi0L8VPeq/KiPDUV+rmutHa+SGyUuHSzrjvG7ZUkxs65yLek 0sVQnj25T7DIW41CcnrXAR/cdpR8H5MNKkIhWgafAfT61CXy0oe0teJey15KxzImkSja lUPRTfgDKREsYccCYP79HezGCp05qHyOqyBN1JpNVl7/x+Ul2Ra4/B0kzitK5veGPPG9 /6lSM3Jai11BXzjBIOlNsKiYQsk/9Lj0GHDSm9lz6rVFRahFkvF62AS3WBeIgARrX5HU xtmg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DBcFwGd2; spf=pass (google.com: domain of abbaraju.manojsai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date; bh=Fna5lRHkCiYiOrqwNLhvBdNoAMd+vzFBTHzV34ik7eI=; b=gvsZmS7yFY4nBEjefhmcgca3x6TllZvLQv31lefNQN59t1sL0ENfPvZmlxo1cW8Kql 4LNsD45XzqJVnUxsxk2J4J1ANVu90s8zN4rl4QH2nHiIjTWYEnxz2I5cptvULrqHO5PR Q4haXkbwXe0fLZcogNRDn85SfLMDz0WpuO3N8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=Fna5lRHkCiYiOrqwNLhvBdNoAMd+vzFBTHzV34ik7eI=; b=FhS+r9Z6QaCt7JVxZlaWzVy8/kPdBdFO2/9UOrtrJBMsAFgVVJN3VFsJwCFPzOEGZP qQrkFkFp0gq0eKYGbBrzXFzeGsjuDsFenZYQo/cxtB0R7O4z0ZE98+7IGfEzB5PvVszJ 6awxyjl3i7A5sGZZkJjobcdZKz1THBdx70QgztItUfGc81u4t7VlWNh5E3VJny1fswqX 2wi2oSyMeJ8QnElpciyYobIhwfL9KnJbsPfKuIuGDQrxII6YwDfLRjpr1FbcLLQkKlzN q0oKkyKK0/P5lHkRLCDXKZ4nV+iR9BAj4qKtREjWGRS8fH00wabT/vsjWGiP3oQoUV7w YlfA== X-Gm-Message-State: ACgBeo0+DDk1PFvSsvRr+Q2giXn5AoaElLwFYtmCSMBtkZBAbJGDebCH dLdkVMZeoDgYJ/pMvcPkm+fYrnti X-Google-Smtp-Source: AA6agR5FIQFzFC3qF7ONORoSWaJ5W0uU6rhp+DVaNan1JKJvmuAZ+MCpszAO8G9sUEPVE9O5GONrIw== X-Received: by 2002:a05:6a00:c89:b0:543:edb9:9dbc with SMTP id a9-20020a056a000c8900b00543edb99dbcmr9373400pfv.50.1663070019570; Tue, 13 Sep 2022 04:53:39 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:b45:b0:536:147d:f350 with SMTP id p5-20020a056a000b4500b00536147df350ls7240333pfo.0.-pod-prod-gmail; Tue, 13 Sep 2022 04:53:39 -0700 (PDT) X-Received: by 2002:aa7:910b:0:b0:537:cd65:e7d with SMTP id 11-20020aa7910b000000b00537cd650e7dmr32619304pfh.63.1663070018740; Tue, 13 Sep 2022 04:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663070018; cv=none; d=google.com; s=arc-20160816; b=koEM2IGqnjwopo15OZGf5iKGpeShN4jautk/sXCpdneqy8A6NqjRNPlG/6hWXkrJYc cdTDSFsRLrGGrvZGBZXrDtNept0Z4Htj3b7jLopZZ0qQ0wMgd/LSnmiT57edIcqdAFQw YT0VTG+8dBDR8fSAgdvJ7Pt2N6EFXbMbZAFyYCBw7B1LTRxaMFxF84mgtE6ILhwRJqb3 6tWIgT+CPiXEs6C8gV9meU4OAc7LhOthto13yjxmvLSc+CcaFU/KUYb5kffzo9R/q3ce fd6VcXWi5dah5kg+FQqZjus0/9wNRMBFQMIKRF/ryqdm/ipbmQtNH6PrFwyatVNMH+x9 QosQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NBKKsuzxRDcdjr0LEEw6WzyfA05sjJBdRBO9GsBumoI=; b=YLY+OEqsvqkXfriNMRSK/1+ISzK9tQufOje5o5xCYYDv9fbifeiBUuypxr3g/MVIN9 GDOQOg16rXfhqocHHqayF7pS3WU4hE+eEwKsWfapTy8oQEZzDzs2TUw/o1bfRqevw1/9 vxcQr8x44yjPSapoBmdK6gBoDb1iNLbIpO24ECrAC96o9U1KjU/+LARYXfomR7Qaxfms 0jrTQPXew9ap72KZ4HKsLSDbMV1k3g3saYgyFC3FFJ+W1ia+l9JzSY6xGgr1KqZC9kDM YNIxGOsPPmM2C6S2zVov5kpt9stMHF0w88x97aRpLwJ621/x5UJpX+dit7dm0EectcyS 6Z2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DBcFwGd2; spf=pass (google.com: domain of abbaraju.manojsai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id e7-20020a056a00162700b0053e55848551sor4855704pfc.46.2022.09.13.04.53.38 for (Google Transport Security); Tue, 13 Sep 2022 04:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of abbaraju.manojsai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: abbaraju.manojsai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DBcFwGd2; spf=pass (google.com: domain of abbaraju.manojsai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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