diff mbox series

[v3] ARM: dts: nexus4: Initial dts

Message ID 20250309-lg-nexus4-mako-v3-1-1dc2807df296@ixit.cz
State New
Headers show
Series [v3] ARM: dts: nexus4: Initial dts | expand

Commit Message

David Heidelberg via B4 Relay March 9, 2025, 12:45 a.m. UTC
From: Ivan Belokobylskiy <belokobylskij@gmail.com>

Add initial support for LG Nexus 4 (mako).

Features currently working: regulators, eMMC, WiFi, and volume keys.

Signed-off-by: Ivan Belokobylskiy <belokobylskij@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Changes in v3:
- rebased against next-20250307
- dropped backlight until driver gets converted to DT

Changes in v2:
- lge vendor doesn't exist anymore, rename to lg
- sdcc@ to mmc@ to comply with dt-schema
---
 arch/arm/boot/dts/qcom/Makefile                    |   1 +
 .../boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts  | 342 +++++++++++++++++++++
 2 files changed, 343 insertions(+)


---
base-commit: 0a2f889128969dab41861b6e40111aa03dc57014
change-id: 20250309-lg-nexus4-mako-da0833885b26

Best regards,

Comments

Dmitry Baryshkov March 9, 2025, 8:33 a.m. UTC | #1
On Sun, Mar 09, 2025 at 01:45:51AM +0100, David Heidelberg via B4 Relay wrote:
> From: Ivan Belokobylskiy <belokobylskij@gmail.com>
> 
> Add initial support for LG Nexus 4 (mako).
> 
> Features currently working: regulators, eMMC, WiFi, and volume keys.
> 
> Signed-off-by: Ivan Belokobylskiy <belokobylskij@gmail.com>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> Changes in v3:
> - rebased against next-20250307
> - dropped backlight until driver gets converted to DT
> 
> Changes in v2:
> - lge vendor doesn't exist anymore, rename to lg
> - sdcc@ to mmc@ to comply with dt-schema
> ---
>  arch/arm/boot/dts/qcom/Makefile                    |   1 +
>  .../boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts  | 342 +++++++++++++++++++++
>  2 files changed, 343 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
> index f06c6d425e91dd73c2b453d15543d95bd32383b9..0c1d116f6e84f76994aa8c8286350bdcd1657a42 100644
> --- a/arch/arm/boot/dts/qcom/Makefile
> +++ b/arch/arm/boot/dts/qcom/Makefile
> @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
>  	qcom-apq8064-ifc6410.dtb \
>  	qcom-apq8064-sony-xperia-lagan-yuga.dtb \
>  	qcom-apq8064-asus-nexus7-flo.dtb \
> +	qcom-apq8064-lg-nexus4-mako.dtb \
>  	qcom-apq8074-dragonboard.dtb \
>  	qcom-apq8084-ifc6540.dtb \
>  	qcom-apq8084-mtp.dtb \
> diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts
> new file mode 100644
> index 0000000000000000000000000000000000000000..bcb57675aa24892b290d543601f7a6b36b6a65f6
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts
> @@ -0,0 +1,342 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +#include "qcom-apq8064-v2.0.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/mfd/qcom-rpm.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> +/ {
> +	model = "LG Nexus 4 (mako)";
> +	compatible = "lg,nexus4-mako", "qcom,apq8064";
> +
> +	aliases {
> +		serial0 = &gsbi7_serial;
> +		serial1 = &gsbi6_serial;
> +		serial2 = &gsbi4_serial;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial2:115200n8";
> +	};
> +
> +	reserved-memory {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		ramoops@88d00000{
> +			compatible = "ramoops";
> +			reg = <0x88d00000 0x100000>;
> +			record-size = <0x00020000>;
> +			console-size = <0x00020000>;
> +			ftrace-size = <0x00020000>;
> +		};
> +	};
> +
> +	battery_cell: battery-cell {
> +		compatible = "simple-battery";
> +		constant-charge-current-max-microamp = <900000>;
> +		operating-range-celsius = <0 45>;
> +	};
> +
> +	soc {
> +		rpm@108000 {

Please use &rpm { ... }; instead.

> +			regulators {
> +				vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
> +				vin_lvs1_3_6-supply = <&pm8921_s4>;

Please move vin_lvs2-supply here.

> +				vin_lvs4_5_7-supply = <&pm8921_s4>;
> +

Please move vdd_l1_l2_l12_l18 here.

> +				vdd_l24-supply = <&pm8921_s1>;
> +				vdd_l25-supply = <&pm8921_s1>;
> +				vin_lvs2-supply = <&pm8921_s1>;
> +
> +				vdd_l26-supply = <&pm8921_s7>;
> +				vdd_l27-supply = <&pm8921_s7>;
> +				vdd_l28-supply = <&pm8921_s7>;
> +
> +				/* Buck SMPS */
> +				s1 {
> +					regulator-always-on;
> +					regulator-min-microvolt = <1225000>;
> +					regulator-max-microvolt = <1225000>;
> +					qcom,switch-mode-frequency = <3200000>;
> +					bias-pull-down;
> +				};

empty line

> +				s2 {
> +					regulator-min-microvolt = <1300000>;
> +					regulator-max-microvolt = <1300000>;
> +					qcom,switch-mode-frequency = <1600000>;
> +					bias-pull-down;
> +				};
> +
> +				/* msm otg HSUSB_VDDCX */
> +				s3 {
> +					regulator-min-microvolt = <500000>;
> +					regulator-max-microvolt = <1150000>;
> +					qcom,switch-mode-frequency = <4800000>;
> +					bias-pull-down;
> +				};
> +
> +				/*
> +				 * msm_sdcc.1-sdc-vdd_io
> +				 * tabla2x-slim-CDC_VDDA_RX
> +				 * tabla2x-slim-CDC_VDDA_TX
> +				 * tabla2x-slim-CDC_VDD_CP
> +				 * tabla2x-slim-VDDIO_CDC
> +				 */
> +				s4 {
> +					regulator-always-on;
> +					regulator-min-microvolt	= <1800000>;
> +					regulator-max-microvolt	= <1800000>;
> +					qcom,switch-mode-frequency = <1600000>;
> +					bias-pull-down;
> +					qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
> +				};
> +
> +				/*
> +				 * supply vdd_l26, vdd_l27, vdd_l28
> +				 */
> +				s7 {
> +					regulator-min-microvolt = <1300000>;
> +					regulator-max-microvolt = <1300000>;
> +					qcom,switch-mode-frequency = <3200000>;
> +				};
> +
> +				s8 {
> +					regulator-min-microvolt = <2200000>;
> +					regulator-max-microvolt = <2200000>;
> +					qcom,switch-mode-frequency = <1600000>;
> +				};
> +
> +				l1 {
> +					regulator-min-microvolt = <1100000>;
> +					regulator-max-microvolt = <1100000>;
> +					regulator-always-on;
> +					bias-pull-down;
> +				};
> +
> +				/* mipi_dsi.1-dsi1_pll_vdda */
> +				l2 {
> +					regulator-min-microvolt = <1200000>;
> +					regulator-max-microvolt = <1200000>;
> +					bias-pull-down;
> +				};
> +
> +				/* msm_otg-HSUSB_3p3 */
> +				l3 {
> +					regulator-min-microvolt = <3075000>;
> +					regulator-max-microvolt = <3500000>;
> +					bias-pull-down;
> +				};
> +
> +				/* msm_otg-HSUSB_1p8 */
> +				l4 {
> +					regulator-always-on;
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <1800000>;
> +				};
> +
> +				/* msm_sdcc.1-sdc_vdd */
> +				l5 {
> +					regulator-min-microvolt = <2950000>;
> +					regulator-max-microvolt = <2950000>;
> +					bias-pull-down;
> +				};
> +
> +				/* earjack_debug */
> +				l6 {
> +					regulator-min-microvolt = <3000000>;
> +					regulator-max-microvolt = <3000000>;
> +					bias-pull-down;
> +				};
> +
> +				/* mipi_dsi.1-dsi_vci */
> +				l8 {
> +					regulator-min-microvolt = <2800000>;
> +					regulator-max-microvolt = <3000000>;
> +					bias-pull-down;
> +				};
> +
> +				/* wcnss_wlan.0-iris_vddpa */
> +				l10 {
> +					regulator-min-microvolt = <2900000>;
> +					regulator-max-microvolt = <2900000>;
> +					bias-pull-down;
> +				};
> +
> +				/* mipi_dsi.1-dsi1_avdd */
> +				l11 {
> +					regulator-min-microvolt = <2850000>;
> +					regulator-max-microvolt = <2850000>;
> +					bias-pull-down;
> +				};
> +
> +				/* touch_vdd */
> +				l15 {
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <2950000>;
> +					bias-pull-down;
> +				};
> +
> +				/* slimport_dvdd */
> +				l18 {
> +					regulator-min-microvolt = <1100000>;
> +					regulator-max-microvolt = <1100000>;
> +					bias-pull-down;
> +				};
> +
> +				/* touch_io */
> +				l22 {
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <1800000>;
> +					bias-pull-down;
> +				};
> +
> +				/*
> +				 * mipi_dsi.1-dsi_vddio
> +				 * pil_qdsp6v4.1-pll_vdd
> +				 * pil_qdsp6v4.2-pll_vdd
> +				 * msm_ehci_host.0-HSUSB_1p8
> +				 * msm_ehci_host.1-HSUSB_1p8
> +				 */
> +				l23 {
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <1800000>;
> +					bias-pull-down;
> +				};
> +
> +				/*
> +				 * tabla2x-slim-CDC_VDDA_A_1P2V
> +				 * tabla2x-slim-VDDD_CDC_D
> +				 */
> +				l24 {
> +					regulator-min-microvolt = <750000>;
> +					regulator-max-microvolt = <1150000>;
> +					bias-pull-down;
> +				};
> +
> +				l25 {
> +					regulator-min-microvolt = <1250000>;
> +					regulator-max-microvolt = <1250000>;
> +					regulator-always-on;
> +					bias-pull-down;
> +				};
> +
> +				l26 {
> +					regulator-min-microvolt = <375000>;
> +					regulator-max-microvolt = <1050000>;
> +					regulator-always-on;
> +					bias-pull-down;
> +				};
> +
> +				l27 {
> +					regulator-min-microvolt = <1100000>;
> +					regulator-max-microvolt = <1100000>;
> +				};
> +
> +				l28 {
> +					regulator-min-microvolt = <1050000>;
> +					regulator-max-microvolt = <1050000>;
> +					bias-pull-down;
> +				};
> +
> +				/* wcnss_wlan.0-iris_vddio */
> +				lvs1 {
> +					bias-pull-down;
> +				};
> +
> +				/* wcnss_wlan.0-iris_vdddig */
> +				lvs2 {
> +					bias-pull-down;
> +				};
> +
> +				lvs3 {
> +					bias-pull-down;
> +				};
> +
> +				lvs4 {
> +					bias-pull-down;
> +				};
> +
> +				lvs5 {
> +					bias-pull-down;
> +				};
> +
> +				/* mipi_dsi.1-dsi_iovcc */
> +				lvs6 {
> +					bias-pull-down;
> +				};
> +
> +				/*
> +				 * pil_riva-pll_vdd
> +				 * lvds.0-lvds_vdda
> +				 * mipi_dsi.1-dsi1_vddio
> +				 * hdmi_msm.0-hdmi_vdda
> +				 */
> +				lvs7 {
> +					bias-pull-down;
> +				};
> +
> +				ncp {
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <1800000>;
> +					qcom,switch-mode-frequency = <1600000>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&pmicintc {
> +	keypad@148 {
> +		compatible = "qcom,pm8921-keypad";
> +		reg = <0x148>;
> +		interrupt-parent = <&pmicintc>;
> +		interrupts = <74 1>, <75 1>;

IRQ_TYPE_EDGE_RISING


> +		linux,keymap = <
> +			MATRIX_KEY(0, 0, KEY_VOLUMEDOWN)
> +			MATRIX_KEY(0, 1, KEY_VOLUMEUP)
> +		>;
> +
> +		keypad,num-rows = <1>;
> +		keypad,num-columns = <5>;
> +		debounce = <15>;
> +		scan-delay = <32>;
> +		row-hold = <91500>;
> +	};
> +};
> +
> +&gsbi1 {
> +	status = "okay";

Status should be the last property. Add empty line before it (here and
further)

> +	qcom,mode = <GSBI_PROT_I2C>;
> +};
> +
> +&gsbi1_i2c {
> +	status = "okay";
> +	clock-frequency = <200000>;
> +	pinctrl-0 = <&i2c1_pins>;
> +	pinctrl-names = "default";

I don't see i2c1_pins being defined. Did it pass the build?
Also there is already a pinctrl for this device. Why do you need to
overwrite it?

> +};
> +
> +&gsbi4 {
> +	status = "okay";
> +	qcom,mode = <GSBI_PROT_I2C_UART>;
> +};
> +
> +&gsbi4_serial {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&gsbi4_uart_pin_a>;

Unnecessary, can be dropped. It's set in qcom-apq8064.dtsi.

> +};
> +
> +/* eMMC */
> +&sdcc1 {
> +	status = "okay";
> +	vmmc-supply = <&pm8921_l5>;
> +	vqmmc-supply = <&pm8921_s4>;
> +};
> +
> +&riva {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&riva_wlan_pin_a>;

Where is it defined? Also pinctrl-names should come after pinctrl-N.

> +};
> 
> ---
> base-commit: 0a2f889128969dab41861b6e40111aa03dc57014
> change-id: 20250309-lg-nexus4-mako-da0833885b26
> 
> Best regards,
> -- 
> David Heidelberg <david@ixit.cz>
> 
>
Dmitry Baryshkov March 9, 2025, 9:36 a.m. UTC | #2
On Sun, Mar 09, 2025 at 10:17:29AM +0100, David Heidelberg wrote:
> Hello Dmitry!
> 
> Thank you for looking into it. See replies.
> 
> On 09/03/2025 09:33, Dmitry Baryshkov wrote:
> > On Sun, Mar 09, 2025 at 01:45:51AM +0100, David Heidelberg via B4 Relay wrote:
> > > +
> > > +&riva {
> > > +	status = "okay";
> > > +	pinctrl-names = "default";
> > > +	pinctrl-0 = <&riva_wlan_pin_a>;
> > 
> > Where is it defined? Also pinctrl-names should come after pinctrl-N.
> 
> definition is kinda aside in qcom-apq8064-pins.dtsi .

Ack, missed it.

> 
> All other suggestions incorporated, if it's OK otherwise, let me send v2

I think this also needs several supplies in the riva device itself and
in the iris subdevice. See qcom-apq8064-sony-xperia-lagan-yuga.dts.

> 
> Thank you
> David
> 
> > 
> > > +};
> > > 
> > > ---
> > > base-commit: 0a2f889128969dab41861b6e40111aa03dc57014
> > > change-id: 20250309-lg-nexus4-mako-da0833885b26
> > > 
> > > Best regards,
> > > -- 
> > > David Heidelberg <david@ixit.cz>
> > > 
> > > 
> > 
> 
> -- 
> David Heidelberg
>
kernel test robot March 9, 2025, 4:11 p.m. UTC | #3
Hi David,

kernel test robot noticed the following build errors:

[auto build test ERROR on 0a2f889128969dab41861b6e40111aa03dc57014]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Heidelberg-via-B4-Relay/ARM-dts-nexus4-Initial-dts/20250309-084753
base:   0a2f889128969dab41861b6e40111aa03dc57014
patch link:    https://lore.kernel.org/r/20250309-lg-nexus4-mako-v3-1-1dc2807df296%40ixit.cz
patch subject: [PATCH v3] ARM: dts: nexus4: Initial dts
config: arm-randconfig-002-20250309 (https://download.01.org/0day-ci/archive/20250309/202503092337.8UvZ5rwI-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250309/202503092337.8UvZ5rwI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503092337.8UvZ5rwI-lkp@intel.com/

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts:289.1-10 Label or path pmicintc not found
   FATAL ERROR: Syntax error parsing input tree
David Heidelberg March 9, 2025, 9:39 p.m. UTC | #4
On 09/03/2025 10:36, Dmitry Baryshkov wrote:
> On Sun, Mar 09, 2025 at 10:17:29AM +0100, David Heidelberg wrote:
>> Hello Dmitry!
>>
>> Thank you for looking into it. See replies.
>>
>> On 09/03/2025 09:33, Dmitry Baryshkov wrote:
>>> On Sun, Mar 09, 2025 at 01:45:51AM +0100, David Heidelberg via B4 Relay wrote:
>>>> +
>>>> +&riva {
>>>> +	status = "okay";
>>>> +	pinctrl-names = "default";
>>>> +	pinctrl-0 = <&riva_wlan_pin_a>;
>>>
>>> Where is it defined? Also pinctrl-names should come after pinctrl-N.
>>
>> definition is kinda aside in qcom-apq8064-pins.dtsi .
> 
> Ack, missed it.
> 
>>
>> All other suggestions incorporated, if it's OK otherwise, let me send v2
> 
> I think this also needs several supplies in the riva device itself and
> in the iris subdevice. See qcom-apq8064-sony-xperia-lagan-yuga.dts.
> 

I don't have the device in my hands, so if I figure out the regulators, 
I'll not be able to test new WiFi setup. I would drop the WiFi node for 
now, so at least the base regulators and eMMC gets and possible someone 
with devices in his hand can push more functionality forward, if you 
don't object.

There is slowly forming some APQ8064/MSM8960 community, so I think there 
will be updates, now I would just settle with minimum, so our downstream 
changes will contain only small chunks to get upstreamed.

Would you be ok with this approach?

>>
>> Thank you
>> David
>>
>>>
>>>> +};
>>>>
>>>> ---
>>>> base-commit: 0a2f889128969dab41861b6e40111aa03dc57014
>>>> change-id: 20250309-lg-nexus4-mako-da0833885b26
>>>>
>>>> Best regards,
>>>> -- 
>>>> David Heidelberg <david@ixit.cz>
>>>>
>>>>
>>>
>>
>> -- 
>> David Heidelberg
>>
>
Rob Herring March 10, 2025, 2:36 p.m. UTC | #5
On Sun, 09 Mar 2025 01:45:51 +0100, David Heidelberg wrote:
> From: Ivan Belokobylskiy <belokobylskij@gmail.com>
> 
> Add initial support for LG Nexus 4 (mako).
> 
> Features currently working: regulators, eMMC, WiFi, and volume keys.
> 
> Signed-off-by: Ivan Belokobylskiy <belokobylskij@gmail.com>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> Changes in v3:
> - rebased against next-20250307
> - dropped backlight until driver gets converted to DT
> 
> Changes in v2:
> - lge vendor doesn't exist anymore, rename to lg
> - sdcc@ to mmc@ to comply with dt-schema
> ---
>  arch/arm/boot/dts/qcom/Makefile                    |   1 +
>  .../boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts  | 342 +++++++++++++++++++++
>  2 files changed, 343 insertions(+)
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y for arch/arm/boot/dts/qcom/' for 20250309-lg-nexus4-mako-v3-1-1dc2807df296@ixit.cz:

Error: arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts:289.1-10 Label or path pmicintc not found
FATAL ERROR: Syntax error parsing input tree
make[3]: *** [scripts/Makefile.dtbs:131: arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dtb] Error 1
make[2]: *** [scripts/Makefile.build:461: arch/arm/boot/dts/qcom] Error 2
make[2]: Target 'arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dtb' not remade because of errors.
make[1]: *** [/home/rob/proj/linux-dt-testing/Makefile:1467: qcom/qcom-apq8064-lg-nexus4-mako.dtb] Error 2
make: *** [Makefile:251: __sub-make] Error 2
make: Target 'qcom/qcom-mdm9615-wp8548-mangoh-green.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4019-ap.dk07.1-c1.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974-lge-nexus5-hammerhead.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-samsung-klte.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4019-ap.dk07.1-c2.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8916-samsung-serranove.dtb' not remade because of errors.
make: Target 'qcom/qcom-sdx65-mtp.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8226-samsung-ms013g.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4018-ap120c-ac-bit.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974-sony-xperia-rhine-amami.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8226-microsoft-dempsey.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8916-samsung-grandmax.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8064-ifc6410.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8064-sony-xperia-lagan-yuga.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4019-ap.dk01.1-c1.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-samsung-kltechn.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-sony-xperia-shinano-aries.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8026-samsung-matisse-wifi.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8064-cm-qs600.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8084-ifc6540.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4019-ap.dk04.1-c3.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8916-samsung-e7.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8226-samsung-s3ve3g.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974-sony-xperia-rhine-honami.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4018-jalapeno.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8026-samsung-milletwifi.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-sony-xperia-shinano-leo.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8026-lg-lenok.dtb' not remade because of errors.
make: Target 'qcom/qcom-sdx55-mtp.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8960-cdp.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8016-sbc.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8064-asus-nexus7-flo.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4018-ap120c-ac.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-htc-m8.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8026-asus-sparrow.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8926-htc-memul.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8026-huawei-sturgeon.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq8064-ap148.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8226-microsoft-makepeace.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq8064-rb3011.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-fairphone-fp2.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8074-dragonboard.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8916-samsung-e5.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8926-motorola-peregrine.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8926-samsung-matisselte.dtb' not remade because of errors.
make: Target 'qcom/msm8226-motorola-falcon.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8060-dragonboard.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-oneplus-bacon.dtb' not remade because of errors.
make: Target 'qcom/qcom-sdx55-t55.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8084-mtp.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8960-samsung-expressatt.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8926-microsoft-tesla.dtb' not remade because of errors.
make: Target 'qcom/qcom-ipq4019-ap.dk04.1-c1.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8926-microsoft-superman-lte.dtb' not remade because of errors.
make: Target 'qcom/qcom-sdx55-telit-fn980-tlb.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974pro-sony-xperia-shinano-castor.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8660-surf.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8974-samsung-hlte.dtb' not remade because of errors.
make: Target 'qcom/qcom-apq8064-lg-nexus4-mako.dtb' not remade because of errors.
make: Target 'qcom/qcom-msm8226-microsoft-moneypenny.dtb' not remade because of errors.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
index f06c6d425e91dd73c2b453d15543d95bd32383b9..0c1d116f6e84f76994aa8c8286350bdcd1657a42 100644
--- a/arch/arm/boot/dts/qcom/Makefile
+++ b/arch/arm/boot/dts/qcom/Makefile
@@ -12,6 +12,7 @@  dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-apq8064-ifc6410.dtb \
 	qcom-apq8064-sony-xperia-lagan-yuga.dtb \
 	qcom-apq8064-asus-nexus7-flo.dtb \
+	qcom-apq8064-lg-nexus4-mako.dtb \
 	qcom-apq8074-dragonboard.dtb \
 	qcom-apq8084-ifc6540.dtb \
 	qcom-apq8084-mtp.dtb \
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts
new file mode 100644
index 0000000000000000000000000000000000000000..bcb57675aa24892b290d543601f7a6b36b6a65f6
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-lg-nexus4-mako.dts
@@ -0,0 +1,342 @@ 
+// SPDX-License-Identifier: GPL-2.0-only
+#include "qcom-apq8064-v2.0.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+/ {
+	model = "LG Nexus 4 (mako)";
+	compatible = "lg,nexus4-mako", "qcom,apq8064";
+
+	aliases {
+		serial0 = &gsbi7_serial;
+		serial1 = &gsbi6_serial;
+		serial2 = &gsbi4_serial;
+	};
+
+	chosen {
+		stdout-path = "serial2:115200n8";
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		ramoops@88d00000{
+			compatible = "ramoops";
+			reg = <0x88d00000 0x100000>;
+			record-size = <0x00020000>;
+			console-size = <0x00020000>;
+			ftrace-size = <0x00020000>;
+		};
+	};
+
+	battery_cell: battery-cell {
+		compatible = "simple-battery";
+		constant-charge-current-max-microamp = <900000>;
+		operating-range-celsius = <0 45>;
+	};
+
+	soc {
+		rpm@108000 {
+			regulators {
+				vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
+				vin_lvs1_3_6-supply = <&pm8921_s4>;
+				vin_lvs4_5_7-supply = <&pm8921_s4>;
+
+				vdd_l24-supply = <&pm8921_s1>;
+				vdd_l25-supply = <&pm8921_s1>;
+				vin_lvs2-supply = <&pm8921_s1>;
+
+				vdd_l26-supply = <&pm8921_s7>;
+				vdd_l27-supply = <&pm8921_s7>;
+				vdd_l28-supply = <&pm8921_s7>;
+
+				/* Buck SMPS */
+				s1 {
+					regulator-always-on;
+					regulator-min-microvolt = <1225000>;
+					regulator-max-microvolt = <1225000>;
+					qcom,switch-mode-frequency = <3200000>;
+					bias-pull-down;
+				};
+				s2 {
+					regulator-min-microvolt = <1300000>;
+					regulator-max-microvolt = <1300000>;
+					qcom,switch-mode-frequency = <1600000>;
+					bias-pull-down;
+				};
+
+				/* msm otg HSUSB_VDDCX */
+				s3 {
+					regulator-min-microvolt = <500000>;
+					regulator-max-microvolt = <1150000>;
+					qcom,switch-mode-frequency = <4800000>;
+					bias-pull-down;
+				};
+
+				/*
+				 * msm_sdcc.1-sdc-vdd_io
+				 * tabla2x-slim-CDC_VDDA_RX
+				 * tabla2x-slim-CDC_VDDA_TX
+				 * tabla2x-slim-CDC_VDD_CP
+				 * tabla2x-slim-VDDIO_CDC
+				 */
+				s4 {
+					regulator-always-on;
+					regulator-min-microvolt	= <1800000>;
+					regulator-max-microvolt	= <1800000>;
+					qcom,switch-mode-frequency = <1600000>;
+					bias-pull-down;
+					qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
+				};
+
+				/*
+				 * supply vdd_l26, vdd_l27, vdd_l28
+				 */
+				s7 {
+					regulator-min-microvolt = <1300000>;
+					regulator-max-microvolt = <1300000>;
+					qcom,switch-mode-frequency = <3200000>;
+				};
+
+				s8 {
+					regulator-min-microvolt = <2200000>;
+					regulator-max-microvolt = <2200000>;
+					qcom,switch-mode-frequency = <1600000>;
+				};
+
+				l1 {
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+					regulator-always-on;
+					bias-pull-down;
+				};
+
+				/* mipi_dsi.1-dsi1_pll_vdda */
+				l2 {
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+					bias-pull-down;
+				};
+
+				/* msm_otg-HSUSB_3p3 */
+				l3 {
+					regulator-min-microvolt = <3075000>;
+					regulator-max-microvolt = <3500000>;
+					bias-pull-down;
+				};
+
+				/* msm_otg-HSUSB_1p8 */
+				l4 {
+					regulator-always-on;
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				/* msm_sdcc.1-sdc_vdd */
+				l5 {
+					regulator-min-microvolt = <2950000>;
+					regulator-max-microvolt = <2950000>;
+					bias-pull-down;
+				};
+
+				/* earjack_debug */
+				l6 {
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					bias-pull-down;
+				};
+
+				/* mipi_dsi.1-dsi_vci */
+				l8 {
+					regulator-min-microvolt = <2800000>;
+					regulator-max-microvolt = <3000000>;
+					bias-pull-down;
+				};
+
+				/* wcnss_wlan.0-iris_vddpa */
+				l10 {
+					regulator-min-microvolt = <2900000>;
+					regulator-max-microvolt = <2900000>;
+					bias-pull-down;
+				};
+
+				/* mipi_dsi.1-dsi1_avdd */
+				l11 {
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+					bias-pull-down;
+				};
+
+				/* touch_vdd */
+				l15 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <2950000>;
+					bias-pull-down;
+				};
+
+				/* slimport_dvdd */
+				l18 {
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+					bias-pull-down;
+				};
+
+				/* touch_io */
+				l22 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					bias-pull-down;
+				};
+
+				/*
+				 * mipi_dsi.1-dsi_vddio
+				 * pil_qdsp6v4.1-pll_vdd
+				 * pil_qdsp6v4.2-pll_vdd
+				 * msm_ehci_host.0-HSUSB_1p8
+				 * msm_ehci_host.1-HSUSB_1p8
+				 */
+				l23 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					bias-pull-down;
+				};
+
+				/*
+				 * tabla2x-slim-CDC_VDDA_A_1P2V
+				 * tabla2x-slim-VDDD_CDC_D
+				 */
+				l24 {
+					regulator-min-microvolt = <750000>;
+					regulator-max-microvolt = <1150000>;
+					bias-pull-down;
+				};
+
+				l25 {
+					regulator-min-microvolt = <1250000>;
+					regulator-max-microvolt = <1250000>;
+					regulator-always-on;
+					bias-pull-down;
+				};
+
+				l26 {
+					regulator-min-microvolt = <375000>;
+					regulator-max-microvolt = <1050000>;
+					regulator-always-on;
+					bias-pull-down;
+				};
+
+				l27 {
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+				};
+
+				l28 {
+					regulator-min-microvolt = <1050000>;
+					regulator-max-microvolt = <1050000>;
+					bias-pull-down;
+				};
+
+				/* wcnss_wlan.0-iris_vddio */
+				lvs1 {
+					bias-pull-down;
+				};
+
+				/* wcnss_wlan.0-iris_vdddig */
+				lvs2 {
+					bias-pull-down;
+				};
+
+				lvs3 {
+					bias-pull-down;
+				};
+
+				lvs4 {
+					bias-pull-down;
+				};
+
+				lvs5 {
+					bias-pull-down;
+				};
+
+				/* mipi_dsi.1-dsi_iovcc */
+				lvs6 {
+					bias-pull-down;
+				};
+
+				/*
+				 * pil_riva-pll_vdd
+				 * lvds.0-lvds_vdda
+				 * mipi_dsi.1-dsi1_vddio
+				 * hdmi_msm.0-hdmi_vdda
+				 */
+				lvs7 {
+					bias-pull-down;
+				};
+
+				ncp {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					qcom,switch-mode-frequency = <1600000>;
+				};
+			};
+		};
+	};
+};
+
+&pmicintc {
+	keypad@148 {
+		compatible = "qcom,pm8921-keypad";
+		reg = <0x148>;
+		interrupt-parent = <&pmicintc>;
+		interrupts = <74 1>, <75 1>;
+		linux,keymap = <
+			MATRIX_KEY(0, 0, KEY_VOLUMEDOWN)
+			MATRIX_KEY(0, 1, KEY_VOLUMEUP)
+		>;
+
+		keypad,num-rows = <1>;
+		keypad,num-columns = <5>;
+		debounce = <15>;
+		scan-delay = <32>;
+		row-hold = <91500>;
+	};
+};
+
+&gsbi1 {
+	status = "okay";
+	qcom,mode = <GSBI_PROT_I2C>;
+};
+
+&gsbi1_i2c {
+	status = "okay";
+	clock-frequency = <200000>;
+	pinctrl-0 = <&i2c1_pins>;
+	pinctrl-names = "default";
+};
+
+&gsbi4 {
+	status = "okay";
+	qcom,mode = <GSBI_PROT_I2C_UART>;
+};
+
+&gsbi4_serial {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&gsbi4_uart_pin_a>;
+};
+
+/* eMMC */
+&sdcc1 {
+	status = "okay";
+	vmmc-supply = <&pm8921_l5>;
+	vqmmc-supply = <&pm8921_s4>;
+};
+
+&riva {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&riva_wlan_pin_a>;
+};