summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schultz <d.schultz@phytec.de>2017-11-03 11:48:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-11-07 07:47:10 +0100
commitac11a52e078db3eb9dee903df4f5e0b17dae1f5a (patch)
tree331f2d491776969c41c323f4b8270d3eb88503fd
parent2a8a5792b9609160ce5acaf0443016f023be5fd7 (diff)
downloadbarebox-ac11a52e078db3eb9dee903df4f5e0b17dae1f5a.tar.gz
barebox-ac11a52e078db3eb9dee903df4f5e0b17dae1f5a.tar.xz
ARM: dts: AM335x: Add state framework
This patch adds the state framework with an EEPROM partition and two nodes for MAC addresses. It will be available for all phycore AM335x images with EEPROMs. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/dts/am335x-phytec-phycore-som-emmc.dts1
-rw-r--r--arch/arm/dts/am335x-phytec-phycore-som-nand-no-spi.dts1
-rw-r--r--arch/arm/dts/am335x-phytec-phycore-som-nand.dts1
-rw-r--r--arch/arm/dts/am335x-phytec-state.dtsi52
4 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/dts/am335x-phytec-phycore-som-emmc.dts b/arch/arm/dts/am335x-phytec-phycore-som-emmc.dts
index 880700e3bd..f264498e52 100644
--- a/arch/arm/dts/am335x-phytec-phycore-som-emmc.dts
+++ b/arch/arm/dts/am335x-phytec-phycore-som-emmc.dts
@@ -16,6 +16,7 @@
#include "am33xx.dtsi"
#include "am335x-phytec-phycore-som.dtsi"
+#include "am335x-phytec-state.dtsi"
/ {
model = "Phytec phyCORE EMMC AM335x";
diff --git a/arch/arm/dts/am335x-phytec-phycore-som-nand-no-spi.dts b/arch/arm/dts/am335x-phytec-phycore-som-nand-no-spi.dts
index 2c2fab017a..b35294c586 100644
--- a/arch/arm/dts/am335x-phytec-phycore-som-nand-no-spi.dts
+++ b/arch/arm/dts/am335x-phytec-phycore-som-nand-no-spi.dts
@@ -9,6 +9,7 @@
#include "am33xx.dtsi"
#include "am335x-phytec-phycore-som.dtsi"
+#include "am335x-phytec-state.dtsi"
/ {
model = "Phytec phyCORE AM335x";
diff --git a/arch/arm/dts/am335x-phytec-phycore-som-nand.dts b/arch/arm/dts/am335x-phytec-phycore-som-nand.dts
index 6ff2447608..4d7606b574 100644
--- a/arch/arm/dts/am335x-phytec-phycore-som-nand.dts
+++ b/arch/arm/dts/am335x-phytec-phycore-som-nand.dts
@@ -9,6 +9,7 @@
#include "am33xx.dtsi"
#include "am335x-phytec-phycore-som.dtsi"
+#include "am335x-phytec-state.dtsi"
/ {
model = "Phytec phyCORE AM335x";
diff --git a/arch/arm/dts/am335x-phytec-state.dtsi b/arch/arm/dts/am335x-phytec-state.dtsi
new file mode 100644
index 0000000000..fbc35b9184
--- /dev/null
+++ b/arch/arm/dts/am335x-phytec-state.dtsi
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2017 PHYTEC Messtechnik GmbH,
+ * Author: Daniel Schultz <d.schultz@phytec.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program 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.
+ */
+
+/ {
+ aliases {
+ am335x_phytec_mac_state = &am335x_phytec_mac_state;
+ };
+
+ am335x_phytec_mac_state: am335x_phytec_mac_state {
+ magic = <0x3f45620e>;
+ compatible = "barebox,state";
+ backend-type = "raw";
+ backend = <&backend_state_eeprom>;
+ backend-stridesize = <40>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ mac0 {
+ reg = <0x0 0x6>;
+ type = "mac";
+ };
+ mac1 {
+ reg = <0x6 0x6>;
+ type = "mac";
+ };
+
+ };
+};
+
+&eeprom {
+ status = "okay";
+ partitions {
+ compatible = "fixed-partitions";
+ #size-cells = <1>;
+ #address-cells = <1>;
+ backend_state_eeprom: state@0 {
+ reg = <0x000 0x120>;
+ label = "state-eeprom";
+ };
+ };
+};