Skip to contentSkip to conversation

allwinner: a64: add SRAM controller / system control

PATCH Superseded Chen-Yu Tsai 7 participants 20 messages Jun 14, 2018 – Aug 20, 2018

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

v3 cover allwinner: a64: add SRAM controller / system control

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Changes since v2:

- changed the compatible string from "*-sram-controller" to

    "*-system-control"

ChenYu

Chen-Yu Tsai (2):
dt-bindings: sram: Rename A64 SRAM controller compatible
soc: sunxi: sram: Add updated compatible string for A64 system control

Icenowy Zheng (2):
soc: sunxi: export a regmap for EMAC clock reg on A64
arm64: dts: allwinner: a64: add SRAM controller device tree node

 .../devicetree/bindings/sram/sunxi-sram.txt   |  3 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++-
 drivers/soc/sunxi/sunxi_sram.c                | 61 ++++++++++++++++++-
 3 files changed, 78 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/4 soc: sunxi: export a regmap for EMAC clock reg on A64

From: Icenowy Zheng <[email protected]>

The A64 SRAM controller memory zone has a EMAC clock register, which is needed by the Ethernet MAC driver (dwmac-sun8i).

Export a regmap for this register on A64.

[wens at csie.org: export whole address range with only EMAC register
accessible and drop regmap name]

---
 drivers/soc/sunxi/sunxi_sram.c | 57 ++++++++++++++++++++++++++++++++--
 1 file changed, 55 insertions(+), 2 deletions(-)
drivers/soc/sunxi/sunxi_sram.c +55 -2
index 882be5ed7e84..eec7fc6e9f66 100644
@@ -17,6 +17,7 @@
 #include <linux/of_address.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
+#include <linux/regmap.h>
 
 #include <linux/soc/sunxi/sunxi_sram.h>
 
@@ -281,13 +282,51 @@ int sunxi_sram_release(struct device *dev)
 }
 EXPORT_SYMBOL(sunxi_sram_release);
 
+struct sunxi_sramc_variant {
+	bool has_emac_clock;
+};
+
+static const struct sunxi_sramc_variant sun4i_a10_sramc_variant = {
+	/* Nothing special */
+};
+
+static const struct sunxi_sramc_variant sun50i_a64_sramc_variant = {
+	.has_emac_clock = true,
+};
+
+#define SUNXI_SRAM_EMAC_CLOCK_REG	0x30
+static bool sunxi_sram_regmap_accessible_reg(struct device *dev,
+					     unsigned int reg)
+{
+	if (reg == SUNXI_SRAM_EMAC_CLOCK_REG)
+		return true;
+	return false;
+}
+
+static struct regmap_config sunxi_sram_emac_clock_regmap = {
+	.reg_bits       = 32,
+	.val_bits       = 32,
+	.reg_stride     = 4,
+	/* last defined register */
+	.max_register   = SUNXI_SRAM_EMAC_CLOCK_REG,
+	/* other devices have no business accessing other registers */
+	.readable_reg	= sunxi_sram_regmap_accessible_reg,
+	.writeable_reg	= sunxi_sram_regmap_accessible_reg,
+};
+
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
 	struct resource *res;
 	struct dentry *d;
+	struct regmap *emac_clock;
+	const struct sunxi_sramc_variant *variant;
 
 	sram_dev = &pdev->dev;
 
+	variant = of_device_get_match_data(&pdev->dev);
+	if (!variant)
+		return -EINVAL;
+
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(base))
@@ -300,12 +339,26 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!d)
 		return -ENOMEM;
 
