* [PATCH v2 0/3] Add support for Samsung Galaxy tab A (2015) tablets
@ 2023-01-06 12:25 Nikita Travkin
2023-01-06 12:25 ` [PATCH v2 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 Nikita Travkin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Nikita Travkin @ 2023-01-06 12:25 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson
Cc: Rob Herring, Krzysztof Kozlowski, Konrad Dybcio,
Siddharth Manthan, Jasper Korten, linux-arm-msm, devicetree,
linux-kernel, ~postmarketos/upstreaming, Nikita Travkin
This series introduces basic support for two Galaxy Tab A
tablets: 8 and 10 inch variants. They share most of the
hardware and are mainly dffernet by the display.
With this series both tablets gain support for things like
- SDHCI (internal and external storage)
- USB Device Mode
- UART
- Regulators
- WCNSS (WiFi/BT)
- GPIO keys
- Fuel gauge
- Touchscreen
- Accelerometer
In fact, with some additional patches like display and
modem support, that are not included as part of this
series, these tablets can actually reach one's expectations
of what a "normal" tablet should be able to do.
Changes in v2:
- Squashed the commits.
Jasper Korten (1):
arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015)
Nikita Travkin (1):
dt-bindings: qcom: Document samsung,gt58 and gt510
Siddharth Manthan (1):
arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015)
.../devicetree/bindings/arm/qcom.yaml | 2 +
arch/arm64/boot/dts/qcom/Makefile | 2 +
.../dts/qcom/msm8916-samsung-gt5-common.dtsi | 300 ++++++++++++++++++
.../boot/dts/qcom/msm8916-samsung-gt510.dts | 116 +++++++
.../boot/dts/qcom/msm8916-samsung-gt58.dts | 78 +++++
5 files changed, 498 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts
--
2.38.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v2 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 2023-01-06 12:25 [PATCH v2 0/3] Add support for Samsung Galaxy tab A (2015) tablets Nikita Travkin @ 2023-01-06 12:25 ` Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Nikita Travkin 2 siblings, 0 replies; 6+ messages in thread From: Nikita Travkin @ 2023-01-06 12:25 UTC (permalink / raw) To: Andy Gross, Bjorn Andersson Cc: Rob Herring, Krzysztof Kozlowski, Konrad Dybcio, Siddharth Manthan, Jasper Korten, linux-arm-msm, devicetree, linux-kernel, ~postmarketos/upstreaming, Nikita Travkin, Krzysztof Kozlowski gt58 and gt510 are Samsung Galaxy Tab A 8.0/9.7 (2015) tablets. Document their compatibles. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Nikita Travkin <nikita@trvn.ru> --- Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 65ef7e442da0..6231df1cc14c 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -207,6 +207,8 @@ properties: - samsung,e5 - samsung,e7 - samsung,grandmax + - samsung,gt510 + - samsung,gt58 - samsung,j5 - samsung,serranove - wingtech,wt88047 -- 2.38.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) 2023-01-06 12:25 [PATCH v2 0/3] Add support for Samsung Galaxy tab A (2015) tablets Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 Nikita Travkin @ 2023-01-06 12:25 ` Nikita Travkin 2023-01-07 10:36 ` Konrad Dybcio 2023-01-06 12:25 ` [PATCH v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Nikita Travkin 2 siblings, 1 reply; 6+ messages in thread From: Nikita Travkin @ 2023-01-06 12:25 UTC (permalink / raw) To: Andy Gross, Bjorn Andersson Cc: Rob Herring, Krzysztof Kozlowski, Konrad Dybcio, Siddharth Manthan, Jasper Korten, linux-arm-msm, devicetree, linux-kernel, ~postmarketos/upstreaming, Nikita Travkin From: Jasper Korten <jja2000@gmail.com> The Galaxy Tab A 9.7 (2015) is a Snapdragon 410 based tablet. This commit introduces basic support for the tablet including the following features: - SDHCI (internal and external storage) - USB Device Mode - UART - Regulators - WCNSS (WiFi/BT) - GPIO keys - Fuel gauge - Touchscreen - Accelerometer Part of the DT is split out into a common dtsi since the tablet shares majority of the design with another variant having a different screen size. Signed-off-by: Jasper Korten <jja2000@gmail.com> Co-developed-by: Siddharth Manthan <siddharth.manthan@gmail.com> Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com> Co-developed-by: Nikita Travkin <nikita@trvn.ru> Signed-off-by: Nikita Travkin <nikita@trvn.ru> --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 300 ++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-gt510.dts | 116 +++++++ 3 files changed, 417 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index b42362c7be1b..70e3b109aeff 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5u-eur.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi new file mode 100644 index 000000000000..bb1b1e814d8a --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -0,0 +1,300 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-pm8916.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + aliases { + serial0 = &blsp1_uart2; + }; + + chosen { + stdout-path = "serial0"; + }; + + reserved-memory { + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85500000 { + reg = <0x0 0x85500000 0x0 0xb00000>; + no-map; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_keys_default>; + pinctrl-names = "default"; + + label = "GPIO Buttons"; + + volume-up-button { + label = "Volume Up"; + gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + }; + + home-button { + label = "Home"; + gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>; + linux,code = <KEY_HOMEPAGE>; + }; + }; + + gpio-hall-sensor { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_hall_sensor_default>; + pinctrl-names = "default"; + + label = "GPIO Hall Effect Sensor"; + + hall-sensor-switch { + label = "Hall Effect Sensor"; + gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>; + linux,input-type = <EV_SW>; + linux,code = <SW_LID>; + linux,can-disable; + }; + }; +}; + +&blsp_i2c4 { + status = "okay"; + + fuelgauge@36 { + compatible = "maxim,max77849-battery"; + reg = <0x36>; + + maxim,rsns-microohm = <10000>; + maxim,over-heat-temp = <600>; + maxim,over-volt = <4400>; + + interrupt-parent = <&msmgpio>; + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-0 = <&fuelgauge_int_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_i2c2 { + status = "okay"; + + accelerometer@1d { + compatible = "st,lis2hh12"; + reg = <0x1d>; + + vdd-supply = <&pm8916_l17>; + vddio-supply = <&pm8916_l5>; + + interrupt-parent = <&msmgpio>; + interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "INT1"; + + st,drdy-int-pin = <1>; + mount-matrix = "0", "1", "0", + "-1", "0", "0", + "0", "0", "1"; + + pinctrl-0 = <&accel_int_default>; + pinctrl-names = "default"; + }; + + light-sensor@10 { + compatible = "capella,cm3323"; + reg = <0x10>; + }; +}; + +&blsp1_uart2 { + status = "okay"; +}; + +&pm8916_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + +/* FIXME: Replace with MAX77849 MUIC when driver is available */ +&pm8916_usbin { + status = "okay"; +}; + +&pronto { + status = "okay"; + + iris { + compatible = "qcom,wcn3660b"; + }; +}; + +&sdhc_1 { + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + pinctrl-names = "default", "sleep"; + + status = "okay"; +}; + +&sdhc_2 { + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + pinctrl-names = "default", "sleep"; + + cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&usb { + dr_mode = "peripheral"; + extcon = <&pm8916_usbin>; + + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&pm8916_usbin>; +}; + +&smd_rpm_regulators { + vdd_l1_l2_l3-supply = <&pm8916_s3>; + vdd_l4_l5_l6-supply = <&pm8916_s4>; + vdd_l7-supply = <&pm8916_s4>; + + s3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1300000>; + }; + + s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2100000>; + }; + + l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + l4 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l8 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2900000>; + }; + + l9 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + l10 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2800000>; + }; + + l11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; + }; + + l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + l18 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; +}; + +&msmgpio { + accel_int_default: accel-int-default-state { + pins = "gpio115"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + fuelgauge_int_default: fuelgauge-int-default-state { + pins = "gpio121"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + gpio_keys_default: gpio-keys-default-state { + pins = "gpio107", "gpio109"; + function = "gpio"; + + drive-strength = <2>; + bias-pull-up; + }; + + gpio_hall_sensor_default: gpio-hall-sensor-default-state { + pins = "gpio52"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts new file mode 100644 index 000000000000..6331166d9067 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-gt5-common.dtsi" + +/ { + model = "Samsung Galaxy Tab A 9.7 (2015)"; + compatible = "samsung,gt510", "qcom,msm8916"; + chassis-type = "tablet"; + + clk_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + + clocks = <&gcc GCC_GP2_CLK>; + + pinctrl-0 = <&motor_pwm_default>; + pinctrl-names = "default"; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&motor_en_default>; + pinctrl-names = "default"; + }; + + reg_tsp_1p8v: regulator-tsp-1p8v { + compatible = "regulator-fixed"; + regulator-name = "tsp_1p8v"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_en_default>; + pinctrl-names = "default"; + }; + + reg_tsp_3p3v: regulator-tsp-3p3v { + compatible = "regulator-fixed"; + regulator-name = "tsp_3p3v"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vibrator { + compatible = "pwm-vibrator"; + + pwms = <&clk_pwm 0 100000>; + pwm-names = "enable"; + + vcc-supply = <®_motor_vdd>; + }; +}; + +&blsp_i2c5 { + status = "okay"; + + touchscreen@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_LEVEL_LOW>; + + vdd-supply = <®_tsp_1p8v>; + vdda-supply = <®_tsp_3p3v>; + + reset-gpios = <&msmgpio 114 GPIO_ACTIVE_LOW>; + + pinctrl-0 = <&tsp_int_rst_default>; + pinctrl-names = "default"; + }; +}; + +&msmgpio { + motor_en_default: motor-en-default-state { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + motor_pwm_default: motor-pwm-default-state { + pins = "gpio50"; + function = "gcc_gp2_clk_a"; + }; + + tsp_en_default: tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + tsp_int_rst_default: tsp-int-rst-default-state { + pins = "gpio13", "gpio114"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; +}; -- 2.38.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) 2023-01-06 12:25 ` [PATCH v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) Nikita Travkin @ 2023-01-07 10:36 ` Konrad Dybcio 0 siblings, 0 replies; 6+ messages in thread From: Konrad Dybcio @ 2023-01-07 10:36 UTC (permalink / raw) To: Nikita Travkin, Andy Gross, Bjorn Andersson Cc: Rob Herring, Krzysztof Kozlowski, Siddharth Manthan, Jasper Korten, linux-arm-msm, devicetree, linux-kernel, ~postmarketos/upstreaming On 6.01.2023 13:25, Nikita Travkin wrote: > From: Jasper Korten <jja2000@gmail.com> > > The Galaxy Tab A 9.7 (2015) is a Snapdragon 410 based tablet. > > This commit introduces basic support for the tablet including the > following features: > - SDHCI (internal and external storage) > - USB Device Mode > - UART > - Regulators > - WCNSS (WiFi/BT) > - GPIO keys > - Fuel gauge > - Touchscreen > - Accelerometer > > Part of the DT is split out into a common dtsi since the tablet shares > majority of the design with another variant having a different screen > size. > > Signed-off-by: Jasper Korten <jja2000@gmail.com> > Co-developed-by: Siddharth Manthan <siddharth.manthan@gmail.com> > Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com> > Co-developed-by: Nikita Travkin <nikita@trvn.ru> > Signed-off-by: Nikita Travkin <nikita@trvn.ru> > --- > arch/arm64/boot/dts/qcom/Makefile | 1 + > .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 300 ++++++++++++++++++ > .../boot/dts/qcom/msm8916-samsung-gt510.dts | 116 +++++++ > 3 files changed, 417 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi > create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts > > diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile > index b42362c7be1b..70e3b109aeff 100644 > --- a/arch/arm64/boot/dts/qcom/Makefile > +++ b/arch/arm64/boot/dts/qcom/Makefile > @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5u-eur.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb > +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb > diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi > new file mode 100644 > index 000000000000..bb1b1e814d8a > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi > @@ -0,0 +1,300 @@ > +// SPDX-License-Identifier: GPL-2.0-only > + > +/dts-v1/; > + > +#include "msm8916-pm8916.dtsi" > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > + > +/ { > + aliases { > + serial0 = &blsp1_uart2; > + }; > + > + chosen { > + stdout-path = "serial0"; > + }; > + > + reserved-memory { > + /* Additional memory used by Samsung firmware modifications */ > + tz-apps@85500000 { > + reg = <0x0 0x85500000 0x0 0xb00000>; > + no-map; > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + > + pinctrl-0 = <&gpio_keys_default>; > + pinctrl-names = "default"; > + > + label = "GPIO Buttons"; > + > + volume-up-button { > + label = "Volume Up"; > + gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; > + linux,code = <KEY_VOLUMEUP>; > + }; > + > + home-button { > + label = "Home"; > + gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>; > + linux,code = <KEY_HOMEPAGE>; > + }; > + }; > + > + gpio-hall-sensor { > + compatible = "gpio-keys"; > + > + pinctrl-0 = <&gpio_hall_sensor_default>; > + pinctrl-names = "default"; > + > + label = "GPIO Hall Effect Sensor"; > + > + hall-sensor-switch { > + label = "Hall Effect Sensor"; > + gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>; > + linux,input-type = <EV_SW>; > + linux,code = <SW_LID>; > + linux,can-disable; > + }; > + }; > +}; > + > +&blsp_i2c4 { > + status = "okay"; > + > + fuelgauge@36 { > + compatible = "maxim,max77849-battery"; > + reg = <0x36>; > + > + maxim,rsns-microohm = <10000>; > + maxim,over-heat-temp = <600>; > + maxim,over-volt = <4400>; > + > + interrupt-parent = <&msmgpio>; > + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; > + > + pinctrl-0 = <&fuelgauge_int_default>; > + pinctrl-names = "default"; > + }; > +}; > + > +&blsp_i2c2 { > + status = "okay"; > + > + accelerometer@1d { > + compatible = "st,lis2hh12"; > + reg = <0x1d>; > + > + vdd-supply = <&pm8916_l17>; > + vddio-supply = <&pm8916_l5>; > + > + interrupt-parent = <&msmgpio>; > + interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "INT1"; > + > + st,drdy-int-pin = <1>; > + mount-matrix = "0", "1", "0", > + "-1", "0", "0", > + "0", "0", "1"; > + > + pinctrl-0 = <&accel_int_default>; > + pinctrl-names = "default"; > + }; > + > + light-sensor@10 { > + compatible = "capella,cm3323"; > + reg = <0x10>; > + }; The node at 0x10 should come before the node at 0x1d. > +}; > + > +&blsp1_uart2 { > + status = "okay"; > +}; > + > +&pm8916_resin { > + linux,code = <KEY_VOLUMEDOWN>; > + status = "okay"; > +}; > + > +/* FIXME: Replace with MAX77849 MUIC when driver is available */ > +&pm8916_usbin { > + status = "okay"; > +}; > + > +&pronto { > + status = "okay"; > + > + iris { > + compatible = "qcom,wcn3660b"; > + }; > +}; > + > +&sdhc_1 { > + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; > + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; > + pinctrl-names = "default", "sleep"; > + > + status = "okay"; > +}; > + > +&sdhc_2 { > + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; > + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; > + pinctrl-names = "default", "sleep"; > + > + cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>; > + > + status = "okay"; > +}; > + > +&usb { > + dr_mode = "peripheral"; > + extcon = <&pm8916_usbin>; > + > + status = "okay"; > +}; > + > +&usb_hs_phy { > + extcon = <&pm8916_usbin>; > +}; > + > +&smd_rpm_regulators { > + vdd_l1_l2_l3-supply = <&pm8916_s3>; > + vdd_l4_l5_l6-supply = <&pm8916_s4>; > + vdd_l7-supply = <&pm8916_s4>; > + > + s3 { > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1300000>; > + }; > + > + s4 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <2100000>; > + }; > + > + l1 { > + regulator-min-microvolt = <1225000>; > + regulator-max-microvolt = <1225000>; > + }; > + > + l2 { > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; > + }; > + > + l4 { > + regulator-min-microvolt = <2050000>; > + regulator-max-microvolt = <2050000>; > + }; > + > + l5 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + l6 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + l7 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + l8 { > + regulator-min-microvolt = <2850000>; > + regulator-max-microvolt = <2900000>; > + }; > + > + l9 { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + l10 { > + regulator-min-microvolt = <2700000>; > + regulator-max-microvolt = <2800000>; > + }; > + > + l11 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <2950000>; > + regulator-allow-set-load; > + regulator-system-load = <200000>; Please reorder the last two properties. > + }; > + > + l12 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <2950000>; > + }; > + > + l13 { > + regulator-min-microvolt = <3075000>; > + regulator-max-microvolt = <3075000>; > + }; > + > + l14 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + l15 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + l16 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + l17 { > + regulator-min-microvolt = <2850000>; > + regulator-max-microvolt = <2850000>; > + }; > + > + l18 { > + regulator-min-microvolt = <2700000>; > + regulator-max-microvolt = <2700000>; > + }; > +}; > + > +&msmgpio { > + accel_int_default: accel-int-default-state { > + pins = "gpio115"; > + function = "gpio"; > + Stray newlines, please remove. Konrad > + drive-strength = <2>; > + bias-disable; > + }; > + > + fuelgauge_int_default: fuelgauge-int-default-state { > + pins = "gpio121"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + > + gpio_keys_default: gpio-keys-default-state { > + pins = "gpio107", "gpio109"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + gpio_hall_sensor_default: gpio-hall-sensor-default-state { > + pins = "gpio52"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > +}; > diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts > new file mode 100644 > index 000000000000..6331166d9067 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts > @@ -0,0 +1,116 @@ > +// SPDX-License-Identifier: GPL-2.0-only > + > +/dts-v1/; > + > +#include "msm8916-samsung-gt5-common.dtsi" > + > +/ { > + model = "Samsung Galaxy Tab A 9.7 (2015)"; > + compatible = "samsung,gt510", "qcom,msm8916"; > + chassis-type = "tablet"; > + > + clk_pwm: pwm { > + compatible = "clk-pwm"; > + #pwm-cells = <2>; > + > + clocks = <&gcc GCC_GP2_CLK>; > + > + pinctrl-0 = <&motor_pwm_default>; > + pinctrl-names = "default"; > + }; > + > + reg_motor_vdd: regulator-motor-vdd { > + compatible = "regulator-fixed"; > + regulator-name = "motor_vdd"; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + > + gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + > + pinctrl-0 = <&motor_en_default>; > + pinctrl-names = "default"; > + }; > + > + reg_tsp_1p8v: regulator-tsp-1p8v { > + compatible = "regulator-fixed"; > + regulator-name = "tsp_1p8v"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + > + pinctrl-0 = <&tsp_en_default>; > + pinctrl-names = "default"; > + }; > + > + reg_tsp_3p3v: regulator-tsp-3p3v { > + compatible = "regulator-fixed"; > + regulator-name = "tsp_3p3v"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + > + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > + vibrator { > + compatible = "pwm-vibrator"; > + > + pwms = <&clk_pwm 0 100000>; > + pwm-names = "enable"; > + > + vcc-supply = <®_motor_vdd>; > + }; > +}; > + > +&blsp_i2c5 { > + status = "okay"; > + > + touchscreen@4a { > + compatible = "atmel,maxtouch"; > + reg = <0x4a>; > + interrupt-parent = <&msmgpio>; > + interrupts = <13 IRQ_TYPE_LEVEL_LOW>; > + > + vdd-supply = <®_tsp_1p8v>; > + vdda-supply = <®_tsp_3p3v>; > + > + reset-gpios = <&msmgpio 114 GPIO_ACTIVE_LOW>; > + > + pinctrl-0 = <&tsp_int_rst_default>; > + pinctrl-names = "default"; > + }; > +}; > + > +&msmgpio { > + motor_en_default: motor-en-default-state { > + pins = "gpio76"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + > + motor_pwm_default: motor-pwm-default-state { > + pins = "gpio50"; > + function = "gcc_gp2_clk_a"; > + }; > + > + tsp_en_default: tsp-en-default-state { > + pins = "gpio73"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + > + tsp_int_rst_default: tsp-int-rst-default-state { > + pins = "gpio13", "gpio114"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > +}; ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) 2023-01-06 12:25 [PATCH v2 0/3] Add support for Samsung Galaxy tab A (2015) tablets Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) Nikita Travkin @ 2023-01-06 12:25 ` Nikita Travkin 2023-01-07 10:37 ` Konrad Dybcio 2 siblings, 1 reply; 6+ messages in thread From: Nikita Travkin @ 2023-01-06 12:25 UTC (permalink / raw) To: Andy Gross, Bjorn Andersson Cc: Rob Herring, Krzysztof Kozlowski, Konrad Dybcio, Siddharth Manthan, Jasper Korten, linux-arm-msm, devicetree, linux-kernel, ~postmarketos/upstreaming, Nikita Travkin From: Siddharth Manthan <siddharth.manthan@gmail.com> Galaxy Tab A 8.0 is a tablet, very similar to Tab A 9.7 with major differences being the display and touchscreen. Add it's devicetree reusing a common dtsi from gt510. Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com> [Squashed multiple commits] Signed-off-by: Nikita Travkin <nikita@trvn.ru> --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8916-samsung-gt58.dts | 78 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 70e3b109aeff..062561db33f1 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt58.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts new file mode 100644 index 000000000000..fcf516888739 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-gt5-common.dtsi" + +/ { + model = "Samsung Galaxy Tab A 8.0 (2015)"; + compatible = "samsung,gt58", "qcom,msm8916"; + chassis-type = "tablet"; + + reg_vdd_tsp: regulator-vdd-tsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <®_tsp_en_default>; + pinctrl-names = "default"; + }; + + vibrator { + compatible = "gpio-vibrator"; + enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&vibrator_en_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_i2c5 { + status = "okay"; + + touchscreen@20 { + compatible = "zinitix,bt532"; + reg = <0x20>; + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <768>; + touchscreen-size-y = <1024>; + + vcca-supply = <®_vdd_tsp>; + vdd-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + }; +}; + +&msmgpio { + reg_tsp_en_default: reg-tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + tsp_int_default: tsp-int-default-state { + pins = "gpio13"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + vibrator_en_default: vibrator-en-default-state { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; +}; -- 2.38.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) 2023-01-06 12:25 ` [PATCH v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Nikita Travkin @ 2023-01-07 10:37 ` Konrad Dybcio 0 siblings, 0 replies; 6+ messages in thread From: Konrad Dybcio @ 2023-01-07 10:37 UTC (permalink / raw) To: Nikita Travkin, Andy Gross, Bjorn Andersson Cc: Rob Herring, Krzysztof Kozlowski, Siddharth Manthan, Jasper Korten, linux-arm-msm, devicetree, linux-kernel, ~postmarketos/upstreaming On 6.01.2023 13:25, Nikita Travkin wrote: > From: Siddharth Manthan <siddharth.manthan@gmail.com> > > Galaxy Tab A 8.0 is a tablet, very similar to Tab A 9.7 with major > differences being the display and touchscreen. > > Add it's devicetree reusing a common dtsi from gt510. > > Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com> > [Squashed multiple commits] > Signed-off-by: Nikita Travkin <nikita@trvn.ru> > --- > arch/arm64/boot/dts/qcom/Makefile | 1 + > .../boot/dts/qcom/msm8916-samsung-gt58.dts | 78 +++++++++++++++++++ > 2 files changed, 79 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts > > diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile > index 70e3b109aeff..062561db33f1 100644 > --- a/arch/arm64/boot/dts/qcom/Makefile > +++ b/arch/arm64/boot/dts/qcom/Makefile > @@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb > +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt58.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb > diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts > new file mode 100644 > index 000000000000..fcf516888739 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts > @@ -0,0 +1,78 @@ > +// SPDX-License-Identifier: GPL-2.0-only > + > +/dts-v1/; > + > +#include "msm8916-samsung-gt5-common.dtsi" > + > +/ { > + model = "Samsung Galaxy Tab A 8.0 (2015)"; > + compatible = "samsung,gt58", "qcom,msm8916"; > + chassis-type = "tablet"; > + > + reg_vdd_tsp: regulator-vdd-tsp { > + compatible = "regulator-fixed"; > + regulator-name = "vdd_tsp"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + > + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + > + pinctrl-0 = <®_tsp_en_default>; > + pinctrl-names = "default"; > + }; > + > + vibrator { > + compatible = "gpio-vibrator"; > + enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; > + > + pinctrl-0 = <&vibrator_en_default>; > + pinctrl-names = "default"; > + }; > +}; > + > +&blsp_i2c5 { > + status = "okay"; > + > + touchscreen@20 { > + compatible = "zinitix,bt532"; > + reg = <0x20>; > + interrupt-parent = <&msmgpio>; > + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; > + > + touchscreen-size-x = <768>; > + touchscreen-size-y = <1024>; > + > + vcca-supply = <®_vdd_tsp>; > + vdd-supply = <&pm8916_l6>; > + > + pinctrl-0 = <&tsp_int_default>; > + pinctrl-names = "default"; > + }; > +}; > + > +&msmgpio { > + reg_tsp_en_default: reg-tsp-en-default-state { > + pins = "gpio73"; > + function = "gpio"; > + Stray newlines, please remove. With that: Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > + drive-strength = <2>; > + bias-disable; > + }; > + > + tsp_int_default: tsp-int-default-state { > + pins = "gpio13"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + > + vibrator_en_default: vibrator-en-default-state { > + pins = "gpio76"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > +}; ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-07 10:37 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-01-06 12:25 [PATCH v2 0/3] Add support for Samsung Galaxy tab A (2015) tablets Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 Nikita Travkin 2023-01-06 12:25 ` [PATCH v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) Nikita Travkin 2023-01-07 10:36 ` Konrad Dybcio 2023-01-06 12:25 ` [PATCH v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Nikita Travkin 2023-01-07 10:37 ` Konrad Dybcio
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).