Skip to contentSkip to conversation

ARM: dts: am335x: add support for Moxa UC-2100 series

PATCH Superseded SZ Lin (林上智) 3 participants 10 messages Aug 30, 2018 – Sep 18, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: dts: am335x: add support for Moxa UC-2100 series

The UC-2100 series open computing platform is designed for industrial embedded data acquisition and processing applications. In order to fulfill various industrial applications, there're many boards with different peripheral devices and wireless modules in this series.

The features of UC-2100 series are:
* eMMC
* SPI flash
* {1,2}x LAN (100/1000 Mbps in option)
* {1,2}x RS-232/422/485 ports, software-selectable
* EEPROM
* TPM 2.0
* Watchdog
* RTC
* User gpio-keys
* User LEDs
* User button
* GPS (option)
* 2x CANBus (option)
* Cellular module (option)
* Mini PCIe form factor with USB signal (option)
* MicroSD slot (option)

SZ Lin (林上智) (3):
ARM: dts: am335x: add common file for UC-2100 series
ARM: dts: am335x: add support for Moxa UC-2101 open platform
ARM: dts: am335x: add support for Moxa UC-2102 open platform

 .../devicetree/bindings/arm/omap/omap.txt     |   3 +
 arch/arm/boot/dts/Makefile                    |   2 +
 .../boot/dts/am335x-moxa-uc-2100-common.dtsi  | 249 ++++++++++++++++++
 arch/arm/boot/dts/am335x-moxa-uc-2101.dts     |  63 +++++
 arch/arm/boot/dts/am335x-moxa-uc-2102.dts     | 200 ++++++++++++++
 5 files changed, 517 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2102.dts
Signature · 1 line
2.19.0.rc1
#1 lore raw

PATCH 1/3 ARM: dts: am335x: add common file for UC-2100 series

The UC-2100 series consists many boards with different peripheral devices and wireless modules, hence we fetch common items and create a common dtsi file to increase reusability. All boards in UC-2100 series will include this common dtsi file.

---
 .../boot/dts/am335x-moxa-uc-2100-common.dtsi  | 249 ++++++++++++++++++
 1 file changed, 249 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi
arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi new file +249 -0
new file mode 100644
index 000000000000..14f781953475
@@ -0,0 +1,249 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/
+ *
+ * Authors: SZ Lin (林上智) <[email protected]>
+ *          Wes Huang (黃淵河) <[email protected]>
+ *          Fero JD Zhou (周俊達) <[email protected]>
+ */
+
+#include "am33xx.dtsi"
+
+/ {
+	vbat: vbat-regulator {
+		compatible = "regulator-fixed";
+	};
+
+	/* Power supply provides a fixed 3.3V @3A */
+	vmmcsd_fixed: vmmcsd-regulator {
+	      compatible = "regulator-fixed";
+	      regulator-name = "vmmcsd_fixed";
+	      regulator-min-microvolt = <3300000>;
+	      regulator-max-microvolt = <3300000>;
+	      regulator-boot-on;
+	};
+
+	buttons: push_button {
+		compatible = "gpio-keys";
+	};
+};
+
+&am33xx_pinmux {
+	pinctrl-names = "default";
+
+	i2c0_pins: pinmux_i2c0_pins {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
+			AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
+		>;
+	};
+
+	push_button_pins: pinmux_push_button {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* lcd_hsync.gpio2_23 */
+		>;
+	};
+
+	uart0_pins: pinmux_uart0_pins {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
+			AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
+		>;
+	};
+
+	davinci_mdio_default: davinci_mdio_default {
+		pinctrl-single,pins = <
+			/* MDIO */
+			AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
+			AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
+		>;
+	};
+
+	mmc1_pins_default: pinmux_mmc1_pins {
+		pinctrl-single,pins = <
+			/* eMMC */
+			AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad12.mmc1_dat0 */
+			AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad13.mmc1_dat1 */
+			AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad14.mmc1_dat2 */
+			AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad15.mmc1_dat3 */
+			AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad8.mmc1_dat4 */
+			AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad9.mmc1_dat5 */
+			AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad10.mmc1_dat6 */
+			AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad11.mmc1_dat7 */
+			AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2)	/* gpmc_csn2.mmc1_cmd */
+			AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2)	/* gpmc_csn1.mmc1_clk */
+		>;
+	};
+
+	spi0_pins: pinmux_spi0 {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0)	 /* spi0_sclk.spi0_sclk */
+			AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0)	 /* spi0_cs0.spi0_cs0 */
+			AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0)	 /* spi0_d0.spi0_d0 */
+			AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0)	 /* spi0_d1.spi0_d1 */
+		>;
+	};
+};
+
+&uart0 {
+	/* Console */
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+
+	status = "okay";
+	clock-frequency = <400000>;
+
+	eeprom: eeprom@50 {
+		compatible = "atmel,24c16";
+		pagesize = <16>;
+		reg = <0x50>;
+	};
+
+	rtc_wdt: rtc_wdt@68 {
+		compatible = "dallas,ds1374";
+		reg = <0x68>;
+	};
+};
+
+&usb {
+	status = "okay";
+};
+
+&usb_ctrl_mod {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&cppi41dma  {
+	status = "okay";
+};
+
+/* Power */
+&vbat {
+	regulator-name = "vbat";
+	regulator-min-microvolt = <5000000>;
+	regulator-max-microvolt = <5000000>;
+};
+
+&mac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpsw_default>;
+	status = "okay";
+};
+
+&davinci_mdio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&davinci_mdio_default>;
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	status = "okay";
+};
+
+&cpsw_emac1 {
+	status = "okay";
+};
+
+&phy_sel {
+	reg= <0x44e10650 0xf5>;
+	rmii-clock-ext;
+};
+
+&sham {
+	status = "okay";
+};
+
+&aes {
+	status = "okay";
+};
+
+&gpio0 {
+	ti,no-reset-on-init;
+};
+
+&mmc2 {
+	pinctrl-names = "default";
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <8>;
+	pinctrl-0 = <&mmc1_pins_default>;
+	ti,non-removable;
+	status = "okay";
+};
+
+&buttons {
+	pinctrl-names = "default";
+	pinctrl-0 = <&push_button_pins>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	button@0 {
+		label = "push_button";
+		linux,code = <0x100>;
+		gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+	};
+};
+
+/* SPI Busses */
+&spi0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins>;
+
+	m25p80@0 {
+		compatible = "mx25l6405d";
+		spi-max-frequency = <40000000>;
+
+		reg = <0>;
+		spi-cpol;
+		spi-cpha;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			/* reg : The partition's offset and size within the mtd bank. */
+			partitions@0 {
+				label = "MLO";
+				reg = <0x0 0x80000>;
+			};
+
+			partitions@1 {
+				label = "U-Boot";
+				reg = <0x80000 0x100000>;
+			};
+
+			partitions@2 {
+				label = "U-Boot Env";
+				reg = <0x180000 0x40000>;
+			};
+		};
+	};
+};
+
+&spi1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pins>;
+
+	tpm_spi_tis@0 {
+		compatible = "tcg,tpm_tis-spi";
+		reg = <0>;
+		spi-max-frequency = <500000>;
+	};
+};
Signature · 1 line
2.19.0.rc1
#2 lore raw

PATCH 2/3 ARM: dts: am335x: add support for Moxa UC-2101 open platform

In reply to SZ Lin (林上智)

Add support for Moxa UC-2101 open platform

The UC-2101 computing platform is designed for industrial embedded data acquisition and processing applications.

The features of UC-2101 are:
* eMMC
* SPI flash
* 1x LAN
* 1x RS-232/422/485 ports, software-selectable
* EEPROM
* TPM 2.0
* Watchdog
* RTC
* User gpio-keys
* User LEDs
* User button

---
 .../devicetree/bindings/arm/omap/omap.txt     |  3 +
 arch/arm/boot/dts/Makefile                    |  1 +
 arch/arm/boot/dts/am335x-moxa-uc-2101.dts     | 63 +++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts
Documentation/devicetree/bindings/arm/omap/omap.txt +3 -0
index 2ecc712bf707..c5ca3d6a8099 100644
@@ -157,6 +157,9 @@ Boards:
 - AM335X phyCORE-AM335x: Development kit
   compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"
 
+- AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform
+  compatible = "moxa,uc-2101", "ti,am33xx"
+
 - AM335X UC-8100-ME-T: Communication-centric industrial computing platform
   compatible = "moxa,uc-8100-me-t", "ti,am33xx";
 
