diff --git a/.gitattributes b/.gitattributes
index 4b32eaa9571e64e47b51c43537063f56b204d8b3..c9ba5bfc403600a8c9418fd4503574bcb69dc87e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,4 @@
-*.c   diff=cpp
-*.h   diff=cpp
-*.dtsi diff=dts
-*.dts  diff=dts
+# SPDX-License-Identifier: GPL-2.0-only
+*.[ch] diff=cpp
+*.dts diff=dts
+*.dts[io] diff=dts