Received: by 10.192.165.148 with SMTP id m20csp3513572imm; Mon, 23 Apr 2018 07:50:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/uslm3bSwL19fuV+iHPXsl092xamVAT3p55+Y3RleBUGG4f3CmSGuM9+LCYA75A+Vjr8En X-Received: by 10.101.91.138 with SMTP id i10mr17738826pgr.431.1524495010252; Mon, 23 Apr 2018 07:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524495010; cv=none; d=google.com; s=arc-20160816; b=CYh112HnPVCPO/GYqbxaBQQL6UA0zJJLUhZtAXExMZSDI1Ny/4lywFou3qejDCKQKy cFLSTWwu6qBomukPPUtu1VfYBSH0OebVkw+F8Oiu1BRDM4qCUNYl4gYPnToEkUZYKHWn f24NN/BDdopr1PpopYwQyr8MoDiqSL18pa550u22k4KLO/fVdCBF+KePPF3hXIk0BZOr zPhGgY9mgMSZ4iJNt0vPOR2mjKbyyzqZZwp9LEvCRNbVc2uAlzIZ9ZZFgJiB4voXkNsA b3pdFR9IUfWDyCvq9Dy/i0auH7YHHERUTtV07uEw6bOMt+H6xB30PKXRCmcGg9/NNfhB 2NCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=I/D+bFmvC8wQYqmlxeo3B2vizOa46F+zfHgOR3QgLbU=; b=lSy76f6Df/t+ICygLEy6N3wyTEAd2oxSYIgq3eCP4T84AWguiu7hCgKBK5DIiPSHJR ae/X2s1qHSvEeEL6TXRzmsQr3P2SCqaPuDkYKy0vj9gMq7+9Cy4fGqTkOrLymerpR6FU 1ck48RD+vGJNz1SWZakS+riPwfwcQiQmfBbco1nDSCikBnglQSSwLwfqcbxDl/UklKPt 6GRu7Wrm0FaqeEyROacbkP8J2k3mL84PUs66e6vdQePSKBbD8A9nXdySILMJ7MmJ6TAm 4lHyd1nn1EzfYQQSA6+Lk/mfjKvPA2kZN4Ds/XfWaTXhjbF+u574pnT/k7PQsw+5S1s5 jhgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si9967594pga.86.2018.04.23.07.49.55; Mon, 23 Apr 2018 07:50:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932081AbeDWOsV (ORCPT + 99 others); Mon, 23 Apr 2018 10:48:21 -0400 Received: from hermes.aosc.io ([199.195.250.187]:52695 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755198AbeDWOsN (ORCPT ); Mon, 23 Apr 2018 10:48:13 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 02A685B2BA; Mon, 23 Apr 2018 14:48:08 +0000 (UTC) From: Icenowy Zheng To: Liam Girdwood , Mark Brown , Rob Herring , Maxime Ripard , Chen-Yu Tsai Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, Ondrej Jirman , Icenowy Zheng Subject: [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC Date: Mon, 23 Apr 2018 22:46:57 +0800 Message-Id: <20180423144657.63264-4-icenowy@aosc.io> In-Reply-To: <20180423144657.63264-1-icenowy@aosc.io> References: <20180423144657.63264-1-icenowy@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ondrej Jirman Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on Orange Pi PC, then set the power supply of the ARM cores to this regulator, in order to enable DVFS. Signed-off-by: Ondrej Jirman [Icenowy: Enable DVFS in this patch, slight changes and change commit message] Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai [wens@csie.org: Rename regulator label] Signed-off-by: Chen-Yu Tsai --- Changes in v3: - Renamed regulator label (by Chen-Yu Tsai). - Added the fixed mode voltage number. Changes in v2: - Reduce maximum voltage to 1.3V. - Slightly changed the comment at 1.0V minimum voltage for taking BSP DVFS table instead of Armbian one. arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts index cea4d647ecbf..46240334128f 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts @@ -113,6 +113,10 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; + &ehci0 { status = "okay"; }; @@ -182,6 +186,30 @@ }; }; +&r_i2c { + status = "okay"; + + reg_vdd_cpux: regulator@65 { + compatible = "silergy,sy8106a"; + reg = <0x65>; + regulator-name = "vdd-cpux"; + silergy,fixed-microvolt = <1200000>; + /* + * The datasheet uses 1.1V as the minimum value of VDD-CPUX, + * however both the Armbian DVFS table and the official one + * have operating points with voltage under 1.1V, and both + * DVFS table are known to work properly at the lowest + * operating point. + * + * Use 1.0V as the minimum voltage instead. + */ + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1300000>; + regulator-boot-on; + regulator-always-on; + }; +}; + &r_pio { leds_r_opc: led_pins { pins = "PL10"; -- 2.15.1