arch/arm/boot/dts/Makefile +1 -0
index b5bd3de87c33..6167c068601c 100644
@@ -706,6 +706,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
 	am335x-evmsk.dtb \
 	am335x-icev2.dtb \
 	am335x-lxm.dtb \
+	am335x-moxa-uc-2101.dtb \
 	am335x-moxa-uc-8100-me-t.dtb \
 	am335x-nano.dtb \
 	am335x-pdu001.dtb \
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
2.19.0.rc1
#3 lore raw

Re: [PATCH 2/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform

Quoted 68 lines · SZ Lin (林上智)

Add support for Moxa UC-2101 open platform

The UC-2101 computing platform is designed for industrial embedded data acquisition and processing applications.

The features of UC-2101 are:
* eMMC
* SPI flash
* 1x LAN
* 1x RS-232/422/485 ports, software-selectable
* EEPROM
* TPM 2.0
* Watchdog
* RTC
* User gpio-keys
* User LEDs
* User button

---
  .../devicetree/bindings/arm/omap/omap.txt     |  3 +
  arch/arm/boot/dts/Makefile                    |  1 +
  arch/arm/boot/dts/am335x-moxa-uc-2101.dts     | 63 +++++++++++++++++++
  3 files changed, 67 insertions(+)

create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts

Documentation/devicetree/bindings/arm/omap/omap.txt +3 -0
index 2ecc712bf707..c5ca3d6a8099 100644
@@ -157,6 +157,9 @@ Boards:
  - AM335X phyCORE-AM335x: Development kit
    compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"
 
+- AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform
+  compatible = "moxa,uc-2101", "ti,am33xx"
+
  - AM335X UC-8100-ME-T: Communication-centric industrial computing platform
    compatible = "moxa,uc-8100-me-t", "ti,am33xx";
 
arch/arm/boot/dts/Makefile +1 -0
index b5bd3de87c33..6167c068601c 100644
@@ -706,6 +706,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
  	am335x-evmsk.dtb \
  	am335x-icev2.dtb \
  	am335x-lxm.dtb \
+	am335x-moxa-uc-2101.dtb \
  	am335x-moxa-uc-8100-me-t.dtb \
  	am335x-nano.dtb \
  	am335x-pdu001.dtb \
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +8 -0
new file mode 100644
index 000000000000..d0c1eea4a6c9
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/
+ *
+ * Authors: SZ Lin (林上智) <[email protected]>
+ *          Wes Huang (黃淵河) <[email protected]>
+ *          Fero JD Zhou (周俊達) <[email protected]>
+ */

arch/arm/boot/dts/am335x-moxa-uc-2101.dts line 57

Quoted 10 lines
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +9 -0
+
+/dts-v1/;
+
+#include "am335x-moxa-uc-2100-common.dtsi"
+
 
+
+&cpsw_emac0 {
+	status = "okay";
+	phy_id = <&davinci_mdio>, <0x4>;

Pls, use phy-handle instead of phy_id here and in the next patch.

Quoted 7 lines
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +6 -0
+	phy-mode = "rmii";
+};
+
+&cpsw_emac1 {
+	status = "disable";
+};
Signature · 2 lines
regards,
-grygorii
#4 lore raw

RE: [PATCH 2/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform

Hi,

Quoted 2 lines

-----Original Message-----
From: Grygorii Strashko [mailto:[email protected]]

<snip>

Quoted 2 lines

Pls, use phy-handle instead of phy_id here and in the next patch.

Thanks for the reminder, I will use phy-handle in next version.

Furthermore, the property of "phy-handle" doesn't work properly in 4.4.y-stable kernel. I've fixed it and sent the backport patches to 4.4.y-stable [1][2][3][4].

[1] https://www.spinics.net/lists/stable/msg256121.html
[2] https://www.spinics.net/lists/stable/msg256124.html
[3] https://www.spinics.net/lists/stable/msg256131.html
[4] https://www.spinics.net/lists/stable/msg256749.html

Quoted 12 lines

arch/arm/boot/dts/am335x-moxa-uc-2101.dts line 63

Quoted 8 lines
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +6 -0
+	phy-mode = "rmii";
+};
+
+&cpsw_emac1 {
+	status = "disable";
+};

--
regards,
-grygorii

#5 lore raw

Re: [PATCH 2/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform

Quoted 12 lines · SZ Lin (林上智)

Hi,

Quoted 2 lines

-----Original Message-----
From: Grygorii Strashko [mailto:[email protected]]

<snip>

Quoted 2 lines

Pls, use phy-handle instead of phy_id here and in the next patch.

Thanks for the reminder, I will use phy-handle in next version.

Quoted 8 lines

Furthermore, the property of "phy-handle" doesn't work properly in 4.4.y-stable kernel. I've fixed it and sent the backport patches to 4.4.y-stable [1][2][3][4].

[1] https://www.spinics.net/lists/stable/msg256121.html
[2] https://www.spinics.net/lists/stable/msg256124.html
[3] https://www.spinics.net/lists/stable/msg256131.html
[4] https://www.spinics.net/lists/stable/msg256749.html

Thank you.

Signature · 2 lines
regards,
-grygorii
maintainer
#6 lore raw

Re: [PATCH 2/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform

In reply to SZ Lin (林上智)
Quoted 112 lines · SZ Lin (林上智)

Add support for Moxa UC-2101 open platform

The UC-2101 computing platform is designed for industrial embedded data acquisition and processing applications.

The features of UC-2101 are:
* eMMC
* SPI flash
* 1x LAN
* 1x RS-232/422/485 ports, software-selectable
* EEPROM
* TPM 2.0
* Watchdog
* RTC
* User gpio-keys
* User LEDs
* User button

---
 .../devicetree/bindings/arm/omap/omap.txt     |  3 +
 arch/arm/boot/dts/Makefile                    |  1 +
 arch/arm/boot/dts/am335x-moxa-uc-2101.dts     | 63 +++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts
Documentation/devicetree/bindings/arm/omap/omap.txt +3 -0
index 2ecc712bf707..c5ca3d6a8099 100644
@@ -157,6 +157,9 @@ Boards:
 - AM335X phyCORE-AM335x: Development kit
   compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"
 
+- AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform
+  compatible = "moxa,uc-2101", "ti,am33xx"
+
 - AM335X UC-8100-ME-T: Communication-centric industrial computing platform
   compatible = "moxa,uc-8100-me-t", "ti,am33xx";
 
arch/arm/boot/dts/Makefile +1 -0
index b5bd3de87c33..6167c068601c 100644
@@ -706,6 +706,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
 	am335x-evmsk.dtb \
 	am335x-icev2.dtb \
 	am335x-lxm.dtb \
+	am335x-moxa-uc-2101.dtb \
 	am335x-moxa-uc-8100-me-t.dtb \
 	am335x-nano.dtb \
 	am335x-pdu001.dtb \
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +52 -0
new file mode 100644
index 000000000000..d0c1eea4a6c9
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/
+ *
+ * Authors: SZ Lin (林上智) <[email protected]>
+ *          Wes Huang (黃淵河) <[email protected]>
+ *          Fero JD Zhou (周俊達) <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "am335x-moxa-uc-2100-common.dtsi"
+
+/ {
+	model = "Moxa UC-2101";
+	compatible = "moxa,uc-2101", "ti,am33xx";
+
+	leds {
+		compatible = "gpio-leds";
+		led1 {
+			label = "UC2100:GREEN:USER";
+			gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+	};
+};
+
+&am33xx_pinmux {
+	pinctrl-names = "default";
+
+	cpsw_default: cpsw_default {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_crs.rmii1_crs_dv */
+			AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1)	/* mii1_rxerr.rmii1_rxerr */
+			AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* mii1_txen.rmii1_txen */
+			AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* mii1_txd1.rmii1_txd1 */
+			AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* mii1_txd0.rmii1_txd0 */
+			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1)	/* mii1_rxd1.rmii1_rxd1 */
+			AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1)	/* mii1_rxd0.rmii1_rxd0 */
+			AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mii1_refclk.rmii1_refclk */
+		>;
+	};
+
+	spi1_pins: pinmux_spi1 {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE4)	 /* ecap0_in_pwm0_out.spi1_sclk */
+			AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE4)	 /* uart1_ctsn.spi1_cs0 */
+			AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE4)	 /* uart0_ctsn.spi1_d0 */
+			AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE4)	 /* uart0_rtsn.spi1_d1 */
+		>;
+	};

