Skip to contentSkip to conversation

Add support for sbc-t43

PATCH Superseded Nikita Kiryanov 4 participants 21 messages Nov 24, 2015 – Nov 30, 2015

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add support for sbc-t43

This series adds support for CompuLab sbc-t43 single baseboard computer. sbc-t43 is composed of cm-t43 (the TI am437x based core module), and sb-som baseboard. The sbc-t43 features include:

CPU: Texas Instruments Sitara AM4379 ARM Cortex-A9, 1GHz, or
Texas Instruments Sitara AM4376 ARM Cortex-A9, 800MHz
RAM: 128MB - 1GB, DDR3-800, 32-bit data bua
Storage: NAND flash, 128MB - 512MB, or eMMC flash, 4GB - 32GB
SPI-flash 2MB
Two 1000/100/10Mbps Ethernet ports WiFi/Bluetooth/NFC
Audio codec
SD-Card slot, up to 3 USB ports
DVI/LCD connectors

This series is based over v4.4-rc2-15-gcaa9c04 and depends on the following patch:
https://lkml.org/lkml/2015/11/12/955
[pinctrl: Move am4372 and dra7 macros to the the SoC header files]

Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Ian Campbell <[email protected]>

Nikita Kiryanov (14):
ARM: am437x: cm-t43: dts: add basic support for sbc-t43
ARM: am437x: cm-t43: dts: add support for module eeprom
ARM: am437x: cm-t43: dts: add PMIC support.
ARM: am437x: cm-t43: dts: add spi-flash support
ARM: am437x: cm-t43: dts: add NAND support
ARM: am437x: cm-t43: dts: add dual emac support
ARM: am437x: cm-t43: dts: add USB support
ARM: am437x: cm-t43: dts: add eMMC support
ARM: am437x: cm-t43: dts: add touchscreen support
ARM: am437x: cm-t43: dts: add pca9555 support
ARM: am437x: cm-t43: dts: add support for baseboard eeprom
ARM: sb-som: dts: introduce SB-SOM baseboard
ARM: am437x: cm-t43: dts: add support for mmc1
ARM: am437x: cm-t43: dts: add lcd support

 .../devicetree/bindings/arm/compulab-boards.txt    |   5 +
 .../devicetree/bindings/arm/omap/omap.txt          |   6 +
 .../bindings/display/panel/startek,startek-kd050c  |   4 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   6 +-
 arch/arm/boot/dts/am437x-cm-t43.dts                | 423 +++++++++++++++++++++
 arch/arm/boot/dts/am437x-sbc-t43.dts               | 181 +++++++++
 arch/arm/boot/dts/compulab-sb-som.dtsi             |  42 ++
 8 files changed, 666 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/compulab-boards.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/startek,startek-kd050c
 create mode 100644 arch/arm/boot/dts/am437x-cm-t43.dts
 create mode 100644 arch/arm/boot/dts/am437x-sbc-t43.dts
 create mode 100644 arch/arm/boot/dts/compulab-sb-som.dtsi
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/14 ARM: am437x: cm-t43: dts: add basic support for sbc-t43

Add basic support for SBC-T43: a CM-T43 based single board computer. CM-T43 is an AM437x based System-on-Module designed to serve as a building block in embedded applications. SBC-T43 is composed of CM-T43 module on top of the SB-SOM-T43 baseboard.
Basic support includes UART, GPIO, and I2C.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 .../devicetree/bindings/arm/omap/omap.txt          |  6 ++
 arch/arm/boot/dts/Makefile                         |  6 +-
 arch/arm/boot/dts/am437x-cm-t43.dts                | 90 ++++++++++++++++++++++
 arch/arm/boot/dts/am437x-sbc-t43.dts               | 57 ++++++++++++++
 4 files changed, 157 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/am437x-cm-t43.dts
 create mode 100644 arch/arm/boot/dts/am437x-sbc-t43.dts
Documentation/devicetree/bindings/arm/omap/omap.txt +6 -0
index 9f4e513..da84372 100644
@@ -141,6 +141,12 @@ Boards:
 - OMAP5 EVM : Evaluation Module
   compatible = "ti,omap5-evm", "ti,omap5"
 
+- AM437x CM-T43
+  compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
+
+- AM437x SBC-T43
+  compatible = "compulab,am437x-sbc-t43","compulab,am437x-cm-t43","ti,am4372","ti,am43"
+
 - AM43x EPOS EVM
   compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43"
 
arch/arm/boot/dts/Makefile +4 -2
index 30bbc37..dc3b9af 100644
@@ -478,9 +478,11 @@ dtb-$(CONFIG_ARCH_OMAP4) += \
 	omap4-var-stk-om44.dtb
 dtb-$(CONFIG_SOC_AM43XX) += \
 	am43x-epos-evm.dtb \
-	am437x-sk-evm.dtb \
+	am437x-cm-t43.dtb \
+	am437x-gp-evm.dtb \
 	am437x-idk-evm.dtb \
