From: Billy Tsai <billy_tsai@aspeedtech.com>
To: <trini@konsulko.com>, <ryan_chen@aspeedtech.com>,
<chiawei_wang@aspeedtech.com>, <BMC-SW@aspeedtech.com>,
<joel@jms.id.au>, <billy_tsai@aspeedtech.com>,
<fr0st61te@gmail.com>, <clamor95@gmail.com>,
<marek.vasut+renesas@mailbox.org>, <michal.simek@amd.com>,
<paul.barker.ct@bp.renesas.com>, <piotr.wojtaszczyk@timesys.com>,
<andre.przywara@arm.com>, <jim.t90615@gmail.com>,
<kabel@kernel.org>, <caleb.connolly@linaro.org>,
<sjg@chromium.org>, <ye.li@nxp.com>, <pbrobinson@gmail.com>,
<u-boot@lists.denx.de>
Subject: [PATCH v1 3/3] ARM: dts: ast2600: Add SGPIO to device tree
Date: Wed, 16 Oct 2024 16:59:55 +0800 [thread overview]
Message-ID: <20241016085955.314236-4-billy_tsai@aspeedtech.com> (raw)
In-Reply-To: <20241016085955.314236-1-billy_tsai@aspeedtech.com>
Add SGPIO DTS node and enable them for AST2600 EVB.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
arch/arm/dts/ast2600-evb.dts | 10 ++++++
arch/arm/dts/ast2600.dtsi | 40 ++++++++++++++++++++++++
drivers/pinctrl/aspeed/pinctrl_ast2600.c | 10 ++++++
3 files changed, 60 insertions(+)
diff --git a/arch/arm/dts/ast2600-evb.dts b/arch/arm/dts/ast2600-evb.dts
index 9aac0e26f28..570ba61965a 100644
--- a/arch/arm/dts/ast2600-evb.dts
+++ b/arch/arm/dts/ast2600-evb.dts
@@ -266,3 +266,13 @@
bootph-all;
status = "okay";
};
+
+&sgpiom0 {
+ status = "okay";
+ ngpios = <128>;
+};
+
+&sgpiom1 {
+ status = "okay";
+ ngpios = <80>;
+};
diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi
index 43db80edfe5..cb8ce8b6b6f 100644
--- a/arch/arm/dts/ast2600.dtsi
+++ b/arch/arm/dts/ast2600.dtsi
@@ -501,6 +501,36 @@
ngpios = <208>;
};
+ sgpiom0: sgpiom@1e780500 {
+ compatible = "aspeed,ast2600-sgpiom";
+ reg = <0x1e780500 0x100>;
+ interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scu ASPEED_CLK_APB2>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ bus-frequency = <1000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sgpm1_default>;
+ status = "disabled";
+ };
+
+ sgpiom1: sgpiom@1e780600 {
+ compatible = "aspeed,ast2600-sgpiom";
+ reg = <0x1e780600 0x100>;
+ interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scu ASPEED_CLK_APB2>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ bus-frequency = <12000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sgpm2_default>;
+ status = "disabled";
+ };
+
gpio1: gpio@1e780800 {
compatible = "aspeed,ast2600-gpio";
reg = <0x1e780800 0x800>;
@@ -2167,4 +2197,14 @@
function = "PCIE1RC";
groups = "PCIE1RC";
};
+
+ pinctrl_sgpm1_default: sgpm1_default {
+ function = "SGPM1";
+ groups = "SGPM1";
+ };
+
+ pinctrl_sgpm2_default: sgpm2_default {
+ function = "SGPM2";
+ groups = "SGPM2";
+ };
};
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2600.c b/drivers/pinctrl/aspeed/pinctrl_ast2600.c
index bc12590e583..f4bec6fe53c 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2600.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2600.c
@@ -454,6 +454,14 @@ static struct aspeed_sig_desc pwm15g1[] = {
{0x41c, BIT(31), 0},
};
+static struct aspeed_sig_desc sgpm1[] = {
+ {0x414, GENMASK(27, 24), 0},
+};
+
+static struct aspeed_sig_desc sgpm2[] = {
+ {0x6d0, GENMASK(7, 4), 0},
+};
+
static const struct aspeed_group_config ast2600_groups[] = {
{ "MAC1LINK", ARRAY_SIZE(mac1_link), mac1_link },
{ "MAC2LINK", ARRAY_SIZE(mac2_link), mac2_link },
@@ -543,6 +551,8 @@ static const struct aspeed_group_config ast2600_groups[] = {
{ "PWM14G1", ARRAY_SIZE(pwm14g1), pwm14g1 },
{ "PWM15G0", ARRAY_SIZE(pwm15g0), pwm15g0 },
{ "PWM15G1", ARRAY_SIZE(pwm15g1), pwm15g1 },
+ { "SGPM1", ARRAY_SIZE(sgpm1), sgpm1 },
+ { "SGPM2", ARRAY_SIZE(sgpm2), sgpm2 },
};
static int ast2600_pinctrl_get_groups_count(struct udevice *dev)
--
2.25.1
next prev parent reply other threads:[~2024-10-16 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 8:59 [PATCH v1 0/3] Support Aspeed SGPIO controller Billy Tsai
2024-10-16 8:59 ` [PATCH v1 1/3] gpio: Add Aspeed SGPIO driver Billy Tsai
2024-10-16 8:59 ` [PATCH v1 2/3] ARM: dts: ast2500: Add SGPIO to device tree Billy Tsai
2024-10-16 8:59 ` Billy Tsai [this message]
2024-10-29 22:28 ` [PATCH v1 0/3] Support Aspeed SGPIO controller Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241016085955.314236-4-billy_tsai@aspeedtech.com \
--to=billy_tsai@aspeedtech.com \
--cc=BMC-SW@aspeedtech.com \
--cc=andre.przywara@arm.com \
--cc=caleb.connolly@linaro.org \
--cc=chiawei_wang@aspeedtech.com \
--cc=clamor95@gmail.com \
--cc=fr0st61te@gmail.com \
--cc=jim.t90615@gmail.com \
--cc=joel@jms.id.au \
--cc=kabel@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=michal.simek@amd.com \
--cc=paul.barker.ct@bp.renesas.com \
--cc=pbrobinson@gmail.com \
--cc=piotr.wojtaszczyk@timesys.com \
--cc=ryan_chen@aspeedtech.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox