clk: ast2700: bind the generic syscon to the SCU node
Subsystems (5)
Ryan Chen
maintainerPATCH 1/1 clk: ast2700: bind the generic syscon to the SCU node
The clock driver binds to the SCU node, which is also a "syscon", "simple-mfd" node, so the generic syscon driver never binds to it. The SCU then has no syscon device and its child nodes, for example the pin controllers, are never bound: every pinctrl-0 is silently ignored.
Bind the generic syscon driver to the SCU node from the clock driver and select SYSCON for the AST2700.
---
Tested on the AST2700 EVB: the pin controllers and their MDIO/RGMII states are bound and applied.
--- arch/arm/mach-aspeed/Kconfig | 1 + drivers/clk/aspeed/clk_ast2700.c | 12 ++++++++++++ 2 files changed, 13 insertions(+)
arch/arm/mach-aspeed/Kconfig +1 -0
@@ -39,6 +39,7 @@ config ASPEED_AST2600 config ASPEED_AST2700 bool "Support Aspeed AST2700 SoC" select ARM64 + select SYSCON select SYS_ARCH_TIMER help Support for the Aspeed AST2700, an arm64 (Cortex-A35) Baseboard
drivers/clk/aspeed/clk_ast2700.c +12 -0
@@ -918,6 +918,18 @@ static int ast2700_clk_bind(struct udevice *dev)debug ("Warning: failed to bind reset controller: ret = %d\n" , ret); } +/* Bind the generic syscon driver to the same ofnode so that the +* SCU child nodes, such as the pinctrl and its pin configuration +* states, are bound before any consumer device probes and selects +* its default pinctrl state. +*/ +if (CONFIG_IS_ENABLED (SYSCON )) { + ret =device_bind_driver_to_node (dev,"syscon" ,"syscon" , +dev_ofnode (dev),NULL ); +if (ret) +debug ("Warning: failed to bind syscon: ret = %d\n" , ret); + } +return 0 ; }
---
base-commit: 3401e006432abcbf7d73d7210f10df157f990ed3
change-id: 20261102-clk_syscon-9b3c164b671c
Best regards,
Signature · 1 line
Ryan Chen <[email protected]>
Quoted 9 lines · Ryan Chen
The clock driver binds to the SCU node, which is also a "syscon", "simple-mfd" node, so the generic syscon driver never binds to it. The SCU then has no syscon device and its child nodes, for example the pin controllers, are never bound: every pinctrl-0 is silently ignored.
Bind the generic syscon driver to the SCU node from the clock driver and select SYSCON for the AST2700.
[...]
Applied to u-boot/main, thanks!
[1/1] clk: ast2700: bind the generic syscon to the SCU node
commit: bd65e595541fa2da2e82feead6868b5e18c1bc2d
Signature · 1 line
Tom