From nobody Tue Sep 9 13:00:57 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9859DC0015E for ; Mon, 24 Jul 2023 20:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbjGXU4T (ORCPT ); Mon, 24 Jul 2023 16:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjGXU4Q (ORCPT ); Mon, 24 Jul 2023 16:56:16 -0400 Received: from smtprelay07.ispgateway.de (smtprelay07.ispgateway.de [134.119.228.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7BE11BC7; Mon, 24 Jul 2023 13:55:37 -0700 (PDT) Received: from [77.64.243.219] (helo=note-book.lan) by smtprelay07.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qO2Yk-0001dY-6U; Mon, 24 Jul 2023 22:53:38 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Date: Mon, 24 Jul 2023 22:52:42 +0200 Subject: [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: Add initial device tree MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230724-bq_m5-v1-2-17a0870a73be@apitzsch.eu> References: <20230724-bq_m5-v1-0-17a0870a73be@apitzsch.eu> In-Reply-To: <20230724-bq_m5-v1-0-17a0870a73be@apitzsch.eu> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Apitzsch?= X-Mailer: b4 0.12.3 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This dts adds support for BQ Aquaris M5 (Longcheer L9100) released in 2015. Add a device tree with initial support for: - GPIO keys - Hall sensor - SDHCI - WCNSS (BT/WIFI) - Accelerometer/Magnetometer - Vibrator - Touchscreen - Front flash Signed-off-by: Andr=C3=A9 Apitzsch --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8939-longcheer-l9100.dts | 340 +++++++++++++++++= ++++ 2 files changed, 341 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/M= akefile index 23fd31d4bf5a..3200bc92853f 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -39,6 +39,7 @@ dtb-$(CONFIG_ARCH_QCOM) +=3D msm8916-thwc-uf896.dtb dtb-$(CONFIG_ARCH_QCOM) +=3D msm8916-thwc-ufi001c.dtb dtb-$(CONFIG_ARCH_QCOM) +=3D msm8916-wingtech-wt88047.dtb dtb-$(CONFIG_ARCH_QCOM) +=3D msm8916-yiming-uz801v3.dtb +dtb-$(CONFIG_ARCH_QCOM) +=3D msm8939-longcheer-l9100.dtb dtb-$(CONFIG_ARCH_QCOM) +=3D msm8939-samsung-a7.dtb dtb-$(CONFIG_ARCH_QCOM) +=3D msm8939-sony-xperia-kanuti-tulip.dtb dtb-$(CONFIG_ARCH_QCOM) +=3D msm8953-motorola-potter.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts b/arch/ar= m64/boot/dts/qcom/msm8939-longcheer-l9100.dts new file mode 100644 index 000000000000..74782e323a2c --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts @@ -0,0 +1,340 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8939-pm8916.dtsi" + +#include +#include +#include +#include +#include + +/ { + model =3D "BQ Aquaris M5 (Longcheer L9100)"; + compatible =3D "longcheer,l9100", "qcom,msm8939"; + chassis-type =3D "handset"; + + aliases { + mmc0 =3D &sdhc_1; /* eMMC */ + mmc1 =3D &sdhc_2; /* SD card */ + serial0 =3D &blsp_uart2; + }; + + chosen { + stdout-path =3D "serial0"; + }; + + gpio-hall-sensor { + compatible =3D "gpio-keys"; + + pinctrl-0 =3D <&gpio_hall_sensor_default>; + pinctrl-names =3D "default"; + + label =3D "GPIO Hall Effect Sensor"; + + event-hall-sensor { + label =3D "Hall Effect Sensor"; + gpios =3D <&tlmm 20 GPIO_ACTIVE_LOW>; + linux,input-type =3D ; + linux,code =3D ; + linux,can-disable; + }; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + + pinctrl-0 =3D <&gpio_keys_default>; + pinctrl-names =3D "default"; + + label =3D "GPIO Buttons"; + + button-volume-up { + label =3D "Volume Up"; + gpios =3D <&tlmm 107 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; + + leds { + compatible =3D "gpio-leds"; + + led-0 { + gpios =3D <&tlmm 17 GPIO_ACTIVE_HIGH>; + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_KBD_BACKLIGHT; + + pinctrl-0 =3D <&button_backlight_default>; + pinctrl-names =3D "default"; + }; + }; + + reg_ts_vdd: regulator-vdd-ts { + compatible =3D "regulator-fixed"; + regulator-name =3D "regulator-vdd-ts"; + regulator-min-microvolt =3D <2850000>; + regulator-max-microvolt =3D <2850000>; + + gpio =3D <&tlmm 78 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&ts_vdd_default>; + pinctrl-names =3D "default"; + }; + + backlight { + compatible =3D "pwm-backlight"; + pwms =3D <&pm8916_pwm 0 100000>; + brightness-levels =3D <0 255>; + num-interpolated-steps =3D <255>; + default-brightness-level =3D <128>; + enable-gpios =3D <&tlmm 98 GPIO_ACTIVE_HIGH>; + + pinctrl-0 =3D <&lcd_bl_en_default>; + pinctrl-names =3D "default"; + }; + + flash-led-controller { + compatible =3D "ocs,ocp8110"; + flash-gpios =3D <&tlmm 8 GPIO_ACTIVE_HIGH>; + enable-gpios =3D <&tlmm 49 GPIO_ACTIVE_HIGH>; + + pinctrl-0 =3D <&camera_front_flash_default>; + pinctrl-names =3D "default"; + + led { + function =3D LED_FUNCTION_FLASH; + color =3D ; + flash-max-timeout-us =3D <250000>; + }; + }; + + usb_id: usb-id { + compatible =3D "linux,extcon-usb-gpio"; + id-gpio =3D <&tlmm 110 GPIO_ACTIVE_HIGH>; + pinctrl-0 =3D <&usb_id_default &usb_id_switch_default>; + pinctrl-names =3D "default"; + }; + +}; + +&blsp_i2c3 { + status =3D "okay"; + + magnetometer@d { + compatible =3D "asahi-kasei,ak09911"; + reg =3D <0x0d>; + + vdd-supply =3D <&pm8916_l17>; + vid-supply =3D <&pm8916_l6>; + + reset-gpios =3D <&tlmm 68 GPIO_ACTIVE_HIGH>; + + pinctrl-0 =3D <&mag_reset_default>; + pinctrl-names =3D "default"; + }; + + light-sensor@23 { + compatible =3D "liteon,ltr559"; + reg =3D <0x23>; + + vdd-supply =3D <&pm8916_l17>; + vddio-supply =3D <&pm8916_l5>; + + interrupt-parent =3D <&tlmm>; + interrupts =3D <113 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-0 =3D <&light_int_default>; + pinctrl-names =3D "default"; + }; + + imu@68 { + compatible =3D "bosch,bmi160"; + reg =3D <0x68>; + + vdd-supply =3D <&pm8916_l17>; + vddio-supply =3D <&pm8916_l6>; + }; +}; + +&blsp_i2c5 { + status =3D "okay"; + + touchscreen@4a { + compatible =3D "atmel,maxtouch"; + reg =3D <0x4a>; + + interrupt-parent =3D <&tlmm>; + interrupts =3D <13 IRQ_TYPE_LEVEL_LOW>; + + reset-gpios =3D <&tlmm 12 GPIO_ACTIVE_LOW>; + + vdda-supply =3D <&pm8916_l6>; + vdd-supply =3D <®_ts_vdd>; + + pinctrl-0 =3D <&ts_int_reset_default>; + pinctrl-names =3D "default"; + + /* Keys listed from right to left */ + linux,keycodes =3D ; + }; +}; + +&blsp_uart2 { + status =3D "okay"; +}; + +&mdss { + status =3D "okay"; +}; + +&pm8916_pwm { + pinctrl-0 =3D <&pwm_out>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + +&pm8916_resin { + linux,code =3D ; + status =3D "okay"; +}; + +&pm8916_vib { + status =3D "okay"; +}; + +&sdhc_1 { + status =3D "okay"; +}; + +&sdhc_2 { + pinctrl-0 =3D <&sdc2_default &sdc2_cd_default>; + pinctrl-1 =3D <&sdc2_sleep &sdc2_cd_default>; + pinctrl-names =3D "default", "sleep"; + + cd-gpios =3D <&tlmm 38 GPIO_ACTIVE_LOW>; + + status =3D "okay"; +}; + +&usb { + extcon =3D <&usb_id>, <&usb_id>; + status =3D "okay"; +}; + +&usb_hs_phy { + extcon =3D <&usb_id>; +}; + +&wcnss { + status =3D "okay"; +}; + +&wcnss_iris { + compatible =3D "qcom,wcn3620"; +}; + +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt =3D <2850000>; + regulator-max-microvolt =3D <2850000>; + }; +}; + +&tlmm { + button_backlight_default: button-backlight-default-state { + pins =3D "gpio17"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + camera_front_flash_default: camera-front-flash-default-state { + pins =3D "gpio8", "gpio49"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + gpio_hall_sensor_default: gpio-hall-sensor-default-state { + pins =3D "gpio20"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + gpio_keys_default: gpio-keys-default-state { + pins =3D "gpio107"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-pull-up; + }; + + lcd_bl_en_default: lcd-bl-en-default-state { + pins =3D "gpio98"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + light_int_default: light-int-default-state { + pins =3D "gpio113"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + mag_reset_default: mag-reset-default-state { + pins =3D "gpio68"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + sdc2_cd_default: sdc2-cd-default-state { + pins =3D "gpio38"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + ts_int_reset_default: ts-int-reset-default-state { + pins =3D "gpio12", "gpio13"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + ts_vdd_default: ts-vdd-default-state { + pins =3D "gpio78"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + usb_id_default: usb-id-default-state { + pins =3D "gpio110"; + function =3D "gpio"; + drive-strength =3D <8>; + bias-pull-up; + }; + + usb_id_switch_default: usb-id-switch-default-state { + pins =3D "gpio121"; + function =3D "gpio"; + drive-strength =3D <2>; + output-high; + }; +}; + +&pm8916_mpps { + pwm_out: mpp4-state { + pins =3D "mpp4"; + function =3D "digital"; + power-source =3D ; + output-low; + qcom,dtest =3D <1>; + }; +}; --=20 2.41.0