ARM: Initial RTD1195 and MeLE X1000 & Horseradish support
Subsystems (5)
v4 cover ARM: Initial RTD1195 and MeLE X1000 & Horseradish support
Hello,
This series adds initial support for Realtek RTD1195 SoC and adds a Device Tree for the MeLE X1000 TV set-top-box.
v4 includes more memory range related cleanups, adds a DT and drops the reset patches again for a follow-up series.
The final patch is still in need of feedback from Realtek for how to name and handle this magic register and bit(s).
SMP (i.e., the second core) is still dependent on two new bindings/drivers.
More details on the device 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
v3 -> v4:
* Insert memory range between r-bus and NOR flash
* Exclude boot ROM from memory ranges
* Add Horseradish EVB
* Drop reset patches (James)
v2 -> v3:
* Incorporate cleanup patches from RTD1395 series
* Fixed r-bus size (James)
* Fixed r-bus node name (Rob)
* Include reset patches from RTD1295 reset series, rebased onto r-bus
v1 -> v2:
* Do not redundantly select COMMON_CLK (Arnd)
* Drop further unneeded selects
* Clean up memory reservations (Rob)
* Enable arch timer
Andreas Färber (8):
dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
ARM: Prepare Realtek RTD1195
ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
ARM: dts: rtd1195: Exclude boot ROM from memory ranges
ARM: dts: rtd1195: Introduce r-bus
dt-bindings: arm: realtek: Add Realtek Horseradish EVB
ARM: dts: rtd1195: Add Realtek Horseradish EVB
ARM: realtek: Enable RTD1195 arch timer
Documentation/devicetree/bindings/arm/realtek.yaml | 7 ++ arch/arm/Kconfig | 2 + arch/arm/Makefile | 3 + arch/arm/boot/dts/Makefile | 3 + arch/arm/boot/dts/rtd1195-horseradish.dts | 32 +++++ arch/arm/boot/dts/rtd1195-mele-x1000.dts | 32 +++++ arch/arm/boot/dts/rtd1195.dtsi | 139 +++++++++++++++++++++ arch/arm/mach-realtek/Kconfig | 11 ++ arch/arm/mach-realtek/Makefile | 2 + arch/arm/mach-realtek/rtd1195.c | 56 +++++++++ 10 files changed, 287 insertions(+) create mode 100644 arch/arm/boot/dts/rtd1195-horseradish.dts 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
Signature · 1 line
2.16.4
PATCH v4 1/8 dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
Add bindings for Realtek RTD1195 SoC and MeLE X1000 TV box.
---
v1 -> v2 -> v3 -> v4: Unchanged
Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/realtek.yaml +6 -0
@@ -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:
Signature · 1 line
2.16.4
PATCH v4 2/8 ARM: Prepare Realtek RTD1195
In reply to Andreas FärberIntroduce 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.
---
v3 -> v4:
* Added reservation of boot ROM (James)
v2 -> v3:
* Fixed r-bus size in .reserve from 0x100000 to 0x70000 (James)
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 | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 58 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
arch/arm/Kconfig +2 -0
@@ -699,6 +699,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"
arch/arm/Makefile +3 -0
@@ -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
arch/arm/mach-realtek/Kconfig new file +11 -0
@@ -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.
arch/arm/mach-realtek/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +obj-y += rtd1195.o
arch/arm/mach-realtek/rtd1195.c new file +40 -0
@@ -0,0 +1,40 @@ +// 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 boot ROM from RAM */ +rtd1195_memblock_remove (0x00000000 ,0x0000a800 ); + +/* Exclude peripheral register spaces from RAM */ +rtd1195_memblock_remove (0x18000000 ,0x00070000 ); +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
Signature · 1 line
2.16.4
Re: [PATCH v4 2/8] ARM: Prepare Realtek RTD1195
Am 23.11.19 um 21:37 schrieb Andreas Färber:
Quoted 27 lines
Introduce
ARCH_REALTEKKconfigoption also for 32-bit Arm.Override the text offset to cope with boot ROM occupying first
0xa800bytes and further reservations up to0xf4000(compare Device Tree).Add a custom
machine_descto enforce memory carveout for I/O registers.Signed-off-by Andreas Färber <[email protected]>---
v3 -> v4:
* Added reservation of boot ROM (James)v2 -> v3:
* Fixed r-bus size in .reserve from0x100000to0x70000(James)v1 -> v2:
* Dropped selection ofCOMMON_CLK(Arnd)
* Dropped selection of AMBA, SCU, TWD
* Added comment about text offset to distinguish from HTC comment above
* Addedmachine_descwith .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 | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+)
Quoted 3 lines
create mode 100644
arch/arm/mach-realtek/Kconfigcreate mode 100644arch/arm/mach-realtek/Makefilecreate mode 100644arch/arm/mach-realtek/rtd1195.c
This patch was lacking a MAINTAINERS update. Squashing:
MAINTAINERS +0 -0
@@ -2204,6 +2204,7 @@ M: Andreas Färber <[email protected]> L: [email protected] (moderated for
non-subscribers)
L: [email protected] (moderated for
non-subscribers)
S: Maintained +F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/ F: Documentation/devicetree/bindings/arm/realtek.yaml
Unfortunately this on v5.6/soc branch will conflict with adding an entry for the DTs on v5.6/dt branch, so I guess the best way to handle this will be a follow-up patch for the v5.6/soc branch (which may trigger pattern warnings due to the files getting added on a different branch)?
MAINTAINERS +0 -0
@@ -2204,6 +2204,7 @@ M: Andreas Färber <[email protected]> L: [email protected] (moderated for
non-subscribers)
L: [email protected] (moderated for
non-subscribers)
S: Maintained +F: arch/arm/boot/dts/rtd* F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/ F: Documentation/devicetree/bindings/arm/realtek.yaml
Regards,
Andreas
Signature · 4 lines
SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg)
Re: [PATCH v4 2/8] ARM: Prepare Realtek RTD1195
Am 05.01.20 um 06:52 schrieb Andreas Färber:
Quoted 61 lines
Am 23.11.19 um 21:37 schrieb Andreas Färber:
Quoted 24 lines
Introduce
ARCH_REALTEKKconfigoption also for 32-bit Arm.Override the text offset to cope with boot ROM occupying first
0xa800bytes and further reservations up to0xf4000(compare Device Tree).Add a custom
machine_descto enforce memory carveout for I/O registers.Signed-off-by Andreas Färber <[email protected]>---
v3 -> v4:
* Added reservation of boot ROM (James)
v2 -> v3:
* Fixed r-bus size in .reserve from0x100000to0x70000(James) v1 -> v2:
* Dropped selection ofCOMMON_CLK(Arnd)
* Dropped selection of AMBA, SCU, TWD
* Added comment about text offset to distinguish from HTC comment above
* Addedmachine_descwith .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| 40
++++++++++++++++++++++++++++++++++++++++Quoted 4 lines
5 files changed, 58 insertions(+)create mode 100644
arch/arm/mach-realtek/Kconfigcreate mode 100644arch/arm/mach-realtek/Makefilecreate mode 100644arch/arm/mach-realtek/rtd1195.cThis patch was lacking a
MAINTAINERSupdate. Squashing:MAINTAINERS +1
-0@@ -2204,6 +2204,7 @@ M: Andreas Färber <[email protected]> L: [email protected] (moderated for non-subscribers) L: [email protected] (moderated for non-subscribers) S: Maintained +F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/F:
Documentation/devicetree/bindings/arm/realtek.yamlUnfortunately this on v5.6/soc branch will conflict with adding an entry for the DTs on v5.6/dt branch, so I guess the best way to handle this will be a follow-up patch for the v5.6/soc branch (which may trigger pattern warnings due to the files getting added on a different branch)?
MAINTAINERS +1
-0@@ -2204,6 +2204,7 @@ M: Andreas Färber <[email protected]> L: [email protected] (moderated for non-subscribers) L: [email protected] (moderated for non-subscribers) S: Maintained +F: arch/arm/boot/dts/rtd* F: arch/arm/mach-realtek/
Quoted 2 lines
F:
arch/arm64/boot/dts/realtek/
F:Documentation/devicetree/bindings/arm/realtek.yaml
No responses, so also applied to linux-realtek.git v5.6/soc:
https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.6/soc
Regards,
Andreas
Signature · 4 lines
SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg)
PATCH v4 3/8 ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
In reply to Andreas FärberAdd Device Trees for Realtek RTD1195 SoC and MeLE X1000 TV box.
Reuse the existing RTD1295 watchdog compatible for now.
---
v3 -> v4:
* Inserted /memory reg entry to compensate reduced r-bus size (James)
* Extended GIC reg and added interrupt (Marc)
* Added comments to /memory node
v2 -> v3:
* Fixed r-bus size in /soc ranges from 0x1000000 to 0x70000 (James)
* Adjusted /memreserve/ to close gap from 0xa800 to 0xc000 for full 0x100000
* Changed arch timer from GIC_CPU_MASK_RAW(0xf) to GIC_CPU_MASK_SIMPLE(2) squashed from RTD1395 v1 series
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 | 32 ++++++++ arch/arm/boot/dts/rtd1195.dtsi | 130 +++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 arch/arm/boot/dts/rtd1195-mele-x1000.dts create mode 100644 arch/arm/boot/dts/rtd1195.dtsi
arch/arm/boot/dts/Makefile +2 -0
@@ -865,6 +865,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 \
arch/arm/boot/dts/rtd1195-mele-x1000.dts new file +32 -0
@@ -0,0 +1,32 @@ +// 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 = <0x00000000 0x18000000>, /* up to r-bus */ + <0x18070000 0x00090000>, /* r-bus to NOR flash */ + <0x19100000 0x26f00000>; /* NOR flash to 1 GiB */ + }; +}; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/rtd1195.dtsi new file +130 -0
130 lines not on this page · raw message
Signature · 1 line
2.16.4
PATCH v4 4/8 ARM: dts: rtd1195: Exclude boot ROM from memory ranges
In reply to Andreas FärberCarve out 0xa800 for the boot ROM from the /memory@0 node, updating it to /memory@a800, and add it to /soc ranges.
---
Could be squashed.
v4: New
arch/arm/boot/dts/rtd1195-mele-x1000.dts | 4 ++-- arch/arm/boot/dts/rtd1195.dtsi | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/boot/dts/rtd1195-mele-x1000.dts +2 -2
@@ -19,9 +19,9 @@ stdout-path = "serial0:115200n8"; }; - memory@0 { + memory@a800 { device_type = "memory"; - reg = <0x00000000 0x18000000>, /* up to r-bus */ + reg = <0x0000a800 0x17ff5800>, /* boot ROM to r-bus */ <0x18070000 0x00090000>, /* r-bus to NOR flash */ <0x19100000 0x26f00000>; /* NOR flash to 1 GiB */ };
arch/arm/boot/dts/rtd1195.dtsi +2 -1
@@ -88,7 +88,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges = <0x18000000 0x18000000 0x00070000>, + ranges = <0x00000000 0x00000000 0x0000a800>, + <0x18000000 0x18000000 0x00070000>, <0x18100000 0x18100000 0x01000000>, <0x80000000 0x80000000 0x80000000>;
Signature · 7 lines
2.16.4 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v4 5/8 ARM: dts: rtd1195: Introduce r-bus
In reply to Andreas FärberModel Realtek's register bus in DT.
---
v3 -> v4: Unchanged
v3: from RTD1395 v1
* Fixed r-bus size from 0x100000 to 0x70000 in reg and ranges (James)
* Renamed bus node from r-bus to bus (Rob)
arch/arm/boot/dts/rtd1195.dtsi | 52 ++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 22 deletions(-)
arch/arm/boot/dts/rtd1195.dtsi +30 -22
@@ -93,28 +93,36 @@ <0x18100000 0x18100000 0x01000000>, <0x80000000 0x80000000 0x80000000>; - 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"; + rbus: bus@18000000 { + compatible = "simple-bus"; + reg = <0x18000000 0x70000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x18000000 0x70000>; + + wdt: watchdog@7680 { + compatible = "realtek,rtd1295-watchdog"; + reg = <0x7680 0x100>; + clocks = <&osc27M>; + }; + + uart0: serial@7800 { + compatible = "snps,dw-apb-uart"; + reg = <0x7800 0x400>; + reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <27000000>; + status = "disabled"; + }; + + uart1: serial@1b200 { + compatible = "snps,dw-apb-uart"; + reg = <0x1b200 0x100>; + reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <27000000>; + status = "disabled"; + }; }; gic: interrupt-controller@ff011000 {
Signature · 1 line
2.16.4
PATCH v4 6/8 dt-bindings: arm: realtek: Add Realtek Horseradish EVB
In reply to Andreas FärberDefine a compatible string for Realtek Horseradish EVB for RTD1195 SoC.
---
v4: New
Documentation/devicetree/bindings/arm/realtek.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/realtek.yaml +1 -0
@@ -18,6 +18,7 @@ properties: - items: - enum: - mele,x1000 # MeLE X1000 + - realtek,horseradish # Realtek Horseradish EVB - const: realtek,rtd1195 # RTD1293 SoC based boards
Signature · 1 line
2.16.4
Re: [PATCH v4 6/8] dt-bindings: arm: realtek: Add Realtek Horseradish EVB
Quoted 9 lines · On Sat, 23 Nov 2019 21:37:57 +0100, =?UTF-8?q?Andreas=20F=C3=A4rber?= wrote:
Define a compatible string for Realtek Horseradish EVB for RTD1195 SoC.
Signed-off-by Andreas Färber <[email protected]>---
v4: NewDocumentation/devicetree/bindings/arm/realtek.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH v4 7/8 ARM: dts: rtd1195: Add Realtek Horseradish EVB
In reply to Andreas FärberAdd a Device Tree for Realtek's RTD1195 EVB "Horseradish".
---
v4: New
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rtd1195-horseradish.dts | 32 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 arch/arm/boot/dts/rtd1195-horseradish.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -866,6 +866,7 @@ dtb-$(CONFIG_ARCH_RDA) += \ rda8810pl-orangepi-2g-iot.dtb \ rda8810pl-orangepi-i96.dtb dtb-$(CONFIG_ARCH_REALTEK) += \ + rtd1195-horseradish.dtb \ rtd1195-mele-x1000.dtb dtb-$(CONFIG_ARCH_REALVIEW) += \ arm-realview-pb1176.dtb \
arch/arm/boot/dts/rtd1195-horseradish.dts new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +/* + * Copyright (c) 2019 Andreas Färber + */ + +/dts-v1/; + +#include "rtd1195.dtsi" + +/ { + compatible = "realtek,horseradish", "realtek,rtd1195"; + model = "Realtek Horseradish EVB"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@a800 { + device_type = "memory"; + reg = <0x0000a800 0x17ff5800>, /* boot ROM to r-bus */ + <0x18070000 0x00090000>, /* r-bus to NOR flash */ + <0x19100000 0x26f00000>; /* NOR flash to 1 GiB */ + }; +}; + +&uart0 { + status = "okay"; +};
Signature · 1 line
2.16.4
PATCH v4 8/8 ARM: realtek: Enable RTD1195 arch timer
In reply to Andreas FärberWithout this magic write the timer doesn't work and boot gets stuck.
---
What is the name of the register 0xff018000?
Is 0x1 a BIT(0) write, or how are the register bits defined? Is this a reset or a clock gate? How should we model it in DT?
v3 -> v4:
* Use writel_relaxed() instead of writel()
v2 -> v3: Unchanged
v2: New
arch/arm/mach-realtek/rtd1195.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/mach-realtek/rtd1195.c +16 -0
@@ -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>
@@ -27,6 +30,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_relaxed (0x1 , base); +iounmap (base); + +of_clk_init (NULL ); +timer_probe (); +} +static const char *const rtd1195_dt_compat[]__initconst = {"realtek,rtd1195" ,NULL
@@ -34,6 +49,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,
Signature · 1 line
2.16.4
Andreas Färber
AppliedAm 23.11.19 um 21:37 schrieb Andreas Färber:
Quoted 8 lines
Andreas Färber (8):
dt-bindings: arm: realtek: Add RTD1195 and MeLE X1000
ARM: Prepare Realtek RTD1195
ARM: dts: Prepare Realtek RTD1195 and MeLE X1000
ARM: dts: rtd1195: Exclude boot ROM from memory ranges
ARM: dts: rtd1195: Introduce r-bus
dt-bindings: arm: realtek: Add Realtek Horseradish EVB
ARM: dts: rtd1195: Add Realtek Horseradish EVB
Applied these to linux-realtek.git:
https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.6/dt
https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.6/soc
Quoted 1 line
ARM: realtek: Enable RTD1195 arch timer
Holding this one back still.
Regards,
Andreas
Signature · 4 lines
SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg)