[PATCH] Add DT support for PinBall board

Gregory Hermant gregory.hermant at calao-systems.com
Tue Mar 24 01:55:12 PDT 2015


Signed-off-by: Gregory Hermant <gregory.hermant at calao-systems.com>
---
 arch/arm/boot/dts/Makefile            |    1 +
 arch/arm/boot/dts/bcm2708-pinball.dts |  195 +++++++++++++++++++++++++++++++++
 2 files changed, 196 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm2708-pinball.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 6051daa..ba2e3f9 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -63,6 +63,7 @@ ifeq ($(CONFIG_BCM2709_DT),y)
 endif
 dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
 dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb
+dtb-$(CONFIG_BCM2708_DT) += bcm2708-pinball.dtb
 dtb-$(CONFIG_BCM2709_DT) += bcm2709-rpi-2-b.dtb
 dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
 dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
diff --git a/arch/arm/boot/dts/bcm2708-pinball.dts b/arch/arm/boot/dts/bcm2708-pinball.dts
new file mode 100644
index 0000000..e14b188
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2708-pinball.dts
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2015 Calao-systems
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/*
+ * Pinball board is manufactured by calao-systems.
+ * More info at : http://www.pinballboard.org/
+ */
+
+/dts-v1/;
+
+/include/ "bcm2708.dtsi"
+
+/ {
+	compatible = "brcm,bcm2708";
+	model = "Pinball board";
+
+	clocks {
+		can0_osc: can0_osc {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <20000000>;
+		};
+
+		duart_clk: duart_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <14745600>;
+		};
+	};
+
+	aliases {
+		soc = &soc;
+		spi0 = &spi0;
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2s  = &i2s;
+		gpio = &gpio;
+		intc = &intc;
+		leds = &leds;
+		sound = &sound;
+	};
+
+	sound: sound {
+		compatible = "hifiberry,hifiberry-digi";
+		i2s-controller = <&i2s>;
+	};
+
+	gpio_keys: gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&button1>;
+
+		button at 40 {
+			label = "GPIO KEY_ENTER";
+			linux,code = <28>;
+			gpios = <&gpio 40 1>;
+			gpio-key,wakeup;
+		};
+	};
+
+};
+
+&gpio {
+	spi0_pins: spi0_pins {
+		brcm,pins = <7 8 9 10 11>;
+		brcm,function = <4>; /* alt0 */
+	};
+
+	i2c0_pins: i2c0 {
+		brcm,pins = <0 1>;
+		brcm,function = <4>;
+	};
+
+	i2c1_pins: i2c1 {
+		brcm,pins = <2 3>;
+		brcm,function = <4>;
+	};
+
+	i2s_pins: i2s {
+		brcm,pins = <28 29 31>;
+		brcm,function = <6>; /* alt2 */
+	};
+
+	button1: button1 {
+		brcm,pins = <40>;
+		brcm,function = <0>; /* in */
+		brcm,pull = <2>; /* up */
+	};
+
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins>;
+
+	can0: mcp2515 at 0 {
+		compatible = "microchip,mcp2515";
+		reg = <0>;
+		clocks = <&can0_osc>;
+		irq-gpio = <&gpio 33 0x2>;
+		interrupts = <33 2>;
+		interrupt-parent = <&gpio>;
+		interrupt-controller;
+		spi-max-frequency = <10000000>;
+	};
+
+	max3109: max3109 at 1 {
+		compatible = "maxim,max3109";
+		reg = <1>;
+		clocks = <&duart_clk>;
+		clock-names = "osc";
+		irq-gpio = <&gpio 13 0x2>;
+		interrupts = <13 2>;
+		interrupt-parent = <&gpio>;
+		interrupt-controller;
+		gpio-controller;
+		#gpio-cells = <2>;
+		spi-max-frequency = <26000000>;
+	};
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	clock-frequency = <100000>;
+
+	pca9536 at 41 {
+		compatible = "nxp,pca9536";
+		reg = <0x41>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	at24 at 50 {
+		compatible = "at24,24c02";
+		pagesize = <16>;
+		reg = <0x50>;
+	};
+
+	rtc at 68 {
+		compatible = "dallas,ds3232";
+		reg = <0x68>;
+	};
+
+	wm8804 at 3b {
+		#sound-dai-cells = <0>;
+		compatible = "wlf,wm8804";
+		reg = <0x3b>;
+	};
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	clock-frequency = <100000>;
+};
+
+&i2s {
+	#sound-dai-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s_pins>;
+};
+
+&leds {
+	act_led: act {
+		label = "led0";
+		linux,default-trigger = "heartbeat";
+		gpios = <&gpio 30 1>;
+	};
+};
+
+/ {
+	__overrides__ {
+		i2s = <&i2s>,"status";
+		spi = <&spi0>,"status";
+		i2c0 = <&i2c0>,"status";
+		i2c1 = <&i2c1>,"status";
+		i2c0_baudrate = <&i2c0>,"clock-frequency:0";
+		i2c1_baudrate = <&i2c1>,"clock-frequency:0";
+
+		act_led_gpio = <&act_led>,"gpios:4";
+		act_led_activelow = <&act_led>,"gpios:8";
+		act_led_trigger = <&act_led>,"linux,default-trigger";
+	};
+};
-- 
1.7.9.5




More information about the linux-rpi-kernel mailing list