Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: DTS: img: add device tree for Marduk board

Add support for Imagination Technologies' Marduk board which is based
on Pistachio SoC. It is also known as Creator Ci40. Marduk is legacy
name and will be there for decades.

Documentation for this board can be found on
https://docs.creatordev.io/ci40/

This patch adds initial support for board with following peripherals:

* PWM based heartbeat LED
* GPIO based buttons
* SPI NOR flash on SPI1
* UART0 and UART1
* SD card
* Ethernet
* USB
* PWM
* ADC
* I2C

Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: James Hartley <james.hartley@imgtec.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14394/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Rahul Bedarkar and committed by
Ralf Baechle
daa10170 d774a589

+188
+10
Documentation/devicetree/bindings/mips/img/pistachio-marduk.txt
··· 1 + Imagination Technologies' Pistachio SoC based Marduk Board 2 + ========================================================== 3 + 4 + Compatible string must be "img,pistachio-marduk", "img,pistachio" 5 + 6 + Hardware and other related documentation is available at 7 + https://docs.creatordev.io/ci40/ 8 + 9 + It is also known as Creator Ci40. Marduk is legacy name and will 10 + be there for decades.
+6
MAINTAINERS
··· 7692 7692 L: linux-man@vger.kernel.org 7693 7693 S: Maintained 7694 7694 7695 + MARDUK (CREATOR CI40) DEVICE TREE SUPPORT 7696 + M: Rahul Bedarkar <rahul.bedarkar@imgtec.com> 7697 + L: linux-mips@linux-mips.org 7698 + S: Maintained 7699 + F: arch/mips/boot/dts/img/pistachio_marduk.dts 7700 + 7695 7701 MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER 7696 7702 M: Andrew Lunn <andrew@lunn.ch> 7697 7703 M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
+9
arch/mips/boot/dts/img/Makefile
··· 1 + dtb-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb 2 + 3 + obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 4 + 5 + # Force kbuild to make empty built-in.o if necessary 6 + obj- += dummy.o 7 + 8 + always := $(dtb-y) 9 + clean-files := *.dtb *.dtb.S
+163
arch/mips/boot/dts/img/pistachio_marduk.dts
··· 1 + /* 2 + * Copyright (C) 2015, 2016 Imagination Technologies Ltd. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * IMG Marduk board is also known as Creator Ci40. 9 + */ 10 + 11 + /dts-v1/; 12 + 13 + #include "pistachio.dtsi" 14 + 15 + / { 16 + model = "IMG Marduk (Creator Ci40)"; 17 + compatible = "img,pistachio-marduk", "img,pistachio"; 18 + 19 + aliases { 20 + serial0 = &uart0; 21 + serial1 = &uart1; 22 + ethernet0 = &enet; 23 + spi0 = &spfi0; 24 + spi1 = &spfi1; 25 + }; 26 + 27 + chosen { 28 + bootargs = "root=/dev/sda1 rootwait ro lpj=723968"; 29 + stdout-path = "serial1:115200"; 30 + }; 31 + 32 + memory { 33 + device_type = "memory"; 34 + reg = <0x00000000 0x10000000>; 35 + }; 36 + 37 + reg_1v8: fixed-regulator { 38 + compatible = "regulator-fixed"; 39 + regulator-name = "aux_adc_vref"; 40 + regulator-min-microvolt = <1800000>; 41 + regulator-max-microvolt = <1800000>; 42 + regulator-boot-on; 43 + }; 44 + 45 + internal_dac_supply: internal-dac-supply { 46 + compatible = "regulator-fixed"; 47 + regulator-name = "internal_dac_supply"; 48 + regulator-min-microvolt = <1800000>; 49 + regulator-max-microvolt = <1800000>; 50 + }; 51 + 52 + leds { 53 + compatible = "pwm-leds"; 54 + heartbeat { 55 + label = "marduk:red:heartbeat"; 56 + pwms = <&pwm 3 300000>; 57 + max-brightness = <255>; 58 + linux,default-trigger = "heartbeat"; 59 + }; 60 + }; 61 + 62 + keys { 63 + compatible = "gpio-keys"; 64 + button@1 { 65 + label = "Button 1"; 66 + linux,code = <0x101>; /* BTN_1 */ 67 + gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; 68 + }; 69 + button@2 { 70 + label = "Button 2"; 71 + linux,code = <0x102>; /* BTN_2 */ 72 + gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; 73 + }; 74 + }; 75 + }; 76 + 77 + &internal_dac { 78 + VDD-supply = <&internal_dac_supply>; 79 + }; 80 + 81 + &spfi1 { 82 + status = "okay"; 83 + 84 + pinctrl-0 = <&spim1_pins>, <&spim1_quad_pins>, <&spim1_cs0_pin>, 85 + <&spim1_cs1_pin>; 86 + pinctrl-names = "default"; 87 + cs-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>; 88 + 89 + flash@0 { 90 + compatible = "spansion,s25fl016k", "jedec,spi-nor"; 91 + reg = <0>; 92 + spi-max-frequency = <50000000>; 93 + }; 94 + }; 95 + 96 + &uart0 { 97 + status = "okay"; 98 + assigned-clock-rates = <114278400>, <1843200>; 99 + }; 100 + 101 + &uart1 { 102 + status = "okay"; 103 + }; 104 + 105 + &usb { 106 + status = "okay"; 107 + }; 108 + 109 + &enet { 110 + status = "okay"; 111 + }; 112 + 113 + &pin_enet { 114 + drive-strength = <2>; 115 + }; 116 + 117 + &pin_enet_phy_clk { 118 + drive-strength = <2>; 119 + }; 120 + 121 + &sdhost { 122 + status = "okay"; 123 + bus-width = <4>; 124 + disable-wp; 125 + }; 126 + 127 + &pin_sdhost_cmd { 128 + drive-strength = <2>; 129 + }; 130 + 131 + &pin_sdhost_data { 132 + drive-strength = <2>; 133 + }; 134 + 135 + &pwm { 136 + status = "okay"; 137 + 138 + pinctrl-0 = <&pwmpdm0_pin>, <&pwmpdm1_pin>, <&pwmpdm2_pin>, 139 + <&pwmpdm3_pin>; 140 + pinctrl-names = "default"; 141 + }; 142 + 143 + &adc { 144 + status = "okay"; 145 + vref-supply = <&reg_1v8>; 146 + adc-reserved-channels = <0x10>; 147 + }; 148 + 149 + &i2c2 { 150 + status = "okay"; 151 + clock-frequency = <400000>; 152 + 153 + tpm@20 { 154 + compatible = "infineon,slb9645tt"; 155 + reg = <0x20>; 156 + }; 157 + 158 + }; 159 + 160 + &i2c3 { 161 + status = "okay"; 162 + clock-frequency = <400000>; 163 + };