[PATCH u-boot, v2019.04-aspeed-openbmc v1 1/3] pinctrl: aspeed: append SGPM nodes

Dmitriy Sharikhin d.sharikhin at yadro.com
Thu May 16 02:05:27 AEST 2024


For correct SGPIO operation we need SGPM pinctrl function.
Declare it according to datasheet for AST2400/AST2500/AST2600

Signed-off-by: Dmitrii Sharikhin <d.sharikhin at yadro.com>
---
 drivers/pinctrl/aspeed/pinctrl_ast2400.c |  5 +++++
 drivers/pinctrl/aspeed/pinctrl_ast2500.c |  5 +++++
 drivers/pinctrl/aspeed/pinctrl_ast2600.c | 13 +++++++++++++
 3 files changed, 23 insertions(+)

diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2400.c b/drivers/pinctrl/aspeed/pinctrl_ast2400.c
index 531e116c79..193fbbc24e 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2400.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2400.c
@@ -117,6 +117,10 @@ static struct aspeed_sig_desc sdio2_link[] = {
 	{ 0x90, BIT(1), 0	},
 };
 
+static struct aspeed_sig_desc sgpm_link[] = {
+	{ 0x84, GENMASK(11, 8), 0},
+};
+
 static struct aspeed_sig_desc spi1cs1_link[] = {
 	{ 0x80, BIT(15), 0},
 };
@@ -160,6 +164,7 @@ static const struct aspeed_group_config ast2400_groups[] = {
 	{ "I2C14", 1, i2c14_link },
 	{ "SD2", 1, sdio2_link },
 	{ "SD1", 1, sdio1_link },
+	{ "SGPM", 1, sgpm_link},
 	{ "SPI1", 1, spi1_link},
 	{ "SPI1CS1", 1, spi1cs1_link},
 	{ "TXD3", 1, txd3_link },
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index 395aa2080f..3c0ae7b454 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -121,6 +121,10 @@ static struct aspeed_sig_desc sdio2_link[] = {
 	{ 0x90, BIT(1), 0	},
 };
 
+static struct aspeed_sig_desc sgpm_link[] = {
+	{ 0x84, GENMASK(11, 8), 0},
+};
+
 static struct aspeed_sig_desc spi1cs1_link[] = {
 	{ 0x80, BIT(15), 0},
 };
@@ -157,6 +161,7 @@ static const struct aspeed_group_config ast2500_groups[] = {
 	{ "I2C14", 1, i2c14_link },
 	{ "SD2", 1, sdio2_link },
 	{ "SD1", 1, sdio1_link },
+	{ "SGPM", 1, sgpm_link },
 	{ "SPI1", 1, spi1_link},
 	{ "SPI1CS1", 1, spi1cs1_link},
 	{ "USB2AH", 1, usb2ah_link },
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2600.c b/drivers/pinctrl/aspeed/pinctrl_ast2600.c
index c10b3c08ac..148109482c 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2600.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2600.c
@@ -300,6 +300,17 @@ static struct aspeed_sig_desc fmcquad_link[] = {
 	{ 0x438, GENMASK(5, 4), 0 },
 };
 
+static struct aspeed_sig_desc sgpm1_link[] = {
+	{ 0x414, GENMASK(27, 24), 0 },
+};
+
+static struct aspeed_sig_desc sgpm2_link[] = {
+	{ 0x410, GENMASK(7, 4), 1 },
+	{ 0x4b0, GENMASK(7, 4), 1 },
+	{ 0x690, GENMASK(7, 4), 1 },
+	{ 0x6d0, GENMASK(7, 4), 0 },
+};
+
 static struct aspeed_sig_desc spi1_link[] = {
 	{ 0x438, GENMASK(13, 11), 0 },
 };
@@ -428,6 +439,8 @@ static const struct aspeed_group_config ast2600_groups[] = {
 	{ "EMMC", ARRAY_SIZE(emmc_link), emmc_link },
 	{ "EMMCG8", ARRAY_SIZE(emmcg8_link), emmcg8_link },
 	{ "FMCQUAD", ARRAY_SIZE(fmcquad_link), fmcquad_link },
+	{ "SGPM1", ARRAY_SIZE(sgpm1_link), sgpm1_link },
+	{ "SGPM2", ARRAY_SIZE(sgpm2_link), sgpm2_link },
 	{ "SPI1", ARRAY_SIZE(spi1_link), spi1_link },
 	{ "SPI1ABR", ARRAY_SIZE(spi1abr_link), spi1abr_link },
 	{ "SPI1CS1", ARRAY_SIZE(spi1cs1_link), spi1cs1_link },
-- 
2.39.2



More information about the openbmc mailing list