linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1 0/4] Bx50v3 DT improvements
@ 2021-02-23 18:33 Sebastian Reichel
  2021-02-23 18:33 ` [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO Sebastian Reichel
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Sebastian Reichel @ 2021-02-23 18:33 UTC (permalink / raw)
  To: Sebastian Reichel, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Rob Herring, devicetree, linux-arm-kernel, linux-kernel, kernel

Hi,

These are a bunch of small unrelated improvements for the GE Bx50v3
device tree (and BA16 system on module, which is currently only used
by Bx50v3).

Thanks for reviewing/merging them,

-- Sebastian

Ian Ray (1):
  ARM: dts: imx: bx50v3: Define GPIO line names

Sebastian Reichel (3):
  ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO
  ARM: dts: imx: ba16: improve PHY information
  ARM: dts: imx: bx50v3: i2c GPIOs are open drain

 arch/arm/boot/dts/imx6q-b450v3.dts  |  5 +++++
 arch/arm/boot/dts/imx6q-b650v3.dts  |  5 +++++
 arch/arm/boot/dts/imx6q-b850v3.dts  |  5 +++++
 arch/arm/boot/dts/imx6q-ba16.dtsi   | 22 ++++++++++++++++++++++
 arch/arm/boot/dts/imx6q-bx50v3.dtsi | 12 ++++++------
 5 files changed, 43 insertions(+), 6 deletions(-)

-- 
2.30.0


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

* [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO
  2021-02-23 18:33 [PATCHv1 0/4] Bx50v3 DT improvements Sebastian Reichel
@ 2021-02-23 18:33 ` Sebastian Reichel
  2021-03-08  0:35   ` Shawn Guo
  2021-02-23 18:33 ` [PATCHv1 2/4] ARM: dts: imx: ba16: improve PHY information Sebastian Reichel
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Sebastian Reichel @ 2021-02-23 18:33 UTC (permalink / raw)
  To: Sebastian Reichel, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Rob Herring, devicetree, linux-arm-kernel, linux-kernel, kernel

Add VBUS regulator GPIO information, so that USB OTG port can
also be used in host mode.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm/boot/dts/imx6q-ba16.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-ba16.dtsi b/arch/arm/boot/dts/imx6q-ba16.dtsi
index e4578ed3371e..4793ef5171aa 100644
--- a/arch/arm/boot/dts/imx6q-ba16.dtsi
+++ b/arch/arm/boot/dts/imx6q-ba16.dtsi
@@ -124,6 +124,10 @@ reg_usb_otg_vbus: regulator-usbotgvbus {
 		regulator-name = "usb_otg_vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
+
+		pinctrl-0 = <&pinctrl_usbotg_vbus>;
+		gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
 	};
 };
 
@@ -575,6 +579,12 @@ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
 		>;
 	};
 