+	if (variant->has_emac_clock) {
+		emac_clock = devm_regmap_init_mmio(&pdev->dev, base,
+						   &sunxi_sram_emac_clock_regmap);
+
+		if (IS_ERR(emac_clock))
+			return PTR_ERR(emac_clock);
+	}
+
 	return 0;
 }
 
 static const struct of_device_id sunxi_sram_dt_match[] = {
-	{ .compatible = "allwinner,sun4i-a10-sram-controller" },
-	{ .compatible = "allwinner,sun50i-a64-sram-controller" },
+	{
+		.compatible = "allwinner,sun4i-a10-sram-controller",
+		.data = &sun4i_a10_sramc_variant,
+	},
+	{
+		.compatible = "allwinner,sun50i-a64-sram-controller",
+		.data = &sun50i_a64_sramc_variant,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, sunxi_sram_dt_match);
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 2/4 dt-bindings: sram: Rename A64 SRAM controller compatible

In reply to Chen-Yu Tsai

The SRAM mapping controls on Allwinner SoCs is located in a block called "System Controls". This block also has registers for identifying the SoC, reading the state of an external boot-related pin, and on some newer SoCs, glue layer controls for the EMAC Ethernet controller.

The A64 variant compatible is renamed to "allwinner,a64-system-control" to reflect this. The old A64 compatible is deprecated. So far we haven't seen any actual use of it.

---
 Documentation/devicetree/bindings/sram/sunxi-sram.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/sram/sunxi-sram.txt +2 -1
index d087f04a4d7f..9ef40e2e0a48 100644
@@ -11,7 +11,8 @@ Controller Node
 Required properties:
 - compatible : should be:
     - "allwinner,sun4i-a10-sram-controller"
-    - "allwinner,sun50i-a64-sram-controller"
+    - "allwinner,sun50i-a64-sram-controller" (deprecated)
+    - "allwinner,sun50i-a64-system-control"
 - reg : sram controller register offset + length
 
 SRAM nodes
Signature · 1 line
2.17.1
maintainer
#3 lore raw

PATCH v3 2/4 dt-bindings: sram: Rename A64 SRAM controller compatible

Quoted 5 lines · Chen-Yu Tsai

The SRAM mapping controls on Allwinner SoCs is located in a block called "System Controls". This block also has registers for identifying the SoC, reading the state of an external boot-related pin, and on some newer SoCs, glue layer controls for the EMAC Ethernet controller.

Quoted 8 lines

The A64 variant compatible is renamed to "allwinner,a64-system-control" to reflect this. The old A64 compatible is deprecated. So far we haven't seen any actual use of it.

---
 Documentation/devicetree/bindings/sram/sunxi-sram.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
#4 lore raw

PATCH v3 3/4 soc: sunxi: sram: Add updated compatible string for A64 system control

In reply to Chen-Yu Tsai

The SRAM mapping controls on Allwinner SoCs is located in a block called "System Controls". This block also has registers for identifying the SoC, reading the state of an external boot-related pin, and on some newer SoCs, glue layer controls for the EMAC Ethernet controller.

The A64 variant compatible is renamed to "allwinner,a64-system-control" to reflect this. The old A64 compatible is deprecated. So far we haven't seen any actual use of it.

---
 drivers/soc/sunxi/sunxi_sram.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/soc/sunxi/sunxi_sram.c +4 -0
index eec7fc6e9f66..7fec1b160dbb 100644
@@ -359,6 +359,10 @@ static const struct of_device_id sunxi_sram_dt_match[] = {
 		.compatible = "allwinner,sun50i-a64-sram-controller",
 		.data = &sun50i_a64_sramc_variant,
 	},
+	{
+		.compatible = "allwinner,sun50i-a64-system-control",
+		.data = &sun50i_a64_sramc_variant,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, sunxi_sram_dt_match);
Signature · 1 line
2.17.1
#5 lore raw

PATCH v3 4/4 arm64: dts: allwinner: a64: add SRAM controller device tree node

In reply to Chen-Yu Tsai

From: Icenowy Zheng <[email protected]>

Allwinner A64 has a SRAM controller, and in the device tree currently we have a syscon node to enable EMAC driver to access the EMAC clock register. As SRAM controller driver can now export regmap for this register, replace the syscon node to the SRAM controller device node, and let EMAC driver to acquire its EMAC clock regmap.

[wens at csie.org: Updated compatible string]
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +17 -2
index 1b2ef28c42bd..87968dafe1dc 100644
@@ -169,9 +169,24 @@
 		ranges;
 
 		syscon: syscon at 1c00000 {
-			compatible = "allwinner,sun50i-a64-system-controller",
-				"syscon";
+			compatible = "allwinner,sun50i-a64-system-control";
 			reg = <0x01c00000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			sram_c: sram at 18000 {
+				compatible = "mmio-sram";
+				reg = <0x00018000 0x28000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0x00018000 0x28000>;
+
+				de2_sram: sram-section at 0 {
+					compatible = "allwinner,sun50i-a64-sram-c";
+					reg = <0x0000 0x28000>;
+				};
+			};
 		};
 
 		dma: dma-controller at 1c02000 {
Signature · 1 line
2.17.1
#6 lore raw

PATCH v3 4/4 arm64: dts: allwinner: a64: add SRAM controller device tree node

Quoted 29 lines · Chen-Yu Tsai

From: Icenowy Zheng <[email protected]>

Allwinner A64 has a SRAM controller, and in the device tree currently we have a syscon node to enable EMAC driver to access the EMAC clock register. As SRAM controller driver can now export regmap for this register, replace the syscon node to the SRAM controller device node, and let EMAC driver to acquire its EMAC clock regmap.

[wens at csie.org: Updated compatible string]
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -2
index 1b2ef28c42bd..87968dafe1dc 100644
@@ -169,9 +169,24 @@
                ranges;
 
                syscon: syscon at 1c00000 {
-                       compatible = "allwinner,sun50i-a64-system-controller",
-                               "syscon";
+                       compatible = "allwinner,sun50i-a64-system-control";
                        reg = <0x01c00000 0x1000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 185

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +10 -0
+                       ranges;
+
+                       sram_c: sram at 18000 {
+                               compatible = "mmio-sram";
+                               reg = <0x00018000 0x28000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x00018000 0x28000>;
+
+                               de2_sram: sram-section at 0 {

So, this can attach to display-engine node through allwinner,sram and add support to claim the sram on sun4i/sun4i_drv.c, correct?

maintainer
#7 lore raw

PATCH v3 4/4 arm64: dts: allwinner: a64: add SRAM controller device tree node

Dne ?etrtek, 14. junij 2018 ob 19:09:56 CEST je Jagan Teki napisal(a):

Quoted 36 lines · Chen-Yu Tsai
Quoted 35 lines

From: Icenowy Zheng <[email protected]>

Allwinner A64 has a SRAM controller, and in the device tree currently we have a syscon node to enable EMAC driver to access the EMAC clock register. As SRAM controller driver can now export regmap for this register, replace the syscon node to the SRAM controller device node, and let EMAC driver to acquire its EMAC clock regmap.

[wens at csie.org: Updated compatible string]

---

 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1b2ef28c42bd..87968dafe1dc 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -1
@@ -169,9 +169,24 @@
 
                ranges;
 
                syscon: syscon at 1c00000 {
 
-                       compatible =

"allwinner,sun50i-a64-system-controller", -
"syscon";
+ compatible =
"allwinner,sun50i-a64-system-control";

                        reg = <0x01c00000 0x1000>;
Quoted 15 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 185

Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +12 -0
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       sram_c: sram at 18000 {
+                               compatible = "mmio-sram";
+                               reg = <0x00018000 0x28000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x00018000 0x28000>;
+
+                               de2_sram: sram-section at 0 {

So, this can attach to display-engine node through allwinner,sram and add support to claim the sram on sun4i/sun4i_drv.c, correct?

Actually, it has to be added to display_clocks node and claimed in drivers/ clk/sunxi-ng/ccu-sun8i-de2.c

Best regards,
Jernej

#8 lore raw

PATCH v3 4/4 arm64: dts: allwinner: a64: add SRAM controller device tree node

? 2018?6?15? GMT+08:00 ??1:27:21, "Jernej ?krabec" <[email protected]> ??:

Quoted 58 lines

Dne ?etrtek, 14. junij 2018 ob 19:09:56 CEST je Jagan Teki napisal(a):

Quoted 4 lines · Chen-Yu Tsai
Quoted 3 lines

From: Icenowy Zheng <[email protected]>

Allwinner A64 has a SRAM controller, and in the device tree

currently

Quoted 1 line
Quoted 1 line

we have a syscon node to enable EMAC driver to access the EMAC

clock

Quoted 2 lines
Quoted 2 lines

register. As SRAM controller driver can now export regmap for this register, replace the syscon node to the SRAM controller device

node,

Quoted 8 lines
Quoted 8 lines

and let EMAC driver to acquire its EMAC clock regmap.

[wens at csie.org: Updated compatible string]

---

 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19

+++++++++++++++++--

Quoted 22 lines
Quoted 22 lines
 1 file changed, 17 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1b2ef28c42bd..87968dafe1dc 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -1
@@ -169,9 +169,24 @@
 
                ranges;
 
                syscon: syscon at 1c00000 {
 
-                       compatible =

"allwinner,sun50i-a64-system-controller", -

"syscon";
+ compatible =
"allwinner,sun50i-a64-system-control";

                        reg = <0x01c00000 0x1000>;
Quoted 15 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 185

Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +12 -0
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       sram_c: sram at 18000 {
+                               compatible = "mmio-sram";
+                               reg = <0x00018000 0x28000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x00018000 0x28000>;
+
+                               de2_sram: sram-section at 0 {

So, this can attach to display-engine node through allwinner,sram and add support to claim the sram on sun4i/sun4i_drv.c, correct?

Quoted 3 lines

Actually, it has to be added to display_clocks node and claimed in drivers/
clk/sunxi-ng/ccu-sun8i-de2.c

Sorry it's old practice.

My new way is to add a bus driver which claims the SRAM.

Quoted 10 lines

Best regards,
Jernej

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#9 lore raw

PATCH v3 4/4 arm64: dts: allwinner: a64: add SRAM controller device tree node

Quoted 61 lines · Icenowy Zheng

? 2018?6?15? GMT+08:00 ??1:27:21, "Jernej ?krabec" <[email protected]> ??:

Quoted 58 lines

Dne ?etrtek, 14. junij 2018 ob 19:09:56 CEST je Jagan Teki napisal(a):

Quoted 4 lines · Chen-Yu Tsai
Quoted 3 lines

From: Icenowy Zheng <[email protected]>

Allwinner A64 has a SRAM controller, and in the device tree

currently

Quoted 1 line
Quoted 1 line

we have a syscon node to enable EMAC driver to access the EMAC

clock

Quoted 2 lines
Quoted 2 lines

register. As SRAM controller driver can now export regmap for this register, replace the syscon node to the SRAM controller device

node,

Quoted 8 lines
Quoted 8 lines

and let EMAC driver to acquire its EMAC clock regmap.

[wens at csie.org: Updated compatible string]

---

 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19

+++++++++++++++++--

Quoted 37 lines
Quoted 24 lines
 1 file changed, 17 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1b2ef28c42bd..87968dafe1dc 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -1
@@ -169,9 +169,24 @@
 
                ranges;
 
                syscon: syscon at 1c00000 {
 
-                       compatible =

"allwinner,sun50i-a64-system-controller", -

"syscon";
+ compatible =
"allwinner,sun50i-a64-system-control";

                        reg = <0x01c00000 0x1000>;
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +2 -0
+                       #address-cells = <1>;
+                       #size-cells = <1>;

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 185

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +10 -0
+                       ranges;
+
+                       sram_c: sram at 18000 {
+                               compatible = "mmio-sram";
+                               reg = <0x00018000 0x28000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x00018000 0x28000>;
+
+                               de2_sram: sram-section at 0 {

So, this can attach to display-engine node through allwinner,sram and add support to claim the sram on sun4i/sun4i_drv.c, correct?

Quoted 7 lines
Quoted 3 lines

Actually, it has to be added to display_clocks node and claimed in drivers/
clk/sunxi-ng/ccu-sun8i-de2.c

Sorry it's old practice.

My new way is to add a bus driver which claims the SRAM.

Are you pointing this driver[1] ? if yes do we have recent version patches for these changes so-that I can import.

[1] https://patchwork.kernel.org/patch/10290399/

#10 lore raw

PATCH v3 4/4 arm64: dts: allwinner: a64: add SRAM controller device tree node

? 2018?6?19? GMT+08:00 ??3:36:19, Jagan Teki <[email protected]> ??:

Quoted 71 lines · Icenowy Zheng
Quoted 3 lines

? 2018?6?15? GMT+08:00 ??1:27:21, "Jernej ?krabec"

<[email protected]> ??:

Quoted 1 line
Quoted 1 line

Dne ?etrtek, 14. junij 2018 ob 19:09:56 CEST je Jagan Teki

napisal(a):

Quoted 1 line
Quoted 1 line
Quoted 1 line

On Thu, Jun 14, 2018 at 9:05 PM, Chen-Yu Tsai <[email protected]>

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

From: Icenowy Zheng <[email protected]>

Allwinner A64 has a SRAM controller, and in the device tree

currently

Quoted 1 line
Quoted 1 line

we have a syscon node to enable EMAC driver to access the EMAC

clock

Quoted 1 line
Quoted 1 line

register. As SRAM controller driver can now export regmap for

this

Quoted 33 lines
Quoted 33 lines
Quoted 1 line
Quoted 1 line

register, replace the syscon node to the SRAM controller device

node,

Quoted 8 lines
Quoted 8 lines

and let EMAC driver to acquire its EMAC clock regmap.

[wens at csie.org: Updated compatible string]

---

 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19

+++++++++++++++++--

Quoted 22 lines
Quoted 22 lines
 1 file changed, 17 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1b2ef28c42bd..87968dafe1dc 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -1
@@ -169,9 +169,24 @@
 
                ranges;
 
                syscon: syscon at 1c00000 {
 
-                       compatible =

"allwinner,sun50i-a64-system-controller", -

"syscon";
+ compatible =
"allwinner,sun50i-a64-system-control";

                        reg = <0x01c00000 0x1000>;
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +6 -0
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       sram_c: sram at 18000 {
+                               compatible = "mmio-sram";
Quoted 8 lines
Quoted 8 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 185

Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +6 -0
+                               reg = <0x00018000 0x28000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x00018000 0x28000>;
+
+                               de2_sram: sram-section at 0 {

So, this can attach to display-engine node through allwinner,sram

and

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

add support to claim the sram on sun4i/sun4i_drv.c, correct?

Actually, it has to be added to display_clocks node and claimed in drivers/
clk/sunxi-ng/ccu-sun8i-de2.c

Quoted 6 lines
Quoted 3 lines

Sorry it's old practice.

My new way is to add a bus driver which claims the SRAM.

Are you pointing this driver[1] ? if yes do we have recent version patches for these changes so-that I can import.

I'll resend it when this patchset is ready.

Quoted 2 lines

[1] https://patchwork.kernel.org/patch/10290399/

#11 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

In reply to Chen-Yu Tsai
Quoted 12 lines · Chen-Yu Tsai

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

Quoted 8 lines

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

For the serie:

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180615/9fbf8015/attachment.sig>
#12 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Chen-Yu Tsai

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

Quoted 8 lines
Quoted 5 lines

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

For the serie:

Cool. I'll apply them once you've rebased and pushed out any patches you queued up during the merge window.

ChenYu

#13 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 21 lines · Chen-Yu Tsai
Quoted 19 lines · Maxime Ripard
Quoted 18 lines · Chen-Yu Tsai

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

For the serie:

Cool. I'll apply them once you've rebased and pushed out any patches you queued up during the merge window.

All should be pushed now, feel free to apply them :)

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180618/4398cd96/attachment-0001.sig>
author Applied
#14 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 25 lines · Maxime Ripard
Quoted 24 lines · Chen-Yu Tsai
Quoted 22 lines · Maxime Ripard
Quoted 20 lines · Chen-Yu Tsai

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

For the serie:

Cool. I'll apply them once you've rebased and pushed out any patches you queued up during the merge window.

All should be pushed now, feel free to apply them :)

Applied. Thanks.

ChenYu

#15 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

In reply to Chen-Yu Tsai

Hello Chen-Yu,

Quoted 33 lines · On Thu, 14 Jun 2018 23:35:44 +0800 Chen-Yu Tsai <[email protected]> wrote:

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Changes since v2:

- changed the compatible string from "*-sram-controller" to

    "*-system-control"

ChenYu

Chen-Yu Tsai (2):
dt-bindings: sram: Rename A64 SRAM controller compatible
soc: sunxi: sram: Add updated compatible string for A64 system control

Quoted 11 lines

Icenowy Zheng (2):
soc: sunxi: export a regmap for EMAC clock reg on A64
arm64: dts: allwinner: a64: add SRAM controller device tree node

 .../devicetree/bindings/sram/sunxi-sram.txt   |  3 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++-
 drivers/soc/sunxi/sunxi_sram.c                | 61 ++++++++++++++++++-
 3 files changed, 78 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1

I wish to have seen this serie before as it have some inconsistencies.

In patch 2 you renamed allwinner,sun50i-a64-sram-controller to
allwinner,sun50i-a64-system-control but the former was never used in the DTS, the compatible used was allwinner,sun50i-a64-system-controller.
You also say that you've never seen use of it. How can you make that
claim ? There is a lot of downstream users of DTS now (FreeBSD, NetBSD, OpenBSD and even RiscOS and Haiku iirc), it's not just Linux.
Also this compatible is currently the one used in the u-boot dts,
which mean that users of the embedded DTB use or can use it (which is the default for EFI users of U-Boot).

Cheers,

Signature · 1 line
Emmanuel Vadot <[email protected]> <[email protected]>
#16 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 51 lines · Emmanuel Vadot

Hello Chen-Yu,

Quoted 37 lines · On Thu, 14 Jun 2018 23:35:44 +0800 Chen-Yu Tsai <[email protected]> wrote:

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Changes since v2:

- changed the compatible string from "*-sram-controller" to

    "*-system-control"

ChenYu

Chen-Yu Tsai (2):
dt-bindings: sram: Rename A64 SRAM controller compatible
soc: sunxi: sram: Add updated compatible string for A64 system control

Icenowy Zheng (2):
soc: sunxi: export a regmap for EMAC clock reg on A64
arm64: dts: allwinner: a64: add SRAM controller device tree node

Quoted 7 lines
 .../devicetree/bindings/sram/sunxi-sram.txt   |  3 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++-
 drivers/soc/sunxi/sunxi_sram.c                | 61 ++++++++++++++++++-
 3 files changed, 78 insertions(+), 5 deletions(-)

--
2.17.1

Quoted 8 lines

I wish to have seen this serie before as it have some inconsistencies.

In patch 2 you renamed allwinner,sun50i-a64-sram-controller to
allwinner,sun50i-a64-system-control but the former was never used in the DTS, the compatible used was allwinner,sun50i-a64-system-controller.
You also say that you've never seen use of it. How can you make that
claim ? There is a lot of downstream users of DTS now (FreeBSD, NetBSD, OpenBSD and even RiscOS and Haiku iirc), it's not just Linux.

The original "a64-sram-controller" was never used in any upstream device tree, be it Linux or U-boot. Since the projects you listed all derive their device trees from U-boot, with maybe some extra devices on top, they would either have had the "system-controller" version, or the even earlier version in U-boot where the emac node just lists the syscon address range as its own.

U-boot has the latter "system-controller" because it was copied from Linux. The original use-case was a SoC-specific compatible string followed by the very generic "syscon". The latter "syscon" binding is what we actually support in Linux and U-boot. Same goes for NetBSD and OpenBSD.

IMHO FreeBSD could also move to a generic syscon API, instead of "system-controller" for sunxi and "grf" for rockchip.

You can continue to support old device trees and the unlisted compatible through the generic "syscon" fallback. For the updated device tree you will have to support the new compatible, along with supporting the SRAM mappings. The SRAM mappings are why the "syscon" compatible was removed. It just doesn't fit the semantics described by the "syscon" binding.

Quoted 3 lines

Also this compatible is currently the one used in the u-boot dts,
which mean that users of the embedded DTB use or can use it (which is the default for EFI users of U-Boot).

As mentioned above, the old device tree uses the syscon binding, which you can continue to support. The new binding is add support for the SRAM mapping system. In addition, you probably don't want two device drivers supporting the same compatible string. On Linux it's even worse, because the "syscon" driver sidesteps the device model and isn't an actual device driver.

Regards
ChenYu

#17 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 68 lines · On Mon, 20 Aug 2018 16:41:09 +0800 Chen-Yu Tsai <[email protected]> wrote:
Quoted 51 lines · Emmanuel Vadot

Hello Chen-Yu,

Quoted 37 lines · On Thu, 14 Jun 2018 23:35:44 +0800 Chen-Yu Tsai <[email protected]> wrote:

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Changes since v2:

- changed the compatible string from "*-sram-controller" to

    "*-system-control"

ChenYu

Chen-Yu Tsai (2):
dt-bindings: sram: Rename A64 SRAM controller compatible
soc: sunxi: sram: Add updated compatible string for A64 system control

Icenowy Zheng (2):
soc: sunxi: export a regmap for EMAC clock reg on A64
arm64: dts: allwinner: a64: add SRAM controller device tree node

Quoted 7 lines
 .../devicetree/bindings/sram/sunxi-sram.txt   |  3 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++-
 drivers/soc/sunxi/sunxi_sram.c                | 61 ++++++++++++++++++-
 3 files changed, 78 insertions(+), 5 deletions(-)

--
2.17.1

Quoted 8 lines

I wish to have seen this serie before as it have some inconsistencies.

In patch 2 you renamed allwinner,sun50i-a64-sram-controller to
allwinner,sun50i-a64-system-control but the former was never used in the DTS, the compatible used was allwinner,sun50i-a64-system-controller.
You also say that you've never seen use of it. How can you make that
claim ? There is a lot of downstream users of DTS now (FreeBSD, NetBSD, OpenBSD and even RiscOS and Haiku iirc), it's not just Linux.

The original "a64-sram-controller" was never used in any upstream device tree, be it Linux or U-boot. Since the projects you listed all derive their device trees from U-boot, with maybe some extra devices on top, they would either have had the "system-controller" version, or the even earlier version in U-boot where the emac node just lists the syscon address range as its own.

Quoted 7 lines

U-boot has the latter "system-controller" because it was copied from Linux. The original use-case was a SoC-specific compatible string followed by the very generic "syscon". The latter "syscon" binding is what we actually support in Linux and U-boot. Same goes for NetBSD and OpenBSD.

IMHO FreeBSD could also move to a generic syscon API, instead of "system-controller" for sunxi and "grf" for rockchip.

We decided to always implement a specific driver if the node have
another compatible than syscon (I don't see the point of having a syscon compatible plus another one)

Quoted 5 lines

You can continue to support old device trees and the unlisted compatible through the generic "syscon" fallback. For the updated device tree you will have to support the new compatible, along with supporting the SRAM mappings. The SRAM mappings are why the "syscon" compatible was removed. It just doesn't fit the semantics described by the "syscon" binding.

I understand the removal of syscon since the sram addition, I just
don't understand the strict renaming and why adding a new one couldn't work.

Quoted 18 lines
Quoted 3 lines

Also this compatible is currently the one used in the u-boot dts,
which mean that users of the embedded DTB use or can use it (which is the default for EFI users of U-Boot).

As mentioned above, the old device tree uses the syscon binding, which you can continue to support. The new binding is add support for the SRAM mapping system. In addition, you probably don't want two device drivers supporting the same compatible string. On Linux it's even worse, because the "syscon" driver sidesteps the device model and isn't an actual device driver.

Regards
ChenYu

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 1 line
Emmanuel Vadot <[email protected]> <[email protected]>
#18 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 76 lines · Emmanuel Vadot
Quoted 73 lines · On Mon, 20 Aug 2018 16:41:09 +0800 Chen-Yu Tsai <[email protected]> wrote:
Quoted 51 lines · Emmanuel Vadot

Hello Chen-Yu,

Quoted 37 lines · On Thu, 14 Jun 2018 23:35:44 +0800 Chen-Yu Tsai <[email protected]> wrote:

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Changes since v2:

- changed the compatible string from "*-sram-controller" to

    "*-system-control"

ChenYu

Chen-Yu Tsai (2):
dt-bindings: sram: Rename A64 SRAM controller compatible
soc: sunxi: sram: Add updated compatible string for A64 system control

Icenowy Zheng (2):
soc: sunxi: export a regmap for EMAC clock reg on A64
arm64: dts: allwinner: a64: add SRAM controller device tree node

Quoted 7 lines
 .../devicetree/bindings/sram/sunxi-sram.txt   |  3 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++-
 drivers/soc/sunxi/sunxi_sram.c                | 61 ++++++++++++++++++-
 3 files changed, 78 insertions(+), 5 deletions(-)

--
2.17.1

Quoted 8 lines

I wish to have seen this serie before as it have some inconsistencies.

In patch 2 you renamed allwinner,sun50i-a64-sram-controller to
allwinner,sun50i-a64-system-control but the former was never used in the DTS, the compatible used was allwinner,sun50i-a64-system-controller.
You also say that you've never seen use of it. How can you make that
claim ? There is a lot of downstream users of DTS now (FreeBSD, NetBSD, OpenBSD and even RiscOS and Haiku iirc), it's not just Linux.

The original "a64-sram-controller" was never used in any upstream device tree, be it Linux or U-boot. Since the projects you listed all derive their device trees from U-boot, with maybe some extra devices on top, they would either have had the "system-controller" version, or the even earlier version in U-boot where the emac node just lists the syscon address range as its own.

U-boot has the latter "system-controller" because it was copied from Linux. The original use-case was a SoC-specific compatible string followed by the very generic "syscon". The latter "syscon" binding is what we actually support in Linux and U-boot. Same goes for NetBSD and OpenBSD.

Quoted 6 lines
Quoted 2 lines

IMHO FreeBSD could also move to a generic syscon API, instead of "system-controller" for sunxi and "grf" for rockchip.

We decided to always implement a specific driver if the node have
another compatible than syscon (I don't see the point of having a syscon compatible plus another one)

In most cases, the fallback is there in situations when support for the older or more generic device type can work with the new device, albeit at lower efficiency or without full functionality.

Using a specific one with the "syscon" doesn't quite make sense to me either, but some platforms, like Rockchip, do use it. I suppose it would help them identify the type of syscon, but I think that is really tied to the consumer.

Quoted 9 lines
Quoted 5 lines

You can continue to support old device trees and the unlisted compatible through the generic "syscon" fallback. For the updated device tree you will have to support the new compatible, along with supporting the SRAM mappings. The SRAM mappings are why the "syscon" compatible was removed. It just doesn't fit the semantics described by the "syscon" binding.

I understand the removal of syscon since the sram addition, I just
don't understand the strict renaming and why adding a new one couldn't work.

You mean having something like the following?

compatible = "allwinner,sun50i-a64-system-control",
"allwinner,sun50i-a64-system-controller";

Well, the "system-controller" compatible was never listed in any binding, and it shouldn't have been there in the first place. And I think having the compatibles match up with the datasheet is better. Last, it is not an actual "controller". It is just a set of control registers.

ChenYu

Quoted 22 lines
Quoted 11 lines
Quoted 3 lines

Also this compatible is currently the one used in the u-boot dts,
which mean that users of the embedded DTB use or can use it (which is the default for EFI users of U-Boot).

As mentioned above, the old device tree uses the syscon binding, which you can continue to support. The new binding is add support for the SRAM mapping system. In addition, you probably don't want two device drivers supporting the same compatible string. On Linux it's even worse, because the "syscon" driver sidesteps the device model and isn't an actual device driver.

Quoted 7 lines

Regards
ChenYu

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
Emmanuel Vadot <[email protected]> <[email protected]>

#19 lore raw

v3 cover allwinner: a64: add SRAM controller / system control

Quoted 84 lines · On Mon, 20 Aug 2018 22:25:16 +0800 Chen-Yu Tsai <[email protected]> wrote:
Quoted 76 lines · Emmanuel Vadot
Quoted 73 lines · On Mon, 20 Aug 2018 16:41:09 +0800 Chen-Yu Tsai <[email protected]> wrote:
Quoted 51 lines · Emmanuel Vadot

Hello Chen-Yu,

Quoted 37 lines · On Thu, 14 Jun 2018 23:35:44 +0800 Chen-Yu Tsai <[email protected]> wrote:

Hi,

This series is the remaining A64 syscon changes from the R40 DWMAC series. The series aligns how the A64 system control exports a regmap for the sun8i DWMAC driver to access with what we've done for the R40.

Originally the A64 used the generic syscon for this bit of hardware. But this block also contains mapping bits for the onboard SRAM, used by various peripherals, and other vendor specific bits we may use in the future. It is by no means generic. And we already have a device tree binding and driver for the SRAM part.

The first patch make the SRAM control device export a regmap, exposing a single EMAC control register, for the DWMAC driver to consume.

The second and third patches rename the A64 compatible string to read "system control", which is what the block is named in the user manual.

The last patch fixes up the device node, and also adds the lone mappable SRAM block, which is needed by the Display Engine.

Changes since v2:

- changed the compatible string from "*-sram-controller" to

    "*-system-control"

ChenYu

Chen-Yu Tsai (2):
dt-bindings: sram: Rename A64 SRAM controller compatible
soc: sunxi: sram: Add updated compatible string for A64 system control

Icenowy Zheng (2):
soc: sunxi: export a regmap for EMAC clock reg on A64
arm64: dts: allwinner: a64: add SRAM controller device tree node

Quoted 7 lines
 .../devicetree/bindings/sram/sunxi-sram.txt   |  3 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++-
 drivers/soc/sunxi/sunxi_sram.c                | 61 ++++++++++++++++++-
 3 files changed, 78 insertions(+), 5 deletions(-)

--
2.17.1

Quoted 8 lines

I wish to have seen this serie before as it have some inconsistencies.

In patch 2 you renamed allwinner,sun50i-a64-sram-controller to
allwinner,sun50i-a64-system-control but the former was never used in the DTS, the compatible used was allwinner,sun50i-a64-system-controller.
You also say that you've never seen use of it. How can you make that
claim ? There is a lot of downstream users of DTS now (FreeBSD, NetBSD, OpenBSD and even RiscOS and Haiku iirc), it's not just Linux.

The original "a64-sram-controller" was never used in any upstream device tree, be it Linux or U-boot. Since the projects you listed all derive their device trees from U-boot, with maybe some extra devices on top, they would either have had the "system-controller" version, or the even earlier version in U-boot where the emac node just lists the syscon address range as its own.

U-boot has the latter "system-controller" because it was copied from Linux. The original use-case was a SoC-specific compatible string followed by the very generic "syscon". The latter "syscon" binding is what we actually support in Linux and U-boot. Same goes for NetBSD and OpenBSD.

Quoted 6 lines
Quoted 2 lines

IMHO FreeBSD could also move to a generic syscon API, instead of "system-controller" for sunxi and "grf" for rockchip.

We decided to always implement a specific driver if the node have
another compatible than syscon (I don't see the point of having a syscon compatible plus another one)

Quoted 8 lines

In most cases, the fallback is there in situations when support for the older or more generic device type can work with the new device, albeit at lower efficiency or without full functionality.

Using a specific one with the "syscon" doesn't quite make sense to me either, but some platforms, like Rockchip, do use it. I suppose it would help them identify the type of syscon, but I think that is really tied to the consumer.

Maybe we should revised our decision then.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

You can continue to support old device trees and the unlisted compatible through the generic "syscon" fallback. For the updated device tree you will have to support the new compatible, along with supporting the SRAM mappings. The SRAM mappings are why the "syscon" compatible was removed. It just doesn't fit the semantics described by the "syscon" binding.

Quoted 8 lines
Quoted 3 lines

I understand the removal of syscon since the sram addition, I just
don't understand the strict renaming and why adding a new one couldn't work.

You mean having something like the following?

compatible = "allwinner,sun50i-a64-system-control",
"allwinner,sun50i-a64-system-controller";

Yes.

Quoted 4 lines

Well, the "system-controller" compatible was never listed in any binding, and it shouldn't have been there in the first place. And I think having the compatibles match up with the datasheet is better. Last, it is not an actual "controller". It is just a set of control registers.

Yes I think the main problem was that some non-documented binding was
used.

Quoted 24 lines

ChenYu

Quoted 22 lines
Quoted 11 lines
Quoted 3 lines

Also this compatible is currently the one used in the u-boot dts,
which mean that users of the embedded DTB use or can use it (which is the default for EFI users of U-Boot).

As mentioned above, the old device tree uses the syscon binding, which you can continue to support. The new binding is add support for the SRAM mapping system. In addition, you probably don't want two device drivers supporting the same compatible string. On Linux it's even worse, because the "syscon" driver sidesteps the device model and isn't an actual device driver.

Quoted 7 lines

Regards
ChenYu

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
Emmanuel Vadot <[email protected]> <[email protected]>

Signature · 1 line
Emmanuel Vadot <[email protected]> <[email protected]>