From patchwork Mon Dec 18 11:05:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Cheo Fusi X-Patchwork-Id: 756211 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 677B019442; Mon, 18 Dec 2023 11:06:20 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rza79Msa" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a236456fee1so42358666b.1; Mon, 18 Dec 2023 03:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702897578; x=1703502378; 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=6LeaDDQj7Ki4b0Ekhl8dm8Jbb6kPpIVsluEl7LY+BBI=; b=Rza79Msa6QQ3/da4nn/wuWjVfrWBM7k0noWVKUkvgYPJk6KTLD3DH0FL9iaFkISPLN cShDNhi5zLFIDv7Bga+jg8MviGbybq1sA/NlX9/nfyV14Owd4sNY37Ni6+1vIWAvvGG4 Bkurrj+eUX4zPCxh9VDx+FyTaVAQFsaKzKclFh50KKsiFRNCOCIMdI7BkkM78lQ7xHjS VveEWBGSms/76Vwdtx+8cLtw1ADHTuY2UvKB9BIUX/8SFGYGxXZQdqusqhxIO/ONaA1t xaMW3h2A7ttFI5MP87p8dGrEHRFJ79sb8bTybi3xAOFSbWOmQdl03nSKl5c4imukMr4L uQ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702897578; x=1703502378; 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=6LeaDDQj7Ki4b0Ekhl8dm8Jbb6kPpIVsluEl7LY+BBI=; b=K2tqeV2Pctm1FIT5kosybvUAoodhDfB2TZMm1CjTI4Rj7BTyeCgup/HruWkav/gIlM CUXMFkamiwqJ9E43UVihdqgyZcusF7lIcc5SL8Bt74oramGBd9hSJE5uphpse5k8gt7z v2DfOWazX5sFW65pG6/mDZjctQ9+0LPuoiWdjPO0snm0PQLykr0P67VLOyv9gcTCpbWA OuLLF0nR1WM49cC+jOMmBR0Wd+0wvNzFFis6Z5OuxEoWiFLIRJ+Ci6THiWz+JlgSUPfG 0lbXvMkhYpAyvrtc0jO4fG4A+5wTNtKNEcSdg+q+IF0Vcf21wdomqNPbeQPySyiYayJx 2t1A== X-Gm-Message-State: AOJu0YxJoNO1DOEgIS5fu4aYMLw6rnyh0DIqHgqMMGOQMipJ62rg3IBA FuXnrZ4Fj8C4aZuoCGLbMZE= X-Google-Smtp-Source: AGHT+IGPZifkd//LzKxHy7u8xX0XqBW45bgrlj+EqkgnlzlL1DsOZUIoi9IVE+ojfJGXuEukc/v8NA== X-Received: by 2002:a17:906:74d5:b0:a23:65ec:8252 with SMTP id z21-20020a17090674d500b00a2365ec8252mr258761ejl.48.1702897578653; Mon, 18 Dec 2023 03:06:18 -0800 (PST) Received: from localhost.localdomain ([154.72.163.164]) by smtp.gmail.com with ESMTPSA id pj4-20020a170906d78400b00a2353af1f7bsm1406769ejb.92.2023.12.18.03.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:06:17 -0800 (PST) From: Brandon Cheo Fusi To: Yangtao Li , Viresh Kumar , Nishanth Menon , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Maxime Ripard Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Brandon Cheo Fusi Subject: [PATCH v2 1/5] riscv: dts: allwinner: Update opp table to allow CPU frequency scaling Date: Mon, 18 Dec 2023 12:05:39 +0100 Message-Id: <20231218110543.64044-2-fusibrandon13@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231218110543.64044-1-fusibrandon13@gmail.com> References: <20231218110543.64044-1-fusibrandon13@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Two OPPs are currently defined for the D1/D1s; one at 408MHz and another at 1.08GHz. Switching between these can be done with the "sun50i-cpufreq-nvmem" driver. This patch populates the opp table appropriately, inspired by https://github.com/Tina-Linux/linux-5.4/blob/master/arch/riscv/boot/dts/sunxi/sun20iw1p1.dtsi The supply voltages are PWM-controlled, but support for that IP is still in the works. So stick to a target vdd-cpu supply of 0.9V, which seems to be the default on most D1 boards. Signed-off-by: Brandon Cheo Fusi --- arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi index 64c3c2e6c..2f1771c19 100644 --- a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi @@ -39,16 +39,22 @@ cpu0_intc: interrupt-controller { }; opp_table_cpu: opp-table-cpu { - compatible = "operating-points-v2"; + compatible = "allwinner,sun20i-d1-operating-points", + "allwinner,sun50i-h6-operating-points"; + nvmem-cells = <&cpu_speed_grade>; + nvmem-cell-names = "speed"; + opp-shared; opp-408000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ opp-hz = /bits/ 64 <408000000>; - opp-microvolt = <900000 900000 1100000>; + opp-microvolt-speed0 = <900000 900000 1100000>; }; opp-1080000000 { + clock-latency-ns = <244144>; /* 8 32k periods */ opp-hz = /bits/ 64 <1008000000>; - opp-microvolt = <900000 900000 1100000>; + opp-microvolt-speed0 = <900000 900000 1100000>; }; }; @@ -115,3 +121,9 @@ pmu { <0x00000000 0x0000000f 0xffffffff 0xffffffff 0x00020000>; }; }; + +&sid { + cpu_speed_grade: cpu-speed-grade@0 { + reg = <0x00 0x2>; + }; +}; From patchwork Mon Dec 18 11:05:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Cheo Fusi X-Patchwork-Id: 755639 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 3F592199B2; Mon, 18 Dec 2023 11:06:33 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nl3VtVr6" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a2345aaeb05so130262666b.0; Mon, 18 Dec 2023 03:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702897591; x=1703502391; 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=E8/JnmQCAMS2cYksRjeaCp4G2NnTSXTyff3BziFBU7s=; b=nl3VtVr6BDStbfPZLMYexXd7g2bcfGMs6OUasXKEcnITBO2e0CutWtPzDF8RwAkNTR KdR41AkpgnF+yuMaDgWyixzl8nFvmJl8X5u49IBHtkRmoSJLoRT3GShqIn2qnnx2jNsc 15DaMp9ZfUKD9Tf8wrsA7y7DZnERZF7q5qyGl/oWaiTJQEdMKKITTuDuVdKdctqjxUoW x1bZesBFUXuP6Y3lRkqqJoP68WnYDuC99MXzesJQGo1ZQbxZUxARcJfwCrtNXxjIOUV2 P9m1BQgejx6Y0mBi5mJQNrAUJqIQ9pp2utaLwKLyD+GaW/aggOhZyxnyBhIAOwl3rIb5 uOWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702897591; x=1703502391; 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=E8/JnmQCAMS2cYksRjeaCp4G2NnTSXTyff3BziFBU7s=; b=MYLiNmMAuvt4TTq70834b0MiFHnhiOC6cT26jMEbX/SLSjYp4obgubyq5Sjw4bLe1e VrGq/+1SkhYkDvRDRZe4VQ542nZDT7DQ9CTExtNL7FMl176Q3i0bNoZNUWlSmmGsl2KC Fn3toTDpZU2v7AvYtCjy51MgJXS3msmEIgNYqXGMaXFBVw0TbU3vLR62cYmAeZUy8kGJ feBAmSh0Ky7DtSdMpWS0r4yMcoEovsiiXMvBtoBOryEw3BB13Np22qecR8Mz7oCqOfaX kF9vOw0hHS0LhV3RX0SySKJWyMK0XJtBsXJk0/cNwr/xWKr+XeePM6IZk2Ql6Vnyq9F5 DosQ== X-Gm-Message-State: AOJu0YyEriLUuG1EwOvzKglyr6HsShO3byX/CNqMWVbw8KGy3jQXHLoF i7OJ+jZsD2c0YlruBS4VL0M= X-Google-Smtp-Source: AGHT+IFf3fTdcqRMdf1nMW9QU6h5ioPHWtIwlndls7xDU+7sKH62DkfHYo+TKGbOTDX/dltHActCzw== X-Received: by 2002:a17:906:fd86:b0:a23:26e4:862a with SMTP id xa6-20020a170906fd8600b00a2326e4862amr2021405ejb.88.1702897591591; Mon, 18 Dec 2023 03:06:31 -0800 (PST) Received: from localhost.localdomain ([154.72.163.164]) by smtp.gmail.com with ESMTPSA id pj4-20020a170906d78400b00a2353af1f7bsm1406769ejb.92.2023.12.18.03.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:06:31 -0800 (PST) From: Brandon Cheo Fusi To: Yangtao Li , Viresh Kumar , Nishanth Menon , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Maxime Ripard Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Brandon Cheo Fusi Subject: [PATCH v2 2/5] dt-bindings: opp: sun50i: Add binding for D1 CPUs Date: Mon, 18 Dec 2023 12:05:40 +0100 Message-Id: <20231218110543.64044-3-fusibrandon13@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231218110543.64044-1-fusibrandon13@gmail.com> References: <20231218110543.64044-1-fusibrandon13@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add binding for D1 CPU OPPs. Signed-off-by: Brandon Cheo Fusi --- .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml index 51f62c3ae..fddaa3216 100644 --- a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml +++ b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml @@ -23,7 +23,9 @@ allOf: properties: compatible: - const: allwinner,sun50i-h6-operating-points + enum: + - allwinner,sun50i-h6-operating-points + - allwinner,sun20i-d1-operating-points nvmem-cells: description: | From patchwork Mon Dec 18 11:05:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Cheo Fusi X-Patchwork-Id: 756210 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 B5F411A27A; Mon, 18 Dec 2023 11:06:52 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fL2/6P8R" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a233a60f8feso150085866b.0; Mon, 18 Dec 2023 03:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702897611; x=1703502411; 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=5YMMP/qsVfdoJtEElBLyEEO9c305KOAYJqUkekDdPZs=; b=fL2/6P8R0UcYLbOSWLmu4ATxTxGp1TZd+yy+wyKCn2VNyb8/99PfkiKQLd54VMrrsA tvT444JcjZBo2GS7kMGsIKNQ/xtf0MOG8ZxHzswWO/xReQ08bQK0WQcricsN4rVfuZBA 7692wJcJxepOgx0bfOBg1PnQCNSvb07v/u8La2sby7sxr5Bleq0CRN3CSYbFAon3p5Oe /tLosjBeV98XjUtsfHA5iKL7o6XmriSewDQ0nzTMpIvUr8HMYzfJkqmmlC08I5o8WqY6 zBiUHHH4hyPmy/xbonM932XFQC/BIXLusLtXXrFJ2qTRO1SkCVvC3GL/JmnD/sIEiLSn gi1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702897611; x=1703502411; 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=5YMMP/qsVfdoJtEElBLyEEO9c305KOAYJqUkekDdPZs=; b=fV7mhh8ZyWG7H7rsOCPMACnrNJduBfPWVfve92QDk92lT/vJCFJFKa58RXIBRRnfI+ EOuel6K3MyhrKRo2JtNMMJXQKViDX08o5VwK6BHl26vPLK+hRk7O3eFgDkQsYXuH/pP3 JXFlJ33biPvEUTna2P7bub0gBEoCAgZbkiNikzmGA+EynFu9rVab0BvMSgNOVDBsAxiq GdIUpehPZ6bdYvm6Ig4+bCCbmq24tjR/xto4i9oLyV+MNgL5iz01t7Gj3LV8aMCKoXQG 8xdOli34d7BSaHQ6jvSAY/3jHuLtD/LpBp1It9u2TT85PM/kczRiG+G/ylt8X9LpUU/d Aa4Q== X-Gm-Message-State: AOJu0Yyv4g8MCw5Zrn002dLreCcoqkqaUQUNWh7NgVgkzE5sX8Y1LxhT ayn2aUxUx6QwosvEfKpJo3I= X-Google-Smtp-Source: AGHT+IFvCQuixkVNgpJoy4iekrTbntIvFyqQXesXqFyDPHUVUrNSA7K6fhKQ0zABch1KMEk0awPKmQ== X-Received: by 2002:a17:907:6094:b0:9fe:5d39:41c6 with SMTP id ht20-20020a170907609400b009fe5d3941c6mr8647546ejc.51.1702897611128; Mon, 18 Dec 2023 03:06:51 -0800 (PST) Received: from localhost.localdomain ([154.72.163.164]) by smtp.gmail.com with ESMTPSA id pj4-20020a170906d78400b00a2353af1f7bsm1406769ejb.92.2023.12.18.03.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:06:50 -0800 (PST) From: Brandon Cheo Fusi To: Yangtao Li , Viresh Kumar , Nishanth Menon , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Maxime Ripard Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Brandon Cheo Fusi Subject: [PATCH v2 3/5] cpufreq: sun50i: Add D1 support Date: Mon, 18 Dec 2023 12:05:41 +0100 Message-Id: <20231218110543.64044-4-fusibrandon13@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231218110543.64044-1-fusibrandon13@gmail.com> References: <20231218110543.64044-1-fusibrandon13@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for D1 based devices to the Allwinner H6 cpufreq driver Signed-off-by: Brandon Cheo Fusi --- drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c index 32a9c88f8..ccf83780f 100644 --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c @@ -160,6 +160,7 @@ static struct platform_driver sun50i_cpufreq_driver = { static const struct of_device_id sun50i_cpufreq_match_list[] = { { .compatible = "allwinner,sun50i-h6" }, + { .compatible = "allwinner,sun20i-d1" }, {} }; MODULE_DEVICE_TABLE(of, sun50i_cpufreq_match_list); From patchwork Mon Dec 18 11:05:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Cheo Fusi X-Patchwork-Id: 755638 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 B20A218C30; Mon, 18 Dec 2023 11:07:03 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S/jTV9lw" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2cc5e48779aso17283191fa.2; Mon, 18 Dec 2023 03:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702897622; x=1703502422; 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=4SZpEgDuZF0Kd57Q/v4Kq9sCIukMURy5kzt0ohYZmr8=; b=S/jTV9lwoRvLKVEi3dfPE/aRV8rSmCa43/YIt+9SvkXYNnXLnX9SpkXsDlmdftHEUM yWX3VoEsg3X3Z8WUezvWorKrL9iTXCCo29tSdhc57n+ZZ+TZLwSi04pghO66QVuCS0Ts XXtKHZ7IElSkAYYPkhHQabwBZxel39lxqFV0OPehsPnrd0G5xMnwRm38UhL6rX3CT+4K bYNMVAfrq7/9eXd3A7mu6b9ia8jrSWlvlmdFkGK0sD7Qs9ePUbAX02x/VxR/OAn0RC1o +6HGAjygFy7959dFuDZJIqjmKKFndxYWBD1fhyiZEoLOEu7iVyYZ57am6vuCSKouXnVI cn8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702897622; x=1703502422; 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=4SZpEgDuZF0Kd57Q/v4Kq9sCIukMURy5kzt0ohYZmr8=; b=AS3Gr7HQ5EAi0p7inVmk8QwqHyALTapoDw4MYt6UofLGPEjyyJpvqD4I0nUgvTHAQm QgDKGTzftkkZNTmmw2633IiYVPniQqMKKbZe6MJzDSqkTjtsLI3/WuxDzM1RdAhDHrdb 377eh4bgvXJPyL7kQmAedmLdGyHMGfmxvNGHVEN4TozITtAb14Ae0+WMsF9azPHK+dxr VvIftwi+PCnRNM03TNrNC0X1xXRi5I9Du2jL49r90VxWKQ7UWYbdE+EzNr2D1iPV9biT qYUbVD07A6kr5NLaFi3rZWQKQeaJgMdBHDqnybC5HuKjjReFrRqkdDtwsPhq5M3b2/MV Na6w== X-Gm-Message-State: AOJu0YzVuWHVmO/brliES0J3ULb+I/UcM9Mw54W2Vz0KMts9cmZyojZL /xL4Xg7QrYCD3DPdPrOOnLI= X-Google-Smtp-Source: AGHT+IEEPpv4PbOGki1wpFYE/FNbr0LMBpvRkHRipU02IysiUzOQcuXrBHqB/ytN1/Alf/94bokq8Q== X-Received: by 2002:ac2:4d12:0:b0:50e:3dc2:ad16 with SMTP id r18-20020ac24d12000000b0050e3dc2ad16mr142258lfi.232.1702897621400; Mon, 18 Dec 2023 03:07:01 -0800 (PST) Received: from localhost.localdomain ([154.72.163.164]) by smtp.gmail.com with ESMTPSA id pj4-20020a170906d78400b00a2353af1f7bsm1406769ejb.92.2023.12.18.03.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:07:00 -0800 (PST) From: Brandon Cheo Fusi To: Yangtao Li , Viresh Kumar , Nishanth Menon , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Maxime Ripard Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Brandon Cheo Fusi Subject: [PATCH v2 4/5] cpufreq: dt-platdev: Blocklist allwinner, sun20i-d1 SoC Date: Mon, 18 Dec 2023 12:05:42 +0100 Message-Id: <20231218110543.64044-5-fusibrandon13@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231218110543.64044-1-fusibrandon13@gmail.com> References: <20231218110543.64044-1-fusibrandon13@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The Allwinner D1 uses H6 cpufreq driver. Add it to blocklist so the "cpufreq-dt" device is not created twice. Signed-off-by: Brandon Cheo Fusi --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index bd1e1357c..2febcfc2c 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -104,6 +104,7 @@ static const struct of_device_id allowlist[] __initconst = { */ static const struct of_device_id blocklist[] __initconst = { { .compatible = "allwinner,sun50i-h6", }, + { .compatible = "allwinner,sun20i-d1", }, { .compatible = "apple,arm-platform", }, From patchwork Mon Dec 18 11:05:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Cheo Fusi X-Patchwork-Id: 756209 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 AE31C1B28E; Mon, 18 Dec 2023 11:07:12 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gaNksvEp" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a236ade46e7so6125266b.2; Mon, 18 Dec 2023 03:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702897631; x=1703502431; 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=lerjiFsv40IIbLDp1yKfCOrHgxz1kvFlDa/xJlfcdo0=; b=gaNksvEpnyqzbghpic1iMVz7pOQ3JyxURSYeA14gLobNA5tkvFMTt9VVuImOTBiy/n GOXy9AyAjaTGq7tPJTdrdwth3IsKIQ21xqVK51ThPJsgaUcPrqOV9gXaRkW3jJTViA3L BPWc3KwqtLMxUK9ZvW4iFjdAxMKZde07l4b41bGTEiHSzD63DpJy2rea3YPzpp9inuxs lE+tnnWumNGgVN7Xk5hBIcRQm/nFDXPQRHzYQpZ0pQ6oiDoTalngD5kKnkw8LJjp5I9S f/d9baHWv484rPLyKmPN1FfB2Ud/2Z2Ewscnu98Z7nJNjFtAlxWPEGVyXoEmrf/V3Im6 FVqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702897631; x=1703502431; 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=lerjiFsv40IIbLDp1yKfCOrHgxz1kvFlDa/xJlfcdo0=; b=aUV5MVaTBC4WpmvcsE3hyeRJbepx5HVZomaQMjMTRur5F85lrNHxRDnY7cZIrlRBOr ZVGZX1R4jPRu21bWh1fRlY7JHrVk5UXDNVNuYAVPNXCfbVZ2uZ0p7UK+9xbhud0Fczqy mAvxv9Uu5h9y/xJo0GVQTu8aTC1cL+F0RKx+6WngvIZwbDCHytp8auIBjVrFAhGJLZOu A1WcFG8u40QRIGBL76IjdO7Kl4NeSWXPofJyrhItWLJ/GGDBEIH5WkdyWDA8PWWVclCA zuTIsxSEXT2Z+LtIZY/MjJvCuyGePZKanbvbXIiJWL9Eq4xz6QYWYwsPwZxjbj+ARX/b Tkag== X-Gm-Message-State: AOJu0YyJZYMxoG8WoR82b07p1VW7ys/gBvIkfblYQKl2H8c8k+0qQJvX VeSxl3VfaM8GiP37mVXQw0w= X-Google-Smtp-Source: AGHT+IGQMtd6fso8NFusjQjFPqt6Spt8yZ8CBjuG18cqbhcpV/I/x5LWeBsLrRHnA3YL1WPAg7whNQ== X-Received: by 2002:a17:906:11cd:b0:a23:365d:fc74 with SMTP id o13-20020a17090611cd00b00a23365dfc74mr870108eja.125.1702897630746; Mon, 18 Dec 2023 03:07:10 -0800 (PST) Received: from localhost.localdomain ([154.72.163.164]) by smtp.gmail.com with ESMTPSA id pj4-20020a170906d78400b00a2353af1f7bsm1406769ejb.92.2023.12.18.03.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:07:10 -0800 (PST) From: Brandon Cheo Fusi To: Yangtao Li , Viresh Kumar , Nishanth Menon , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Maxime Ripard Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Brandon Cheo Fusi Subject: [PATCH v2 5/5] cpufreq: Make sun50i h6 cpufreq Kconfig option arch generic Date: Mon, 18 Dec 2023 12:05:43 +0100 Message-Id: <20231218110543.64044-6-fusibrandon13@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231218110543.64044-1-fusibrandon13@gmail.com> References: <20231218110543.64044-1-fusibrandon13@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Move the Allwinner SUN50I cpufreq driver from Kconfig.arm to the main Kconfig file so it supports other architectures, like RISC-V in our case, and drop the 'ARM_' prefix. Signed-off-by: Brandon Cheo Fusi --- drivers/cpufreq/Kconfig | 12 ++++++++++++ drivers/cpufreq/Kconfig.arm | 12 ------------ drivers/cpufreq/Makefile | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 35efb53d5..50aa66cfc 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -301,5 +301,17 @@ config QORIQ_CPUFREQ This adds the CPUFreq driver support for Freescale QorIQ SoCs which are capable of changing the CPU's frequency dynamically. +config ALLWINNER_SUN50I_CPUFREQ_NVMEM + tristate "Allwinner nvmem based SUN50I CPUFreq driver" + depends on ARCH_SUNXI + depends on NVMEM_SUNXI_SID + select PM_OPP + help + This adds the nvmem based CPUFreq driver for Allwinner + h6/D1 SoCs. + + To compile this driver as a module, choose M here: the + module will be called sun50i-cpufreq-nvmem. + endif endmenu diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index f91160689..98b8e6eef 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -29,18 +29,6 @@ config ACPI_CPPC_CPUFREQ_FIE If in doubt, say N. -config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM - tristate "Allwinner nvmem based SUN50I CPUFreq driver" - depends on ARCH_SUNXI - depends on NVMEM_SUNXI_SID - select PM_OPP - help - This adds the nvmem based CPUFreq driver for Allwinner - h6 SoC. - - To compile this driver as a module, choose M here: the - module will be called sun50i-cpufreq-nvmem. - config ARM_APPLE_SOC_CPUFREQ tristate "Apple Silicon SoC CPUFreq support" depends on ARCH_APPLE || (COMPILE_TEST && 64BIT) diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 8d141c71b..110b676d2 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -78,7 +78,7 @@ obj-$(CONFIG_ARM_SCMI_CPUFREQ) += scmi-cpufreq.o obj-$(CONFIG_ARM_SCPI_CPUFREQ) += scpi-cpufreq.o obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o obj-$(CONFIG_ARM_STI_CPUFREQ) += sti-cpufreq.o -obj-$(CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM) += sun50i-cpufreq-nvmem.o +obj-$(CONFIG_ALLWINNER_SUN50I_CPUFREQ_NVMEM) += sun50i-cpufreq-nvmem.o obj-$(CONFIG_ARM_TEGRA20_CPUFREQ) += tegra20-cpufreq.o obj-$(CONFIG_ARM_TEGRA124_CPUFREQ) += tegra124-cpufreq.o obj-$(CONFIG_ARM_TEGRA186_CPUFREQ) += tegra186-cpufreq.o