-	am437x-gp-evm.dtb
+	am437x-sbc-t43.dtb \
+	am437x-sk-evm.dtb
 dtb-$(CONFIG_SOC_OMAP5) += \
 	omap5-cm-t54.dtb \
 	omap5-igep0050.dtb \
arch/arm/boot/dts/am437x-cm-t43.dts new file +90 -0

90 lines not on this page · raw message

arch/arm/boot/dts/am437x-sbc-t43.dts new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#2 lore raw

PATCH 1/14 ARM: am437x: cm-t43: dts: add basic support for sbc-t43

Quoted 11 lines · Nikita Kiryanov

Add basic support for SBC-T43: a CM-T43 based single board computer. CM-T43 is an AM437x based System-on-Module designed to serve as a building block in embedded applications. SBC-T43 is composed of CM-T43 module on top of the SB-SOM-T43 baseboard.
Basic support includes UART, GPIO, and I2C.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>

Some minor nits below, otherwise:

Quoted 14 lines
---
 .../devicetree/bindings/arm/omap/omap.txt          |  6 ++
 arch/arm/boot/dts/Makefile                         |  6 +-
 arch/arm/boot/dts/am437x-cm-t43.dts                | 90 ++++++++++++++++++++++
 arch/arm/boot/dts/am437x-sbc-t43.dts               | 57 ++++++++++++++
 4 files changed, 157 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/am437x-cm-t43.dts
 create mode 100644 arch/arm/boot/dts/am437x-sbc-t43.dts
Documentation/devicetree/bindings/arm/omap/omap.txt +0 -0
index 9f4e513..da84372 100644

Documentation/devicetree/bindings/arm/omap/omap.txt Boards: · line 148

Quoted 8 lines
Documentation/devicetree/bindings/arm/omap/omap.txt +5 -0
@@ -141,6 +141,12 @@ Boards:
 - OMAP5 EVM : Evaluation Module
   compatible = "ti,omap5-evm", "ti,omap5"
 
+- AM437x CM-T43
+  compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
+
+- AM437x SBC-T43
+  compatible = "compulab,am437x-sbc-t43","compulab,am437x-cm-t43","ti,am4372","ti,am43"
                                            ^

spaces

Quoted 36 lines
Documentation/devicetree/bindings/arm/omap/omap.txt +1 -0
+
 - AM43x EPOS EVM
   compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43"
 
arch/arm/boot/dts/Makefile +4 -2
index 30bbc37..dc3b9af 100644
@@ -478,9 +478,11 @@ dtb-$(CONFIG_ARCH_OMAP4) += \
 	omap4-var-stk-om44.dtb
 dtb-$(CONFIG_SOC_AM43XX) += \
 	am43x-epos-evm.dtb \
-	am437x-sk-evm.dtb \
+	am437x-cm-t43.dtb \
+	am437x-gp-evm.dtb \
 	am437x-idk-evm.dtb \
-	am437x-gp-evm.dtb
+	am437x-sbc-t43.dtb \
+	am437x-sk-evm.dtb
 dtb-$(CONFIG_SOC_OMAP5) += \
 	omap5-cm-t54.dtb \
 	omap5-igep0050.dtb \
arch/arm/boot/dts/am437x-cm-t43.dts new file +8 -0
new file mode 100644
index 0000000..69887c4
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+

arch/arm/boot/dts/am437x-cm-t43.dts line 18

