Skip to contentSkip to conversation

ARM: tegra: Add device-tree for Motorola Atrix 4G and Droid X2

PATCH RESEND New Svyatoslav Ryhel 2 participants 4 messages Jul 21

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: tegra: Add device-tree for Motorola Atrix 4G and Droid X2

Add a device-tree for the Motorola Atrix 4G and Droid X2, which both are NVIDIA Tegra20-based smartphones, originally running Android.

Svyatoslav Ryhel (2):
dt-bindings: arm: tegra: Add Motorola Artix 4G and Droid X2
ARM: tegra: Add device-tree for Motorola Atrix 4G and Droid X2

 .../devicetree/bindings/arm/tegra.yaml        |    6 +
 arch/arm/boot/dts/nvidia/Makefile             |    2 +
 .../dts/nvidia/tegra20-motorola-daytona.dts   |  107 ++
 .../boot/dts/nvidia/tegra20-motorola-mot.dtsi | 1194 +++++++++++++++++
 .../dts/nvidia/tegra20-motorola-olympus.dts   |  108 ++
 5 files changed, 1417 insertions(+)
 create mode 100644 arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts
 create mode 100644 arch/arm/boot/dts/nvidia/tegra20-motorola-mot.dtsi
 create mode 100644 arch/arm/boot/dts/nvidia/tegra20-motorola-olympus.dts
Signature · 1 line
2.53.0
#1 lore raw

PATCH RESEND 1/2 dt-bindings: arm: tegra: Add Motorola Artix 4G and Droid X2

Add a compatible for Motorola Artix 4G and Droid X2.

---
 Documentation/devicetree/bindings/arm/tegra.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/tegra.yaml +6 -0
index 033a63f6c0687..ca311262ca323 100644
@@ -46,6 +46,12 @@ properties:
       - items:
           - const: acer,picasso
           - const: nvidia,tegra20
+      - description: Motorola Mot based Device family
+        items:
+          - enum:
+              - motorola,daytona
+              - motorola,olympus
+          - const: nvidia,tegra20
       - items:
           - enum:
               - nvidia,beaver
Signature · 1 line
2.53.0
#2 lore raw

PATCH RESEND 2/2 ARM: tegra: Add device-tree for Motorola Atrix 4G and Droid X2

In reply to Svyatoslav Ryhel

Add a device-tree for the Motorola Atrix 4G and Droid X2, which both are NVIDIA Tegra20-based smartphones, originally running Android.

---
 arch/arm/boot/dts/nvidia/Makefile             |    2 +
 .../dts/nvidia/tegra20-motorola-daytona.dts   |  107 ++
 .../boot/dts/nvidia/tegra20-motorola-mot.dtsi | 1194 +++++++++++++++++
 .../dts/nvidia/tegra20-motorola-olympus.dts   |  108 ++
 4 files changed, 1411 insertions(+)
 create mode 100644 arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts
 create mode 100644 arch/arm/boot/dts/nvidia/tegra20-motorola-mot.dtsi
 create mode 100644 arch/arm/boot/dts/nvidia/tegra20-motorola-olympus.dts
arch/arm/boot/dts/nvidia/Makefile +2 -0
index eaac22f4c5e99..f7bb91c9b76be 100644
@@ -26,6 +26,8 @@ dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
 	tegra20-colibri-eval-v3.dtb \
 	tegra20-colibri-iris.dtb \
 	tegra20-medcom-wide.dtb \
+	tegra20-motorola-daytona.dtb \
+	tegra20-motorola-olympus.dtb \
 	tegra20-paz00.dtb \
 	tegra20-plutux.dtb \
 	tegra20-seaboard.dtb \
arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts new file +107 -0

107 lines not on this page · raw message

arch/arm/boot/dts/nvidia/tegra20-motorola-mot.dtsi new file +1194 -0

1,194 lines not on this page · raw message

arch/arm/boot/dts/nvidia/tegra20-motorola-olympus.dts new file +108 -0

108 lines not on this page · raw message

Signature · 1 line
2.53.0
#3 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Two separate GPIO switches map to the same absolute switch code (`SW_DOCK`) in the same…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Two separate GPIO switches map to the same absolute switch code (SW_DOCK) in the same gpio-keys device, causing erratic state clobbering. --

--- Patch [2]: [PATCH v1 2/2 RESEND] ARM: tegra: Add device-tree for Motorola Atrix 4G and Droid X2 --- commit efb4cc03675fda13ada4c5318a7f54d006cf5b05
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: Add device-tree for Motorola Atrix 4G and Droid X2

This commit adds device-trees for the Motorola Atrix 4G and Droid X2, which are NVIDIA Tegra20-based smartphones.

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts new file +0 -0
new file mode 100644

[ ... ]

Quoted 8 lines
arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts new file +8 -0
+	extcon-keys {
+		compatible = "gpio-keys";
+
+		switch-dock-hall-sensor-north {
+			label = "Dock Hall sensor (north)";
+			gpios = <&gpio TEGRA_GPIO(S, 2) GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_DOCK>;

arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts line 68

Quoted 10 lines
arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts new file +10 -0
+			debounce-interval = <500>;
+			wakeup-event-action = <EV_ACT_ASSERTED>;
+			wakeup-source;
+		};
+
+		switch-dock-hall-sensor-south {
+			label = "Dock Hall sensor (south)";
+			gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_DOCK>;

[Severity: Medium]
Both switch-dock-hall-sensor-north and switch-dock-hall-sensor-south map to the same SW_DOCK code within a single gpio-keys device.

Since the gpio-keys driver creates a single input device for the extcon-keys node and iterates sequentially over all defined buttons to report their current state at boot and resume, won't the south sensor state overwrite the north sensor state before input_sync() is called?

If the device is docked in a way that activates the north sensor but not the south sensor, it seems this could result in an incorrect undocked state being reported. At runtime, could changes in one sensor also incorrectly clobber the shared SW_DOCK state, such as an undocked event being emitted if the south sensor drops while the north sensor remains active?

Quoted 5 lines
arch/arm/boot/dts/nvidia/tegra20-motorola-daytona.dts new file +5 -0
+			debounce-interval = <500>;
+			wakeup-event-action = <EV_ACT_ASSERTED>;
+			wakeup-source;
+		};
+	};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2