All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM
@ 2019-01-03  1:44 Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts Bryan O'Donoghue
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This series does a minimal conversion of WaRP7 and the BL33 version of
WaRP7 to the DM.

Pinctrl, GPIO, I2C, Regulators, PMIC and MMC are converted. Later patches
will convert USB and UART.

Bryan O'Donoghue (8):
  arm: dts: imx7s-warp: Import Linux warp7 dts
  arm: imx7s-warp: Add DT file hooks
  arm: imx7s-warp: Convert to DM MMC initialization
  arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3
  warp7: defconfig: Switch on IMX7 pinctrl for both ports
  warp7: defconfig: Switch on DM GPIO for both warp7 ports
  warp7: defconfig: Switch to DM for I2C
  arm: imx7s-warp: Convert to DM PMIC

 arch/arm/dts/Makefile        |   3 +-
 arch/arm/dts/imx7s-warp.dts  | 416 +++++++++++++++++++++++++++++++++++
 board/warp7/warp7.c          |  85 +------
 configs/warp7_bl33_defconfig |  14 +-
 configs/warp7_defconfig      |  14 +-
 include/configs/warp7.h      |   8 -
 6 files changed, 455 insertions(+), 85 deletions(-)
 create mode 100644 arch/arm/dts/imx7s-warp.dts

