From patchwork Mon Jan 30 14:57:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1734125 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 (2048-bit key; unprotected) header.d=edgeble-ai.20210112.gappssmtp.com header.i=@edgeble-ai.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=rn3L9MHS; 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 4P5BK72Rm6z1yhq for ; Tue, 31 Jan 2023 02:03:55 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CBCCC85948; Mon, 30 Jan 2023 16:02:19 +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="rn3L9MHS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DA0CF857F8; Mon, 30 Jan 2023 15:58:15 +0100 (CET) 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,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (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 79C138575F for ; Mon, 30 Jan 2023 15:58:10 +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-x1033.google.com with SMTP id m11so11354262pji.0 for ; Mon, 30 Jan 2023 06:58:10 -0800 (PST) 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=uQ5nh1ApNZCtuC+WJEaCNwwTRXMrE9B5KFnavKcrmTw=; b=rn3L9MHSUZ52k9ecJElOeycyrQdJVcGJlMc4HDDEcpx1b1ZQxtRI81QHkpkz+OYXC1 mJtn/8Eo4nKNZaeA6x5XzA4MqEArKsI1nfOKL7d23ogAcW1AyXQAEdEa6IhvqK/quB4m KS7QeflLnQju9HjkpshU6BCurbUIDDxDr74PYO8rViw+1YX5JZ6OYYxEEZkunbkabftT hRIwoDo2JH9xFy0no87wrlMAHUtwXiE7NVoCYSL3iBqjrD36pvts7wtcdu4dXuHhWYI0 cG9Bd8sGImkfQb8XK1CBGFXG47rmyRhDkzGKxSyAfZsw5tgmFzECQInfjB0aBW3wkKQR Wziw== 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=uQ5nh1ApNZCtuC+WJEaCNwwTRXMrE9B5KFnavKcrmTw=; b=gdjamxS3xFb20/XI51MPq8nEoayMMyqM14kvjm1VTREwPElSu+1TG2Yg4swBAgglLJ Yw65l9q8wDzzlqVVGJHU+3wv9j037zJgJt6yiVngSJEO4LhWnHbXdlWTfPopONxm4jGZ 2KrVispYpIgrOk3VeAQRoLDECd90dDBrUzekxNH0KdSVEeQhy2R5kAKMEMkR4m0asVQ4 kQPAXpEByxZv9Y7XGKc1Niry5ANT1W2BOwm8aezupJP/m4jnLv4MzBgvFwZL/P+ExwfU ZB80oy0dhu0vhhJnCfvQ48/OpQdJsimk7koOTw+YtmSgnL6fgwn3GdACoBZu2vILFeoU Qm7Q== X-Gm-Message-State: AO0yUKU3ULCOSrtikaCvi2Ay8VGZ3/6haIZncwdmNh3c+BQIbSP3ZyNT 26PUL0f3ulM2c74jJqgpZHfxWw== X-Google-Smtp-Source: AK7set9FZeUsXN8hAAmpv5Mcw2bnAVB3CiTkYMNeVZzeVcz7fWxBzangVeSu49CKYOHJqDFqxaxlZQ== X-Received: by 2002:a17:902:ce8d:b0:196:5ede:af8a with SMTP id f13-20020a170902ce8d00b001965edeaf8amr11251449plg.29.1675090688521; Mon, 30 Jan 2023 06:58:08 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a238:7d50:367e:d8d1:8afd]) by smtp.gmail.com with ESMTPSA id q19-20020a656853000000b004d09bbd023csm6916127pgt.88.2023.01.30.06.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 06:58:08 -0800 (PST) From: Jagan Teki To: Kever Yang , Jonas Karlman , Simon Glass , Philipp Tomsich , fatorangecat@189.cn Cc: u-boot@lists.denx.de, Jagan Teki Subject: [PATCH v1 00/18] arm: Add Rockchip RK3588 support Date: Mon, 30 Jan 2023 20:27:31 +0530 Message-Id: <20230130145749.177515-1-jagan@edgeble.ai> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 series support Rockchip RK3588. All the device tree files are synced from linux-next with the proper SHA1 mentioned in the commit messages. Thanks for Jonas Karlman for contributing the binman and mkimage fixes and also for giving sdmmc clock clue. This series added RK3588 to boot from SDMMC and added a sdmmc node in -u-boot.dtsi. Two clear assumptions are made here to boot from SDMMC working here, 1. clock properties as added in sdmmc node is according to the rockchip mmc driver 2. support SCLK_SDMMC_SAMPLE in set_rate and do-nothing. Note: This sdmmc node definition will drop once the actual node supported in Linux kernel. and set_rate for given clock might change or it might be scmi clock. Tested in Edgeble Neural Compute Module 6. Repo: https://github.com/edgeble/u-boot/commits/neu6a-v1 Previous patchset: https://patchwork.ozlabs.org/project/uboot/cover/20230125222741.303259-1-jagan@edgeble.ai/ Any inputs? Jagan. Jagan Teki (18): rockchip: mkimage: Add rk3588 support arm: rockchip: Add cru header for rk3588 arm: rockchip: Add grf header for rk3588 dt-bindings: clk: Add dt-binding header for RK3588 clk: rockchip: Add rk3588 clk support clk: rockchip: pll: Add pll_rk3588 type for rk3588 ram: rockchip: Add rk3588 ddr driver support dt-bindings: power: Add power-domain header for rk3588 dt-bindings: reset: add rk3588 reset definitions arm: rockchip: Add ioc header for rk3588 arm64: dts: rockchip: Add base DT for rk3588 SoC arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A SoM arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A IO arm: rockchip: Add RK3588 arch core support ARM: dts: rockchip: Add rk3588-u-boot.dtsi ARM: dts: rockchip: rk3588s-u-boot: Add sdmmc node clk: rockchip: rk3588: Support set_rate for SCLK_SDMMC_SAMPLE board: rockchip: Add Edgeble Neural Compute Module 6 arch/arm/dts/Makefile | 3 + .../dts/rk3588-edgeble-neu6a-io-u-boot.dtsi | 24 + arch/arm/dts/rk3588-edgeble-neu6a-io.dts | 27 + arch/arm/dts/rk3588-edgeble-neu6a.dtsi | 32 + arch/arm/dts/rk3588-pinctrl.dtsi | 516 +++ arch/arm/dts/rk3588-u-boot.dtsi | 7 + arch/arm/dts/rk3588.dtsi | 58 + arch/arm/dts/rk3588s-pinctrl.dtsi | 3403 +++++++++++++++++ arch/arm/dts/rk3588s-u-boot.dtsi | 59 + arch/arm/dts/rk3588s.dtsi | 1703 +++++++++ arch/arm/include/asm/arch-rk3588/boot0.h | 11 + arch/arm/include/asm/arch-rk3588/gpio.h | 11 + arch/arm/include/asm/arch-rockchip/clock.h | 24 + .../include/asm/arch-rockchip/cru_rk3588.h | 451 +++ .../include/asm/arch-rockchip/grf_rk3588.h | 35 + .../include/asm/arch-rockchip/ioc_rk3588.h | 101 + arch/arm/mach-rockchip/Kconfig | 20 + arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3588/Kconfig | 30 + arch/arm/mach-rockchip/rk3588/Makefile | 9 + arch/arm/mach-rockchip/rk3588/clk_rk3588.c | 32 + arch/arm/mach-rockchip/rk3588/rk3588.c | 162 + arch/arm/mach-rockchip/rk3588/syscon_rk3588.c | 32 + board/edgeble/neural-compute-module-6/Kconfig | 15 + .../neural-compute-module-6/MAINTAINERS | 6 + .../edgeble/neural-compute-module-6/Makefile | 7 + board/edgeble/neural-compute-module-6/neu6.c | 4 + configs/neu6a-io-rk3588_defconfig | 67 + doc/board/rockchip/rockchip.rst | 2 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk_pll.c | 267 +- drivers/clk/rockchip/clk_rk3588.c | 1998 ++++++++++ drivers/ram/rockchip/Makefile | 1 + drivers/ram/rockchip/sdram_rk3588.c | 57 + include/configs/neural-compute-module-6.h | 15 + include/configs/rk3588_common.h | 32 + .../dt-bindings/clock/rockchip,rk3588-cru.h | 766 ++++ include/dt-bindings/power/rk3588-power.h | 69 + .../dt-bindings/reset/rockchip,rk3588-cru.h | 754 ++++ tools/rkcommon.c | 1 + 40 files changed, 10810 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi create mode 100644 arch/arm/dts/rk3588-edgeble-neu6a-io.dts create mode 100644 arch/arm/dts/rk3588-edgeble-neu6a.dtsi create mode 100644 arch/arm/dts/rk3588-pinctrl.dtsi create mode 100644 arch/arm/dts/rk3588-u-boot.dtsi create mode 100644 arch/arm/dts/rk3588.dtsi create mode 100644 arch/arm/dts/rk3588s-pinctrl.dtsi create mode 100644 arch/arm/dts/rk3588s-u-boot.dtsi create mode 100644 arch/arm/dts/rk3588s.dtsi create mode 100644 arch/arm/include/asm/arch-rk3588/boot0.h create mode 100644 arch/arm/include/asm/arch-rk3588/gpio.h create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3588.h create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk3588.h create mode 100644 arch/arm/include/asm/arch-rockchip/ioc_rk3588.h create mode 100644 arch/arm/mach-rockchip/rk3588/Kconfig create mode 100644 arch/arm/mach-rockchip/rk3588/Makefile create mode 100644 arch/arm/mach-rockchip/rk3588/clk_rk3588.c create mode 100644 arch/arm/mach-rockchip/rk3588/rk3588.c create mode 100644 arch/arm/mach-rockchip/rk3588/syscon_rk3588.c create mode 100644 board/edgeble/neural-compute-module-6/Kconfig create mode 100644 board/edgeble/neural-compute-module-6/MAINTAINERS create mode 100644 board/edgeble/neural-compute-module-6/Makefile create mode 100644 board/edgeble/neural-compute-module-6/neu6.c create mode 100644 configs/neu6a-io-rk3588_defconfig create mode 100644 drivers/clk/rockchip/clk_rk3588.c create mode 100644 drivers/ram/rockchip/sdram_rk3588.c create mode 100644 include/configs/neural-compute-module-6.h create mode 100644 include/configs/rk3588_common.h create mode 100644 include/dt-bindings/clock/rockchip,rk3588-cru.h create mode 100644 include/dt-bindings/power/rk3588-power.h create mode 100644 include/dt-bindings/reset/rockchip,rk3588-cru.h