1 From a189771546b304250cf18b26748edfefb857adbf Mon Sep 17 00:00:00 2001
2 From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
3 Date: Fri, 14 Oct 2016 11:25:55 +0530
4 Subject: MIPS: DTS: img: add device tree for Marduk board
6 Add support for Imagination Technologies' Marduk board which is based
7 on Pistachio SoC. It is also known as Creator Ci40. Marduk is legacy
8 name and will be there for decades.
10 Documentation for this board can be found on
11 https://docs.creatordev.io/ci40/
13 This patch adds initial support for board with following peripherals:
15 * PWM based heartbeat LED
17 * SPI NOR flash on SPI1
26 (apply from https://patchwork.linux-mips.org/project/linux-mips/list/?submitter=7165)
28 Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
29 Acked-by: Rob Herring <robh@kernel.org>
30 Acked-by: James Hartley <james.hartley@imgtec.com>
32 .../bindings/mips/img/pistachio-marduk.txt | 10 ++
33 arch/mips/boot/dts/img/Makefile | 9 ++
34 arch/mips/boot/dts/img/pistachio_marduk.dts | 163 +++++++++++++++++++++
35 3 files changed, 182 insertions(+)
36 create mode 100644 Documentation/devicetree/bindings/mips/img/pistachio-marduk.txt
37 create mode 100644 arch/mips/boot/dts/img/Makefile
38 create mode 100644 arch/mips/boot/dts/img/pistachio_marduk.dts
40 diff --git a/Documentation/devicetree/bindings/mips/img/pistachio-marduk.txt b/Documentation/devicetree/bindings/mips/img/pistachio-marduk.txt
42 index 0000000..2d5126d
44 +++ b/Documentation/devicetree/bindings/mips/img/pistachio-marduk.txt
46 +Imagination Technologies' Pistachio SoC based Marduk Board
47 +==========================================================
49 +Compatible string must be "img,pistachio-marduk", "img,pistachio"
51 +Hardware and other related documentation is available at
52 +https://docs.creatordev.io/ci40/
54 +It is also known as Creator Ci40. Marduk is legacy name and will
55 +be there for decades.
56 diff --git a/arch/mips/boot/dts/img/Makefile b/arch/mips/boot/dts/img/Makefile
58 index 0000000..69a65f0
60 +++ b/arch/mips/boot/dts/img/Makefile
62 +dtb-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb
64 +obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
66 +# Force kbuild to make empty built-in.o if necessary
70 +clean-files := *.dtb *.dtb.S
71 diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
73 index 0000000..cf9cebd
75 +++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
78 + * Copyright (C) 2015, 2016 Imagination Technologies Ltd.
80 + * This program is free software; you can redistribute it and/or modify
81 + * it under the terms of the GNU General Public License version 2 as
82 + * published by the Free Software Foundation.
84 + * IMG Marduk board is also known as Creator Ci40.
89 +#include "pistachio.dtsi"
92 + model = "IMG Marduk (Creator Ci40)";
93 + compatible = "img,pistachio-marduk", "img,pistachio";
104 + bootargs = "root=/dev/sda1 rootwait ro lpj=723968";
105 + stdout-path = "serial1:115200";
109 + device_type = "memory";
110 + reg = <0x00000000 0x10000000>;
113 + reg_1v8: fixed-regulator {
114 + compatible = "regulator-fixed";
115 + regulator-name = "aux_adc_vref";
116 + regulator-min-microvolt = <1800000>;
117 + regulator-max-microvolt = <1800000>;
121 + internal_dac_supply: internal-dac-supply {
122 + compatible = "regulator-fixed";
123 + regulator-name = "internal_dac_supply";
124 + regulator-min-microvolt = <1800000>;
125 + regulator-max-microvolt = <1800000>;
129 + compatible = "pwm-leds";
131 + label = "marduk:red:heartbeat";
132 + pwms = <&pwm 3 300000>;
133 + max-brightness = <255>;
134 + linux,default-trigger = "heartbeat";
139 + compatible = "gpio-keys";
141 + label = "Button 1";
142 + linux,code = <0x101>; /* BTN_1 */
143 + gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
146 + label = "Button 2";
147 + linux,code = <0x102>; /* BTN_2 */
148 + gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
154 + VDD-supply = <&internal_dac_supply>;
160 + pinctrl-0 = <&spim1_pins>, <&spim1_quad_pins>, <&spim1_cs0_pin>,
162 + pinctrl-names = "default";
163 + cs-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>;
166 + compatible = "spansion,s25fl016k", "jedec,spi-nor";
168 + spi-max-frequency = <50000000>;
174 + assigned-clock-rates = <114278400>, <1843200>;
190 + drive-strength = <2>;
194 + drive-strength = <2>;
204 + drive-strength = <2>;
208 + drive-strength = <2>;
214 + pinctrl-0 = <&pwmpdm0_pin>, <&pwmpdm1_pin>, <&pwmpdm2_pin>,
216 + pinctrl-names = "default";
221 + vref-supply = <®_1v8>;
222 + adc-reserved-channels = <0x10>;
227 + clock-frequency = <400000>;
230 + compatible = "infineon,slb9645tt";
238 + clock-frequency = <400000>;