devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: linux-rockchip@lists.infradead.org
Cc: "Julien Chauveau" <chauveau.julien@gmail.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will.deacon@arm.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"moderated list:ARM64 PORT"
	<linux-arm-kernel@lists.infradead.org>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: [PATCH v3 3/8] arm64: dts: rockchip: Add GeekBox config
Date: Sun,  6 Mar 2016 20:53:52 +0100	[thread overview]
Message-ID: <1457294038-14243-4-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1457294038-14243-1-git-send-email-afaerber@suse.de>

The GeekBox contains an MXM3 module with a Rockchip RK3368 SoC.
Some connectors are available directly on the module.

This adds initial support, namely serial, USB, GMAC, eMMC, IR and TSADC.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2 -> v3:
 * Squashed GMAC, eMMC, IR, TSADC (Heiko)
 * Fixed IR pinctrl pull setting (Julien)
 * Changed TSADC polarity (rebooted immediately due to fixed otp-out pin)
 
 v1 -> v2:
 * Dropped rk3368-geekbox.dtsi. rk3368-geekbox-landingship.dts can
   #include "rk3368-geekbox.dts" just fine, when leaving out /dts-v1/;.
 * Revisited always-on / boot-on for PMIC regulator nodes. (Heiko)
 * Switched pmic-sleep from RK_FUNC_GPIO to RK_FUNC_2. (schematics)
 
 arch/arm64/boot/dts/rockchip/Makefile           |   1 +
 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 299 ++++++++++++++++++++++++
 2 files changed, 300 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index e3f0b5f4ba4e..df37865e8ced 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -1,4 +1,5 @@
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
 
 always		:= $(dtb-y)
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
new file mode 100644
index 000000000000..098be3700a6f
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2016 Andreas Färber
+ *
+ * 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 "rk3368.dtsi"
+
+/ {
+	model = "GeekBox";
+	compatible = "geekbuying,geekbox", "rockchip,rk3368";
+
+	chosen {
+		stdout-path = "serial2:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
+	};
+
+	ext_gmac: gmac-clk {
+		compatible = "fixed-clock";
+		clock-frequency = <125000000>;
+		clock-output-names = "ext_gmac";
+		#clock-cells = <0>;
+	};
+
+	ir: ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_int>;
+	};
+
+	leds: gpio-leds {
+		compatible = "gpio-leds";
+
+		blue {
+			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+			label = "geekbox:blue:led";
+			default-state = "on";
+		};
+
+		red {
+			gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+			label = "geekbox:red:led";
+			default-state = "off";
+		};
+	};
+
+	vcc_sys: vcc-sys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_sys";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+};
+
+&emmc {
+	status = "okay";
+	bus-width = <8>;
+	cap-mmc-highspeed;
+	clock-frequency = <150000000>;
+	disable-wp;
+	keep-power-in-suspend;
+	non-removable;
+	num-slots = <1>;
+	vmmc-supply = <&vcc_io>;
+	vqmmc-supply = <&vcc18_flash>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
+};
+
+&gmac {
+	status = "okay";
+	phy-supply = <&vcc_lan>;
+	phy-mode = "rgmii";
+	clock_in_out = "input";
+	assigned-clocks = <&cru SCLK_MAC>;
+	assigned-clock-parents = <&ext_gmac>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii_pins>;
+	tx_delay = <0x30>;
+	rx_delay = <0x10>;
+};
+
+&i2c0 {
+	status = "okay";
+
+	rk808: pmic@1b {
+		compatible = "rockchip,rk808";
+		reg = <0x1b>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+		rockchip,system-power-controller;
+		vcc1-supply = <&vcc_sys>;
+		vcc2-supply = <&vcc_sys>;
+		vcc3-supply = <&vcc_sys>;
+		vcc4-supply = <&vcc_sys>;
+		vcc6-supply = <&vcc_sys>;
+		vcc7-supply = <&vcc_sys>;
+		vcc8-supply = <&vcc_io>;
+		vcc9-supply = <&vcc_sys>;
+		vcc10-supply = <&vcc_sys>;
+		vcc11-supply = <&vcc_sys>;
+		vcc12-supply = <&vcc_io>;
+		clock-output-names = "xin32k", "rk808-clkout2";
+		#clock-cells = <1>;
+
+		regulators {
+			vdd_cpu: DCDC_REG1 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1500000>;
+				regulator-name = "vdd_cpu";
+			};
+
+			vdd_log: DCDC_REG2 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1500000>;
+				regulator-name = "vdd_log";
+			};
+
+			vcc_ddr: DCDC_REG3 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-name = "vcc_ddr";
+			};
+
+			vcc_io: DCDC_REG4 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-name = "vcc_io";
+			};
+
+			vcc18_flash: LDO_REG1 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-name = "vcc18_flash";
+			};
+
+			vcc33_lcd: LDO_REG2 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-name = "vcc33_lcd";
+			};
+
+			vdd_10: LDO_REG3 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <1000000>;
+				regulator-name = "vdd_10";
+			};
+
+			vcca_18: LDO_REG4 {
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-name = "vcca_18";
+			};
+
+			vccio_sd: LDO_REG5 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-name = "vccio_sd";
+			};
+
+			vdd10_lcd: LDO_REG6 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <1000000>;
+				regulator-name = "vdd10_lcd";
+			};
+
+			vcc_18: LDO_REG7 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-name = "vcc_18";
+			};
+
+			vcc18_lcd: LDO_REG8 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-name = "vcc18_lcd";
+			};
+
+			vcc_sd: SWITCH_REG1 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-name = "vcc_sd";
+			};
+
+			vcc_lan: SWITCH_REG2 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-name = "vcc_lan";
+			};
+		};
+	};
+};
+
+&pinctrl {
+	ir {
+		ir_int: ir-int {
+			rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	pmic {
+		pmic_sleep: pmic-sleep {
+			rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
+		};
+
+		pmic_int: pmic-int {
+			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+};
+
+&tsadc {
+	status = "okay";
+	rockchip,hw-tshut-mode = <0>; /* CRU */
+	rockchip,hw-tshut-polarity = <1>; /* high */
+};
+
+&uart2 {
+	status = "okay";
+};
+
+&usb_host0_ehci {
+	status = "okay";
+};
+
+&usb_otg {
+	status = "okay";
+};
+
+&wdt {
+	status = "okay";
+};
-- 
2.6.2

  reply	other threads:[~2016-03-06 19:53 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 19:53 [PATCH v3 0/8] arm64: rockchip: Initial GeekBox enablement Andreas Färber
2016-03-06 19:53 ` Andreas Färber [this message]
2016-03-06 19:53 ` [PATCH v3 6/8] arm64: dts: rockchip: Add power key to GeekBox Andreas Färber
     [not found]   ` <1457294038-14243-7-git-send-email-afaerber-l3A5Bk7waGM@public.gmane.org>
2016-03-10 23:04     ` Julien Chauveau
2016-03-16 10:58       ` Andreas Färber
     [not found]         ` <56E93C43.1060500-l3A5Bk7waGM@public.gmane.org>
2016-03-16 13:52           ` Andreas Färber
2016-03-10 23:09   ` Julien Chauveau
2016-03-06 19:53 ` [PATCH v3 7/8] Documentation: devicetree: rockchip: Document Landingship Andreas Färber
2016-03-17 14:46   ` Rob Herring
     [not found] ` <1457294038-14243-1-git-send-email-afaerber-l3A5Bk7waGM@public.gmane.org>
2016-03-06 19:53   ` [PATCH v3 1/8] Documentation: devicetree: Add vendor prefix for GeekBuying.com Andreas Färber
2016-03-06 19:53   ` [PATCH v3 2/8] Documentation: devicetree: rockchip: Document GeekBox Andreas Färber
2016-03-06 19:53   ` [PATCH v3 4/8] Documentation: devicetree: Clean up gpio-keys example Andreas Färber
2016-03-07 18:05     ` Heiko Stübner
2016-03-07 18:27       ` Andreas Färber
2016-03-06 19:53   ` [PATCH v3 5/8] arm64: dts: rockchip: Clean up gpio-keys nodes Andreas Färber
2016-03-06 19:53   ` [PATCH v3 8/8] arm64: dts: rockchip: Add Landingship config Andreas Färber
2016-03-07 12:17 ` [PATCH v3 0/8] arm64: rockchip: Initial GeekBox enablement Andreas Färber
2016-03-07 12:24   ` Heiko Stübner
2016-03-07 12:35     ` Andreas Färber
2016-03-07 13:26       ` Giuseppe CAVALLARO
2016-03-07 14:27         ` Andreas Färber
     [not found]           ` <56DD8FBE.9010200-l3A5Bk7waGM@public.gmane.org>
2016-03-07 15:09             ` Giuseppe CAVALLARO
2016-03-07 15:46               ` Andreas Färber
     [not found]                 ` <56DDA26C.3050301-l3A5Bk7waGM@public.gmane.org>
2016-03-07 15:52                   ` Giuseppe CAVALLARO
2016-03-07 17:15                     ` Andreas Färber
     [not found]                       ` <56DDB749.1020808-l3A5Bk7waGM@public.gmane.org>
2016-03-07 23:22                         ` Dinh Nguyen
     [not found]                           ` <CADhT+wfO8x4En78g5ixnnwbpaeXJGDo+Q1sOABYsbXzNZy0CPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-08  7:24                             ` Giuseppe CAVALLARO
2016-03-08 15:45                               ` Dinh Nguyen
2016-03-09  7:24                                 ` Giuseppe CAVALLARO
2016-03-09  8:35                                 ` Tomeu Vizoso
     [not found]                                   ` <CAAObsKD9HoEbtV_JMz_R=bcrQseDmhncRAWP9k8djksL-LMQqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-09  8:56                                     ` Giuseppe CAVALLARO
     [not found]                                       ` <56DFE55B.2090806-qxv4g6HH51o@public.gmane.org>
2016-03-09  9:00                                         ` Giuseppe CAVALLARO
     [not found]                                           ` <56DFE64B.8060606-qxv4g6HH51o@public.gmane.org>
2016-03-09  9:42                                             ` Tomeu Vizoso
     [not found]                                               ` <CAAObsKBr9SXg1-wr9O-ypR8JozdGpeAwfDLMeUKi8ozxkKyTXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-09  9:52                                                 ` Giuseppe CAVALLARO
2016-03-09 10:27                                                   ` Giuseppe CAVALLARO
2016-03-09 10:53                                                     ` Tomeu Vizoso
2016-03-09 14:31                                                       ` Giuseppe CAVALLARO
     [not found]                                                       ` <56E033C8.40506@st.c om>
     [not found]                                                         ` <56E033C8.40506-qxv4g6HH51o@public.gmane.org>
2016-03-09 14:53                                                           ` Giuseppe CAVALLARO
     [not found]                                                             ` <56E038CE.606-qxv4g6HH51o@public.gmane.org>
2016-03-09 16:31                                                               ` Dinh Nguyen
     [not found]                                                                 ` <CADhT+wcMpzA_Coj8Z5OQZsc3bF3a7yOmsbazQMPtcdUWkJSuCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-10  9:13                                                                   ` Giuseppe CAVALLARO
     [not found]                                                                     ` <56E13AAB.2080900-qxv4g6HH51o@public.gmane.org>
2016-03-10 16:47                                                                       ` Dinh Nguyen
     [not found]                                                                         ` <CADhT+wd=vcph2y_OxkGNO5EwHvN=kBy-BrfZHmNjZHww4LxmTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-11  9:09                                                                           ` Giuseppe CAVALLARO
2016-03-14 11:43                                                                             ` Tomeu Vizoso
     [not found]                                                                               ` <CAAObsKB-tSCu5KMYk2Zi-oX9zMKEOwwT93sMkiZKiYvtexmHaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-14 16:20                                                                                 ` Giuseppe CAVALLARO
     [not found]                                                                                   ` <56E6E4B0.8060408-qxv4g6HH51o@public.gmane.org>
2016-03-15  7:23                                                                                     ` Tomeu Vizoso
     [not found]                                                                                       ` <CAAObsKCdk+6HdzFYxRKZbPiaKcfMCLjbpngurat47YvyvSgH-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-15 12:36                                                                                         ` Giuseppe CAVALLARO
     [not found]                                                                                           ` <56E801EB.6030107-qxv4g6HH51o@public.gmane.org>
2016-03-30 16:44                                                                                             ` Dinh Nguyen
     [not found]                                                                                               ` <CADhT+wdXXp322vmgFmWTUiiRZTsCWeJSSdU=BMEEbSyb_bnrUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-31  7:53                                                                                                 ` Giuseppe CAVALLARO
2016-03-08 10:03                             ` Gabriel Fernandez
     [not found]                               ` <CAG374jBLD5YuBT=r3V98OqdUTXMepvQ_tLz4XMJdQMzzGYi22A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-08 10:24                                 ` Giuseppe CAVALLARO
     [not found]                                   ` <56DEA840.1050305-qxv4g6HH51o@public.gmane.org>
2016-03-08 10:33                                     ` Gabriel Fernandez
2016-03-11 12:12   ` Michael Trimarchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457294038-14243-4-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=catalin.marinas@arm.com \
    --cc=chauveau.julien@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=heiko@sntech.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).