Add driver support for ESWIN eic7700 SoC reset controller
Subsystems (2)
v6 cover Add driver support for ESWIN eic7700 SoC reset controller
From: Xuyang Dong <[email protected]>
This series depends on the vendor prefix [1] and config option patch [2].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250825&id=ac29e4487aa20a21b7c3facbd1f14f5093835dc9
[2] https://lore.kernel.org/all/[email protected]/
Updates:
dt-bindings: reset: eswin: Documentation for eic7700 SoC
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
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 | 428 ++++++++++++++++++ .../dt-bindings/reset/eswin,eic7700-reset.h | 298 ++++++++++++ 5 files changed, 779 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.17.1
PATCH v6 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@51828000 { + compatible = "eswin,eic7700-reset"; + reg = <0x51828000 0x80000>; + #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.17.1
PATCH v6 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 | 428 ++++++++++++++++++++++++++++++++++ 3 files changed, 439 insertions(+) create mode 100644 drivers/reset/reset-eic7700.c
drivers/reset/Kconfig +10 -0
@@ -66,6 +66,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
@@ -12,6 +12,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 +428 -0
428 lines not on this page · raw message
Signature · 1 line
2.17.1
Hi all,
Gentle ping.
Thanks,
Xuyang Dong
Quoted 115 lines
This series depends on the vendor prefix [1] and config option patch [2].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250825&id=ac29e4487aa20a21b7c3facbd1f14f5093835dc9
[2] https://lore.kernel.org/all/[email protected]/Updates:
dt-bindings: reset: eswin: Documentation for eic7700 SoC
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
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 | 428 ++++++++++++++++++ .../dt-bindings/reset/eswin,eic7700-reset.h | 298 ++++++++++++ 5 files changed, 779 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.17.1