FROMLIST: arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables

Trogdor devices that have a detachable keyboard still have a
non-detachable keyboard input device present because we include the
cros-ec-keyboard.dtsi snippet in the top-level sc7180-trogdor.dtsi file
that every variant board includes. We do this because the
keyboard-controller node also provides some buttons like the power
button and volume buttons. Unfortunately, this means we register a
keyboard input device that doesn't do anything on boards with a
detachable keyboard.

Change the node's compatible on detachables to the newly introduced
"google,cros-ec-keyb-switches" compatible to indicate that there are
only switches and no keyboard to register. Similarly, move the keyboard
include that defines the keyboard-controller node out of
sc7180-trogdor.dtsi to boards that actually have a keyboard so that the
matrix properties are not defined on boards with the switches
compatible. Future boards can either use the include approach or the
node definition approach to describe a keyboard with possible switches
or just some switches.

Cc: Benson Leung <>
Cc: Guenter Roeck <>
Cc: Douglas Anderson <>
Cc: Hsin-Yi Wang <>
Cc: "Joseph S. Barrera III" <>
Signed-off-by: Stephen Boyd <>
(am from

TEST=emerge-strongbad chromeos-kernel-5_4; Boot on wormdingler;
     evtest shows no more cros_ec device

Cq-Depend: chromium:3609017
Change-Id: I3fbb6c92ee7218a42cd40efaf391ce73ad0fc465
Tested-by: Stephen Boyd <>
Reviewed-by: Douglas Anderson <>
6 files changed