arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt
Subsystems (4)
PATCH 1/1 arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt
From: Rob Clark <[email protected]>
This is essentialy a squash of a bunch of history of trogdor and lazor dt updates from the chromium kernel tree.
I don't claim any credit other than wanting to more easily boot upstream kernel on these devices.
I've tried to add cc tags for all the original authors.
--- arch/arm64/boot/dts/qcom/Makefile | 5 + .../boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 24 + .../dts/qcom/sc7180-trogdor-lazor-r1-lte.dts | 18 + .../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 15 + .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 192 +++ .../boot/dts/qcom/sc7180-trogdor-lte-sku.dtsi | 15 + .../boot/dts/qcom/sc7180-trogdor-r1-lte.dts | 14 + .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 206 +++ arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1364 +++++++++++++++++ 9 files changed, 1853 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-lte-sku.dtsi create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-r1-lte.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
arch/arm64/boot/dts/qcom/Makefile +5 -0
@@ -19,6 +19,11 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8998-hp-envy-x2.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8998-lenovo-miix-630.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8998-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-idp.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-lazor-r0.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-lazor-r1.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-lazor-r1-lte.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-r1.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-r1-lte.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-ganges-kirin.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-discovery.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-pioneer.dtb
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Lazor board device tree source + * + * Copyright 2020 Google LLC. + */ + +/dts-v1/; + +#include "sc7180-trogdor-lazor.dtsi" + +/ { + model = "Google Lazor (rev0)"; + compatible = "google,lazor-rev0", "qcom,sc7180"; +}; + +&sn65dsi86_out { + /* + * Lane 0 was incorrectly mapped on the cable, but we've now decided + * that the cable is canon and in -rev1+ we'll make a board change + * that means we no longer need the swizzle. + */ + lane-polarities = <1 0>; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Lazor board device tree source + * + * Copyright 2020 Google LLC. + */ + +#include "sc7180-trogdor-lazor-r1.dts" +#include "sc7180-trogdor-lte-sku.dtsi" + +/ { + model = "Google Lazor (rev1, rev3+) with LTE"; + compatible = "google,lazor-sku0", "qcom,sc7180"; +}; + +&keyboard_backlight { + status = "okay"; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Lazor board device tree source + * + * Copyright 2020 Google LLC. + */ + +/dts-v1/; + +#include "sc7180-trogdor-lazor.dtsi" + +/ { + model = "Google Lazor (rev1, rev3+)"; + compatible = "google,lazor", "qcom,sc7180"; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi new file +192 -0
192 lines not on this page · raw message
arch/arm64/boot/dts/qcom/sc7180-trogdor-lte-sku.dtsi new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Trogdor dts fragment for LTE SKUs + * + * Copyright 2020 Google LLC. + */ + +&ap_sar_sensor { + label = "proximity-wifi-lte"; +}; + +&remoteproc_mpss { + firmware-name = "qcom/sc7180-trogdor/modem/mba.mbn", + "qcom/sc7180-trogdor/modem/qdsp6sw.mbn"; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1-lte.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Trogdor board device tree source + * + * Copyright 2020 Google LLC. + */ + +#include "sc7180-trogdor-r1.dts" +#include "sc7180-trogdor-lte-sku.dtsi" + +/ { + model = "Google Trogdor (rev1+) with LTE"; + compatible = "google,trogdor-sku0", "qcom,sc7180"; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts new file +206 -0
206 lines not on this page · raw message
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +1364 -0
1,364 lines not on this page · raw message
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
Quoting Rob Clark (2020-08-24 17:33:39)
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +2
-0@@ -0,0 +1,1364 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*
[...]
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +9
-0+ + gpio_keys: gpio-keys { + compatible = "gpio-keys"; + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&pen_pdct_l>; + + pen-insert { + label = "Pen Insert";
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 217
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +10
-0+ + /* Insert = low, eject = high */ + gpios = <&tlmm 52 GPIO_ACTIVE_LOW>; + linux,code = <SW_PEN_INSERTED>; + linux,input-type = <EV_SW>; + wakeup-source; + }; + }; + + max98357a: max98357a {
Maybe node name should be 'audio-codec' or 'dac' or 'amp' or 'speaker' or 'codec'?
Quoted 13 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +13
-0+ compatible = "maxim,max98357a"; + pinctrl-names = "default"; + pinctrl-0 = <&_en>; + sdmode-gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + }; + + pwmleds { + compatible = "pwm-leds"; + keyboard_backlight: keyboard-backlight { + status = "disabled"; + label = "cros_ec::kbd_backlight"; + pwms = <&cros_ec_pwm 0>;
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 240
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +10
-0+ max-brightness = <1023>; + }; + }; +}; + +&qfprom { + vcc-supply = <&pp1800_l11a>; +}; + +
Drop double newline?
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 250
Quoted 10 lines
+&qspi {
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +9
-0+ status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&qspi_clk>, <&qspi_cs0>, <&qspi_data01>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + /* TODO: Increase frequency after testing */
Maybe drop this TODO? I don't see it being too meaningful.
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 257
Quoted 7 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +7
-0+ spi-max-frequency = <25000000>; + spi-tx-bus-width = <2>; + spi-rx-bus-width = <2>; + }; +}; + +
Drop double newline?
Quoted 11 lines
+&apps_rsc {
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +10
-0+ pm6150-rpmh-regulators { + compatible = "qcom,pm6150-rpmh-regulators"; + +&wifi { + status = "okay"; + vdd-0.8-cx-mx-supply = <&vdd_cx_wlan>; + vdd-1.8-xo-supply = <&pp1800_l1c>; + vdd-1.3-rfa-supply = <&pp1300_l2c>; + + /*
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 868
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +10
-0+ * TODO: Put ch1 supply in its rightful place, rather than in ch0's + * spot. Channel 0 is held open by bluetooth for now. + */ + vdd-3.3-ch0-supply = <&pp3300_l11c>; + wifi-firmware { + iommus = <&apps_smmu 0xc2 0x1>; + }; +}; + +/* PINCTRL - additions to nodes defined in sdm845.dtsi */
Oops, that should be sc7180.dtsi
Quoted 6 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +6
-0+ +&qspi_cs0 { + pinconf { + pins = "gpio68"; + bias-disable; + };
[...]
Quoted 22 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +22
-0+/* PINCTRL - board-specific pinctrl */ + +&pm6150_gpio { + status = "disabled"; /* No GPIOs are connected */ +}; + +&pm6150l_gpio { + gpio-line-names = "AP_SUSPEND", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""; +}; + +&tlmm {
[...]
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 1364
Quoted 6 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +6
-0+ +&venus { + video-firmware { + iommus = <&apps_smmu 0x0c42 0x0>; + }; +};
I believe this node should come before the PINCTRL comment above and be sorted alphabetically by node name.
+/* PINCTRL - additions to nodes defined in sdm845.dtsi */
Quoted 25 lines · Stephen Boyd
Quoting Rob Clark (2020-08-24 17:33:39)
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +2
-0@@ -0,0 +1,1364 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*[...]
Quoted 14 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +14
-0+ + gpio_keys: gpio-keys { + compatible = "gpio-keys"; + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&pen_pdct_l>; + + pen-insert { + label = "Pen Insert"; + + /* Insert = low, eject = high */ + gpios = <&tlmm 52 GPIO_ACTIVE_LOW>; + linux,code = <SW_PEN_INSERTED>; + linux,input-type = <EV_SW>;
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 217
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +5
-0+ wakeup-source; + }; + }; + + max98357a: max98357a {Maybe node name should be 'audio-codec' or 'dac' or 'amp' or 'speaker' or 'codec'?
looking at other boards, it looks like 2 votes for "audio-codec-0", one vote for "codec0", and 2 votes for "max98357a".. so seems to be a codec rather than amp/speaker.. and "audio-codec" seems to be the popular choice..
BR,
-R
Hi,
Quoted 36 lines · Rob Clark
Quoted 25 lines · Stephen Boyd
Quoting Rob Clark (2020-08-24 17:33:39)
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +2
-0@@ -0,0 +1,1364 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*[...]
Quoted 14 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +14
-0+ + gpio_keys: gpio-keys { + compatible = "gpio-keys"; + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&pen_pdct_l>; + + pen-insert { + label = "Pen Insert"; + + /* Insert = low, eject = high */ + gpios = <&tlmm 52 GPIO_ACTIVE_LOW>; + linux,code = <SW_PEN_INSERTED>; + linux,input-type = <EV_SW>;Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 217
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +5
-0+ wakeup-source; + }; + }; + + max98357a: max98357a {Maybe node name should be 'audio-codec' or 'dac' or 'amp' or 'speaker' or 'codec'?
Quoted 4 lines
looking at other boards, it looks like 2 votes for "audio-codec-0", one vote for "codec0", and 2 votes for "max98357a".. so seems to be a codec rather than amp/speaker.. and "audio-codec" seems to be the popular choice..
I'd look at recently landed yaml files under "Documentation/devicetree/bindings/sound/". Those have the best change of having been reviewed by Rob Herring.
Oh, or you could look at the Devicetree Spec [1]
2.2.2 Generic Names Recommendation
...
* audio-codec
[1] https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3
Hi,
Quoted 9 lines · Rob Clark
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts new file +2
-0@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts line 12
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts new file +10
-0+ * Google Lazor board device tree source + * + * Copyright 2020 Google LLC. + */ + +#include "sc7180-trogdor-lazor-r1.dts" +#include "sc7180-trogdor-lte-sku.dtsi" + +/ { + model = "Google Lazor (rev1, rev3+) with LTE";
Since we're not handling the currently-being-debugged eMMC problem by hacking the -rev2 dts, above model should probably just say:
"Google Lazor (rev1+) with LTE";
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts new file +3
-0@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Lazor board device tree source
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts line 13
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts new file +10
-0+ * + * Copyright 2020 Google LLC. + */ + +/dts-v1/; + +#include "sc7180-trogdor-lazor.dtsi" + +/ { + model = "Google Lazor (rev1, rev3+)";
"Google Lazor (rev1+)";
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts new file +4
-0+&sdhc_1 { + /* + * HACK: due to b/155826689 we are temporarily overriding the + * compatible string which will cause us to restore the DLL config
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts line 74
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts new file +10
-0+ * at runtime resume. + */ + compatible = "qcom,sdm845-sdhci", "qcom,sdhci-msm-v5"; + + /* HACK: this emmc is also causing us s2r problems, so further hack. */ + max-frequency = <100000000>; + /delete-property/mmc-ddr-1_8v; + /delete-property/mmc-hs400-1_8v; + /delete-property/mmc-hs400-enhanced-strobe; +};
I'd be inclined to leave the "sdhc_1" hacks out. Qualcomm's gotta fix this without hacks. It means that trogdor boards won't work quite work right until they do but it needs to be fixed in a saner way.
Quoted 17 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +11
-0@@ -0,0 +1,1364 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Trogdor device tree source (common between revisions) + * + * Copyright 2019 Google LLC. + */ + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h> +
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 21
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +10
-0+/* PMICs depend on spmi_bus label and so must come after SoC */ +#include "pm6150.dtsi" +#include "pm6150l.dtsi" + +/* + * Reserved memory changes + * + * Delete all unused memory nodes and define the peripheral memory regions + * required by the board dts. + *
Get rid of extra blank line?
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +5
-0+ */ + +/delete-node/ &hyp_mem; +/delete-node/ &xbl_mem; +/delete-node/ &aop_mem;
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 36
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +10
-0+/delete-node/ &sec_apps_mem; +/delete-node/ &tz_mem; + +/* Increase the size from 2MB to 8MB */ +&rmtfs_mem { + reg = <0x0 0x84400000 0x0 0x800000>; +}; + +/ { +
Get rid of extra blank line?
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 191
Quoted 13 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +13
-0+ /* BOARD-SPECIFIC TOP LEVEL NODES */ + + backlight: backlight { + compatible = "pwm-backlight"; + + /* The panels don't seem to like anything below ~ 5% */ + brightness-levels = < + 196 256 324 400 484 576 676 784 900 1024 1156 1296 + 1444 1600 1764 1936 2116 2304 2500 2704 2916 3136 + 3364 3600 3844 4096 + >; + num-interpolated-steps = <64>; + default-brightness-level = <951>;
I suspect that this isn't quite right because locally we have the series from <https://lore.kernel.org/r/[email protected]>.
From looking at <https://crrev.com/c/2291209> I think you just gotta drop these properties.
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi line 862
Quoted 11 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi new file +11
-0+&wifi { + status = "okay"; + vdd-0.8-cx-mx-supply = <&vdd_cx_wlan>; + vdd-1.8-xo-supply = <&pp1800_l1c>; + vdd-1.3-rfa-supply = <&pp1300_l2c>; + + /* + * TODO: Put ch1 supply in its rightful place, rather than in ch0's + * spot. Channel 0 is held open by bluetooth for now. + */ + vdd-3.3-ch0-supply = <&pp3300_l11c>;
I'd be tempted to just do this correctly for upstream. Seems like the ath10k patch is ready to go anyway?