xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/msm8998-oneplus-cheeseburger.dts (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
12eb4d8dcSEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause
22eb4d8dcSEmmanuel Vadot/*
32eb4d8dcSEmmanuel Vadot * OnePlus 5 (cheeseburger) device tree
42eb4d8dcSEmmanuel Vadot *
52eb4d8dcSEmmanuel Vadot * Copyright (c) 2021, Jami Kettunen <jamipkettunen@gmail.com>
62eb4d8dcSEmmanuel Vadot */
72eb4d8dcSEmmanuel Vadot
82eb4d8dcSEmmanuel Vadot#include <dt-bindings/leds/common.h>
92eb4d8dcSEmmanuel Vadot#include "msm8998-oneplus-common.dtsi"
102eb4d8dcSEmmanuel Vadot
112eb4d8dcSEmmanuel Vadot/ {
122eb4d8dcSEmmanuel Vadot	model = "OnePlus 5";
132eb4d8dcSEmmanuel Vadot	compatible = "oneplus,cheeseburger", "qcom,msm8998";
148cc087a1SEmmanuel Vadot	chassis-type = "handset";
152eb4d8dcSEmmanuel Vadot	/* Required for bootloader to select correct board */
162eb4d8dcSEmmanuel Vadot	qcom,board-id = <8 0 16859 23>;
172eb4d8dcSEmmanuel Vadot
182eb4d8dcSEmmanuel Vadot	/* Capacitive keypad button backlight */
192eb4d8dcSEmmanuel Vadot	leds {
202eb4d8dcSEmmanuel Vadot		compatible = "gpio-leds";
212eb4d8dcSEmmanuel Vadot
222eb4d8dcSEmmanuel Vadot		pinctrl-names = "default";
232eb4d8dcSEmmanuel Vadot		pinctrl-0 = <&button_backlight_default>;
242eb4d8dcSEmmanuel Vadot
258bab661aSEmmanuel Vadot		led-keypad-backlight {
26cb7aa33aSEmmanuel Vadot			gpios = <&pmi8998_gpios 5 GPIO_ACTIVE_HIGH>;
272eb4d8dcSEmmanuel Vadot			color = <LED_COLOR_ID_WHITE>;
282eb4d8dcSEmmanuel Vadot			function = LED_FUNCTION_KBD_BACKLIGHT;
292eb4d8dcSEmmanuel Vadot			default-state = "off";
302eb4d8dcSEmmanuel Vadot		};
312eb4d8dcSEmmanuel Vadot	};
322eb4d8dcSEmmanuel Vadot};
332eb4d8dcSEmmanuel Vadot
34cb7aa33aSEmmanuel Vadot&pmi8998_gpios {
35b97ee269SEmmanuel Vadot	button_backlight_default: button-backlight-state {
362eb4d8dcSEmmanuel Vadot		pins = "gpio5";
37*fac71e4eSEmmanuel Vadot		function = "normal";
382eb4d8dcSEmmanuel Vadot		bias-pull-down;
392eb4d8dcSEmmanuel Vadot		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
402eb4d8dcSEmmanuel Vadot	};
412eb4d8dcSEmmanuel Vadot};
42