arch/arm/boot/dts/am335x-moxa-uc-2101.dts line 62

Quoted 10 lines
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +10 -0
+};
+
+&cpsw_emac0 {
+	status = "okay";
+	phy_id = <&davinci_mdio>, <0x4>;
+	phy-mode = "rmii";
+};
+
+&cpsw_emac1 {
+	status = "disable";

"disabled" is the correct value.

Quoted 4 lines
arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file +1 -0
+};
Signature · 1 line
2.19.0.rc1
#7 lore raw

PATCH 3/3 ARM: dts: am335x: add support for Moxa UC-2102 open platform

In reply to SZ Lin (林上智)

Add support for Moxa UC-2102 open platform

The UC-2102 computing platform is designed for industrial embedded data acquisition and processing applications.

The features of UC-2102 are:
* eMMC
* SPI flash
* 2x LAN
* EEPROM
* TPM 2.0
* Watchdog
* RTC
* User gpio-keys
* User LEDs
* User button

---
 .../devicetree/bindings/arm/omap/omap.txt     |   2 +-
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/am335x-moxa-uc-2102.dts     | 200 ++++++++++++++++++
 3 files changed, 202 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2102.dts
Documentation/devicetree/bindings/arm/omap/omap.txt +1 -1
index c5ca3d6a8099..6876eb8263ed 100644
@@ -158,7 +158,7 @@ Boards:
   compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"
 
 - AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform
