From: bage@linutronix.de
To: devicetree@vger.kernel.org
Cc: Bastian Germann <bage@linutronix.de>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Ripard <mripard@kernel.org>,
Benedikt Spranger <b.spranger@linutronix.de>
Subject: [PATCH 4/5] ARM: dts: sun7i: lamobo-r1: Split out commons
Date: Thu, 6 Feb 2020 12:33:26 +0100 [thread overview]
Message-ID: <20200206113328.7296-5-bage@linutronix.de> (raw)
In-Reply-To: <20200206113328.7296-1-bage@linutronix.de>
From: Bastian Germann <bage@linutronix.de>
Split out common parts of the Lamobo R1 board to enable using them for
Linutronix Testbox board integration.
Co-developed-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: Bastian Germann <bage@linutronix.de>
---
.../boot/dts/sun7i-a20-lamobo-r1-common.dtsi | 271 ++++++++++++++++++
arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 264 +----------------
2 files changed, 272 insertions(+), 263 deletions(-)
create mode 100644 arch/arm/boot/dts/sun7i-a20-lamobo-r1-common.dtsi
diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1-common.dtsi b/arch/arm/boot/dts/sun7i-a20-lamobo-r1-common.dtsi
new file mode 100644
index 000000000000..ff9f7d99f5e0
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1-common.dtsi
@@ -0,0 +1,271 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ aliases {
+ serial0 = &uart0;
+ serial1 = &uart3;
+ serial2 = &uart7;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ reg_gmac_3v3: gmac-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "gmac-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <100000>;
+ enable-active-high;
+ gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
+ };
+};
+
+&ahci {
+ target-supply = <®_ahci_5v>;
+ status = "okay";
+};
+
+&codec {
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
+&de {
+ status = "okay";
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&gmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac_rgmii_pins>;
+ phy-mode = "rgmii";
+ phy-supply = <®_gmac_3v3>;
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch: ethernet-switch@1e {
+ compatible = "brcm,bcm53125";
+ reg = <30>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port0: port@0 {
+ reg = <0>;
+ label = "lan2";
+ };
+
+ port1: port@1 {
+ reg = <1>;
+ label = "lan3";
+ };
+
+ port2: port@2 {
+ reg = <2>;
+ label = "lan4";
+ };
+
+ port3: port@3 {
+ reg = <3>;
+ label = "wan";
+ };
+
+ port4: port@4 {
+ reg = <4>;
+ label = "lan1";
+ };
+
+ port8: port@8 {
+ reg = <8>;
+ label = "cpu";
+ ethernet = <&gmac>;
+ phy-mode = "rgmii-txid";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+};
+
+&hdmi {
+ status = "okay";
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+
+ axp209: pmic@34 {
+ reg = <0x34>;
+ interrupt-parent = <&nmi_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+};
+
+&ir0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir0_rx_pin>;
+ status = "okay";
+};
+
+&mmc0 {
+ vmmc-supply = <®_vcc3v3>;
+ bus-width = <4>;
+ cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&otg_sram {
+ status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&ac_power_supply {
+ status = "okay";
+};
+
+&battery_power_supply {
+ status = "okay";
+};
+
+®_ahci_5v {
+ gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+ status = "okay";
+};
+
+®_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-cpu";
+};
+
+®_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+®_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+®_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
+
+®_usb0_vbus {
+ status = "okay";
+};
+
+®_usb2_vbus {
+ gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+ status = "okay";
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pi_pins>,
+ <&spi0_cs0_pi_pin>,
+ <&spi0_cs1_pi_pin>;
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pb_pins>;
+ status = "okay";
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_ph_pins>;
+ status = "okay";
+};
+
+&uart7 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart7_pi_pins>;
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_power_supply {
+ status = "okay";
+};
+
+&usbphy {
+ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+ usb0_vbus_power-supply = <&usb_power_supply>;
+ usb0_vbus-supply = <®_usb0_vbus>;
+ usb2_vbus-supply = <®_usb2_vbus>;
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
index 37cbd78ea07c..82013c7ddf84 100644
--- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
@@ -4,37 +4,12 @@
*/
/dts-v1/;
-#include "sun7i-a20.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/irq.h>
+#include "sun7i-a20-lamobo-r1-common.dtsi"
/ {
model = "Lamobo R1";
compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
- aliases {
- serial0 = &uart0;
- serial1 = &uart3;
- serial2 = &uart7;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-
- hdmi-connector {
- compatible = "hdmi-connector";
- type = "a";
-
- port {
- hdmi_con_in: endpoint {
- remote-endpoint = <&hdmi_out_con>;
- };
- };
- };
-
leds {
compatible = "gpio-leds";
@@ -43,241 +18,4 @@
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
};
};
-
- reg_gmac_3v3: gmac-3v3 {
- compatible = "regulator-fixed";
- regulator-name = "gmac-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- startup-delay-us = <100000>;
- enable-active-high;
- gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
- };
-};
-
-&ahci {
- target-supply = <®_ahci_5v>;
- status = "okay";
-};
-
-&codec {
- status = "okay";
-};
-
-&cpu0 {
- cpu-supply = <®_dcdc2>;
-};
-
-&de {
- status = "okay";
-};
-
-&ehci0 {
- status = "okay";
-};
-
-&ehci1 {
- status = "okay";
-};
-
-&gmac {
- pinctrl-names = "default";
- pinctrl-0 = <&gmac_rgmii_pins>;
- phy-mode = "rgmii";
- phy-supply = <®_gmac_3v3>;
- status = "okay";
-
- fixed-link {
- speed = <1000>;
- full-duplex;
- };
-
- mdio {
- compatible = "snps,dwmac-mdio";
- #address-cells = <1>;
- #size-cells = <0>;
-
- switch: ethernet-switch@1e {
- compatible = "brcm,bcm53125";
- reg = <30>;
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port0: port@0 {
- reg = <0>;
- label = "lan2";
- };
-
- port1: port@1 {
- reg = <1>;
- label = "lan3";
- };
-
- port2: port@2 {
- reg = <2>;
- label = "lan4";
- };
-
- port3: port@3 {
- reg = <3>;
- label = "wan";
- };
-
- port4: port@4 {
- reg = <4>;
- label = "lan1";
- };
-
- port8: port@8 {
- reg = <8>;
- label = "cpu";
- ethernet = <&gmac>;
- phy-mode = "rgmii-txid";
- fixed-link {
- speed = <1000>;
- full-duplex;
- };
- };
- };
- };
- };
-};
-
-&hdmi {
- status = "okay";
-};
-
-&hdmi_out {
- hdmi_out_con: endpoint {
- remote-endpoint = <&hdmi_con_in>;
- };
-};
-
-&i2c0 {
- status = "okay";
-
- axp209: pmic@34 {
- reg = <0x34>;
- interrupt-parent = <&nmi_intc>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
- };
-};
-
-&i2c2 {
- status = "okay";
-};
-
-&ir0 {
- pinctrl-names = "default";
- pinctrl-0 = <&ir0_rx_pin>;
- status = "okay";
-};
-
-&mmc0 {
- vmmc-supply = <®_vcc3v3>;
- bus-width = <4>;
- cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
- status = "okay";
-};
-
-&ohci0 {
- status = "okay";
-};
-
-&otg_sram {
- status = "okay";
-};
-
-#include "axp209.dtsi"
-
-&ac_power_supply {
- status = "okay";
-};
-
-&battery_power_supply {
- status = "okay";
-};
-
-®_ahci_5v {
- gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
- status = "okay";
-};
-
-®_dcdc2 {
- regulator-always-on;
- regulator-min-microvolt = <1000000>;
- regulator-max-microvolt = <1400000>;
- regulator-name = "vdd-cpu";
-};
-
-®_dcdc3 {
- regulator-always-on;
- regulator-min-microvolt = <1000000>;
- regulator-max-microvolt = <1400000>;
- regulator-name = "vdd-int-dll";
-};
-
-®_ldo1 {
- regulator-name = "vdd-rtc";
-};
-
-®_ldo2 {
- regulator-always-on;
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3000000>;
- regulator-name = "avcc";
-};
-
-®_usb0_vbus {
- status = "okay";
-};
-
-®_usb2_vbus {
- gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
- status = "okay";
-};
-
-&spi0 {
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_pi_pins>,
- <&spi0_cs0_pi_pin>,
- <&spi0_cs1_pi_pin>;
- status = "okay";
-};
-
-&uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
-};
-
-&uart3 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart3_ph_pins>;
- status = "okay";
-};
-
-&uart7 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart7_pi_pins>;
- status = "okay";
-};
-
-&usb_otg {
- dr_mode = "otg";
- status = "okay";
-};
-
-&usb_power_supply {
- status = "okay";
-};
-
-&usbphy {
- usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
- usb0_vbus_power-supply = <&usb_power_supply>;
- usb0_vbus-supply = <®_usb0_vbus>;
- usb2_vbus-supply = <®_usb2_vbus>;
- status = "okay";
};
--
2.20.1
next prev parent reply other threads:[~2020-02-06 11:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 11:33 [PATCH 0/5] dts: Add Linutronix Testbox bage
2020-02-06 11:33 ` [PATCH 1/5] dt-bindings: Add vendor prefix lx for Linutronix bage
2020-02-06 21:55 ` Rob Herring
2020-02-10 7:43 ` Maxime Ripard
2020-02-11 17:15 ` Rob Herring
2020-02-12 9:39 ` Benedikt Spranger
2020-02-12 11:56 ` Maxime Ripard
2020-02-06 11:33 ` [PATCH 2/5] dt-bindings: arm: sunxi: Add Linutronix Testbox bage
2020-02-06 21:58 ` Rob Herring
2020-02-06 11:33 ` [PATCH 3/5] ARM: dts: sun7i: lamobo-r1: Use SPDX identifier bage
2020-02-06 12:54 ` Thomas Gleixner
2020-02-06 11:33 ` bage [this message]
2020-02-10 7:45 ` [PATCH 4/5] ARM: dts: sun7i: lamobo-r1: Split out commons Maxime Ripard
2020-02-12 10:01 ` Benedikt Spranger
2020-02-12 12:26 ` Maxime Ripard
2020-02-06 11:33 ` [PATCH 5/5] ARM: dts: sun7i: Add Linutronix Testbox v2 board bage
2020-02-10 7:56 ` Maxime Ripard
2020-02-12 11:20 ` Benedikt Spranger
2020-02-12 12:33 ` Maxime Ripard
2020-02-14 11:10 ` [PATCH v2 0/3] dts: Add Linutronix Testbox bage
2020-02-14 11:10 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Linutronix bage
2020-02-14 13:21 ` Maxime Ripard
2020-02-19 20:06 ` Rob Herring
2020-02-14 11:10 ` [PATCH v2 2/3] dt-bindings: arm: sunxi: Add Linutronix Testbox bage
2020-02-14 11:10 ` [PATCH v2 3/3] ARM: dts: sun7i: Add Linutronix Testbox v2 board bage
2020-02-14 13:26 ` Maxime Ripard
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=20200206113328.7296-5-bage@linutronix.de \
--to=bage@linutronix.de \
--cc=b.spranger@linutronix.de \
--cc=devicetree@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mripard@kernel.org \
--cc=robh+dt@kernel.org \
/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).