Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/openrisc/boot/dts/de0-nano-common.dtsi
121834 views
// SPDX-License-Identifier: GPL-2.0

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>

/ {
	leds0: leds {
		compatible = "gpio-leds";

		led-heartbeat {
			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_HEARTBEAT;
			linux,default-trigger = "heartbeat";
			label = "heartbeat";
		};
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x02000000>;
	};

	/* 8 Green LEDs */
	gpio0: gpio@91000000 {
		compatible = "opencores,gpio";
		reg = <0x91000000 0x1>, <0x91000001 0x1>;
		reg-names = "dat", "dirout";
		gpio-controller;
		#gpio-cells = <2>;
	};

	/* 4 DIP Switches */
	gpio1: gpio@92000000 {
		compatible = "opencores,gpio";
		reg = <0x92000000 0x1>, <0x92000001 0x1>;
		reg-names = "dat", "dirout";
		gpio-controller;
		#gpio-cells = <2>;
		status = "disabled";
	};
};