Quoted 10 lines
arch/arm/boot/dts/am437x-cm-t43.dts new file +10 -0
+/dts-v1/;
+
+#include <dt-bindings/pinctrl/am43xx.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "am4372.dtsi"
+
+/ {
+	model = "CompuLab CM-T43";
+	compatible = "compulab,am437x-cm-t43","ti,am4372","ti,am43";
                                              ^

space

[...]

Quoted 9 lines
arch/arm/boot/dts/am437x-sbc-t43.dts new file +3 -0
new file mode 100644
index 0000000..f3cd76b
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *

arch/arm/boot/dts/am437x-sbc-t43.dts line 13

Quoted 10 lines
arch/arm/boot/dts/am437x-sbc-t43.dts new file +10 -0
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "am437x-cm-t43.dts"
+
+/ {
+	model = "CompuLab CM-T43 on SB-SOM-T43";
+	compatible = "compulab,am437x-sbc-t43","compulab,am437x-cm-t43","ti,am4372","ti,am43";

spaces

#3 lore raw

PATCH 1/14 ARM: am437x: cm-t43: dts: add basic support for sbc-t43

Quoted 13 lines · Rob Herring
Quoted 11 lines · Nikita Kiryanov

Add basic support for SBC-T43: a CM-T43 based single board computer. CM-T43 is an AM437x based System-on-Module designed to serve as a building block in embedded applications. SBC-T43 is composed of CM-T43 module on top of the SB-SOM-T43 baseboard.
Basic support includes UART, GPIO, and I2C.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
Quoted 4 lines

Some minor nits below, otherwise:

V2 coming up.

#4 lore raw

PATCH 1/14 ARM: am437x: cm-t43: dts: add basic support for sbc-t43

In reply to Nikita Kiryanov

arch/arm/boot/dts/am437x-sbc-t43.dts line 57

Quoted 5 lines · Nikita Kiryanov

+&uart0 {

arch/arm/boot/dts/am437x-sbc-t43.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_default>;
+};
+

Please get rid of the extra line at the end of the file.. It will cause whitespace warnings when applying and will also cause issues applying other changes at the end of the file if they rely on the extra line. And check the whole series, thanks :) It will make my life a bit easier.

And the Subject line should start with "ARM: dts: ..." for the unified look.

Regards,

Tony

#5 lore raw

PATCH 2/14 ARM: am437x: cm-t43: dts: add support for module eeprom

In reply to Nikita Kiryanov

CM-T43 has an on-board EEPROM on i2c bus 0. Add it to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +6 -0
index 69887c4..a4cd2b8 100644
@@ -51,6 +51,12 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins>;
 	clock-frequency = <100000>;
+
+	eeprom_module: at24 at 50 {
+		compatible = "atmel,24c02";
+		reg = <0x50>;
+		pagesize = <16>;
+	};
 };
 
 &gpio0 {
Signature · 1 line
1.9.1
#6 lore raw

PATCH 3/14 ARM: am437x: cm-t43: dts: add PMIC support.

In reply to Nikita Kiryanov

Add PMIC support for CompuLab cm-t43 module. For now we keep all regulators enabled until this could be refined with power management support.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 64 +++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +64 -0
index a4cd2b8..7ef3971 100644
@@ -52,6 +52,69 @@
 	pinctrl-0 = <&i2c0_pins>;
 	clock-frequency = <100000>;
 
+	tps65218: tps65218 at 24 {
+		compatible = "ti,tps65218";
+		reg = <0x24>;
+		interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
+		interrupt-parent = <&gic>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+
+		dcdc1: regulator-dcdc1 {
+			compatible = "ti,tps65218-dcdc1";
+			regulator-name = "vdd_core";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <1144000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		dcdc2: regulator-dcdc2 {
+			compatible = "ti,tps65218-dcdc2";
+			regulator-name = "vdd_mpu";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <1378000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		dcdc3: regulator-dcdc3 {
+			compatible = "ti,tps65218-dcdc3";
+			regulator-name = "vdcdc3";
+			regulator-suspend-enable;
+			regulator-min-microvolt = <1500000>;
+			regulator-max-microvolt = <1500000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		dcdc5: regulator-dcdc5 {
+			compatible = "ti,tps65218-dcdc5";
+			regulator-name = "v1_0bat";
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		dcdc6: regulator-dcdc6 {
+			compatible = "ti,tps65218-dcdc6";
+			regulator-name = "v1_8bat";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		ldo1: regulator-ldo1 {
+			compatible = "ti,tps65218-ldo1";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+	};
+
 	eeprom_module: at24 at 50 {
 		compatible = "atmel,24c02";
 		reg = <0x50>;
@@ -88,6 +151,7 @@
 };
 
 &cpu {
+	cpu0-supply = <&dcdc2>;
 	operating-points = <1000000 1330000>,
 			   <800000 1260000>,
 			   <720000 1200000>,
Signature · 1 line
1.9.1
#7 lore raw

PATCH 4/14 ARM: am437x: cm-t43: dts: add spi-flash support

In reply to Nikita Kiryanov

CM-T43 has an on-board 2MB SPI-flash which stores U-Boot and the U-Boot environment. Add it to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +41 -0
index 7ef3971..0761383 100644
@@ -44,6 +44,16 @@
 			AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
 		>;
 	};
+
+	spi0_pins: pinmux_spi0_pins {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE0) /* spi0_sclk.spi0_sclk */
+			AM4372_IOPAD(0x954, PIN_INPUT | MUX_MODE0) /* spi0_d0.spi0_d0 */
+			AM4372_IOPAD(0x958, PIN_OUTPUT | MUX_MODE0) /* spi0_d1.spi0_d1 */
+			AM4372_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
+		>;
+	};
+
 };
 
 &i2c0 {
@@ -146,6 +156,37 @@
 	status = "okay";
 };
 
+&spi0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins>;
+	dmas = <&edma 16
+		&edma 17>;
+	dma-names = "tx0", "rx0";
+
+	flash: w25q64cvzpig at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <20000000>;
+		partition at 0 {
+			label = "uboot";
+			reg = <0x0 0xc0000>;
+		};
+
+		partition at c0000 {
+			label = "uboot environment";
+			reg = <0xc0000 0x40000>;
+		};
+
+		partition at 100000 {
+			label = "reserved";
+			reg = <0x100000 0x100000>;
+		};
+	};
+};
+
 &uart0 {
 	status = "okay";
 };
Signature · 1 line
1.9.1
#8 lore raw

PATCH 5/14 ARM: am437x: cm-t43: dts: add NAND support

In reply to Nikita Kiryanov

One of the CompuLab cm-t43 configurations comes with on-board NAND flash as primary storage. It is partitioned into kernel, dtb, and rootfs partitions. Add it to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 78 +++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +78 -0
index 0761383..370e4e8 100644
@@ -54,6 +54,80 @@
 		>;
 	};
 
+	nand_flash_x8: nand_flash_x8 {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0x800, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x804, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x808, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x80c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x810, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x814, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x818, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x81c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+			AM4372_IOPAD(0x870, PIN_INPUT_PULLUP  | MUX_MODE0)
+			AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x898, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+			AM4372_IOPAD(0x894, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+			AM4372_IOPAD(0x890, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+			AM4372_IOPAD(0x89c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+		>;
+	};
+};
+
+&gpmc {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_flash_x8>;
+	ranges = <0 0 0x08000000 0x1000000>;
+	nand at 0,0 {
+		reg = <0 0 0>;
+		ti,nand-ecc-opt = "bch8";
+		ti,elm-id = <&elm>;
+
+		nand-bus-width = <8>;
+		gpmc,device-width = <1>;
+		gpmc,sync-clk-ps = <0>;
+		gpmc,cs-on-ns = <0>;
+		gpmc,cs-rd-off-ns = <44>;
+		gpmc,cs-wr-off-ns = <44>;
+		gpmc,adv-on-ns = <6>;
+		gpmc,adv-rd-off-ns = <34>;
+		gpmc,adv-wr-off-ns = <44>;
+		gpmc,we-on-ns = <0>;
+		gpmc,we-off-ns = <40>;
+		gpmc,oe-on-ns = <0>;
+		gpmc,oe-off-ns = <54>;
+		gpmc,access-ns = <64>;
+		gpmc,rd-cycle-ns = <82>;
+		gpmc,wr-cycle-ns = <82>;
+		gpmc,wait-on-read = "true";
+		gpmc,wait-on-write = "true";
+		gpmc,bus-turnaround-ns = <0>;
+		gpmc,cycle2cycle-delay-ns = <0>;
+		gpmc,clk-activation-ns = <0>;
+		gpmc,wait-monitoring-ns = <0>;
+		gpmc,wr-access-ns = <40>;
+		gpmc,wr-data-mux-bus-ns = <0>;
+
+		gpmc,wait-pin = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+		/* MTD partition table */
+		partition at 0 {
+			label = "kernel";
+			reg = <0x0 0x00980000>;
+		};
+		partition at 980000 {
+			label = "dtb";
+			reg = <0x00980000 0x00080000>;
+		};
+		partition at a00000 {
+			label = "rootfs";
+			reg = <0x00a00000 0x0>;
+		};
+	};
 };
 
 &i2c0 {
@@ -187,6 +261,10 @@
 	};
 };
 
+&elm {
+	status = "okay";
+};
+
 &uart0 {
 	status = "okay";
 };
Signature · 1 line
1.9.1
#9 lore raw

PATCH 6/14 ARM: am437x: cm-t43: dts: add dual emac support

In reply to Nikita Kiryanov

CM-T43 comes with 2 ethernet ports connected to the cpsw subsystem, which has 2 modes of operation: switch mode and dual emac mode.
Add the relevant muxing and set it up to work in dual emac mode by default.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 66 +++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +66 -0
index 370e4e8..856b2ce 100644
@@ -73,6 +73,47 @@
 			AM4372_IOPAD(0x89c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
 		>;
 	};
+
+	cpsw_default: cpsw_default {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txen.rgmii1_txen */
+			AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxdv.rgmii1_rxctl */
+			AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_txd3 */
+			AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_txd2 */
+			AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_txd1 */
+			AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_txd0 */
+			AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txclk.rmii1_tclk */
+			AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxclk.rmii1_rclk */
+			AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rxd3 */
+			AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rxd2 */
+			AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rxd1 */
+			AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rxd0 */
+			AM4372_IOPAD(0xa74, MUX_MODE3)
+			/* Slave 2 */
+			AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a0.txen */
+			AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN  | MUX_MODE2)	/* gpmc_a1.rxctl */
+			AM4372_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a2.txd3 */
+			AM4372_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a3.txd2 */
+			AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a4.txd1 */
+			AM4372_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a5.txd0 */
+			AM4372_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a6.tclk */
+			AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN  | MUX_MODE2)	/* gpmc_a7.rclk */
+			AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN  | MUX_MODE2)	/* gpmc_a8.rxd3 */
+			AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN  | MUX_MODE2)	/* gpmc_a9.rxd2 */
+			AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN  | MUX_MODE2)	/* gpmc_a10.rxd1 */
+			AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN  | MUX_MODE2)	/* gpmc_a11.rxd0 */
+			AM4372_IOPAD(0xa38, MUX_MODE7)
+		>;
+	};
+
+	davinci_mdio_default: davinci_mdio_default {
+		pinctrl-single,pins = <
+			/* MDIO */
+			AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
+			AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
+		>;
+	};
 };
 
 &gpmc {
@@ -261,6 +302,31 @@
 	};
 };
 
