Received: by 10.223.176.5 with SMTP id f5csp237511wra; Mon, 5 Feb 2018 20:54:56 -0800 (PST) X-Google-Smtp-Source: AH8x225y8/eD7aoNS/cWIkB/+1VqQl19SRc8u7YmzArhe5NKSFZB0U6PneplKqms2wVNLVkhcl1E X-Received: by 2002:a17:902:10b:: with SMTP id 11-v6mr1209041plb.336.1517892896266; Mon, 05 Feb 2018 20:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517892896; cv=none; d=google.com; s=arc-20160816; b=cMnGWRiBGeC1prEjdpRD/QWtBiH4k1qb6qQC7EFJOJ0b+9gpNLT2CuN8tTmGIm38Yo TO0RBuNwlrnWqz9FY3P3om4mmZk4oGgixU0QIsRPHqOSjzGJgg417pkj+QRUwCoFNN0q XEt1T9CS8VfqI4P2hTfpbIV22/nsk/7u0qWz1uqc6jOJT11uz0wM7Fp9opp3b12C288p gQmbKk9gxN+hAaPqqRGVHMUhKEhIv+gmhExIhE40RBFiglhn3XIqrbOxdhv8L5ws1RA5 sJeppKAT0tQ1I3MhG6sUkrXQH2jG+x9Xip9y9ynJZ66i0KD9i0bS5HIYwa0r3aCaNgKl /I2Q== 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=CbE41O9Pq/G5AIGxZv6VJPQIbHJ2//SxJ1qhipgTVKk=; b=v9tOYjEgDPVZ1NfNG0mhkPQygCL/cnERKVtZd8g1NG5EEnpUiNNLq85WDteftanAhP 124J1Tkn9oTu/n2lrA4dFLoTgFHlGzUDt9SFvLzOjQPMbSfgDXGCQ7AmL9irhiLzrPQW VRYxCTKqUX1EINzNUjTXUSP/6n827125GZRAtgurJnpksv4Fn9rKZe/IDqWNfIJXkgCF 1pWPm/Jd4x9sm3WTsqV5h2ofOrX+DqvWlqBDDLwP8OGPsbb5hrzUnjTkw8brX53g3/uR 4PVhr50KJN/re/mnQ+SE+AzugYDsODNlLSydW+dCQAqGlREd1Zdwh6pTDWFAYuwQTm/R ucxA== 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 b3si1011779pfl.166.2018.02.05.20.54.42; Mon, 05 Feb 2018 20:54:56 -0800 (PST) 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 S1752786AbeBFEwd (ORCPT + 99 others); Mon, 5 Feb 2018 23:52:33 -0500 Received: from hermes.aosc.io ([199.195.250.187]:50349 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752699AbeBFEvS (ORCPT ); Mon, 5 Feb 2018 23:51:18 -0500 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 4EBD457019; Tue, 6 Feb 2018 04:51:15 +0000 (UTC) From: Icenowy Zheng To: Liam Girdwood , 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, Icenowy Zheng Subject: [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Date: Tue, 6 Feb 2018 12:49:02 +0800 Message-Id: <20180206044905.30508-8-icenowy@aosc.io> In-Reply-To: <20180206044905.30508-1-icenowy@aosc.io> References: <20180206044905.30508-1-icenowy@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Orange Pi One board has a SY8113B regulator, which is controlled via GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0 or 1.3V when the PL6 GPIO is set to input or output 1, and the output is the power supply of the ARM cores in H3 SoC. Add the device tree node of this regulator and set the cpu's cpu-supply property to it. Signed-off-by: Icenowy Zheng --- New patch in v2. arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts index 82e5d28cd698..d8250aacfda1 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts @@ -88,6 +88,27 @@ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; }; }; + + reg_sy8113b: gpio-regulator { + compatible = "regulator-gpio"; + regulator-name = "vdd-cpux"; + regulator-type = "voltage"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <50>; /* 4ms */ + + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ + enable-active-high; + gpios-states = <0x1>; + states = <1100000 0x0 + 1300000 0x1>; + }; +}; + +&cpu0 { + cpu-supply = <®_sy8113b>; }; &ehci0 { -- 2.15.1