@@ -139,6 +139,16 @@ static struct ccu_common *sun50i_h6_r_ccu_clks[] = {
139139 & w1_clk .common ,
140140};
141141
142+ static struct ccu_common * sun50i_h616_r_ccu_clks [] = {
143+ & r_apb1_clk .common ,
144+ & r_apb2_clk .common ,
145+ & r_apb1_twd_clk .common ,
146+ & r_apb2_i2c_clk .common ,
147+ & r_apb2_rsb_clk .common ,
148+ & r_apb1_ir_clk .common ,
149+ & ir_clk .common ,
150+ };
151+
142152static struct clk_hw_onecell_data sun50i_h6_r_hw_clks = {
143153 .hws = {
144154 [CLK_AR100 ] = & ar100_clk .common .hw ,
@@ -159,6 +169,20 @@ static struct clk_hw_onecell_data sun50i_h6_r_hw_clks = {
159169 .num = CLK_NUMBER ,
160170};
161171
172+ static struct clk_hw_onecell_data sun50i_h616_r_hw_clks = {
173+ .hws = {
174+ [CLK_R_AHB ] = & r_ahb_clk .hw ,
175+ [CLK_R_APB1 ] = & r_apb1_clk .common .hw ,
176+ [CLK_R_APB2 ] = & r_apb2_clk .common .hw ,
177+ [CLK_R_APB1_TWD ] = & r_apb1_twd_clk .common .hw ,
178+ [CLK_R_APB2_I2C ] = & r_apb2_i2c_clk .common .hw ,
179+ [CLK_R_APB2_RSB ] = & r_apb2_rsb_clk .common .hw ,
180+ [CLK_R_APB1_IR ] = & r_apb1_ir_clk .common .hw ,
181+ [CLK_IR ] = & ir_clk .common .hw ,
182+ },
183+ .num = CLK_NUMBER ,
184+ };
185+
162186static struct ccu_reset_map sun50i_h6_r_ccu_resets [] = {
163187 [RST_R_APB1_TIMER ] = { 0x11c , BIT (16 ) },
164188 [RST_R_APB1_TWD ] = { 0x12c , BIT (16 ) },
@@ -170,6 +194,13 @@ static struct ccu_reset_map sun50i_h6_r_ccu_resets[] = {
170194 [RST_R_APB1_W1 ] = { 0x1ec , BIT (16 ) },
171195};
172196
197+ static struct ccu_reset_map sun50i_h616_r_ccu_resets [] = {
198+ [RST_R_APB1_TWD ] = { 0x12c , BIT (16 ) },
199+ [RST_R_APB2_I2C ] = { 0x19c , BIT (16 ) },
200+ [RST_R_APB2_RSB ] = { 0x1bc , BIT (16 ) },
201+ [RST_R_APB1_IR ] = { 0x1cc , BIT (16 ) },
202+ };
203+
173204static const struct sunxi_ccu_desc sun50i_h6_r_ccu_desc = {
174205 .ccu_clks = sun50i_h6_r_ccu_clks ,
175206 .num_ccu_clks = ARRAY_SIZE (sun50i_h6_r_ccu_clks ),
@@ -180,6 +211,16 @@ static const struct sunxi_ccu_desc sun50i_h6_r_ccu_desc = {
180211 .num_resets = ARRAY_SIZE (sun50i_h6_r_ccu_resets ),
181212};
182213
214+ static const struct sunxi_ccu_desc sun50i_h616_r_ccu_desc = {
215+ .ccu_clks = sun50i_h616_r_ccu_clks ,
216+ .num_ccu_clks = ARRAY_SIZE (sun50i_h616_r_ccu_clks ),
217+
218+ .hw_clks = & sun50i_h616_r_hw_clks ,
219+
220+ .resets = sun50i_h616_r_ccu_resets ,
221+ .num_resets = ARRAY_SIZE (sun50i_h616_r_ccu_resets ),
222+ };
223+
183224static void __init sunxi_r_ccu_init (struct device_node * node ,
184225 const struct sunxi_ccu_desc * desc )
185226{
@@ -200,3 +241,10 @@ static void __init sun50i_h6_r_ccu_setup(struct device_node *node)
200241}
201242CLK_OF_DECLARE (sun50i_h6_r_ccu , "allwinner ,sun50i - h6 - r - ccu ",
202243 sun50i_h6_r_ccu_setup );
244+
245+ static void __init sun50i_h616_r_ccu_setup (struct device_node * node )
246+ {
247+ sunxi_r_ccu_init (node , & sun50i_h616_r_ccu_desc );
248+ }
249+ CLK_OF_DECLARE (sun50i_h616_r_ccu , "allwinner ,sun50i - h616 - r - ccu ",
250+ sun50i_h616_r_ccu_setup );
0 commit comments