+&mac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpsw_default>;
+	dual_emac = <1>;
+	status = "okay";
+};
+
+&davinci_mdio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&davinci_mdio_default>;
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <0>;
+	phy-mode = "rgmii-txid";
+	dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <1>;
+	phy-mode = "rgmii-txid";
+	dual_emac_res_vlan = <2>;
+};
+
 &elm {
 	status = "okay";
 };
Signature · 1 line
1.9.1
#10 lore raw

PATCH 6/14 ARM: am437x: cm-t43: dts: add dual emac support

Quoted 10 lines · Nikita Kiryanov

CM-T43 comes with 2 ethernet ports connected to the cpsw subsystem, which has 2 modes of operation: switch mode and dual emac mode.
Add the relevant muxing and set it up to work in dual emac mode by default.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>

Regards
Mugunthan V N

#11 lore raw

PATCH 7/14 ARM: am437x: cm-t43: dts: add USB support

In reply to Nikita Kiryanov

Add USB support for CompuLab sbc-t43 single board computer, defaulting to host mode.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts  | 30 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/am437x-sbc-t43.dts | 22 ++++++++++++++++++++++
 2 files changed, 52 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +30 -0
index 856b2ce..70d5c20 100644
@@ -327,6 +327,36 @@
 	dual_emac_res_vlan = <2>;
 };
 
