From cb1702041f8ccfa902b6e525b2268313aeaf1eb0 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 12 Nov 2023 17:24:43 +0100 Subject: [PATCH] qualcommax: use defines for MAC mode setting 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 --- .../files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts | 4 +--- .../files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi | 4 +--- .../files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts | 6 +++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts | 6 +++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts | 6 +++--- .../files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts | 6 +++--- .../files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts | 5 ++--- .../files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts | 7 +++---- .../arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts | 6 +++--- 15 files changed, 34 insertions(+), 46 deletions(-) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts index 3f19e4fee999..5b3a56fdd0d4 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts @@ -273,9 +273,7 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi index 82a981b5faac..5c28862fc4fd 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi @@ -237,9 +237,7 @@ switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts index e373af1ba828..0da587571210 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts @@ -345,9 +345,8 @@ switch_lan_bmp = ; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance1*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts index 6c7ec2e588fe..f92291e6b248 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts @@ -324,9 +324,9 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ + switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts index 4551e7b6b3cb..f8eb9c9fe822 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts @@ -327,9 +327,8 @@ switch_lan_bmp = ; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance1*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts index 338051ef48a3..3b175ec1624a 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts @@ -384,9 +384,8 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ + switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts index 165d788a4f67..8ae5924c63be 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts @@ -171,9 +171,8 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts index 81e647582ac3..2e92a18cc756 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts @@ -188,9 +188,9 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ + switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts index 68be7b277835..59835a7059d2 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts @@ -90,9 +90,8 @@ status = "okay"; switch_wan_bmp = ; - switch_mac_mode = <0x00>; - switch_mac_mode1 = <0xff>; - switch_mac_mode2 = <0x0f>; + switch_mac_mode = ; + switch_mac_mode2 = ; bm_tick_mode = <0>; tm_tick_mode = <0>; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts index 6adf39338838..2175f0e69e17 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts @@ -118,9 +118,8 @@ status = "okay"; switch_wan_bmp = ; - switch_mac_mode = <0x00>; - switch_mac_mode1 = <0xff>; - switch_mac_mode2 = <0x0f>; + switch_mac_mode = ; + switch_mac_mode2 = ; bm_tick_mode = <0x00>; tm_tick_mode = <0x00>; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts index 8d1c3725a18a..7b47a0d97ef7 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts @@ -390,9 +390,9 @@ switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ + switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts index 62e256b4252b..b32bc3181747 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts @@ -300,9 +300,9 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; switch_wan_bmp = ; - switch_mac_mode = <0x0>; - switch_mac_mode1 = <0xf>; - switch_mac_mode2 = <0xd>; + switch_mac_mode = ; + switch_mac_mode1 = ; + switch_mac_mode2 = ; bm_tick_mode = <0>; tm_tick_mode = <0>; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts index 4e756867f298..30b08eee3219 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts @@ -197,9 +197,8 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ switch_wan_bmp = ; /* 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 for uniphy instance0*/ + switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ bm_tick_mode = <0>; /* bm tick mode */ tm_tick_mode = <0>; /* tm tick mode */ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts index e28810fa3dc1..b8beec6bcc3a 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts @@ -150,12 +150,11 @@ &switch { status = "okay"; - + switch_lan_bmp = ; switch_wan_bmp = ; - switch_mac_mode = <0x00>; - switch_mac_mode1 = <0xff>; - switch_mac_mode2 = <0x0d>; + switch_mac_mode = ; + switch_mac_mode2 = ; bm_tick_mode = <0x00>; tm_tick_mode = <0x00>; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts index 51af034c3445..be9429ea394d 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts @@ -269,9 +269,9 @@ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; switch_wan_bmp = ; - switch_mac_mode = <0xb>; - switch_mac_mode1 = <0xd>; - switch_mac_mode2 = <0xd>; + switch_mac_mode = ; + switch_mac_mode1 = ; + switch_mac_mode2 = ; bm_tick_mode = <0>; tm_tick_mode = <0>; -- 2.30.2