Message ID | 20240329-t7-reset-v1-0-4c6e2e68359e@amlogic.com |
---|---|
Headers | show |
Series | Add support for Amlogic T7 Reset | expand |
On 29/03/2024 10:17, Kelvin Zhang via B4 Relay wrote: > From: Zelong Dong <zelong.dong@amlogic.com> > > There are 7 sets of Reset Source in Amlogic T7 SoC Reset Controller, > and the offset between base and level registers is 0x40. > Add a new compatible string and struct meson_reset_param to support > the reset controller on T7 SoC. > > Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> > Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com> > --- > drivers/reset/reset-meson.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c > index f78be97898bc..1e9fca3e30e8 100644 > --- a/drivers/reset/reset-meson.c > +++ b/drivers/reset/reset-meson.c > @@ -102,6 +102,11 @@ static const struct meson_reset_param meson_s4_param = { > .level_offset = 0x40, > }; > > +static const struct meson_reset_param t7_param = { > + .reg_count = 7, > + .level_offset = 0x40, > +}; > + > static const struct of_device_id meson_reset_dt_ids[] = { > { .compatible = "amlogic,meson8b-reset", .data = &meson8b_param}, > { .compatible = "amlogic,meson-gxbb-reset", .data = &meson8b_param}, > @@ -109,6 +114,7 @@ static const struct of_device_id meson_reset_dt_ids[] = { > { .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param}, > { .compatible = "amlogic,meson-s4-reset", .data = &meson_s4_param}, > { .compatible = "amlogic,c3-reset", .data = &meson_s4_param}, > + { .compatible = "amlogic,t7-reset", .data = &t7_param}, > { /* sentinel */ }, > }; > MODULE_DEVICE_TABLE(of, meson_reset_dt_ids); > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On 29/03/2024 10:17, Kelvin Zhang via B4 Relay wrote: > From: Zelong Dong <zelong.dong@amlogic.com> > > There are 7 sets of Reset Source in Amlogic T7 SoC Reset Controller, > and the offset between base and level registers is 0x40. > Add a new compatible string and struct meson_reset_param to support > the reset controller on T7 SoC. > > Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> > Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com> > --- > drivers/reset/reset-meson.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c > index f78be97898bc..1e9fca3e30e8 100644 > --- a/drivers/reset/reset-meson.c > +++ b/drivers/reset/reset-meson.c > @@ -102,6 +102,11 @@ static const struct meson_reset_param meson_s4_param = { > .level_offset = 0x40, > }; > > +static const struct meson_reset_param t7_param = { > + .reg_count = 7, > + .level_offset = 0x40, > +}; > + > static const struct of_device_id meson_reset_dt_ids[] = { > { .compatible = "amlogic,meson8b-reset", .data = &meson8b_param}, > { .compatible = "amlogic,meson-gxbb-reset", .data = &meson8b_param}, > @@ -109,6 +114,7 @@ static const struct of_device_id meson_reset_dt_ids[] = { > { .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param}, > { .compatible = "amlogic,meson-s4-reset", .data = &meson_s4_param}, > { .compatible = "amlogic,c3-reset", .data = &meson_s4_param}, > + { .compatible = "amlogic,t7-reset", .data = &t7_param}, > { /* sentinel */ }, > }; > MODULE_DEVICE_TABLE(of, meson_reset_dt_ids); > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On 29/03/2024 10:17, Kelvin Zhang via B4 Relay wrote: > From: Zelong Dong <zelong.dong@amlogic.com> > > Add the reset controller device of Amlogic T7 SoC family > > Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> > Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com> > --- > arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > index 5248bdf824ea..e94bb85b5292 100644 > --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi > @@ -5,6 +5,7 @@ > > #include <dt-bindings/interrupt-controller/arm-gic.h> > #include <dt-bindings/power/amlogic,t7-pwrc.h> > +#include <dt-bindings/reset/amlogic,t7-reset.h> > > / { > interrupt-parent = <&gic>; > @@ -149,6 +150,12 @@ apb4: bus@fe000000 { > #size-cells = <2>; > ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>; > > + reset: reset-controller@2000 { > + compatible = "amlogic,t7-reset"; > + reg = <0x0 0x2000 0x0 0x98>; > + #reset-cells = <1>; > + }; > + > watchdog@2100 { > compatible = "amlogic,t7-wdt"; > reg = <0x0 0x2100 0x0 0x10>; > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Hi Philipp, On 29/03/2024 10:17, Kelvin Zhang via B4 Relay wrote: > Add a new compatible and device node for Amlogic T7 Reset. > > Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> > Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com> > --- > Zelong Dong (3): > dt-bindings: reset: Add Amlogic T7 Reset Controller > reset: reset-meson: add support for Amlogic T7 SoC Reset Controller > arm64: dts: amlogic: add reset controller for Amlogic T7 SoC If you could apply patches 1 & 2 and prepare me an immutable branch, I could merge the DT part for v6.10. Thanks, Neil > > .../bindings/reset/amlogic,meson-reset.yaml | 1 + > arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 7 + > drivers/reset/reset-meson.c | 6 + > include/dt-bindings/reset/amlogic,t7-reset.h | 197 +++++++++++++++++++++ > 4 files changed, 211 insertions(+) > --- > base-commit: a6bd6c9333397f5a0e2667d4d82fef8c970108f2 > change-id: 20240329-t7-reset-f87e8346fadb > > Best regards,