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

ARM: sun5i: Add C.H.I.P DTS

The C.H.I.P. is a small SBC with an Allwinner R8, 8GB of NAND, 512MB of
RAM, USB host and OTG, a wifi / bluetooth combo chip, an audio/video jack
and two connectors to plug additional boards on top of it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>

+216 -1
+2 -1
arch/arm/boot/dts/Makefile
··· 601 601 sun5i-a13-olinuxino.dtb \ 602 602 sun5i-a13-olinuxino-micro.dtb \ 603 603 sun5i-a13-q8-tablet.dtb \ 604 - sun5i-a13-utoo-p66.dtb 604 + sun5i-a13-utoo-p66.dtb \ 605 + sun5i-r8-chip.dtb 605 606 dtb-$(CONFIG_MACH_SUN6I) += \ 606 607 sun6i-a31-app4-evb1.dtb \ 607 608 sun6i-a31-colombus.dtb \
+214
arch/arm/boot/dts/sun5i-r8-chip.dts
··· 1 + /* 2 + * Copyright 2015 Free Electrons 3 + * Copyright 2015 NextThing Co 4 + * 5 + * Maxime Ripard <maxime.ripard@free-electrons.com> 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License as 14 + * published by the Free Software Foundation; either version 2 of the 15 + * License, or (at your option) any later version. 16 + * 17 + * This file is distributed in the hope that it will be useful, 18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 + * GNU General Public License for more details. 21 + * 22 + * Or, alternatively, 23 + * 24 + * b) Permission is hereby granted, free of charge, to any person 25 + * obtaining a copy of this software and associated documentation 26 + * files (the "Software"), to deal in the Software without 27 + * restriction, including without limitation the rights to use, 28 + * copy, modify, merge, publish, distribute, sublicense, and/or 29 + * sell copies of the Software, and to permit persons to whom the 30 + * Software is furnished to do so, subject to the following 31 + * conditions: 32 + * 33 + * The above copyright notice and this permission notice shall be 34 + * included in all copies or substantial portions of the Software. 35 + * 36 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 41 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 + * OTHER DEALINGS IN THE SOFTWARE. 44 + */ 45 + 46 + /dts-v1/; 47 + #include "sun5i-r8.dtsi" 48 + #include "sunxi-common-regulators.dtsi" 49 + 50 + #include <dt-bindings/gpio/gpio.h> 51 + #include <dt-bindings/interrupt-controller/irq.h> 52 + 53 + / { 54 + model = "NextThing C.H.I.P."; 55 + compatible = "nextthing,chip", "allwinner,sun5i-r8"; 56 + 57 + aliases { 58 + i2c0 = &i2c0; 59 + i2c2 = &i2c2; 60 + serial0 = &uart1; 61 + serial1 = &uart3; 62 + }; 63 + 64 + chosen { 65 + stdout-path = "serial0:115200n8"; 66 + }; 67 + }; 68 + 69 + &ehci0 { 70 + status = "okay"; 71 + }; 72 + 73 + &i2c0 { 74 + pinctrl-names = "default"; 75 + pinctrl-0 = <&i2c0_pins_a>; 76 + status = "okay"; 77 + 78 + axp209: pmic@34 { 79 + reg = <0x34>; 80 + 81 + /* 82 + * The interrupt is routed through the "External Fast 83 + * Interrupt Request" pin (ball G13 of the module) 84 + * directly to the main interrupt controller, without 85 + * any other controller interfering. 86 + */ 87 + interrupts = <0>; 88 + }; 89 + }; 90 + 91 + #include "axp209.dtsi" 92 + 93 + &i2c2 { 94 + pinctrl-names = "default"; 95 + pinctrl-0 = <&i2c2_pins_a>; 96 + status = "okay"; 97 + 98 + xio: gpio@38 { 99 + compatible = "nxp,pcf8574a"; 100 + reg = <0x38>; 101 + 102 + gpio-controller; 103 + #gpio-cells = <2>; 104 + 105 + interrupt-parent = <&pio>; 106 + interrupts = <6 0 IRQ_TYPE_EDGE_FALLING>; 107 + interrupt-controller; 108 + #interrupt-cells = <2>; 109 + }; 110 + }; 111 + 112 + &mmc0 { 113 + pinctrl-names = "default"; 114 + pinctrl-0 = <&mmc0_pins_a>; 115 + vmmc-supply = <&reg_vcc3v3>; 116 + bus-width = <4>; 117 + non-removable; 118 + status = "okay"; 119 + }; 120 + 121 + &ohci0 { 122 + status = "okay"; 123 + }; 124 + 125 + &otg_sram { 126 + status = "okay"; 127 + }; 128 + 129 + &pio { 130 + chip_vbus_pin: chip_vbus_pin@0 { 131 + allwinner,pins = "PB10"; 132 + allwinner,function = "gpio_out"; 133 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 134 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 135 + }; 136 + 137 + chip_id_det_pin: chip_id_det_pin@0 { 138 + allwinner,pins = "PG2"; 139 + allwinner,function = "gpio_in"; 140 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 141 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 142 + }; 143 + }; 144 + 145 + &reg_dcdc2 { 146 + regulator-min-microvolt = <1000000>; 147 + regulator-max-microvolt = <1400000>; 148 + regulator-name = "cpuvdd"; 149 + regulator-always-on; 150 + }; 151 + 152 + &reg_dcdc3 { 153 + regulator-min-microvolt = <1000000>; 154 + regulator-max-microvolt = <1300000>; 155 + regulator-name = "corevdd"; 156 + regulator-always-on; 157 + }; 158 + 159 + &reg_ldo1 { 160 + regulator-name = "rtcvdd"; 161 + }; 162 + 163 + &reg_ldo2 { 164 + regulator-min-microvolt = <2700000>; 165 + regulator-max-microvolt = <3300000>; 166 + regulator-name = "avcc"; 167 + regulator-always-on; 168 + }; 169 + 170 + &reg_ldo5 { 171 + regulator-min-microvolt = <1800000>; 172 + regulator-max-microvolt = <1800000>; 173 + regulator-name = "vcc-1v8"; 174 + }; 175 + 176 + &reg_usb0_vbus { 177 + pinctrl-0 = <&chip_vbus_pin>; 178 + vin-supply = <&reg_vcc5v0>; 179 + gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */ 180 + status = "okay"; 181 + }; 182 + 183 + &uart1 { 184 + pinctrl-names = "default"; 185 + pinctrl-0 = <&uart1_pins_b>; 186 + status = "okay"; 187 + }; 188 + 189 + &uart3 { 190 + pinctrl-names = "default"; 191 + pinctrl-0 = <&uart3_pins_a>, 192 + <&uart3_pins_cts_rts_a>; 193 + status = "okay"; 194 + }; 195 + 196 + &usb_otg { 197 + dr_mode = "otg"; 198 + status = "okay"; 199 + }; 200 + 201 + &usb_power_supply { 202 + status = "okay"; 203 + }; 204 + 205 + &usbphy { 206 + pinctrl-names = "default"; 207 + pinctrl-0 = <&chip_id_det_pin>; 208 + status = "okay"; 209 + 210 + usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 211 + usb0_vbus_power-supply = <&usb_power_supply>; 212 + usb0_vbus-supply = <&reg_usb0_vbus>; 213 + usb1_vbus-supply = <&reg_vcc5v0>; 214 + };