Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752363AbdGDIeP (ORCPT ); Tue, 4 Jul 2017 04:34:15 -0400 Received: from gloria.sntech.de ([95.129.55.99]:38100 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbdGDIeN (ORCPT ); Tue, 4 Jul 2017 04:34:13 -0400 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Frank Wang Cc: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, huangtao@rock-chips.com, kever.yang@rock-chips.com, david.wu@rock-chips.com, finley.xiao@rock-chips.com, wmc@rock-chips.com Subject: Re: [PATCH 1/6] ARM: dts: rockchip: add regulator nodes for rk3229-evb Date: Tue, 04 Jul 2017 10:34:05 +0200 Message-ID: <8062361.VWy3dYvDhe@diego> User-Agent: KMail/5.2.3 (Linux/4.8.0-2-amd64; KDE/5.27.0; x86_64; ; ) In-Reply-To: <1499155967-26090-2-git-send-email-frank.wang@rock-chips.com> References: <1499155967-26090-1-git-send-email-frank.wang@rock-chips.com> <1499155967-26090-2-git-send-email-frank.wang@rock-chips.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2641 Lines: 94 Hi Frank, Am Dienstag, 4. Juli 2017, 16:12:42 CEST schrieb Frank Wang: > This patch adds vcc_io, vdd_arm and vdd_log regulator nodes > for rk3229-evb board. > > Signed-off-by: Frank Wang > --- > arch/arm/boot/dts/rk3229-evb.dts | 54 > ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) > > diff --git a/arch/arm/boot/dts/rk3229-evb.dts > b/arch/arm/boot/dts/rk3229-evb.dts index 82e8a53..8b10c64 100644 > --- a/arch/arm/boot/dts/rk3229-evb.dts > +++ b/arch/arm/boot/dts/rk3229-evb.dts > @@ -78,6 +78,52 @@ > regulator-always-on; > regulator-boot-on; > }; > + > + vdd_arm: vdd-arm-regulator { > + compatible = "pwm-regulator"; > + rockchip,pwm_id = <1>; > + rockchip,pwm_voltage = <1100000>; This doesn't look like a part of the mainline pwm-regulator binding (both rockchip,* properties) > + pwms = <&pwm1 0 25000 1>; > + regulator-name = "vdd_arm"; > + regulator-min-microvolt = <950000>; > + regulator-max-microvolt = <1400000>; > + regulator-always-on; > + regulator-boot-on; > + }; please also add supplies for regulators. Information on supplies should be easily extractable from the board schematics. This not only results in a nice tree in debugfs (regulator/regulator_summary) but also makes sure supplying regulators are not accidentially turned off. (pwm-supply for pwm-regulators, vin-supply for fixed regulators) > + > + vdd_log: vdd-log-regulator { > + compatible = "pwm-regulator"; > + rockchip,pwm_id = <2>; > + rockchip,pwm_voltage = <1200000>; > + pwms = <&pwm2 0 25000 1>; > + regulator-name = "vdd_log"; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1300000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + regulators { > + compatible = "simple-bus"; don't create a subnode/bus for regulators. Just add them regularly. Take a look at all the other boards (like rk3399-firefly, gru, veyron) for reference. > + #address-cells = <1>; > + #size-cells = <0>; > + > + vccio_1v8_reg: regulator@0 { Same here, no regulator@0 please, just name this one vccio_1v8: vccio-1v8-regulator { (removed _reg from phandle and changed node name) > + compatible = "regulator-fixed"; > + regulator-name = "vccio_1v8"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + }; > + > + vccio_3v3_reg: regulator@1 { > + compatible = "regulator-fixed"; > + regulator-name = "vccio_3v3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + }; > + }; > }; Thanks Heiko