Re: [PATCH v2 2/2] ARM: dts: qcom-msm8226-samsung-ms013g: Add initial device tree
On 29.06.2024 11:01 AM, Luca Weiss wrote: > On Donnerstag, 27. Juni 2024 21:30:52 MESZ Raymond Hackley wrote: >> Samsung Galaxy Grand 2 is a phone based on MSM8226. It's similar to the >> other Samsung devices based on MSM8226 with only a few minor differences. >> >> The device trees contain initial support with: >> - GPIO keys >> - Regulator haptic >> - SDHCI (internal and external storage) >> - UART (on USB connector via the TI TSU6721 MUIC) >> - Regulators >> - Touchscreen >> - Accelerometer >> >> Signed-off-by: Raymond Hackley >> --- [...] >> +haptic { >> +compatible = "regulator-haptic"; >> +haptic-supply = <_motor_vdd>; >> +min-microvolt = <330>; >> +max-microvolt = <330>; >> +}; > > This is the vibration motor? Use "vibrator" as node name then as per > https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst?plain=1#L299 With that: Reviewed-by: Konrad Dybcio Konrad
Re: [PATCH v2 2/2] ARM: dts: qcom-msm8226-samsung-ms013g: Add initial device tree
On Donnerstag, 27. Juni 2024 21:30:52 MESZ Raymond Hackley wrote: > Samsung Galaxy Grand 2 is a phone based on MSM8226. It's similar to the > other Samsung devices based on MSM8226 with only a few minor differences. > > The device trees contain initial support with: > - GPIO keys > - Regulator haptic > - SDHCI (internal and external storage) > - UART (on USB connector via the TI TSU6721 MUIC) > - Regulators > - Touchscreen > - Accelerometer > > Signed-off-by: Raymond Hackley > --- > arch/arm/boot/dts/qcom/Makefile | 1 + > .../dts/qcom/qcom-msm8226-samsung-ms013g.dts | 386 ++ > 2 files changed, 387 insertions(+) > create mode 100644 arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts > > diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile > index ccd4ce6353df..f06c6d425e91 100644 > --- a/arch/arm/boot/dts/qcom/Makefile > +++ b/arch/arm/boot/dts/qcom/Makefile > @@ -28,6 +28,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \ > qcom-msm8226-microsoft-dempsey.dtb \ > qcom-msm8226-microsoft-makepeace.dtb \ > qcom-msm8226-microsoft-moneypenny.dtb \ > + qcom-msm8226-samsung-ms013g.dtb \ > qcom-msm8226-samsung-s3ve3g.dtb \ > qcom-msm8660-surf.dtb \ > qcom-msm8916-samsung-e5.dtb \ > diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts > b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts > new file mode 100644 > index ..190b52fda634 > --- /dev/null > +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts > @@ -0,0 +1,386 @@ > +// SPDX-License-Identifier: BSD-3-Clause > + > +/dts-v1/; > + > +#include "qcom-msm8226.dtsi" > +#include "pm8226.dtsi" > + > +/delete-node/ _region; > + > +/ { > + model = "Samsung Galaxy Grand 2"; > + compatible = "samsung,ms013g", "qcom,msm8226"; > + chassis-type = "handset"; > + > + aliases { > + mmc0 = _1; /* SDC1 eMMC slot */ > + mmc1 = _2; /* SDC2 SD card slot */ > + serial0 = _uart3; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + gpio-hall-sensor { > + compatible = "gpio-keys"; > + > + pinctrl-0 = <_hall_sensor_default>; > + pinctrl-names = "default"; > + > + label = "GPIO Hall Effect Sensor"; > + > + event-hall-sensor { > + label = "Hall Effect Sensor"; > + gpios = < 50 GPIO_ACTIVE_LOW>; > + linux,input-type = ; > + linux,code = ; > + linux,can-disable; > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + > + pinctrl-0 = <_keys_default>; > + pinctrl-names = "default"; > + > + label = "GPIO Buttons"; > + > + button-volume-up { > + label = "Volume Up"; > + gpios = < 106 GPIO_ACTIVE_LOW>; > + linux,code = ; > + }; > + > + button-volume-down { > + label = "Volume Down"; > + gpios = < 107 GPIO_ACTIVE_LOW>; > + linux,code = ; > + }; > + > + button-home { > + label = "Home Key"; > + gpios = < 108 GPIO_ACTIVE_LOW>; > + linux,code = ; > + }; > + }; > + > + haptic { > + compatible = "regulator-haptic"; > + haptic-supply = <_motor_vdd>; > + min-microvolt = <330>; > + max-microvolt = <330>; > + }; This is the vibration motor? Use "vibrator" as node name then as per https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst?plain=1#L299 Apart from this I don't see anything wrong. Reviewed-by: Luca Weiss > + > + reg_motor_vdd: regulator-motor-vdd { > + compatible = "regulator-fixed"; > + regulator-name = "motor_vdd"; > + regulator-min-microvolt = <330>; > + regulator-max-microvolt = <330>; > + > + gpio = < 111 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + > + pinctrl-0 = <_en_default>; > + pinctrl-names = "default"; > + }; > + > + reg_vdd_tsp_a: regulator-vdd-tsp-a { > + compatible = "regulator-fixed"; > + regulator-name = "tsp_3p3v"; > + regulator-min-microvolt = <330>; > + regulator-max-microvolt = <330>; > + > + gpio = < 31 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + > + pinctrl-0 = <_en_default>; > + pinctrl-names = "default"; > + }; > + > + reserved-memory { > + smem_region: smem@fa0 { > + reg = <0x0fa0 0x10>; > + no-map; > + }; > + }; >
[PATCH v2 2/2] ARM: dts: qcom-msm8226-samsung-ms013g: Add initial device tree
Samsung Galaxy Grand 2 is a phone based on MSM8226. It's similar to the other Samsung devices based on MSM8226 with only a few minor differences. The device trees contain initial support with: - GPIO keys - Regulator haptic - SDHCI (internal and external storage) - UART (on USB connector via the TI TSU6721 MUIC) - Regulators - Touchscreen - Accelerometer Signed-off-by: Raymond Hackley --- arch/arm/boot/dts/qcom/Makefile | 1 + .../dts/qcom/qcom-msm8226-samsung-ms013g.dts | 386 ++ 2 files changed, 387 insertions(+) create mode 100644 arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index ccd4ce6353df..f06c6d425e91 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -28,6 +28,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-msm8226-microsoft-dempsey.dtb \ qcom-msm8226-microsoft-makepeace.dtb \ qcom-msm8226-microsoft-moneypenny.dtb \ + qcom-msm8226-samsung-ms013g.dtb \ qcom-msm8226-samsung-s3ve3g.dtb \ qcom-msm8660-surf.dtb \ qcom-msm8916-samsung-e5.dtb \ diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts new file mode 100644 index ..190b52fda634 --- /dev/null +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-ms013g.dts @@ -0,0 +1,386 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/dts-v1/; + +#include "qcom-msm8226.dtsi" +#include "pm8226.dtsi" + +/delete-node/ _region; + +/ { + model = "Samsung Galaxy Grand 2"; + compatible = "samsung,ms013g", "qcom,msm8226"; + chassis-type = "handset"; + + aliases { + mmc0 = _1; /* SDC1 eMMC slot */ + mmc1 = _2; /* SDC2 SD card slot */ + serial0 = _uart3; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + gpio-hall-sensor { + compatible = "gpio-keys"; + + pinctrl-0 = <_hall_sensor_default>; + pinctrl-names = "default"; + + label = "GPIO Hall Effect Sensor"; + + event-hall-sensor { + label = "Hall Effect Sensor"; + gpios = < 50 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + linux,can-disable; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <_keys_default>; + pinctrl-names = "default"; + + label = "GPIO Buttons"; + + button-volume-up { + label = "Volume Up"; + gpios = < 106 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-volume-down { + label = "Volume Down"; + gpios = < 107 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-home { + label = "Home Key"; + gpios = < 108 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + haptic { + compatible = "regulator-haptic"; + haptic-supply = <_motor_vdd>; + min-microvolt = <330>; + max-microvolt = <330>; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + + gpio = < 111 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <_en_default>; + pinctrl-names = "default"; + }; + + reg_vdd_tsp_a: regulator-vdd-tsp-a { + compatible = "regulator-fixed"; + regulator-name = "tsp_3p3v"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + + gpio = < 31 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <_en_default>; + pinctrl-names = "default"; + }; + + reserved-memory { + smem_region: smem@fa0 { + reg = <0x0fa0 0x10>; + no-map; + }; + }; +}; + +_i2c2 { + status = "okay"; + + accelerometer@18 { + compatible = "bosch,bma255"; + reg = <0x18>; + interrupts-extended = < 64 IRQ_TYPE_EDGE_RISING>; + + vdd-supply = <_l19>; + vddio-supply = <_lvs1>; + + pinctrl-0 = <_int_default>; + pinctrl-names = "default"; + + mount-matrix = "0", "1", "0", +