+&dwc3_1 {
+	status = "okay";
+};
+
+&usb2_phy1 {
+	status = "okay";
+};
+
+&usb1 {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&dwc3_2 {
+	status = "okay";
+};
+
+&usb2_phy2 {
+	status = "okay";
+};
+
+&usb2 {
+	dr_mode = "host";
+	status = "okay";
+	interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+	interrupt-names = "peripheral", "host", "otg";
+};
+
 &elm {
 	status = "okay";
 };
arch/arm/boot/dts/am437x-sbc-t43.dts +22 -0
index f3cd76b..5d2919e 100644
@@ -36,6 +36,18 @@
 			AM4372_IOPAD(0x97c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE3)  /* uart1_rtsn.i2c2_scl */
 		>;
 	};
+
+	usb2_phy1_default: usb2_phy1_default {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0xac0, DS0_PULL_UP_DOWN_EN | PIN_INPUT_PULLDOWN | MUX_MODE0)
+		>;
+	};
+
+	usb2_phy2_default: usb2_phy2_default {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0xac4, DS0_PULL_UP_DOWN_EN | PIN_INPUT_PULLDOWN | MUX_MODE0)
+		>;
+	};
 };
 
 &i2c1 {
@@ -55,3 +67,13 @@
 	pinctrl-0 = <&uart0_pins_default>;
 };
 
+&dwc3_1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb2_phy1_default>;
+};
+
+&dwc3_2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb2_phy2_default>;
+};
+
Signature · 1 line
1.9.1
#12 lore raw

PATCH 8/14 ARM: am437x: cm-t43: dts: add eMMC support

In reply to Nikita Kiryanov

One of the CompuLab cm-t43 configurations comes with on-board eMMC as primary storage, residing on the mmc2 interface. Add it to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +34 -0
index 70d5c20..5ca4160 100644
@@ -26,6 +26,16 @@
 			linux,default-trigger = "heartbeat";
 		};
 	};
+
+	vmmc_3v3: fixedregulator-v3_3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vmmc_3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		enable-active-high;
+	};
+
 };
 
 &am43xx_pinmux {
@@ -45,6 +55,21 @@
 		>;
 	};
 
+	emmc_pins: emmc_pins {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
+			AM4372_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
+			AM4372_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
+			AM4372_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
+			AM4372_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */
+			AM4372_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */
+			AM4372_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */
+			AM4372_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */
+			AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+			AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+		>;
+	};
+
 	spi0_pins: pinmux_spi0_pins {
 		pinctrl-single,pins = <
 			AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE0) /* spi0_sclk.spi0_sclk */
@@ -271,6 +296,15 @@
 	status = "okay";
 };
 
+&mmc2 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_pins>;
+	vmmc-supply = <&vmmc_3v3>;
+	bus-width = <8>;
+	ti,non-removable;
+};
+
 &spi0 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
1.9.1
#13 lore raw

PATCH 9/14 ARM: am437x: cm-t43: dts: add touchscreen support

In reply to Nikita Kiryanov

AM437x has an internal touchscreen controller. Add support for it on cm-t43.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/am437x-cm-t43.dts +14 -0
index 5ca4160..1842087 100644
@@ -399,6 +399,20 @@
 	status = "okay";
 };
 
