From patchwork Mon Dec 4 15:35:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 173443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2844894vqy; Mon, 4 Dec 2023 07:36:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEB+QLd6priJuxjBn5UZh+uc2nlAiaRRbYS1sDEYGd5Zw336f4GeF276EuPAninmm906MS2 X-Received: by 2002:a17:903:245:b0:1d0:ab2e:8e8e with SMTP id j5-20020a170903024500b001d0ab2e8e8emr1524559plh.82.1701704185318; Mon, 04 Dec 2023 07:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701704185; cv=none; d=google.com; s=arc-20160816; b=hKy0HtzY8oFXinA0d3MDWosPdXXFsBW8UbXEjEFKg2jfF/9UOAjpjKZWJYhy3HX4hp SjYe5Pi91xbTZTAYCXm7O1ynUQslNoOI1a0ScSUJoVSIrIFeWzr+9TwBjwEY/DyVFGTP F78rzSqUEYW0xHYYu7QiUYMKTK0/Uu//bDLJeBopznp03347M4lQlB4YvHLjEq8xH8cz hMfUF33V9jqzIgM7JySLIO8M95tJpBiTjRZGIrX04gMizsXco+Z05yuqpyHb1EEDep71 MzyaLbiNGXpmvkjsMU6txwe4EQvHvKkyGS79TSQLn5sMWUJBeHLhrZX/F7qARtIfrdZv Hoyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/JoGo3S5F18Eq5w0w9lKp48csF80CvWfgslipmXEQ2c=; fh=ZUK/zovZ3p9QBGC2x61y1qv8IqfQDcV6nzwDU9avA3I=; b=jzWCx7vdLdxG8mk58xX+Hw1TGcHGFIVKvWnH3lh/p6xjGiv2wpjuk0Q5myOG6IxuhZ Se2Txl7QO5ekOFWw0b9KGQo9nMIubedZKjhz1ghyAQNW5o4swHUV0sLjlIBbWyqaBL6/ 75qYjLp74X2dX8Ir9wtABj2/eETPm0odg68Jm0hqrwbXcC+tsJWWyvHda4b7+xk4Ih2/ FOXTWFpz6InNI85Nd394RYeLWOh6mpEKPXhrpXshCchydrsklPyttnuq2uQgg/O7xyu0 yDsmCHQj0R9LtKTgx7SBSNNaAYx6wICdQpQuFoWQv8R1s969LnGGcjzT9OR2r//4uI4P yDjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gu7t4MeC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j1-20020a170902da8100b001d067cf31c5si4982363plx.197.2023.12.04.07.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 07:36:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gu7t4MeC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 78448804BC0D; Mon, 4 Dec 2023 07:36:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234738AbjLDPgB (ORCPT + 99 others); Mon, 4 Dec 2023 10:36:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343863AbjLDPfv (ORCPT ); Mon, 4 Dec 2023 10:35:51 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B13DEB6; Mon, 4 Dec 2023 07:35:57 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50be4f03b06so2283261e87.0; Mon, 04 Dec 2023 07:35:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701704156; x=1702308956; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/JoGo3S5F18Eq5w0w9lKp48csF80CvWfgslipmXEQ2c=; b=Gu7t4MeCPDrZk4OKjyxBPv+UftGzNOrpS3DbZ1JOx7KxfcVcZ6P1CDBg4XpPx/3UXR SIZG2MobKhyp7Dlz1VQxwOvr+yVWrmALoa9KcRNiZ4GDYbGEiMaPZQeyrznDToHZFx8q 6MZZTJNHImqxQkOlyjgVEt3WJvE3VLbvphfVNd/PfbRIpCsfbKks5wLEchmk8TP4He1/ 4cnv9D0XhVAWAl9OMx2YC6OJb20TSp23s5KcqL8aoJjKoRfZeiJPGrgP2UyxtvcEthU/ qp8nMSrGTfCnH6rgdZEmZs5D66Inq0dCMHrvTMkMqWGym87xWekmsOjtXlY3r3uSPydt XzEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701704156; x=1702308956; 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:message-id:reply-to; bh=/JoGo3S5F18Eq5w0w9lKp48csF80CvWfgslipmXEQ2c=; b=MJAUcPhjNyHxi5fHG3ibj71llJ/1E4bBuui/UZU6a6kOjS1+BQHkpxONN+UoYGwiwM kfJhwBEJRwfgkDc7YUFOBswKcdgoONYs6UaaHEdNpoa5Ej3dInr2HRtxgW9bmib+H29e 1aadFkrT+WLiNxYVCIJW0nCvP4c94L4uWabEyuS6nQKfdXE2zoXCZ7NYkeSz6NxyD5zK pMVxgdb0dLm8AANAST27quBSSKrphrDw8bhOZlDmSXfMs7Nep7PLL97a5d6PDUTs8e4F sgWhrfWDp7tofbTb/bkv0iPdx7rd7SrtFqD8gtYAl1FEO80q3iitvB/EVa/To24WjVg3 hBjg== X-Gm-Message-State: AOJu0YyIPkuYeGb4AAwjFi0PFHQRYnfJQTGKiTYxHvFG2opdLi/4nPxU O/Ev+npVgZDHAn8ns1KC2w== X-Received: by 2002:ac2:546d:0:b0:50b:c977:106a with SMTP id e13-20020ac2546d000000b0050bc977106amr1765730lfn.51.1701704155343; Mon, 04 Dec 2023 07:35:55 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:55ff:210b:5393:c9d7]) by smtp.gmail.com with ESMTPSA id h20-20020a05640250d400b0054c77ac01f4sm693194edb.51.2023.12.04.07.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 07:35:55 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Bee Subject: [PATCH v3 1/3] ARM: dts: rockchip: Add power-controller for RK3128 Date: Mon, 4 Dec 2023 16:35:45 +0100 Message-ID: <20231204153547.97877-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231204153547.97877-1-knaerzche@gmail.com> References: <20231204153547.97877-1-knaerzche@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 04 Dec 2023 07:36:17 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784366167681997699 X-GMAIL-MSGID: 1784366167681997699 Add power controller and qos nodes for RK3128 in order to use them as powerdomains. Signed-off-by: Alex Bee --- arch/arm/boot/dts/rockchip/rk3128.dtsi | 88 ++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index c0c9f0eaffa3..0676d8b22a1e 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include / { compatible = "rockchip,rk3128"; @@ -133,6 +134,93 @@ smp-sram@0 { pmu: syscon@100a0000 { compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; reg = <0x100a0000 0x1000>; + + power: power-controller { + compatible = "rockchip,rk3128-power-controller"; + #power-domain-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + power-domain@RK3128_PD_VIO { + reg = ; + clocks = <&cru ACLK_CIF>, + <&cru HCLK_CIF>, + <&cru DCLK_EBC>, + <&cru HCLK_EBC>, + <&cru ACLK_IEP>, + <&cru HCLK_IEP>, + <&cru ACLK_LCDC0>, + <&cru HCLK_LCDC0>, + <&cru PCLK_MIPI>, + <&cru ACLK_RGA>, + <&cru HCLK_RGA>, + <&cru ACLK_VIO0>, + <&cru ACLK_VIO1>, + <&cru HCLK_VIO>, + <&cru HCLK_VIO_H2P>, + <&cru DCLK_VOP>, + <&cru SCLK_VOP>; + pm_qos = <&qos_ebc>, + <&qos_iep>, + <&qos_lcdc>, + <&qos_rga>, + <&qos_vip>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_VIDEO { + reg = ; + clocks = <&cru ACLK_VDPU>, + <&cru HCLK_VDPU>, + <&cru ACLK_VEPU>, + <&cru HCLK_VEPU>, + <&cru SCLK_HEVC_CORE>; + pm_qos = <&qos_vpu>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_GPU { + reg = ; + clocks = <&cru ACLK_GPU>; + pm_qos = <&qos_gpu>; + #power-domain-cells = <0>; + }; + }; + }; + + qos_gpu: qos@1012d000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012d000 0x20>; + }; + + qos_vpu: qos@1012e000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012e000 0x20>; + }; + + qos_rga: qos@1012f000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f000 0x20>; + }; + + qos_ebc: qos@1012f080 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f080 0x20>; + }; + + qos_iep: qos@1012f100 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f100 0x20>; + }; + + qos_lcdc: qos@1012f180 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f180 0x20>; + }; + + qos_vip: qos@1012f200 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f200 0x20>; }; gic: interrupt-controller@10139000 {