arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins
Subsystems (2)
PATCH 1/1 arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins
The EthernetAVB should not depend on the bootloader to setup correct drive-strength values. Values for drive-strength where found by examine the registers after the bootloader have configured the registers and successfully used the EthernetAVB.
--- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +26 -2
@@ -225,8 +225,32 @@ }; avb_pins: avb { - groups = "avb_mdc"; - function = "avb"; + mux { + groups = "avb_mdc", "avb_mii"; + function = "avb"; + }; + + pins_mdc { + groups = "avb_mdc"; + drive-strength = <24>; + }; + + pins_mii_tx { + pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0", + "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3"; + drive-strength = <12>; + }; + + pins_mii_rx { + pins = "PIN_AVB_RX_CTL", "PIN_AVB_RXC", "PIN_AVB_RD0", + "PIN_AVB_RD1", "PIN_AVB_RD2", "PIN_AVB_RD3"; + drive-strength = <24>; + }; + + pins_mii_clk { + pins = "PIN_AVB_TXCREFCLK"; + drive-strength = <24>; + }; }; du_pins: du {
Signature · 1 line
2.10.2
Hi Niklas,
Quoted 4 lines · Niklas Söderlund
The EthernetAVB should not depend on the bootloader to setup correct drive-strength values. Values for drive-strength where found by examine the registers after the bootloader have configured the registers and successfully used the EthernetAVB.
I believe this patch has run-time dependencies on PFC patches and will result in a regression without them. Please resubmit or otherwise ping me once chose changes are present in an (rc) release or immutable branch.
Thanks!
Hi Niklas,
Quoted 2 lines · Niklas Söderlund
The EthernetAVB should not depend on the bootloader to setup correct drive-strength values. Values for drive-strength where found by examine
examining
Quoted 1 line
the registers after the bootloader have configured the registers and
has
Quoted 36 lines
successfully used the EthernetAVB.
Signed-off-by Niklas Söderlund <[email protected]>--- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +19
-2@@ -225,8 +225,32 @@ }; avb_pins: avb { - groups = "avb_mdc"; - function = "avb"; + mux { + groups = "avb_mdc", "avb_mii"; + function = "avb"; + }; + + pins_mdc { + groups = "avb_mdc"; + drive-strength = <24>; + }; + + pins_mii_tx { + pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0", + "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3"; + drive-strength = <12>; + }; + + pins_mii_rx { + pins = "PIN_AVB_RX_CTL", "PIN_AVB_RXC", "PIN_AVB_RD0", + "PIN_AVB_RD1", "PIN_AVB_RD2", "PIN_AVB_RD3";
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts line 256
Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +7
-0+ drive-strength = <24>; + }; + + pins_mii_clk { + pins = "PIN_AVB_TXCREFCLK"; + drive-strength = <24>; + }; }; du_pins: du {
What about AVB_PHY_INT and AVB_LINK?
Or don't you need to specify their drive strengths, as they are input signals? Then what about pins_mii_rx, they're also input signals?
BTW, the latest public U-Boot seems to configure just AVB_TX_CTL, AVB_TXC, and AVB_TXD[0-3] for 12 mA, cfr.
https://github.com/renesas-rcar/u-boot/blob/v2015.04/rcar-3.4.0/board/renesas/salvator-x/salvator-x.c#L158
According to the datasheet, the reset values of all signals are 15 mA on H3 ES1, and 24 mA on M3-W and H3 ES2.0.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
Thanks for your feedback.
Quoted 4 lines · Geert Uytterhoeven
Hi Niklas,
On Mon, Nov 28, 2016 at 12:46 PM, Niklas S�derlund <[email protected]> wrote:
Quoted 9 lines
Quoted 2 lines
The EthernetAVB should not depend on the bootloader to setup correct drive-strength values. Values for drive-strength where found by examine
examining
Quoted 1 line
the registers after the bootloader have configured the registers and
has
Thanks.
Quoted 45 lines
Quoted 45 lines
successfully used the EthernetAVB.
Signed-off-by Niklas S�derlund <[email protected]>--- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +26
-2@@ -225,8 +225,32 @@ }; avb_pins: avb { - groups = "avb_mdc"; - function = "avb"; + mux { + groups = "avb_mdc", "avb_mii"; + function = "avb"; + }; + + pins_mdc { + groups = "avb_mdc"; + drive-strength = <24>; + }; + + pins_mii_tx { + pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0", + "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3"; + drive-strength = <12>; + }; + + pins_mii_rx { + pins = "PIN_AVB_RX_CTL", "PIN_AVB_RXC", "PIN_AVB_RD0", + "PIN_AVB_RD1", "PIN_AVB_RD2", "PIN_AVB_RD3"; + drive-strength = <24>; + }; + + pins_mii_clk { + pins = "PIN_AVB_TXCREFCLK"; + drive-strength = <24>; + }; };
Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts line 256
Quoted 1 line
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +0
-0du_pins: du {What about
AVB_PHY_INTandAVB_LINK?
Or don't you need to specify their drive strengths, as they are input signals? Then what aboutpins_mii_rx, they're also input signals?
Wops, I was not aware of the u-boot repository you link bellow so was looking at git://git.denx.de/u-boot-sh.git which also have some salvator-x code, but nothing for EtherAVB.
My assumption hence was that it only used the pins from the avb_mdc group and pins which could not be muxed, this is incorrect since u-boot setup more pinmuxing. So there are more pin groups which should be added to the mux section (at least). If I look at the u-boot code pins missing in DT are:
- AVB_AVTP_CAPTURE_A
- AVB_AVTP_MATCH_A
- AVB_LINK
- AVB_PHY_INT
- AVB_MAGIC
I will add the pin groups which contain those pins to the mux section.
Quoted 7 lines
BTW, the latest public U-Boot seems to configure just
AVB_TX_CTL,AVB_TXC, and AVB_TXD[0-3] for 12 mA, cfr.
https://github.com/renesas-rcar/u-boot/blob/v2015.04/rcar-3.4.0/board/renesas/salvator-x/salvator-x.c#L158According to the datasheet, the reset values of all signals are 15 mA on H3 ES1, and 24 mA on M3-W and H3 ES2.0.
This is good information, but how to make best use of it? Should I in DT set the drive-strength for all pins or just the pins which diverge from the reset default values? I think it's best to set them for all pins since we should not depend on the bootloader, do you agree?
Quoted 11 lines
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Signature · 2 lines
Regards, Niklas S�derlund
Hi Niklas,
Quoted 56 lines · Niklas Söderlund
Quoted 39 lines · Geert Uytterhoeven
On Mon, Nov 28, 2016 at 12:46 PM, Niklas Söderlund
Quoted 38 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +26
-2@@ -225,8 +225,32 @@ }; avb_pins: avb { - groups = "avb_mdc"; - function = "avb"; + mux { + groups = "avb_mdc", "avb_mii"; + function = "avb"; + }; + + pins_mdc { + groups = "avb_mdc"; + drive-strength = <24>; + }; + + pins_mii_tx { + pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0", + "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3"; + drive-strength = <12>; + }; + + pins_mii_rx { + pins = "PIN_AVB_RX_CTL", "PIN_AVB_RXC", "PIN_AVB_RD0", + "PIN_AVB_RD1", "PIN_AVB_RD2", "PIN_AVB_RD3"; + drive-strength = <24>; + }; + + pins_mii_clk { + pins = "PIN_AVB_TXCREFCLK"; + drive-strength = <24>; + }; };Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts line 256
Quoted 1 line
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +0
-0du_pins: du {What about
AVB_PHY_INTandAVB_LINK?
Or don't you need to specify their drive strengths, as they are input signals? Then what aboutpins_mii_rx, they're also input signals?Wops, I was not aware of the u-boot repository you link bellow so was looking at
git://git.denx.de/u-boot-sh.gitwhich also have some salvator-x code, but nothing for EtherAVB.My assumption hence was that it only used the pins from the
avb_mdcgroup and pins which could not be muxed, this is incorrect since u-boot setup more pinmuxing. So there are more pin groups which should be added to the mux section (at least). If I look at the u-boot code pins missing in DT are:
Quoted 7 lines
-
AVB_AVTP_CAPTURE_A
-AVB_AVTP_MATCH_A
-AVB_LINK
-AVB_PHY_INT
-AVB_MAGICI will add the pin groups which contain those pins to the mux section.
Note that AVB_AVTP_CAPTURE_A, AVB_AVTP_MATCH_A, and AVB_MAGIC are not used on Salvator-X.
Quoted 11 lines
Quoted 6 lines
BTW, the latest public U-Boot seems to configure just
AVB_TX_CTL,AVB_TXC, and AVB_TXD[0-3] for 12 mA, cfr.
https://github.com/renesas-rcar/u-boot/blob/v2015.04/rcar-3.4.0/board/renesas/salvator-x/salvator-x.c#L158According to the datasheet, the reset values of all signals are 15 mA on H3 ES1, and 24 mA on M3-W and H3 ES2.0.
This is good information, but how to make best use of it? Should I in DT set the drive-strength for all pins or just the pins which diverge from the reset default values? I think it's best to set them for all pins since we should not depend on the bootloader, do you agree?
For input-only pins, drive strength should not matter at all, so I think you should leave it out.
For other (used) pins, I think it should be specified.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds