Received: by 10.192.165.148 with SMTP id m20csp3028789imm; Mon, 7 May 2018 05:34:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9ZZNIGPmbWVhx43dD6aidDADTXinPTuLRNDtoraoYtFTg4NVJW/uHFqwIyeWcYrET4EOc X-Received: by 10.98.1.5 with SMTP id 5mr36606843pfb.1.1525696442091; Mon, 07 May 2018 05:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525696442; cv=none; d=google.com; s=arc-20160816; b=mTSEGwDh4Syj52cs+yzNHVZxIlZfxYciXvCAQjA/e0GR/g89jrwl5b0/KLOStBKlCP 03qeLk6tR9F5d4gw4P9ded1+JBJ7UyOsECDhhzqr8ygu1yvZyKrKBZar8JGzoNwO9xbd wnbpVBINC7s2yVD1gSBchQ39/BopffXlhQs+kukpZ7096z4u6AJcMY9WNKWXwW8wSF1l Q8J7lN4+taIeKXIIemgCcDWGiNZTGrWc1hQszvmM/GBngymEhsbn/EFNMgHaJkOGQDqn a84ZbGwgRvE9Le7uIrza2qmWmzmBIRI++W9miaWmLVNIYK/IGdbVn3d2ua8iy+I4C7f1 XMKg== 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=onGcd1zVme72iFQc5LUretJhYWyBG/GavqcFcM80SUc=; b=JLdWvH0JJKPmq6c4x3nfG0MjSql8pneU9ud12Mg/NppA35Bg6q56Y3gs6Q4I/uWL7k dup3NhDUzcgyDrfJxOlWSHHx99lFGq1cq640TjSwKuwE8N2H3Uk5jlZccnKBzyZypfEf z05hXf85+I5ilMgP3YqzGoJqRkw3nsGLhr2yIZLjJnXsFb0BErtMSueWcOD3BeaekcQS QX8pLuz1PAt9dpsDs6KoQ+c1v6y2ws2km0am52myU65SARMi1Z++rJ3ORBAC21euTzjA sOeoAv9j4QVlwIi8ADbSBsQeGJYKLwDohOA8BmxMGUYmi8AZWvC81XtnJiubG7SvSZGd BSmA== 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 t22-v6si22544384plj.595.2018.05.07.05.33.47; Mon, 07 May 2018 05:34:02 -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 S1752250AbeEGMdc (ORCPT + 99 others); Mon, 7 May 2018 08:33:32 -0400 Received: from hermes.aosc.io ([199.195.250.187]:43765 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117AbeEGMdb (ORCPT ); Mon, 7 May 2018 08:33:31 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 423D24F289; Mon, 7 May 2018 12:33:12 +0000 (UTC) From: Icenowy Zheng To: Mark Brown , Liam Girdwood , 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 v4 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC Date: Mon, 7 May 2018 20:29:42 +0800 Message-Id: <20180507122942.25758-4-icenowy@aosc.io> In-Reply-To: <20180507122942.25758-1-icenowy@aosc.io> References: <20180507122942.25758-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 --- No changes in v4. 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.17.0