mbox series

[v4,0/3] Adding the Sparx5 Switch Reset Driver

Message ID 20210120081921.3315847-1-steen.hegelund@microchip.com (mailing list archive)
Headers show
Series Adding the Sparx5 Switch Reset Driver | expand

Message

Steen Hegelund Jan. 20, 2021, 8:19 a.m. UTC
This series provides the Microchip Sparx5 Switch Reset Driver

The Sparx5 Switch SoC has a number of components that can be reset
individually, but at least the Switch Core needs to be in a well defined
state at power on, when any of the Sparx5 drivers starts to access the
Switch Core, this reset driver is available.

The reset driver is loaded early via the postcore_initcall interface, and
will then be available for the other Sparx5 drivers (SGPIO, SwitchDev etc)
that are loaded next, and the first of them to be loaded can perform the
one-time Switch Core reset that is needed.

The driver has protection so that the system busses, DDR controller, PCI-E
and ARM A53 CPU and a few other subsystems are not touched by the reset.

The Sparx5 Chip Register Model can be browsed at this location:
https://github.com/microchip-ung/sparx-5_reginfo

History:

v3 -> v4 Added commit message descriptions

v2 -> v3 Removed unused headers
         Renamed the reset controller dev member.
         Use regmap_read_poll_timeout instead of polling a function.
         Used two separate syscon entries in the binding
         Simplified the syscon error handling.
         Simplified the devm_reset_controller_register error handling.
         Moved the contents of the mchp_sparx5_reset_config function into
         the probe function.

v1 -> v2 Removed debug prints
         Changed the error handling to save the error code before jumping.

Steen Hegelund (3):
  dt-bindings: reset: microchip sparx5 reset driver bindings
  reset: mchp: sparx5: add switch reset driver
  arm64: dts: reset: add microchip sparx5 switch reset driver

 .../bindings/reset/microchip,rst.yaml         |  59 +++++++++
 arch/arm64/boot/dts/microchip/sparx5.dtsi     |  14 +-
 drivers/reset/Kconfig                         |   8 ++
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-microchip-sparx5.c        | 120 ++++++++++++++++++
 5 files changed, 199 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/reset/microchip,rst.yaml
 create mode 100644 drivers/reset/reset-microchip-sparx5.c

Comments

Steen Hegelund Feb. 3, 2021, 8:02 a.m. UTC | #1
Hi Philipp,

I just wanted to know if there are any outstanding items that you
would like me to handle, or you think that the driver is acceptable as
it is now?

BR
Steen

On Wed, 2021-01-20 at 09:19 +0100, Steen Hegelund wrote:
> This series provides the Microchip Sparx5 Switch Reset Driver
> 
> The Sparx5 Switch SoC has a number of components that can be reset
> individually, but at least the Switch Core needs to be in a well
> defined
> state at power on, when any of the Sparx5 drivers starts to access
> the
> Switch Core, this reset driver is available.
> 
> The reset driver is loaded early via the postcore_initcall interface,
> and
> will then be available for the other Sparx5 drivers (SGPIO, SwitchDev
> etc)
> that are loaded next, and the first of them to be loaded can perform
> the
> one-time Switch Core reset that is needed.
> 
> The driver has protection so that the system busses, DDR controller,
> PCI-E
> and ARM A53 CPU and a few other subsystems are not touched by the
> reset.
> 
> The Sparx5 Chip Register Model can be browsed at this location:
> https://github.com/microchip-ung/sparx-5_reginfo
> 
> History:
> 
> v3 -> v4 Added commit message descriptions
> 
> v2 -> v3 Removed unused headers
>          Renamed the reset controller dev member.
>          Use regmap_read_poll_timeout instead of polling a function.
>          Used two separate syscon entries in the binding
>          Simplified the syscon error handling.
>          Simplified the devm_reset_controller_register error
> handling.
>          Moved the contents of the mchp_sparx5_reset_config function
> into
>          the probe function.
> 
> v1 -> v2 Removed debug prints
>          Changed the error handling to save the error code before
> jumping.
> 
> Steen Hegelund (3):
>   dt-bindings: reset: microchip sparx5 reset driver bindings
>   reset: mchp: sparx5: add switch reset driver
>   arm64: dts: reset: add microchip sparx5 switch reset driver
> 
>  .../bindings/reset/microchip,rst.yaml         |  59 +++++++++
>  arch/arm64/boot/dts/microchip/sparx5.dtsi     |  14 +-
>  drivers/reset/Kconfig                         |   8 ++
>  drivers/reset/Makefile                        |   1 +
>  drivers/reset/reset-microchip-sparx5.c        | 120
> ++++++++++++++++++
>  5 files changed, 199 insertions(+), 3 deletions(-)
>  create mode 100644
> Documentation/devicetree/bindings/reset/microchip,rst.yaml
>  create mode 100644 drivers/reset/reset-microchip-sparx5.c
>