-- 
2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-04  0:46   ` Auer, Lukas
  2019-01-08 13:16   ` Peng Fan
  2019-01-03  1:44 ` [U-Boot] [PATCH 2/8] arm: imx7s-warp: Add DT file hooks Bryan O'Donoghue
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This patch imports the Linux kernel warp7 dts as at upstream kernel commit
cf76c364a1e1.

The following was dropped from the incoming kernel DTS file

-&wdog1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_wdog>;
-       fsl,ext-reset-output;
-       status = "okay";
-};
-
-
-&iomuxc_lpsr {
-       pinctrl_wdog: wdoggrp {
-               fsl,pins = <
-                       MX7D_PAD_LPSR_GPIO1_IO00__WDOG1_WDOG_B  0x74
-               >;
-       };
-};

it causes a DTC compile error for me and isn't needed for u-boot in any
case.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/dts/imx7s-warp.dts | 423 ++++++++++++++++++++++++++++++++++++
 1 file changed, 423 insertions(+)
 create mode 100644 arch/arm/dts/imx7s-warp.dts

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
new file mode 100644
index 0000000000..c44db20734
--- /dev/null
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -0,0 +1,423 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2016 NXP Semiconductors.
+ * Author: Fabio Estevam <fabio.estevam@nxp.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "imx7s.dtsi"
+
+/ {
+	model = "Warp i.MX7 Board";
+	compatible = "warp,imx7s-warp", "fsl,imx7s";
+
+	memory at 80000000 {
+		reg = <0x80000000 0x20000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&pinctrl_gpio>;
+		autorepeat;
+
+		back {
+			label = "Back";
+			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
+			linux,code = <KEY_BACK>;
+			wakeup-source;
+		};
+	};
+
+	reg_brcm: regulator-brcm {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_brcm_reg>;
+		regulator-name = "brcm_reg";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <200000>;
+	};
+
+	reg_bt: regulator-bt {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_bt_reg>;
+		enable-active-high;
+		gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+		regulator-name = "bt_reg";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "imx7-sgtl5000";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&dailink_master>;
+		simple-audio-card,frame-master = <&dailink_master>;
+		simple-audio-card,cpu {
+			sound-dai = <&sai1>;
+		};
+
+		dailink_master: simple-audio-card,codec {
+			sound-dai = <&codec>;
+			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		};
+	};
+};
+
+&clks {
+	assigned-clocks = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
+	assigned-clock-rates = <884736000>;
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "okay";
+
+	pmic: pfuze3000 at 8 {
+		compatible = "fsl,pfuze3000";
+		reg = <0x08>;
+
+		regulators {
+			sw1a_reg: sw1a {
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1475000>;
+				regulator-boot-on;
+				regulator-always-on;
+				regulator-ramp-delay = <6250>;
+			};
+
+			/* use sw1c_reg to align with pfuze100/pfuze200 */
+			sw1c_reg: sw1b {
+				regulator-min-microvolt = <700000>;
+				regulator-max-microvolt = <1475000>;
+				regulator-boot-on;
+				regulator-always-on;
+				regulator-ramp-delay = <6250>;
+			};
+
+			sw2_reg: sw2 {
+				regulator-min-microvolt = <1500000>;
+				regulator-max-microvolt = <1850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw3a_reg: sw3 {
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <1650000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			swbst_reg: swbst {
+				regulator-min-microvolt = <5000000>;
+				regulator-max-microvolt = <5150000>;
+			};
+
+			snvs_reg: vsnvs {
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3000000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vref_reg: vrefddr {
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vgen1_reg: vldo1 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			vgen2_reg: vldo2 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <1550000>;
+			};
+
+			vgen3_reg: vccsd {
+				regulator-min-microvolt = <2850000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			vgen4_reg: v33 {
+				regulator-min-microvolt = <2850000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			vgen5_reg: vldo3 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			vgen6_reg: vldo4 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+		};
+	};
+};
+
+&i2c2 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+};
+
+&i2c3 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	status = "okay";
+};
+
+&i2c4 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c4>;
+	status = "okay";
+
+	codec: sgtl5000 at a {
+		#sound-dai-cells = <0>;
+		reg = <0x0a>;
+		compatible = "fsl,sgtl5000";
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sai1_mclk>;
+		VDDA-supply = <&vgen4_reg>;
+		VDDIO-supply = <&vgen4_reg>;
+		VDDD-supply = <&vgen2_reg>;
+	};
+
+	mpl3115 at 60 {
+		compatible = "fsl,mpl3115";
+		reg = <0x60>;
+	};
+};
+
+&sai1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sai1>;
+	assigned-clocks = <&clks IMX7D_SAI1_ROOT_SRC>,
+			  <&clks IMX7D_SAI1_ROOT_CLK>;
+	assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
+	assigned-clock-rates = <0>, <36864000>;
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart1>;
+	assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
+	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
+	status = "okay";
+};
+
+&uart3  {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart3>;
+	assigned-clocks = <&clks IMX7D_UART3_ROOT_SRC>;
+	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
+	uart-has-rtscts;
+	status = "okay";
+};
+
+&uart6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart6>;
+	assigned-clocks = <&clks IMX7D_UART6_ROOT_SRC>;
+	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
+	fsl,dte-mode;
+	status = "okay";
+};
+
+&usbotg1 {
+	dr_mode = "peripheral";
+	status = "okay";
+};
+
+&usdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usdhc1>;
+	bus-width = <4>;
+	keep-power-in-suspend;
+	no-1-8-v;
+	non-removable;
+	vmmc-supply = <&reg_brcm>;
+	status = "okay";
+};
+
+&usdhc3 {
+	pinctrl-names = "default", "state_100mhz", "state_200mhz";
+	pinctrl-0 = <&pinctrl_usdhc3>;
+	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+	assigned-clocks = <&clks IMX7D_USDHC3_ROOT_CLK>;
+	assigned-clock-rates = <400000000>;
+	bus-width = <8>;
+	no-1-8-v;
+	fsl,tuning-step = <2>;
+	non-removable;
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl_brcm_reg: brcmreggrp {
+		fsl,pins = <
+			MX7D_PAD_SD2_WP__GPIO5_IO10	0x14 /* WL_REG_ON */
+		>;
+	};
+
+	pinctrl_bt_reg: btreggrp {
+		fsl,pins = <
+			MX7D_PAD_SD2_DATA3__GPIO5_IO17	0x14 /* BT_REG_ON */
+		>;
+	};
+
+	pinctrl_gpio: gpiogrp {
+		fsl,pins = <
+			MX7D_PAD_ENET1_RGMII_RD1__GPIO7_IO1	0x14
+		>;
+	};
+
+	pinctrl_i2c1: i2c1grp {
+		fsl,pins = <
+			MX7D_PAD_I2C1_SDA__I2C1_SDA		0x4000007f
+			MX7D_PAD_I2C1_SCL__I2C1_SCL		0x4000007f
+		>;
+	};
+
+	pinctrl_i2c2: i2c2grp {
+		fsl,pins = <
+			MX7D_PAD_I2C2_SDA__I2C2_SDA	0x4000007f
+			MX7D_PAD_I2C2_SCL__I2C2_SCL	0x4000007f
+		>;
+	};
+
+	pinctrl_i2c3: i2c3grp {
+		fsl,pins = <
+			MX7D_PAD_I2C3_SDA__I2C3_SDA	0x4000007f
+			MX7D_PAD_I2C3_SCL__I2C3_SCL	0x4000007f
+		>;
+	};
+
+	pinctrl_i2c4: i2c4grp {
+		fsl,pins = <
+			MX7D_PAD_I2C4_SCL__I2C4_SCL	0x4000007f
+			MX7D_PAD_I2C4_SDA__I2C4_SDA	0x4000007f
+		>;
+	};
+
+	pinctrl_sai1: sai1grp {
+		fsl,pins = <
+			MX7D_PAD_SAI1_RX_DATA__SAI1_RX_DATA0	0x1f
+			MX7D_PAD_SAI1_TX_BCLK__SAI1_TX_BCLK	0x1f
+			MX7D_PAD_SAI1_TX_SYNC__SAI1_TX_SYNC	0x1f
+			MX7D_PAD_SAI1_TX_DATA__SAI1_TX_DATA0	0x30
+		>;
+	};
+
+	pinctrl_sai1_mclk: sai1mclkgrp {
+		fsl,pins = <
+			MX7D_PAD_SAI1_MCLK__SAI1_MCLK           0x1f
+		>;
+	};
+
+	pinctrl_uart1: uart1grp {
+		fsl,pins = <
+			MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX	0x79
+			MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX	0x79
+		>;
+	};
+
+	pinctrl_uart3: uart3grp {
+		fsl,pins = <
+			MX7D_PAD_UART3_TX_DATA__UART3_DCE_TX	0x79
+			MX7D_PAD_UART3_RX_DATA__UART3_DCE_RX	0x79
+			MX7D_PAD_UART3_CTS_B__UART3_DCE_CTS	0x79
+			MX7D_PAD_UART3_RTS_B__UART3_DCE_RTS	0x79
+		>;
+	};
+
+	pinctrl_uart6: uart6grp {
+		fsl,pins = <
+			MX7D_PAD_ECSPI1_MOSI__UART6_DTE_RX	0x79
+			MX7D_PAD_ECSPI1_SCLK__UART6_DTE_TX	0x79
+		>;
+	};
+
+	pinctrl_usdhc1: usdhc1grp {
+		fsl,pins = <
+			MX7D_PAD_SD1_CMD__SD1_CMD	0x59
+			MX7D_PAD_SD1_CLK__SD1_CLK	0x19
+			MX7D_PAD_SD1_DATA0__SD1_DATA0	0x59
+			MX7D_PAD_SD1_DATA1__SD1_DATA1	0x59
+			MX7D_PAD_SD1_DATA2__SD1_DATA2	0x59
+			MX7D_PAD_SD1_DATA3__SD1_DATA3	0x59
+			MX7D_PAD_SD2_RESET_B__GPIO5_IO11 0x14 /* WL_HOST_WAKE */
+		>;
+	};
+
+	pinctrl_usdhc3: usdhc3grp {
+		fsl,pins = <
+			MX7D_PAD_SD3_CMD__SD3_CMD		0x59
+			MX7D_PAD_SD3_CLK__SD3_CLK		0x19
+			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x59
+			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x59
+			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x59
+			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x59
+			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x59
+			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x59
+			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x59
+			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x59
+			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x19
+		>;
+	};
+
+	pinctrl_usdhc3_100mhz: usdhc3grp_100mhz {
+		fsl,pins = <
+			MX7D_PAD_SD3_CMD__SD3_CMD		0x5a
+			MX7D_PAD_SD3_CLK__SD3_CLK		0x1a
+			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x5a
+			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x5a
+			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x5a
+			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x5a
+			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x5a
+			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x5a
+			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x5a
+			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x5a
+			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x1a
+		>;
+	};
+
+	pinctrl_usdhc3_200mhz: usdhc3grp_200mhz {
+		fsl,pins = <
+			MX7D_PAD_SD3_CMD__SD3_CMD		0x5b
+			MX7D_PAD_SD3_CLK__SD3_CLK		0x1b
+			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x5b
+			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x5b
+			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x5b
+			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x5b
+			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x5b
+			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x5b
+			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x5b
+			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x5b
+			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x1b
+		>;
+	};
+};
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 2/8] arm: imx7s-warp: Add DT file hooks
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-08 13:18   ` Peng Fan
  2019-01-03  1:44 ` [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization Bryan O'Donoghue
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This patch adds DT file hooks for imx7s-warp.dtb to the warp7 and
warp7_bl33 builds.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/dts/Makefile        | 3 ++-
 configs/warp7_bl33_defconfig | 3 ++-
 configs/warp7_defconfig      | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index dda4e59491..4fe7e90902 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -460,7 +460,8 @@ dtb-$(CONFIG_MX6ULL) += imx6ull-14x14-evk.dtb
 
 dtb-$(CONFIG_MX7) += imx7-colibri.dtb \
 	imx7d-sdb.dtb \
-	imx7d-sdb-qspi.dtb
+	imx7d-sdb-qspi.dtb \
+	imx7s-warp.dtb
 
 dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-evk.dtb
 
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index a568c6d10e..12141fedd3 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
@@ -37,5 +38,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
-CONFIG_OF_LIBFDT=y
 CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
+CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 4d443295ba..fee98dfbbe 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
@@ -47,8 +48,8 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
-CONFIG_OF_LIBFDT=y
 CONFIG_OPTEE_LOAD_ADDR=0x84000000
 CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
 CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
 CONFIG_BOOTM_OPTEE=y
+CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 2/8] arm: imx7s-warp: Add DT file hooks Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-08 13:22   ` Peng Fan
  2019-01-03  1:44 ` [U-Boot] [PATCH 4/8] arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3 Bryan O'Donoghue
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

Converts from fixed initialization of MMC to DM initialization of MMC.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/dts/imx7s-warp.dts  | 11 -----------
 board/warp7/warp7.c          | 34 ----------------------------------
 configs/warp7_bl33_defconfig |  1 +
 configs/warp7_defconfig      |  1 +
 4 files changed, 2 insertions(+), 45 deletions(-)

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index c44db20734..615ed7ed80 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -251,17 +251,6 @@
 	status = "okay";
 };
 
-&usdhc1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc1>;
-	bus-width = <4>;
-	keep-power-in-suspend;
-	no-1-8-v;
-	non-removable;
-	vmmc-supply = <&reg_brcm>;
-	status = "okay";
-};
-
 &usdhc3 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc3>;
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 3d32b3eb52..146d722b15 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -30,8 +30,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define UART_PAD_CTRL  (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU100KOHM | \
 			PAD_CTL_HYS)
-#define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW |	\
-			PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM)
 
 #define I2C_PAD_CTRL	(PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \
 	PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM)
@@ -74,43 +72,11 @@ static iomux_v3_cfg_t const uart1_pads[] = {
 	MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const usdhc3_pads[] = {
-	MX7D_PAD_SD3_CLK__SD3_CLK     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_CMD__SD3_CMD     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_DATA7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX7D_PAD_SD3_RESET_B__SD3_RESET_B | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
 static void setup_iomux_uart(void)
 {
 	imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
 };
 
-static struct fsl_esdhc_cfg usdhc_cfg[1] = {
-	{USDHC3_BASE_ADDR},
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
-		/* Assume uSDHC3 emmc is always present */
-		return 1;
-}
-
-int board_mmc_init(bd_t *bis)
-{
-	imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
-	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-
-	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-}
-
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index 12141fedd3..b2f943c775 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -24,6 +24,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
+CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index fee98dfbbe..65d801ffe2 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
+CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_OPTEE=y
 CONFIG_USB=y
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 4/8] arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
                   ` (2 preceding siblings ...)
  2019-01-03  1:44 ` [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports Bryan O'Donoghue
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This patch sets up an alias for mmc0 to usdhc3.

Before the DM conversion only usdhc3 was enabled and therefore it appeared
as MMC 0 to u-boot. After enabling MMC DM though usdhc3 defaults to MMC 2,
which left unattended would drive changes to existing warp7 bootscripts and
environment variables that rely on mmc 0.

Setup the alias of mmc0 and usdhc3 so that existing warp7 boot code will
work unmodified.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/dts/imx7s-warp.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index 615ed7ed80..279f02ecef 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -17,6 +17,10 @@
 		reg = <0x80000000 0x20000000>;
 	};
 
+	aliases {
+		mmc0 = &usdhc3;
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-0 = <&pinctrl_gpio>;
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
                   ` (3 preceding siblings ...)
  2019-01-03  1:44 ` [U-Boot] [PATCH 4/8] arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3 Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-08 13:22   ` Peng Fan
  2019-01-03  1:44 ` [U-Boot] [PATCH 6/8] warp7: defconfig: Switch on DM GPIO for both warp7 ports Bryan O'Donoghue
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

Switches on the IMX7 pinctrl driver for the warp7 and warp7_bl33 ports,
necessary to convert over to DM for this board.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 configs/warp7_bl33_defconfig | 2 ++
 configs/warp7_defconfig      | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index b2f943c775..a2c2555315 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -41,3 +41,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
 CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX7=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 65d801ffe2..8691d00491 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -54,3 +54,5 @@ CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
 CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
 CONFIG_BOOTM_OPTEE=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX7=y
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 6/8] warp7: defconfig: Switch on DM GPIO for both warp7 ports
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
                   ` (4 preceding siblings ...)
  2019-01-03  1:44 ` [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 7/8] warp7: defconfig: Switch to DM for I2C Bryan O'Donoghue
  2019-01-03  1:44 ` [U-Boot] [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC Bryan O'Donoghue
  7 siblings, 0 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This patch switches on DM_GPIO for both WaRP7 ports.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 configs/warp7_bl33_defconfig | 1 +
 configs/warp7_defconfig      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index a2c2555315..7f21bb4f53 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -43,3 +43,4 @@ CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
 CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
+CONFIG_DM_GPIO=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 8691d00491..2d3171e42a 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -56,3 +56,4 @@ CONFIG_BOOTM_OPTEE=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
+CONFIG_DM_GPIO=y
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 7/8] warp7: defconfig: Switch to DM for I2C
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
                   ` (5 preceding siblings ...)
  2019-01-03  1:44 ` [U-Boot] [PATCH 6/8] warp7: defconfig: Switch on DM GPIO for both warp7 ports Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-08 13:28   ` Peng Fan
  2019-01-03  1:44 ` [U-Boot] [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC Bryan O'Donoghue
  7 siblings, 1 reply; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This commit switches to DM I2C for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 board/warp7/warp7.c          | 24 ------------------------
 configs/warp7_bl33_defconfig |  1 +
 configs/warp7_defconfig      |  1 +
 include/configs/warp7.h      |  2 --
 4 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 146d722b15..19f0df4d09 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -31,26 +31,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define UART_PAD_CTRL  (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU100KOHM | \
 			PAD_CTL_HYS)
 
-#define I2C_PAD_CTRL	(PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \
-	PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM)
-
-#ifdef CONFIG_SYS_I2C_MXC
-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
-/* I2C1 for PMIC */
-static struct i2c_pads_info i2c_pad_info1 = {
-	.scl = {
-		.i2c_mode = MX7D_PAD_I2C1_SCL__I2C1_SCL | PC,
-		.gpio_mode = MX7D_PAD_I2C1_SCL__GPIO4_IO8 | PC,
-		.gp = IMX_GPIO_NR(4, 8),
-	},
-	.sda = {
-		.i2c_mode = MX7D_PAD_I2C1_SDA__I2C1_SDA | PC,
-		.gpio_mode = MX7D_PAD_I2C1_SDA__GPIO4_IO9 | PC,
-		.gp = IMX_GPIO_NR(4, 9),
-	},
-};
-#endif
-
 int dram_init(void)
 {
 	gd->ram_size = PHYS_SDRAM_SIZE;
@@ -130,10 +110,6 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-	#ifdef CONFIG_SYS_I2C_MXC
-		setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
-	#endif
-
 	return 0;
 }
 
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index 7f21bb4f53..2e80011cbc 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -44,3 +44,4 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
 CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 2d3171e42a..9f7dc73a11 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -57,3 +57,4 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
 CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index a391dfb5c1..41eb8d7e1d 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -126,9 +126,7 @@
 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
 /* I2C configs */
