qualcommax: use defines for MAC mode setting
authorRobert Marko <robimarko@gmail.com>
Sun, 12 Nov 2023 16:24:43 +0000 (17:24 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 14 Nov 2023 04:21:27 +0000 (05:21 +0100)
Now that we have the MAC modes defined in DT bindings, lets replace all of
the raw hex values with defines.

While we are here, we can drop the disabled UNIPHY-s as that is the default
value in the ESS DTSI.

Signed-off-by: Robert Marko <robimarko@gmail.com>
15 files changed:
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts

index 3f19e4fee9997e0f546e2a11325dea027c944bcf..5b3a56fdd0d4f72f5176354f8677af54db48dd75 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
-       switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 82a981b5faacfc61cec026b443e0059a48ef50d4..5c28862fc4fd90f5376b7bb156b99c319626b283 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
-       switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index e373af1ba8286275ef67ae7c52aa3b10ba47d17e..0da587571210cb955bfbf38a7cbdacb974943102 100644 (file)
 
        switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
-       switch_mac_mode = <0xff>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
+       switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
+       switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 6c7ec2e588fe225217c5aaffd983ef30b6e6b40e..f92291e6b248f122ea055fe5a7cd92a045b51eb5 100644 (file)
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
        malibu_first_phy_addr = <16>; /* PHY addr of the first malibu PHY */
-       switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xd>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
+       switch_mac_mode1 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance1*/
+       switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 4551e7b6b3cbc6587ef402a70745d01335ab5b33..f8eb9c9fe822dbc78720519a581f210be96c0c6c 100644 (file)
 
        switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
-       switch_mac_mode = <0xff>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
+       switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
+       switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 338051ef48a3dc199bb0fbb8468c015ae607c82c..3b175ec1624a8468b8c5bc2f4d45949c2b9ea88e 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
-       switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xc>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
+       switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 165d788a4f6781d1197bfea7c1b50d28f0be52ca..8ae5924c63be02f4339092b7aad4b779bf203fe1 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
-       switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xc>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
+       switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 81e647582ac30cc4691e4a22250c720a811c1d45..2e92a18cc7563c591a87c6ec3ef158e3d5c26404 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
-       switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xe>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
+       switch_mac_mode1 = <MAC_MODE_10GBASE_R>; /* mac mode for uniphy instance1*/
+       switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 68be7b277835110cfd08af82682fa1aa48586fbd..59835a7059d2c287ce61f02d3e0ec973a341ded8 100644 (file)
@@ -90,9 +90,8 @@
        status = "okay";
 
        switch_wan_bmp = <ESS_PORT6>;
-       switch_mac_mode = <0x00>;
-       switch_mac_mode1 = <0xff>;
-       switch_mac_mode2 = <0x0f>;
+       switch_mac_mode = <MAC_MODE_PSGMII>;
+       switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>;
        bm_tick_mode = <0>;
        tm_tick_mode = <0>;
 
index 6adf39338838b380b4e9b92873ce82f06feeadd9..2175f0e69e17759d6197677afe2b4b03dfb7b611 100644 (file)
        status = "okay";
 
        switch_wan_bmp = <ESS_PORT6>;
-       switch_mac_mode = <0x00>;
-       switch_mac_mode1 = <0xff>;
-       switch_mac_mode2 = <0x0f>;
+       switch_mac_mode = <MAC_MODE_PSGMII>;
+       switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>;
        bm_tick_mode = <0x00>;
        tm_tick_mode = <0x00>;
 
index 8d1c3725a18a6a5102b13acc9d826cb66258060f..7b47a0d97ef72cfba2f2c7cc49ef64daa56728a7 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
-       switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0x0f>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0x0f>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
+       switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
+       switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index 62e256b4252bba415ea5918797d9a556f7884028..b32bc318174799267e5a64d03b3bf1c6e3a77b51 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>;
        switch_wan_bmp = <ESS_PORT6>;
-       switch_mac_mode = <0x0>;
-       switch_mac_mode1 = <0xf>;
-       switch_mac_mode2 = <0xd>;
+       switch_mac_mode = <MAC_MODE_PSGMII>;
+       switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>;
+       switch_mac_mode2 = <MAC_MODE_USXGMII>;
        bm_tick_mode = <0>;
        tm_tick_mode = <0>;
 
index 4e756867f298b408e093c916df0eac4df29fa52d..30b08eee3219f2ae86d4ba9f79b132747b6d20ba 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
        switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
-       switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
-       switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
-       switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
+       switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
+       switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
        bm_tick_mode = <0>; /* bm tick mode */
        tm_tick_mode = <0>; /* tm tick mode */
 
index e28810fa3dc12fef314196958f730910c87110df..b8beec6bcc3a3d31fefab80f94189f4dd8039c46 100644 (file)
 
 &switch {
        status = "okay";
-       
+
        switch_lan_bmp = <ESS_PORT4>;
        switch_wan_bmp = <ESS_PORT6>;
-       switch_mac_mode = <0x00>;
-       switch_mac_mode1 = <0xff>;
-       switch_mac_mode2 = <0x0d>;
+       switch_mac_mode = <MAC_MODE_PSGMII>;
+       switch_mac_mode2 = <MAC_MODE_USXGMII>;
        bm_tick_mode = <0x00>;
        tm_tick_mode = <0x00>;
 
index 51af034c34459726953565a0f148edc8dd87aba3..be9429ea394dbcd01648b4925d1a7a437a88a554 100644 (file)
 
        switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>;
        switch_wan_bmp = <ESS_PORT6>;
-       switch_mac_mode = <0xb>;
-       switch_mac_mode1 = <0xd>;
-       switch_mac_mode2 = <0xd>;
+       switch_mac_mode = <MAC_MODE_QSGMII>;
+       switch_mac_mode1 = <MAC_MODE_USXGMII>;
+       switch_mac_mode2 = <MAC_MODE_USXGMII>;
        bm_tick_mode = <0>;
        tm_tick_mode = <0>;