diff mbox

[v2,1/3] ARM: dts: rockchip: add veyron-jaq board

Message ID 1440022721-73712-1-git-send-email-briannorris@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Brian Norris Aug. 19, 2015, 10:18 p.m. UTC
a.k.a. Haier Chromebook 11

Signed-off-by: Brian Norris <briannorris@chromium.org>
Cc: Alexandru M Stan <amstan@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
---
v1 -> v2:
 - add overlooked DT binding doc
 - fixup regulator suspend state for LDO_REG2

 Documentation/devicetree/bindings/arm/rockchip.txt |   7 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/rk3288-veyron-jaq.dts            | 176 +++++++++++++++++++++
 3 files changed, 184 insertions(+)
 create mode 100644 arch/arm/boot/dts/rk3288-veyron-jaq.dts

Comments

Brian Norris Aug. 19, 2015, 10:59 p.m. UTC | #1
On Wed, Aug 19, 2015 at 03:38:43PM -0700, Alexandru Stan wrote:
> On Wed, Aug 19, 2015 at 3:18 PM, Brian Norris <briannorris@chromium.org>
> wrote:
> 
> > +++ b/Documentation/devicetree/bindings/arm/rockchip.txt
> 
> ...
> 
> > +- Google Jaq (Haier Chromebook 11):
> 
> 
> Could you add s/)/ and more)/ similar to what Jerry has? This is jaq too:
> http://sasthamarket.com/wp-content/uploads/2015/06/34.jpg

Sure. I'll wait for any other comments on v2 before sending the next
(and final?) version.

Thanks,
Brian
Javier Martinez Canillas Aug. 19, 2015, 11:29 p.m. UTC | #2
Hello Brian,

[...]

> +
> +&rk808 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
> +       dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
> +                   <&gpio7 15 GPIO_ACTIVE_HIGH>;

I see the dvs-gpios DT property is documented in the downstream
ChromiumOS 3.18 tree [0] but I don't see it neither mentioned in
Documentation/devicetree/bindings/mfd/rk808.txt in mainline nor code
that parses it in the drivers/regulator/rk808-regulator.c driver.

So I think this should be removed and also the dvs_{1,2} pinctrl
lines. The rest of the patch looks good to me though so with these
removed feel free to add:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

[0]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.14/Documentation/devicetree/bindings/mfd/rk808.txt

