mbox series

[0/8] ARM: at91/dt: update to existing drivers for the sam9x60 SoC

Message ID cover.1547629763.git.nicolas.ferre@microchip.com
Headers show
Series ARM: at91/dt: update to existing drivers for the sam9x60 SoC | expand

Message

Nicolas Ferre Jan. 16, 2019, 9:57 a.m. UTC
Hi,

This serries collects some little modifications to DT bindings and associated
drivers changes for supporting the upcoming SAM9X60 SoC.

I took the advantage of this series for fixing some of the leftovers in DT
bindings for reset controller and Ethernet macb.

These changes touch several sub-systems but I would like that these (mostly
trivial) patches stay together for facilitating reviews, prevent breaking
dependencies and facilitating the tracking of acceptance status. However, tell
me if you think otherwise.
My intentions are that the series would enter Mainline through arm-soc tree:
sounds okay to everyone? If okay, I'm ready to collect Ack tags...

For the first batch, I send the whole series to everyone. I'll try my best to
reduce subsequent message deliveries if one part of the serries needs rework.

Best regards,
  Nicolas


Nicolas Ferre (8):
  dt-bindings: arm: atmel: add missing samx7 to reset controller
  dt-bindings: arm: atmel: add new sam9x60 reset controller binding
  dt-bindings: arm: atmel: add new sam9x60 SFR binding
  net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100
    interface
  net/macb: bindings doc: add sam9x60 binding
  power: reset: at91-reset: add support for sam9x60 SoC
  USB: host: ohci-at91: add sam9x60-sfr definition for ohci
  net: macb: add sam9x60-macb compatibility string

 .../devicetree/bindings/arm/atmel-sysregs.txt       |  4 +++-
 Documentation/devicetree/bindings/net/macb.txt      |  4 ++--
 drivers/net/ethernet/cadence/macb_main.c            |  1 +
 drivers/power/reset/at91-reset.c                    | 13 +++++++++++++
 drivers/usb/host/ohci-at91.c                        |  7 +++++--
 5 files changed, 24 insertions(+), 5 deletions(-)

Comments

Sebastian Reichel Jan. 23, 2019, 6:34 p.m. UTC | #1
Hi,

On Wed, Jan 16, 2019 at 10:57:42AM +0100, Nicolas Ferre wrote:
> Add support for additional reset causes and the proper compatibility
> string for sam9x60 SoC. The restart function is the same as the samx7.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
>  drivers/power/reset/at91-reset.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
> index f44a9ffcc2ab..44ca983a49a1 100644
> --- a/drivers/power/reset/at91-reset.c
> +++ b/drivers/power/reset/at91-reset.c
> @@ -44,6 +44,9 @@ enum reset_type {
>  	RESET_TYPE_WATCHDOG	= 2,
>  	RESET_TYPE_SOFTWARE	= 3,
>  	RESET_TYPE_USER		= 4,
> +	RESET_TYPE_CPU_FAIL	= 6,
> +	RESET_TYPE_XTAL_FAIL	= 7,
> +	RESET_TYPE_ULP2		= 8,

what happened to 5? :)

>  };
>  
>  static void __iomem *at91_ramc_base[2], *at91_rstc_base;
> @@ -164,6 +167,15 @@ static void __init at91_reset_status(struct platform_device *pdev)
>  	case RESET_TYPE_USER:
>  		reason = "user reset";
>  		break;
> +	case RESET_TYPE_CPU_FAIL:
> +		reason = "CPU clock failure detection";
> +		break;
> +	case RESET_TYPE_XTAL_FAIL:
> +		reason = "32.768 kHz crystal failure detection";
> +		break;
> +	case RESET_TYPE_ULP2:
> +		reason = "ULP2 reset";
> +		break;
>  	default:
>  		reason = "unknown reset";
>  		break;
> @@ -183,6 +195,7 @@ static const struct of_device_id at91_reset_of_match[] = {
>  	{ .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart },
>  	{ .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart },
>  	{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },
> +	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, at91_reset_of_match);

