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

2018-09-28 Thread Tony Lindgren
* SZ Lin (林上智)  [180928 03:51]:
> 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.

Thanks for updating this, applying into omap-for-v4.20/dt.

Tony


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

2018-09-28 Thread 林上智
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.

Signed-off-by: Wes Huang (黃淵河) 
Signed-off-by: Fero JD Zhou (周俊達) 
Signed-off-by: SZ Lin (林上智) 
---
 .../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

diff --git a/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi 
b/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi
new file mode 100644
index ..14f781953475
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi
@@ -0,0 +1,249 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/
+ *
+ * Authors: SZ Lin (林上智) 
+ *  Wes Huang (黃淵河) 
+ *  Fero JD Zhou (周俊達) 
+ */
+
+#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 = <330>;
+ regulator-max-microvolt = <330>;
+ 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 = <40>;
+
+   eeprom: eeprom@50 {
+   compatible = "atmel,24c16";
+   pagesize = <16>;
+