ARM: dts: Alpine platform devicetree
PATCH v3 5/5 ARM: dts: Alpine platform devicetree
This patch introduces devicetree for the Alpine platform, and for a development board based on the same platform.
--- arch/arm/boot/dts/Makefile | 4 ++ arch/arm/boot/dts/alpine-db.dts | 35 ++++++++++ arch/arm/boot/dts/alpine.dtsi | 141 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 arch/arm/boot/dts/alpine-db.dts create mode 100644 arch/arm/boot/dts/alpine.dtsi
arch/arm/boot/dts/Makefile +4 -0
@@ -2,6 +2,10 @@ ifeq ($(CONFIG_OF),y) dtb-$(CONFIG_MACH_ASM9260) += \ alphascale-asm9260-devkit.dtb + +dtb-$(CONFIG_ARCH_ALPINE) += \ + alpine_db.dtb + # Keep at91 dtb files sorted alphabetically for each SoC dtb-$(CONFIG_SOC_SAM_V4_V5) += \ at91rm9200ek.dtb \
arch/arm/boot/dts/alpine-db.dts new file +35 -0
@@ -0,0 +1,35 @@ +/* + * Copyright 2015 Annapurna Labs Ltd. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * Alternatively, redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + */ + +/dts-v1/; + +#include "alpine.dtsi" + +/ { + model = "Annapurna Labs Alpine Dev Board"; + /* no need for anything outside SOC */ +}; +
arch/arm/boot/dts/alpine.dtsi new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 5/5 ARM: dts: Alpine platform devicetree
Quoted 12 lines · Tsahee Zidenberg
This patch introduces devicetree for the Alpine platform, and for a development board based on the same platform.
Signed-off-by Barak Wasserstrom <[email protected]>Signed-off-by Tsahee Zidenberg <[email protected]>--- arch/arm/boot/dts/Makefile | 4 ++ arch/arm/boot/dts/alpine-db.dts | 35 ++++++++++ arch/arm/boot/dts/alpine.dtsi | 141 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 arch/arm/boot/dts/alpine-db.dts create mode 100644 arch/arm/boot/dts/alpine.dtsi
[...]
Quoted 6 lines
arch/arm/boot/dts/alpine.dtsi new file +6
-0+ soc { + #address-cells = <2>; + #size-cells = <2>; + compatible = "simple-bus"; + interrupt-parent = <&gic>; + ranges;
arch/arm/boot/dts/alpine.dtsi line 84
Quoted 10 lines
arch/arm/boot/dts/alpine.dtsi new file +10
-0+ + arch-timer { + compatible = "arm,cortex-a15-timer", + "arm,armv7-timer"; + interrupts = + <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <0>; /* Filled by loader */
Your loader doesn't configure CNTFRQ?
Quoted 18 lines
arch/arm/boot/dts/alpine.dtsi new file +18
-0+ }; + + /* Interrupt Controller */ + gic: gic at fb001000 { + compatible = "arm,cortex-a15-gic"; + #interrupt-cells = <3>; + #size-cells = <0>; + #address-cells = <0>; + interrupt-controller; + reg = <0x0 0xfb001000 0x0 0x1000>, + <0x0 0xfb002000 0x0 0x2000>, + <0x0 0xfb004000 0x0 0x1000>, + <0x0 0xfb006000 0x0 0x2000>; + interrupts = + <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + }; + + /* CPU Resume registers */
arch/arm/boot/dts/alpine.dtsi line 112
Quoted 10 lines
arch/arm/boot/dts/alpine.dtsi new file +10
-0+ cpu-resume at fbff5ec0 { + compatible = "al,alpine-cpu-resume"; + reg = <0x0 0xfbff5ec0 0x0 0x30>; + }; + + /* North Bridge Service Registers */ + sysfabric-service at fb070000 { + compatible = "al,alpine-sysfabric-service", "syscon", "simple-bus"; + reg = <0x0 0xfb070000 0x0 0x10000>; + };
That compatible list makes no sense whatsoever.
Why is "simple-bus" on the end?
Mark.
PATCH v3 5/5 ARM: dts: Alpine platform devicetree
Thank you for your review!
Quoted 11 lines · Mark Rutland
arch/arm/boot/dts/alpine.dtsi line 84
Quoted 9 lines · Tsahee Zidenberg
arch/arm/boot/dts/alpine.dtsi new file +9
-0+ arch-timer { + compatible = "arm,cortex-a15-timer", + "arm,armv7-timer"; + interrupts = + <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <0>; /* Filled by loader */
Quoted 2 lines
Your loader doesn't configure CNTFRQ?
Not currently. setting CNTFRQ must be done in the firmware, to be valid across all CPUs and through power-cycles. This isn't supported on current firmware, which is used in currently available devices. I will add this as a required feature from next-gen firmware. clock-frequency property is read by linux-kernel before attempting to read CNTFRQ.
Quoted 10 lines
arch/arm/boot/dts/alpine.dtsi line 112
Quoted 5 lines
arch/arm/boot/dts/alpine.dtsi new file +5
-0+ /* North Bridge Service Registers */ + sysfabric-service at fb070000 { + compatible = "al,alpine-sysfabric-service", "syscon", "simple-bus"; + reg = <0x0 0xfb070000 0x0 0x10000>; + };That compatible list makes no sense whatsoever.
Why is "simple-bus" on the end?
Nodes that are used with "syscon_regmap_lookup_by_compatible" appear both with and without compatibility to "simple-bus" in the device-trees.
examples with: "fsl,imx6q-anatop", "xlnx,zynq-slcr" examples without: "fsl,imx6q-iomuxc-gpr", "rockchip,rk3066-pmu" Both ways work, I'm not if there is reasoning behind this difference in current device-trees or which is the better example to follow. I have no problem working either way. Is there a consensus on this?
Quoted 1 line
Mark.
PATCH v3 5/5 ARM: dts: Alpine platform devicetree
Quoted 17 lines · Tsahee Zidenberg
Thank you for your review!
Quoted 11 lines · Mark Rutland
arch/arm/boot/dts/alpine.dtsi line 84
Quoted 9 lines · Tsahee Zidenberg
arch/arm/boot/dts/alpine.dtsi new file +9
-0+ arch-timer { + compatible = "arm,cortex-a15-timer", + "arm,armv7-timer"; + interrupts = + <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <0>; /* Filled by loader */Quoted 2 lines
Your loader doesn't configure CNTFRQ?
Quoted 6 lines
Not currently. setting CNTFRQ must be done in the firmware, to be valid across all CPUs and through power-cycles. This isn't supported on current firmware, which is used in currently available devices. I will add this as a required feature from next-gen firmware. clock-frequency property is read by linux-kernel before attempting to read CNTFRQ.
Ok.
The "clock-frequency" property is unfortunately a poor workaround for CNTFRQ not being set, due to CNTFRQ being exposed to guests in the presence of virtualisation (and potentially userspace were we to have a VDSO).
Quoted 13 lines
Quoted 8 lines
arch/arm/boot/dts/alpine.dtsi line 112
Quoted 7 lines
arch/arm/boot/dts/alpine.dtsi new file +5
-0+ /* North Bridge Service Registers */ + sysfabric-service at fb070000 { + compatible = "al,alpine-sysfabric-service", "syscon", "simple-bus"; + reg = <0x0 0xfb070000 0x0 0x10000>; + };Quoted 4 lines
That compatible list makes no sense whatsoever.
Why is "simple-bus" on the end?
Quoted 8 lines
Nodes that are used with "
syscon_regmap_lookup_by_compatible" appear both with and without compatibility to "simple-bus" in the device-trees.
examples with: "fsl,imx6q-anatop", "xlnx,zynq-slcr" examples without: "fsl,imx6q-iomuxc-gpr", "rockchip,rk3066-pmu" Both ways work, I'm not if there is reasoning behind this difference in current device-trees or which is the better example to follow. I have no problem working either way. Is there a consensus on this?
The "simple-bus" entry is wrong, and should be removed.
In other cases it's also likely to be wrong, but I'd have to inspect them to be sure.
Mark.
PATCH v3 5/5 ARM: dts: Alpine platform devicetree
Quoted 12 lines · Mark Rutland
Quoted 11 lines
Quoted 2 lines
Why is "simple-bus" on the end?
Nodes that are used with "
syscon_regmap_lookup_by_compatible" appear both with and without compatibility to "simple-bus" in the device-trees.
examples with: "fsl,imx6q-anatop", "xlnx,zynq-slcr" examples without: "fsl,imx6q-iomuxc-gpr", "rockchip,rk3066-pmu" Both ways work, I'm not if there is reasoning behind this difference in current device-trees or which is the better example to follow. I have no problem working either way. Is there a consensus on this?
Quoted 5 lines
The "simple-bus" entry is wrong, and should be removed.
In other cases it's also likely to be wrong, but I'd have to inspect them to be sure.
Will be fixed, then. Thank you!
Tsahee.