+&tscadc {
+	status = "okay";
+	tsc {
+		ti,wires = <4>;
+		ti,x-plate-resistance = <200>;
+		ti,coordiante-readouts = <5>;
+		ti,wire-config = <0x00 0x11 0x22 0x33>;
+	};
+
+	adc {
+		ti,adc-channels = <4 5 6 7>;
+	};
+};
+
 &cpu {
 	cpu0-supply = <&dcdc2>;
 	operating-points = <1000000 1330000>,
Signature · 1 line
1.9.1
#14 lore raw

PATCH 10/14 ARM: am437x: cm-t43: dts: add pca9555 support

In reply to Nikita Kiryanov

SB-SOM comes with a PCA9555 GPIO extender. On SBC-T43 this resides on the i2c1 bus. Add it to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-sbc-t43.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/am437x-sbc-t43.dts +7 -0
index 5d2919e..b2e3201 100644
@@ -54,6 +54,13 @@
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins>;
+
+	pca9555: pca9555 at 20 {
+		compatible = "nxp,pca9555";
+		reg = <0x20>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
 };
 
 &i2c2 {
Signature · 1 line
1.9.1
#15 lore raw

PATCH 11/14 ARM: am437x: cm-t43: dts: add support for baseboard eeprom

In reply to Nikita Kiryanov

SB-SOM baseboard comes with an on-board EEPROM. On SBC-T43 this EEPROM resides on the i2c1 bus. Add it to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-sbc-t43.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/am437x-sbc-t43.dts +6 -0
index b2e3201..7394aa1 100644
@@ -61,6 +61,12 @@
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
+
+	eeprom_base: at24 at 50 {
+		compatible = "atmel,24c02";
+		reg = <0x50>;
+		pagesize = <16>;
+	};
 };
 
 &i2c2 {
Signature · 1 line
1.9.1
#16 lore raw

PATCH 12/14 ARM: sb-som: dts: introduce SB-SOM baseboard

In reply to Nikita Kiryanov

CompuLab SB-SOM baseboard is a carrier board for multiple arm-based SoMs. It currently supports (with minor adjustments to assembly) CM-T43, CM-T54, and CM-QS600 modules. It is a building block in the SBC-T43 single board computer, which consists of cm-t43 on top of sb-som-t43.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 .../devicetree/bindings/arm/compulab-boards.txt    |  5 +++
 .../bindings/display/panel/startek,startek-kd050c  |  4 +++
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/compulab-sb-som.dtsi             | 42 ++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/compulab-boards.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/startek,startek-kd050c
 create mode 100644 arch/arm/boot/dts/compulab-sb-som.dtsi
Documentation/devicetree/bindings/arm/compulab-boards.txt new file +5 -0
new file mode 100644
index 0000000..3e742a5
@@ -0,0 +1,5 @@
+CompuLab SB-SOM is a multi-module baseboard capable of carrying CM-T43, CM-T54,
+and QS-600 modules with minor modifications to the SB-SOM assembly.
+
+Required root node properties:
+    - compatible = should be "compulab,sb-som"
Documentation/devicetree/bindings/display/panel/startek,startek-kd050c new file +4 -0
new file mode 100644
index 0000000..70cd8d1
@@ -0,0 +1,4 @@
+Startek Electronic Technology Co. KD050C 5.0" WVGA TFT LCD panel
+
+Required properties:
+- compatible: should be "startek,startek-kd050c"
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 55df1d4..409b134 100644
@@ -218,6 +218,7 @@ sony	Sony Corporation
 spansion	Spansion Inc.
 sprd	Spreadtrum Communications Inc.
 st	STMicroelectronics
+startek	Startek
 ste	ST-Ericsson
 stericsson	ST-Ericsson
 synology	Synology, Inc.
arch/arm/boot/dts/compulab-sb-som.dtsi new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#17 lore raw

PATCH 12/14 ARM: sb-som: dts: introduce SB-SOM baseboard

Quoted 5 lines · Nikita Kiryanov

CompuLab SB-SOM baseboard is a carrier board for multiple arm-based SoMs. It currently supports (with minor adjustments to assembly) CM-T43, CM-T54, and CM-QS600 modules. It is a building block in the SBC-T43 single board computer, which consists of cm-t43 on top of sb-som-t43.

Quoted 8 lines
Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 .../devicetree/bindings/arm/compulab-boards.txt    |  5 +++
 .../bindings/display/panel/startek,startek-kd050c  |  4 +++

.txt please.

Quoted 13 lines
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/compulab-sb-som.dtsi             | 42 ++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/compulab-boards.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/startek,startek-kd050c
 create mode 100644 arch/arm/boot/dts/compulab-sb-som.dtsi
Documentation/devicetree/bindings/arm/compulab-boards.txt new file +0 -0
new file mode 100644
index 0000000..3e742a5

Documentation/devicetree/bindings/arm/compulab-boards.txt line 2

Quoted 2 lines
Documentation/devicetree/bindings/arm/compulab-boards.txt new file +2 -0
@@ -0,0 +1,5 @@
+CompuLab SB-SOM is a multi-module baseboard capable of carrying CM-T43, CM-T54,
+and QS-600 modules with minor modifications to the SB-SOM assembly.

All these modules have compatible strings?

Quoted 32 lines
Documentation/devicetree/bindings/arm/compulab-boards.txt new file +3 -0
+
+Required root node properties:
+    - compatible = should be "compulab,sb-som"
Documentation/devicetree/bindings/display/panel/startek,startek-kd050c new file +4 -0
new file mode 100644
index 0000000..70cd8d1
@@ -0,0 +1,4 @@
+Startek Electronic Technology Co. KD050C 5.0" WVGA TFT LCD panel
+
+Required properties:
+- compatible: should be "startek,startek-kd050c"
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 55df1d4..409b134 100644
@@ -218,6 +218,7 @@ sony	Sony Corporation
 spansion	Spansion Inc.
 sprd	Spreadtrum Communications Inc.
 st	STMicroelectronics
+startek	Startek
 ste	ST-Ericsson
 stericsson	ST-Ericsson
 synology	Synology, Inc.
arch/arm/boot/dts/compulab-sb-som.dtsi new file +1 -0
new file mode 100644
index 0000000..402a143
@@ -0,0 +1,42 @@
+/*

arch/arm/boot/dts/compulab-sb-som.dtsi line 11

Quoted 10 lines
arch/arm/boot/dts/compulab-sb-som.dtsi new file +10 -0
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/ {
+	model = "CompuLab SB-SOM";
+	compatible = "compulab,sb-som";

I would expect this to have a more specific.

arch/arm/boot/dts/compulab-sb-som.dtsi line 24

Quoted 3 lines
arch/arm/boot/dts/compulab-sb-som.dtsi new file +3 -0
+	lcd0: display {
+		compatible = "startek,startek-kd050c", "panel-dpi";
+		label = "lcd";

This isn't documented, nor do I think it is needed.

Rob

#18 lore raw

PATCH 12/14 ARM: sb-som: dts: introduce SB-SOM baseboard

Quoted 15 lines · Rob Herring
Quoted 5 lines · Nikita Kiryanov

CompuLab SB-SOM baseboard is a carrier board for multiple arm-based SoMs. It currently supports (with minor adjustments to assembly) CM-T43, CM-T54, and CM-QS600 modules. It is a building block in the SBC-T43 single board computer, which consists of cm-t43 on top of sb-som-t43.

Quoted 8 lines
Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 .../devicetree/bindings/arm/compulab-boards.txt    |  5 +++
 .../bindings/display/panel/startek,startek-kd050c  |  4 +++
Quoted 1 line

.txt please.

Right, will V2..

Quoted 8 lines
Quoted 8 lines
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/compulab-sb-som.dtsi             | 42 ++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/compulab-boards.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/startek,startek-kd050c
 create mode 100644 arch/arm/boot/dts/compulab-sb-som.dtsi
Quoted 10 lines

Documentation/devicetree/bindings/arm/compulab-boards.txt line 2

Quoted 8 lines
Documentation/devicetree/bindings/arm/compulab-boards.txt new file +2 -0
new file mode 100644
index 0000000..3e742a5
@@ -0,0 +1,5 @@
+CompuLab SB-SOM is a multi-module baseboard capable of carrying CM-T43, CM-T54,
+and QS-600 modules with minor modifications to the SB-SOM assembly.

All these modules have compatible strings?

Yes, although they are currently undocumented. QS-600 should be CM-QS600 though.. Will fix in V2.

Quoted 37 lines
Quoted 37 lines
Documentation/devicetree/bindings/arm/compulab-boards.txt new file +3 -0
+
+Required root node properties:
+    - compatible = should be "compulab,sb-som"
Documentation/devicetree/bindings/display/panel/startek,startek-kd050c new file +4 -0
new file mode 100644
index 0000000..70cd8d1
@@ -0,0 +1,4 @@
+Startek Electronic Technology Co. KD050C 5.0" WVGA TFT LCD panel
+
+Required properties:
+- compatible: should be "startek,startek-kd050c"
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 55df1d4..409b134 100644
@@ -218,6 +218,7 @@ sony	Sony Corporation
 spansion	Spansion Inc.
 sprd	Spreadtrum Communications Inc.
 st	STMicroelectronics
+startek	Startek
 ste	ST-Ericsson
 stericsson	ST-Ericsson
 synology	Synology, Inc.
arch/arm/boot/dts/compulab-sb-som.dtsi new file +5 -0
new file mode 100644
index 0000000..402a143
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
Quoted 8 lines

arch/arm/boot/dts/compulab-sb-som.dtsi line 11

Quoted 6 lines
arch/arm/boot/dts/compulab-sb-som.dtsi new file +6 -0
+ * published by the Free Software Foundation.
+ */
+
+/ {
+	model = "CompuLab SB-SOM";
+	compatible = "compulab,sb-som";

I would expect this to have a more specific.

SB-SOM supports multiple modules. This device tree aggregates what is common to all possible module-baseboard combinations, which is why the compatible string is generic.

Quoted 6 lines

arch/arm/boot/dts/compulab-sb-som.dtsi line 24

Quoted 4 lines
arch/arm/boot/dts/compulab-sb-som.dtsi new file +3 -0
+	lcd0: display {
+		compatible = "startek,startek-kd050c", "panel-dpi";
+		label = "lcd";

This isn't documented, nor do I think it is needed.

It is documented in Documentation/devicetree/bindings/display/panel/panel-dpi.txt You're correct about it being optional though.

Quoted 3 lines

Rob

#19 lore raw

PATCH 13/14 ARM: am437x: cm-t43: dts: add support for mmc1

In reply to Nikita Kiryanov

On SBC-T43 the mmc1 interface is connected to an SD-Card slot. Add the necessary muxing and configuration to the device tree.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-sbc-t43.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm/boot/dts/am437x-sbc-t43.dts +24 -0
index 7394aa1..b2c42d9 100644
@@ -7,6 +7,7 @@
  */
 
 #include "am437x-cm-t43.dts"
+#include "compulab-sb-som.dtsi"
 
 / {
 	model = "CompuLab CM-T43 on SB-SOM-T43";
@@ -14,6 +15,19 @@
 };
 
 &am43xx_pinmux {
+	mmc1_pins: pinmux_mmc1_pins {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
+			AM4372_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
+			AM4372_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
+			AM4372_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
+			AM4372_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
+			AM4372_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
+			AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+			AM4372_IOPAD(0x964, PIN_INPUT | MUX_MODE7) /* ecap0_in_pwm0_out.gpio0_7 */
+		>;
+	};
+
 	uart0_pins_default: uart0_pins_default {
 		pinctrl-single,pins = <
 			AM4372_IOPAD(0x968, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0)
@@ -75,6 +89,16 @@
 	pinctrl-0 = <&i2c2_pins>;
 };
 
+&mmc1 {
+	status = "okay";
+	bus-width = <4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	vmmc-supply = <&vsb_3v3>;
+	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+	wp-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_default>;
Signature · 1 line
1.9.1
#20 lore raw

PATCH 14/14 ARM: am437x: cm-t43: dts: add lcd support

In reply to Nikita Kiryanov

Add the necessary dss configuration to drive the startek lcd on CompuLab sbc-t43 single board computer.

Cc Tony Lindgren <[email protected]>
Cc Igor Grinberg <[email protected]>
Cc Dmitry Lifshitz <[email protected]>
Cc Ian Campbell <[email protected]>
---
 arch/arm/boot/dts/am437x-sbc-t43.dts | 65 ++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
arch/arm/boot/dts/am437x-sbc-t43.dts +65 -0
index b2c42d9..0758094 100644
@@ -12,6 +12,10 @@
 / {
 	model = "CompuLab CM-T43 on SB-SOM-T43";
 	compatible = "compulab,am437x-sbc-t43","compulab,am437x-cm-t43","ti,am4372","ti,am43";
+
+	aliases {
+		display0 = &lcd0;
+	};
 };
 
 &am43xx_pinmux {
@@ -28,6 +32,41 @@
 		>;
 	};
 
+	dss_pinctrl_default: dss_pinctrl_default {
+		pinctrl-single,pins = <
+			AM4372_IOPAD(0x9b0, PIN_OUTPUT_PULLUP | MUX_MODE2) /* cam0 hd -> DSS DATA 23 */
+			AM4372_IOPAD(0x9b4, PIN_OUTPUT_PULLUP | MUX_MODE2)
+			AM4372_IOPAD(0x9b8, PIN_OUTPUT_PULLUP | MUX_MODE2)
+			AM4372_IOPAD(0x9bc, PIN_OUTPUT_PULLUP | MUX_MODE2)
+			AM4372_IOPAD(0x9c0, PIN_OUTPUT_PULLUP | MUX_MODE2)
+			AM4372_IOPAD(0x9c4, PIN_OUTPUT_PULLUP | MUX_MODE2)
+			AM4372_IOPAD(0x9c8, PIN_OUTPUT_PULLUP | MUX_MODE2)
+			AM4372_IOPAD(0x9cc, PIN_OUTPUT_PULLUP | MUX_MODE2) /* cam1 data 9 -> DSS DATA 16 */
+
+			AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
+			AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8b8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
+			AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
+			AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
+			AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
+			AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
+			AM4372_IOPAD(0xa20, PIN_OUTPUT_PULLUP | MUX_MODE7)
+		>;
+	};
+
 	uart0_pins_default: uart0_pins_default {
 		pinctrl-single,pins = <
 			AM4372_IOPAD(0x968, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0)
@@ -99,6 +138,20 @@
 	wp-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
 };
 
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_pinctrl_default>;
+
+	port {
+		dpi_lcd_out: endpoint at 0 {
+			remote-endpoint = <&lcd_in>;
+			data-lines = <24>;
+		};
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_default>;
@@ -114,3 +167,15 @@
 	pinctrl-0 = <&usb2_phy2_default>;
 };
 
+&lcd0 {
+	enable-gpios = <&pca9555 14 GPIO_ACTIVE_HIGH
+			&gpio4 28 GPIO_ACTIVE_HIGH>;
+
+	port {
+		lcd_in: endpoint {
+			remote-endpoint = <&dpi_lcd_out>;
+			data-lines = <24>;
+		};
+	};
+};
+
Signature · 1 line
1.9.1