Patch looks fine to me. But I will wait a bit with merging, so that
Alexandre or Ludovic have a chance to provide feedback.

-- Sebastian
Nicolas Ferre Jan. 24, 2019, 10:34 a.m. UTC | #2
Hi Sebastian,

On 23/01/2019 at 19:34, Sebastian Reichel wrote:
> Hi,
> 
> On Wed, Jan 16, 2019 at 10:57:42AM +0100, Nicolas Ferre wrote:
>> Add support for additional reset causes and the proper compatibility
>> string for sam9x60 SoC. The restart function is the same as the samx7.
>>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>> ---
>>   drivers/power/reset/at91-reset.c | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
>> index f44a9ffcc2ab..44ca983a49a1 100644
>> --- a/drivers/power/reset/at91-reset.c
>> +++ b/drivers/power/reset/at91-reset.c
>> @@ -44,6 +44,9 @@ enum reset_type {
>>   	RESET_TYPE_WATCHDOG	= 2,
>>   	RESET_TYPE_SOFTWARE	= 3,
>>   	RESET_TYPE_USER		= 4,
>> +	RESET_TYPE_CPU_FAIL	= 6,
>> +	RESET_TYPE_XTAL_FAIL	= 7,
>> +	RESET_TYPE_ULP2		= 8,
> 
> what happened to 5? :)

That a good question ;-)

It's marked as "Reserved"... which opens up a whole new field of 
speculation :-)

[..]

>>   	{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },
>> +	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
>>   	{ /* sentinel */ }
>>   };
>>   MODULE_DEVICE_TABLE(of, at91_reset_of_match);
> 
> Patch looks fine to me. But I will wait a bit with merging, so that
> Alexandre or Ludovic have a chance to provide feedback.

What about merging this patch with the whole series through the at91 
then arm-soc trees?

Best regards,
Sebastian Reichel Jan. 24, 2019, 5:11 p.m. UTC | #3
Hi,

On Thu, Jan 24, 2019 at 10:34:50AM +0000, Nicolas.Ferre@microchip.com wrote:
> Hi Sebastian,
> 
> On 23/01/2019 at 19:34, Sebastian Reichel wrote:
> > Hi,
> > 
> > On Wed, Jan 16, 2019 at 10:57:42AM +0100, Nicolas Ferre wrote:
> >> Add support for additional reset causes and the proper compatibility
> >> string for sam9x60 SoC. The restart function is the same as the samx7.
> >>
> >> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> >> ---
> >>   drivers/power/reset/at91-reset.c | 13 +++++++++++++
> >>   1 file changed, 13 insertions(+)
> >>
> >> diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
> >> index f44a9ffcc2ab..44ca983a49a1 100644
> >> --- a/drivers/power/reset/at91-reset.c
> >> +++ b/drivers/power/reset/at91-reset.c
> >> @@ -44,6 +44,9 @@ enum reset_type {
> >>   	RESET_TYPE_WATCHDOG	= 2,
> >>   	RESET_TYPE_SOFTWARE	= 3,
> >>   	RESET_TYPE_USER		= 4,
> >> +	RESET_TYPE_CPU_FAIL	= 6,
> >> +	RESET_TYPE_XTAL_FAIL	= 7,
> >> +	RESET_TYPE_ULP2		= 8,
> > 
> > what happened to 5? :)
> 
> That a good question ;-)
> 
> It's marked as "Reserved"... which opens up a whole new field of 
> speculation :-)

Ok :)

> [..]
> 
> >>   	{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },
> >> +	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
> >>   	{ /* sentinel */ }
> >>   };
> >>   MODULE_DEVICE_TABLE(of, at91_reset_of_match);
> > 
> > Patch looks fine to me. But I will wait a bit with merging, so that
> > Alexandre or Ludovic have a chance to provide feedback.
> 
> What about merging this patch with the whole series through the at91 
> then arm-soc trees?

