Re: [PATCH 1/4] ARM: dts: imx53: add ethernet PHY supply regulator

2016-02-01 Thread Shawn Guo
On Wed, Jan 20, 2016 at 02:09:19PM +0100, Lothar Waßmann wrote:
> Signed-off-by: Lothar Waßmann 
> ---
>  arch/arm/boot/dts/imx53-tx53.dtsi | 40 
> ++-
>  1 file changed, 31 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx53-tx53.dtsi 
> b/arch/arm/boot/dts/imx53-tx53.dtsi
> index d3e50b2..8f08389 100644
> --- a/arch/arm/boot/dts/imx53-tx53.dtsi
> +++ b/arch/arm/boot/dts/imx53-tx53.dtsi
> @@ -87,9 +87,20 @@
>   regulator-max-microvolt = <330>;
>   };
>  
> - reg_can_xcvr: regulator@2 {
> + reg_3v3_etn: regulator@2 {

Why cannot this be added as regulator@5 to avoid changing every node?

>   compatible = "regulator-fixed";
>   reg = <2>;
> + regulator-name = "ETN 3V3";
> + regulator-min-microvolt = <330>;
> + regulator-max-microvolt = <330>;
> + pinctrl-names = "default";
> + pinctrl-0 = <_etn_phy>;
> + gpio = < 20 GPIO_ACTIVE_HIGH>;
> + };
> +
> + reg_can_xcvr: regulator@3 {
> + compatible = "regulator-fixed";
> + reg = <3>;
>   regulator-name = "CAN XCVR";
>   regulator-min-microvolt = <330>;
>   regulator-max-microvolt = <330>;
> @@ -98,9 +109,9 @@
>   gpio = < 21 GPIO_ACTIVE_HIGH>;
>   };
>  
> - reg_usbh1_vbus: regulator@3 {
> + reg_usbh1_vbus: regulator@4 {
>   compatible = "regulator-fixed";
> - reg = <3>;
> + reg = <4>;
>   regulator-name = "usbh1_vbus";
>   regulator-min-microvolt = <500>;
>   regulator-max-microvolt = <500>;
> @@ -110,9 +121,9 @@
>   enable-active-high;
>   };
>  
> - reg_usbotg_vbus: regulator@4 {
> + reg_usbotg_vbus: regulator@5 {
>   compatible = "regulator-fixed";
> - reg = <4>;
> + reg = <5>;
>   regulator-name = "usbotg_vbus";
>   regulator-min-microvolt = <500>;
>   regulator-max-microvolt = <500>;
> @@ -204,13 +215,20 @@
>   phy-mode = "rmii";
>   phy-reset-gpios = < 6 GPIO_ACTIVE_HIGH>;
>   phy-handle = <>;
> + phy-supply = <_3v3_etn>;
>   mac-address = []; /* placeholder; will be overwritten by 
> bootloader */
>   status = "okay";
>  
> - phy0: ethernet-phy@0 {
> - interrupt-parent = <>;
> - interrupts = <4>;
> - device_type = "ethernet-phy";
> + mdio {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + phy0: ethernet-phy@0 {
> + compatible = "ethernet-phy-id0007.c0f1", 
> "ethernet-phy-ieee802.3-c22";
> + reg = <0>;
> + interrupt-parent = <>;
> + interrupts = <4>;
> + };

This should be a separate change.

Shawn

>   };
>  };
>  
> @@ -309,6 +327,10 @@
>   fsl,pins = ; /* 
> Flexcan XCVR enable */
>   };
>  
> + pinctrl_etn_phy: etn-phygrp {
> + fsl,pins = ; /* ETN 
> PHY Power enable */
> + };
> +
>   pinctrl_ds1339: ds1339grp {
>   fsl,pins = ;
>   };
> -- 
> 2.1.4
> 
> 


Re: [PATCH 1/4] ARM: dts: imx53: add ethernet PHY supply regulator

2016-02-01 Thread Shawn Guo
On Wed, Jan 20, 2016 at 02:09:19PM +0100, Lothar Waßmann wrote:
> Signed-off-by: Lothar Waßmann 
> ---
>  arch/arm/boot/dts/imx53-tx53.dtsi | 40 
> ++-
>  1 file changed, 31 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx53-tx53.dtsi 
> b/arch/arm/boot/dts/imx53-tx53.dtsi
> index d3e50b2..8f08389 100644
> --- a/arch/arm/boot/dts/imx53-tx53.dtsi
> +++ b/arch/arm/boot/dts/imx53-tx53.dtsi
> @@ -87,9 +87,20 @@
>   regulator-max-microvolt = <330>;
>   };
>  
> - reg_can_xcvr: regulator@2 {
> + reg_3v3_etn: regulator@2 {

Why cannot this be added as regulator@5 to avoid changing every node?

>   compatible = "regulator-fixed";
>   reg = <2>;
> + regulator-name = "ETN 3V3";
> + regulator-min-microvolt = <330>;
> + regulator-max-microvolt = <330>;
> + pinctrl-names = "default";
> + pinctrl-0 = <_etn_phy>;
> + gpio = < 20 GPIO_ACTIVE_HIGH>;
> + };
> +
> + reg_can_xcvr: regulator@3 {
> + compatible = "regulator-fixed";
> + reg = <3>;
>   regulator-name = "CAN XCVR";
>   regulator-min-microvolt = <330>;
>   regulator-max-microvolt = <330>;
> @@ -98,9 +109,9 @@
>   gpio = < 21 GPIO_ACTIVE_HIGH>;
>   };
>  
> - reg_usbh1_vbus: regulator@3 {
> + reg_usbh1_vbus: regulator@4 {
>   compatible = "regulator-fixed";
> - reg = <3>;
> + reg = <4>;
>   regulator-name = "usbh1_vbus";
>   regulator-min-microvolt = <500>;
>   regulator-max-microvolt = <500>;
> @@ -110,9 +121,9 @@
>   enable-active-high;
>   };
>  
> - reg_usbotg_vbus: regulator@4 {
> + reg_usbotg_vbus: regulator@5 {
>   compatible = "regulator-fixed";
> - reg = <4>;
> + reg = <5>;
>   regulator-name = "usbotg_vbus";
>   regulator-min-microvolt = <500>;
>   regulator-max-microvolt = <500>;
> @@ -204,13 +215,20 @@
>   phy-mode = "rmii";
>   phy-reset-gpios = < 6 GPIO_ACTIVE_HIGH>;
>   phy-handle = <>;
> + phy-supply = <_3v3_etn>;
>   mac-address = []; /* placeholder; will be overwritten by 
> bootloader */
>   status = "okay";
>  
> - phy0: ethernet-phy@0 {
> - interrupt-parent = <>;
> - interrupts = <4>;
> - device_type = "ethernet-phy";
> + mdio {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + phy0: ethernet-phy@0 {
> + compatible = "ethernet-phy-id0007.c0f1", 
> "ethernet-phy-ieee802.3-c22";
> + reg = <0>;
> + interrupt-parent = <>;
> + interrupts = <4>;
> + };

This should be a separate change.

Shawn

>   };
>  };
>  
> @@ -309,6 +327,10 @@
>   fsl,pins = ; /* 
> Flexcan XCVR enable */
>   };
>  
> + pinctrl_etn_phy: etn-phygrp {
> + fsl,pins = ; /* ETN 
> PHY Power enable */
> + };
> +
>   pinctrl_ds1339: ds1339grp {
>   fsl,pins = ;
>   };
> -- 
> 2.1.4
> 
>