Add driver support for ESWIN eic7700 SoC reset controller
Subsystems (2)
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].
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
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
@@ -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
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
@@ -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
@@ -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
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.
Signed-off-by Yifeng Huang <[email protected]>Signed-off-by Xuyang Dong <[email protected]>
regards
Philipp
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].
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 from0x51828000to0x51828300in yaml. Beacuse the SoC used the reset registers from0x51828300.
3. Modified reg size from0x80000to0x200. Beacuse reset registers used
the size of0x200.
4. ModifiedSYSCRG_CLEAR_BOOT_INFO_OFFSETfrom0x30Cto0xC. ModifiedSYSCRG_RESET_OFFSETfrom0x400to0x100. Because modified the reset-controller reg from0x51828000to0x51828300. And the offset was also modified.
5. Added .reg_stride = 4 ineic7700_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. DroppedEIC7700_RESET_MAXfrom 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 "makedt_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 inregmap_config. Because eic7700 only supported 4-byte register access.
2. ModifiedSYSCRG_CLEAR_BOOT_INFO_OFFSETfrom0x30Cto0xC. ModifiedSYSCRG_RESET_OFFSETfrom0x400to0x100. Because the base address has changed from0x51828000to0x51828300.v5 -> v6:
1. Removedplatform_set_drvdata()function.
2. In probe function, defined struct device *dev =&pdev->dev.
Modified&pdev->devto dev.
Link to v5: https://lore.kernel.org/all/[email protected]/v4 -> v5:
1. The value of .max_register is0x7fffc.
2. Converted "to_eswin_reset_data" from macro to inline function.
3. ModifiedEIC7700_RESET_OFFSETtoEIC7700_RESETandeic7700_register_offsettoeic7700_reset.
4. SinceEIC7700_RESET_MAXis dropped, used eic7700_reset[] withoutEIC7700_RESET_MAX.
5. Removed functioneswin_reset_set, and putregmap_clear_bitsineswin_reset_assertandregmap_set_bitsineswin_reset_deassert.
6. Addedusleep_rangein functioneswin_reset_resetwhich was missed.
7. UsedARRAY_SIZE(eic7700_reset)fordata->rcdev.nr_resets.
8. Usebuiltin_platform_driver, because reset driver is a reset
controller for SoC. Removedeswin_reset_initfunction.
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 structof_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. Removedof_xlateand 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. Changesyscon_node_to_regmap()to MMIO regmap functions, because
dropped syscon.
2. AddBIT()in functioneswin_reset_set()to shift the reset
control indices.
3. Remove forced type conversions from functioneswin_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. Useeswin_reset_assert()andeswin_reset_deassertin functioneswin_reset_reset().
3. PlaceRESET_EIC7700inKconfigandMakefilein order.
4. Usedev_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
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].
[...]
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