Message ID | 20220930093510.10781-2-zhuyinbo@loongson.cn |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
在 2022/9/30 下午5:58, Krzysztof Kozlowski 写道: > On 30/09/2022 11:35, Yinbo Zhu wrote: >> Add the loongson2k High Precision Event Timer (HPET) binding >> with DT schema format using json-schema. >> >> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >> --- >> .../bindings/timer/loongson,ls2k-hpet.yaml | 41 +++++++++++++++++++ >> MAINTAINERS | 1 + >> 2 files changed, 42 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml >> >> diff --git a/Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml b/Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml >> new file mode 100644 >> index 000000000000..1a8785076228 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml >> @@ -0,0 +1,41 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/timer/loongson,ls2k-hpet.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Loongson2k High Precision Event Timer (HPET) >> + >> +maintainers: >> + - Yinbo Zhu <zhuyinbo@loongson.cn> >> + >> +properties: >> + compatible: >> + const: loongson,ls2k-hpet >> + >> + reg: >> + maxItems: 1 >> + >> + clock-frequency: true > > clock frequency of what? I assume it's too early to use common clock > framework and just get the clock? The clock-frequency is 125000000, It doesn't support use common clock framework and just get the clock from dts, and I refer "arm,armv7m-systick" to add the clock-frequency information: clock-frequency: true oneOf: - required: - clocks - required: - clock-frequency > >> + >> + interrupts: >> + maxItems: 1 >> + >> +required: >> + - compatible >> + - reg >> + - clock-frequency >> + - interrupts >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/interrupt-controller/irq.h> >> + hpet0: hpet@1fe24000 { > > Node name: timer > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > You can drop the "hpet0" label. okay, I got it. > > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml b/Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml new file mode 100644 index 000000000000..1a8785076228 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/loongson,ls2k-hpet.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson2k High Precision Event Timer (HPET) + +maintainers: + - Yinbo Zhu <zhuyinbo@loongson.cn> + +properties: + compatible: + const: loongson,ls2k-hpet + + reg: + maxItems: 1 + + clock-frequency: true + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clock-frequency + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + hpet0: hpet@1fe24000 { + compatible = "loongson,ls2k-hpet"; + reg = <0x1fe24000 0x15f>; + clock-frequency = <125000000>; + interrupt-parent = <&liointc0>; + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index c2e8eac61642..a162b6fba6fe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11911,6 +11911,7 @@ LOONGSON2 SOC SERIES HPET DRIVER M: Yinbo Zhu <zhuyinbo@loongson.cn> L: linux-kernel@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml F: drivers/clocksource/loongson2_hpet.c LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
Add the loongson2k High Precision Event Timer (HPET) binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> --- .../bindings/timer/loongson,ls2k-hpet.yaml | 41 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/loongson,ls2k-hpet.yaml