Add the RTC bindings for the X1000 Soc from Ingenic.
Signed-off-by: Zhou Yanjie <[email protected]>
---
Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
index 41c7ae1..7ce0018 100644
--- a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
@@ -5,6 +5,7 @@ Required properties:
- compatible: One of:
- "ingenic,jz4740-rtc" - for use with the JZ4740 SoC
- "ingenic,jz4780-rtc" - for use with the JZ4780 SoC
+ - "ingenic,x1000-rtc" - for use with the X1000 SoC
- reg: Address range of rtc register set
- interrupts: IRQ number for the alarm interrupt
- clocks: phandle to the "rtc" clock
--
2.7.4
Add support for probing the rtc-jz4740 driver on the
X1000 Soc from Ingenic.
Signed-off-by: Zhou Yanjie <[email protected]>
---
drivers/rtc/rtc-jz4740.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index d0a8917..0c7ae65 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -34,7 +34,7 @@
#define JZ_REG_RTC_RESET_COUNTER 0x28
#define JZ_REG_RTC_SCRATCHPAD 0x34
-/* The following are present on the jz4780 */
+/* The following are present on the jz4780 and x1000 */
#define JZ_REG_RTC_WENR 0x3C
#define JZ_RTC_WENR_WEN BIT(31)
@@ -46,7 +46,7 @@
#define JZ_RTC_CTRL_AE BIT(2)
#define JZ_RTC_CTRL_ENABLE BIT(0)
-/* Magic value to enable writes on jz4780 */
+/* Magic value to enable writes on jz4780 and x1000 */
#define JZ_RTC_WENR_MAGIC 0xA55A
#define JZ_RTC_WAKEUP_FILTER_MASK 0x0000FFE0
@@ -55,6 +55,7 @@
enum jz4740_rtc_type {
ID_JZ4740,
ID_JZ4780,
+ ID_X1000,
};
struct jz4740_rtc {
@@ -301,6 +302,7 @@ static void jz4740_rtc_power_off(void)
static const struct of_device_id jz4740_rtc_of_match[] = {
{ .compatible = "ingenic,jz4740-rtc", .data = (void *)ID_JZ4740 },
{ .compatible = "ingenic,jz4780-rtc", .data = (void *)ID_JZ4780 },
+ { .compatible = "ingenic,x1000-rtc", .data = (void *)ID_X1000 },
{},
};
MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match);
@@ -429,6 +431,7 @@ static const struct dev_pm_ops jz4740_pm_ops = {
static const struct platform_device_id jz4740_rtc_ids[] = {
{ "jz4740-rtc", ID_JZ4740 },
{ "jz4780-rtc", ID_JZ4780 },
+ { "x1000-rtc", ID_X1000 },
{}
};
MODULE_DEVICE_TABLE(platform, jz4740_rtc_ids);
--
2.7.4
Ingenic had changed their product code name.
Latest SoCs had divided to several series such as
T30/M200/X1000 and no longer called JZ47xx.
Signed-off-by: Zhou Yanjie <[email protected]>
---
drivers/rtc/Kconfig | 4 ++--
drivers/rtc/rtc-jz4740.c | 15 +++------------
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 225b0b8..8b41853 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1576,10 +1576,10 @@ config RTC_DRV_MPC5121
will be called rtc-mpc5121.
config RTC_DRV_JZ4740
- tristate "Ingenic JZ4740 SoC"
+ tristate "Ingenic XBurst SoC"
depends on MIPS || COMPILE_TEST
help
- If you say yes here you get support for the Ingenic JZ47xx SoCs RTC
+ If you say yes here you get support for the Ingenic XBurst SoCs RTC
controllers.
This driver can also be built as a module. If so, the module
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index 0c7ae65..a262632 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -1,17 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2009-2010, Lars-Peter Clausen <[email protected]>
* Copyright (C) 2010, Paul Cercueil <[email protected]>
- * JZ4740 SoC RTC driver
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ * Ingenic XBurst platform RTC support
*/
#include <linux/clk.h>
@@ -450,5 +441,5 @@ module_platform_driver(jz4740_rtc_driver);
MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");
MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("RTC driver for the JZ4740 SoC\n");
+MODULE_DESCRIPTION("RTC driver for Ingenic XBurst platform\n");
MODULE_ALIAS("platform:jz4740-rtc");
--
2.7.4
Hello,
This seems like a useless renaming to me, can you elaborate a bit more?
I'd also like to have Paul and Lars-Peter comment.
On 29/01/2019 01:29:56+0800, Zhou Yanjie wrote:
> Add Ingenic X1000 RTC support.
>
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On 29/01/2019 01:29:58+0800, Zhou Yanjie wrote:
> Add the RTC bindings for the X1000 Soc from Ingenic.
>
The subject is not properly capitalized and this patch should either
come first or be squashed in the previous one.
> Signed-off-by: Zhou Yanjie <[email protected]>
> ---
> Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
> index 41c7ae1..7ce0018 100644
> --- a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
> +++ b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
> @@ -5,6 +5,7 @@ Required properties:
> - compatible: One of:
> - "ingenic,jz4740-rtc" - for use with the JZ4740 SoC
> - "ingenic,jz4780-rtc" - for use with the JZ4780 SoC
> + - "ingenic,x1000-rtc" - for use with the X1000 SoC
> - reg: Address range of rtc register set
> - interrupts: IRQ number for the alarm interrupt
> - clocks: phandle to the "rtc" clock
> --
> 2.7.4
>
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On 29/01/2019 01:29:59+0800, Zhou Yanjie wrote:
> Ingenic had changed their product code name.
> Latest SoCs had divided to several series such as
> T30/M200/X1000 and no longer called JZ47xx.
>
> Signed-off-by: Zhou Yanjie <[email protected]>
> ---
> drivers/rtc/Kconfig | 4 ++--
> drivers/rtc/rtc-jz4740.c | 15 +++------------
> 2 files changed, 5 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index 225b0b8..8b41853 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -1576,10 +1576,10 @@ config RTC_DRV_MPC5121
> will be called rtc-mpc5121.
>
> config RTC_DRV_JZ4740
> - tristate "Ingenic JZ4740 SoC"
> + tristate "Ingenic XBurst SoC"
> depends on MIPS || COMPILE_TEST
> help
> - If you say yes here you get support for the Ingenic JZ47xx SoCs RTC
> + If you say yes here you get support for the Ingenic XBurst SoCs RTC
> controllers.
>
> This driver can also be built as a module. If so, the module
> diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
> index 0c7ae65..a262632 100644
> --- a/drivers/rtc/rtc-jz4740.c
> +++ b/drivers/rtc/rtc-jz4740.c
> @@ -1,17 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
> /*
> * Copyright (C) 2009-2010, Lars-Peter Clausen <[email protected]>
> * Copyright (C) 2010, Paul Cercueil <[email protected]>
> - * JZ4740 SoC RTC driver
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - *
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, write to the Free Software Foundation, Inc.,
> - * 675 Mass Ave, Cambridge, MA 02139, USA.
> - *
This change is unrelated.
> + * Ingenic XBurst platform RTC support
> */
>
> #include <linux/clk.h>
> @@ -450,5 +441,5 @@ module_platform_driver(jz4740_rtc_driver);
>
> MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");
> MODULE_LICENSE("GPL");
> -MODULE_DESCRIPTION("RTC driver for the JZ4740 SoC\n");
> +MODULE_DESCRIPTION("RTC driver for Ingenic XBurst platform\n");
> MODULE_ALIAS("platform:jz4740-rtc");
> --
> 2.7.4
>
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Hi,
> Hello,
>
> This seems like a useless renaming to me, can you elaborate a bit
> more?
>
> I'd also like to have Paul and Lars-Peter comment.
According to the patchset, the RTC in the X1000 does not behave any
different
than the one in the JZ4780 SoC. Therefore patches 1/2 should be dropped.
In your devicetree bindings, just use the "ingenic,jz4780-rtc"
compatible
string instead. The same goes for all the drivers (e.g. the uart one).
I don't really mind the renaming, maybe replace "Ingenic JZ47xx SoCs"
with
just "Ingenic SoCs" since XBurst is just the name of the CPU inside
these
SoCs.
Regards,
-Paul
OK, thanks for your suggestions. I'll drop this patch.
On 2019年01月29日 04:48, Paul Cercueil wrote:
> Hi,
>
>> Hello,
>>
>> This seems like a useless renaming to me, can you elaborate a bit more?
>>
>> I'd also like to have Paul and Lars-Peter comment.
>
> According to the patchset, the RTC in the X1000 does not behave any
> different
> than the one in the JZ4780 SoC. Therefore patches 1/2 should be dropped.
> In your devicetree bindings, just use the "ingenic,jz4780-rtc" compatible
> string instead. The same goes for all the drivers (e.g. the uart one).
>
> I don't really mind the renaming, maybe replace "Ingenic JZ47xx SoCs"
> with
> just "Ingenic SoCs" since XBurst is just the name of the CPU inside these
> SoCs.
>
> Regards,
> -Paul
>