Best regards,
Javier
Brian Norris Aug. 24, 2015, 5:53 p.m. UTC | #3
On Thu, Aug 20, 2015 at 01:29:40AM +0200, Javier Martinez Canillas wrote:
> Hello Brian,
> 
> [...]
> 
> > +
> > +&rk808 {
> > +       pinctrl-names = "default";
> > +       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
> > +       dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
> > +                   <&gpio7 15 GPIO_ACTIVE_HIGH>;
> 
> I see the dvs-gpios DT property is documented in the downstream
> ChromiumOS 3.18 tree [0] but I don't see it neither mentioned in
> Documentation/devicetree/bindings/mfd/rk808.txt in mainline nor code
> that parses it in the drivers/regulator/rk808-regulator.c driver.

Good catch.

> So I think this should be removed and also the dvs_{1,2} pinctrl
> lines.

OK, will do. I see that jerry, minnie, and speedy also have the pinctrl
lines. Should they be killed as well?

> The rest of the patch looks good to me though so with these
> removed feel free to add:
> 
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Thanks.

> [0]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.14/Documentation/devicetree/bindings/mfd/rk808.txt

Brian
Heiko Stuebner Aug. 24, 2015, 5:58 p.m. UTC | #4
Am Montag, 24. August 2015, 10:53:15 schrieb Brian Norris:
> On Thu, Aug 20, 2015 at 01:29:40AM +0200, Javier Martinez Canillas wrote:
> > Hello Brian,
> > 
> > [...]
> > 
> > > +
> > > +&rk808 {
> > > +       pinctrl-names = "default";
> > > +       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
> > > +       dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
> > > +                   <&gpio7 15 GPIO_ACTIVE_HIGH>;
> > 
> > I see the dvs-gpios DT property is documented in the downstream
> > ChromiumOS 3.18 tree [0] but I don't see it neither mentioned in
> > Documentation/devicetree/bindings/mfd/rk808.txt in mainline nor code
> > that parses it in the drivers/regulator/rk808-regulator.c driver.
> 
> Good catch.
> 
> > So I think this should be removed and also the dvs_{1,2} pinctrl
> > lines.
> 
> OK, will do. I see that jerry, minnie, and speedy also have the pinctrl
> lines. Should they be killed as well?

Personally I think the pinctrl settings can stay. Their configuration is part 
of the hardware and not subject to the binding of the device using them.

And of course, the change to support them is already pending, with the binding 
itself already in the mfd tree.


So it doesn't matter to much if they're in there already or not, as we'll 
hopefully soon make use of them anyway.

> 
> > The rest of the patch looks good to me though so with these
> > removed feel free to add:
> > 
> > Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> Thanks.
> 
> > [0]:
> > https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeo
> > s-3.14/Documentation/devicetree/bindings/mfd/rk808.txt
> Brian
Javier Martinez Canillas Aug. 24, 2015, 6:01 p.m. UTC | #5
Hello Heiko,

On Mon, Aug 24, 2015 at 7:58 PM, Heiko Stuebner <heiko@sntech.de> wrote:
> Am Montag, 24. August 2015, 10:53:15 schrieb Brian Norris:
>> On Thu, Aug 20, 2015 at 01:29:40AM +0200, Javier Martinez Canillas wrote:
>> > Hello Brian,
>> >
>> > [...]
>> >
>> > > +
>> > > +&rk808 {
>> > > +       pinctrl-names = "default";
>> > > +       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
>> > > +       dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
>> > > +                   <&gpio7 15 GPIO_ACTIVE_HIGH>;
>> >
>> > I see the dvs-gpios DT property is documented in the downstream
>> > ChromiumOS 3.18 tree [0] but I don't see it neither mentioned in
>> > Documentation/devicetree/bindings/mfd/rk808.txt in mainline nor code
>> > that parses it in the drivers/regulator/rk808-regulator.c driver.
>>
>> Good catch.
>>
>> > So I think this should be removed and also the dvs_{1,2} pinctrl
>> > lines.
>>
>> OK, will do. I see that jerry, minnie, and speedy also have the pinctrl
>> lines. Should they be killed as well?
>
> Personally I think the pinctrl settings can stay. Their configuration is part
> of the hardware and not subject to the binding of the device using them.
>
> And of course, the change to support them is already pending, with the binding
> itself already in the mfd tree.
>

I missed that the change to add support for this is already in the mfd tree.

>
> So it doesn't matter to much if they're in there already or not, as we'll
> hopefully soon make use of them anyway.
>

Agreed.

Best regards,
Javier
Brian Norris Aug. 24, 2015, 6:06 p.m. UTC | #6
On Mon, Aug 24, 2015 at 08:01:29PM +0200, Javier Martinez Canillas wrote:
> On Mon, Aug 24, 2015 at 7:58 PM, Heiko Stuebner <heiko@sntech.de> wrote:
> > Am Montag, 24. August 2015, 10:53:15 schrieb Brian Norris:
> >> On Thu, Aug 20, 2015 at 01:29:40AM +0200, Javier Martinez Canillas wrote:
> >> > [...]
> >> >
> >> > > +
> >> > > +&rk808 {
> >> > > +       pinctrl-names = "default";
> >> > > +       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
> >> > > +       dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
> >> > > +                   <&gpio7 15 GPIO_ACTIVE_HIGH>;
> >> >
> >> > I see the dvs-gpios DT property is documented in the downstream
> >> > ChromiumOS 3.18 tree [0] but I don't see it neither mentioned in
> >> > Documentation/devicetree/bindings/mfd/rk808.txt in mainline nor code
> >> > that parses it in the drivers/regulator/rk808-regulator.c driver.
> >>
> >> Good catch.
> >>
> >> > So I think this should be removed and also the dvs_{1,2} pinctrl
> >> > lines.
> >>
> >> OK, will do. I see that jerry, minnie, and speedy also have the pinctrl
> >> lines. Should they be killed as well?
> >
> > Personally I think the pinctrl settings can stay. Their configuration is part
> > of the hardware and not subject to the binding of the device using them.
> >
> > And of course, the change to support them is already pending, with the binding
> > itself already in the mfd tree.
> >
> 
> I missed that the change to add support for this is already in the mfd tree.

Me too. So I'll leave all the dvs-* stuff as-is, then. This makes the
v2->v3 delta very small...

> >
> > So it doesn't matter to much if they're in there already or not, as we'll
> > hopefully soon make use of them anyway.
> >
> 
> Agreed.

Brian
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index af58cd74aeff..7fc7cf5c79d2 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -31,6 +31,13 @@  Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "netxeon,r89", "rockchip,rk3288";
 
+- Google Jaq (Haier Chromebook 11):
+    Required root node properties:
+      - compatible = "google,veyron-jaq-rev5", "google,veyron-jaq-rev4",
+		     "google,veyron-jaq-rev3", "google,veyron-jaq-rev2",
+		     "google,veyron-jaq-rev1", "google,veyron-jaq",
+		     "google,veyron", "rockchip,rk3288";
+
 - Google Jerry (Hisense Chromebook C11 and more):
     Required root node properties:
       - compatible = "google,veyron-jerry-rev7", "google,veyron-jerry-rev6",
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7805a6541a38..a08ca6c3d76e 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -490,6 +490,7 @@  dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3288-firefly-beta.dtb \
 	rk3288-firefly.dtb \
 	rk3288-r89.dtb \
+	rk3288-veyron-jaq.dtb \
 	rk3288-veyron-jerry.dtb \
 	rk3288-veyron-minnie.dtb \
 	rk3288-veyron-pinky.dtb \
diff --git a/arch/arm/boot/dts/rk3288-veyron-jaq.dts b/arch/arm/boot/dts/rk3288-veyron-jaq.dts
new file mode 100644
index 000000000000..c2f52cfb4d06
--- /dev/null
+++ b/arch/arm/boot/dts/rk3288-veyron-jaq.dts
@@ -0,0 +1,176 @@ 
+/*
+ * Google Veyron Jaq Rev 1+ board device tree source
+ *
+ * Copyright 2015 Google, Inc
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *  Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "rk3288-veyron-chromebook.dtsi"
+#include "cros-ec-sbs.dtsi"
+
+/ {
+	model = "Google Jaq";
+	compatible = "google,veyron-jaq-rev5", "google,veyron-jaq-rev4",
+		     "google,veyron-jaq-rev3", "google,veyron-jaq-rev2",
+		     "google,veyron-jaq-rev1", "google,veyron-jaq",
+		     "google,veyron", "rockchip,rk3288";
+
+	panel_regulator: panel-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_enable_h>;
+		regulator-name = "panel_regulator";
+		vin-supply = <&vcc33_sys>;
+	};
+
+	vcc18_lcd: vcc18-lcd {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&avdd_1v8_disp_en>;
+		regulator-name = "vcc18_lcd";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc18_wl>;
+	};
+
+	backlight_regulator: backlight-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&bl_pwr_en>;
+		regulator-name = "backlight_regulator";
+		vin-supply = <&vcc33_sys>;
+		startup-delay-us = <15000>;
+	};
+};
+
+&rk808 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
+	dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
+		    <&gpio7 15 GPIO_ACTIVE_HIGH>;
+
+	regulators {
+		mic_vcc: LDO_REG2 {
+			regulator-name = "mic_vcc";
+			regulator-always-on;
+			regulator-boot-on;
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-state-mem {
+				regulator-off-in-suspend;
+			};
+		};
+	};
+};
+
+&sdmmc {
+	disable-wp;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd_disabled &sdmmc_cd_gpio
+			&sdmmc_bus4>;
+};
+
+&vcc_5v {
+	enable-active-high;
+	gpio = <&gpio7 21 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&drv_5v>;
+};
+
+&vcc50_hdmi {
+	enable-active-high;
+	gpio = <&gpio5 19 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&vcc50_hdmi_en>;
+};
+
+&pinctrl {
+	backlight {
+		bl_pwr_en: bl_pwr_en {
+			rockchip,pins = <2 12 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	buck-5v {
+		drv_5v: drv-5v {
+			rockchip,pins = <7 21 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	edp {
+		edp_hpd: edp_hpd {
+			rockchip,pins = <7 11 RK_FUNC_2 &pcfg_pull_down>;
+		};
+	};
+
+	hdmi {
+		vcc50_hdmi_en: vcc50-hdmi-en {
+			rockchip,pins = <5 19 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	lcd {
+		lcd_enable_h: lcd-en {
+			rockchip,pins = <7 14 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		avdd_1v8_disp_en: avdd-1v8-disp-en {
+			rockchip,pins = <2 13 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	pmic {
+		dvs_1: dvs-1 {
+			rockchip,pins = <7 12 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		dvs_2: dvs-2 {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+	};
+};