Message ID | 20231103105305.2459143-1-o.rempel@pengutronix.de |
---|---|
State | Not Applicable |
Headers | show |
Series | [v2,1/2] dt-bindings: arm: Add compatible for SKOV i.MX8MP RevB board | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
On 03/11/2023 11:53, Oleksij Rempel wrote: > Add DT compatible string for a SKOV i.MX8MP RevB climate controller board. > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
> + port@2 { > + reg = <2>; > + label = "cpu"; > + ethernet = <&eqos>; > + /* 2ns rgmii-rxid is implemented on PCB. > + * Switch should add only rgmii-txid. > + */ Its unusual to actually see that. Its even more unusual its only one clock line. Can you actually see it on the PCB? > + phy-mode = "rgmii-txid"; > + tx-internal-delay-ps = <2000>; Is this actually needed? rgmii-txid should add 2ns delay. Since this apparently works, i'm assuming setting tx-internal-delay-ps to 2ns does nothing, otherwise you would have a 4ns delay. Andrew
Hi Andrew, On Fri, Nov 03, 2023 at 01:35:46PM +0100, Andrew Lunn wrote: > > + port@2 { > > + reg = <2>; > > + label = "cpu"; > > + ethernet = <&eqos>; > > + /* 2ns rgmii-rxid is implemented on PCB. > > + * Switch should add only rgmii-txid. > > + */ > > Its unusual to actually see that. Its even more unusual its only one > clock line. Can you actually see it on the PCB? Yes. I even made a delay calculation by measuring this trace on PCB, just to make sure I see it correctly. > > + phy-mode = "rgmii-txid"; > > + tx-internal-delay-ps = <2000>; > > Is this actually needed? rgmii-txid should add 2ns delay. Since this > apparently works, i'm assuming setting tx-internal-delay-ps to 2ns > does nothing, otherwise you would have a 4ns delay. Without it the driver will complain: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/dsa/microchip/ksz_common.c?h=v6.6#n3496 but it works as expected. Regards, Oleksij
On Fri, Nov 03, 2023 at 01:53:06PM +0100, Oleksij Rempel wrote: > Hi Andrew, > > On Fri, Nov 03, 2023 at 01:35:46PM +0100, Andrew Lunn wrote: > > > + port@2 { > > > + reg = <2>; > > > + label = "cpu"; > > > + ethernet = <&eqos>; > > > + /* 2ns rgmii-rxid is implemented on PCB. > > > + * Switch should add only rgmii-txid. > > > + */ > > > > Its unusual to actually see that. Its even more unusual its only one > > clock line. Can you actually see it on the PCB? > > Yes. I even made a delay calculation by measuring this trace on PCB, > just to make sure I see it correctly. Cool. I need to keep this board in mind, its about the only one i know of which actually does this. > > > + phy-mode = "rgmii-txid"; > > > + tx-internal-delay-ps = <2000>; > > > > Is this actually needed? rgmii-txid should add 2ns delay. Since this > > apparently works, i'm assuming setting tx-internal-delay-ps to 2ns > > does nothing, otherwise you would have a 4ns delay. > > Without it the driver will complain: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/dsa/microchip/ksz_common.c?h=v6.6#n3496 Ah! Humm. I forget how this all works. This is the port node, not the PHY. We are configuring the MAC delays with tx-internal-delay-ps. There is no PHY here, so phy-mode is not used by any PHY. All that might matter is that you indicate rgmii or some sort. Have you tried plain "rgmii". It then looks less like you have 4ns of delay. Andrew
On Fri, Nov 03, 2023 at 01:35:46PM +0100, Andrew Lunn wrote: > > + port@2 { > > + reg = <2>; > > + label = "cpu"; > > + ethernet = <&eqos>; > > + /* 2ns rgmii-rxid is implemented on PCB. > > + * Switch should add only rgmii-txid. > > + */ > > Its unusual to actually see that. Its even more unusual its only one > clock line. Can you actually see it on the PCB? > > > + phy-mode = "rgmii-txid"; > > + tx-internal-delay-ps = <2000>; > > Is this actually needed? rgmii-txid should add 2ns delay. Since this > apparently works, i'm assuming setting tx-internal-delay-ps to 2ns > does nothing, otherwise you would have a 4ns delay. Umm... I think we're getting confused again. Mode Local end Remote end RGMII No added delays No added delays RGMII-TXID No added delays 2ns delay on TX RGMII-RXID No added delays 2ns delay on RX RGMII-ID No added delays 2ns delay on both TX and RX In the case of a network interface with a PHY, "local end" is the MAC and "remote end" is the PHY. For a switch port connected to an external PHY, the switch port is as the "MAC" as above. For a switch port connected to an ethernet MAC: - for the MAC declaration, the local end is the MAC. There is no communication of the interface mode with the remote end under Linux, so this is irrelevant for Linux. However, this is an implementation, and it should be chosen according to the hardware. - for the switch port declaration, the local end is the switch port. There is no communication of the interface mode with the remote end under Linux. However, it should be chosen according to the hardware. So, if the 2ns delay is implemented on the RX lines (from the switch perspective) then shouldn't the MAC side be using "rgmii-txid" to indicate that the delay is being applied by the remote end (switch). The switch side should be using "rgmii" because no delays are required from the remote end (MAC), and the delay on the TX lines should be specified using "tx-internal-delay-ps"?
On Fri, Nov 03, 2023 at 01:16:12PM +0000, Russell King (Oracle) wrote: > On Fri, Nov 03, 2023 at 01:35:46PM +0100, Andrew Lunn wrote: > > > + port@2 { > > > + reg = <2>; > > > + label = "cpu"; > > > + ethernet = <&eqos>; > > > + /* 2ns rgmii-rxid is implemented on PCB. > > > + * Switch should add only rgmii-txid. > > > + */ > > > > Its unusual to actually see that. Its even more unusual its only one > > clock line. Can you actually see it on the PCB? > > > > > + phy-mode = "rgmii-txid"; > > > + tx-internal-delay-ps = <2000>; > > > > Is this actually needed? rgmii-txid should add 2ns delay. Since this > > apparently works, i'm assuming setting tx-internal-delay-ps to 2ns > > does nothing, otherwise you would have a 4ns delay. > > Umm... I think we're getting confused again. > > Mode Local end Remote end > RGMII No added delays No added delays > RGMII-TXID No added delays 2ns delay on TX > RGMII-RXID No added delays 2ns delay on RX > RGMII-ID No added delays 2ns delay on both TX and RX > > In the case of a network interface with a PHY, "local end" is the > MAC and "remote end" is the PHY. > > For a switch port connected to an external PHY, the switch port is > as the "MAC" as above. > > For a switch port connected to an ethernet MAC: > - for the MAC declaration, the local end is the MAC. There is no > communication of the interface mode with the remote end under > Linux, so this is irrelevant for Linux. However, this is an > implementation, and it should be chosen according to the hardware. > > - for the switch port declaration, the local end is the switch port. > There is no communication of the interface mode with the remote > end under Linux. However, it should be chosen according to the > hardware. > > So, if the 2ns delay is implemented on the RX lines (from the switch > perspective) then shouldn't the MAC side be using "rgmii-txid" to > indicate that the delay is being applied by the remote end (switch). > The switch side should be using "rgmii" because no delays are required > from the remote end (MAC), and the delay on the TX lines should be > specified using "tx-internal-delay-ps"? Ack. It make sense. Will fix it. Regards, Oleksij
diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml index 9450b2c8a678..f457ad8e2ca1 100644 --- a/Documentation/devicetree/bindings/arm/fsl.yaml +++ b/Documentation/devicetree/bindings/arm/fsl.yaml @@ -1037,6 +1037,9 @@ properties: - gateworks,imx8mp-gw73xx-2x # i.MX8MP Gateworks Board - gateworks,imx8mp-gw74xx # i.MX8MP Gateworks Board - gateworks,imx8mp-gw7905-2x # i.MX8MP Gateworks Board + - skov,imx8mp-skov-revb-hdmi # SKOV i.MX8MP climate control without panel + - skov,imx8mp-skov-revb-lt6 # SKOV i.MX8MP climate control with 7” panel + - skov,imx8mp-skov-revb-mi1010ait-1cp1 # SKOV i.MX8MP climate control with 10.1" panel - toradex,verdin-imx8mp # Verdin iMX8M Plus Modules - toradex,verdin-imx8mp-nonwifi # Verdin iMX8M Plus Modules without Wi-Fi / BT - toradex,verdin-imx8mp-wifi # Verdin iMX8M Plus Wi-Fi / BT Modules
Add DT compatible string for a SKOV i.MX8MP RevB climate controller board. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> --- Documentation/devicetree/bindings/arm/fsl.yaml | 3 +++ 1 file changed, 3 insertions(+)