public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: sunxi: add THS clk/reset
@ 2023-02-13  2:42 qianfanguijin
  2023-02-13  2:42 ` [PATCH 2/2] drivers: thermal: Introduce sun8i_thermal qianfanguijin
  2023-02-25  0:50 ` [PATCH 1/2] clk: sunxi: add THS clk/reset Andre Przywara
  0 siblings, 2 replies; 5+ messages in thread
From: qianfanguijin @ 2023-02-13  2:42 UTC (permalink / raw)
  To: u-boot; +Cc: Andre Przywara, Jagan Teki, Simon Glass, qianfan Zhao

From: qianfan Zhao <qianfanguijin@163.com>

Add clock/reset definitions for THS peripherals.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
---
 drivers/clk/sunxi/clk_h3.c  | 5 +++++
 drivers/clk/sunxi/clk_h6.c  | 4 ++++
 drivers/clk/sunxi/clk_r40.c | 5 +++++
 3 files changed, 14 insertions(+)

diff --git a/drivers/clk/sunxi/clk_h3.c b/drivers/clk/sunxi/clk_h3.c
index 213ab510ed..774d67cbfa 100644
--- a/drivers/clk/sunxi/clk_h3.c
+++ b/drivers/clk/sunxi/clk_h3.c
@@ -38,6 +38,7 @@ static struct ccu_clk_gate h3_gates[] = {
 	[CLK_BUS_DE]		= GATE(0x064, BIT(12)),
 
 	[CLK_BUS_PIO]		= GATE(0x068, BIT(5)),
+	[CLK_BUS_THS]		= GATE(0x068, BIT(8)),
 
 	[CLK_BUS_I2C0]		= GATE(0x06c, BIT(0)),
 	[CLK_BUS_I2C1]		= GATE(0x06c, BIT(1)),
@@ -49,6 +50,8 @@ static struct ccu_clk_gate h3_gates[] = {
 
 	[CLK_BUS_EPHY]		= GATE(0x070, BIT(0)),
 
+	[CLK_THS]		= GATE(0x074, BIT(31)),
+
 	[CLK_SPI0]		= GATE(0x0a0, BIT(31)),
 	[CLK_SPI1]		= GATE(0x0a4, BIT(31)),
 
@@ -98,6 +101,8 @@ static struct ccu_reset h3_resets[] = {
 
 	[RST_BUS_EPHY]		= RESET(0x2c8, BIT(2)),
 
+	[RST_BUS_THS]		= RESET(0x2d0, BIT(8)),
+
 	[RST_BUS_I2C0]		= RESET(0x2d8, BIT(0)),
 	[RST_BUS_I2C1]		= RESET(0x2d8, BIT(1)),
 	[RST_BUS_I2C2]		= RESET(0x2d8, BIT(2)),
diff --git a/drivers/clk/sunxi/clk_h6.c b/drivers/clk/sunxi/clk_h6.c
index 24eb9725db..5464530056 100644
--- a/drivers/clk/sunxi/clk_h6.c
+++ b/drivers/clk/sunxi/clk_h6.c
@@ -42,6 +42,8 @@ static struct ccu_clk_gate h6_gates[] = {
 
 	[CLK_BUS_EMAC]		= GATE(0x97c, BIT(0)),
 
+	[CLK_BUS_THS]		= GATE(0x9fc, BIT(0)),
+
 	[CLK_USB_PHY0]		= GATE(0xa70, BIT(29)),
 	[CLK_USB_OHCI0]		= GATE(0xa70, BIT(31)),
 
@@ -91,6 +93,8 @@ static struct ccu_reset h6_resets[] = {
 
 	[RST_BUS_EMAC]		= RESET(0x97c, BIT(16)),
 
+	[RST_BUS_THS]		= RESET(0x9fc, BIT(16)),
+
 	[RST_USB_PHY0]		= RESET(0xa70, BIT(30)),
 
 	[RST_USB_PHY1]		= RESET(0xa74, BIT(30)),
diff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c
index 630e80d2b4..4fbfd28207 100644
--- a/drivers/clk/sunxi/clk_r40.c
+++ b/drivers/clk/sunxi/clk_r40.c
@@ -42,6 +42,7 @@ static struct ccu_clk_gate r40_gates[] = {
 	[CLK_BUS_TCON_TOP]	= GATE(0x064, BIT(30)),
 
 	[CLK_BUS_PIO]		= GATE(0x068, BIT(5)),
+	[CLK_BUS_THS]		= GATE(0x068, BIT(8)),
 
 	[CLK_BUS_I2C0]		= GATE(0x06c, BIT(0)),
 	[CLK_BUS_I2C1]		= GATE(0x06c, BIT(1)),
@@ -57,6 +58,8 @@ static struct ccu_clk_gate r40_gates[] = {
 	[CLK_BUS_UART6]		= GATE(0x06c, BIT(22)),
 	[CLK_BUS_UART7]		= GATE(0x06c, BIT(23)),
 
+	[CLK_THS]		= GATE(0x074, BIT(31)),
+
 	[CLK_SPI0]		= GATE(0x0a0, BIT(31)),
 	[CLK_SPI1]		= GATE(0x0a4, BIT(31)),
 	[CLK_SPI2]		= GATE(0x0a8, BIT(31)),
@@ -113,6 +116,8 @@ static struct ccu_reset r40_resets[] = {
 	[RST_BUS_TCON_TV1]	= RESET(0x2c4, BIT(29)),
 	[RST_BUS_TCON_TOP]	= RESET(0x2c4, BIT(30)),
 
+	[RST_BUS_THS]		= RESET(0x2d0, BIT(8)),
+
 	[RST_BUS_I2C0]		= RESET(0x2d8, BIT(0)),
 	[RST_BUS_I2C1]		= RESET(0x2d8, BIT(1)),
 	[RST_BUS_I2C2]		= RESET(0x2d8, BIT(2)),
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-27 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13  2:42 [PATCH 1/2] clk: sunxi: add THS clk/reset qianfanguijin
2023-02-13  2:42 ` [PATCH 2/2] drivers: thermal: Introduce sun8i_thermal qianfanguijin
2023-02-24 11:06   ` Andre Przywara
2023-02-27 10:20     ` qianfan
2023-02-25  0:50 ` [PATCH 1/2] clk: sunxi: add THS clk/reset Andre Przywara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox