summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'bsp')
-rw-r--r--bsp/sifive-hifive1-revb/design.dts18
-rw-r--r--bsp/sifive-hifive1/design.dts18
-rwxr-xr-xbsp/update-targets.sh6
3 files changed, 41 insertions, 1 deletions
diff --git a/bsp/sifive-hifive1-revb/design.dts b/bsp/sifive-hifive1-revb/design.dts
index 6c7da04..0e48622 100644
--- a/bsp/sifive-hifive1-revb/design.dts
+++ b/bsp/sifive-hifive1-revb/design.dts
@@ -192,5 +192,23 @@
reg = <0x10016000 0x1000>;
reg-names = "control";
};
+ led@0red {
+ compatible = "sifive,gpio-leds";
+ label = "LD0red";
+ gpios = <&gpio0 22>;
+ linux,default-trigger = "none";
+ };
+ led@0green {
+ compatible = "sifive,gpio-leds";
+ label = "LD0green";
+ gpios = <&gpio0 19>;
+ linux,default-trigger = "none";
+ };
+ led@0blue {
+ compatible = "sifive,gpio-leds";
+ label = "LD0blue";
+ gpios = <&gpio0 21>;
+ linux,default-trigger = "none";
+ };
};
};
diff --git a/bsp/sifive-hifive1/design.dts b/bsp/sifive-hifive1/design.dts
index 5ddee6f..d633f10 100644
--- a/bsp/sifive-hifive1/design.dts
+++ b/bsp/sifive-hifive1/design.dts
@@ -180,5 +180,23 @@
clocks = <&hfclk>;
pinmux = <&gpio0 0x0003C 0x0003C>;
};
+ led@0red {
+ compatible = "sifive,gpio-leds";
+ label = "LD0red";
+ gpios = <&gpio0 22>;
+ linux,default-trigger = "none";
+ };
+ led@0green {
+ compatible = "sifive,gpio-leds";
+ label = "LD0green";
+ gpios = <&gpio0 19>;
+ linux,default-trigger = "none";
+ };
+ led@0blue {
+ compatible = "sifive,gpio-leds";
+ label = "LD0blue";
+ gpios = <&gpio0 21>;
+ linux,default-trigger = "none";
+ };
};
};
diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh
index 0ae3ff4..c659f7d 100755
--- a/bsp/update-targets.sh
+++ b/bsp/update-targets.sh
@@ -80,13 +80,16 @@ SETTINGS_FILENAME=settings.mk
update_target() {
TARGET=$1
+ if [ "$TARGET_TYPE" == "" ]; then
+ TARGET_TYPE=$TARGET
+ fi
echo "Updating target $TARGET"
if [ $NO_FIXUP != 1 ]; then
../scripts/fixup-dts --dts $TARGET/$DTS_FILENAME || die "Failed to check $TARGET/$DTS_FILENAME for missing elements"
fi
-
+
# Compile temporary .dtb
$DTC -I dts -O dtb -o $TARGET/$DTB_FILENAME $TARGET/$DTS_FILENAME || die "Failed to compile $TARGET/$DTS_FILENAME to dtb"
@@ -100,6 +103,7 @@ update_target() {
# Remove temporary .dtb
rm $TARGET/$DTB_FILENAME
+ TARGET_TYPE=""
echo ""
}