ARM: mstar: Unify common parts of BreadBee boards into a dtsi
authorDaniel Palmer <daniel@0x0f.com>
Thu, 24 Dec 2020 02:03:54 +0000 (11:03 +0900)
committerArnd Bergmann <arnd@arndb.de>
Fri, 22 Jan 2021 16:40:48 +0000 (17:40 +0100)
The BreadBee and the BreadBee Crust are the same PCB with a different
SoC mounted. There are two top level dts to handle this.

To avoid deduplicating the parts that are more related to the PCB than
the SoC (i.e. the voltage regs and LEDs) add a common dtsi that can
be included in both top level dts.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Link: https://lore.kernel.org/r/20201224020354.2212037-1-daniel@0x0f.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/boot/dts/mstar-infinity-breadbee-common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/mstar-infinity-msc313-breadbee_crust.dts
arch/arm/boot/dts/mstar-infinity3-msc313e-breadbee.dts

diff --git a/arch/arm/boot/dts/mstar-infinity-breadbee-common.dtsi b/arch/arm/boot/dts/mstar-infinity-breadbee-common.dtsi
new file mode 100644 (file)
index 0000000..507ff2f
--- /dev/null
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <daniel@thingy.jp>
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       vcc_core: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_core";
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-boot-on;
+       };
+
+       vcc_dram: fixedregulator@1 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_dram";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-boot-on;
+       };
+
+       vcc_io: fixedregulator@2 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_io";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               red {
+                       gpios = <&gpio MSC313_GPIO_SR_IO16 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "activity";
+               };
+               yellow {
+                       gpios = <&gpio MSC313_GPIO_SR_IO17 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&vcc_core>;
+};
index f9db2ff86f2d69f5f25fde47328d17f5ab1e8d75..db4910dcb8a7050d5e5121ad4da3b4fc9275b058 100644 (file)
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 #include "mstar-infinity-msc313.dtsi"
+#include "mstar-infinity-breadbee-common.dtsi"
 
 / {
        model = "BreadBee Crust";
index f0eda80a95cc161c8ee0e3326b845b7c8be317c5..e64ca4ce183010f5ce140f6a01707d0b9fd40a49 100644 (file)
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 #include "mstar-infinity3-msc313e.dtsi"
+#include "mstar-infinity-breadbee-common.dtsi"
 
 / {
        model = "BreadBee";