Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BE7CC4332F for ; Thu, 3 Nov 2022 06:36:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5C32D850AC; Thu, 3 Nov 2022 07:36:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=edgeble.ai Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=edgeble-ai.20210112.gappssmtp.com header.i=@edgeble-ai.20210112.gappssmtp.com header.b="7svP1yb/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0425784F6E; Thu, 3 Nov 2022 07:36:20 +0100 (CET) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 2519A84374 for ; Thu, 3 Nov 2022 07:36:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=edgeble.ai Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jagan@edgeble.ai Received: by mail-pj1-x102d.google.com with SMTP id m6-20020a17090a5a4600b00212f8dffec9so993115pji.0 for ; Wed, 02 Nov 2022 23:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edgeble-ai.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KapAB9CFvZ/yKAOhmZU4903E+iEnXRwTwvh1cre9Me8=; b=7svP1yb/1Qq89tKi+ZU/nEftNTtDh4KiV4oDw8tM4csZN7635ZqF2M/wBk9QVTl3Sh 1b8l8kM70B4Ae/oW1qpVtr9uzUhAlNiYa4hZl6jvZO3lCmeYwpAiFhSnCndMWCAg6+ER ATZkP/9lA9aKTXuez5w7lF3zgZdECYDhsxfWnzWdbLSQ5p0dsRqqT0Ywkkqgp/Askznl 329mzoDCWZXG/u2QtAxernPu95l1XYHJFL3HXLHLqNg0eAf4ds4xi+MEISwafN+MTEcs FJcM7nTe1xjYmXOtHZgnyT4dsUdIOwfc4B6K3eeHl24Ykq0flu/5Ckwre6C0ckmq4O3f TF8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KapAB9CFvZ/yKAOhmZU4903E+iEnXRwTwvh1cre9Me8=; b=MtHwKSzqwq5jK1Bnw5847cx0ngRND+5jCxHmNU85tdDUZaYH7jMPIIvZXAWfD7rqyj WIh/MKZyeOBX4yKASNJQQopA7wG+SGiAiMUqPGtGrddBt3ii2FW0y4VjbNLb8dH366oA x2/ILZXTv01URCxkY5T9pXLWxL7IWdhz+TlKUon70wGv2yC0tZJ7hhM3fd9HcxuB0A7E f/CAMlAIOFimVhK1xJCpPRvnjA0hnGtTxUbQMMIZwfgnamJRBKRYSTuSUmRRapZcp9BA nCybTmUZVd9iaOIZr1DQTE9FciIGqkKlgU5se8m5YPeaKjzIMb1CvWpWvkuXFFYoHI6J No+A== X-Gm-Message-State: ACrzQf3E/if3NUTsqUa1YqOq4SSSQuLcv8/dNNufDENARGlkiUi2wyI8 sW6CK6nKbeNHq9sxQ767LbNSew== X-Google-Smtp-Source: AMsMyM4k7P4KB8lWdAAUDSQ/hYyblqNckRYVWq7xoBC/Dgn4/JzK/f9etrvGxDapcFXjBnmiK9uDPg== X-Received: by 2002:a17:902:d2cf:b0:187:1327:58af with SMTP id n15-20020a170902d2cf00b00187132758afmr23694945plc.88.1667457375414; Wed, 02 Nov 2022 23:36:15 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a809:3a79:b5a5:9718:3f91]) by smtp.gmail.com with ESMTPSA id q2-20020aa79822000000b0056bd59eaef0sm9149156pfl.4.2022.11.02.23.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 23:36:15 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: u-boot@lists.denx.de, Jagan Teki Subject: [PATCH v3 00/25] ARM: Add Rockchip RV1126 support Date: Thu, 3 Nov 2022 12:05:22 +0530 Message-Id: <20221103063531.854326-1-jagan@edgeble.ai> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 RV1126 is a high-performance vision processor SoC for IPC/CVR, especially for AI related application. This patch series add basic core support for Rockchip RV1126 and boot from eMMC and SD. Tested RV1126 in Edgeble Neural Compute Module 2. Changes for v3: - dropped px30 SPL size change patch - rebased on linux-next - collect Kever r-b Any inputs? Jagan. Jagan Teki (25): ram: Mark ram-uclass depend on TPL_DM or SPL_DM ram: rockchip: Add common ddr type configs ram: rockchip: Compute ddr capacity based on grf split ram: rockchip: Update ddr pctl regs for px30 ram: rockchip: Add rv1126 ddr3 support ram: rockchip: Add rv1126 ddr loader params ram: rockchip: Add rv1126 ddr driver support ram: rockchip: rv1126: Control ddr init prints via DEBUG ram: rockchip: Add rv1126 lpddr4 support pinctrl: rockchip: Add pinctrl route types pinctrl: rockchip: Add rv1126 support arch: rockchip: Add cru header for rv1126 dt-bindings: clk: Add dt-binding header for RV1126 clk: rockchip: Add rv1126 clk support dt-bindings: power: Add power-domain header for rv1126 arm: rockchip: Add grf header for rv1126 ARM: dts: rockchip: Add Rockchip RV1126 pinctrl ARM: dts: rockchip: Add Rockchip RV1126 SoC arm: rockchip: Add RV1126 arch core support arm: rockchip: rv1126: Set dram area unsecure for SPL rockchip: mkimage: Add rv1126 support ARM: dts: rockchip: rv1126: Add Edgeble Neural Compute Module 2(Neu2) ARM: dts: rockchip: rv1126: Add Edgeble Neural Compute Module 2(Neu2) IO ARM: dts: rockchip: Add rv1126-u-boot.dtsi board: rockchip: Add Edgeble Neu2 IO Board arch/arm/dts/Makefile | 3 + .../dts/rv1126-edgeble-neu2-io-u-boot.dtsi | 10 + arch/arm/dts/rv1126-edgeble-neu2-io.dts | 38 + arch/arm/dts/rv1126-edgeble-neu2.dtsi | 353 ++ arch/arm/dts/rv1126-pinctrl.dtsi | 212 + arch/arm/dts/rv1126-u-boot.dtsi | 63 + arch/arm/dts/rv1126.dtsi | 439 ++ .../include/asm/arch-rockchip/cru_rv1126.h | 459 +++ .../asm/arch-rockchip/dram_spec_timing.h | 452 +++ .../include/asm/arch-rockchip/grf_rv1126.h | 251 ++ .../include/asm/arch-rockchip/sdram_common.h | 214 +- .../include/asm/arch-rockchip/sdram_msch.h | 12 + .../asm/arch-rockchip/sdram_pctl_px30.h | 100 +- .../asm/arch-rockchip/sdram_phy_rv1126.h | 93 + .../include/asm/arch-rockchip/sdram_rv1126.h | 420 ++ arch/arm/include/asm/arch-rv1126/boot0.h | 11 + arch/arm/include/asm/arch-rv1126/gpio.h | 11 + arch/arm/mach-rockchip/Kconfig | 46 + arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rv1126/Kconfig | 59 + arch/arm/mach-rockchip/rv1126/Makefile | 13 + arch/arm/mach-rockchip/rv1126/clk_rv1126.c | 33 + arch/arm/mach-rockchip/rv1126/rv1126.c | 75 + arch/arm/mach-rockchip/rv1126/syscon_rv1126.c | 47 + board/edgeble/neural-compute-module-2/Kconfig | 16 + .../neural-compute-module-2/MAINTAINERS | 6 + .../edgeble/neural-compute-module-2/Makefile | 7 + board/edgeble/neural-compute-module-2/neu2.c | 4 + board/engicam/px30_core/Kconfig | 2 +- common/spl/Kconfig.tpl | 2 +- configs/khadas-edge-captain-rk3399_defconfig | 2 +- configs/khadas-edge-rk3399_defconfig | 2 +- configs/khadas-edge-v-rk3399_defconfig | 2 +- configs/leez-rk3399_defconfig | 2 +- configs/nanopi-r4s-rk3399_defconfig | 2 +- configs/neu2-io-rv1126_defconfig | 56 + configs/pinebook-pro-rk3399_defconfig | 2 +- configs/roc-pc-mezzanine-rk3399_defconfig | 2 +- configs/roc-pc-rk3399_defconfig | 2 +- configs/rock-pi-4-rk3399_defconfig | 2 +- configs/rock-pi-4c-rk3399_defconfig | 2 +- configs/rockpro64-rk3399_defconfig | 2 +- doc/board/rockchip/rockchip.rst | 3 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk_rv1126.c | 1889 +++++++++ drivers/pinctrl/rockchip/Makefile | 1 + drivers/pinctrl/rockchip/pinctrl-px30.c | 11 +- drivers/pinctrl/rockchip/pinctrl-rk3128.c | 11 +- drivers/pinctrl/rockchip/pinctrl-rk322x.c | 11 +- drivers/pinctrl/rockchip/pinctrl-rk3288.c | 11 +- drivers/pinctrl/rockchip/pinctrl-rk3308.c | 11 +- drivers/pinctrl/rockchip/pinctrl-rk3328.c | 11 +- drivers/pinctrl/rockchip/pinctrl-rk3399.c | 11 +- .../pinctrl/rockchip/pinctrl-rockchip-core.c | 45 +- drivers/pinctrl/rockchip/pinctrl-rockchip.h | 58 +- drivers/pinctrl/rockchip/pinctrl-rv1126.c | 416 ++ drivers/ram/Makefile | 2 +- drivers/ram/rockchip/Kconfig | 32 +- drivers/ram/rockchip/Makefile | 1 + .../sdram-rv1126-ddr3-detect-1056.inc | 72 + .../rockchip/sdram-rv1126-ddr3-detect-328.inc | 72 + .../rockchip/sdram-rv1126-ddr3-detect-396.inc | 72 + .../rockchip/sdram-rv1126-ddr3-detect-528.inc | 72 + .../rockchip/sdram-rv1126-ddr3-detect-664.inc | 72 + .../rockchip/sdram-rv1126-ddr3-detect-784.inc | 72 + .../rockchip/sdram-rv1126-ddr3-detect-924.inc | 72 + .../rockchip/sdram-rv1126-loader_params.inc | 198 + .../sdram-rv1126-lpddr4-detect-1056.inc | 78 + .../sdram-rv1126-lpddr4-detect-328.inc | 78 + .../sdram-rv1126-lpddr4-detect-396.inc | 78 + .../sdram-rv1126-lpddr4-detect-528.inc | 78 + .../sdram-rv1126-lpddr4-detect-664.inc | 78 + .../sdram-rv1126-lpddr4-detect-784.inc | 78 + .../sdram-rv1126-lpddr4-detect-924.inc | 78 + drivers/ram/rockchip/sdram_common.c | 6 +- drivers/ram/rockchip/sdram_pctl_px30.c | 6 +- drivers/ram/rockchip/sdram_px30.c | 8 +- drivers/ram/rockchip/sdram_rk3328.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 9 +- drivers/ram/rockchip/sdram_rv1126.c | 3543 +++++++++++++++++ include/configs/neural-compute-module-2.h | 21 + include/configs/rv1126_common.h | 42 + .../dt-bindings/clock/rockchip,rv1126-cru.h | 632 +++ .../dt-bindings/power/rockchip,rv1126-power.h | 35 + tools/rkcommon.c | 1 + 85 files changed, 11481 insertions(+), 127 deletions(-) create mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io-u-boot.dtsi create mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts create mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi create mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi create mode 100644 arch/arm/dts/rv1126-u-boot.dtsi create mode 100644 arch/arm/dts/rv1126.dtsi create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rv1126.h create mode 100644 arch/arm/include/asm/arch-rockchip/dram_spec_timing.h create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rv1126.h create mode 100644 arch/arm/include/asm/arch-rockchip/sdram_phy_rv1126.h create mode 100644 arch/arm/include/asm/arch-rockchip/sdram_rv1126.h create mode 100644 arch/arm/include/asm/arch-rv1126/boot0.h create mode 100644 arch/arm/include/asm/arch-rv1126/gpio.h create mode 100644 arch/arm/mach-rockchip/rv1126/Kconfig create mode 100644 arch/arm/mach-rockchip/rv1126/Makefile create mode 100644 arch/arm/mach-rockchip/rv1126/clk_rv1126.c create mode 100644 arch/arm/mach-rockchip/rv1126/rv1126.c create mode 100644 arch/arm/mach-rockchip/rv1126/syscon_rv1126.c create mode 100644 board/edgeble/neural-compute-module-2/Kconfig create mode 100644 board/edgeble/neural-compute-module-2/MAINTAINERS create mode 100644 board/edgeble/neural-compute-module-2/Makefile create mode 100644 board/edgeble/neural-compute-module-2/neu2.c create mode 100644 configs/neu2-io-rv1126_defconfig create mode 100644 drivers/clk/rockchip/clk_rv1126.c create mode 100644 drivers/pinctrl/rockchip/pinctrl-rv1126.c create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-1056.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-328.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-396.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-528.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-664.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-784.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-ddr3-detect-924.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-loader_params.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-1056.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-328.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-396.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-528.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-664.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-784.inc create mode 100644 drivers/ram/rockchip/sdram-rv1126-lpddr4-detect-924.inc create mode 100644 drivers/ram/rockchip/sdram_rv1126.c create mode 100644 include/configs/neural-compute-module-2.h create mode 100644 include/configs/rv1126_common.h create mode 100644 include/dt-bindings/clock/rockchip,rv1126-cru.h create mode 100644 include/dt-bindings/power/rockchip,rv1126-power.h -- 2.25.1