Message ID | 20221030073232.22726-1-marijn.suijten@somainline.org |
---|---|
Headers | show |
Series | arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 | expand |
On 30.10.2022 08:32, Marijn Suijten wrote: > Make sure the SDHCI hardware is properly reset before interacting with > it, to protect against any possibly indeterminate state left by the > bootloader. > > Suggested-by: Konrad Dybcio <konrad.dybcio@somainline.org> > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> Konrad > arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi > index c39de7d3ace0..a3ae765d9781 100644 > --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi > @@ -490,6 +490,7 @@ sdhc_1: mmc@7c4000 { > <&gcc GCC_SDCC1_APPS_CLK>, > <&rpmhcc RPMH_CXO_CLK>; > clock-names = "iface", "core", "xo"; > + resets = <&gcc GCC_SDCC1_BCR>; > qcom,dll-config = <0x000f642c>; > qcom,ddr-config = <0x80040868>; > power-domains = <&rpmhpd SM6350_CX>; > @@ -1068,6 +1069,7 @@ sdhc_2: mmc@8804000 { > <&gcc GCC_SDCC2_APPS_CLK>, > <&rpmhcc RPMH_CXO_CLK>; > clock-names = "iface", "core", "xo"; > + resets = <&gcc GCC_SDCC2_BCR>; > interconnects = <&aggre2_noc MASTER_SDCC_2 0 &clk_virt SLAVE_EBI_CH0 0>, > <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>; > interconnect-names = "sdhc-ddr", "cpu-sdhc";
On 30.10.2022 08:32, Marijn Suijten wrote: > In addition to the sdc2 pins, set the SD Card Detect pin in a sane state > to be used as an interrupt when an SD Card is slotted in or removed. > > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> Konrad > .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > index 36911b9a5c04..9a96000fc95b 100644 > --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > @@ -30,6 +30,24 @@ framebuffer: framebuffer@a0000000 { > }; > }; > > +&sdc2_off_state { > + sd-cd-pins { > + pins = "gpio94"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + }; > +}; > + > +&sdc2_on_state { > + sd-cd-pins { > + pins = "gpio94"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-up; > + }; > +}; > + > &sdhc_2 { > status = "okay"; >
On 30.10.2022 08:32, Marijn Suijten wrote: > Include pm6350 to inherit its GPIO and button configuration, and > configure "resin" to serve as volume up, and gpio2 as volume down. > > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> Konrad > .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 31 +++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > index 9a96000fc95b..4512b0bf7fe1 100644 > --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > @@ -4,7 +4,9 @@ > */ > /dts-v1/; > > +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> > #include "sm6350.dtsi" > +#include "pm6350.dtsi" > > / { > model = "Sony Xperia 10 III"; > @@ -28,6 +30,35 @@ framebuffer: framebuffer@a0000000 { > clocks = <&gcc GCC_DISP_AXI_CLK>; > }; > }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + pinctrl-names = "default"; > + pinctrl-0 = <&gpio_keys_state>; > + > + key-volume-down { > + label = "volume_down"; > + linux,code = <KEY_VOLUMEDOWN>; > + gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; > + }; > + }; > +}; > + > +&pm6350_gpios { > + gpio_keys_state: gpio-keys-state { > + key-volume-down-pins { > + pins = "gpio2"; > + function = PMIC_GPIO_FUNC_NORMAL; > + power-source = <0>; > + bias-disable; > + input-enable; > + }; > + }; > +}; > + > +&pm6350_resin { > + linux,code = <KEY_VOLUMEUP>; > + status = "okay"; > }; > > &sdc2_off_state {
On 30.10.2022 08:32, Marijn Suijten wrote: > Use the generic samsung,s6sy761 touchscreen driver for this device, > together with a few pins and regulators to power it up correctly. > > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> Konrad > .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 41 +++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > index 6eb1d4e5e60f..20f35623d1ef 100644 > --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts > @@ -43,6 +43,15 @@ key-volume-down { > gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; > }; > }; > + > + touch_en_vreg: touch-en-regulator { > + compatible = "regulator-fixed"; > + regulator-name = "touch_en_vreg"; > + gpio = <&tlmm 10 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + > + vin-supply = <&pm6350_l6>; > + }; > }; > > &apps_rsc { > @@ -280,6 +289,23 @@ &gpi_dma1 { > status = "okay"; > }; > > +&i2c8 { > + clock-frequency = <400000>; > + status = "okay"; > + > + touchscreen@48 { > + compatible = "samsung,s6sy761"; > + reg = <0x48>; > + interrupt-parent = <&tlmm>; > + interrupts = <22 0x2008>; > + vdd-supply = <&pm6350_l11>; > + avdd-supply = <&touch_en_vreg>; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&ts_int_default &ts_active>; > + }; > +}; > + > &pm6350_gpios { > gpio_keys_state: gpio-keys-state { > key-volume-down-pins { > @@ -334,6 +360,21 @@ &sdhc_2 { > > &tlmm { > gpio-reserved-ranges = <13 4>, <45 2>, <56 2>; > + > + ts_active: ts-active-state { > + pins = "gpio21"; > + function = "gpio"; > + drive-strength = <8>; > + bias-pull-up; > + }; > + > + ts_int_default: ts-int-default-state { > + pins = "gpio22"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + input-enable; > + }; > }; > > &usb_1 {