starfive: add new target for StarFive JH7100/7110 SoC
[openwrt/staging/981213.git] / target / linux / starfive / patches-6.1 / 0057-reset-starfive-jh7110-Add-StarFive-STG-ISP-VOUT-rese.patch
1 From a04a6eb3b4d112f3600bbd783249f24a43797e7a Mon Sep 17 00:00:00 2001
2 From: Xingyu Wu <xingyu.wu@starfivetech.com>
3 Date: Thu, 18 May 2023 18:12:31 +0800
4 Subject: [PATCH 057/122] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT
5 resets support
6
7 Add new struct members and auxiliary_device_id of resets to support
8 System-Top-Group, Image-Signal-Process and Video-Output on the StarFive
9 JH7110 SoC.
10
11 Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
12 ---
13 .../reset/starfive/reset-starfive-jh7110.c | 30 +++++++++++++++++++
14 1 file changed, 30 insertions(+)
15
16 --- a/drivers/reset/starfive/reset-starfive-jh7110.c
17 +++ b/drivers/reset/starfive/reset-starfive-jh7110.c
18 @@ -31,6 +31,24 @@ static const struct jh7110_reset_info jh
19 .status_offset = 0x3C,
20 };
21
22 +static const struct jh7110_reset_info jh7110_stg_info = {
23 + .nr_resets = JH7110_STGRST_END,
24 + .assert_offset = 0x74,
25 + .status_offset = 0x78,
26 +};
27 +
28 +static const struct jh7110_reset_info jh7110_isp_info = {
29 + .nr_resets = JH7110_ISPRST_END,
30 + .assert_offset = 0x38,
31 + .status_offset = 0x3C,
32 +};
33 +
34 +static const struct jh7110_reset_info jh7110_vout_info = {
35 + .nr_resets = JH7110_VOUTRST_END,
36 + .assert_offset = 0x48,
37 + .status_offset = 0x4C,
38 +};
39 +
40 static int jh7110_reset_probe(struct auxiliary_device *adev,
41 const struct auxiliary_device_id *id)
42 {
43 @@ -58,6 +76,18 @@ static const struct auxiliary_device_id
44 .name = "clk_starfive_jh7110_sys.rst-aon",
45 .driver_data = (kernel_ulong_t)&jh7110_aon_info,
46 },
47 + {
48 + .name = "clk_starfive_jh7110_sys.rst-stg",
49 + .driver_data = (kernel_ulong_t)&jh7110_stg_info,
50 + },
51 + {
52 + .name = "clk_starfive_jh7110_sys.rst-isp",
53 + .driver_data = (kernel_ulong_t)&jh7110_isp_info,
54 + },
55 + {
56 + .name = "clk_starfive_jh7110_sys.rst-vo",
57 + .driver_data = (kernel_ulong_t)&jh7110_vout_info,
58 + },
59 { /* sentinel */ }
60 };
61 MODULE_DEVICE_TABLE(auxiliary, jh7110_reset_ids);