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

ARM: dts: dove: Add proper support for Compulab CM-A510/SBC-A510

Existing dts file for Compulab CM-A510 was very limited due to missing
hardware. Now that we actually found somebody with that board, properly
rework it to provide a CoM/SoM include and a board file for Compulab's
SBC-A510.

Both the CM-A510 SoM and the SBC-A510 can be configured with different
options, so we only enable a minimum set of options. The actual board
configuration will have to be set by either the bootloader or user.

Although functionally not required, repeat even disabled nodes again
to increse their visibility in the dtsi/dts files.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Gabriel Dobato <dobatog@gmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

authored by

Sebastian Hesselbarth and committed by
Gregory CLEMENT
896dd272 aa532007

+377 -38
-38
arch/arm/boot/dts/dove-cm-a510.dts
··· 1 - /dts-v1/; 2 - 3 - #include "dove.dtsi" 4 - 5 - / { 6 - model = "Compulab CM-A510"; 7 - compatible = "compulab,cm-a510", "marvell,dove"; 8 - 9 - memory { 10 - device_type = "memory"; 11 - reg = <0x00000000 0x40000000>; 12 - }; 13 - 14 - chosen { 15 - bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 - }; 17 - }; 18 - 19 - &uart0 { status = "okay"; }; 20 - &uart1 { status = "okay"; }; 21 - &sdio0 { status = "okay"; }; 22 - &sdio1 { status = "okay"; }; 23 - &sata0 { status = "okay"; }; 24 - 25 - &spi0 { 26 - status = "okay"; 27 - 28 - /* spi0.0: 4M Flash Winbond W25Q32BV */ 29 - spi-flash@0 { 30 - compatible = "st,w25q32"; 31 - spi-max-frequency = <20000000>; 32 - reg = <0>; 33 - }; 34 - }; 35 - 36 - &i2c0 { 37 - status = "okay"; 38 - };
+195
arch/arm/boot/dts/dove-cm-a510.dtsi
··· 1 + /* 2 + * Device Tree include for Compulab CM-A510 System-on-Module 3 + * 4 + * Copyright (C) 2015, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; version 2 of the 14 + * License. 15 + * 16 + * This file is distributed in the hope that it will be useful 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * Or, alternatively 22 + * 23 + * b) Permission is hereby granted, free of charge, to any person 24 + * obtaining a copy of this software and associated documentation 25 + * files (the "Software"), to deal in the Software without 26 + * restriction, including without limitation the rights to use 27 + * copy, modify, merge, publish, distribute, sublicense, and/or 28 + * sell copies of the Software, and to permit persons to whom the 29 + * Software is furnished to do so, subject to the following 30 + * conditions: 31 + * 32 + * The above copyright notice and this permission notice shall be 33 + * included in all copies or substantial portions of the Software. 34 + * 35 + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND 36 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY 40 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42 + * OTHER DEALINGS IN THE SOFTWARE. 43 + */ 44 + 45 + /* 46 + * The CM-A510 comes with several optional components: 47 + * 48 + * Memory options: 49 + * D512: 512M 50 + * D1024: 1G 51 + * 52 + * NAND options: 53 + * N512: 512M NAND 54 + * 55 + * Ethernet options: 56 + * E1: PHY RTL8211D on internal GbE (SMI address 0x03) 57 + * E2: Additional ethernet NIC RTL8111D on PCIe1 58 + * 59 + * Audio options: 60 + * A: TI TLV320AIC23b audio codec (I2C address 0x1a) 61 + * 62 + * Touchscreen options: 63 + * I: TI TSC2046 touchscreen controller (on SPI1) 64 + * 65 + * USB options: 66 + * U2: 2 dual-role USB2.0 ports 67 + * U4: 2 additional USB2.0 host ports (via USB1) 68 + * 69 + * WiFi options: 70 + * W: Broadcom BCM4319 802.11b/g/n (USI WM-N-BM-01 on SDIO1) 71 + * 72 + * GPIOs used on CM-A510: 73 + * 1 GbE PHY reset (active low) 74 + * 3 WakeUp 75 + * 8 PowerOff (active low) 76 + * 13 Touchscreen pen irq (active low) 77 + * 65 System LED (active high) 78 + * 69 USB Hub reset (active low) 79 + * 70 WLAN reset (active low) 80 + * 71 WLAN regulator (active high) 81 + */ 82 + 83 + #include "dove.dtsi" 84 + 85 + / { 86 + model = "Compulab CM-A510"; 87 + compatible = "compulab,cm-a510", "marvell,dove"; 88 + 89 + /* 90 + * Set the minimum memory size here and let the 91 + * bootloader set the real size. 92 + */ 93 + memory { 94 + device_type = "memory"; 95 + reg = <0x00000000 0x20000000>; 96 + }; 97 + 98 + leds { 99 + compatible = "gpio-leds"; 100 + /* Set upper NAND data bit to GPO */ 101 + pinctrl-0 = <&pmx_nand_gpo>; 102 + pinctrl-names = "default"; 103 + 104 + system { 105 + label = "cm-a510:system:green"; 106 + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; 107 + default-state = "keep"; 108 + }; 109 + }; 110 + 111 + regulators { 112 + compatible = "simple-bus"; 113 + #address-cells = <1>; 114 + #size-cells = <0>; 115 + 116 + wifi_power: regulator@1 { 117 + compatible = "regulator-fixed"; 118 + regulator-name = "WiFi Power"; 119 + regulator-min-microvolt = <3300000>; 120 + regulator-max-microvolt = <3300000>; 121 + gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>; 122 + }; 123 + }; 124 + }; 125 + 126 + /* Optional RTL8211D GbE PHY on SMI address 0x03 */ 127 + &ethphy { 128 + reg = <3>; 129 + status = "disabled"; 130 + }; 131 + 132 + &i2c0 { 133 + /* Optional TI TLV320AIC23b audio codec */ 134 + opt_audio: audio@1a { 135 + compatible = "ti,tlv320aic23"; 136 + reg = <0x1a>; 137 + status = "disabled"; 138 + }; 139 + }; 140 + 141 + /* Optional RTL8111D GbE NIC on PCIe1 */ 142 + &pcie { status = "disabled"; }; 143 + 144 + &pcie1 { 145 + pinctrl-0 = <&pmx_pcie1_clkreq>; 146 + pinctrl-names = "default"; 147 + status = "disabled"; 148 + }; 149 + 150 + &pinctrl { 151 + pmx_uart2: pmx-uart2 { 152 + marvell,pins = "mpp14", "mpp15"; 153 + marvell,function = "uart2"; 154 + }; 155 + }; 156 + 157 + /* Optional Broadcom BCM4319 802.11b/g/n WiFi module */ 158 + &sdio1 { 159 + non-removable; 160 + vmmc-supply = <&wifi_power>; 161 + reset-gpio = <&gpio2 6 GPIO_ACTIVE_LOW>; 162 + status = "disabled"; 163 + }; 164 + 165 + &spi0 { 166 + status = "okay"; 167 + 168 + /* 1M Flash Winbond W25Q80BL */ 169 + flash@0 { 170 + compatible = "winbond,w25q80"; 171 + spi-max-frequency = <80000000>; 172 + reg = <0>; 173 + }; 174 + }; 175 + 176 + &spi1 { 177 + pinctrl-0 = <&pmx_spi1_20_23>; 178 + pinctrl-names = "default"; 179 + status = "disabled"; 180 + 181 + /* Optional TI TSC2046 touchscreen controller */ 182 + opt_touch: touchscreen@0 { 183 + compatible = "ti,tsc2046"; 184 + spi-max-frequency = <2500000>; 185 + reg = <0>; 186 + pinctrl-0 = <&pmx_gpio_13>; 187 + pinctrl-names = "default"; 188 + interrupts-extended = <&gpio0 13 IRQ_TYPE_EDGE_FALLING>; 189 + }; 190 + }; 191 + 192 + &uart2 { 193 + pinctrl-0 = <&pmx_uart2>; 194 + pinctrl-names = "default"; 195 + };
+182
arch/arm/boot/dts/dove-sbc-a510.dts
··· 1 + /* 2 + * Device Tree file for Compulab SBC-A510 Single Board Computer 3 + * 4 + * Copyright (C) 2015, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; version 2 of the 14 + * License. 15 + * 16 + * This file is distributed in the hope that it will be useful 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * Or, alternatively 22 + * 23 + * b) Permission is hereby granted, free of charge, to any person 24 + * obtaining a copy of this software and associated documentation 25 + * files (the "Software"), to deal in the Software without 26 + * restriction, including without limitation the rights to use 27 + * copy, modify, merge, publish, distribute, sublicense, and/or 28 + * sell copies of the Software, and to permit persons to whom the 29 + * Software is furnished to do so, subject to the following 30 + * conditions: 31 + * 32 + * The above copyright notice and this permission notice shall be 33 + * included in all copies or substantial portions of the Software. 34 + * 35 + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND 36 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY 40 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42 + * OTHER DEALINGS IN THE SOFTWARE. 43 + */ 44 + 45 + /* 46 + * SBC-A510 comprises a PCA9555 I2C GPIO expander its GPIO lines connected to 47 + * 48 + * 0.0 USB0 VBUS_EN (active high) 49 + * 0.1 USB0 VBUS_GOOD 50 + * 0.2 DVI transmitter TI TFP410 MSEN 51 + * 0.3 DVI transmitter TI TFP410 PD# (active low power down) 52 + * 0.4 LVDS transmitter DS90C365 PD# (active low power down) 53 + * 0.5 LCD nRST (active low reset) 54 + * 0.6 PCIe0 nRST (active low reset) 55 + * 0.7 mini-PCIe slot W_DISABLE# 56 + * 57 + * 1.0 MMC WP 58 + * 1.1 Camera Input FPC FLASH_STB and P21.5 59 + * 1.2 Camera Input FPC WE and P21.22 60 + * 1.3 MMC VCC_EN (active high) and P21.7 61 + * 1.4 Camera Input FPC AFTR_RST and P21.17 62 + * 1.5 Camera Input FPC OE and P21.19 63 + * 1.6 Camera Input FPC SNPSHT and P21.6 64 + * 1.7 Camera Input FPC SHTR and P21.10 65 + */ 66 + 67 + /dts-v1/; 68 + 69 + #include "dove-cm-a510.dtsi" 70 + 71 + / { 72 + model = "Compulab SBC-A510"; 73 + compatible = "compulab,sbc-a510", "compulab,cm-a510", "marvell,dove"; 74 + 75 + chosen { 76 + stdout-path = &uart0; 77 + }; 78 + 79 + regulators { 80 + usb0_power: regulator@2 { 81 + compatible = "regulator-fixed"; 82 + regulator-name = "USB Power"; 83 + regulator-min-microvolt = <5000000>; 84 + regulator-max-microvolt = <5000000>; 85 + gpio = <&gpio_ext 0 GPIO_ACTIVE_HIGH>; 86 + }; 87 + 88 + mmc_power: regulator@3 { 89 + compatible = "regulator-fixed"; 90 + regulator-name = "MMC Power"; 91 + regulator-min-microvolt = <3300000>; 92 + regulator-max-microvolt = <3300000>; 93 + gpio = <&gpio_ext 13 GPIO_ACTIVE_HIGH>; 94 + }; 95 + }; 96 + }; 97 + 98 + /* Ethernet0 depends on CM-A510 option E1 */ 99 + &mdio { status = "disabled"; }; 100 + &eth { status = "disabled"; }; 101 + &ethphy { status = "disabled"; }; 102 + 103 + /* 104 + * USB port 0 can be powered and monitored by I2C GPIO expander: 105 + * VBUS_ENABLE on GPIO0, VBUS_GOOD on GPIO1 106 + */ 107 + &ehci0 { 108 + status = "okay"; 109 + vbus-supply = <&usb0_power>; 110 + }; 111 + 112 + /* USB port 1 (and ports 2, 3 if CM-A510 has U4 option) */ 113 + &ehci1 { status = "okay"; }; 114 + 115 + /* 116 + * I2C bus layout: 117 + * i2c0: 118 + * - Audio Codec, 0x1a (option from CM-A510) 119 + * - DVI transmitter TI TFP410, 0x39 120 + * - HDMI/DVI DDC channel 121 + * i2c1: 122 + * - GPIO expander, NXP PCA9555, 0x20 123 + * - VGA DDC channel 124 + */ 125 + &i2c { 126 + pinctrl-0 = <&pmx_i2c1>; 127 + pinctrl-names = "default"; 128 + }; 129 + 130 + &i2c0 { 131 + /* TI TFP410 DVI transmitter */ 132 + dvi: video@39 { 133 + compatible = "ti,tfp410"; 134 + reg = <0x39>; 135 + powerdown-gpio = <&gpio_ext 3 GPIO_ACTIVE_LOW>; 136 + }; 137 + }; 138 + 139 + &i2c1 { 140 + status = "okay"; 141 + 142 + /* NXP PCA9555 GPIO expander */ 143 + gpio_ext: gpio@20 { 144 + compatible = "nxp,pca9555"; 145 + reg = <0x20>; 146 + #gpio-cells = <2>; 147 + }; 148 + }; 149 + 150 + &pcie { status = "okay"; }; 151 + 152 + /* 153 + * PCIe0 can be configured by Jumper E1 to be either connected to 154 + * a mini-PCIe slot or a Pericom PI7C9X111 PCIe-to-PCI bridge. 155 + */ 156 + &pcie0 { 157 + status = "okay"; 158 + pinctrl-0 = <&pmx_pcie0_clkreq>; 159 + pinctrl-names = "default"; 160 + reset-gpios = <&gpio_ext 6 GPIO_ACTIVE_LOW>; 161 + }; 162 + 163 + /* Ethernet1 depends on CM-A510 option E2 */ 164 + &pcie1 { status = "disabled"; }; 165 + 166 + /* SATA connector */ 167 + &sata0 { status = "okay"; }; 168 + 169 + /* 170 + * SDIO0 is connected to a MMC/SD/SDIO socket, I2C GPIO expander has 171 + * VCC_MMC_ENABLE on GPIO13, MMC_WP on GPIO10 172 + */ 173 + &sdio0 { 174 + vmmc-supply = <&mmc_power>; 175 + wp-gpios = <&gpio_ext 10 GPIO_ACTIVE_LOW>; 176 + status = "okay"; 177 + }; 178 + 179 + /* UART0 on RS232 mini-connector */ 180 + &uart0 { status = "okay"; }; 181 + /* UART2 on pin headers */ 182 + &uart2 { status = "okay"; };