arm64: dts: allwinner: H616: Add LRADC
Subsystems (5)
v2 cover arm64: dts: allwinner: H616: Add LRADC
Version 2 moves the LRADC DT node to the right place. It was out of order before.
The Allwinner H616 series of SoCs have a low-rate ADC (LRADC) with 6-bit resolution and one input channel. They're compatible with the existing drivers, so it only needs to be enabled in the DT.
Add an LRADC node to the H616 .dtsi, so board DTs can use them by adding 'status = "okay";'.
This was tested on an OrangePi Zero 2W by attaching an expansion board with two key buttons connected to the LRADC, and adding them to the DT. /dev/input/event0 then properly reported the button presses. The patches are based off sunxi/for-next.
James McGregor (2):
dt-bindings: input: sun4i-lradc-keys: Add H616 compatible
ARM: dts: sun50i: Add LRADC node
.../bindings/input/allwinner,sun4i-a10-lradc-keys.yaml | 4 +++- arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 dt-bindings: input: sun4i-lradc-keys: Add H616 compatible
The Allwinner H616 SoC has an LRADC which is compatible with the versions in existing SoCs.
Add a compatible string for H616, with the R329 fallback. This is the same as the D1, so put them into an enum.
--- .../bindings/input/allwinner,sun4i-a10-lradc-keys.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml +3 -1
@@ -22,7 +22,9 @@ properties: - const: allwinner,sun8i-a83t-r-lradc - const: allwinner,sun50i-r329-lradc - items: - - const: allwinner,sun20i-d1-lradc + - enum: + - allwinner,sun50i-h616-lradc + - allwinner,sun20i-d1-lradc - const: allwinner,sun50i-r329-lradc reg:
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] dt-bindings: input: sun4i-lradc-keys: Add H616 compatible
Quoted 11 lines · James McGregor
The Allwinner H616 SoC has an LRADC which is compatible with the versions in existing SoCs.
Add a compatible string for H616, with the R329 fallback. This is the same as the D1, so put them into an enum.Signed-off-by James McGregor <[email protected]>Reviewed-by Andre Przywara <[email protected]>--- .../bindings/input/allwinner,sun4i-a10-lradc-keys.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Please add Acked-by/Reviewed-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.
If a tag was not added on purpose, please state why and what changed.
Missing tags:
PATCH v2 2/2 ARM: dts: sun50i: Add LRADC node
In reply to James McGregorAdd a DT node for the Allwinner H616 LRADC describing the base address, interrupt, reset and clock gates.
---
V1 -> V2: Moved DT node to correct place in tree order
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +10 -0
@@ -594,6 +594,16 @@ ths: thermal-sensor@5070400 { #thermal-sensor-cells = <1>; }; + lradc: lradc@5070800 { + compatible = "allwinner,sun50i-h616-lradc", + "allwinner,sun50i-r329-lradc"; + reg = <0x05070800 0x400>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_KEYADC>; + resets = <&ccu RST_BUS_KEYADC>; + status = "disabled"; + }; + usbotg: usb@5100000 { compatible = "allwinner,sun50i-h616-musb", "allwinner,sun8i-h3-musb";
Signature · 1 line
2.34.1
Re: [PATCH v2 2/2] ARM: dts: sun50i: Add LRADC node
Dne petek, 26. april 2024 ob 11:29:48 GMT +2 je James McGregor napisal(a):
Quoted 5 lines
Add a DT node for the Allwinner H616 LRADC describing the base address, interrupt, reset and clock gates.
Signed-off-by James McGregor <[email protected]>Reviewed-by Andre Przywara <[email protected]>
Best regards,
Jernej
Quoted 28 lines
---
V1 -> V2: Moved DT node to correct place in tree orderarch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +10
-0@@ -594,6 +594,16 @@ ths: thermal-sensor@5070400 { #thermal-sensor-cells = <1>; }; + lradc: lradc@5070800 { + compatible = "allwinner,sun50i-h616-lradc", + "allwinner,sun50i-r329-lradc"; + reg = <0x05070800 0x400>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_KEYADC>; + resets = <&ccu RST_BUS_KEYADC>; + status = "disabled"; + }; + usbotg: usb@5100000 { compatible = "allwinner,sun50i-h616-musb", "allwinner,sun8i-h3-musb";
Chen-Yu Tsai
AppliedQuoted 8 lines · James McGregor
Version 2 moves the LRADC DT node to the right place. It was out of order before.
The Allwinner H616 series of SoCs have a low-rate ADC (LRADC) with 6-bit resolution and one input channel. They're compatible with the existing drivers, so it only needs to be enabled in the DT.
[...]
Applied to sunxi/dt-for-6.11 in sunxi/linux.git, thanks!
[1/2] dt-bindings: input: sun4i-lradc-keys: Add H616 compatible
https://git.kernel.org/sunxi/linux/c/3086803a1f43 [2/2] ARM: dts: sun50i: Add LRADC node https://git.kernel.org/sunxi/linux/c/7adc2d68f4a6
Best regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>
Quoted 9 lines · Chen-Yu Tsai
Quoted 7 lines · James McGregor
Version 2 moves the LRADC DT node to the right place. It was out of order before.
The Allwinner H616 series of SoCs have a low-rate ADC (LRADC) with 6-bit resolution and one input channel. They're compatible with the existing drivers, so it only needs to be enabled in the DT.
Quoted 8 lines
Quoted 1 line
[...]
Applied to sunxi/dt-for-6.11 in sunxi/linux.git, thanks!
[1/2] dt-bindings: input: sun4i-lradc-keys: Add H616 compatible
https://git.kernel.org/sunxi/linux/c/3086803a1f43 [2/2] ARM: dts: sun50i: Add LRADC node https://git.kernel.org/sunxi/linux/c/7adc2d68f4a6
I had to do a quick rebase as the branch start point was incorrect. The commit hashes will have changed. Rest assured that the patch is indeed merged.
ChenYu