It seems to be possible to merge this standalone, but merging
through at91/arm-soc is also fine with me.

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian
Nicolas Ferre Jan. 25, 2019, 9:16 a.m. UTC | #4
Hi David,

On 16/01/2019 at 10:57, Nicolas Ferre wrote:
> Add a new compatibility string for this product. It's using
> at91sam9260-macb layout but has a newer hardware revision: it's safer
> to use its own string.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>

I'm thinking of pushing this patch with the others of the series through 
arm-soc tree. Can I have your "Acked-by" tag then?

Best regards,
   Nicolas


> ---
>   drivers/net/ethernet/cadence/macb_main.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 66cc7927061a..a0889ef107a1 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -3941,6 +3941,7 @@ static const struct of_device_id macb_dt_ids[] = {
>   	{ .compatible = "cdns,np4-macb", .data = &np4_config },
>   	{ .compatible = "cdns,pc302-gem", .data = &pc302gem_config },
>   	{ .compatible = "cdns,gem", .data = &pc302gem_config },
> +	{ .compatible = "cdns,sam9x60-macb", .data = &at91sam9260_config },
>   	{ .compatible = "atmel,sama5d2-gem", .data = &sama5d2_config },
>   	{ .compatible = "atmel,sama5d3-gem", .data = &sama5d3_config },
>   	{ .compatible = "atmel,sama5d3-macb", .data = &sama5d3macb_config },
>
Nicolas Ferre Feb. 6, 2019, 5:51 p.m. UTC | #5
All,

On 16/01/2019 at 10:57, Nicolas Ferre wrote:
> Hi,
> 
> This series collects some little modifications to DT bindings and associated
> drivers changes for supporting the upcoming SAM9X60 SoC.
> 
> I took the advantage of this series for fixing some of the leftovers in DT
> bindings for reset controller and Ethernet macb.
> 
> These changes touch several sub-systems but I would like that these (mostly
> trivial) patches stay together for facilitating reviews, prevent breaking
> dependencies and facilitating the tracking of acceptance status. However, tell
> me if you think otherwise.

It seems it's not the preferred way to go and that I must split and send 
to sub-system Maintainers so that bindings and driver code go together 
through Maintainer's git trees (USB, power/reset, netdev).

> My intentions are that the series would enter Mainline through arm-soc tree:
> sounds okay to everyone? If okay, I'm ready to collect Ack tags...

I'm re-sending this split series. Some of the "Reviewed-by:" are missing 
so we'll have the chance to add them on individual series.

Thanks for your reviews so far.

Best regards,
   Nicolas


> For the first batch, I send the whole series to everyone. I'll try my best to
> reduce subsequent message deliveries if one part of the serries needs rework.
> 
> Best regards,
>    Nicolas
> 
> 
> Nicolas Ferre (8):
>    dt-bindings: arm: atmel: add missing samx7 to reset controller
>    dt-bindings: arm: atmel: add new sam9x60 reset controller binding
>    dt-bindings: arm: atmel: add new sam9x60 SFR binding
>    net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100
>      interface
>    net/macb: bindings doc: add sam9x60 binding
>    power: reset: at91-reset: add support for sam9x60 SoC
>    USB: host: ohci-at91: add sam9x60-sfr definition for ohci
>    net: macb: add sam9x60-macb compatibility string
> 
>   .../devicetree/bindings/arm/atmel-sysregs.txt       |  4 +++-
>   Documentation/devicetree/bindings/net/macb.txt      |  4 ++--
>   drivers/net/ethernet/cadence/macb_main.c            |  1 +
>   drivers/power/reset/at91-reset.c                    | 13 +++++++++++++
>   drivers/usb/host/ohci-at91.c                        |  7 +++++--
>   5 files changed, 24 insertions(+), 5 deletions(-)
>