* [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC
@ 2023-01-18 12:13 Johan Jonker
2023-01-18 12:14 ` [PATCH v1 2/4] gpio: gpio-rockchip: " Johan Jonker
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Johan Jonker @ 2023-01-18 12:13 UTC (permalink / raw)
To: linus.walleij, brgl
Cc: robh+dt, krzysztof.kozlowski+dt, heiko, linux-gpio, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel, kever.yang, sjg,
philipp.tomsich
Currently all Rockchip gpio nodes have the same compatible.
Replace all the compatibles in gpio nodes to be able to
give them a consistent ID independent from probe order or alias.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
.../bindings/gpio/rockchip,gpio-bank.yaml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
index affd823c8..72fdfcc65 100644
--- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
+++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
@@ -13,7 +13,22 @@ properties:
compatible:
enum:
- rockchip,gpio-bank
+ - rockchip,px30-gpio-bank
+ - rockchip,rk3036-gpio-bank
+ - rockchip,rk3066a-gpio-bank
+ - rockchip,rk3128-gpio-bank
+ - rockchip,rk3188-gpio-bank
- rockchip,rk3188-gpio-bank0
+ - rockchip,rk3228-gpio-bank
+ - rockchip,rk3288-gpio-bank
+ - rockchip,rk3328-gpio-bank
+ - rockchip,rk3308-gpio-bank
+ - rockchip,rk3368-gpio-bank
+ - rockchip,rk3399-gpio-bank
+ - rockchip,rk3568-gpio-bank
+ - rockchip,rk3588-gpio-bank
+ - rockchip,rv1108-gpio-bank
+ - rockchip,rv1126-gpio-bank
reg:
maxItems: 1
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 2/4] gpio: gpio-rockchip: add compatible string per SoC
2023-01-18 12:13 [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Johan Jonker
@ 2023-01-18 12:14 ` Johan Jonker
2023-01-18 14:14 ` Bartosz Golaszewski
2023-01-18 15:35 ` Krzysztof Kozlowski
2023-01-18 12:15 ` [PATCH v1 3/4] ARM: dts: rockchip: replace compatible gpio nodes Johan Jonker
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Johan Jonker @ 2023-01-18 12:14 UTC (permalink / raw)
To: linus.walleij, brgl
Cc: robh+dt, krzysztof.kozlowski+dt, heiko, linux-gpio, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel, kever.yang, sjg,
philipp.tomsich
Currently all Rockchip gpio nodes have the same compatible.
Replace all the compatibles in gpio nodes to be able to
give them a consistent ID independent from probe order or alias.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
For now only add new compatibles.
No changes to rockchip_gpio_probe() function yet.
---
drivers/gpio/gpio-rockchip.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index e5de15a2a..493207de1 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -790,7 +790,22 @@ static int rockchip_gpio_remove(struct platform_device *pdev)
static const struct of_device_id rockchip_gpio_match[] = {
{ .compatible = "rockchip,gpio-bank", },
+ { .compatible = "rockchip,px30-gpio-bank", },
+ { .compatible = "rockchip,rk3036-gpio-bank", },
+ { .compatible = "rockchip,rk3066a-gpio-bank", },
+ { .compatible = "rockchip,rk3128-gpio-bank", },
+ { .compatible = "rockchip,rk3188-gpio-bank", },
{ .compatible = "rockchip,rk3188-gpio-bank0" },
+ { .compatible = "rockchip,rk3228-gpio-bank", },
+ { .compatible = "rockchip,rk3288-gpio-bank", },
+ { .compatible = "rockchip,rk3328-gpio-bank", },
+ { .compatible = "rockchip,rk3308-gpio-bank", },
+ { .compatible = "rockchip,rk3368-gpio-bank", },
+ { .compatible = "rockchip,rk3399-gpio-bank", },
+ { .compatible = "rockchip,rk3568-gpio-bank", },
+ { .compatible = "rockchip,rk3588-gpio-bank", },
+ { .compatible = "rockchip,rv1108-gpio-bank", },
+ { .compatible = "rockchip,rv1126-gpio-bank", },
{ },
};
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 3/4] ARM: dts: rockchip: replace compatible gpio nodes
2023-01-18 12:13 [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Johan Jonker
2023-01-18 12:14 ` [PATCH v1 2/4] gpio: gpio-rockchip: " Johan Jonker
@ 2023-01-18 12:15 ` Johan Jonker
2023-01-18 12:15 ` [PATCH v1 4/4] arm64: " Johan Jonker
2023-01-18 15:32 ` [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Rob Herring
3 siblings, 0 replies; 9+ messages in thread
From: Johan Jonker @ 2023-01-18 12:15 UTC (permalink / raw)
To: linus.walleij, brgl
Cc: robh+dt, krzysztof.kozlowski+dt, heiko, linux-gpio, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel, kever.yang, sjg,
philipp.tomsich
Currently all Rockchip gpio nodes have the same compatible.
Replace all the compatibles in gpio nodes to be able to
give them a consistent ID independent from probe order or alias.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
arch/arm/boot/dts/rk3036.dtsi | 6 +++---
arch/arm/boot/dts/rk3066a.dtsi | 12 ++++++------
arch/arm/boot/dts/rk3128.dtsi | 8 ++++----
arch/arm/boot/dts/rk3188.dtsi | 6 +++---
arch/arm/boot/dts/rk322x.dtsi | 8 ++++----
arch/arm/boot/dts/rk3288.dtsi | 18 +++++++++---------
arch/arm/boot/dts/rv1108.dtsi | 8 ++++----
arch/arm/boot/dts/rv1126.dtsi | 10 +++++-----
arch/arm64/boot/dts/rockchip/px30.dtsi | 8 ++++----
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 8 ++++----
10 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi
index 78686fc72..6b1fe6054 100644
--- a/arch/arm/boot/dts/rk3036.dtsi
+++ b/arch/arm/boot/dts/rk3036.dtsi
@@ -576,7 +576,7 @@
ranges;
gpio0: gpio@2007c000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3036-gpio-bank";
reg = <0x2007c000 0x100>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -589,7 +589,7 @@
};
gpio1: gpio@20080000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3036-gpio-bank";
reg = <0x20080000 0x100>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -602,7 +602,7 @@
};
gpio2: gpio@20084000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3036-gpio-bank";
reg = <0x20084000 0x100>;
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi
index de9915d94..59cdc2893 100644
--- a/arch/arm/boot/dts/rk3066a.dtsi
+++ b/arch/arm/boot/dts/rk3066a.dtsi
@@ -274,7 +274,7 @@
ranges;
gpio0: gpio@20034000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3066a-gpio-bank";
reg = <0x20034000 0x100>;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -287,7 +287,7 @@
};
gpio1: gpio@2003c000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3066a-gpio-bank";
reg = <0x2003c000 0x100>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -300,7 +300,7 @@
};
gpio2: gpio@2003e000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3066a-gpio-bank";
reg = <0x2003e000 0x100>;
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -313,7 +313,7 @@
};
gpio3: gpio@20080000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3066a-gpio-bank";
reg = <0x20080000 0x100>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
@@ -326,7 +326,7 @@
};
gpio4: gpio@20084000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3066a-gpio-bank";
reg = <0x20084000 0x100>;
interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO4>;
@@ -339,7 +339,7 @@
};
gpio6: gpio@2000a000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3066a-gpio-bank";
reg = <0x2000a000 0x100>;
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO6>;
diff --git a/arch/arm/boot/dts/rk3128.dtsi b/arch/arm/boot/dts/rk3128.dtsi
index b63bd4ad3..384230279 100644
--- a/arch/arm/boot/dts/rk3128.dtsi
+++ b/arch/arm/boot/dts/rk3128.dtsi
@@ -471,7 +471,7 @@
ranges;
gpio0: gpio@2007c000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3128-gpio-bank";
reg = <0x2007c000 0x100>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -482,7 +482,7 @@
};
gpio1: gpio@20080000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3128-gpio-bank";
reg = <0x20080000 0x100>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -493,7 +493,7 @@
};
gpio2: gpio@20084000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3128-gpio-bank";
reg = <0x20084000 0x100>;
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -504,7 +504,7 @@
};
gpio3: gpio@20088000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3128-gpio-bank";
reg = <0x20088000 0x100>;
interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
index 44b54af0b..09540d779 100644
--- a/arch/arm/boot/dts/rk3188.dtsi
+++ b/arch/arm/boot/dts/rk3188.dtsi
@@ -238,7 +238,7 @@
};
gpio1: gpio@2003c000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3188-gpio-bank";
reg = <0x2003c000 0x100>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -251,7 +251,7 @@
};
gpio2: gpio@2003e000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3188-gpio-bank";
reg = <0x2003e000 0x100>;
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -264,7 +264,7 @@
};
gpio3: gpio@20080000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3188-gpio-bank";
reg = <0x20080000 0x100>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index ffc16d6b9..c1a6bab37 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -949,7 +949,7 @@
ranges;
gpio0: gpio@11110000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3228-gpio-bank";
reg = <0x11110000 0x100>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -962,7 +962,7 @@
};
gpio1: gpio@11120000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3228-gpio-bank";
reg = <0x11120000 0x100>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -975,7 +975,7 @@
};
gpio2: gpio@11130000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3228-gpio-bank";
reg = <0x11130000 0x100>;
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -988,7 +988,7 @@
};
gpio3: gpio@11140000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3228-gpio-bank";
reg = <0x11140000 0x100>;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 2ca76b69a..ad2ea13c6 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1425,7 +1425,7 @@
ranges;
gpio0: gpio@ff750000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff750000 0x0 0x100>;
interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -1438,7 +1438,7 @@
};
gpio1: gpio@ff780000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff780000 0x0 0x100>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -1451,7 +1451,7 @@
};
gpio2: gpio@ff790000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff790000 0x0 0x100>;
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -1464,7 +1464,7 @@
};
gpio3: gpio@ff7a0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff7a0000 0x0 0x100>;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
@@ -1477,7 +1477,7 @@
};
gpio4: gpio@ff7b0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff7b0000 0x0 0x100>;
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO4>;
@@ -1490,7 +1490,7 @@
};
gpio5: gpio@ff7c0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff7c0000 0x0 0x100>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO5>;
@@ -1503,7 +1503,7 @@
};
gpio6: gpio@ff7d0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff7d0000 0x0 0x100>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO6>;
@@ -1516,7 +1516,7 @@
};
gpio7: gpio@ff7e0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff7e0000 0x0 0x100>;
interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO7>;
@@ -1529,7 +1529,7 @@
};
gpio8: gpio@ff7f0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3288-gpio-bank";
reg = <0x0 0xff7f0000 0x0 0x100>;
interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO8>;
diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index abf3006f0..2b459506e 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -596,7 +596,7 @@
ranges;
gpio0: gpio@20030000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1108-gpio-bank";
reg = <0x20030000 0x100>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0_PMU>;
@@ -609,7 +609,7 @@
};
gpio1: gpio@10310000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1108-gpio-bank";
reg = <0x10310000 0x100>;
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -622,7 +622,7 @@
};
gpio2: gpio@10320000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1108-gpio-bank";
reg = <0x10320000 0x100>;
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -635,7 +635,7 @@
};
gpio3: gpio@10330000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1108-gpio-bank";
reg = <0x10330000 0x100>;
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
diff --git a/arch/arm/boot/dts/rv1126.dtsi b/arch/arm/boot/dts/rv1126.dtsi
index 1f07d0a4f..d30deb73e 100644
--- a/arch/arm/boot/dts/rv1126.dtsi
+++ b/arch/arm/boot/dts/rv1126.dtsi
@@ -428,7 +428,7 @@
ranges;
gpio0: gpio@ff460000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1126-gpio-bank";
reg = <0xff460000 0x100>;
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>;
@@ -439,7 +439,7 @@
};
gpio1: gpio@ff620000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1126-gpio-bank";
reg = <0xff620000 0x100>;
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
@@ -450,7 +450,7 @@
};
gpio2: gpio@ff630000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1126-gpio-bank";
reg = <0xff630000 0x100>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>;
@@ -461,7 +461,7 @@
};
gpio3: gpio@ff640000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1126-gpio-bank";
reg = <0xff640000 0x100>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>;
@@ -472,7 +472,7 @@
};
gpio4: gpio@ff650000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rv1126-gpio-bank";
reg = <0xff650000 0x100>;
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>;
diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
index 4f6959eb5..6c7a6817c 100644
--- a/arch/arm64/boot/dts/rockchip/px30.dtsi
+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
@@ -1382,7 +1382,7 @@
ranges;
gpio0: gpio@ff040000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,px30-gpio-bank";
reg = <0x0 0xff040000 0x0 0x100>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pmucru PCLK_GPIO0_PMU>;
@@ -1394,7 +1394,7 @@
};
gpio1: gpio@ff250000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,px30-gpio-bank";
reg = <0x0 0xff250000 0x0 0x100>;
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -1406,7 +1406,7 @@
};
gpio2: gpio@ff260000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,px30-gpio-bank";
reg = <0x0 0xff260000 0x0 0x100>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -1418,7 +1418,7 @@
};
gpio3: gpio@ff270000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,px30-gpio-bank";
reg = <0x0 0xff270000 0x0 0x100>;
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 6d7a7bf72..868e5e6b5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -1045,7 +1045,7 @@
ranges;
gpio0: gpio@ff210000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3328-gpio-bank";
reg = <0x0 0xff210000 0x0 0x100>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -1058,7 +1058,7 @@
};
gpio1: gpio@ff220000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3328-gpio-bank";
reg = <0x0 0xff220000 0x0 0x100>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -1071,7 +1071,7 @@
};
gpio2: gpio@ff230000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3328-gpio-bank";
reg = <0x0 0xff230000 0x0 0x100>;
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -1084,7 +1084,7 @@
};
gpio3: gpio@ff240000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3328-gpio-bank";
reg = <0x0 0xff240000 0x0 0x100>;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 4/4] arm64: dts: rockchip: replace compatible gpio nodes
2023-01-18 12:13 [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Johan Jonker
2023-01-18 12:14 ` [PATCH v1 2/4] gpio: gpio-rockchip: " Johan Jonker
2023-01-18 12:15 ` [PATCH v1 3/4] ARM: dts: rockchip: replace compatible gpio nodes Johan Jonker
@ 2023-01-18 12:15 ` Johan Jonker
2023-01-18 15:32 ` [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Rob Herring
3 siblings, 0 replies; 9+ messages in thread
From: Johan Jonker @ 2023-01-18 12:15 UTC (permalink / raw)
To: linus.walleij, brgl
Cc: robh+dt, krzysztof.kozlowski+dt, heiko, linux-gpio, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel, kever.yang, sjg,
philipp.tomsich
Currently all Rockchip gpio nodes have the same compatible.
Replace all the compatibles in gpio nodes to be able to
give them a consistent ID independent from probe order or alias.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3308.dtsi | 10 +++++-----
arch/arm64/boot/dts/rockchip/rk3368.dtsi | 8 ++++----
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 +++++-----
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 10 +++++-----
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 10 +++++-----
5 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
index dd228a256..fe3e665a9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
@@ -793,7 +793,7 @@
ranges;
gpio0: gpio@ff220000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3308-gpio-bank";
reg = <0x0 0xff220000 0x0 0x100>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO0>;
@@ -804,7 +804,7 @@
};
gpio1: gpio@ff230000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3308-gpio-bank";
reg = <0x0 0xff230000 0x0 0x100>;
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>;
@@ -815,7 +815,7 @@
};
gpio2: gpio@ff240000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3308-gpio-bank";
reg = <0x0 0xff240000 0x0 0x100>;
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>;
@@ -826,7 +826,7 @@
};
gpio3: gpio@ff250000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3308-gpio-bank";
reg = <0x0 0xff250000 0x0 0x100>;
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>;
@@ -837,7 +837,7 @@
};
gpio4: gpio@ff260000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3308-gpio-bank";
reg = <0x0 0xff260000 0x0 0x100>;
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO4>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
index a4c5aaf1f..322836326 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
@@ -978,7 +978,7 @@
ranges;
gpio0: gpio@ff750000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3368-gpio-bank";
reg = <0x0 0xff750000 0x0 0x100>;
clocks = <&cru PCLK_GPIO0>;
interrupts = <GIC_SPI 0x51 IRQ_TYPE_LEVEL_HIGH>;
@@ -991,7 +991,7 @@
};
gpio1: gpio@ff780000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3368-gpio-bank";
reg = <0x0 0xff780000 0x0 0x100>;
clocks = <&cru PCLK_GPIO1>;
interrupts = <GIC_SPI 0x52 IRQ_TYPE_LEVEL_HIGH>;
@@ -1004,7 +1004,7 @@
};
gpio2: gpio@ff790000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3368-gpio-bank";
reg = <0x0 0xff790000 0x0 0x100>;
clocks = <&cru PCLK_GPIO2>;
interrupts = <GIC_SPI 0x53 IRQ_TYPE_LEVEL_HIGH>;
@@ -1017,7 +1017,7 @@
};
gpio3: gpio@ff7a0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3368-gpio-bank";
reg = <0x0 0xff7a0000 0x0 0x100>;
clocks = <&cru PCLK_GPIO3>;
interrupts = <GIC_SPI 0x54 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 1881b4b71..0bb2ab134 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -2085,7 +2085,7 @@
ranges;
gpio0: gpio@ff720000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3399-gpio-bank";
reg = <0x0 0xff720000 0x0 0x100>;
clocks = <&pmucru PCLK_GPIO0_PMU>;
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2098,7 +2098,7 @@
};
gpio1: gpio@ff730000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3399-gpio-bank";
reg = <0x0 0xff730000 0x0 0x100>;
clocks = <&pmucru PCLK_GPIO1_PMU>;
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2111,7 +2111,7 @@
};
gpio2: gpio@ff780000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3399-gpio-bank";
reg = <0x0 0xff780000 0x0 0x100>;
clocks = <&cru PCLK_GPIO2>;
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2124,7 +2124,7 @@
};
gpio3: gpio@ff788000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3399-gpio-bank";
reg = <0x0 0xff788000 0x0 0x100>;
clocks = <&cru PCLK_GPIO3>;
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2137,7 +2137,7 @@
};
gpio4: gpio@ff790000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3399-gpio-bank";
reg = <0x0 0xff790000 0x0 0x100>;
clocks = <&cru PCLK_GPIO4>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index eed0059a6..401095ae9 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -1803,7 +1803,7 @@
ranges;
gpio0: gpio@fdd60000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3568-gpio-bank";
reg = <0x0 0xfdd60000 0x0 0x100>;
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>;
@@ -1814,7 +1814,7 @@
};
gpio1: gpio@fe740000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3568-gpio-bank";
reg = <0x0 0xfe740000 0x0 0x100>;
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
@@ -1825,7 +1825,7 @@
};
gpio2: gpio@fe750000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3568-gpio-bank";
reg = <0x0 0xfe750000 0x0 0x100>;
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>;
@@ -1836,7 +1836,7 @@
};
gpio3: gpio@fe760000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3568-gpio-bank";
reg = <0x0 0xfe760000 0x0 0x100>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>;
@@ -1847,7 +1847,7 @@
};
gpio4: gpio@fe770000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3568-gpio-bank";
reg = <0x0 0xfe770000 0x0 0x100>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index 005cde61b..adfb0dbbe 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -1639,7 +1639,7 @@
#size-cells = <2>;
gpio0: gpio@fd8a0000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3588-gpio-bank";
reg = <0x0 0xfd8a0000 0x0 0x100>;
interrupts = <GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_GPIO0>, <&cru DBCLK_GPIO0>;
@@ -1651,7 +1651,7 @@
};
gpio1: gpio@fec20000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3588-gpio-bank";
reg = <0x0 0xfec20000 0x0 0x100>;
interrupts = <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
@@ -1663,7 +1663,7 @@
};
gpio2: gpio@fec30000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3588-gpio-bank";
reg = <0x0 0xfec30000 0x0 0x100>;
interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>;
@@ -1675,7 +1675,7 @@
};
gpio3: gpio@fec40000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3588-gpio-bank";
reg = <0x0 0xfec40000 0x0 0x100>;
interrupts = <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>;
@@ -1687,7 +1687,7 @@
};
gpio4: gpio@fec50000 {
- compatible = "rockchip,gpio-bank";
+ compatible = "rockchip,rk3588-gpio-bank";
reg = <0x0 0xfec50000 0x0 0x100>;
interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/4] gpio: gpio-rockchip: add compatible string per SoC
2023-01-18 12:14 ` [PATCH v1 2/4] gpio: gpio-rockchip: " Johan Jonker
@ 2023-01-18 14:14 ` Bartosz Golaszewski
2023-01-18 15:35 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2023-01-18 14:14 UTC (permalink / raw)
To: Johan Jonker
Cc: linus.walleij, robh+dt, krzysztof.kozlowski+dt, heiko, linux-gpio,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
kever.yang, sjg, philipp.tomsich
On Wed, Jan 18, 2023 at 1:14 PM Johan Jonker <jbx6244@gmail.com> wrote:
>
> Currently all Rockchip gpio nodes have the same compatible.
> Replace all the compatibles in gpio nodes to be able to
> give them a consistent ID independent from probe order or alias.
>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
>
> For now only add new compatibles.
> No changes to rockchip_gpio_probe() function yet.
> ---
> drivers/gpio/gpio-rockchip.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
> index e5de15a2a..493207de1 100644
> --- a/drivers/gpio/gpio-rockchip.c
> +++ b/drivers/gpio/gpio-rockchip.c
> @@ -790,7 +790,22 @@ static int rockchip_gpio_remove(struct platform_device *pdev)
>
> static const struct of_device_id rockchip_gpio_match[] = {
> { .compatible = "rockchip,gpio-bank", },
> + { .compatible = "rockchip,px30-gpio-bank", },
> + { .compatible = "rockchip,rk3036-gpio-bank", },
> + { .compatible = "rockchip,rk3066a-gpio-bank", },
> + { .compatible = "rockchip,rk3128-gpio-bank", },
> + { .compatible = "rockchip,rk3188-gpio-bank", },
> { .compatible = "rockchip,rk3188-gpio-bank0" },
> + { .compatible = "rockchip,rk3228-gpio-bank", },
> + { .compatible = "rockchip,rk3288-gpio-bank", },
> + { .compatible = "rockchip,rk3328-gpio-bank", },
> + { .compatible = "rockchip,rk3308-gpio-bank", },
> + { .compatible = "rockchip,rk3368-gpio-bank", },
> + { .compatible = "rockchip,rk3399-gpio-bank", },
> + { .compatible = "rockchip,rk3568-gpio-bank", },
> + { .compatible = "rockchip,rk3588-gpio-bank", },
> + { .compatible = "rockchip,rv1108-gpio-bank", },
> + { .compatible = "rockchip,rv1126-gpio-bank", },
> { },
> };
>
> --
> 2.20.1
>
If they don't have any additional data associated with each compatible
- why not just use "rockchip,gpio-bank" as the fallback in DT?
Bart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC
2023-01-18 12:13 [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Johan Jonker
` (2 preceding siblings ...)
2023-01-18 12:15 ` [PATCH v1 4/4] arm64: " Johan Jonker
@ 2023-01-18 15:32 ` Rob Herring
2023-01-18 17:12 ` Johan Jonker
3 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2023-01-18 15:32 UTC (permalink / raw)
To: Johan Jonker
Cc: linus.walleij, brgl, krzysztof.kozlowski+dt, heiko, linux-gpio,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
kever.yang, sjg, philipp.tomsich
On Wed, Jan 18, 2023 at 01:13:23PM +0100, Johan Jonker wrote:
> Currently all Rockchip gpio nodes have the same compatible.
> Replace all the compatibles in gpio nodes to be able to
> give them a consistent ID independent from probe order or alias.
I fail to see how the compatible change affects probe order or aliases.
It is also an ABI break if there is not the existing compatible as a
fallback. State the problem you are trying to solve with this change,
not just what your solution is.
GPIO shouldn't really have an alias either IMO.
Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 2/4] gpio: gpio-rockchip: add compatible string per SoC
2023-01-18 12:14 ` [PATCH v1 2/4] gpio: gpio-rockchip: " Johan Jonker
2023-01-18 14:14 ` Bartosz Golaszewski
@ 2023-01-18 15:35 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-18 15:35 UTC (permalink / raw)
To: Johan Jonker, linus.walleij, brgl
Cc: robh+dt, krzysztof.kozlowski+dt, heiko, linux-gpio, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel, kever.yang, sjg,
philipp.tomsich
On 18/01/2023 13:14, Johan Jonker wrote:
> Currently all Rockchip gpio nodes have the same compatible.
> Replace all the compatibles in gpio nodes to be able to
> give them a consistent ID independent from probe order or alias.
>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
>
> For now only add new compatibles.
> No changes to rockchip_gpio_probe() function yet.
> ---
> drivers/gpio/gpio-rockchip.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
> index e5de15a2a..493207de1 100644
> --- a/drivers/gpio/gpio-rockchip.c
> +++ b/drivers/gpio/gpio-rockchip.c
> @@ -790,7 +790,22 @@ static int rockchip_gpio_remove(struct platform_device *pdev)
>
> static const struct of_device_id rockchip_gpio_match[] = {
> { .compatible = "rockchip,gpio-bank", },
> + { .compatible = "rockchip,px30-gpio-bank", },
> + { .compatible = "rockchip,rk3036-gpio-bank", },
> + { .compatible = "rockchip,rk3066a-gpio-bank", },
> + { .compatible = "rockchip,rk3128-gpio-bank", },
> + { .compatible = "rockchip,rk3188-gpio-bank", },
> { .compatible = "rockchip,rk3188-gpio-bank0" },
> + { .compatible = "rockchip,rk3228-gpio-bank", },
> + { .compatible = "rockchip,rk3288-gpio-bank", },
> + { .compatible = "rockchip,rk3328-gpio-bank", },
> + { .compatible = "rockchip,rk3308-gpio-bank", },
> + { .compatible = "rockchip,rk3368-gpio-bank", },
> + { .compatible = "rockchip,rk3399-gpio-bank", },
> + { .compatible = "rockchip,rk3568-gpio-bank", },
> + { .compatible = "rockchip,rk3588-gpio-bank", },
> + { .compatible = "rockchip,rv1108-gpio-bank", },
> + { .compatible = "rockchip,rv1126-gpio-bank", },
No, this list is useless. Entire patch should be dropped. Just use fallback.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC
2023-01-18 15:32 ` [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Rob Herring
@ 2023-01-18 17:12 ` Johan Jonker
2023-01-18 18:32 ` Krzysztof Kozlowski
0 siblings, 1 reply; 9+ messages in thread
From: Johan Jonker @ 2023-01-18 17:12 UTC (permalink / raw)
To: Rob Herring
Cc: linus.walleij, brgl, krzysztof.kozlowski+dt, heiko, linux-gpio,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
kever.yang, sjg, philipp.tomsich
On 1/18/23 16:32, Rob Herring wrote:
> On Wed, Jan 18, 2023 at 01:13:23PM +0100, Johan Jonker wrote:
>> Currently all Rockchip gpio nodes have the same compatible.
>> Replace all the compatibles in gpio nodes to be able to
>> give them a consistent ID independent from probe order or alias.
>
> I fail to see how the compatible change affects probe order or aliases.
> It is also an ABI break if there is not the existing compatible as a
> fallback. State the problem you are trying to solve with this change,
> not just what your solution is.
Hi Rob,
Since the yaml conversion of rockchip,gpio-bank.yaml we have generic "gpio" names instead of "gpio-1".
For both Linux and U-boot there's a need for a consisted ID order between the nodes.
The kernel has no logic to decide between the first compatible and the fallback.
A fallback doesn't have ability to add/select "data" with probe, but have to use
of_device_is_compatible(np, "rockchip,rk3188-gpio-bank") for "15" SoCs instead.
I can produce a serie with fall back.
Let us know how to move forward here.
Kind regards,
Johan Jonker
===
Linux driver behavior:
id = of_alias_get_id(np, "gpio");
if (id < 0)
id = gpio++;
Problems:
Alias not always available in existing DT files(not part of the binding)
Probe order is not guarantied and possible number gap for rk3066a between gpio4 and gpio6.
(id counter gives not consistent result)
===
U-boot rk_gpio.c current behavior:
end = strrchr(dev->name, '@');
priv->bank = trailing_strtoln(dev->name, end);
priv->name[0] = 'A' + priv->bank;
uc_priv->bank_name = priv->name;
Problems:
Crash when node name has no "gpio-1" format
U-boot rk-gpio proposed:
priv->name[0] = 'A' + dev_seq(dev);
uc_priv->bank_name = priv->name;
Problems:
Reduced FDT's and rk3066a gives number gaps.
===
My proposal:
struct lookup_table rk_gpio_rk3188_data[] = {
{0x2000a000, "A"},
{0x2003c000, "B"},
{0x2003e000, "C"},
{0x20080000, "D"},
};
{ .compatible = "rockchip,rk3188-gpio-bank", .data = &rk_gpio_rk3188_data },
===
See links for previous discussions:
[PATCH v1] arm: dts: rockchip: sync rk3066/rk3188 DT files from linux-next v6.2-rc4 Johan Jonker
https://lore.kernel.org/linux-rockchip/6ec4427e-f56f-7545-2296-bc75d74f4364@theobroma-systems.com/T/#t
[PATCH 1/3] arm64: dts: rk3399: sync rk3399.dtsi from 6.1-rc1 Peter Robinson
https://lore.kernel.org/u-boot/0ab9a600-b517-0ce5-d189-99fc8eddfa60@theobroma-systems.com/
[PATCH/RFC] rockchip: derive GPIO bank from alias if available John Keeping
https://lore.kernel.org/u-boot/CAPnjgZ3j7YVJt+B-uEKS_rsSRBSR-kmyLujV3RozL7kbFNrqFw@mail.gmail.com/
[PATCH] rockchip: derive GPIO bank from alias if available John Keeping
https://lore.kernel.org/u-boot/Y8gaqasu9ho0vl8X@donbot/T/#m00e3823cf74d35a7c8536a1193ed1a77c7698135
Broken U-boot gpio driver:
https://source.denx.de/u-boot/u-boot/-/blob/master/drivers/gpio/rk_gpio.c#L154-L157
>
> GPIO shouldn't really have an alias either IMO.
>
> Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC
2023-01-18 17:12 ` Johan Jonker
@ 2023-01-18 18:32 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-18 18:32 UTC (permalink / raw)
To: Johan Jonker, Rob Herring
Cc: linus.walleij, brgl, krzysztof.kozlowski+dt, heiko, linux-gpio,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
kever.yang, sjg, philipp.tomsich
On 18/01/2023 18:12, Johan Jonker wrote:
>
>
> On 1/18/23 16:32, Rob Herring wrote:
>> On Wed, Jan 18, 2023 at 01:13:23PM +0100, Johan Jonker wrote:
>>> Currently all Rockchip gpio nodes have the same compatible.
>>> Replace all the compatibles in gpio nodes to be able to
>>> give them a consistent ID independent from probe order or alias.
>>
>> I fail to see how the compatible change affects probe order or aliases.
>> It is also an ABI break if there is not the existing compatible as a
>> fallback. State the problem you are trying to solve with this change,
>> not just what your solution is.
>
> Hi Rob,
>
> Since the yaml conversion of rockchip,gpio-bank.yaml we have generic "gpio" names instead of "gpio-1".
> For both Linux and U-boot there's a need for a consisted ID order between the nodes.
Still do not see how compatible is related to this.
>
> The kernel has no logic to decide between the first compatible and the fallback.
> A fallback doesn't have ability to add/select "data" with probe, but have to use
> of_device_is_compatible(np, "rockchip,rk3188-gpio-bank") for "15" SoCs instead.
>
> I can produce a serie with fall back.
> Let us know how to move forward here.
>
> Kind regards,
>
> Johan Jonker
>
>
> ===
> Linux driver behavior:
>
> id = of_alias_get_id(np, "gpio");
> if (id < 0)
> id = gpio++;
>
> Problems:
> Alias not always available in existing DT files(not part of the binding)
> Probe order is not guarantied and possible number gap for rk3066a between gpio4 and gpio6.
> (id counter gives not consistent result)
Again, how compatible is related to this?
>
> ===
> U-boot rk_gpio.c current behavior:
>
> end = strrchr(dev->name, '@');
> priv->bank = trailing_strtoln(dev->name, end);
> priv->name[0] = 'A' + priv->bank;
> uc_priv->bank_name = priv->name;
>
> Problems:
> Crash when node name has no "gpio-1" format
>
> U-boot rk-gpio proposed:
>
> priv->name[0] = 'A' + dev_seq(dev);
> uc_priv->bank_name = priv->name;
>
> Problems:
> Reduced FDT's and rk3066a gives number gaps.
>
> ===
>
> My proposal:
>
> struct lookup_table rk_gpio_rk3188_data[] = {
> {0x2000a000, "A"},
> {0x2003c000, "B"},
> {0x2003e000, "C"},
> {0x20080000, "D"},
> };
>
> { .compatible = "rockchip,rk3188-gpio-bank", .data = &rk_gpio_rk3188_data },
Which you did not do... Your patch is doing something entirely else.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-18 18:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 12:13 [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Johan Jonker
2023-01-18 12:14 ` [PATCH v1 2/4] gpio: gpio-rockchip: " Johan Jonker
2023-01-18 14:14 ` Bartosz Golaszewski
2023-01-18 15:35 ` Krzysztof Kozlowski
2023-01-18 12:15 ` [PATCH v1 3/4] ARM: dts: rockchip: replace compatible gpio nodes Johan Jonker
2023-01-18 12:15 ` [PATCH v1 4/4] arm64: " Johan Jonker
2023-01-18 15:32 ` [PATCH v1 1/4] dt-bindings: gpio: rockchip,gpio-bank: add compatible string per SoC Rob Herring
2023-01-18 17:12 ` Johan Jonker
2023-01-18 18:32 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).