Re: [net-next PATCH v2 08/15] dt-bindings: net: dsa: qca8k: Add MAC swap and clock phase properties

From: Andrew Lunn
Date: Sat Oct 09 2021 - 13:07:38 EST


On Fri, Oct 08, 2021 at 02:22:18AM +0200, Ansuel Smith wrote:
> Add names and decriptions of additional PORT0_PAD_CTRL properties.
> Document new binding qca,mac6_exchange that exchange the mac0 port
> with mac6.
> qca,sgmii-(rx|tx)clk-falling-edge are for setting the respective clock
> phase to failling edge.
>
> Signed-off-by: Matthew Hagan <mnhagan88@xxxxxxxxx>
> Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>
> ---
> Documentation/devicetree/bindings/net/dsa/qca8k.txt | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
> index 9383d6bf2426..208ee5bc1bbb 100644
> --- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
> @@ -13,6 +13,11 @@ Required properties:
> Optional properties:
>
> - reset-gpios: GPIO to be used to reset the whole device
> +- qca,mac6-exchange: Internally swap MAC0 with MAC6.
> +- qca,sgmii-rxclk-falling-edge: Set the receive clock phase to falling edge.
> + Mostly used in qca8327 with CPU port 0 set to
> + sgmii.
> +- qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge.
> - qca,rgmii0-1-8v: Set the internal regulator to supply 1.8v for MAC0 port.
> This is needed for qca8337 and toggles the supply voltage
> from 1.5v to 1.8v. For the specific regs it was observed

The edge configuration is a port configuration. So it should be inside
the port DT node it applies to. That also gives a clean way forward
when a new switch appears with more SGMII interfaces, each with its
own edge configuration.

But that then leads into the MAC0/MAC6 swap mess. I need to think
about that some more, how do we cleanly describe that in DT.

Andrew