-#define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MXC
-#define CONFIG_SYS_I2C_MXC_I2C1
 #define CONFIG_SYS_I2C_SPEED		100000
 
 /* PMIC */
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC
  2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
                   ` (6 preceding siblings ...)
  2019-01-03  1:44 ` [U-Boot] [PATCH 7/8] warp7: defconfig: Switch to DM for I2C Bryan O'Donoghue
@ 2019-01-03  1:44 ` Bryan O'Donoghue
  2019-01-08 13:29   ` Peng Fan
  7 siblings, 1 reply; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-03  1:44 UTC (permalink / raw)
  To: u-boot

This patch converts the warp7 and warp7_bl33 board ports over to using the
DM PMIC model.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 board/warp7/warp7.c          | 27 +++++++++++----------------
 configs/warp7_bl33_defconfig |  6 ++++++
 configs/warp7_defconfig      |  6 ++++++
 include/configs/warp7.h      |  6 ------
 4 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 19f0df4d09..6ebeb08e33 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -64,29 +64,24 @@ int board_early_init_f(void)
 	return 0;
 }
 
-#ifdef CONFIG_POWER
-#define I2C_PMIC       0
-static struct pmic *pfuze;
+#ifdef CONFIG_DM_PMIC
 int power_init_board(void)
 {
-	int ret;
-	unsigned int reg, rev_id;
+	struct udevice *dev;
+	int ret, dev_id, rev_id;
 
-	ret = power_pfuze3000_init(I2C_PMIC);
-	if (ret)
+	ret = pmic_get("pfuze3000", &dev);
+	if (ret == -ENODEV)
+		return 0;
+	if (ret != 0)
 		return ret;
 
-	pfuze = pmic_get("PFUZE3000");
-	ret = pmic_probe(pfuze);
-	if (ret)
-		return ret;
-
-	pmic_reg_read(pfuze, PFUZE3000_DEVICEID, &reg);
-	pmic_reg_read(pfuze, PFUZE3000_REVID, &rev_id);
-	printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", reg, rev_id);
+	dev_id = pmic_reg_read(dev, PFUZE3000_DEVICEID);
+	rev_id = pmic_reg_read(dev, PFUZE3000_REVID);
+	printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
 
 	/* disable Low Power Mode during standby mode */
-	pmic_reg_write(pfuze, PFUZE3000_LDOGCTL, 0x1);
+	pmic_clrsetbits(dev, PFUZE3000_LDOGCTL, 0, 1);
 
 	return 0;
 }
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index 2e80011cbc..7b40bfbd6d 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -45,3 +45,9 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 9f7dc73a11..d1c8e403a7 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -58,3 +58,9 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 41eb8d7e1d..043f2861b6 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -129,12 +129,6 @@
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_SPEED		100000
 
-/* PMIC */
-#define CONFIG_POWER
-#define CONFIG_POWER_I2C
-#define CONFIG_POWER_PFUZE3000
-#define CONFIG_POWER_PFUZE3000_I2C_ADDR	0x08
-
 /* environment organization */
 #define CONFIG_ENV_SIZE			SZ_8K
 
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts
  2019-01-03  1:44 ` [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts Bryan O'Donoghue
@ 2019-01-04  0:46   ` Auer, Lukas
  2019-01-04 10:37     ` Bryan O'Donoghue
  2019-01-08 13:16   ` Peng Fan
  1 sibling, 1 reply; 20+ messages in thread
From: Auer, Lukas @ 2019-01-04  0:46 UTC (permalink / raw)
  To: u-boot

Hi Bryan,

On Thu, 2019-01-03 at 01:44 +0000, Bryan O'Donoghue wrote:
> This patch imports the Linux kernel warp7 dts as at upstream kernel
> commit
> cf76c364a1e1.
> 
> The following was dropped from the incoming kernel DTS file
> 
> -&wdog1 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_wdog>;
> -       fsl,ext-reset-output;
> -       status = "okay";
> -};
> -
> -
> -&iomuxc_lpsr {
> -       pinctrl_wdog: wdoggrp {
> -               fsl,pins = <
> -                       MX7D_PAD_LPSR_GPIO1_IO00__WDOG1_WDOG_B  0x74
> -               >;
> -       };
> -};
> 
> it causes a DTC compile error for me and isn't needed for u-boot in
> any
> case.

This is caused by a typo in arch/arm/dts/imx7d-pinfunc.h, which lists
it as MX7D_PAD_LPSR_GPIO1_IO00__WDOD1_WDOG_B (WDOD instead of WDOG).
I am not familiar with the imx7s-warp, but other imx7 boards use the
external reset of the watchdog timer to reset the system.

Thanks,
Lukas

> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/dts/imx7s-warp.dts | 423
> ++++++++++++++++++++++++++++++++++++
>  1 file changed, 423 insertions(+)
>  create mode 100644 arch/arm/dts/imx7s-warp.dts
> 
> diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-
> warp.dts
> new file mode 100644
> index 0000000000..c44db20734
> --- /dev/null
> +++ b/arch/arm/dts/imx7s-warp.dts
> @@ -0,0 +1,423 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2016 NXP Semiconductors.
> + * Author: Fabio Estevam <fabio.estevam@nxp.com>
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/input/input.h>
> +#include "imx7s.dtsi"
> +
> +/ {
> +	model = "Warp i.MX7 Board";
> +	compatible = "warp,imx7s-warp", "fsl,imx7s";
> +
> +	memory at 80000000 {
> +		reg = <0x80000000 0x20000000>;
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&pinctrl_gpio>;
> +		autorepeat;
> +
> +		back {
> +			label = "Back";
> +			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
> +			linux,code = <KEY_BACK>;
> +			wakeup-source;
> +		};
> +	};
> +
> +	reg_brcm: regulator-brcm {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_brcm_reg>;
> +		regulator-name = "brcm_reg";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		startup-delay-us = <200000>;
> +	};
> +
> +	reg_bt: regulator-bt {
> +		compatible = "regulator-fixed";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_bt_reg>;
> +		enable-active-high;
> +		gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
> +		regulator-name = "bt_reg";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-always-on;
> +	};
> +
> +	sound {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "imx7-sgtl5000";
> +		simple-audio-card,format = "i2s";
> +		simple-audio-card,bitclock-master = <&dailink_master>;
> +		simple-audio-card,frame-master = <&dailink_master>;
> +		simple-audio-card,cpu {
> +			sound-dai = <&sai1>;
> +		};
> +
> +		dailink_master: simple-audio-card,codec {
> +			sound-dai = <&codec>;
> +			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
> +		};
> +	};
> +};
> +
> +&clks {
> +	assigned-clocks = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
> +	assigned-clock-rates = <884736000>;
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c1>;
> +	status = "okay";
> +
> +	pmic: pfuze3000 at 8 {
> +		compatible = "fsl,pfuze3000";
> +		reg = <0x08>;
> +
> +		regulators {
> +			sw1a_reg: sw1a {
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1475000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				regulator-ramp-delay = <6250>;
> +			};
> +
> +			/* use sw1c_reg to align with pfuze100/pfuze200
> */
> +			sw1c_reg: sw1b {
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1475000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				regulator-ramp-delay = <6250>;
> +			};
> +
> +			sw2_reg: sw2 {
> +				regulator-min-microvolt = <1500000>;
> +				regulator-max-microvolt = <1850000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			sw3a_reg: sw3 {
> +				regulator-min-microvolt = <900000>;
> +				regulator-max-microvolt = <1650000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			swbst_reg: swbst {
> +				regulator-min-microvolt = <5000000>;
> +				regulator-max-microvolt = <5150000>;
> +			};
> +
> +			snvs_reg: vsnvs {
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <3000000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			vref_reg: vrefddr {
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			vgen1_reg: vldo1 {
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen2_reg: vldo2 {
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <1550000>;
> +			};
> +
> +			vgen3_reg: vccsd {
> +				regulator-min-microvolt = <2850000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen4_reg: v33 {
> +				regulator-min-microvolt = <2850000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen5_reg: vldo3 {
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen6_reg: vldo4 {
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c2>;
> +	status = "okay";
> +};
> +
> +&i2c3 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c3>;
> +	status = "okay";
> +};
> +
> +&i2c4 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c4>;
> +	status = "okay";
> +
> +	codec: sgtl5000 at a {
> +		#sound-dai-cells = <0>;
> +		reg = <0x0a>;
> +		compatible = "fsl,sgtl5000";
> +		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_sai1_mclk>;
> +		VDDA-supply = <&vgen4_reg>;
> +		VDDIO-supply = <&vgen4_reg>;
> +		VDDD-supply = <&vgen2_reg>;
> +	};
> +
> +	mpl3115 at 60 {
> +		compatible = "fsl,mpl3115";
> +		reg = <0x60>;
> +	};
> +};
> +
> +&sai1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sai1>;
> +	assigned-clocks = <&clks IMX7D_SAI1_ROOT_SRC>,
> +			  <&clks IMX7D_SAI1_ROOT_CLK>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
> +	assigned-clock-rates = <0>, <36864000>;
> +	status = "okay";
> +};
> +
> +&uart1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart1>;
> +	assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
> +	status = "okay";
> +};
> +
> +&uart3  {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart3>;
> +	assigned-clocks = <&clks IMX7D_UART3_ROOT_SRC>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
> +	uart-has-rtscts;
> +	status = "okay";
> +};
> +
> +&uart6 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart6>;
> +	assigned-clocks = <&clks IMX7D_UART6_ROOT_SRC>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
> +	fsl,dte-mode;
> +	status = "okay";
> +};
> +
> +&usbotg1 {
> +	dr_mode = "peripheral";
> +	status = "okay";
> +};
> +
> +&usdhc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_usdhc1>;
> +	bus-width = <4>;
> +	keep-power-in-suspend;
> +	no-1-8-v;
> +	non-removable;
> +	vmmc-supply = <&reg_brcm>;
> +	status = "okay";
> +};
> +
> +&usdhc3 {
> +	pinctrl-names = "default", "state_100mhz", "state_200mhz";
> +	pinctrl-0 = <&pinctrl_usdhc3>;
> +	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
> +	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
> +	assigned-clocks = <&clks IMX7D_USDHC3_ROOT_CLK>;
> +	assigned-clock-rates = <400000000>;
> +	bus-width = <8>;
> +	no-1-8-v;
> +	fsl,tuning-step = <2>;
> +	non-removable;
> +	status = "okay";
> +};
> +
> +&iomuxc {
> +	pinctrl_brcm_reg: brcmreggrp {
> +		fsl,pins = <
> +			MX7D_PAD_SD2_WP__GPIO5_IO10	0x14 /*
> WL_REG_ON */
> +		>;
> +	};
> +
> +	pinctrl_bt_reg: btreggrp {
> +		fsl,pins = <
> +			MX7D_PAD_SD2_DATA3__GPIO5_IO17	0x14 /*
> BT_REG_ON */
> +		>;
> +	};
> +
> +	pinctrl_gpio: gpiogrp {
> +		fsl,pins = <
> +			MX7D_PAD_ENET1_RGMII_RD1__GPIO7_IO1	0x14
> +		>;
> +	};
> +
> +	pinctrl_i2c1: i2c1grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C1_SDA__I2C1_SDA		0x400
> 0007f
> +			MX7D_PAD_I2C1_SCL__I2C1_SCL		0x400
> 0007f
> +		>;
> +	};
> +
> +	pinctrl_i2c2: i2c2grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C2_SDA__I2C2_SDA	0x4000007f
> +			MX7D_PAD_I2C2_SCL__I2C2_SCL	0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_i2c3: i2c3grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C3_SDA__I2C3_SDA	0x4000007f
> +			MX7D_PAD_I2C3_SCL__I2C3_SCL	0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_i2c4: i2c4grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C4_SCL__I2C4_SCL	0x4000007f
> +			MX7D_PAD_I2C4_SDA__I2C4_SDA	0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_sai1: sai1grp {
> +		fsl,pins = <
> +			MX7D_PAD_SAI1_RX_DATA__SAI1_RX_DATA0	0x1f
> +			MX7D_PAD_SAI1_TX_BCLK__SAI1_TX_BCLK	0x1f
> +			MX7D_PAD_SAI1_TX_SYNC__SAI1_TX_SYNC	0x1f
> +			MX7D_PAD_SAI1_TX_DATA__SAI1_TX_DATA0	0x30
> +		>;
> +	};
> +
> +	pinctrl_sai1_mclk: sai1mclkgrp {
> +		fsl,pins = <
> +			MX7D_PAD_SAI1_MCLK__SAI1_MCLK           0x1f
> +		>;
> +	};
> +
> +	pinctrl_uart1: uart1grp {
> +		fsl,pins = <
> +			MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX	0x79
> +			MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX	0x79
> +		>;
> +	};
> +
> +	pinctrl_uart3: uart3grp {
> +		fsl,pins = <
> +			MX7D_PAD_UART3_TX_DATA__UART3_DCE_TX	0x79
> +			MX7D_PAD_UART3_RX_DATA__UART3_DCE_RX	0x79
> +			MX7D_PAD_UART3_CTS_B__UART3_DCE_CTS	0x79
> +			MX7D_PAD_UART3_RTS_B__UART3_DCE_RTS	0x79
> +		>;
> +	};
> +
> +	pinctrl_uart6: uart6grp {
> +		fsl,pins = <
> +			MX7D_PAD_ECSPI1_MOSI__UART6_DTE_RX	0x79
> +			MX7D_PAD_ECSPI1_SCLK__UART6_DTE_TX	0x79
> +		>;
> +	};
> +
> +	pinctrl_usdhc1: usdhc1grp {
> +		fsl,pins = <
> +			MX7D_PAD_SD1_CMD__SD1_CMD	0x59
> +			MX7D_PAD_SD1_CLK__SD1_CLK	0x19
> +			MX7D_PAD_SD1_DATA0__SD1_DATA0	0x59
> +			MX7D_PAD_SD1_DATA1__SD1_DATA1	0x59
> +			MX7D_PAD_SD1_DATA2__SD1_DATA2	0x59
> +			MX7D_PAD_SD1_DATA3__SD1_DATA3	0x59
> +			MX7D_PAD_SD2_RESET_B__GPIO5_IO11 0x14 /*
> WL_HOST_WAKE */
> +		>;
> +	};
> +
> +	pinctrl_usdhc3: usdhc3grp {
> +		fsl,pins = <
> +			MX7D_PAD_SD3_CMD__SD3_CMD		0x59
> +			MX7D_PAD_SD3_CLK__SD3_CLK		0x19
> +			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x59
> +			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x59
> +			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x59
> +			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x59
> +			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x59
> +			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x59
> +			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x59
> +			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x59
> +			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x19
> +		>;
> +	};
> +
> +	pinctrl_usdhc3_100mhz: usdhc3grp_100mhz {
> +		fsl,pins = <
> +			MX7D_PAD_SD3_CMD__SD3_CMD		0x5a
> +			MX7D_PAD_SD3_CLK__SD3_CLK		0x1a
> +			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x5a
> +			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x5a
> +			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x5a
> +			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x5a
> +			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x5a
> +			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x5a
> +			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x5a
> +			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x5a
> +			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x1a
> +		>;
> +	};
> +
> +	pinctrl_usdhc3_200mhz: usdhc3grp_200mhz {
> +		fsl,pins = <
> +			MX7D_PAD_SD3_CMD__SD3_CMD		0x5b
> +			MX7D_PAD_SD3_CLK__SD3_CLK		0x1b
> +			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x5b
> +			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x5b
> +			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x5b
> +			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x5b
> +			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x5b
> +			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x5b
> +			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x5b
> +			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x5b
> +			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x1b
> +		>;
> +	};
> +};

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts
  2019-01-04  0:46   ` Auer, Lukas
@ 2019-01-04 10:37     ` Bryan O'Donoghue
  0 siblings, 0 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-04 10:37 UTC (permalink / raw)
  To: u-boot



On 04/01/2019 00:46, Auer, Lukas wrote:
> This is caused by a typo in arch/arm/dts/imx7d-pinfunc.h, which lists
> it as MX7D_PAD_LPSR_GPIO1_IO00__WDOD1_WDOG_B (WDOD instead of WDOG).

ah good catch

let me go fix that and we can import the DT wholesale

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts
  2019-01-03  1:44 ` [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts Bryan O'Donoghue
  2019-01-04  0:46   ` Auer, Lukas
@ 2019-01-08 13:16   ` Peng Fan
  1 sibling, 0 replies; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:16 UTC (permalink / raw)
  To: u-boot

Hi Bryan,

> -----Original Message-----
> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> Sent: 2019年1月3日 9:45
> To: u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> Albert Aribaud <albert.u.boot@aribaud.net>; Stefano Babic
> <sbabic@denx.de>
> Subject: [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts
> 
> This patch imports the Linux kernel warp7 dts as at upstream kernel commit
> cf76c364a1e1.
> 
> The following was dropped from the incoming kernel DTS file

U-Boot dts synced from Linux Kernel DTS file. If there is issue, it should be fixed in Linux side and imported to U-Boot.

Regards,
Peng

> 
> -&wdog1 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_wdog>;
> -       fsl,ext-reset-output;
> -       status = "okay";
> -};
> -
> -
> -&iomuxc_lpsr {
> -       pinctrl_wdog: wdoggrp {
> -               fsl,pins = <
> -
> MX7D_PAD_LPSR_GPIO1_IO00__WDOG1_WDOG_B  0x74
> -               >;
> -       };
> -};
> 
> it causes a DTC compile error for me and isn't needed for u-boot in any case.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/dts/imx7s-warp.dts | 423
> ++++++++++++++++++++++++++++++++++++
>  1 file changed, 423 insertions(+)
>  create mode 100644 arch/arm/dts/imx7s-warp.dts
> 
> diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
> new file mode 100644 index 0000000000..c44db20734
> --- /dev/null
> +++ b/arch/arm/dts/imx7s-warp.dts
> @@ -0,0 +1,423 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2016 NXP Semiconductors.
> + * Author: Fabio Estevam <fabio.estevam@nxp.com>  */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/input/input.h>
> +#include "imx7s.dtsi"
> +
> +/ {
> +	model = "Warp i.MX7 Board";
> +	compatible = "warp,imx7s-warp", "fsl,imx7s";
> +
> +	memory at 80000000 {
> +		reg = <0x80000000 0x20000000>;
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-0 = <&pinctrl_gpio>;
> +		autorepeat;
> +
> +		back {
> +			label = "Back";
> +			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
> +			linux,code = <KEY_BACK>;
> +			wakeup-source;
> +		};
> +	};
> +
> +	reg_brcm: regulator-brcm {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_brcm_reg>;
> +		regulator-name = "brcm_reg";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		startup-delay-us = <200000>;
> +	};
> +
> +	reg_bt: regulator-bt {
> +		compatible = "regulator-fixed";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_bt_reg>;
> +		enable-active-high;
> +		gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
> +		regulator-name = "bt_reg";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-always-on;
> +	};
> +
> +	sound {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "imx7-sgtl5000";
> +		simple-audio-card,format = "i2s";
> +		simple-audio-card,bitclock-master = <&dailink_master>;
> +		simple-audio-card,frame-master = <&dailink_master>;
> +		simple-audio-card,cpu {
> +			sound-dai = <&sai1>;
> +		};
> +
> +		dailink_master: simple-audio-card,codec {
> +			sound-dai = <&codec>;
> +			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
> +		};
> +	};
> +};
> +
> +&clks {
> +	assigned-clocks = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
> +	assigned-clock-rates = <884736000>;
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c1>;
> +	status = "okay";
> +
> +	pmic: pfuze3000 at 8 {
> +		compatible = "fsl,pfuze3000";
> +		reg = <0x08>;
> +
> +		regulators {
> +			sw1a_reg: sw1a {
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1475000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				regulator-ramp-delay = <6250>;
> +			};
> +
> +			/* use sw1c_reg to align with pfuze100/pfuze200 */
> +			sw1c_reg: sw1b {
> +				regulator-min-microvolt = <700000>;
> +				regulator-max-microvolt = <1475000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				regulator-ramp-delay = <6250>;
> +			};
> +
> +			sw2_reg: sw2 {
> +				regulator-min-microvolt = <1500000>;
> +				regulator-max-microvolt = <1850000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			sw3a_reg: sw3 {
> +				regulator-min-microvolt = <900000>;
> +				regulator-max-microvolt = <1650000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			swbst_reg: swbst {
> +				regulator-min-microvolt = <5000000>;
> +				regulator-max-microvolt = <5150000>;
> +			};
> +
> +			snvs_reg: vsnvs {
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <3000000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			vref_reg: vrefddr {
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			vgen1_reg: vldo1 {
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen2_reg: vldo2 {
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <1550000>;
> +			};
> +
> +			vgen3_reg: vccsd {
> +				regulator-min-microvolt = <2850000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen4_reg: v33 {
> +				regulator-min-microvolt = <2850000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen5_reg: vldo3 {
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			vgen6_reg: vldo4 {
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c2>;
> +	status = "okay";
> +};
> +
> +&i2c3 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c3>;
> +	status = "okay";
> +};
> +
> +&i2c4 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c4>;
> +	status = "okay";
> +
> +	codec: sgtl5000 at a {
> +		#sound-dai-cells = <0>;
> +		reg = <0x0a>;
> +		compatible = "fsl,sgtl5000";
> +		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_sai1_mclk>;
> +		VDDA-supply = <&vgen4_reg>;
> +		VDDIO-supply = <&vgen4_reg>;
> +		VDDD-supply = <&vgen2_reg>;
> +	};
> +
> +	mpl3115 at 60 {
> +		compatible = "fsl,mpl3115";
> +		reg = <0x60>;
> +	};
> +};
> +
> +&sai1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sai1>;
> +	assigned-clocks = <&clks IMX7D_SAI1_ROOT_SRC>,
> +			  <&clks IMX7D_SAI1_ROOT_CLK>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
> +	assigned-clock-rates = <0>, <36864000>;
> +	status = "okay";
> +};
> +
> +&uart1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart1>;
> +	assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
> +	status = "okay";
> +};
> +
> +&uart3  {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart3>;
> +	assigned-clocks = <&clks IMX7D_UART3_ROOT_SRC>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
> +	uart-has-rtscts;
> +	status = "okay";
> +};
> +
> +&uart6 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart6>;
> +	assigned-clocks = <&clks IMX7D_UART6_ROOT_SRC>;
> +	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
> +	fsl,dte-mode;
> +	status = "okay";
> +};
> +
> +&usbotg1 {
> +	dr_mode = "peripheral";
> +	status = "okay";
> +};
> +
> +&usdhc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_usdhc1>;
> +	bus-width = <4>;
> +	keep-power-in-suspend;
> +	no-1-8-v;
> +	non-removable;
> +	vmmc-supply = <&reg_brcm>;
> +	status = "okay";
> +};
> +
> +&usdhc3 {
> +	pinctrl-names = "default", "state_100mhz", "state_200mhz";
> +	pinctrl-0 = <&pinctrl_usdhc3>;
> +	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
> +	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
> +	assigned-clocks = <&clks IMX7D_USDHC3_ROOT_CLK>;
> +	assigned-clock-rates = <400000000>;
> +	bus-width = <8>;
> +	no-1-8-v;
> +	fsl,tuning-step = <2>;
> +	non-removable;
> +	status = "okay";
> +};
> +
> +&iomuxc {
> +	pinctrl_brcm_reg: brcmreggrp {
> +		fsl,pins = <
> +			MX7D_PAD_SD2_WP__GPIO5_IO10	0x14 /* WL_REG_ON */
> +		>;
> +	};
> +
> +	pinctrl_bt_reg: btreggrp {
> +		fsl,pins = <
> +			MX7D_PAD_SD2_DATA3__GPIO5_IO17	0x14 /*
> BT_REG_ON */
> +		>;
> +	};
> +
> +	pinctrl_gpio: gpiogrp {
> +		fsl,pins = <
> +			MX7D_PAD_ENET1_RGMII_RD1__GPIO7_IO1	0x14
> +		>;
> +	};
> +
> +	pinctrl_i2c1: i2c1grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C1_SDA__I2C1_SDA		0x4000007f
> +			MX7D_PAD_I2C1_SCL__I2C1_SCL		0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_i2c2: i2c2grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C2_SDA__I2C2_SDA	0x4000007f
> +			MX7D_PAD_I2C2_SCL__I2C2_SCL	0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_i2c3: i2c3grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C3_SDA__I2C3_SDA	0x4000007f
> +			MX7D_PAD_I2C3_SCL__I2C3_SCL	0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_i2c4: i2c4grp {
> +		fsl,pins = <
> +			MX7D_PAD_I2C4_SCL__I2C4_SCL	0x4000007f
> +			MX7D_PAD_I2C4_SDA__I2C4_SDA	0x4000007f
> +		>;
> +	};
> +
> +	pinctrl_sai1: sai1grp {
> +		fsl,pins = <
> +			MX7D_PAD_SAI1_RX_DATA__SAI1_RX_DATA0	0x1f
> +			MX7D_PAD_SAI1_TX_BCLK__SAI1_TX_BCLK	0x1f
> +			MX7D_PAD_SAI1_TX_SYNC__SAI1_TX_SYNC	0x1f
> +			MX7D_PAD_SAI1_TX_DATA__SAI1_TX_DATA0	0x30
> +		>;
> +	};
> +
> +	pinctrl_sai1_mclk: sai1mclkgrp {
> +		fsl,pins = <
> +			MX7D_PAD_SAI1_MCLK__SAI1_MCLK           0x1f
> +		>;
> +	};
> +
> +	pinctrl_uart1: uart1grp {
> +		fsl,pins = <
> +			MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX	0x79
> +			MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX	0x79
> +		>;
> +	};
> +
> +	pinctrl_uart3: uart3grp {
> +		fsl,pins = <
> +			MX7D_PAD_UART3_TX_DATA__UART3_DCE_TX	0x79
> +			MX7D_PAD_UART3_RX_DATA__UART3_DCE_RX	0x79
> +			MX7D_PAD_UART3_CTS_B__UART3_DCE_CTS	0x79
> +			MX7D_PAD_UART3_RTS_B__UART3_DCE_RTS	0x79
> +		>;
> +	};
> +
> +	pinctrl_uart6: uart6grp {
> +		fsl,pins = <
> +			MX7D_PAD_ECSPI1_MOSI__UART6_DTE_RX	0x79
> +			MX7D_PAD_ECSPI1_SCLK__UART6_DTE_TX	0x79
> +		>;
> +	};
> +
> +	pinctrl_usdhc1: usdhc1grp {
> +		fsl,pins = <
> +			MX7D_PAD_SD1_CMD__SD1_CMD	0x59
> +			MX7D_PAD_SD1_CLK__SD1_CLK	0x19
> +			MX7D_PAD_SD1_DATA0__SD1_DATA0	0x59
> +			MX7D_PAD_SD1_DATA1__SD1_DATA1	0x59
> +			MX7D_PAD_SD1_DATA2__SD1_DATA2	0x59
> +			MX7D_PAD_SD1_DATA3__SD1_DATA3	0x59
> +			MX7D_PAD_SD2_RESET_B__GPIO5_IO11 0x14 /*
> WL_HOST_WAKE */
> +		>;
> +	};
> +
> +	pinctrl_usdhc3: usdhc3grp {
> +		fsl,pins = <
> +			MX7D_PAD_SD3_CMD__SD3_CMD		0x59
> +			MX7D_PAD_SD3_CLK__SD3_CLK		0x19
> +			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x59
> +			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x59
> +			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x59
> +			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x59
> +			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x59
> +			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x59
> +			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x59
> +			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x59
> +			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x19
> +		>;
> +	};
> +
> +	pinctrl_usdhc3_100mhz: usdhc3grp_100mhz {
> +		fsl,pins = <
> +			MX7D_PAD_SD3_CMD__SD3_CMD		0x5a
> +			MX7D_PAD_SD3_CLK__SD3_CLK		0x1a
> +			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x5a
> +			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x5a
> +			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x5a
> +			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x5a
> +			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x5a
> +			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x5a
> +			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x5a
> +			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x5a
> +			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x1a
> +		>;
> +	};
> +
> +	pinctrl_usdhc3_200mhz: usdhc3grp_200mhz {
> +		fsl,pins = <
> +			MX7D_PAD_SD3_CMD__SD3_CMD		0x5b
> +			MX7D_PAD_SD3_CLK__SD3_CLK		0x1b
> +			MX7D_PAD_SD3_DATA0__SD3_DATA0		0x5b
> +			MX7D_PAD_SD3_DATA1__SD3_DATA1		0x5b
> +			MX7D_PAD_SD3_DATA2__SD3_DATA2		0x5b
> +			MX7D_PAD_SD3_DATA3__SD3_DATA3		0x5b
> +			MX7D_PAD_SD3_DATA4__SD3_DATA4		0x5b
> +			MX7D_PAD_SD3_DATA5__SD3_DATA5		0x5b
> +			MX7D_PAD_SD3_DATA6__SD3_DATA6		0x5b
> +			MX7D_PAD_SD3_DATA7__SD3_DATA7		0x5b
> +			MX7D_PAD_SD3_RESET_B__SD3_RESET_B	0x1b
> +		>;
> +	};
> +};
> --
> 2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 2/8] arm: imx7s-warp: Add DT file hooks
  2019-01-03  1:44 ` [U-Boot] [PATCH 2/8] arm: imx7s-warp: Add DT file hooks Bryan O'Donoghue
@ 2019-01-08 13:18   ` Peng Fan
  0 siblings, 0 replies; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:18 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> Sent: 2019年1月3日 9:45
> To: u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> Albert Aribaud <albert.u.boot@aribaud.net>; Stefano Babic
> <sbabic@denx.de>
> Subject: [PATCH 2/8] arm: imx7s-warp: Add DT file hooks
> 
> This patch adds DT file hooks for imx7s-warp.dtb to the warp7 and
> warp7_bl33 builds.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/dts/Makefile        | 3 ++-
>  configs/warp7_bl33_defconfig | 3 ++-
>  configs/warp7_defconfig      | 3 ++-
>  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index
> dda4e59491..4fe7e90902 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -460,7 +460,8 @@ dtb-$(CONFIG_MX6ULL) += imx6ull-14x14-evk.dtb
> 
>  dtb-$(CONFIG_MX7) += imx7-colibri.dtb \
>  	imx7d-sdb.dtb \
> -	imx7d-sdb-qspi.dtb
> +	imx7d-sdb-qspi.dtb \
> +	imx7s-warp.dtb
> 
>  dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-evk.dtb
> 
> diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
> index a568c6d10e..12141fedd3 100644
> --- a/configs/warp7_bl33_defconfig
> +++ b/configs/warp7_bl33_defconfig
> @@ -20,6 +20,7 @@ CONFIG_CMD_EXT2=y
>  CONFIG_CMD_EXT4=y
>  CONFIG_CMD_EXT4_WRITE=y
>  CONFIG_CMD_FAT=y
> +CONFIG_OF_CONTROL=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_DFU_MMC=y
> @@ -37,5 +38,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
> CONFIG_USB_ETHER=y  CONFIG_USB_ETH_CDC=y
> CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
> -CONFIG_OF_LIBFDT=y
>  CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
> +CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
> 4d443295ba..fee98dfbbe 100644
> --- a/configs/warp7_defconfig
> +++ b/configs/warp7_defconfig
> @@ -29,6 +29,7 @@ CONFIG_CMD_EXT2=y
>  CONFIG_CMD_EXT4=y
>  CONFIG_CMD_EXT4_WRITE=y
>  CONFIG_CMD_FAT=y
> +CONFIG_OF_CONTROL=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_DFU_MMC=y
> @@ -47,8 +48,8 @@ CONFIG_USB_GADGET_DOWNLOAD=y
> CONFIG_USB_ETHER=y  CONFIG_USB_ETH_CDC=y
> CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
> -CONFIG_OF_LIBFDT=y
>  CONFIG_OPTEE_LOAD_ADDR=0x84000000
>  CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
>  CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
>  CONFIG_BOOTM_OPTEE=y
> +CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization
  2019-01-03  1:44 ` [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization Bryan O'Donoghue
@ 2019-01-08 13:22   ` Peng Fan
  2019-01-09 11:19     ` Bryan O'Donoghue
  0 siblings, 1 reply; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:22 UTC (permalink / raw)
  To: u-boot

Hi Bryan,

> -----Original Message-----
> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> Sent: 2019年1月3日 9:45
> To: u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> Albert Aribaud <albert.u.boot@aribaud.net>; Stefano Babic
> <sbabic@denx.de>
> Subject: [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization
> 
> Converts from fixed initialization of MMC to DM initialization of MMC.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/dts/imx7s-warp.dts  | 11 -----------
>  board/warp7/warp7.c          | 34 ----------------------------------
>  configs/warp7_bl33_defconfig |  1 +
>  configs/warp7_defconfig      |  1 +
>  4 files changed, 2 insertions(+), 45 deletions(-)
> 
> diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
> index c44db20734..615ed7ed80 100644
> --- a/arch/arm/dts/imx7s-warp.dts
> +++ b/arch/arm/dts/imx7s-warp.dts
> @@ -251,17 +251,6 @@
>  	status = "okay";
>  };
> 
> -&usdhc1 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&pinctrl_usdhc1>;
> -	bus-width = <4>;
> -	keep-power-in-suspend;
> -	no-1-8-v;
> -	non-removable;
> -	vmmc-supply = <&reg_brcm>;
> -	status = "okay";
> -};
> -

Why drop this node? Seems this is for SDIO wifi, Is there any issue if keep this node?

Regards,
Peng.

>  &usdhc3 {
>  	pinctrl-names = "default", "state_100mhz", "state_200mhz";
>  	pinctrl-0 = <&pinctrl_usdhc3>;
> diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index
> 3d32b3eb52..146d722b15 100644
> --- a/board/warp7/warp7.c
> +++ b/board/warp7/warp7.c
> @@ -30,8 +30,6 @@ DECLARE_GLOBAL_DATA_PTR;
> 
>  #define UART_PAD_CTRL  (PAD_CTL_DSE_3P3V_49OHM |
> PAD_CTL_PUS_PU100KOHM | \
>  			PAD_CTL_HYS)
> -#define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM |
> PAD_CTL_SRE_SLOW |	\
> -			PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM)
> 
>  #define I2C_PAD_CTRL	(PAD_CTL_DSE_3P3V_32OHM |
> PAD_CTL_SRE_SLOW | \
>  	PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM) @@
> -74,43 +72,11 @@ static iomux_v3_cfg_t const uart1_pads[] = {
>  	MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX |
> MUX_PAD_CTRL(UART_PAD_CTRL),  };
> 
> -static iomux_v3_cfg_t const usdhc3_pads[] = {
> -	MX7D_PAD_SD3_CLK__SD3_CLK     |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_CMD__SD3_CMD     |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA0__SD3_DATA0 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA1__SD3_DATA1 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA2__SD3_DATA2 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA3__SD3_DATA3 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA4__SD3_DATA4 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA5__SD3_DATA5 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA6__SD3_DATA6 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_DATA7__SD3_DATA7 |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX7D_PAD_SD3_RESET_B__SD3_RESET_B |
> MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -};
> -
>  static void setup_iomux_uart(void)
>  {
>  	imx_iomux_v3_setup_multiple_pads(uart1_pads,
> ARRAY_SIZE(uart1_pads));  };
> 
> -static struct fsl_esdhc_cfg usdhc_cfg[1] = {
> -	{USDHC3_BASE_ADDR},
> -};
> -
> -int board_mmc_getcd(struct mmc *mmc)
> -{
> -		/* Assume uSDHC3 emmc is always present */
> -		return 1;
> -}
> -
> -int board_mmc_init(bd_t *bis)
> -{
> -	imx_iomux_v3_setup_multiple_pads(usdhc3_pads,
> ARRAY_SIZE(usdhc3_pads));
> -	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
> -
> -	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
> -}
> -
>  int board_early_init_f(void)
>  {
>  	setup_iomux_uart();
> diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
> index 12141fedd3..b2f943c775 100644
> --- a/configs/warp7_bl33_defconfig
> +++ b/configs/warp7_bl33_defconfig
> @@ -24,6 +24,7 @@ CONFIG_OF_CONTROL=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_DFU_MMC=y
> +CONFIG_DM_MMC=y
>  CONFIG_FSL_ESDHC=y
>  CONFIG_USB=y
>  CONFIG_USB_EHCI_HCD=y
> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
> fee98dfbbe..65d801ffe2 100644
> --- a/configs/warp7_defconfig
> +++ b/configs/warp7_defconfig
> @@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_DFU_MMC=y
> +CONFIG_DM_MMC=y
>  CONFIG_FSL_ESDHC=y
>  CONFIG_OPTEE=y
>  CONFIG_USB=y
> --
> 2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports
  2019-01-03  1:44 ` [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports Bryan O'Donoghue
@ 2019-01-08 13:22   ` Peng Fan
  2019-01-08 13:26     ` Peng Fan
  0 siblings, 1 reply; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:22 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> Sent: 2019年1月3日 9:45
> To: u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> Stefano Babic <sbabic@denx.de>
> Subject: [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports
> 
> Switches on the IMX7 pinctrl driver for the warp7 and warp7_bl33 ports,
> necessary to convert over to DM for this board.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  configs/warp7_bl33_defconfig | 2 ++
>  configs/warp7_defconfig      | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
> index b2f943c775..a2c2555315 100644
> --- a/configs/warp7_bl33_defconfig
> +++ b/configs/warp7_bl33_defconfig
> @@ -41,3 +41,5 @@ CONFIG_USB_ETH_CDC=y
>  CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
>  CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
>  CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
> +CONFIG_PINCTRL=y
> +CONFIG_PINCTRL_IMX7=y
> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
> 65d801ffe2..8691d00491 100644
> --- a/configs/warp7_defconfig
> +++ b/configs/warp7_defconfig
> @@ -54,3 +54,5 @@ CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
>  CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
>  CONFIG_BOOTM_OPTEE=y
>  CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
> +CONFIG_PINCTRL=y
> +CONFIG_PINCTRL_IMX7=y

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports
  2019-01-08 13:22   ` Peng Fan
@ 2019-01-08 13:26     ` Peng Fan
  2019-01-09 11:22       ` Bryan O'Donoghue
  0 siblings, 1 reply; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:26 UTC (permalink / raw)
  To: u-boot


> 
> 
> > -----Original Message-----
> > From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> > Sent: 2019年1月3日 9:45
> > To: u-boot at lists.denx.de
> > Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> > <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> > Stefano Babic <sbabic@denx.de>
> > Subject: [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both
> > ports
> >
> > Switches on the IMX7 pinctrl driver for the warp7 and warp7_bl33
> > ports, necessary to convert over to DM for this board.
> >
> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > Cc: Peng Fan <peng.fan@nxp.com>
> > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> > ---
> >  configs/warp7_bl33_defconfig | 2 ++
> >  configs/warp7_defconfig      | 2 ++
> >  2 files changed, 4 insertions(+)
> >
> > diff --git a/configs/warp7_bl33_defconfig
> > b/configs/warp7_bl33_defconfig index b2f943c775..a2c2555315 100644
> > --- a/configs/warp7_bl33_defconfig
> > +++ b/configs/warp7_bl33_defconfig
> > @@ -41,3 +41,5 @@ CONFIG_USB_ETH_CDC=y
> > CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
> >  CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
> >  CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
> > +CONFIG_PINCTRL=y
> > +CONFIG_PINCTRL_IMX7=y
> > diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
> > 65d801ffe2..8691d00491 100644
> > --- a/configs/warp7_defconfig
> > +++ b/configs/warp7_defconfig
> > @@ -54,3 +54,5 @@ CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
> >  CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
> >  CONFIG_BOOTM_OPTEE=y
> >  CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
> > +CONFIG_PINCTRL=y
> > +CONFIG_PINCTRL_IMX7=y
> 
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

Just have a follow up question,
in patch 4/8, DM MMC is enabled, but in 5/8 pinctrl DM is enabled.
This might be not correct, the DM MMC/PINCTRL/GPIO needs to be in one patch.
The fsl_esdhc DM support does not support DM MMC with legacy iomux code.

Regards,
Peng.
> 
> > --
> > 2.20.0
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
> denx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7CPeng.Fan%40nxp.co
> m%7Cf6fbfc5331eb4328683308d6756c7489%7C686ea1d3bc2b4c6fa92cd99c
> 5c301635%7C0%7C0%7C636825506006750873&amp;sdata=iXlXGGewCrW%
> 2B4srkP4d%2BWnZ7UX2AyCK8Tgx93g3SpF8%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 7/8] warp7: defconfig: Switch to DM for I2C
  2019-01-03  1:44 ` [U-Boot] [PATCH 7/8] warp7: defconfig: Switch to DM for I2C Bryan O'Donoghue
@ 2019-01-08 13:28   ` Peng Fan
  0 siblings, 0 replies; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:28 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> Sent: 2019年1月3日 9:45
> To: u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> Stefano Babic <sbabic@denx.de>
> Subject: [PATCH 7/8] warp7: defconfig: Switch to DM for I2C
> 
> This commit switches to DM I2C for warp7 and warp7_bl33 defconfigs.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  board/warp7/warp7.c          | 24 ------------------------
>  configs/warp7_bl33_defconfig |  1 +
>  configs/warp7_defconfig      |  1 +
>  include/configs/warp7.h      |  2 --
>  4 files changed, 2 insertions(+), 26 deletions(-)
> 
> diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index
> 146d722b15..19f0df4d09 100644
> --- a/board/warp7/warp7.c
> +++ b/board/warp7/warp7.c
> @@ -31,26 +31,6 @@ DECLARE_GLOBAL_DATA_PTR;  #define
> UART_PAD_CTRL  (PAD_CTL_DSE_3P3V_49OHM |
> PAD_CTL_PUS_PU100KOHM | \
>  			PAD_CTL_HYS)
> 
> -#define I2C_PAD_CTRL	(PAD_CTL_DSE_3P3V_32OHM |
> PAD_CTL_SRE_SLOW | \
> -	PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM)
> -
> -#ifdef CONFIG_SYS_I2C_MXC
> -#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
> -/* I2C1 for PMIC */
> -static struct i2c_pads_info i2c_pad_info1 = {
> -	.scl = {
> -		.i2c_mode = MX7D_PAD_I2C1_SCL__I2C1_SCL | PC,
> -		.gpio_mode = MX7D_PAD_I2C1_SCL__GPIO4_IO8 | PC,
> -		.gp = IMX_GPIO_NR(4, 8),
> -	},
> -	.sda = {
> -		.i2c_mode = MX7D_PAD_I2C1_SDA__I2C1_SDA | PC,
> -		.gpio_mode = MX7D_PAD_I2C1_SDA__GPIO4_IO9 | PC,
> -		.gp = IMX_GPIO_NR(4, 9),
> -	},
> -};
> -#endif
> -
>  int dram_init(void)
>  {
>  	gd->ram_size = PHYS_SDRAM_SIZE;
> @@ -130,10 +110,6 @@ int board_init(void)
>  	/* address of boot parameters */
>  	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
> 
> -	#ifdef CONFIG_SYS_I2C_MXC
> -		setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
> -	#endif
> -
>  	return 0;
>  }
> 
> diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
> index 7f21bb4f53..2e80011cbc 100644
> --- a/configs/warp7_bl33_defconfig
> +++ b/configs/warp7_bl33_defconfig
> @@ -44,3 +44,4 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
>  CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX7=y
>  CONFIG_DM_GPIO=y
> +CONFIG_DM_I2C=y
> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
> 2d3171e42a..9f7dc73a11 100644
> --- a/configs/warp7_defconfig
> +++ b/configs/warp7_defconfig
> @@ -57,3 +57,4 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
>  CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX7=y
>  CONFIG_DM_GPIO=y
> +CONFIG_DM_I2C=y
> diff --git a/include/configs/warp7.h b/include/configs/warp7.h index
> a391dfb5c1..41eb8d7e1d 100644
> --- a/include/configs/warp7.h
> +++ b/include/configs/warp7.h
> @@ -126,9 +126,7 @@
>  	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
> 
>  /* I2C configs */
> -#define CONFIG_SYS_I2C
>  #define CONFIG_SYS_I2C_MXC
> -#define CONFIG_SYS_I2C_MXC_I2C1
>  #define CONFIG_SYS_I2C_SPEED		100000
> 

Reviewed-by: Peng Fan <peng.fan@nxp.com>

>  /* PMIC */
> --
> 2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC
  2019-01-03  1:44 ` [U-Boot] [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC Bryan O'Donoghue
@ 2019-01-08 13:29   ` Peng Fan
  0 siblings, 0 replies; 20+ messages in thread
From: Peng Fan @ 2019-01-08 13:29 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
> Sent: 2019年1月3日 9:45
> To: u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
> Stefano Babic <sbabic@denx.de>
> Subject: [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC
> 
> This patch converts the warp7 and warp7_bl33 board ports over to using the
> DM PMIC model.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  board/warp7/warp7.c          | 27 +++++++++++----------------
>  configs/warp7_bl33_defconfig |  6 ++++++
>  configs/warp7_defconfig      |  6 ++++++
>  include/configs/warp7.h      |  6 ------
>  4 files changed, 23 insertions(+), 22 deletions(-)
> 
> diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index
> 19f0df4d09..6ebeb08e33 100644
> --- a/board/warp7/warp7.c
> +++ b/board/warp7/warp7.c
> @@ -64,29 +64,24 @@ int board_early_init_f(void)
>  	return 0;
>  }
> 
> -#ifdef CONFIG_POWER
> -#define I2C_PMIC       0
> -static struct pmic *pfuze;
> +#ifdef CONFIG_DM_PMIC
>  int power_init_board(void)
>  {
> -	int ret;
> -	unsigned int reg, rev_id;
> +	struct udevice *dev;
> +	int ret, dev_id, rev_id;
> 
> -	ret = power_pfuze3000_init(I2C_PMIC);
> -	if (ret)
> +	ret = pmic_get("pfuze3000", &dev);
> +	if (ret == -ENODEV)
> +		return 0;
> +	if (ret != 0)
>  		return ret;
> 
> -	pfuze = pmic_get("PFUZE3000");
> -	ret = pmic_probe(pfuze);
> -	if (ret)
> -		return ret;
> -
> -	pmic_reg_read(pfuze, PFUZE3000_DEVICEID, &reg);
> -	pmic_reg_read(pfuze, PFUZE3000_REVID, &rev_id);
> -	printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", reg, rev_id);
> +	dev_id = pmic_reg_read(dev, PFUZE3000_DEVICEID);
> +	rev_id = pmic_reg_read(dev, PFUZE3000_REVID);
> +	printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", dev_id,
> rev_id);
> 
>  	/* disable Low Power Mode during standby mode */
> -	pmic_reg_write(pfuze, PFUZE3000_LDOGCTL, 0x1);
> +	pmic_clrsetbits(dev, PFUZE3000_LDOGCTL, 0, 1);
> 
>  	return 0;
>  }
> diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
> index 2e80011cbc..7b40bfbd6d 100644
> --- a/configs/warp7_bl33_defconfig
> +++ b/configs/warp7_bl33_defconfig
> @@ -45,3 +45,9 @@ CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX7=y
>  CONFIG_DM_GPIO=y
>  CONFIG_DM_I2C=y
> +CONFIG_DM_PMIC=y
> +CONFIG_DM_PMIC_PFUZE100=y
> +CONFIG_DM_REGULATOR=y
> +CONFIG_DM_REGULATOR_PFUZE100=y
> +CONFIG_DM_REGULATOR_FIXED=y
> +CONFIG_DM_REGULATOR_GPIO=y
> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
> 9f7dc73a11..d1c8e403a7 100644
> --- a/configs/warp7_defconfig
> +++ b/configs/warp7_defconfig
> @@ -58,3 +58,9 @@ CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX7=y
>  CONFIG_DM_GPIO=y
>  CONFIG_DM_I2C=y
> +CONFIG_DM_PMIC=y
> +CONFIG_DM_PMIC_PFUZE100=y
> +CONFIG_DM_REGULATOR=y
> +CONFIG_DM_REGULATOR_PFUZE100=y
> +CONFIG_DM_REGULATOR_FIXED=y
> +CONFIG_DM_REGULATOR_GPIO=y
> diff --git a/include/configs/warp7.h b/include/configs/warp7.h index
> 41eb8d7e1d..043f2861b6 100644
> --- a/include/configs/warp7.h
> +++ b/include/configs/warp7.h
> @@ -129,12 +129,6 @@
>  #define CONFIG_SYS_I2C_MXC
>  #define CONFIG_SYS_I2C_SPEED		100000
> 
> -/* PMIC */
> -#define CONFIG_POWER
> -#define CONFIG_POWER_I2C
> -#define CONFIG_POWER_PFUZE3000
> -#define CONFIG_POWER_PFUZE3000_I2C_ADDR	0x08
> -
>  /* environment organization */
>  #define CONFIG_ENV_SIZE			SZ_8K
> 

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.20.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization
  2019-01-08 13:22   ` Peng Fan
@ 2019-01-09 11:19     ` Bryan O'Donoghue
  0 siblings, 0 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-09 11:19 UTC (permalink / raw)
  To: u-boot



On 08/01/2019 13:22, Peng Fan wrote:
> Hi Bryan,
> 
>> -----Original Message-----
>> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
>> Sent: 2019年1月3日 9:45
>> To: u-boot at lists.denx.de
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
>> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
>> Albert Aribaud <albert.u.boot@aribaud.net>; Stefano Babic
>> <sbabic@denx.de>
>> Subject: [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization
>>
>> Converts from fixed initialization of MMC to DM initialization of MMC.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
>> Cc: Peng Fan <peng.fan@nxp.com>
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> ---
>>   arch/arm/dts/imx7s-warp.dts  | 11 -----------
>>   board/warp7/warp7.c          | 34 ----------------------------------
>>   configs/warp7_bl33_defconfig |  1 +
>>   configs/warp7_defconfig      |  1 +
>>   4 files changed, 2 insertions(+), 45 deletions(-)
>>
>> diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
>> index c44db20734..615ed7ed80 100644
>> --- a/arch/arm/dts/imx7s-warp.dts
>> +++ b/arch/arm/dts/imx7s-warp.dts
>> @@ -251,17 +251,6 @@
>>   	status = "okay";
>>   };
>>
>> -&usdhc1 {
>> -	pinctrl-names = "default";
>> -	pinctrl-0 = <&pinctrl_usdhc1>;
>> -	bus-width = <4>;
>> -	keep-power-in-suspend;
>> -	no-1-8-v;
>> -	non-removable;
>> -	vmmc-supply = <&reg_brcm>;
>> -	status = "okay";
>> -};
>> -
> 
> Why drop this node? Seems this is for SDIO wifi, Is there any issue if keep this node?


Actually no, we can keep it since we use an alias to conjoin usdhc3 to 
mmc0 later on.

I'll do that.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports
  2019-01-08 13:26     ` Peng Fan
@ 2019-01-09 11:22       ` Bryan O'Donoghue
  0 siblings, 0 replies; 20+ messages in thread
From: Bryan O'Donoghue @ 2019-01-09 11:22 UTC (permalink / raw)
  To: u-boot



On 08/01/2019 13:26, Peng Fan wrote:
> 
>>
>>
>>> -----Original Message-----
>>> From: Bryan O'Donoghue [mailto:bryan.odonoghue at linaro.org]
>>> Sent: 2019年1月3日 9:45
>>> To: u-boot at lists.denx.de
>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
>>> <peng.fan@nxp.com>; Bryan O'Donoghue <bryan.odonoghue@linaro.org>;
>>> Stefano Babic <sbabic@denx.de>
>>> Subject: [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both
>>> ports
>>>
>>> Switches on the IMX7 pinctrl driver for the warp7 and warp7_bl33
>>> ports, necessary to convert over to DM for this board.
>>>
>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>> Cc: Peng Fan <peng.fan@nxp.com>
>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> ---
>>>   configs/warp7_bl33_defconfig | 2 ++
>>>   configs/warp7_defconfig      | 2 ++
>>>   2 files changed, 4 insertions(+)
>>>
>>> diff --git a/configs/warp7_bl33_defconfig
>>> b/configs/warp7_bl33_defconfig index b2f943c775..a2c2555315 100644
>>> --- a/configs/warp7_bl33_defconfig
>>> +++ b/configs/warp7_bl33_defconfig
>>> @@ -41,3 +41,5 @@ CONFIG_USB_ETH_CDC=y
>>> CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
>>>   CONFIG_OPTEE_TZDRAM_SIZE=0x2000000
>>>   CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
>>> +CONFIG_PINCTRL=y
>>> +CONFIG_PINCTRL_IMX7=y
>>> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index
>>> 65d801ffe2..8691d00491 100644
>>> --- a/configs/warp7_defconfig
>>> +++ b/configs/warp7_defconfig
>>> @@ -54,3 +54,5 @@ CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
>>>   CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
>>>   CONFIG_BOOTM_OPTEE=y
>>>   CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp"
>>> +CONFIG_PINCTRL=y
>>> +CONFIG_PINCTRL_IMX7=y
>>
>> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> 
> Just have a follow up question,
> in patch 4/8, DM MMC is enabled, but in 5/8 pinctrl DM is enabled.
> This might be not correct, the DM MMC/PINCTRL/GPIO needs to be in one patch.
> The fsl_esdhc DM support does not support DM MMC with legacy iomux code.

Hmm.

OK, then I'll squash these.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-01-09 11:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03  1:44 [U-Boot] [PATCH 0/8] Convert i.MX7 WaRP7 ports to DM Bryan O'Donoghue
2019-01-03  1:44 ` [U-Boot] [PATCH 1/8] arm: dts: imx7s-warp: Import Linux warp7 dts Bryan O'Donoghue
2019-01-04  0:46   ` Auer, Lukas
2019-01-04 10:37     ` Bryan O'Donoghue
2019-01-08 13:16   ` Peng Fan
2019-01-03  1:44 ` [U-Boot] [PATCH 2/8] arm: imx7s-warp: Add DT file hooks Bryan O'Donoghue
2019-01-08 13:18   ` Peng Fan
2019-01-03  1:44 ` [U-Boot] [PATCH 3/8] arm: imx7s-warp: Convert to DM MMC initialization Bryan O'Donoghue
2019-01-08 13:22   ` Peng Fan
2019-01-09 11:19     ` Bryan O'Donoghue
2019-01-03  1:44 ` [U-Boot] [PATCH 4/8] arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3 Bryan O'Donoghue
2019-01-03  1:44 ` [U-Boot] [PATCH 5/8] warp7: defconfig: Switch on IMX7 pinctrl for both ports Bryan O'Donoghue
2019-01-08 13:22   ` Peng Fan
2019-01-08 13:26     ` Peng Fan
2019-01-09 11:22       ` Bryan O'Donoghue
2019-01-03  1:44 ` [U-Boot] [PATCH 6/8] warp7: defconfig: Switch on DM GPIO for both warp7 ports Bryan O'Donoghue
2019-01-03  1:44 ` [U-Boot] [PATCH 7/8] warp7: defconfig: Switch to DM for I2C Bryan O'Donoghue
2019-01-08 13:28   ` Peng Fan
2019-01-03  1:44 ` [U-Boot] [PATCH 8/8] arm: imx7s-warp: Convert to DM PMIC Bryan O'Donoghue
2019-01-08 13:29   ` Peng Fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.