How to reconfigure ETH0/1 in imx6ull-14x14-evk.dts?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to reconfigure ETH0/1 in imx6ull-14x14-evk.dts?

ソリューションへジャンプ
5,668件の閲覧回数
chris_f
Contributor V

The EVK base board has control lines for ENET2 shared with ECSPI4. I'm using ECSPI4 to control an LCD so would like to disable ENET2 in the DTS but have ENET1 configured and working. Could someone shed some light on the ethernet configuration in the dts file? I've included what I think are the relevant lines below. How do I change this to have one ethernet port ETH0 that uses the ENET1 peripheral?

&fec1 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_enet1>;
   phy-mode = "rmii";
   phy-handle = <&ethphy0>;
   status = "okay";
};

&fec2 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_enet2>;
   phy-mode = "rmii";
   phy-handle = <&ethphy1>;
   status = "okay";

   mdio {
      #address-cells = <1>;
      #size-cells = <0>;

      ethphy0: ethernet-phy@2 {
         compatible = "ethernet-phy-ieee802.3-c22";
         reg = <2>;
      };

      ethphy1: ethernet-phy@1 {
         compatible = "ethernet-phy-ieee802.3-c22";
         reg = <1>;
         };
      };
};

...

&iomuxc {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_hog_1>;
   imx6ul-evk {

...
pinctrl_enet1: enet1grp {
   fsl,pins = <
      MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN 0x1b0b0
      MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER 0x1b0b0
      MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
      MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
      MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN 0x1b0b0
      MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
      MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
      MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x4001b031
   >;
};

pinctrl_enet2: enet2grp {
   fsl,pins = <
      MX6UL_PAD_GPIO1_IO07__ENET2_MDC 0x1b0b0
      MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0
      MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN 0x1b0b0
      MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER 0x1b0b0
      MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0
      MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0
      MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN 0x1b0b0
      MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0
      MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0
      MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031
   >;
};

ラベル(2)
タグ(1)
0 件の賞賛
返信
1 解決策
3,527件の閲覧回数
chris_f
Contributor V

It doesn't end there though because my patch will not apply to the Yocto generated tree (I'd been working on an out of tree build) because the mach-imx6ul.c file had already been patched as part of a bbappend that I can't find. It's one of two kernel sources patched in this way. Nice little bear trap to waste four hours on.

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
3,527件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi chris,

you may find useful this post How to disable the fec2 from the devicetree in imx6ulevk 


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
3,527件の閲覧回数
chris_f
Contributor V

Thanks Carlos. That looks useful. Don't know why my searches didn't find that. I'll try it tomorrow.

0 件の賞賛
返信
3,526件の閲覧回数
chris_f
Contributor V

That link was useful but didn't solve the problem. I finally made it work by following the instructions here: IMX6UL ethernet does work in u-boot but it doesn't with Kernel 3.14.38

Note that I also needed to patch arch/arm/mach-imx/mach-imx6ul.c as recommended in that thread by jiriluznicky Patch attached here.

0 件の賞賛
返信
3,528件の閲覧回数
chris_f
Contributor V

It doesn't end there though because my patch will not apply to the Yocto generated tree (I'd been working on an out of tree build) because the mach-imx6ul.c file had already been patched as part of a bbappend that I can't find. It's one of two kernel sources patched in this way. Nice little bear trap to waste four hours on.

0 件の賞賛
返信