Skip to contentSkip to conversation

Add driver support for ESWIN eic7700 SoC reset controller

PATCH Applied [email protected] 2 participants 6 messages Sep 30, 2025 – Oct 30, 2025

Subsystems (2)

v7 of 15 Applied Latest is v15 →

lore
Share & tools
lore
#0 lore raw

v7 cover Add driver support for ESWIN eic7700 SoC reset controller

From: Xuyang Dong <[email protected]>

This series depends on the config option patch [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250929&id=ce2d00c6e192b588ddc3d1efb72b0ea00ab5538f

Updates:

dt-bindings: reset: eswin: Documentation for eic7700 SoC
v6 -> v7:
1. Removed vendor prefix patch dependency from cover letter, because the patch was applied. Updated the link of config option patch.
2. Modified reg address from 0x51828000 to 0x51828300 in yaml. Beacuse the SoC used the reset registers from 0x51828300.
3. Modified reg size from 0x80000 to 0x200. Beacuse reset registers used
the size of 0x200.
4. Modified SYSCRG_CLEAR_BOOT_INFO_OFFSET from 0x30C to 0xC. Modified SYSCRG_RESET_OFFSET from 0x400 to 0x100. Because modified the reset-controller reg from 0x51828000 to 0x51828300. And the offset was also modified.
5. Added .reg_stride = 4 in eic7700_regmap_config. Beacuse riscv supported 4-byte aligned access.
Link to v6: https://lore.kernel.org/all/[email protected]/

v5 -> v6:
Add dependencies of vendor prefix and config option patch in cover-letter. Link to v5: https://lore.kernel.org/all/[email protected]/

v4 -> v5:
1. Dropped EIC7700_RESET_MAX from bindings.
2. Add "Reviewed-by" tag of "Krzysztof Kozlowski" for Patch 1.
3. Corrected the link to previous versions.
Link to v4: https://lore.kernel.org/all/[email protected]/

v3 -> v4:
1. Remove register offsets in dt-bindings.
2. The const value of "#reset-cell" was changed from 2 to 1.
Because the offsets were removed from dt-bindings. There are
only IDs. And removed the description of it.
3. Modify copyright year from 2024 to 2025.
4. Redefined the IDs in the dt-bindings and used these to build a
reset array in reset driver. Ensure that the reset register and
reset value corresponding to the IDs are correct.
Link to v3: https://lore.kernel.org/all/[email protected]/

v2 -> v3:
1. Drop syscon and simple-mfd from yaml and code, because these are
not necessary.
2. Update description to introduce reset controller.
3. Add reset control indices for dt-bindings.
4. Keep the register offsets in dt-bindings.
Link to v2: https://lore.kernel.org/all/[email protected]/

v1 -> v2:
1. Clear warnings/errors for using "make dt_binding_check".
2. Update example, change parent node from sys-crg to reset-controller
for reset yaml.
3. Drop the child node and add '#reset-cells' to the parent node.
4. Drop the description, because sys-crg block is changed to reset- controller.
5. Change hex numbers to decimal numbers going from 0, and drop the
not needed hardware numbers.
Link to v1: https://lore.kernel.org/all/[email protected]/

reset: eswin: Add eic7700 reset driver
v6 -> v7:
1. Added .reg_stride = 4 in regmap_config. Because eic7700 only supported 4-byte register access.
2. Modified SYSCRG_CLEAR_BOOT_INFO_OFFSET from 0x30C to 0xC. Modified SYSCRG_RESET_OFFSET from 0x400 to 0x100. Because the base address has changed from 0x51828000 to 0x51828300.

v5 -> v6:
1. Removed platform_set_drvdata() function.
2. In probe function, defined struct device *dev = &pdev->dev.
Modified &pdev->dev to dev.
Link to v5: https://lore.kernel.org/all/[email protected]/

v4 -> v5:
1. The value of .max_register is 0x7fffc.
2. Converted "to_eswin_reset_data" from macro to inline function.
3. Modified EIC7700_RESET_OFFSET to EIC7700_RESET and eic7700_ register_offset to eic7700_reset.
4. Since EIC7700_RESET_MAX is dropped, used eic7700_reset[] without EIC7700_RESET_MAX.
5. Removed function eswin_reset_set, and put regmap_clear_bits in eswin_reset_assert and regmap_set_bits in eswin_reset_deassert.
6. Added usleep_range in function eswin_reset_reset which was missed.
7. Used ARRAY_SIZE(eic7700_reset) for data->rcdev.nr_resets.
8. Use builtin_platform_driver, because reset driver is a reset
controller for SoC. Removed eswin_reset_init function.
9. Modified eswin_reset_* to eic7700_reset_*.
Link to v4: https://lore.kernel.org/all/[email protected]/

v3 -> v4:
1. Add 'const' for the definition. It is 'const struct of_phandle_
args *reset_spec = data;'.
2. Modify copyright year from 2024 to 2025.
3. Included "eswin,eic7700-reset.h" in reset driver.
4. Added mapping table for reset IDs.
5. Removed of_xlate and idr functions as we are using IDs from DTS.
6. Removed .remove function.
Link to v3: https://lore.kernel.org/all/[email protected]/

v2 -> v3:
1. Change syscon_node_to_regmap() to MMIO regmap functions, because
dropped syscon.
2. Add BIT() in function eswin_reset_set() to shift the reset
control indices.
3. Remove forced type conversions from function eswin_reset_of_ xlate_lookup_id().
Link to v2: https://lore.kernel.org/all/[email protected]/

v1 -> v2:
1. Modify the code according to the suggestions.
2. Use eswin_reset_assert() and eswin_reset_deassert in function eswin_reset_reset().
3. Place RESET_EIC7700 in Kconfig and Makefile in order.
4. Use dev_err_probe() in probe function.
Link to v1: https://lore.kernel.org/all/[email protected]/

Xuyang Dong (2):
dt-bindings: reset: eswin: Documentation for eic7700 SoC
reset: eswin: Add eic7700 reset driver

 .../bindings/reset/eswin,eic7700-reset.yaml   |  42 ++
 drivers/reset/Kconfig                         |  10 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-eic7700.c                 | 429 ++++++++++++++++++
 .../dt-bindings/reset/eswin,eic7700-reset.h   | 298 ++++++++++++
 5 files changed, 780 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/eswin,eic7700-reset.yaml
 create mode 100644 drivers/reset/reset-eic7700.c
 create mode 100644 include/dt-bindings/reset/eswin,eic7700-reset.h

--
2.43.0

#1 lore raw

PATCH v7 1/2 dt-bindings: reset: eswin: Documentation for eic7700 SoC

From: Xuyang Dong <[email protected]>

Add device tree binding documentation and header file for the ESWIN eic7700 reset controller module.

---
 .../bindings/reset/eswin,eic7700-reset.yaml   |  42 +++
 .../dt-bindings/reset/eswin,eic7700-reset.h   | 298 ++++++++++++++++++
 2 files changed, 340 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/eswin,eic7700-reset.yaml
 create mode 100644 include/dt-bindings/reset/eswin,eic7700-reset.h
Documentation/devicetree/bindings/reset/eswin,eic7700-reset.yaml new file +42 -0
new file mode 100644
index 000000000000..cf2fdb907571
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/eswin,eic7700-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ESWIN EIC7700 SoC reset controller
+
+maintainers:
+  - Yifeng Huang <[email protected]>
+  - Xuyang Dong <[email protected]>
+
+description:
+  The system reset controller can be used to reset various peripheral
+  controllers in ESWIN eic7700 SoC.
+
+properties:
+  compatible:
+    const: eswin,eic7700-reset
+
+  reg:
+    maxItems: 1
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/reset/eswin,eic7700-reset.h>
+
+    reset-controller@51828300 {
+        compatible = "eswin,eic7700-reset";
+        reg = <0x51828300 0x200>;
+        #reset-cells = <1>;
+    };
include/dt-bindings/reset/eswin,eic7700-reset.h new file +298 -0

298 lines not on this page · raw message

Signature · 1 line
2.43.0
#2 lore raw

PATCH v7 2/2 reset: eswin: Add eic7700 reset driver

In reply to [email protected]

From: Xuyang Dong <[email protected]>

Add support for reset controller in eic7700 series chips. Provide functionality for asserting and deasserting resets on the chip.

---
 drivers/reset/Kconfig         |  10 +
 drivers/reset/Makefile        |   1 +
 drivers/reset/reset-eic7700.c | 429 ++++++++++++++++++++++++++++++++++
 3 files changed, 440 insertions(+)
 create mode 100644 drivers/reset/reset-eic7700.c
drivers/reset/Kconfig +10 -0
index 78b7078478d4..ffd8e61e7d48 100644
@@ -73,6 +73,16 @@ config RESET_BRCMSTB_RESCAL
 	  This enables the RESCAL reset controller for SATA, PCIe0, or PCIe1 on
 	  BCM7216 or the BCM2712.
 
+config RESET_EIC7700
+	bool "Reset controller driver for ESWIN SoCs"
+	depends on ARCH_ESWIN || COMPILE_TEST
+	default ARCH_ESWIN
+	help
+	  This enables the reset controller driver for ESWIN SoCs. This driver is
+	  specific to ESWIN SoCs and should only be enabled if using such hardware.
+	  The driver supports eic7700 series chips and provides functionality for
+	  asserting and deasserting resets on the chip.
+
 config RESET_EYEQ
 	bool "Mobileye EyeQ reset controller"
 	depends on MACH_EYEQ5 || MACH_EYEQ6H || COMPILE_TEST
drivers/reset/Makefile +1 -0
index f7934f9fb90b..9c3e484dfd81 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o
 obj-$(CONFIG_RESET_BERLIN) += reset-berlin.o
 obj-$(CONFIG_RESET_BRCMSTB) += reset-brcmstb.o
 obj-$(CONFIG_RESET_BRCMSTB_RESCAL) += reset-brcmstb-rescal.o
+obj-$(CONFIG_RESET_EIC7700) += reset-eic7700.o
 obj-$(CONFIG_RESET_EYEQ) += reset-eyeq.o
 obj-$(CONFIG_RESET_GPIO) += reset-gpio.o
 obj-$(CONFIG_RESET_HSDK) += reset-hsdk.o
drivers/reset/reset-eic7700.c new file +429 -0

429 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer Reviewed-by on v7 2/2
#3 lore raw

Re: [PATCH v7 2/2] reset: eswin: Add eic7700 reset driver

Quoted 8 lines · On Di, 2025-09-30 at 17:32 +0800, [email protected] wrote:

From: Xuyang Dong <[email protected]>

Add support for reset controller in eic7700 series chips. Provide functionality for asserting and deasserting resets on the chip.

regards
Philipp

#4 lore raw
In reply to [email protected]

Hi all,

Gentle ping. Looking forward to your reply. Thank you very much!

Best regards,
Xuyang Dong

Quoted 136 lines

This series depends on the config option patch [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250929&id=ce2d00c6e192b588ddc3d1efb72b0ea00ab5538f

Updates:

dt-bindings: reset: eswin: Documentation for eic7700 SoC
v6 -> v7:
1. Removed vendor prefix patch dependency from cover letter, because the patch was applied. Updated the link of config option patch.
2. Modified reg address from 0x51828000 to 0x51828300 in yaml. Beacuse the SoC used the reset registers from 0x51828300.
3. Modified reg size from 0x80000 to 0x200. Beacuse reset registers used
the size of 0x200.
4. Modified SYSCRG_CLEAR_BOOT_INFO_OFFSET from 0x30C to 0xC. Modified SYSCRG_RESET_OFFSET from 0x400 to 0x100. Because modified the reset-controller reg from 0x51828000 to 0x51828300. And the offset was also modified.
5. Added .reg_stride = 4 in eic7700_regmap_config. Beacuse riscv supported 4-byte aligned access.
Link to v6: https://lore.kernel.org/all/[email protected]/

v5 -> v6:
Add dependencies of vendor prefix and config option patch in cover-letter. Link to v5: https://lore.kernel.org/all/[email protected]/

v4 -> v5:
1. Dropped EIC7700_RESET_MAX from bindings.
2. Add "Reviewed-by" tag of "Krzysztof Kozlowski" for Patch 1.
3. Corrected the link to previous versions.
Link to v4: https://lore.kernel.org/all/[email protected]/

v3 -> v4:
1. Remove register offsets in dt-bindings.
2. The const value of "#reset-cell" was changed from 2 to 1.
Because the offsets were removed from dt-bindings. There are
only IDs. And removed the description of it.
3. Modify copyright year from 2024 to 2025.
4. Redefined the IDs in the dt-bindings and used these to build a
reset array in reset driver. Ensure that the reset register and
reset value corresponding to the IDs are correct.
Link to v3: https://lore.kernel.org/all/[email protected]/

v2 -> v3:
1. Drop syscon and simple-mfd from yaml and code, because these are
not necessary.
2. Update description to introduce reset controller.
3. Add reset control indices for dt-bindings.
4. Keep the register offsets in dt-bindings.
Link to v2: https://lore.kernel.org/all/[email protected]/

v1 -> v2:
1. Clear warnings/errors for using "make dt_binding_check".
2. Update example, change parent node from sys-crg to reset-controller
for reset yaml.
3. Drop the child node and add '#reset-cells' to the parent node.
4. Drop the description, because sys-crg block is changed to reset- controller.
5. Change hex numbers to decimal numbers going from 0, and drop the
not needed hardware numbers.
Link to v1: https://lore.kernel.org/all/[email protected]/

reset: eswin: Add eic7700 reset driver
v6 -> v7:
1. Added .reg_stride = 4 in regmap_config. Because eic7700 only supported 4-byte register access.
2. Modified SYSCRG_CLEAR_BOOT_INFO_OFFSET from 0x30C to 0xC. Modified SYSCRG_RESET_OFFSET from 0x400 to 0x100. Because the base address has changed from 0x51828000 to 0x51828300.

v5 -> v6:
1. Removed platform_set_drvdata() function.
2. In probe function, defined struct device *dev = &pdev->dev.
Modified &pdev->dev to dev.
Link to v5: https://lore.kernel.org/all/[email protected]/

v4 -> v5:
1. The value of .max_register is 0x7fffc.
2. Converted "to_eswin_reset_data" from macro to inline function.
3. Modified EIC7700_RESET_OFFSET to EIC7700_RESET and eic7700_ register_offset to eic7700_reset.
4. Since EIC7700_RESET_MAX is dropped, used eic7700_reset[] without EIC7700_RESET_MAX.
5. Removed function eswin_reset_set, and put regmap_clear_bits in eswin_reset_assert and regmap_set_bits in eswin_reset_deassert.
6. Added usleep_range in function eswin_reset_reset which was missed.
7. Used ARRAY_SIZE(eic7700_reset) for data->rcdev.nr_resets.
8. Use builtin_platform_driver, because reset driver is a reset
controller for SoC. Removed eswin_reset_init function.
9. Modified eswin_reset_* to eic7700_reset_*.
Link to v4: https://lore.kernel.org/all/[email protected]/

v3 -> v4:
1. Add 'const' for the definition. It is 'const struct of_phandle_
args *reset_spec = data;'.
2. Modify copyright year from 2024 to 2025.
3. Included "eswin,eic7700-reset.h" in reset driver.
4. Added mapping table for reset IDs.
5. Removed of_xlate and idr functions as we are using IDs from DTS.
6. Removed .remove function.
Link to v3: https://lore.kernel.org/all/[email protected]/

v2 -> v3:
1. Change syscon_node_to_regmap() to MMIO regmap functions, because
dropped syscon.
2. Add BIT() in function eswin_reset_set() to shift the reset
control indices.
3. Remove forced type conversions from function eswin_reset_of_ xlate_lookup_id().
Link to v2: https://lore.kernel.org/all/[email protected]/

v1 -> v2:
1. Modify the code according to the suggestions.
2. Use eswin_reset_assert() and eswin_reset_deassert in function eswin_reset_reset().
3. Place RESET_EIC7700 in Kconfig and Makefile in order.
4. Use dev_err_probe() in probe function.
Link to v1: https://lore.kernel.org/all/[email protected]/

Xuyang Dong (2):
dt-bindings: reset: eswin: Documentation for eic7700 SoC
reset: eswin: Add eic7700 reset driver

 .../bindings/reset/eswin,eic7700-reset.yaml   |  42 ++
 drivers/reset/Kconfig                         |  10 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-eic7700.c                 | 429 ++++++++++++++++++
 .../dt-bindings/reset/eswin,eic7700-reset.h   | 298 ++++++++++++
 5 files changed, 780 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/eswin,eic7700-reset.yaml
 create mode 100644 drivers/reset/reset-eic7700.c
 create mode 100644 include/dt-bindings/reset/eswin,eic7700-reset.h

--
2.43.0

maintainer Applied
#5 lore raw
In reply to [email protected]
Quoted 5 lines · On Di, 2025-09-30 at 17:31 +0800, [email protected] wrote:

From: Xuyang Dong <[email protected]>

This series depends on the config option patch [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250929&id=ce2d00c6e192b588ddc3d1efb72b0ea00ab5538f

[...]

Applied to reset/next, thanks!

[1/2] dt-bindings: reset: eswin: Documentation for eic7700 SoC

      https://git.pengutronix.de/cgit/pza/linux/commit/?id=e40291127aa9
[2/2] reset: eswin: Add eic7700 reset driver
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=a4c5b6b610d9

regards
Philipp