Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1276386lqh; Mon, 6 May 2024 02:39:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCtfcpxQVnqCA15iLBNX98Mn4IDxCtWmU0sVgSIJNzIFOAAad4cOjEhLeXQECzdRR4+TS8c+TYX3/zelZC6WD4MUMHzLBNNk+TPFdO6g== X-Google-Smtp-Source: AGHT+IE0URMjicnlJcHPmuNae0xXnVvWOkRqQKfWi6TDp2q7JC0jL8EtMExm5Y2D85wu+lglicGy X-Received: by 2002:a05:6214:19c6:b0:6a0:caef:3be2 with SMTP id j6-20020a05621419c600b006a0caef3be2mr11791914qvc.46.1714988355639; Mon, 06 May 2024 02:39:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714988355; cv=pass; d=google.com; s=arc-20160816; b=ZCe6VatDnJZBd7bOEM+8rRymGZ1mmSaF6edwk7nVvd/XH6AxTZoe+mMsY3s+5Qzjeh 7NOCG96wl6ZoJjKq+hCef0CPfRAze/sX/EG8bLvoCQ75LXuTSfwZA4ofUgBNYpQEzJzq p5+3aXiKLYtDjH5+75urVqKNP99O8FUOi4LekVqBq/ELV6OEj1mn4xt1RlScM3fcjviX aGeZXz4VQgPDmRioSuyJc/lG7nNHP/KMA+gb+rg2fVCHxAc3sSFjXCRVlueAJBRSnpWo zr+X6yGS4Zg8LBBvnqp6et6HIZ2NdlgXuFrLyh6CJv69SaLCO1fqh7ORbGRiBzt2ScF8 QBHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=YwJQ8VUdBqnfny8gTVz/c10Fv5YxuURKySJ0zdXA/+A=; fh=MnnYHc6ShAUK5qCfZcsgbD95h2T7RQqqlkDSSOsv2BM=; b=kpsuICBWBL0DFmEqWbCZSXVOf/dkTG18W153IOOnFpdalwh0rXD5bPjW3Rwnhh0qvp OeYHnhBLZKsk9gBoHpRUEcf+8gU/vJDTsAX9O7GOrtvvXQjgZRjC5a5wL4A1FYdnVgJy Z0I64z6bep1i3bba2dCJYW4MipsFXccMkuIOj2NOmiIelCqIJQmo6M/L0LugeL7TVDAA 3hSbI+9WmnjQVfClsAffN4fVOvplJYW8I53hs6ldf/DAUOs4hz6Cxo7aiekH1YdMuzqW 147OXp05E5sS+fYONtc7rJeGYRDHfSOJ9uicrtlEv4wxdK/KXV53joEfm8/7QcTmbeuu H5vQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yxtw0ROf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-169587-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169587-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 11-20020a05621420ab00b006a0cd8de03fsi8689430qvd.418.2024.05.06.02.39.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 02:39:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169587-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yxtw0ROf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-169587-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169587-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4381E1C21E80 for ; Mon, 6 May 2024 09:39:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28DAC142905; Mon, 6 May 2024 09:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yxtw0ROf" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A785143892; Mon, 6 May 2024 09:37:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714988250; cv=none; b=Hxy52QDtPTH48N/mcZxt4aU5Su7lTtPZfilEpmTE3447eUhd+EJZZp11cR31pnmM620tC7KJnjbRLkO8/Fx9UK7stBG8dGCNcvvTNWJG+R6WAS3BH+h1syHuQYFDrprQ8O5OfoyCIc+hqwyG8dvyUqqtgB5MbdQEMKyn6SFkuD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714988250; c=relaxed/simple; bh=hRIkjs6ilNO5CkTYJyMd31t+JYZiL+ZsbuuDrU+GbqI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kZu/CWsARmkKfA7Sew3f5kZPZZ8qE33QcqUbRJ6HDHrStSSjqOZpTuW2r5ml/zuAuYxwOMEh9TfljIOZSO4kJ5PoIOoXTE73zA/q7OM6IW0IsWjNOq1bJStCmGu7oPABC33/ppfVQc4xC2D0hg/y71oLwLZy8IuVMxp8ozixlxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Yxtw0ROf; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a59cdf7cd78so171182366b.0; Mon, 06 May 2024 02:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714988247; x=1715593047; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YwJQ8VUdBqnfny8gTVz/c10Fv5YxuURKySJ0zdXA/+A=; b=Yxtw0ROfMjjwlnqtFzIH3nXb1zs6MPxduC0Xcttn6UFqv7eoQxdEYUbNpPNPPwwIfE Hg1nnBXbptdbKX5vXOm8Pkw5LGaNMTMangyOYanBX3erVXojFbH522yAwMOIJ7D7dIPp IFntmbk0jLlggab4lQm2UbWV9sH/Ni343+vb09x2hO1frRhsOjnMvwgWM08Rybf0xyHq TMmh0fJJrMrJcEStobCBIoPDIhKciRyVu5g+YwaXCOXFpG4nfTA2C8UEwH9oUmL+lr1M BWaZvRbHpaWCbXjJsx75tcqVDFTI3vCGC0V/G1T+ro4Xl/kqVSiwg02Rsi9jZniUOWaY TVPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714988247; x=1715593047; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YwJQ8VUdBqnfny8gTVz/c10Fv5YxuURKySJ0zdXA/+A=; b=DSuw2T3AnddrDr6xxgmQwzyDMEwmtRciID6jsdUqk36aXddcJubwwe7EtGianGHmEI U76M78qXW5nvR91BJAxHL0rveKSjQNRikl76jag5KlZFnQ/j1NKdpL01m/hjw05qiluM X3D3KxB46ibMZwufgye+ZY6fzwHSEBNj9+wdpxfLrXmKeB3/teLhdnbRK6RNeKScUU0Z Pe0ONtESat9HGeVGeoeftejRZ/hYdD1xwjgjGrrdtBHZy/Tytn3mzSpaduiTiUtMgbnt HsgVIKTaedas+hcDWtadOYb3hSAzTIqrU0MxPClNklEdGs2aRZfTwRzxkpv9Q/4QoIYU MCXg== X-Forwarded-Encrypted: i=1; AJvYcCXy0XkbxE2cSnaBKfWse/OmGxoMhi9j0f3dwvS4K3spGbyovgJ23dM0k+szgmneL/rDjK/0A6zWNmVkQzHbzFvBAbBb4kiGLcPqpUsMC5FxLbV70LFIagd9vFFN7U3+V7o4iTZQsMffFg== X-Gm-Message-State: AOJu0YxW59blUdXNXcEJvVnzIc93KCUlVJj3+gor1M7Lo9pYqsEd6xcv XPxBNjK9pNG3/tgzvNbbuiprSrxj+rb4vaiq+t1jz+1CQb84Vmc6 X-Received: by 2002:a50:ab1a:0:b0:572:a16f:29b with SMTP id s26-20020a50ab1a000000b00572a16f029bmr5508587edc.16.1714988246738; Mon, 06 May 2024 02:37:26 -0700 (PDT) Received: from [172.30.32.119] ([2001:8f8:183b:f2c::d35]) by smtp.gmail.com with ESMTPSA id f6-20020a056402160600b005722ce89ae2sm4983647edv.38.2024.05.06.02.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 02:37:26 -0700 (PDT) From: Alexey Charkov Date: Mon, 06 May 2024 13:36:36 +0400 Subject: [PATCH v4 5/6] arm64: dts: rockchip: Add CPU/memory regulator coupling for RK3588 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240506-rk-dts-additions-v4-5-271023ddfd40@gmail.com> References: <20240506-rk-dts-additions-v4-0-271023ddfd40@gmail.com> In-Reply-To: <20240506-rk-dts-additions-v4-0-271023ddfd40@gmail.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Daniel Lezcano , Dragan Simic , Viresh Kumar , Chen-Yu Tsai , Diederik de Haas , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alexey Charkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714988224; l=5927; i=alchark@gmail.com; s=20240125; h=from:subject:message-id; bh=hRIkjs6ilNO5CkTYJyMd31t+JYZiL+ZsbuuDrU+GbqI=; b=XVssbaVtYFgNJD/XqYSrTYailN5Ixj2qPGOg//g6Locd7JznRCRUL/ireurFFFp18tnJlooDf tXw2RHepzHuAmunHqLkS8cBfLNJvwfiLch3E3gsH6QRKwVokgZS+b30 X-Developer-Key: i=alchark@gmail.com; a=ed25519; pk=xRO8VeD3J5jhwe0za0aHt2LDumQr8cm0Ls7Jz3YGimk= RK3588 chips allow for their CPU cores to be powered by a different supply vs. their corresponding memory interfaces, and two of the boards currently upstream do that (EVB1 and QuartzPro64). The voltage of the memory interface though has to match that of the CPU cores that use it, which downstream kernels achieve by the means of a custom cpufreq driver which adjusts both at the same time. It seems that regulator coupling is a more appropriate generic interface for it, so this patch introduces coupling to affected device trees to ensure that memory interface voltage is also updated whenever cpufreq switches between CPU OPPs. Note that other boards, such as Radxa Rock 5B, define both the CPU and memory interface regulators as aliases to the same DT node, so this doesn't apply there. Signed-off-by: Alexey Charkov --- arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 12 ++++++++++++ arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts index 7c3696a3ad3a..00f660d50127 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts @@ -878,6 +878,8 @@ regulators { vdd_cpu_big1_s0: dcdc-reg1 { regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big1_mem_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <550000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -890,6 +892,8 @@ regulator-state-mem { vdd_cpu_big0_s0: dcdc-reg2 { regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big0_mem_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <550000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -902,6 +906,8 @@ regulator-state-mem { vdd_cpu_lit_s0: dcdc-reg3 { regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_lit_mem_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <550000>; regulator-max-microvolt = <950000>; regulator-ramp-delay = <12500>; @@ -926,6 +932,8 @@ regulator-state-mem { vdd_cpu_big1_mem_s0: dcdc-reg5 { regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big1_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -939,6 +947,8 @@ regulator-state-mem { vdd_cpu_big0_mem_s0: dcdc-reg6 { regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big0_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -963,6 +973,8 @@ regulator-state-mem { vdd_cpu_lit_mem_s0: dcdc-reg8 { regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_lit_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <675000>; regulator-max-microvolt = <950000>; regulator-ramp-delay = <12500>; diff --git a/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts b/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts index b4f22d95ac0e..baeb08d665c7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts @@ -832,6 +832,8 @@ vdd_cpu_big1_s0: dcdc-reg1 { regulator-name = "vdd_cpu_big1_s0"; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big1_mem_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <550000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -845,6 +847,8 @@ vdd_cpu_big0_s0: dcdc-reg2 { regulator-name = "vdd_cpu_big0_s0"; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big0_mem_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <550000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -858,6 +862,8 @@ vdd_cpu_lit_s0: dcdc-reg3 { regulator-name = "vdd_cpu_lit_s0"; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_lit_mem_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <550000>; regulator-max-microvolt = <950000>; regulator-ramp-delay = <12500>; @@ -884,6 +890,8 @@ vdd_cpu_big1_mem_s0: dcdc-reg5 { regulator-name = "vdd_cpu_big1_mem_s0"; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big1_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -898,6 +906,8 @@ vdd_cpu_big0_mem_s0: dcdc-reg6 { regulator-name = "vdd_cpu_big0_mem_s0"; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_big0_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>; regulator-ramp-delay = <12500>; @@ -924,6 +934,8 @@ vdd_cpu_lit_mem_s0: dcdc-reg8 { regulator-name = "vdd_cpu_lit_mem_s0"; regulator-always-on; regulator-boot-on; + regulator-coupled-with = <&vdd_cpu_lit_s0>; + regulator-coupled-max-spread = <10000>; regulator-min-microvolt = <675000>; regulator-max-microvolt = <950000>; regulator-ramp-delay = <12500>; -- 2.45.0