Skip to contentSkip to conversation

arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2.dts

PATCH Applied Johan Jonker 3 participants 6 messages May 12, 2020 – May 18, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2.dts

The defines RK_FUNC_1 and RK_FUNC_2 are deprecated, so replace them with the preferred form. Restyle properties in the same line.

---
 arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts +3 -6
index fe253669b..46826b6e2 100644
@@ -543,18 +543,15 @@
 		};
 
 		soc_slppin_gpio: soc_slppin_gpio {
-			rockchip,pins =
-				<0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
 		};
 
 		soc_slppin_rst: soc_slppin_rst {
-			rockchip,pins =
-				<0 RK_PA4 RK_FUNC_2 &pcfg_pull_none>;
+			rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
 		};
 
 		soc_slppin_slp: soc_slppin_slp {
-			rockchip,pins =
-				<0 RK_PA4 RK_FUNC_1 &pcfg_pull_none>;
+			rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;
 		};
 	};
 };
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/3 dt-bindings: pinctrl: rockchip: update example

The Rockchip dtsi and dts files have been bulk-converted for the remaining raw gpio numbers into their descriptive counterparts and also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x mappings, so update the example as well.

---
 Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt +2 -2
index 2113cfaa2..d3eae61a3 100644
@@ -110,8 +110,8 @@ pinctrl@20008000 {
 
 	uart2 {
 		uart2_xfer: uart2-xfer {
-			rockchip,pins = <RK_GPIO1 8 1 &pcfg_pull_default>,
-					<RK_GPIO1 9 1 &pcfg_pull_default>;
+			rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>,
+					<1 RK_PB1 1 &pcfg_pull_default>;
 		};
 	};
 };
Signature · 1 line
2.11.0
#2 lore raw

Re: [PATCH 2/3] dt-bindings: pinctrl: rockchip: update example

Quoted 6 lines · Johan Jonker

The Rockchip dtsi and dts files have been bulk-converted for the remaining raw gpio numbers into their descriptive counterparts and also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x mappings, so update the example as well.

This patch applied to the pinctrl tree.

Yours,
Linus Walleij

#3 lore raw

PATCH 3/3 include: dt-bindings: rockchip: remove unused defines

In reply to Johan Jonker

The Rockchip dtsi and dts files have been bulk-converted for the remaining raw gpio numbers into their descriptive counterparts and also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x mappings, so remove the unused defines in 'rockchip.h' to prevent that someone start using them again.

---
 include/dt-bindings/pinctrl/rockchip.h | 11 -----------
 1 file changed, 11 deletions(-)
include/dt-bindings/pinctrl/rockchip.h +0 -11
index 6d6bac1c2..5f291045e 100644
@@ -9,13 +9,6 @@
 #ifndef __DT_BINDINGS_ROCKCHIP_PINCTRL_H__
 #define __DT_BINDINGS_ROCKCHIP_PINCTRL_H__
 
-#define RK_GPIO0	0
-#define RK_GPIO1	1
-#define RK_GPIO2	2
-#define RK_GPIO3	3
-#define RK_GPIO4	4
-#define RK_GPIO6	6
-
 #define RK_PA0		0
 #define RK_PA1		1
 #define RK_PA2		2
@@ -50,9 +43,5 @@
 #define RK_PD7		31
 
 #define RK_FUNC_GPIO	0
-#define RK_FUNC_1	1 /* deprecated */
-#define RK_FUNC_2	2 /* deprecated */
-#define RK_FUNC_3	3 /* deprecated */
-#define RK_FUNC_4	4 /* deprecated */
 
 #endif
Signature · 1 line
2.11.0
Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] include: dt-bindings: rockchip: remove unused defines

Quoted 7 lines · Johan Jonker

The Rockchip dtsi and dts files have been bulk-converted for the remaining raw gpio numbers into their descriptive counterparts and also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x mappings, so remove the unused defines in 'rockchip.h' to prevent that someone start using them again.

I think patch 1 & 3 needs to be applied to the Rockchip tree.

Yours,
Linus Walleij

maintainer Applied
#5 lore raw
In reply to Johan Jonker
Quoted 3 lines · Johan Jonker

The defines RK_FUNC_1 and RK_FUNC_2 are deprecated, so replace them with the preferred form. Restyle properties in the same line.

Applied, thanks!

[1/2] arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2

      commit: 213f272b754f4e27aeab9d1265c775610e612bb7
[2/2] include: dt-bindings: rockchip: remove unused defines
      commit: d09855bdd8c4d4eb6e58b8546318ebb5859a513c

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>