[PATCH 3/3] ARM: phytec-som-am335x: Add autoenable

Daniel Schultz d.schultz at phytec.de
Fri Oct 27 07:37:41 PDT 2017


Add autoenable for components, which can be populated on an AM335x
phyCORE SoM.

Signed-off-by: Daniel Schultz <d.schultz at phytec.de>
---
 arch/arm/boards/phytec-som-am335x/board.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boards/phytec-som-am335x/board.c b/arch/arm/boards/phytec-som-am335x/board.c
index 34d4df1..5d13471 100644
--- a/arch/arm/boards/phytec-som-am335x/board.c
+++ b/arch/arm/boards/phytec-som-am335x/board.c
@@ -26,6 +26,7 @@
 #include <io.h>
 #include <linux/sizes.h>
 #include <envfs.h>
+#include <autoenable.h>
 #include <state.h>
 #include <asm/armlinux.h>
 #include <generated/mach-types.h>
@@ -136,6 +137,17 @@ static int physom_devices_init(void)
 		}
 	}
 
+	/* Enable NAND */
+	autoenable_device_by_path("/ocp/gpmc at 50000000");
+	/* Enable eMMC */
+	autoenable_device_by_path("/ocp/mmc at 481d8000");
+	/* Enable SPI NOR */
+	autoenable_device_by_path("/ocp/spi at 48030000/m25p80 at 0");
+
+	autoenable_i2c_by_path("/ocp/i2c at 44e0b000/temp at 4b");
+	autoenable_i2c_by_path("/ocp/i2c at 44e0b000/eeprom at 52");
+	autoenable_i2c_by_path("/ocp/i2c at 44e0b000/rtc at 68");
+
 	if (IS_ENABLED(CONFIG_SHELL_NONE))
 		return am33xx_of_register_bootdevice();
 
-- 
2.7.4




More information about the barebox mailing list