-  compatible = "moxa,uc-2101", "ti,am33xx"
+  compatible = "moxa,uc-2101", "moxa,uc-2102", "ti,am33xx"
 
 - AM335X UC-8100-ME-T: Communication-centric industrial computing platform
   compatible = "moxa,uc-8100-me-t", "ti,am33xx";
arch/arm/boot/dts/Makefile +1 -0
index 6167c068601c..15d52cabb1a0 100644
@@ -707,6 +707,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
 	am335x-icev2.dtb \
 	am335x-lxm.dtb \
 	am335x-moxa-uc-2101.dtb \
+	am335x-moxa-uc-2102.dtb \
 	am335x-moxa-uc-8100-me-t.dtb \
 	am335x-nano.dtb \
 	am335x-pdu001.dtb \
arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +200 -0

200 lines not on this page · raw message

Signature · 1 line
2.19.0.rc1
maintainer
#8 lore raw

Re: [PATCH 3/3] ARM: dts: am335x: add support for Moxa UC-2102 open platform

Quoted 32 lines · SZ Lin (林上智)

Add support for Moxa UC-2102 open platform

The UC-2102 computing platform is designed for industrial embedded data acquisition and processing applications.

The features of UC-2102 are:
* eMMC
* SPI flash
* 2x LAN
* EEPROM
* TPM 2.0
* Watchdog
* RTC
* User gpio-keys
* User LEDs
* User button

---
 .../devicetree/bindings/arm/omap/omap.txt     |   2 +-
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/am335x-moxa-uc-2102.dts     | 200 ++++++++++++++++++
 3 files changed, 202 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2102.dts
Documentation/devicetree/bindings/arm/omap/omap.txt +0 -0
index c5ca3d6a8099..6876eb8263ed 100644

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

Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/omap.txt +1 -1
@@ -158,7 +158,7 @@ Boards:
   compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"
 
 - AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform
-  compatible = "moxa,uc-2101", "ti,am33xx"
+  compatible = "moxa,uc-2101", "moxa,uc-2102", "ti,am33xx"

The 2102 is a superset of the 2101? If so, the 2102 should come first. If not, this should probably be 2 separate entries.

Quoted 114 lines
Documentation/devicetree/bindings/arm/omap/omap.txt +0 -0
 - AM335X UC-8100-ME-T: Communication-centric industrial computing platform
   compatible = "moxa,uc-8100-me-t", "ti,am33xx";
arch/arm/boot/dts/Makefile +1 -0
index 6167c068601c..15d52cabb1a0 100644
@@ -707,6 +707,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
 	am335x-icev2.dtb \
 	am335x-lxm.dtb \
 	am335x-moxa-uc-2101.dtb \
+	am335x-moxa-uc-2102.dtb \
 	am335x-moxa-uc-8100-me-t.dtb \
 	am335x-nano.dtb \
 	am335x-pdu001.dtb \
arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +93 -0
new file mode 100644
index 000000000000..94a7ecc9eb9a
@@ -0,0 +1,200 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/
+ *
+ * Authors: SZ Lin (林上智) <[email protected]>
+ *          Wes Huang (黃淵河) <[email protected]>
+ *          Fero JD Zhou (周俊達) <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "am335x-moxa-uc-2100-common.dtsi"
+
+/ {
+	model = "Moxa UC-2102";
+	compatible = "moxa,uc-2102", "ti,am33xx";
+
+	leds {
+		compatible = "gpio-leds";
+		led1 {
+			label = "UC2100:GREEN:USER1";
+			gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		led2 {
+			label = "UC2100:GREEN:USER2";
+			gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+	};
+};
+
+&am33xx_pinmux {
+	pinctrl-names = "default";
+
+	cpsw_default: cpsw_default {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_crs.rmii1_crs_dv */
+			AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1)	/* mii1_rxerr.rmii1_rxerr */
+			AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* mii1_txen.rmii1_txen */
+			AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* mii1_txd1.rmii1_txd1 */
+			AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* mii1_txd0.rmii1_txd0 */
+			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1)	/* mii1_rxd1.rmii1_rxd1 */
+			AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1)	/* mii1_rxd0.rmii1_rxd0 */
+			AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mii1_refclk.rmii1_refclk */
+
+			/* Slave 2 */
+			AM33XX_IOPAD(0x870, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* gpmc_wait0.rmii2_crs_dv */
+			AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* gpmc_wpn.rmii2_rxer */
+			AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* gpmc_a0.rmii2_txen */
+			AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* gpmc_a5.rmii2_td0 */
+			AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* gpmc_a4.rmii2_td1 */
+			AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* gpmc_a11.rmii2_rd0 */
+			AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* gpmc_a10.rmii2_rd1 */
+			AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gmii1_col.rmii2_refclk */
+		>;
+	};
+
+	mmc0_pins_default: pinmux_mmc0_pins {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3.mmc0_dat3 */
+			AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2.mmc0_dat2 */
+			AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1.mmc0_dat1 */
+			AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0.mmc0_dat0 */
+			AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk.mmc0_clk */
+			AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd.mmc0_cmd */
+			AM33XX_IOPAD(0x990, PIN_INPUT_PULLUP | MUX_MODE7)	/* mcasp0_aclkx.mmc0_sdcd */
+		>;
+	};
+
+	spi1_pins: pinmux_spi1 {
+		pinctrl-single,pins = <
+			AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE4)	/* ecap0_in_pwm0_out.spi1_sclk */
+			AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE4)	/* uart1_ctsn.spi1_cs0 */
+			AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE4)	/* uart0_ctsn.spi1_d0 */
+			AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE4)	/* uart0_rtsn.spi1_d1 */
+		>;
+	};
+};
+
+&i2c0 {
+	tps: tps@2d {
+		compatible = "ti,tps65910";
+		reg = <0x2d>;
+	};
+};
+
+#include "tps65910.dtsi"
+
+&tps {
+	vcc1-supply = <&vbat>;

arch/arm/boot/dts/am335x-moxa-uc-2102.dts line 103

Quoted 10 lines
arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +10 -0
+	vcc2-supply = <&vbat>;
+	vcc3-supply = <&vbat>;
+	vcc4-supply = <&vbat>;
+	vcc5-supply = <&vbat>;
+	vcc6-supply = <&vbat>;
+	vcc7-supply = <&vbat>;
+	vccio-supply = <&vbat>;
+
+	regulators {
+		vrtc_reg: regulator@0 {

Without a reg property, you shouldn't have unit addresses.

Quoted 100 lines
arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +97 -0
+			regulator-always-on;
+		};
+
+		vio_reg: regulator@1 {
+			regulator-always-on;
+		};
+
+		vdd1_reg: regulator@2 {
+			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+			regulator-name = "vdd_mpu";
+			regulator-min-microvolt = <912500>;
+			regulator-max-microvolt = <1378000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		vdd2_reg: regulator@3 {
+			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+			regulator-name = "vdd_core";
+			regulator-min-microvolt = <912500>;
+			regulator-max-microvolt = <1150000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		vdd3_reg: regulator@4 {
+			regulator-always-on;
+		};
+
+		vdig1_reg: regulator@5 {
+			regulator-always-on;
+		};
+
+		vdig2_reg: regulator@6 {
+			regulator-always-on;
+		};
+
+		vpll_reg: regulator@7 {
+			regulator-always-on;
+		};
+
+		vdac_reg: regulator@8 {
+			regulator-always-on;
+		};
+
+		vaux1_reg: regulator@9 {
+			regulator-always-on;
+		};
+
+		vaux2_reg: regulator@10 {
+			regulator-always-on;
+		};
+
+		vaux33_reg: regulator@11 {
+			regulator-always-on;
+		};
+
+		vmmc_reg: regulator@12 {
+			compatible = "regulator-fixed";
+			regulator-name = "vmmc_reg";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-always-on;
+		};
+	};
+};
+
+&mac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpsw_default>;
+	dual_emac = <1>;
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	status = "okay";
+	phy_id = <&davinci_mdio>, <0x4>;
+	phy-mode = "rmii";
+	dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+	status = "okay";
+	phy_id = <&davinci_mdio>, <0x5>;
+	phy-mode = "rmii";
+	dual_emac_res_vlan = <2>;
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <4>;
+	pinctrl-0 = <&mmc0_pins_default>;
+	cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
+	wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
Signature · 1 line
2.19.0.rc1
#9 lore raw

RE: [PATCH 3/3] ARM: dts: am335x: add support for Moxa UC-2102 open platform

Hi,

<snip>

Quoted 3 lines

The 2102 is a superset of the 2101? If so, the 2102 should come first. If not, this should probably be 2 separate entries.

Nope, they use different SoC models and PMICs. I'll resend them separately in next version.

Thanks for guidance.

Quoted 6 lines
Quoted 6 lines

+&tps {

arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +5 -0
+	vcc1-supply = <&vbat>;
+	vcc2-supply = <&vbat>;
+	vcc3-supply = <&vbat>;
+	vcc4-supply = <&vbat>;
+	vcc5-supply = <&vbat>;
Quoted 8 lines

arch/arm/boot/dts/am335x-moxa-uc-2102.dts line 103

Quoted 6 lines
arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +6 -0
+	vcc6-supply = <&vbat>;
+	vcc7-supply = <&vbat>;
+	vccio-supply = <&vbat>;
+
+	regulators {
+		vrtc_reg: regulator@0 {

Without a reg property, you shouldn't have unit addresses.

I would like to ask why shouldn't we keep unit address with "regulator-always-on;" reg property?

SZ

Quoted 102 lines
Quoted 102 lines
arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file +97 -1
+			regulator-always-on;
+		};
+
+		vio_reg: regulator@1 {
+			regulator-always-on;
+		};
+
+		vdd1_reg: regulator@2 {
+			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+			regulator-name = "vdd_mpu";
+			regulator-min-microvolt = <912500>;
+			regulator-max-microvolt = <1378000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		vdd2_reg: regulator@3 {
+			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+			regulator-name = "vdd_core";
+			regulator-min-microvolt = <912500>;
+			regulator-max-microvolt = <1150000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		vdd3_reg: regulator@4 {
+			regulator-always-on;
+		};
+
+		vdig1_reg: regulator@5 {
+			regulator-always-on;
+		};
+
+		vdig2_reg: regulator@6 {
+			regulator-always-on;
+		};
+
+		vpll_reg: regulator@7 {
+			regulator-always-on;
+		};
+
+		vdac_reg: regulator@8 {
+			regulator-always-on;
+		};
+
+		vaux1_reg: regulator@9 {
+			regulator-always-on;
+		};
+
+		vaux2_reg: regulator@10 {
+			regulator-always-on;
+		};
+
+		vaux33_reg: regulator@11 {
+			regulator-always-on;
+		};
+
+		vmmc_reg: regulator@12 {
+			compatible = "regulator-fixed";
+			regulator-name = "vmmc_reg";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-always-on;
+		};
+	};
+};
+
+&mac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpsw_default>;
+	dual_emac = <1>;
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	status = "okay";
+	phy_id = <&davinci_mdio>, <0x4>;
+	phy-mode = "rmii";
+	dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+	status = "okay";
+	phy_id = <&davinci_mdio>, <0x5>;
+	phy-mode = "rmii";
+	dual_emac_res_vlan = <2>;
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <4>;
+	pinctrl-0 = <&mmc0_pins_default>;
+	cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
+	wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
--

2.19.0.rc1