+	pinctrl_usbotg_vbus: usbotgvbusgrp {
+		fsl,pins = <
+			MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x000b0
+		>;
+	};
+
 	pinctrl_usdhc2: usdhc2grp {
 		fsl,pins = <
 			MX6QDL_PAD_SD2_CMD__SD2_CMD	0x17059
-- 
2.30.0


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

* [PATCHv1 2/4] ARM: dts: imx: ba16: improve PHY information
  2021-02-23 18:33 [PATCHv1 0/4] Bx50v3 DT improvements Sebastian Reichel
  2021-02-23 18:33 ` [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO Sebastian Reichel
@ 2021-02-23 18:33 ` Sebastian Reichel
  2021-03-08  0:38   ` Shawn Guo
  2021-02-23 18:33 ` [PATCHv1 3/4] ARM: dts: imx: bx50v3: i2c GPIOs are open drain Sebastian Reichel
  2021-02-23 18:33 ` [PATCHv1 4/4] ARM: dts: imx: bx50v3: Define GPIO line names Sebastian Reichel
  3 siblings, 1 reply; 7+ messages in thread
From: Sebastian Reichel @ 2021-02-23 18:33 UTC (permalink / raw)
  To: Sebastian Reichel, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Rob Herring, devicetree, linux-arm-kernel, linux-kernel, kernel

Add PHY voltage supply information fixing the following kernel message:

2188000.ethernet supply phy not found, using dummy regulator

Also add PHY clock information to avoid depending on the bootloader
programming correct values.

The bootloader also sets some reserved registers in the PHY as
advised by Qualcomm, which is not supported by the bindings/kernel
driver, so the reset GPIO has not been added intentionally.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm/boot/dts/imx6q-ba16.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-ba16.dtsi b/arch/arm/boot/dts/imx6q-ba16.dtsi
index 4793ef5171aa..a684d999e605 100644
--- a/arch/arm/boot/dts/imx6q-ba16.dtsi
+++ b/arch/arm/boot/dts/imx6q-ba16.dtsi
@@ -177,6 +177,18 @@ &fec {
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rgmii-id";
 	status = "okay";
+	phy-supply = <&reg_3p3v>;
+	phy-handle = <&phy0>;
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		phy0: ethernet-phy@4 {
+			reg = <4>;
+			qca,clk-out-frequency = <125000000>;
+		};
+	};
 };
 
 &hdmi {
-- 
2.30.0


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

* [PATCHv1 3/4] ARM: dts: imx: bx50v3: i2c GPIOs are open drain
  2021-02-23 18:33 [PATCHv1 0/4] Bx50v3 DT improvements Sebastian Reichel
  2021-02-23 18:33 ` [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO Sebastian Reichel
  2021-02-23 18:33 ` [PATCHv1 2/4] ARM: dts: imx: ba16: improve PHY information Sebastian Reichel
@ 2021-02-23 18:33 ` Sebastian Reichel
  2021-02-23 18:33 ` [PATCHv1 4/4] ARM: dts: imx: bx50v3: Define GPIO line names Sebastian Reichel
  3 siblings, 0 replies; 7+ messages in thread
From: Sebastian Reichel @ 2021-02-23 18:33 UTC (permalink / raw)
  To: Sebastian Reichel, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Rob Herring, devicetree, linux-arm-kernel, linux-kernel, kernel

Explicitly mark I2C GPIOs as open drain to fix the following
kernel message being printed:

enforced open drain please flag it properly in DT/ACPI DSDT/board file

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm/boot/dts/imx6q-bx50v3.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/imx6q-bx50v3.dtsi b/arch/arm/boot/dts/imx6q-bx50v3.dtsi
index 2a98cc657595..10922375c51e 100644
--- a/arch/arm/boot/dts/imx6q-bx50v3.dtsi
+++ b/arch/arm/boot/dts/imx6q-bx50v3.dtsi
@@ -173,8 +173,8 @@ m25_eeprom: m25p80@0 {
 &i2c1 {
 	pinctrl-names = "default", "gpio";
 	pinctrl-1 = <&pinctrl_i2c1_gpio>;
-	sda-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>;
-	scl-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
+	sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 
 	pca9547: mux@70 {
 		compatible = "nxp,pca9547";
@@ -315,15 +315,15 @@ mux1_i2c8: i2c@7 {
 &i2c2 {
 	pinctrl-names = "default", "gpio";
 	pinctrl-1 = <&pinctrl_i2c2_gpio>;
-	sda-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
-	scl-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+	sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 };
 
 &i2c3 {
 	pinctrl-names = "default", "gpio";
 	pinctrl-1 = <&pinctrl_i2c3_gpio>;
-	sda-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
-	scl-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+	sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	scl-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 };
 
 &iomuxc {
-- 
2.30.0


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

* [PATCHv1 4/4] ARM: dts: imx: bx50v3: Define GPIO line names
  2021-02-23 18:33 [PATCHv1 0/4] Bx50v3 DT improvements Sebastian Reichel
                   ` (2 preceding siblings ...)
  2021-02-23 18:33 ` [PATCHv1 3/4] ARM: dts: imx: bx50v3: i2c GPIOs are open drain Sebastian Reichel
@ 2021-02-23 18:33 ` Sebastian Reichel
  3 siblings, 0 replies; 7+ messages in thread
From: Sebastian Reichel @ 2021-02-23 18:33 UTC (permalink / raw)
  To: Sebastian Reichel, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Rob Herring, devicetree, linux-arm-kernel, linux-kernel, kernel, Ian Ray

From: Ian Ray <ian.ray@ge.com>

Define GPIO line names for b450v3, b650v3, and b850v3.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm/boot/dts/imx6q-b450v3.dts | 5 +++++
 arch/arm/boot/dts/imx6q-b650v3.dts | 5 +++++
 arch/arm/boot/dts/imx6q-b850v3.dts | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-b450v3.dts b/arch/arm/boot/dts/imx6q-b450v3.dts
index 604f2420370f..d994b32ad825 100644
--- a/arch/arm/boot/dts/imx6q-b450v3.dts
+++ b/arch/arm/boot/dts/imx6q-b450v3.dts
@@ -84,6 +84,11 @@ lvds0_out: endpoint {
 };
 
 &pca9539 {
+	gpio-line-names = "AMB_P_INT1#", "AMB_P_INT2#", "BT_EN", "WLAN_EN",
+			  "", "SM_D_ACT", "DP1_RST#", "",
+			  "WD15S_EN", "WD15S_DIS#", "", "",
+			  "", "", "", "";
+
 	P04-hog {
 		gpio-hog;
 		gpios = <4 0>;
diff --git a/arch/arm/boot/dts/imx6q-b650v3.dts b/arch/arm/boot/dts/imx6q-b650v3.dts
index 56d2aeb1900c..fa1a1df37cde 100644
--- a/arch/arm/boot/dts/imx6q-b650v3.dts
+++ b/arch/arm/boot/dts/imx6q-b650v3.dts
@@ -84,6 +84,11 @@ lvds0_out: endpoint {
 };
 
 &pca9539 {
+	gpio-line-names = "AMB_P_INT1#", "AMB_P_INT2#", "BT_EN", "WLAN_EN",
+			  "", "SM_D_ACT", "DP1_RST#", "",
+			  "WD15S_EN", "WD15S_DIS#", "", "",
+			  "", "", "", "";
+
 	P07-hog {
 		gpio-hog;
 		gpios = <7 0>;
diff --git a/arch/arm/boot/dts/imx6q-b850v3.dts b/arch/arm/boot/dts/imx6q-b850v3.dts
index 3d6b757bf325..db8c332df6a1 100644
--- a/arch/arm/boot/dts/imx6q-b850v3.dts
+++ b/arch/arm/boot/dts/imx6q-b850v3.dts
@@ -199,6 +199,11 @@ stdp4028_out: endpoint {
 };
 
 &pca9539 {
+	gpio-line-names = "AMB_P_INT1#", "AMB_P_INT2#", "BT_EN", "WLAN_EN",
+			  "REMOTE_ON_PML#", "SM_D_ACT", "DP1_RST#", "DP2_RST#",
+			  "", "", "", "",
+			  "", "", "", "";
+
 	P10-hog {
 		gpio-hog;
 		gpios = <8 0>;
-- 
2.30.0


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

* Re: [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO
  2021-02-23 18:33 ` [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO Sebastian Reichel
@ 2021-03-08  0:35   ` Shawn Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2021-03-08  0:35 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, kernel

On Tue, Feb 23, 2021 at 07:33:43PM +0100, Sebastian Reichel wrote:
> Add VBUS regulator GPIO information, so that USB OTG port can
> also be used in host mode.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

'ARM: dts: imx6q-ba16: ' this style for prefix maybe?

> ---
>  arch/arm/boot/dts/imx6q-ba16.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6q-ba16.dtsi b/arch/arm/boot/dts/imx6q-ba16.dtsi
> index e4578ed3371e..4793ef5171aa 100644
> --- a/arch/arm/boot/dts/imx6q-ba16.dtsi
> +++ b/arch/arm/boot/dts/imx6q-ba16.dtsi
> @@ -124,6 +124,10 @@ reg_usb_otg_vbus: regulator-usbotgvbus {
>  		regulator-name = "usb_otg_vbus";
>  		regulator-min-microvolt = <5000000>;
>  		regulator-max-microvolt = <5000000>;
> +

This is newline is not necessary.

Shawn

> +		pinctrl-0 = <&pinctrl_usbotg_vbus>;
> +		gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
>  	};
>  };
>  
> @@ -575,6 +579,12 @@ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
>  		>;
>  	};
>  
> +	pinctrl_usbotg_vbus: usbotgvbusgrp {
> +		fsl,pins = <
> +			MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x000b0
> +		>;
> +	};
> +
>  	pinctrl_usdhc2: usdhc2grp {
>  		fsl,pins = <
>  			MX6QDL_PAD_SD2_CMD__SD2_CMD	0x17059
> -- 
> 2.30.0
> 

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

* Re: [PATCHv1 2/4] ARM: dts: imx: ba16: improve PHY information
  2021-02-23 18:33 ` [PATCHv1 2/4] ARM: dts: imx: ba16: improve PHY information Sebastian Reichel
@ 2021-03-08  0:38   ` Shawn Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2021-03-08  0:38 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, kernel

On Tue, Feb 23, 2021 at 07:33:44PM +0100, Sebastian Reichel wrote:
> Add PHY voltage supply information fixing the following kernel message:
> 
> 2188000.ethernet supply phy not found, using dummy regulator
> 
> Also add PHY clock information to avoid depending on the bootloader
> programming correct values.
> 
> The bootloader also sets some reserved registers in the PHY as
> advised by Qualcomm, which is not supported by the bindings/kernel
> driver, so the reset GPIO has not been added intentionally.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  arch/arm/boot/dts/imx6q-ba16.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6q-ba16.dtsi b/arch/arm/boot/dts/imx6q-ba16.dtsi
> index 4793ef5171aa..a684d999e605 100644
> --- a/arch/arm/boot/dts/imx6q-ba16.dtsi
> +++ b/arch/arm/boot/dts/imx6q-ba16.dtsi
> @@ -177,6 +177,18 @@ &fec {
>  	pinctrl-0 = <&pinctrl_enet>;
>  	phy-mode = "rgmii-id";
>  	status = "okay";
> +	phy-supply = <&reg_3p3v>;
> +	phy-handle = <&phy0>;

Please keep 'status' at end.

Shawn

> +
> +	mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		phy0: ethernet-phy@4 {
> +			reg = <4>;
> +			qca,clk-out-frequency = <125000000>;
> +		};
> +	};
>  };
>  
>  &hdmi {
> -- 
> 2.30.0
> 

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

end of thread, other threads:[~2021-03-08  0:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 18:33 [PATCHv1 0/4] Bx50v3 DT improvements Sebastian Reichel
2021-02-23 18:33 ` [PATCHv1 1/4] ARM: dts: imx: ba16: add USB OTG VBUS enable GPIO Sebastian Reichel
2021-03-08  0:35   ` Shawn Guo
2021-02-23 18:33 ` [PATCHv1 2/4] ARM: dts: imx: ba16: improve PHY information Sebastian Reichel
2021-03-08  0:38   ` Shawn Guo
2021-02-23 18:33 ` [PATCHv1 3/4] ARM: dts: imx: bx50v3: i2c GPIOs are open drain Sebastian Reichel
2021-02-23 18:33 ` [PATCHv1 4/4] ARM: dts: imx: bx50v3: Define GPIO line names Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).