* [PATCH v2 0/4] ARM: Initial RTD1195 and MeLE X1000 support
@ 2019-10-31 16:53 ` Andreas Färber
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: linux-arm-kernel, linux-kernel, Andreas Färber, devicetree,
Rob Herring, Arnd Bergmann
Hello,
This series adds initial support for Realtek RTD1195 SoC
and adds a Device Tree for the MeLE X1000 TV set-top-box.
v2 cleans up memory reservations and enables the arch timer.
More details at:
https://en.opensuse.org/HCL:Mele_X1000
Latest experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next
Have a lot of fun!
Cheers,
Andreas
v1 -> v2:
* Do not redundantly select COMMON_CLK (Arnd)
* Drop further unneeded selects
* Clean up memory reservations (Rob)
* Enable arch timer
Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Andreas Färber (4):
dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
ARM: Prepare Realtek RTD1195
ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
ARM: realtek: Enable RTD1195 arch timer
Documentation/devicetree/bindings/arm/realtek.yaml | 6 +
arch/arm/Kconfig | 2 +
arch/arm/Makefile | 3 +
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/rtd1195-mele-x1000.dts | 31 +++++
arch/arm/boot/dts/rtd1195.dtsi | 127 +++++++++++++++++++++
arch/arm/mach-realtek/Kconfig | 11 ++
arch/arm/mach-realtek/Makefile | 2 +
arch/arm/mach-realtek/rtd1195.c | 53 +++++++++
9 files changed, 237 insertions(+)
create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts
create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
create mode 100644 arch/arm/mach-realtek/Kconfig
create mode 100644 arch/arm/mach-realtek/Makefile
create mode 100644 arch/arm/mach-realtek/rtd1195.c
--
2.16.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 0/4] ARM: Initial RTD1195 and MeLE X1000 support
@ 2019-10-31 16:53 ` Andreas Färber
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: Rob Herring, Arnd Bergmann, devicetree, linux-kernel,
Andreas Färber, linux-arm-kernel
Hello,
This series adds initial support for Realtek RTD1195 SoC
and adds a Device Tree for the MeLE X1000 TV set-top-box.
v2 cleans up memory reservations and enables the arch timer.
More details at:
https://en.opensuse.org/HCL:Mele_X1000
Latest experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next
Have a lot of fun!
Cheers,
Andreas
v1 -> v2:
* Do not redundantly select COMMON_CLK (Arnd)
* Drop further unneeded selects
* Clean up memory reservations (Rob)
* Enable arch timer
Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Andreas Färber (4):
dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
ARM: Prepare Realtek RTD1195
ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
ARM: realtek: Enable RTD1195 arch timer
Documentation/devicetree/bindings/arm/realtek.yaml | 6 +
arch/arm/Kconfig | 2 +
arch/arm/Makefile | 3 +
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/rtd1195-mele-x1000.dts | 31 +++++
arch/arm/boot/dts/rtd1195.dtsi | 127 +++++++++++++++++++++
arch/arm/mach-realtek/Kconfig | 11 ++
arch/arm/mach-realtek/Makefile | 2 +
arch/arm/mach-realtek/rtd1195.c | 53 +++++++++
9 files changed, 237 insertions(+)
create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts
create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
create mode 100644 arch/arm/mach-realtek/Kconfig
create mode 100644 arch/arm/mach-realtek/Makefile
create mode 100644 arch/arm/mach-realtek/rtd1195.c
--
2.16.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/4] dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
2019-10-31 16:53 ` Andreas Färber
@ 2019-10-31 16:53 ` Andreas Färber
-1 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: linux-arm-kernel, linux-kernel, Andreas Färber, Rob Herring,
Mark Rutland, devicetree
Add bindings for Realtek RTD1195 SoC and MeLE X1000 TV box.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v1 -> v2: Unchanged
* Added Reviewed-by
Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/realtek.yaml b/Documentation/devicetree/bindings/arm/realtek.yaml
index ab59de17152d..091616880d25 100644
--- a/Documentation/devicetree/bindings/arm/realtek.yaml
+++ b/Documentation/devicetree/bindings/arm/realtek.yaml
@@ -14,6 +14,12 @@ properties:
const: '/'
compatible:
oneOf:
+ # RTD1195 SoC based boards
+ - items:
+ - enum:
+ - mele,x1000 # MeLE X1000
+ - const: realtek,rtd1195
+
# RTD1293 SoC based boards
- items:
- enum:
--
2.16.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 1/4] dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
@ 2019-10-31 16:53 ` Andreas Färber
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
Andreas Färber, linux-arm-kernel
Add bindings for Realtek RTD1195 SoC and MeLE X1000 TV box.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v1 -> v2: Unchanged
* Added Reviewed-by
Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/realtek.yaml b/Documentation/devicetree/bindings/arm/realtek.yaml
index ab59de17152d..091616880d25 100644
--- a/Documentation/devicetree/bindings/arm/realtek.yaml
+++ b/Documentation/devicetree/bindings/arm/realtek.yaml
@@ -14,6 +14,12 @@ properties:
const: '/'
compatible:
oneOf:
+ # RTD1195 SoC based boards
+ - items:
+ - enum:
+ - mele,x1000 # MeLE X1000
+ - const: realtek,rtd1195
+
# RTD1293 SoC based boards
- items:
- enum:
--
2.16.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/4] ARM: Prepare Realtek RTD1195
2019-10-31 16:53 ` Andreas Färber
@ 2019-10-31 16:53 ` Andreas Färber
-1 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: linux-arm-kernel, linux-kernel, Andreas Färber, Russell King
Introduce ARCH_REALTEK Kconfig option also for 32-bit Arm.
Override the text offset to cope with boot ROM occupying first 0xa800
bytes and further reservations up to 0xf4000 (compare Device Tree).
Add a custom machine_desc to enforce memory carveout for I/O registers.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v1 -> v2:
* Dropped selection of COMMON_CLK (Arnd)
* Dropped selection of AMBA, SCU, TWD
* Added comment about text offset to distinguish from HTC comment above
* Added machine_desc with .reserve to exclude peripheral spaces (Rob)
arch/arm/Kconfig | 2 ++
arch/arm/Makefile | 3 +++
arch/arm/mach-realtek/Kconfig | 11 +++++++++++
arch/arm/mach-realtek/Makefile | 2 ++
arch/arm/mach-realtek/rtd1195.c | 37 +++++++++++++++++++++++++++++++++++++
5 files changed, 55 insertions(+)
create mode 100644 arch/arm/mach-realtek/Kconfig
create mode 100644 arch/arm/mach-realtek/Makefile
create mode 100644 arch/arm/mach-realtek/rtd1195.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b7dbeb652cb1..d800b3240790 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -700,6 +700,8 @@ source "arch/arm/mach-qcom/Kconfig"
source "arch/arm/mach-rda/Kconfig"
+source "arch/arm/mach-realtek/Kconfig"
+
source "arch/arm/mach-realview/Kconfig"
source "arch/arm/mach-rockchip/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db857d07114f..16d41efea7f2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -148,6 +148,8 @@ head-y := arch/arm/kernel/head$(MMUEXT).o
textofs-y := 0x00008000
# We don't want the htc bootloader to corrupt kernel during resume
textofs-$(CONFIG_PM_H1940) := 0x00108000
+# RTD1195 has Boot ROM at start of address space
+textofs-$(CONFIG_ARCH_REALTEK) := 0x00108000
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
@@ -207,6 +209,7 @@ machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
machine-$(CONFIG_ARCH_PXA) += pxa
machine-$(CONFIG_ARCH_QCOM) += qcom
machine-$(CONFIG_ARCH_RDA) += rda
+machine-$(CONFIG_ARCH_REALTEK) += realtek
machine-$(CONFIG_ARCH_REALVIEW) += realview
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
machine-$(CONFIG_ARCH_RPC) += rpc
diff --git a/arch/arm/mach-realtek/Kconfig b/arch/arm/mach-realtek/Kconfig
new file mode 100644
index 000000000000..19fdcf093fd1
--- /dev/null
+++ b/arch/arm/mach-realtek/Kconfig
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+menuconfig ARCH_REALTEK
+ bool "Realtek SoCs"
+ depends on ARCH_MULTI_V7
+ select ARM_GIC
+ select ARM_GLOBAL_TIMER
+ select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
+ select GENERIC_IRQ_CHIP
+ select RESET_CONTROLLER
+ help
+ This enables support for the Realtek RTD1195 SoC family.
diff --git a/arch/arm/mach-realtek/Makefile b/arch/arm/mach-realtek/Makefile
new file mode 100644
index 000000000000..5382d5bbdd3c
--- /dev/null
+++ b/arch/arm/mach-realtek/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+obj-y += rtd1195.o
diff --git a/arch/arm/mach-realtek/rtd1195.c b/arch/arm/mach-realtek/rtd1195.c
new file mode 100644
index 000000000000..99e5d3e96a8e
--- /dev/null
+++ b/arch/arm/mach-realtek/rtd1195.c
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Realtek RTD1195
+ *
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+#include <linux/memblock.h>
+#include <asm/mach/arch.h>
+
+static void __init rtd1195_memblock_remove(phys_addr_t base, phys_addr_t size)
+{
+ int ret;
+
+ ret = memblock_remove(base, size);
+ if (ret)
+ pr_err("Failed to remove memblock %pa (%d)\n", &base, ret);
+}
+
+static void __init rtd1195_reserve(void)
+{
+ /* Exclude peripheral register spaces from RAM */
+ rtd1195_memblock_remove(0x18000000, 0x00100000);
+ rtd1195_memblock_remove(0x18100000, 0x01000000);
+}
+
+static const char *const rtd1195_dt_compat[] __initconst = {
+ "realtek,rtd1195",
+ NULL
+};
+
+DT_MACHINE_START(rtd1195, "Realtek RTD1195")
+ .dt_compat = rtd1195_dt_compat,
+ .reserve = rtd1195_reserve,
+ .l2c_aux_val = 0x0,
+ .l2c_aux_mask = ~0x0,
+MACHINE_END
--
2.16.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/4] ARM: Prepare Realtek RTD1195
@ 2019-10-31 16:53 ` Andreas Färber
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: Russell King, linux-kernel, linux-arm-kernel, Andreas Färber
Introduce ARCH_REALTEK Kconfig option also for 32-bit Arm.
Override the text offset to cope with boot ROM occupying first 0xa800
bytes and further reservations up to 0xf4000 (compare Device Tree).
Add a custom machine_desc to enforce memory carveout for I/O registers.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v1 -> v2:
* Dropped selection of COMMON_CLK (Arnd)
* Dropped selection of AMBA, SCU, TWD
* Added comment about text offset to distinguish from HTC comment above
* Added machine_desc with .reserve to exclude peripheral spaces (Rob)
arch/arm/Kconfig | 2 ++
arch/arm/Makefile | 3 +++
arch/arm/mach-realtek/Kconfig | 11 +++++++++++
arch/arm/mach-realtek/Makefile | 2 ++
arch/arm/mach-realtek/rtd1195.c | 37 +++++++++++++++++++++++++++++++++++++
5 files changed, 55 insertions(+)
create mode 100644 arch/arm/mach-realtek/Kconfig
create mode 100644 arch/arm/mach-realtek/Makefile
create mode 100644 arch/arm/mach-realtek/rtd1195.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b7dbeb652cb1..d800b3240790 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -700,6 +700,8 @@ source "arch/arm/mach-qcom/Kconfig"
source "arch/arm/mach-rda/Kconfig"
+source "arch/arm/mach-realtek/Kconfig"
+
source "arch/arm/mach-realview/Kconfig"
source "arch/arm/mach-rockchip/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db857d07114f..16d41efea7f2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -148,6 +148,8 @@ head-y := arch/arm/kernel/head$(MMUEXT).o
textofs-y := 0x00008000
# We don't want the htc bootloader to corrupt kernel during resume
textofs-$(CONFIG_PM_H1940) := 0x00108000
+# RTD1195 has Boot ROM at start of address space
+textofs-$(CONFIG_ARCH_REALTEK) := 0x00108000
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
@@ -207,6 +209,7 @@ machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
machine-$(CONFIG_ARCH_PXA) += pxa
machine-$(CONFIG_ARCH_QCOM) += qcom
machine-$(CONFIG_ARCH_RDA) += rda
+machine-$(CONFIG_ARCH_REALTEK) += realtek
machine-$(CONFIG_ARCH_REALVIEW) += realview
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
machine-$(CONFIG_ARCH_RPC) += rpc
diff --git a/arch/arm/mach-realtek/Kconfig b/arch/arm/mach-realtek/Kconfig
new file mode 100644
index 000000000000..19fdcf093fd1
--- /dev/null
+++ b/arch/arm/mach-realtek/Kconfig
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+menuconfig ARCH_REALTEK
+ bool "Realtek SoCs"
+ depends on ARCH_MULTI_V7
+ select ARM_GIC
+ select ARM_GLOBAL_TIMER
+ select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
+ select GENERIC_IRQ_CHIP
+ select RESET_CONTROLLER
+ help
+ This enables support for the Realtek RTD1195 SoC family.
diff --git a/arch/arm/mach-realtek/Makefile b/arch/arm/mach-realtek/Makefile
new file mode 100644
index 000000000000..5382d5bbdd3c
--- /dev/null
+++ b/arch/arm/mach-realtek/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+obj-y += rtd1195.o
diff --git a/arch/arm/mach-realtek/rtd1195.c b/arch/arm/mach-realtek/rtd1195.c
new file mode 100644
index 000000000000..99e5d3e96a8e
--- /dev/null
+++ b/arch/arm/mach-realtek/rtd1195.c
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Realtek RTD1195
+ *
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+#include <linux/memblock.h>
+#include <asm/mach/arch.h>
+
+static void __init rtd1195_memblock_remove(phys_addr_t base, phys_addr_t size)
+{
+ int ret;
+
+ ret = memblock_remove(base, size);
+ if (ret)
+ pr_err("Failed to remove memblock %pa (%d)\n", &base, ret);
+}
+
+static void __init rtd1195_reserve(void)
+{
+ /* Exclude peripheral register spaces from RAM */
+ rtd1195_memblock_remove(0x18000000, 0x00100000);
+ rtd1195_memblock_remove(0x18100000, 0x01000000);
+}
+
+static const char *const rtd1195_dt_compat[] __initconst = {
+ "realtek,rtd1195",
+ NULL
+};
+
+DT_MACHINE_START(rtd1195, "Realtek RTD1195")
+ .dt_compat = rtd1195_dt_compat,
+ .reserve = rtd1195_reserve,
+ .l2c_aux_val = 0x0,
+ .l2c_aux_mask = ~0x0,
+MACHINE_END
--
2.16.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/4] ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
2019-10-31 16:53 ` Andreas Färber
@ 2019-10-31 16:53 ` Andreas Färber
-1 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: linux-arm-kernel, linux-kernel, Andreas Färber, Rob Herring,
Mark Rutland, devicetree
Add Device Trees for Realtek RTD1195 SoC and MeLE X1000 TV box.
Reuse the existing RTD1295 watchdog compatible for now.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v1 -> v2:
* Dropped /memreserve/ and reserved-memory nodes for peripherals and NOR (Rob)
* Carved them out from memory reg instead (Rob)
* Converted some /memreserve/s to reserved-memory nodes
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/rtd1195-mele-x1000.dts | 31 ++++++++
arch/arm/boot/dts/rtd1195.dtsi | 127 +++++++++++++++++++++++++++++++
3 files changed, 160 insertions(+)
create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts
create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e352598c05ae..cb710bf98a80 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -864,6 +864,8 @@ dtb-$(CONFIG_ARCH_QCOM) += \
dtb-$(CONFIG_ARCH_RDA) += \
rda8810pl-orangepi-2g-iot.dtb \
rda8810pl-orangepi-i96.dtb
+dtb-$(CONFIG_ARCH_REALTEK) += \
+ rtd1195-mele-x1000.dtb
dtb-$(CONFIG_ARCH_REALVIEW) += \
arm-realview-pb1176.dtb \
arm-realview-pb11mp.dtb \
diff --git a/arch/arm/boot/dts/rtd1195-mele-x1000.dts b/arch/arm/boot/dts/rtd1195-mele-x1000.dts
new file mode 100644
index 000000000000..834b430e6250
--- /dev/null
+++ b/arch/arm/boot/dts/rtd1195-mele-x1000.dts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+/dts-v1/;
+
+#include "rtd1195.dtsi"
+
+/ {
+ compatible = "mele,x1000", "realtek,rtd1195";
+ model = "MeLE X1000";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x18000000>,
+ <0x19100000 0x26f00000>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/rtd1195.dtsi b/arch/arm/boot/dts/rtd1195.dtsi
new file mode 100644
index 000000000000..582f169644b5
--- /dev/null
+++ b/arch/arm/boot/dts/rtd1195.dtsi
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+/memreserve/ 0x00000000 0x0000a800; /* boot code */
+/memreserve/ 0x0000c000 0x000f4000;
+/memreserve/ 0x17fff000 0x00001000;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ compatible = "realtek,rtd1195";
+ interrupt-parent = <&gic>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a7";
+ reg = <0x0>;
+ clock-frequency = <1000000000>;
+ };
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a7";
+ reg = <0x1>;
+ clock-frequency = <1000000000>;
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ rpc_comm: rpc@b000 {
+ reg = <0x0000b000 0x1000>;
+ };
+
+ audio@1b00000 {
+ reg = <0x01b00000 0x400000>;
+ };
+
+ rpc_ringbuf: rpc@1ffe000 {
+ reg = <0x01ffe000 0x4000>;
+ };
+
+ secure@10000000 {
+ reg = <0x10000000 0x100000>;
+ no-map;
+ };
+ };
+
+ arm-pmu {
+ compatible = "arm,cortex-a7-pmu";
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-affinity = <&cpu0>, <&cpu1>;
+ };
+
+ timer {
+ compatible = "arm,armv7-timer";
+ interrupts = <GIC_PPI 13
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>;
+ clock-frequency = <27000000>;
+ };
+
+ osc27M: osc {
+ compatible = "fixed-clock";
+ clock-frequency = <27000000>;
+ #clock-cells = <0>;
+ clock-output-names = "osc27M";
+ };
+
+ soc {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x18000000 0x18000000 0x00100000>,
+ <0x18100000 0x18100000 0x01000000>,
+ <0x40000000 0x40000000 0xc0000000>;
+
+ wdt: watchdog@18007680 {
+ compatible = "realtek,rtd1295-watchdog";
+ reg = <0x18007680 0x100>;
+ clocks = <&osc27M>;
+ };
+
+ uart0: serial@18007800 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x18007800 0x400>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clock-frequency = <27000000>;
+ status = "disabled";
+ };
+
+ uart1: serial@1801b200 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x1801b200 0x100>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clock-frequency = <27000000>;
+ status = "disabled";
+ };
+
+ gic: interrupt-controller@ff011000 {
+ compatible = "arm,cortex-a7-gic";
+ reg = <0xff011000 0x1000>,
+ <0xff012000 0x2000>;
+ interrupt-controller;
+ #interrupt-cells = <3>;
+ };
+ };
+};
--
2.16.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/4] ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
@ 2019-10-31 16:53 ` Andreas Färber
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
Andreas Färber, linux-arm-kernel
Add Device Trees for Realtek RTD1195 SoC and MeLE X1000 TV box.
Reuse the existing RTD1295 watchdog compatible for now.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v1 -> v2:
* Dropped /memreserve/ and reserved-memory nodes for peripherals and NOR (Rob)
* Carved them out from memory reg instead (Rob)
* Converted some /memreserve/s to reserved-memory nodes
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/rtd1195-mele-x1000.dts | 31 ++++++++
arch/arm/boot/dts/rtd1195.dtsi | 127 +++++++++++++++++++++++++++++++
3 files changed, 160 insertions(+)
create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts
create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e352598c05ae..cb710bf98a80 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -864,6 +864,8 @@ dtb-$(CONFIG_ARCH_QCOM) += \
dtb-$(CONFIG_ARCH_RDA) += \
rda8810pl-orangepi-2g-iot.dtb \
rda8810pl-orangepi-i96.dtb
+dtb-$(CONFIG_ARCH_REALTEK) += \
+ rtd1195-mele-x1000.dtb
dtb-$(CONFIG_ARCH_REALVIEW) += \
arm-realview-pb1176.dtb \
arm-realview-pb11mp.dtb \
diff --git a/arch/arm/boot/dts/rtd1195-mele-x1000.dts b/arch/arm/boot/dts/rtd1195-mele-x1000.dts
new file mode 100644
index 000000000000..834b430e6250
--- /dev/null
+++ b/arch/arm/boot/dts/rtd1195-mele-x1000.dts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+/dts-v1/;
+
+#include "rtd1195.dtsi"
+
+/ {
+ compatible = "mele,x1000", "realtek,rtd1195";
+ model = "MeLE X1000";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x18000000>,
+ <0x19100000 0x26f00000>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/rtd1195.dtsi b/arch/arm/boot/dts/rtd1195.dtsi
new file mode 100644
index 000000000000..582f169644b5
--- /dev/null
+++ b/arch/arm/boot/dts/rtd1195.dtsi
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+/memreserve/ 0x00000000 0x0000a800; /* boot code */
+/memreserve/ 0x0000c000 0x000f4000;
+/memreserve/ 0x17fff000 0x00001000;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ compatible = "realtek,rtd1195";
+ interrupt-parent = <&gic>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a7";
+ reg = <0x0>;
+ clock-frequency = <1000000000>;
+ };
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a7";
+ reg = <0x1>;
+ clock-frequency = <1000000000>;
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ rpc_comm: rpc@b000 {
+ reg = <0x0000b000 0x1000>;
+ };
+
+ audio@1b00000 {
+ reg = <0x01b00000 0x400000>;
+ };
+
+ rpc_ringbuf: rpc@1ffe000 {
+ reg = <0x01ffe000 0x4000>;
+ };
+
+ secure@10000000 {
+ reg = <0x10000000 0x100000>;
+ no-map;
+ };
+ };
+
+ arm-pmu {
+ compatible = "arm,cortex-a7-pmu";
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-affinity = <&cpu0>, <&cpu1>;
+ };
+
+ timer {
+ compatible = "arm,armv7-timer";
+ interrupts = <GIC_PPI 13
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10
+ (GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>;
+ clock-frequency = <27000000>;
+ };
+
+ osc27M: osc {
+ compatible = "fixed-clock";
+ clock-frequency = <27000000>;
+ #clock-cells = <0>;
+ clock-output-names = "osc27M";
+ };
+
+ soc {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x18000000 0x18000000 0x00100000>,
+ <0x18100000 0x18100000 0x01000000>,
+ <0x40000000 0x40000000 0xc0000000>;
+
+ wdt: watchdog@18007680 {
+ compatible = "realtek,rtd1295-watchdog";
+ reg = <0x18007680 0x100>;
+ clocks = <&osc27M>;
+ };
+
+ uart0: serial@18007800 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x18007800 0x400>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clock-frequency = <27000000>;
+ status = "disabled";
+ };
+
+ uart1: serial@1801b200 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x1801b200 0x100>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clock-frequency = <27000000>;
+ status = "disabled";
+ };
+
+ gic: interrupt-controller@ff011000 {
+ compatible = "arm,cortex-a7-gic";
+ reg = <0xff011000 0x1000>,
+ <0xff012000 0x2000>;
+ interrupt-controller;
+ #interrupt-cells = <3>;
+ };
+ };
+};
--
2.16.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 4/4] ARM: realtek: Enable RTD1195 arch timer
2019-10-31 16:53 ` Andreas Färber
@ 2019-10-31 16:53 ` Andreas Färber
-1 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: linux-arm-kernel, linux-kernel, Andreas Färber, Russell King
Without this magic write the timer doesn't work and boot gets stuck.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v2: New
arch/arm/mach-realtek/rtd1195.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/mach-realtek/rtd1195.c b/arch/arm/mach-realtek/rtd1195.c
index 99e5d3e96a8e..cd16f1e99646 100644
--- a/arch/arm/mach-realtek/rtd1195.c
+++ b/arch/arm/mach-realtek/rtd1195.c
@@ -5,6 +5,9 @@
* Copyright (c) 2017-2019 Andreas Färber
*/
+#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
+#include <linux/io.h>
#include <linux/memblock.h>
#include <asm/mach/arch.h>
@@ -24,6 +27,18 @@ static void __init rtd1195_reserve(void)
rtd1195_memblock_remove(0x18100000, 0x01000000);
}
+static void __init rtd1195_init_time(void)
+{
+ void __iomem *base;
+
+ base = ioremap(0xff018000, 4);
+ writel(0x1, base);
+ iounmap(base);
+
+ of_clk_init(NULL);
+ timer_probe();
+}
+
static const char *const rtd1195_dt_compat[] __initconst = {
"realtek,rtd1195",
NULL
@@ -31,6 +46,7 @@ static const char *const rtd1195_dt_compat[] __initconst = {
DT_MACHINE_START(rtd1195, "Realtek RTD1195")
.dt_compat = rtd1195_dt_compat,
+ .init_time = rtd1195_init_time,
.reserve = rtd1195_reserve,
.l2c_aux_val = 0x0,
.l2c_aux_mask = ~0x0,
--
2.16.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 4/4] ARM: realtek: Enable RTD1195 arch timer
@ 2019-10-31 16:53 ` Andreas Färber
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Färber @ 2019-10-31 16:53 UTC (permalink / raw)
To: linux-realtek-soc
Cc: Russell King, linux-kernel, linux-arm-kernel, Andreas Färber
Without this magic write the timer doesn't work and boot gets stuck.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
v2: New
arch/arm/mach-realtek/rtd1195.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/mach-realtek/rtd1195.c b/arch/arm/mach-realtek/rtd1195.c
index 99e5d3e96a8e..cd16f1e99646 100644
--- a/arch/arm/mach-realtek/rtd1195.c
+++ b/arch/arm/mach-realtek/rtd1195.c
@@ -5,6 +5,9 @@
* Copyright (c) 2017-2019 Andreas Färber
*/
+#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
+#include <linux/io.h>
#include <linux/memblock.h>
#include <asm/mach/arch.h>
@@ -24,6 +27,18 @@ static void __init rtd1195_reserve(void)
rtd1195_memblock_remove(0x18100000, 0x01000000);
}
+static void __init rtd1195_init_time(void)
+{
+ void __iomem *base;
+
+ base = ioremap(0xff018000, 4);
+ writel(0x1, base);
+ iounmap(base);
+
+ of_clk_init(NULL);
+ timer_probe();
+}
+
static const char *const rtd1195_dt_compat[] __initconst = {
"realtek,rtd1195",
NULL
@@ -31,6 +46,7 @@ static const char *const rtd1195_dt_compat[] __initconst = {
DT_MACHINE_START(rtd1195, "Realtek RTD1195")
.dt_compat = rtd1195_dt_compat,
+ .init_time = rtd1195_init_time,
.reserve = rtd1195_reserve,
.l2c_aux_val = 0x0,
.l2c_aux_mask = ~0x0,
--
2.16.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/4] ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
2019-10-31 16:53 ` Andreas Färber
@ 2019-11-15 1:33 ` Rob Herring
-1 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2019-11-15 1:33 UTC (permalink / raw)
To: Andreas Färber
Cc: linux-realtek-soc,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-kernel, Mark Rutland, devicetree
On Thu, Oct 31, 2019 at 11:53 AM Andreas Färber <afaerber@suse.de> wrote:
>
> Add Device Trees for Realtek RTD1195 SoC and MeLE X1000 TV box.
>
> Reuse the existing RTD1295 watchdog compatible for now.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> v1 -> v2:
> * Dropped /memreserve/ and reserved-memory nodes for peripherals and NOR (Rob)
> * Carved them out from memory reg instead (Rob)
> * Converted some /memreserve/s to reserved-memory nodes
>
> arch/arm/boot/dts/Makefile | 2 +
> arch/arm/boot/dts/rtd1195-mele-x1000.dts | 31 ++++++++
> arch/arm/boot/dts/rtd1195.dtsi | 127 +++++++++++++++++++++++++++++++
> 3 files changed, 160 insertions(+)
> create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts
> create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/4] ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
@ 2019-11-15 1:33 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2019-11-15 1:33 UTC (permalink / raw)
To: Andreas Färber
Cc: Mark Rutland, devicetree, linux-kernel,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-realtek-soc
On Thu, Oct 31, 2019 at 11:53 AM Andreas Färber <afaerber@suse.de> wrote:
>
> Add Device Trees for Realtek RTD1195 SoC and MeLE X1000 TV box.
>
> Reuse the existing RTD1295 watchdog compatible for now.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> v1 -> v2:
> * Dropped /memreserve/ and reserved-memory nodes for peripherals and NOR (Rob)
> * Carved them out from memory reg instead (Rob)
> * Converted some /memreserve/s to reserved-memory nodes
>
> arch/arm/boot/dts/Makefile | 2 +
> arch/arm/boot/dts/rtd1195-mele-x1000.dts | 31 ++++++++
> arch/arm/boot/dts/rtd1195.dtsi | 127 +++++++++++++++++++++++++++++++
> 3 files changed, 160 insertions(+)
> create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts
> create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
Reviewed-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-11-15 1:33 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 16:53 [PATCH v2 0/4] ARM: Initial RTD1195 and MeLE X1000 support Andreas Färber
2019-10-31 16:53 ` Andreas Färber
2019-10-31 16:53 ` [PATCH v2 1/4] dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000 Andreas Färber
2019-10-31 16:53 ` Andreas Färber
2019-10-31 16:53 ` [PATCH v2 2/4] ARM: Prepare Realtek RTD1195 Andreas Färber
2019-10-31 16:53 ` Andreas Färber
2019-10-31 16:53 ` [PATCH v2 3/4] ARM: dts: Prepare Realtek RTD1195 and MeLE X1000 Andreas Färber
2019-10-31 16:53 ` Andreas Färber
2019-11-15 1:33 ` Rob Herring
2019-11-15 1:33 ` Rob Herring
2019-10-31 16:53 ` [PATCH v2 4/4] ARM: realtek: Enable RTD1195 arch timer Andreas Färber
2019-10-31 16:53 ` Andreas Färber
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.