5.18.18-rc1 review
Subsystems (12)
Greg Kroah-Hartman
maintainerPATCH 234/1095 ARM: dts: qcom-msm8974-lge-nexus5: Use &labels
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 1c1574e24990e9f9d753958745b8274874241158 ]
Use &labels to align with the style used in new DTS and apply tiny style fixes.
--- .../qcom-msm8974-lge-nexus5-hammerhead.dts | 1110 ++++++++--------- 1 file changed, 536 insertions(+), 574 deletions(-)
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +536 -574
@@ -40,209 +40,6 @@ volume-down { }; }; - smd { - rpm { - rpm-requests { - pm8841-regulators { - s1 { - regulator-min-microvolt = <675000>; - regulator-max-microvolt = <1050000>; - }; - - s2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - s3 { - regulator-min-microvolt = <1050000>; - regulator-max-microvolt = <1050000>; - }; - - s4 { - regulator-min-microvolt = <815000>; - regulator-max-microvolt = <900000>; - }; - }; - - pm8941-regulators { - vdd_l1_l3-supply = <&pm8941_s1>; - vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; - vdd_l4_l11-supply = <&pm8941_s1>; - vdd_l5_l7-supply = <&pm8941_s2>; - vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; - vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>; - vdd_l9_l10_l17_l22-supply = <&vreg_boost>; - vdd_l13_l20_l23_l24-supply = <&vreg_boost>; - vdd_l21-supply = <&vreg_boost>; - - s1 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - - regulator-always-on; - regulator-boot-on; - }; - - s2 { - regulator-min-microvolt = <2150000>; - regulator-max-microvolt = <2150000>; - - regulator-boot-on; - }; - - s3 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - - regulator-always-on; - regulator-boot-on; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l3 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l4 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l10 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l11 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l13 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l15 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l16 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l19 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3300000>; - }; - - l20 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - regulator-system-load = <200000>; - regulator-allow-set-load; - }; - - l21 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l22 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3300000>; - }; - - l23 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l24 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - - regulator-boot-on; - }; - }; - }; - }; - }; - vreg_wlan: wlan-regulator { compatible = "regulator-fixed";
@@ -258,504 +55,669 @@ vreg_wlan: wlan-regulator { }; }; -&soc { - serial@f991d000 { - status = "okay"; +&blsp1_i2c1 { + status = "okay"; + clock-frequency = <100000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + charger: bq24192@6b { + compatible = "ti,bq24192"; + reg = <0x6b>; + interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>; + + omit-battery-class; + + usb_otg_vbus: usb-otg-vbus { }; }; - pinctrl@fd510000 { - sdhc1_pin_a: sdhc1-pin-active { - clk { - pins = "sdc1_clk"; - drive-strength = <16>; - bias-disable; - }; + fuelgauge: max17048@36 { + compatible = "maxim,max17048"; + reg = <0x36>; - cmd-data { - pins = "sdc1_cmd", "sdc1_data"; - drive-strength = <10>; - bias-pull-up; - }; - }; + maxim,double-soc; + maxim,rcomp = /bits/ 8 <0x4d>; - sdhc2_pin_a: sdhc2-pin-active { - clk { - pins = "sdc2_clk"; - drive-strength = <6>; - bias-disable; - }; + interrupt-parent = <&tlmm>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; - cmd-data { - pins = "sdc2_cmd", "sdc2_data"; - drive-strength = <6>; - bias-pull-up; - }; - }; + pinctrl-names = "default"; + pinctrl-0 = <&fuelgauge_pin>; - i2c1_pins: i2c1 { - mux { - pins = "gpio2", "gpio3"; - function = "blsp_i2c1"; + maxim,alert-low-soc-level = <2>; + }; +}; - drive-strength = <2>; - bias-disable; - }; - }; +&blsp1_i2c2 { + status = "okay"; + clock-frequency = <355000>; - i2c2_pins: i2c2 { - mux { - pins = "gpio6", "gpio7"; - function = "blsp_i2c2"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; - drive-strength = <2>; - bias-disable; - }; + synaptics@70 { + compatible = "syna,rmi4-i2c"; + reg = <0x70>; + + interrupts-extended = <&tlmm 5 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <&pm8941_l22>; + vio-supply = <&pm8941_lvs3>; + + pinctrl-names = "default"; + pinctrl-0 = <&touch_pin>; + + #address-cells = <1>; + #size-cells = <0>; + + rmi4-f01@1 { + reg = <0x1>; + syna,nosleep-mode = <1>; }; - i2c3_pins: i2c3 { - mux { - pins = "gpio10", "gpio11"; - function = "blsp_i2c3"; - drive-strength = <2>; - bias-disable; - }; + rmi4-f12@12 { + reg = <0x12>; + syna,sensor-type = <1>; }; + }; +}; - i2c11_pins: i2c11 { - mux { - pins = "gpio83", "gpio84"; - function = "blsp_i2c11"; +&blsp1_i2c3 { + status = "okay"; + clock-frequency = <100000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + + avago_apds993@39 { + compatible = "avago,apds9930"; + reg = <0x39>; + interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <&pm8941_l17>; + vddio-supply = <&pm8941_lvs1>; + led-max-microamp = <100000>; + amstaos,proximity-diodes = <0>; + }; +}; - drive-strength = <2>; - bias-disable; - }; +&blsp2_i2c5 { + status = "okay"; + clock-frequency = <355000>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c11_pins>; + + led-controller@38 { + compatible = "ti,lm3630a"; + status = "okay"; + reg = <0x38>; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + led-sources = <0 1>; + label = "lcd-backlight"; + default-brightness = <200>; }; + }; +}; + +&blsp2_i2c6 { + status = "okay"; + clock-frequency = <100000>; - i2c12_pins: i2c12 { - mux { - pins = "gpio87", "gpio88"; - function = "blsp_i2c12"; - drive-strength = <2>; - bias-disable; + pinctrl-names = "default"; + pinctrl-0 = <&i2c12_pins>; + + mpu6515@68 { + compatible = "invensense,mpu6515"; + reg = <0x68>; + interrupts-extended = <&tlmm 73 IRQ_TYPE_EDGE_FALLING>; + vddio-supply = <&pm8941_lvs1>; + + pinctrl-names = "default"; + pinctrl-0 = <&mpu6515_pin>; + + mount-matrix = "0", "-1", "0", + "-1", "0", "0", + "0", "0", "1"; + + i2c-gate { + #address-cells = <1>; + #size-cells = <0>; + ak8963@f { + compatible = "asahi-kasei,ak8963"; + reg = <0x0f>; + gpios = <&tlmm 67 0>; + vid-supply = <&pm8941_lvs1>; + vdd-supply = <&pm8941_l17>; }; - }; - mpu6515_pin: mpu6515 { - irq { - pins = "gpio73"; - function = "gpio"; - bias-disable; - input-enable; + bmp280@76 { + compatible = "bosch,bmp280"; + reg = <0x76>; + vdda-supply = <&pm8941_lvs1>; + vddd-supply = <&pm8941_l17>; }; }; + }; +}; - touch_pin: touch { - int { - pins = "gpio5"; - function = "gpio"; +&blsp1_uart1 { + status = "okay"; +}; - drive-strength = <2>; - bias-disable; - input-enable; - }; +&blsp2_uart4 { + status = "okay"; - reset { - pins = "gpio8"; - function = "gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&blsp2_uart4_pin_a>; - drive-strength = <2>; - bias-pull-up; - }; - }; + bluetooth { + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; - panel_pin: panel { - te { - pins = "gpio12"; - function = "mdp_vsync"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_pin>; - drive-strength = <2>; - bias-disable; - }; - }; + host-wakeup-gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; + device-wakeup-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>; + }; +}; - bt_pin: bt { - hostwake { - pins = "gpio42"; - function = "gpio"; - }; +&dsi0 { + status = "okay"; - devwake { - pins = "gpio62"; - function = "gpio"; - }; + vdda-supply = <&pm8941_l2>; + vdd-supply = <&pm8941_lvs3>; + vddio-supply = <&pm8941_l12>; + + panel: panel@0 { + reg = <0>; + compatible = "lg,acx467akm-7"; - shutdown { - pins = "gpio41"; - function = "gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&panel_pin>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi0_out>; }; }; + }; +}; - blsp2_uart4_pin_a: blsp2-uart4-pin-active { - tx { - pins = "gpio53"; - function = "blsp_uart10"; +&dsi0_out { + remote-endpoint = <&panel_in>; + data-lanes = <0 1 2 3>; +}; - drive-strength = <2>; - bias-disable; - }; +&dsi0_phy { + status = "okay"; - rx { - pins = "gpio54"; - function = "blsp_uart10"; + vddio-supply = <&pm8941_l12>; +}; - drive-strength = <2>; - bias-pull-up; - }; +&mdss { + status = "okay"; +}; - cts { - pins = "gpio55"; - function = "blsp_uart10"; +&otg { + status = "okay"; - drive-strength = <2>; - bias-pull-up; - }; + phys = <&usb_hs1_phy>; + phy-select = <&tcsr 0xb000 0>; - rts { - pins = "gpio56"; - function = "blsp_uart10"; + extcon = <&charger>, <&usb_id>; + vbus-supply = <&usb_otg_vbus>; - drive-strength = <2>; - bias-disable; - }; + hnp-disable; + srp-disable; + adp-disable; + + ulpi { + phy@a { + status = "okay"; + + v1p8-supply = <&pm8941_l6>; + v3p3-supply = <&pm8941_l24>; + + qcom,init-seq = /bits/ 8 <0x1 0x64>; }; }; +}; - sdhci@f9824900 { - status = "okay"; +&pm8941_gpios { + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio2", "gpio3"; + function = "normal"; - vmmc-supply = <&pm8941_l20>; - vqmmc-supply = <&pm8941_s3>; + bias-pull-up; + power-source = <PM8941_GPIO_S3>; + }; - bus-width = <8>; - non-removable; + fuelgauge_pin: fuelgauge-int { + pins = "gpio9"; + function = "normal"; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc1_pin_a>; + bias-disable; + input-enable; + power-source = <PM8941_GPIO_S3>; }; - sdhci@f98a4900 { - status = "okay"; + wlan_sleep_clk_pin: wl-sleep-clk { + pins = "gpio16"; + function = "func2"; + + output-high; + power-source = <PM8941_GPIO_S3>; + }; - max-frequency = <100000000>; - bus-width = <4>; - non-removable; - vmmc-supply = <&vreg_wlan>; - vqmmc-supply = <&pm8941_s3>; + wlan_regulator_pin: wl-reg-active { + pins = "gpio17"; + function = "normal"; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc2_pin_a>; + bias-disable; + power-source = <PM8941_GPIO_S3>; + }; - #address-cells = <1>; - #size-cells = <0>; + otg { + gpio-hog; + gpios = <35 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "otg-gpio"; + }; +}; + +&rpm_requests { + pm8841-regulators { + pm8841_s1: s1 { + regulator-min-microvolt = <675000>; + regulator-max-microvolt = <1050000>; + }; - bcrmf@1 { - compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; - reg = <1>; + pm8841_s2: s2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1050000>; + }; - brcm,drive-strength = <10>; + pm8841_s3: s3 { + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&wlan_sleep_clk_pin>; + pm8841_s4: s4 { + regulator-min-microvolt = <815000>; + regulator-max-microvolt = <900000>; }; }; - serial@f9960000 { - status = "okay"; + pm8941-regulators { + vdd_l1_l3-supply = <&pm8941_s1>; + vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; + vdd_l4_l11-supply = <&pm8941_s1>; + vdd_l5_l7-supply = <&pm8941_s2>; + vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; + vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>; + vdd_l9_l10_l17_l22-supply = <&vreg_boost>; + vdd_l13_l20_l23_l24-supply = <&vreg_boost>; + vdd_l21-supply = <&vreg_boost>; + + pm8941_s1: s1 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; + }; - pinctrl-names = "default"; - pinctrl-0 = <&blsp2_uart4_pin_a>; + pm8941_s2: s2 { + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + regulator-boot-on; + }; - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <3000000>; + pm8941_s3: s3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; - pinctrl-names = "default"; - pinctrl-0 = <&bt_pin>; + pm8941_l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + regulator-always-on; + regulator-boot-on; + }; - host-wakeup-gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; - device-wakeup-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>; + pm8941_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; }; - }; - i2c@f9967000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c11_pins>; - clock-frequency = <355000>; - qcom,src-freq = <50000000>; + pm8941_l3: l3 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; - led-controller@38 { - compatible = "ti,lm3630a"; - status = "okay"; - reg = <0x38>; + pm8941_l4: l4 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; - #address-cells = <1>; - #size-cells = <0>; + pm8941_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - led@0 { - reg = <0>; - led-sources = <0 1>; - label = "lcd-backlight"; - default-brightness = <200>; - }; + pm8941_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; }; - }; - i2c@f9968000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c12_pins>; - clock-frequency = <100000>; - qcom,src-freq = <50000000>; - - mpu6515@68 { - compatible = "invensense,mpu6515"; - reg = <0x68>; - interrupts-extended = <&tlmm 73 IRQ_TYPE_EDGE_FALLING>; - vddio-supply = <&pm8941_lvs1>; - - pinctrl-names = "default"; - pinctrl-0 = <&mpu6515_pin>; - - mount-matrix = "0", "-1", "0", - "-1", "0", "0", - "0", "0", "1"; - - i2c-gate { - #address-cells = <1>; - #size-cells = <0>; - ak8963@f { - compatible = "asahi-kasei,ak8963"; - reg = <0x0f>; - gpios = <&tlmm 67 0>; - vid-supply = <&pm8941_lvs1>; - vdd-supply = <&pm8941_l17>; - }; - - bmp280@76 { - compatible = "bosch,bmp280"; - reg = <0x76>; - vdda-supply = <&pm8941_lvs1>; - vddd-supply = <&pm8941_l17>; - }; - }; + pm8941_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; }; - }; - i2c@f9923000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins>; - clock-frequency = <100000>; - qcom,src-freq = <50000000>; + pm8941_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - charger: bq24192@6b { - compatible = "ti,bq24192"; - reg = <0x6b>; - interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>; + pm8941_l9: l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - omit-battery-class; + pm8941_l10: l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - usb_otg_vbus: usb-otg-vbus { }; + pm8941_l11: l11 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; }; - fuelgauge: max17048@36 { - compatible = "maxim,max17048"; - reg = <0x36>; + pm8941_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + pm8941_l13: l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; + + pm8941_l14: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8941_l15: l15 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + pm8941_l16: l16 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; + + pm8941_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8941_l18: l18 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8941_l19: l19 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; - maxim,double-soc; - maxim,rcomp = /bits/ 8 <0x4d>; + pm8941_l20: l20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-system-load = <200000>; + regulator-allow-set-load; + regulator-boot-on; + }; + + pm8941_l21: l21 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; - interrupt-parent = <&tlmm>; - interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + pm8941_l22: l22 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&fuelgauge_pin>; + pm8941_l23: l23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; - maxim,alert-low-soc-level = <2>; + pm8941_l24: l24 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + regulator-boot-on; }; }; +}; - i2c@f9924000 { - status = "okay"; +&sdhc_1 { + status = "okay"; - clock-frequency = <355000>; - qcom,src-freq = <50000000>; + vmmc-supply = <&pm8941_l20>; + vqmmc-supply = <&pm8941_s3>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default"; + pinctrl-0 = <&sdhc1_pin_a>; +}; - synaptics@70 { - compatible = "syna,rmi4-i2c"; - reg = <0x70>; +&sdhc_2 { + status = "okay"; - interrupts-extended = <&tlmm 5 IRQ_TYPE_EDGE_FALLING>; - vdd-supply = <&pm8941_l22>; - vio-supply = <&pm8941_lvs3>; + max-frequency = <100000000>; + vmmc-supply = <&vreg_wlan>; + vqmmc-supply = <&pm8941_s3>; + non-removable; - pinctrl-names = "default"; - pinctrl-0 = <&touch_pin>; + pinctrl-names = "default"; + pinctrl-0 = <&sdhc2_pin_a>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <1>; + #size-cells = <0>; - rmi4-f01@1 { - reg = <0x1>; - syna,nosleep-mode = <1>; - }; + bcrmf@1 { + compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; + reg = <1>; - rmi4-f12@12 { - reg = <0x12>; - syna,sensor-type = <1>; - }; + brcm,drive-strength = <10>; + + pinctrl-names = "default"; + pinctrl-0 = <&wlan_sleep_clk_pin>; + }; +}; + +&tlmm { + sdhc1_pin_a: sdhc1-pin-active { + clk { + pins = "sdc1_clk"; + drive-strength = <16>; + bias-disable; + }; + + cmd-data { + pins = "sdc1_cmd", "sdc1_data"; + drive-strength = <10>; + bias-pull-up; }; }; - i2c@f9925000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_pins>; - clock-frequency = <100000>; - qcom,src-freq = <50000000>; + sdhc2_pin_a: sdhc2-pin-active { + clk { + pins = "sdc2_clk"; + drive-strength = <6>; + bias-disable; + }; - avago_apds993@39 { - compatible = "avago,apds9930"; - reg = <0x39>; - interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; - vdd-supply = <&pm8941_l17>; - vddio-supply = <&pm8941_lvs1>; - led-max-microamp = <100000>; - amstaos,proximity-diodes = <0>; + cmd-data { + pins = "sdc2_cmd", "sdc2_data"; + drive-strength = <6>; + bias-pull-up; }; }; - usb@f9a55000 { - status = "okay"; + i2c1_pins: i2c1 { + mux { + pins = "gpio2", "gpio3"; + function = "blsp_i2c1"; - phys = <&usb_hs1_phy>; - phy-select = <&tcsr 0xb000 0>; + drive-strength = <2>; + bias-disable; + }; + }; - extcon = <&charger>, <&usb_id>; - vbus-supply = <&usb_otg_vbus>; + i2c2_pins: i2c2 { + mux { + pins = "gpio6", "gpio7"; + function = "blsp_i2c2"; - hnp-disable; - srp-disable; - adp-disable; + drive-strength = <2>; + bias-disable; + }; + }; - ulpi { - phy@a { - status = "okay"; + i2c3_pins: i2c3 { + mux { + pins = "gpio10", "gpio11"; + function = "blsp_i2c3"; + drive-strength = <2>; + bias-disable; + }; + }; - v1p8-supply = <&pm8941_l6>; - v3p3-supply = <&pm8941_l24>; + i2c11_pins: i2c11 { + mux { + pins = "gpio83", "gpio84"; + function = "blsp_i2c11"; - qcom,init-seq = /bits/ 8 <0x1 0x64>; - }; + drive-strength = <2>; + bias-disable; }; }; - mdss@fd900000 { - status = "okay"; + i2c12_pins: i2c12 { + mux { + pins = "gpio87", "gpio88"; + function = "blsp_i2c12"; + drive-strength = <2>; + bias-disable; + }; + }; - mdp@fd900000 { - status = "okay"; + mpu6515_pin: mpu6515 { + irq { + pins = "gpio73"; + function = "gpio"; + bias-disable; + input-enable; }; + }; - dsi@fd922800 { - status = "okay"; + touch_pin: touch { + int { + pins = "gpio5"; + function = "gpio"; - vdda-supply = <&pm8941_l2>; - vdd-supply = <&pm8941_lvs3>; - vddio-supply = <&pm8941_l12>; + drive-strength = <2>; + bias-disable; + input-enable; + }; - #address-cells = <1>; - #size-cells = <0>; + reset { + pins = "gpio8"; + function = "gpio"; - ports { - port@1 { - endpoint { - remote-endpoint = <&panel_in>; - data-lanes = <0 1 2 3>; - }; - }; - }; + drive-strength = <2>; + bias-pull-up; + }; + }; - panel: panel@0 { - reg = <0>; - compatible = "lg,acx467akm-7"; + panel_pin: panel { + te { + pins = "gpio12"; + function = "mdp_vsync"; - pinctrl-names = "default"; - pinctrl-0 = <&panel_pin>; + drive-strength = <2>; + bias-disable; + }; + }; - port { - panel_in: endpoint { - remote-endpoint = <&dsi0_out>; - }; - }; - }; + bt_pin: bt { + hostwake { + pins = "gpio42"; + function = "gpio"; }; - dsi-phy@fd922a00 { - status = "okay"; + devwake { + pins = "gpio62"; + function = "gpio"; + }; - vddio-supply = <&pm8941_l12>; + shutdown { + pins = "gpio41"; + function = "gpio"; }; }; -}; -&spmi_bus { - pm8941@0 { - gpios@c000 { - gpio_keys_pin_a: gpio-keys-active { - pins = "gpio2", "gpio3"; - function = "normal"; + blsp2_uart4_pin_a: blsp2-uart4-pin-active { + tx { + pins = "gpio53"; + function = "blsp_uart10"; - bias-pull-up; - power-source = <PM8941_GPIO_S3>; - }; - - fuelgauge_pin: fuelgauge-int { - pins = "gpio9"; - function = "normal"; + drive-strength = <2>; + bias-disable; + }; - bias-disable; - input-enable; - power-source = <PM8941_GPIO_S3>; - }; + rx { + pins = "gpio54"; + function = "blsp_uart10"; - wlan_sleep_clk_pin: wl-sleep-clk { - pins = "gpio16"; - function = "func2"; + drive-strength = <2>; + bias-pull-up; + }; - output-high; - power-source = <PM8941_GPIO_S3>; - }; + cts { + pins = "gpio55"; + function = "blsp_uart10"; - wlan_regulator_pin: wl-reg-active { - pins = "gpio17"; - function = "normal"; + drive-strength = <2>; + bias-pull-up; + }; - bias-disable; - power-source = <PM8941_GPIO_S3>; - }; + rts { + pins = "gpio56"; + function = "blsp_uart10"; - otg { - gpio-hog; - gpios = <35 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "otg-gpio"; - }; + drive-strength = <2>; + bias-disable; }; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 235/1095 ARM: dts: qcom-msm8974-klte: Use &labels
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 1d59524b9181e17110ae7b809c62a6a66f336fd6 ]
Use &labels to align with the style used in new DTS and apply tiny style fixes.
--- .../boot/dts/qcom-msm8974-samsung-klte.dts | 1202 ++++++++--------- arch/arm/boot/dts/qcom-msm8974.dtsi | 4 +- 2 files changed, 585 insertions(+), 621 deletions(-)
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +583 -619
@@ -13,7 +13,7 @@ / { aliases { serial0 = &blsp1_uart1; mmc0 = &sdhc_1; /* SDC1 eMMC slot */ - mmc1 = &sdhc_2; /* SDC2 SD card slot */ + mmc1 = &sdhc_3; /* SDC2 SD card slot */ }; chosen {
@@ -52,197 +52,6 @@ volume-up { }; }; - smd { - rpm { - rpm-requests { - pma8084-regulators { - compatible = "qcom,rpm-pma8084-regulators"; - status = "okay"; - - pma8084_s1: s1 { - regulator-min-microvolt = <675000>; - regulator-max-microvolt = <1050000>; - regulator-always-on; - }; - - pma8084_s2: s2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - pma8084_s3: s3 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - }; - - pma8084_s4: s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - pma8084_s5: s5 { - regulator-min-microvolt = <2150000>; - regulator-max-microvolt = <2150000>; - }; - - pma8084_s6: s6 { - regulator-min-microvolt = <1050000>; - regulator-max-microvolt = <1050000>; - }; - - pma8084_l1: l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - pma8084_l2: l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - pma8084_l3: l3 { - regulator-min-microvolt = <1050000>; - regulator-max-microvolt = <1200000>; - }; - - pma8084_l4: l4 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1225000>; - }; - - pma8084_l5: l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - pma8084_l6: l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - pma8084_l7: l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - pma8084_l8: l8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - pma8084_l9: l9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - pma8084_l10: l10 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - pma8084_l11: l11 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - }; - - pma8084_l12: l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; - - pma8084_l13: l13 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - pma8084_l14: l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - pma8084_l15: l15 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - pma8084_l16: l16 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - pma8084_l17: l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - pma8084_l18: l18 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - pma8084_l19: l19 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - pma8084_l20: l20 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - pma8084_l21: l21 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - pma8084_l22: l22 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3300000>; - }; - - pma8084_l23: l23 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - pma8084_l24: l24 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - pma8084_l25: l25 { - regulator-min-microvolt = <2100000>; - regulator-max-microvolt = <2100000>; - }; - - pma8084_l26: l26 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2050000>; - }; - - pma8084_l27: l27 { - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1225000>; - }; - - pma8084_lvs1: lvs1 {}; - pma8084_lvs2: lvs2 {}; - pma8084_lvs3: lvs3 {}; - pma8084_lvs4: lvs4 {}; - - pma8084_5vs1: 5vs1 {}; - }; - }; - }; - }; - i2c-gpio-touchkey { compatible = "i2c-gpio"; #address-cells = <1>;
@@ -347,562 +156,717 @@ vreg_panel: panel-regulator { }; /delete-node/ vreg-boost; - - adsp-pil { - cx-supply = <&pma8084_s2>; - }; }; -&soc { - serial@f991e000 { - status = "okay"; - }; +&blsp1_i2c2 { + status = "okay"; - /* blsp2_uart2 */ - serial@f995e000 { - status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&blsp2_uart2_pins_active>; - pinctrl-1 = <&blsp2_uart2_pins_sleep>; + touchscreen@20 { + compatible = "syna,rmi4-i2c"; + reg = <0x20>; - bluetooth { - compatible = "brcm,bcm43540-bt"; - max-speed = <3000000>; - pinctrl-names = "default"; - pinctrl-0 = <&bt_pins>; - device-wakeup-gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&gpio_expander 9 GPIO_ACTIVE_HIGH>; - interrupt-parent = <&tlmm>; - interrupts = <75 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "host-wakeup"; - }; - }; + interrupt-parent = <&pma8084_gpios>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; - pinctrl@fd510000 { - blsp2_uart2_pins_active: blsp2-uart2-pins-active { - pins = "gpio45", "gpio46", "gpio47", "gpio48"; - function = "blsp_uart8"; - drive-strength = <8>; - bias-disable; + vdd-supply = <&max77826_ldo13>; + vio-supply = <&pma8084_lvs2>; + + pinctrl-names = "default"; + pinctrl-0 = <&touch_pin>; + + syna,startup-delay-ms = <100>; + + #address-cells = <1>; + #size-cells = <0>; + + rmi4-f01@1 { + reg = <0x1>; + syna,nosleep-mode = <1>; }; - blsp2_uart2_pins_sleep: blsp2-uart2-pins-sleep { - pins = "gpio45", "gpio46", "gpio47", "gpio48"; - function = "gpio"; - drive-strength = <2>; - bias-pull-down; + rmi4-f12@12 { + reg = <0x12>; + syna,sensor-type = <1>; }; + }; +}; + +&blsp1_i2c6 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c6_pins>; - bt_pins: bt-pins { - hostwake { - pins = "gpio75"; - function = "gpio"; - drive-strength = <16>; - input-enable; + pmic@60 { + reg = <0x60>; + compatible = "maxim,max77826"; + + regulators { + max77826_ldo1: LDO1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; }; - devwake { - pins = "gpio91"; - function = "gpio"; - drive-strength = <2>; + max77826_ldo2: LDO2 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; }; - }; - sdhc1_pin_a: sdhc1-pin-active { - clk { - pins = "sdc1_clk"; - drive-strength = <4>; - bias-disable; + max77826_ldo3: LDO3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; }; - cmd-data { - pins = "sdc1_cmd", "sdc1_data"; - drive-strength = <4>; - bias-pull-up; + max77826_ldo4: LDO4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - }; - sdhc2_pin_a: sdhc2-pin-active { - clk-cmd-data { - pins = "gpio35", "gpio36", "gpio37", "gpio38", - "gpio39", "gpio40"; - function = "sdc3"; - drive-strength = <8>; - bias-disable; + max77826_ldo5: LDO5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - }; - sdhc2_cd_pin: sdhc2-cd { - pins = "gpio62"; - function = "gpio"; + max77826_ldo6: LDO6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; - drive-strength = <2>; - bias-disable; - }; + max77826_ldo7: LDO7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - sdhc3_pin_a: sdhc3-pin-active { - clk { - pins = "sdc2_clk"; - drive-strength = <6>; - bias-disable; + max77826_ldo8: LDO8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; }; - cmd-data { - pins = "sdc2_cmd", "sdc2_data"; - drive-strength = <6>; - bias-pull-up; + max77826_ldo9: LDO9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - }; - i2c2_pins: i2c2 { - mux { - pins = "gpio6", "gpio7"; - function = "blsp_i2c2"; + max77826_ldo10: LDO10 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2950000>; + }; - drive-strength = <2>; - bias-disable; + max77826_ldo11: LDO11 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2950000>; }; - }; - i2c6_pins: i2c6 { - mux { - pins = "gpio29", "gpio30"; - function = "blsp_i2c6"; + max77826_ldo12: LDO12 { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <3300000>; + }; - drive-strength = <2>; - bias-disable; + max77826_ldo13: LDO13 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; }; - }; - i2c12_pins: i2c12 { - mux { - pins = "gpio87", "gpio88"; - function = "blsp_i2c12"; + max77826_ldo14: LDO14 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; - drive-strength = <2>; - bias-disable; + max77826_ldo15: LDO15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - }; - i2c_touchkey_pins: i2c-touchkey { - mux { - pins = "gpio95", "gpio96"; - function = "gpio"; - input-enable; - bias-pull-up; + max77826_buck: BUCK { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; }; - }; - i2c_led_gpioex_pins: i2c-led-gpioex { - mux { - pins = "gpio120", "gpio121"; - function = "gpio"; - input-enable; - bias-pull-down; + max77826_buckboost: BUCKBOOST { + regulator-min-microvolt = <3400000>; + regulator-max-microvolt = <3400000>; }; }; + }; +}; - gpioex_pin: gpioex { - res { - pins = "gpio145"; - function = "gpio"; +&blsp1_uart2 { + status = "okay"; +}; - bias-pull-up; - drive-strength = <2>; - }; - }; +&blsp2_i2c6 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c12_pins>; + + fuelgauge@36 { + compatible = "maxim,max17048"; + reg = <0x36>; + + maxim,double-soc; + maxim,rcomp = /bits/ 8 <0x56>; + + interrupt-parent = <&pma8084_gpios>; + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&fuelgauge_pin>; + }; +}; - wifi_pin: wifi { - int { - pins = "gpio92"; - function = "gpio"; +&blsp2_uart2 { + status = "okay"; - input-enable; - bias-pull-down; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&blsp2_uart2_pins_active>; + pinctrl-1 = <&blsp2_uart2_pins_sleep>; + + bluetooth { + compatible = "brcm,bcm43540-bt"; + max-speed = <3000000>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_pins>; + device-wakeup-gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio_expander 9 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&tlmm>; + interrupts = <75 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "host-wakeup"; + }; +}; + +&dsi0 { + status = "okay"; + + vdda-supply = <&pma8084_l2>; + vdd-supply = <&pma8084_l22>; + vddio-supply = <&pma8084_l12>; + + panel: panel@0 { + reg = <0>; + compatible = "samsung,s6e3fa2"; + + pinctrl-names = "default"; + pinctrl-0 = <&panel_te_pin &panel_rst_pin>; + + iovdd-supply = <&pma8084_lvs4>; + vddr-supply = <&vreg_panel>; + + reset-gpios = <&pma8084_gpios 17 GPIO_ACTIVE_LOW>; + te-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi0_out>; }; }; + }; +}; - panel_te_pin: panel { - te { - pins = "gpio12"; - function = "mdp_vsync"; +&dsi0_out { + remote-endpoint = <&panel_in>; + data-lanes = <0 1 2 3>; +}; - drive-strength = <2>; - bias-disable; - }; +&dsi0_phy { + status = "okay"; + + vddio-supply = <&pma8084_l12>; +}; + +&gpu { + status = "okay"; +}; + +&mdss { + status = "okay"; +}; + +&otg { + status = "okay"; + + phys = <&usb_hs1_phy>; + phy-select = <&tcsr 0xb000 0>; + + hnp-disable; + srp-disable; + adp-disable; + + ulpi { + phy@a { + status = "okay"; + + v1p8-supply = <&pma8084_l6>; + v3p3-supply = <&pma8084_l24>; + + qcom,init-seq = /bits/ 8 <0x1 0x64>; }; }; +}; - sdhci@f9824900 { - status = "okay"; +&pma8084_gpios { + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio2", "gpio3", "gpio5"; + function = "normal"; - vmmc-supply = <&pma8084_l20>; - vqmmc-supply = <&pma8084_s4>; + bias-pull-up; + power-source = <PMA8084_GPIO_S4>; + }; - bus-width = <8>; - non-removable; + touchkey_pin: touchkey-int-pin { + pins = "gpio6"; + function = "normal"; + bias-disable; + input-enable; + power-source = <PMA8084_GPIO_S4>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc1_pin_a>; + touch_pin: touchscreen-int-pin { + pins = "gpio8"; + function = "normal"; + bias-disable; + input-enable; + power-source = <PMA8084_GPIO_S4>; }; - sdhci@f9864900 { - status = "okay"; + panel_en_pin: panel-en-pin { + pins = "gpio14"; + function = "normal"; + bias-pull-up; + power-source = <PMA8084_GPIO_S4>; + qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; + }; - max-frequency = <100000000>; + wlan_sleep_clk_pin: wlan-sleep-clk-pin { + pins = "gpio16"; + function = "func2"; - vmmc-supply = <&pma8084_l21>; - vqmmc-supply = <&pma8084_l13>; + output-high; + power-source = <PMA8084_GPIO_S4>; + qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>; + }; - bus-width = <4>; + panel_rst_pin: panel-rst-pin { + pins = "gpio17"; + function = "normal"; + bias-disable; + power-source = <PMA8084_GPIO_S4>; + qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; + }; - /* cd-gpio is intentionally disabled. If enabled, an SD card - * present during boot is not initialized correctly. Without - * cd-gpios the driver resorts to polling, so hotplug works. - */ - pinctrl-names = "default"; - pinctrl-0 = <&sdhc2_pin_a /* &sdhc2_cd_pin */>; - // cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; + fuelgauge_pin: fuelgauge-int-pin { + pins = "gpio21"; + function = "normal"; + bias-disable; + input-enable; + power-source = <PMA8084_GPIO_S4>; }; +}; - sdhci@f98a4900 { - status = "okay"; +&remoteproc_adsp { + cx-supply = <&pma8084_s2>; +}; - #address-cells = <1>; - #size-cells = <0>; +&remoteproc_mss { + cx-supply = <&pma8084_s2>; + mss-supply = <&pma8084_s6>; + mx-supply = <&pma8084_s1>; + pll-supply = <&pma8084_l12>; +}; - max-frequency = <100000000>; +&rpm_requests { + pma8084-regulators { + compatible = "qcom,rpm-pma8084-regulators"; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc3_pin_a>; + pma8084_s1: s1 { + regulator-min-microvolt = <675000>; + regulator-max-microvolt = <1050000>; + regulator-always-on; + }; - vmmc-supply = <&vreg_wlan>; - vqmmc-supply = <&pma8084_s4>; + pma8084_s2: s2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1050000>; + }; - bus-width = <4>; - non-removable; + pma8084_s3: s3 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + }; - wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; + pma8084_s4: s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - interrupt-parent = <&tlmm>; - interrupts = <92 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "host-wake"; + pma8084_s5: s5 { + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&wlan_sleep_clk_pin &wifi_pin>; + pma8084_s6: s6 { + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; }; - }; - usb@f9a55000 { - status = "okay"; + pma8084_l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; - phys = <&usb_hs1_phy>; - phy-select = <&tcsr 0xb000 0>; - /*extcon = <&smbb>, <&usb_id>;*/ - /*vbus-supply = <&chg_otg>;*/ + pma8084_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; - hnp-disable; - srp-disable; - adp-disable; + pma8084_l3: l3 { + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1200000>; + }; - ulpi { - phy@a { - status = "okay"; + pma8084_l4: l4 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1225000>; + }; - v1p8-supply = <&pma8084_l6>; - v3p3-supply = <&pma8084_l24>; + pma8084_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - /*extcon = <&smbb>;*/ - qcom,init-seq = /bits/ 8 <0x1 0x64>; - }; + pma8084_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - }; - i2c@f9924000 { - status = "okay"; + pma8084_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins>; + pma8084_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - touchscreen@20 { - compatible = "syna,rmi4-i2c"; - reg = <0x20>; + pma8084_l9: l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - interrupt-parent = <&pma8084_gpios>; - interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + pma8084_l10: l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - vdd-supply = <&max77826_ldo13>; - vio-supply = <&pma8084_lvs2>; + pma8084_l11: l11 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&touch_pin>; + pma8084_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; - syna,startup-delay-ms = <100>; + pma8084_l13: l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - #address-cells = <1>; - #size-cells = <0>; + pma8084_l14: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - rmi4-f01@1 { - reg = <0x1>; - syna,nosleep-mode = <1>; - }; + pma8084_l15: l15 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; - rmi4-f12@12 { - reg = <0x12>; - syna,sensor-type = <1>; - }; + pma8084_l16: l16 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; }; - }; - i2c@f9928000 { - status = "okay"; + pma8084_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&i2c6_pins>; - - pmic@60 { - reg = <0x60>; - compatible = "maxim,max77826"; - - regulators { - max77826_ldo1: LDO1 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - max77826_ldo2: LDO2 { - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - }; - - max77826_ldo3: LDO3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - max77826_ldo4: LDO4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - max77826_ldo5: LDO5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - max77826_ldo6: LDO6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - max77826_ldo7: LDO7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - max77826_ldo8: LDO8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - max77826_ldo9: LDO9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - max77826_ldo10: LDO10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2950000>; - }; - - max77826_ldo11: LDO11 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2950000>; - }; - - max77826_ldo12: LDO12 { - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <3300000>; - }; - - max77826_ldo13: LDO13 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - max77826_ldo14: LDO14 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - max77826_ldo15: LDO15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - max77826_buck: BUCK { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - max77826_buckboost: BUCKBOOST { - regulator-min-microvolt = <3400000>; - regulator-max-microvolt = <3400000>; - }; - }; + pma8084_l18: l18 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; }; - }; - i2c@f9968000 { - status = "okay"; + pma8084_l19: l19 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&i2c12_pins>; + pma8084_l20: l20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-system-load = <200000>; + regulator-allow-set-load; + }; - fuelgauge@36 { - compatible = "maxim,max17048"; - reg = <0x36>; + pma8084_l21: l21 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-system-load = <200000>; + regulator-allow-set-load; + }; - maxim,double-soc; - maxim,rcomp = /bits/ 8 <0x56>; + pma8084_l22: l22 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; - interrupt-parent = <&pma8084_gpios>; - interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + pma8084_l23: l23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&fuelgauge_pin>; + pma8084_l24: l24 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; }; + + pma8084_l25: l25 { + regulator-min-microvolt = <2100000>; + regulator-max-microvolt = <2100000>; + }; + + pma8084_l26: l26 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2050000>; + }; + + pma8084_l27: l27 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1225000>; + }; + + pma8084_lvs1: lvs1 {}; + pma8084_lvs2: lvs2 {}; + pma8084_lvs3: lvs3 {}; + pma8084_lvs4: lvs4 {}; + + pma8084_5vs1: 5vs1 {}; }; +}; + +&sdhc_1 { + status = "okay"; + + vmmc-supply = <&pma8084_l20>; + vqmmc-supply = <&pma8084_s4>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc1_pin_a>; +}; + +&sdhc_2 { + status = "okay"; + max-frequency = <100000000>; - adreno@fdb00000 { - status = "ok"; + pinctrl-names = "default"; + pinctrl-0 = <&sdhc3_pin_a>; + + vmmc-supply = <&vreg_wlan>; + vqmmc-supply = <&pma8084_s4>; + + non-removable; + + #address-cells = <1>; + #size-cells = <0>; + + wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + + interrupt-parent = <&tlmm>; + interrupts = <92 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "host-wake"; + + pinctrl-names = "default"; + pinctrl-0 = <&wlan_sleep_clk_pin &wifi_pin>; }; +}; - mdss@fd900000 { - status = "ok"; +&sdhc_3 { + status = "okay"; + max-frequency = <100000000>; + + vmmc-supply = <&pma8084_l21>; + vqmmc-supply = <&pma8084_l13>; + + /* + * cd-gpio is intentionally disabled. If enabled, an SD card + * present during boot is not initialized correctly. Without + * cd-gpios the driver resorts to polling, so hotplug works. + */ + pinctrl-names = "default"; + pinctrl-0 = <&sdhc2_pin_a /* &sdhc2_cd_pin */>; + /* cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; */ +}; - mdp@fd900000 { - status = "ok"; - }; +&tlmm { + blsp2_uart2_pins_active: blsp2-uart2-pins-active { + pins = "gpio45", "gpio46", "gpio47", "gpio48"; + function = "blsp_uart8"; + drive-strength = <8>; + bias-disable; + }; - dsi@fd922800 { - status = "ok"; + blsp2_uart2_pins_sleep: blsp2-uart2-pins-sleep { + pins = "gpio45", "gpio46", "gpio47", "gpio48"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; - vdda-supply = <&pma8084_l2>; - vdd-supply = <&pma8084_l22>; - vddio-supply = <&pma8084_l12>; + bt_pins: bt-pins { + hostwake { + pins = "gpio75"; + function = "gpio"; + drive-strength = <16>; + input-enable; + }; - #address-cells = <1>; - #size-cells = <0>; + devwake { + pins = "gpio91"; + function = "gpio"; + drive-strength = <2>; + }; + }; - ports { - port@1 { - endpoint { - remote-endpoint = <&panel_in>; - data-lanes = <0 1 2 3>; - }; - }; - }; + sdhc1_pin_a: sdhc1-pin-active { + clk { + pins = "sdc1_clk"; + drive-strength = <4>; + bias-disable; + }; - panel: panel@0 { - reg = <0>; - compatible = "samsung,s6e3fa2"; + cmd-data { + pins = "sdc1_cmd", "sdc1_data"; + drive-strength = <4>; + bias-pull-up; + }; + }; + + sdhc2_pin_a: sdhc2-pin-active { + clk-cmd-data { + pins = "gpio35", "gpio36", "gpio37", "gpio38", + "gpio39", "gpio40"; + function = "sdc3"; + drive-strength = <8>; + bias-disable; + }; + }; - pinctrl-names = "default"; - pinctrl-0 = <&panel_te_pin &panel_rst_pin>; + sdhc2_cd_pin: sdhc2-cd { + pins = "gpio62"; + function = "gpio"; - iovdd-supply = <&pma8084_lvs4>; - vddr-supply = <&vreg_panel>; + drive-strength = <2>; + bias-disable; + }; - reset-gpios = <&pma8084_gpios 17 GPIO_ACTIVE_LOW>; - te-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; + sdhc3_pin_a: sdhc3-pin-active { + clk { + pins = "sdc2_clk"; + drive-strength = <6>; + bias-disable; + }; - port { - panel_in: endpoint { - remote-endpoint = <&dsi0_out>; - }; - }; - }; + cmd-data { + pins = "sdc2_cmd", "sdc2_data"; + drive-strength = <6>; + bias-pull-up; }; + }; - dsi-phy@fd922a00 { - status = "ok"; + i2c2_pins: i2c2 { + mux { + pins = "gpio6", "gpio7"; + function = "blsp_i2c2"; - vddio-supply = <&pma8084_l12>; + drive-strength = <2>; + bias-disable; }; }; - remoteproc@fc880000 { - cx-supply = <&pma8084_s2>; - mss-supply = <&pma8084_s6>; - mx-supply = <&pma8084_s1>; - pll-supply = <&pma8084_l12>; + i2c6_pins: i2c6 { + mux { + pins = "gpio29", "gpio30"; + function = "blsp_i2c6"; + + drive-strength = <2>; + bias-disable; + }; }; -}; -&spmi_bus { - pma8084@0 { - gpios@c000 { - gpio_keys_pin_a: gpio-keys-active { - pins = "gpio2", "gpio3", "gpio5"; - function = "normal"; + i2c12_pins: i2c12 { + mux { + pins = "gpio87", "gpio88"; + function = "blsp_i2c12"; - bias-pull-up; - power-source = <PMA8084_GPIO_S4>; - }; + drive-strength = <2>; + bias-disable; + }; + }; - touchkey_pin: touchkey-int-pin { - pins = "gpio6"; - function = "normal"; - bias-disable; - input-enable; - power-source = <PMA8084_GPIO_S4>; - }; + i2c_touchkey_pins: i2c-touchkey { + mux { + pins = "gpio95", "gpio96"; + function = "gpio"; + input-enable; + bias-pull-up; + }; + }; - touch_pin: touchscreen-int-pin { - pins = "gpio8"; - function = "normal"; - bias-disable; - input-enable; - power-source = <PMA8084_GPIO_S4>; - }; + i2c_led_gpioex_pins: i2c-led-gpioex { + mux { + pins = "gpio120", "gpio121"; + function = "gpio"; + input-enable; + bias-pull-down; + }; + }; - panel_en_pin: panel-en-pin { - pins = "gpio14"; - function = "normal"; - bias-pull-up; - power-source = <PMA8084_GPIO_S4>; - qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; - }; + gpioex_pin: gpioex { + res { + pins = "gpio145"; + function = "gpio"; - wlan_sleep_clk_pin: wlan-sleep-clk-pin { - pins = "gpio16"; - function = "func2"; + bias-pull-up; + drive-strength = <2>; + }; + }; - output-high; - power-source = <PMA8084_GPIO_S4>; - qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>; - }; + wifi_pin: wifi { + int { + pins = "gpio92"; + function = "gpio"; - panel_rst_pin: panel-rst-pin { - pins = "gpio17"; - function = "normal"; - bias-disable; - power-source = <PMA8084_GPIO_S4>; - qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; - }; + input-enable; + bias-pull-down; + }; + }; + panel_te_pin: panel { + te { + pins = "gpio12"; + function = "mdp_vsync"; - fuelgauge_pin: fuelgauge-int-pin { - pins = "gpio21"; - function = "normal"; - bias-disable; - input-enable; - power-source = <PMA8084_GPIO_S4>; - }; + drive-strength = <2>; + bias-disable; }; }; };
arch/arm/boot/dts/qcom-msm8974.dtsi +2 -2
@@ -341,7 +341,7 @@ timer { clock-frequency = <19200000>; }; - adsp-pil { + remoteproc_adsp: adsp-pil { compatible = "qcom,msm8974-adsp-pil"; interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>,
@@ -842,7 +842,7 @@ rng@f9bff000 { clock-names = "core"; }; - remoteproc@fc880000 { + remoteproc_mss: remoteproc@fc880000 { compatible = "qcom,msm8974-mss-pil"; reg = <0xfc880000 0x100>, <0xfc820000 0x020>; reg-names = "qdsp6", "rmb";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 236/1095 ARM: dts: qcom-msm8974-{"hon","am"}ami: Commonize and modernize the DTs
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 5c554c2d67a8c6c43a1fb542cbc73c33ff04c344 ]
Sony Xperia Z1 and Z1 compact are almost identical, and that shows in their DTs. Commonize the repeating parts and modernize the DTs to use labels.
As a bonus, Z1C gains touchscreen support in this commit, as it was present on Z1 already.
--- .../dts/qcom-msm8974-sony-xperia-amami.dts | 432 +--------------- .../dts/qcom-msm8974-sony-xperia-honami.dts | 479 +----------------- .../dts/qcom-msm8974-sony-xperia-rhine.dtsi | 449 ++++++++++++++++ arch/arm/boot/dts/qcom-pm8941.dtsi | 2 +- 4 files changed, 456 insertions(+), 906 deletions(-) create mode 100644 arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi
arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dts +5 -427
@@ -1,435 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 -#include "qcom-msm8974.dtsi" -#include "qcom-pm8841.dtsi" -#include "qcom-pm8941.dtsi" -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> -#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> +#include "qcom-msm8974-sony-xperia-rhine.dtsi" / { model = "Sony Xperia Z1 Compact"; compatible = "sony,xperia-amami", "qcom,msm8974"; - - aliases { - serial0 = &blsp1_uart2; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - - gpio-keys { - compatible = "gpio-keys"; - - pinctrl-names = "default"; - pinctrl-0 = <&gpio_keys_pin_a>; - - volume-down { - label = "volume_down"; - gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_VOLUMEDOWN>; - }; - - camera-snapshot { - label = "camera_snapshot"; - gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_CAMERA>; - }; - - camera-focus { - label = "camera_focus"; - gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_CAMERA_FOCUS>; - }; - - volume-up { - label = "volume_up"; - gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_VOLUMEUP>; - }; - }; - - memory@0 { - reg = <0 0x40000000>, <0x40000000 0x40000000>; - device_type = "memory"; - }; - - smd { - rpm { - rpm-requests { - pm8841-regulators { - s1 { - regulator-min-microvolt = <675000>; - regulator-max-microvolt = <1050000>; - }; - - s2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - s3 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - s4 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - }; - - pm8941-regulators { - vdd_l1_l3-supply = <&pm8941_s1>; - vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; - vdd_l4_l11-supply = <&pm8941_s1>; - vdd_l5_l7-supply = <&pm8941_s2>; - vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; - vdd_l9_l10_l17_l22-supply = <&vreg_boost>; - vdd_l13_l20_l23_l24-supply = <&vreg_boost>; - vdd_l21-supply = <&vreg_boost>; - - s1 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - regulator-always-on; - regulator-boot-on; - }; - - s2 { - regulator-min-microvolt = <2150000>; - regulator-max-microvolt = <2150000>; - regulator-boot-on; - }; - - s3 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - }; - - s4 { - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - - regulator-always-on; - regulator-boot-on; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l11 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1350000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l13 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l15 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l16 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l17 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l18 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l19 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l20 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-allow-set-load; - regulator-boot-on; - regulator-system-load = <200000>; - }; - - l21 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l22 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l23 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l24 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - - regulator-boot-on; - }; - }; - }; - }; - }; }; -&soc { - sdhci@f9824900 { - status = "okay"; - - vmmc-supply = <&pm8941_l20>; - vqmmc-supply = <&pm8941_s3>; - - bus-width = <8>; - non-removable; - - pinctrl-names = "default"; - pinctrl-0 = <&sdhc1_pin_a>; - }; - - sdhci@f98a4900 { - status = "okay"; - - bus-width = <4>; - - vmmc-supply = <&pm8941_l21>; - vqmmc-supply = <&pm8941_l13>; - - cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; - - pinctrl-names = "default"; - pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; - }; - - serial@f991e000 { - status = "okay"; - - pinctrl-names = "default"; - pinctrl-0 = <&blsp1_uart2_pin_a>; - }; - - - pinctrl@fd510000 { - blsp1_uart2_pin_a: blsp1-uart2-pin-active { - rx { - pins = "gpio5"; - function = "blsp_uart2"; - - drive-strength = <2>; - bias-pull-up; - }; - - tx { - pins = "gpio4"; - function = "blsp_uart2"; - - drive-strength = <4>; - bias-disable; - }; - }; - - i2c2_pins: i2c2 { - mux { - pins = "gpio6", "gpio7"; - function = "blsp_i2c2"; - - drive-strength = <2>; - bias-disable; - }; - }; - - sdhc1_pin_a: sdhc1-pin-active { - clk { - pins = "sdc1_clk"; - drive-strength = <16>; - bias-disable; - }; - - cmd-data { - pins = "sdc1_cmd", "sdc1_data"; - drive-strength = <10>; - bias-pull-up; - }; - }; - - sdhc2_cd_pin_a: sdhc2-cd-pin-active { - pins = "gpio62"; - function = "gpio"; - - drive-strength = <2>; - bias-disable; - }; - - sdhc2_pin_a: sdhc2-pin-active { - clk { - pins = "sdc2_clk"; - drive-strength = <10>; - bias-disable; - }; - - cmd-data { - pins = "sdc2_cmd", "sdc2_data"; - drive-strength = <6>; - bias-pull-up; - }; - }; - }; - - dma-controller@f9944000 { - qcom,controlled-remotely; - }; - - usb@f9a55000 { - status = "okay"; - - phys = <&usb_hs1_phy>; - phy-select = <&tcsr 0xb000 0>; - extcon = <&smbb>, <&usb_id>; - vbus-supply = <&chg_otg>; - - hnp-disable; - srp-disable; - adp-disable; - - ulpi { - phy@a { - status = "okay"; - - v1p8-supply = <&pm8941_l6>; - v3p3-supply = <&pm8941_l24>; - - extcon = <&smbb>; - qcom,init-seq = /bits/ 8 <0x1 0x64>; - }; - }; - }; -}; - -&spmi_bus { - pm8941@0 { - charger@1000 { - qcom,fast-charge-safe-current = <1300000>; - qcom,fast-charge-current-limit = <1300000>; - qcom,dc-current-limit = <1300000>; - qcom,fast-charge-safe-voltage = <4400000>; - qcom,fast-charge-high-threshold-voltage = <4350000>; - qcom,fast-charge-low-threshold-voltage = <3400000>; - qcom,auto-recharge-threshold-voltage = <4200000>; - qcom,minimum-input-voltage = <4300000>; - }; - - gpios@c000 { - gpio_keys_pin_a: gpio-keys-active { - pins = "gpio2", "gpio3", "gpio4", "gpio5"; - function = "normal"; - - bias-pull-up; - power-source = <PM8941_GPIO_S3>; - }; - }; - - coincell@2800 { - status = "okay"; - qcom,rset-ohms = <2100>; - qcom,vset-millivolts = <3000>; - }; - }; - - pm8941@1 { - wled@d800 { - status = "okay"; - - qcom,cs-out; - qcom,current-limit = <20>; - qcom,current-boost-limit = <805>; - qcom,switching-freq = <1600>; - qcom,ovp = <29>; - qcom,num-strings = <2>; - }; - }; +&smbb { + qcom,fast-charge-safe-current = <1300000>; + qcom,fast-charge-current-limit = <1300000>; + qcom,dc-current-limit = <1300000>; };
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts +1 -478
485 lines not on this page · raw message
arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi new file +449 -0
449 lines not on this page · raw message
arch/arm/boot/dts/qcom-pm8941.dtsi +1 -1
@@ -131,7 +131,7 @@ pm8941_iadc: iadc@3600 { qcom,external-resistor-micro-ohms = <10000>; }; - coincell@2800 { + pm8941_coincell: coincell@2800 { compatible = "qcom,pm8941-coincell"; reg = <0x2800>; status = "disabled";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 237/1095 ARM: dts: qcom-msm8974-castor: Use &labels
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 598a1e333224e73ae8f078ed6aa8dcd416cfb490 ]
Use &labels to align with the style used in new DTS and apply tiny style fixes.
--- .../dts/qcom-msm8974-sony-xperia-castor.dts | 988 +++++++++--------- 1 file changed, 481 insertions(+), 507 deletions(-)
arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts +481 -507
@@ -53,186 +53,6 @@ volume-up { }; }; - smd { - rpm { - rpm-requests { - pm8941-regulators { - vdd_l1_l3-supply = <&pm8941_s1>; - vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; - vdd_l4_l11-supply = <&pm8941_s1>; - vdd_l5_l7-supply = <&pm8941_s2>; - vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; - vdd_l9_l10_l17_l22-supply = <&vreg_boost>; - vdd_l13_l20_l23_l24-supply = <&vreg_boost>; - vdd_l21-supply = <&vreg_boost>; - - s1 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - regulator-always-on; - regulator-boot-on; - }; - - s2 { - regulator-min-microvolt = <2150000>; - regulator-max-microvolt = <2150000>; - regulator-boot-on; - }; - - s3 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - - regulator-system-load = <154000>; - }; - - s4 { - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - - regulator-always-on; - regulator-boot-on; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l11 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1350000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l13 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l15 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l16 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l17 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l18 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l19 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l20 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-allow-set-load; - regulator-boot-on; - regulator-allow-set-load; - regulator-system-load = <500000>; - }; - - l21 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l22 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l23 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l24 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - - regulator-boot-on; - }; - }; - }; - }; - }; - vreg_bl_vddio: lcd-backlight-vddio { compatible = "regulator-fixed"; regulator-name = "vreg_bl_vddio";
@@ -277,447 +97,601 @@ vreg_wlan: wlan-regulator { }; }; -&soc { - sdhci@f9824900 { - status = "okay"; +&blsp1_uart2 { + status = "okay"; - vmmc-supply = <&pm8941_l20>; - vqmmc-supply = <&pm8941_s3>; - - bus-width = <8>; - non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&blsp1_uart2_pin_a>; +}; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc1_pin_a>; - }; +&blsp2_i2c2 { + status = "okay"; + clock-frequency = <355000>; - sdhci@f9864900 { - status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c8_pins>; - max-frequency = <100000000>; - non-removable; - vmmc-supply = <&vreg_wlan>; + synaptics@2c { + compatible = "syna,rmi4-i2c"; + reg = <0x2c>; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc3_pin_a>; + interrupt-parent = <&tlmm>; + interrupts = <86 IRQ_TYPE_EDGE_FALLING>; #address-cells = <1>; #size-cells = <0>; - bcrmf@1 { - compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; - reg = <1>; + vdd-supply = <&pm8941_l22>; + vio-supply = <&pm8941_lvs3>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_pin>; - brcm,drive-strength = <10>; + syna,startup-delay-ms = <10>; - pinctrl-names = "default"; - pinctrl-0 = <&wlan_sleep_clk_pin>; + rmi-f01@1 { + reg = <0x1>; + syna,nosleep = <1>; }; - }; - sdhci@f98a4900 { - status = "okay"; + rmi-f11@11 { + reg = <0x11>; + syna,f11-flip-x = <1>; + syna,sensor-type = <1>; + }; + }; +}; - bus-width = <4>; +&blsp2_i2c5 { + status = "okay"; + clock-frequency = <355000>; - vmmc-supply = <&pm8941_l21>; - vqmmc-supply = <&pm8941_l13>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c11_pins>; - cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; + lp8566_wled: backlight@2c { + compatible = "ti,lp8556"; + reg = <0x2c>; + power-supply = <&vreg_bl_vddio>; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; + bl-name = "backlight"; + dev-ctrl = /bits/ 8 <0x05>; + init-brt = /bits/ 8 <0x3f>; + rom_a0h { + rom-addr = /bits/ 8 <0xa0>; + rom-val = /bits/ 8 <0xff>; + }; + rom_a1h { + rom-addr = /bits/ 8 <0xa1>; + rom-val = /bits/ 8 <0x3f>; + }; + rom_a2h { + rom-addr = /bits/ 8 <0xa2>; + rom-val = /bits/ 8 <0x20>; + }; + rom_a3h { + rom-addr = /bits/ 8 <0xa3>; + rom-val = /bits/ 8 <0x5e>; + }; + rom_a4h { + rom-addr = /bits/ 8 <0xa4>; + rom-val = /bits/ 8 <0x02>; + }; + rom_a5h { + rom-addr = /bits/ 8 <0xa5>; + rom-val = /bits/ 8 <0x04>; + }; + rom_a6h { + rom-addr = /bits/ 8 <0xa6>; + rom-val = /bits/ 8 <0x80>; + }; + rom_a7h { + rom-addr = /bits/ 8 <0xa7>; + rom-val = /bits/ 8 <0xf7>; + }; + rom_a9h { + rom-addr = /bits/ 8 <0xa9>; + rom-val = /bits/ 8 <0x80>; + }; + rom_aah { + rom-addr = /bits/ 8 <0xaa>; + rom-val = /bits/ 8 <0x0f>; + }; + rom_aeh { + rom-addr = /bits/ 8 <0xae>; + rom-val = /bits/ 8 <0x0f>; + }; }; +}; + +&blsp2_uart1 { + status = "okay"; - serial@f991e000 { - status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&blsp2_uart7_pin_a>; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; pinctrl-names = "default"; - pinctrl-0 = <&blsp1_uart2_pin_a>; + pinctrl-0 = <&bt_host_wake_pin>, + <&bt_dev_wake_pin>, + <&bt_reg_on_pin>; + + host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>; + device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>; }; +}; - serial@f995d000 { - status = "ok"; +&otg { + status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&blsp2_uart7_pin_a>; + phys = <&usb_hs1_phy>; + phy-select = <&tcsr 0xb000 0>; + extcon = <&smbb>, <&usb_id>; + vbus-supply = <&chg_otg>; - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <3000000>; + hnp-disable; + srp-disable; + adp-disable; - pinctrl-names = "default"; - pinctrl-0 = <&bt_host_wake_pin>, - <&bt_dev_wake_pin>, - <&bt_reg_on_pin>; + ulpi { + phy@a { + status = "okay"; - host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>; - device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>; + v1p8-supply = <&pm8941_l6>; + v3p3-supply = <&pm8941_l24>; + + extcon = <&smbb>; + qcom,init-seq = /bits/ 8 <0x1 0x64>; }; }; +}; - usb@f9a55000 { - status = "okay"; +&pm8941_coincell { + status = "okay"; - phys = <&usb_hs1_phy>; - phy-select = <&tcsr 0xb000 0>; - extcon = <&smbb>, <&usb_id>; - vbus-supply = <&chg_otg>; + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; +}; - hnp-disable; - srp-disable; - adp-disable; +&pm8941_gpios { + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio2", "gpio5"; + function = "normal"; - ulpi { - phy@a { - status = "okay"; + bias-pull-up; + power-source = <PM8941_GPIO_S3>; + }; - v1p8-supply = <&pm8941_l6>; - v3p3-supply = <&pm8941_l24>; + bt_reg_on_pin: bt-reg-on { + pins = "gpio16"; + function = "normal"; - extcon = <&smbb>; - qcom,init-seq = /bits/ 8 <0x1 0x64>; - }; - }; + output-low; + power-source = <PM8941_GPIO_S3>; }; - pinctrl@fd510000 { - blsp1_uart2_pin_a: blsp1-uart2-pin-active { - rx { - pins = "gpio5"; - function = "blsp_uart2"; + wlan_sleep_clk_pin: wl-sleep-clk { + pins = "gpio17"; + function = "func2"; - drive-strength = <2>; - bias-pull-up; - }; + output-high; + power-source = <PM8941_GPIO_S3>; + }; - tx { - pins = "gpio4"; - function = "blsp_uart2"; + wlan_regulator_pin: wl-reg-active { + pins = "gpio18"; + function = "normal"; - drive-strength = <4>; - bias-disable; - }; - }; + bias-disable; + power-source = <PM8941_GPIO_S3>; + }; - blsp2_uart7_pin_a: blsp2-uart7-pin-active { - tx { - pins = "gpio41"; - function = "blsp_uart7"; + lcd_dcdc_en_pin_a: lcd-dcdc-en-active { + pins = "gpio20"; + function = "normal"; - drive-strength = <2>; - bias-disable; - }; + bias-disable; + power-source = <PM8941_GPIO_S3>; + input-disable; + output-low; + }; - rx { - pins = "gpio42"; - function = "blsp_uart7"; +}; - drive-strength = <2>; - bias-pull-up; - }; +&rpm_requests { + pm8941-regulators { + vdd_l1_l3-supply = <&pm8941_s1>; + vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; + vdd_l4_l11-supply = <&pm8941_s1>; + vdd_l5_l7-supply = <&pm8941_s2>; + vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; + vdd_l9_l10_l17_l22-supply = <&vreg_boost>; + vdd_l13_l20_l23_l24-supply = <&vreg_boost>; + vdd_l21-supply = <&vreg_boost>; + + pm8941_s1: s1 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; + }; - cts { - pins = "gpio43"; - function = "blsp_uart7"; + pm8941_s2: s2 { + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + regulator-boot-on; + }; - drive-strength = <2>; - bias-pull-up; - }; + pm8941_s3: s3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-system-load = <154000>; + regulator-always-on; + regulator-boot-on; + }; - rts { - pins = "gpio44"; - function = "blsp_uart7"; + pm8941_s4: s4 { + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; - drive-strength = <2>; - bias-disable; - }; + pm8941_l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + regulator-always-on; + regulator-boot-on; }; - i2c8_pins: i2c8 { - mux { - pins = "gpio47", "gpio48"; - function = "blsp_i2c8"; + pm8941_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; - drive-strength = <2>; - bias-disable; - }; + pm8941_l3: l3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; }; - i2c11_pins: i2c11 { - mux { - pins = "gpio83", "gpio84"; - function = "blsp_i2c11"; + pm8941_l4: l4 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; - drive-strength = <2>; - bias-disable; - }; + pm8941_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - lcd_backlight_en_pin_a: lcd-backlight-vddio { - pins = "gpio69"; - drive-strength = <10>; - output-low; - bias-disable; + pm8941_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; }; - sdhc1_pin_a: sdhc1-pin-active { - clk { - pins = "sdc1_clk"; - drive-strength = <16>; - bias-disable; - }; + pm8941_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; - cmd-data { - pins = "sdc1_cmd", "sdc1_data"; - drive-strength = <10>; - bias-pull-up; - }; + pm8941_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - sdhc2_cd_pin_a: sdhc2-cd-pin-active { - pins = "gpio62"; - function = "gpio"; + pm8941_l9: l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - drive-strength = <2>; - bias-disable; - }; + pm8941_l11: l11 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1350000>; + }; - sdhc2_pin_a: sdhc2-pin-active { - clk { - pins = "sdc2_clk"; - drive-strength = <6>; - bias-disable; - }; + pm8941_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; - cmd-data { - pins = "sdc2_cmd", "sdc2_data"; - drive-strength = <6>; - bias-pull-up; - }; + pm8941_l13: l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; }; - sdhc3_pin_a: sdhc3-pin-active { - clk { - pins = "gpio40"; - function = "sdc3"; + pm8941_l14: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - drive-strength = <10>; - bias-disable; - }; + pm8941_l15: l15 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; - cmd { - pins = "gpio39"; - function = "sdc3"; + pm8941_l16: l16 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; + + pm8941_l17: l17 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; - drive-strength = <10>; - bias-pull-up; - }; + pm8941_l18: l18 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; - data { - pins = "gpio35", "gpio36", "gpio37", "gpio38"; - function = "sdc3"; + pm8941_l19: l19 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; - drive-strength = <10>; - bias-pull-up; - }; + pm8941_l20: l20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-system-load = <500000>; + regulator-allow-set-load; + regulator-boot-on; }; - ts_int_pin: synaptics { - pin { - pins = "gpio86"; - function = "gpio"; + pm8941_l21: l21 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; - drive-strength = <2>; - bias-disable; - input-enable; - }; + pm8941_l22: l22 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; }; - bt_host_wake_pin: bt-host-wake { - pins = "gpio95"; - function = "gpio"; + pm8941_l23: l23 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; - drive-strength = <2>; - bias-disable; - output-low; + pm8941_l24: l24 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + regulator-boot-on; }; + }; +}; - bt_dev_wake_pin: bt-dev-wake { - pins = "gpio96"; - function = "gpio"; +&sdhc_1 { + status = "okay"; + + vmmc-supply = <&pm8941_l20>; + vqmmc-supply = <&pm8941_s3>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc1_pin_a>; +}; + +&sdhc_2 { + status = "okay"; + + vmmc-supply = <&pm8941_l21>; + vqmmc-supply = <&pm8941_l13>; + + cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; +}; + +&sdhc_3 { + status = "okay"; + + max-frequency = <100000000>; + vmmc-supply = <&vreg_wlan>; + non-removable; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc3_pin_a>; + + #address-cells = <1>; + #size-cells = <0>; + + bcrmf@1 { + compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; + reg = <1>; + + brcm,drive-strength = <10>; + + pinctrl-names = "default"; + pinctrl-0 = <&wlan_sleep_clk_pin>; + }; +}; + +&smbb { + qcom,fast-charge-safe-current = <1500000>; + qcom,fast-charge-current-limit = <1500000>; + qcom,dc-current-limit = <1800000>; + qcom,fast-charge-safe-voltage = <4400000>; + qcom,fast-charge-high-threshold-voltage = <4350000>; + qcom,fast-charge-low-threshold-voltage = <3400000>; + qcom,auto-recharge-threshold-voltage = <4200000>; + qcom,minimum-input-voltage = <4300000>; +}; + +&tlmm { + blsp1_uart2_pin_a: blsp1-uart2-pin-active { + rx { + pins = "gpio5"; + function = "blsp_uart2"; drive-strength = <2>; + bias-pull-up; + }; + + tx { + pins = "gpio4"; + function = "blsp_uart2"; + + drive-strength = <4>; bias-disable; }; }; - i2c@f9964000 { - status = "okay"; + blsp2_uart7_pin_a: blsp2-uart7-pin-active { + tx { + pins = "gpio41"; + function = "blsp_uart7"; - clock-frequency = <355000>; - qcom,src-freq = <50000000>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c8_pins>; + drive-strength = <2>; + bias-disable; + }; - synaptics@2c { - compatible = "syna,rmi4-i2c"; - reg = <0x2c>; + rx { + pins = "gpio42"; + function = "blsp_uart7"; - interrupt-parent = <&tlmm>; - interrupts = <86 IRQ_TYPE_EDGE_FALLING>; + drive-strength = <2>; + bias-pull-up; + }; - #address-cells = <1>; - #size-cells = <0>; + cts { + pins = "gpio43"; + function = "blsp_uart7"; - vdd-supply = <&pm8941_l22>; - vio-supply = <&pm8941_lvs3>; + drive-strength = <2>; + bias-pull-up; + }; - pinctrl-names = "default"; - pinctrl-0 = <&ts_int_pin>; + rts { + pins = "gpio44"; + function = "blsp_uart7"; - syna,startup-delay-ms = <10>; + drive-strength = <2>; + bias-disable; + }; + }; - rmi-f01@1 { - reg = <0x1>; - syna,nosleep = <1>; - }; + i2c8_pins: i2c8 { + mux { + pins = "gpio47", "gpio48"; + function = "blsp_i2c8"; - rmi-f11@11 { - reg = <0x11>; - syna,f11-flip-x = <1>; - syna,sensor-type = <1>; - }; + drive-strength = <2>; + bias-disable; }; }; - i2c@f9967000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&i2c11_pins>; - clock-frequency = <355000>; - qcom,src-freq = <50000000>; - - lp8566_wled: backlight@2c { - compatible = "ti,lp8556"; - reg = <0x2c>; - power-supply = <&vreg_bl_vddio>; - - bl-name = "backlight"; - dev-ctrl = /bits/ 8 <0x05>; - init-brt = /bits/ 8 <0x3f>; - rom_a0h { - rom-addr = /bits/ 8 <0xa0>; - rom-val = /bits/ 8 <0xff>; - }; - rom_a1h { - rom-addr = /bits/ 8 <0xa1>; - rom-val = /bits/ 8 <0x3f>; - }; - rom_a2h { - rom-addr = /bits/ 8 <0xa2>; - rom-val = /bits/ 8 <0x20>; - }; - rom_a3h { - rom-addr = /bits/ 8 <0xa3>; - rom-val = /bits/ 8 <0x5e>; - }; - rom_a4h { - rom-addr = /bits/ 8 <0xa4>; - rom-val = /bits/ 8 <0x02>; - }; - rom_a5h { - rom-addr = /bits/ 8 <0xa5>; - rom-val = /bits/ 8 <0x04>; - }; - rom_a6h { - rom-addr = /bits/ 8 <0xa6>; - rom-val = /bits/ 8 <0x80>; - }; - rom_a7h { - rom-addr = /bits/ 8 <0xa7>; - rom-val = /bits/ 8 <0xf7>; - }; - rom_a9h { - rom-addr = /bits/ 8 <0xa9>; - rom-val = /bits/ 8 <0x80>; - }; - rom_aah { - rom-addr = /bits/ 8 <0xaa>; - rom-val = /bits/ 8 <0x0f>; - }; - rom_aeh { - rom-addr = /bits/ 8 <0xae>; - rom-val = /bits/ 8 <0x0f>; - }; + i2c11_pins: i2c11 { + mux { + pins = "gpio83", "gpio84"; + function = "blsp_i2c11"; + + drive-strength = <2>; + bias-disable; }; }; -}; -&spmi_bus { - pm8941@0 { - charger@1000 { - qcom,fast-charge-safe-current = <1500000>; - qcom,fast-charge-current-limit = <1500000>; - qcom,dc-current-limit = <1800000>; - qcom,fast-charge-safe-voltage = <4400000>; - qcom,fast-charge-high-threshold-voltage = <4350000>; - qcom,fast-charge-low-threshold-voltage = <3400000>; - qcom,auto-recharge-threshold-voltage = <4200000>; - qcom,minimum-input-voltage = <4300000>; + lcd_backlight_en_pin_a: lcd-backlight-vddio { + pins = "gpio69"; + drive-strength = <10>; + output-low; + bias-disable; + }; + + sdhc1_pin_a: sdhc1-pin-active { + clk { + pins = "sdc1_clk"; + drive-strength = <16>; + bias-disable; }; - gpios@c000 { - gpio_keys_pin_a: gpio-keys-active { - pins = "gpio2", "gpio5"; - function = "normal"; + cmd-data { + pins = "sdc1_cmd", "sdc1_data"; + drive-strength = <10>; + bias-pull-up; + }; + }; - bias-pull-up; - power-source = <PM8941_GPIO_S3>; - }; + sdhc2_cd_pin_a: sdhc2-cd-pin-active { + pins = "gpio62"; + function = "gpio"; - bt_reg_on_pin: bt-reg-on { - pins = "gpio16"; - function = "normal"; + drive-strength = <2>; + bias-disable; + }; - output-low; - power-source = <PM8941_GPIO_S3>; - }; + sdhc2_pin_a: sdhc2-pin-active { + clk { + pins = "sdc2_clk"; + drive-strength = <6>; + bias-disable; + }; - wlan_sleep_clk_pin: wl-sleep-clk { - pins = "gpio17"; - function = "func2"; + cmd-data { + pins = "sdc2_cmd", "sdc2_data"; + drive-strength = <6>; + bias-pull-up; + }; + }; - output-high; - power-source = <PM8941_GPIO_S3>; - }; + sdhc3_pin_a: sdhc3-pin-active { + clk { + pins = "gpio40"; + function = "sdc3"; - wlan_regulator_pin: wl-reg-active { - pins = "gpio18"; - function = "normal"; + drive-strength = <10>; + bias-disable; + }; - bias-disable; - power-source = <PM8941_GPIO_S3>; - }; + cmd { + pins = "gpio39"; + function = "sdc3"; - lcd_dcdc_en_pin_a: lcd-dcdc-en-active { - pins = "gpio20"; - function = "normal"; + drive-strength = <10>; + bias-pull-up; + }; - bias-disable; - power-source = <PM8941_GPIO_S3>; - input-disable; - output-low; - }; + data { + pins = "gpio35", "gpio36", "gpio37", "gpio38"; + function = "sdc3"; + drive-strength = <10>; + bias-pull-up; }; + }; - coincell@2800 { - status = "okay"; - qcom,rset-ohms = <2100>; - qcom,vset-millivolts = <3000>; + ts_int_pin: synaptics { + pin { + pins = "gpio86"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + input-enable; }; }; + + bt_host_wake_pin: bt-host-wake { + pins = "gpio95"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + output-low; + }; + + bt_dev_wake_pin: bt-dev-wake { + pins = "gpio96"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 238/1095 ARM: dts: qcom-msm8974: Convert ADSP to a MMIO device
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 2daa785817dd35172b856c30fc5148b2773b6891 ]
The cx-supply has been removed as it's supposed to be set on a per-board basis.
--- arch/arm/boot/dts/qcom-msm8974.dtsi | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-)
arch/arm/boot/dts/qcom-msm8974.dtsi +30 -30
@@ -341,36 +341,6 @@ timer { clock-frequency = <19200000>; }; - remoteproc_adsp: adsp-pil { - compatible = "qcom,msm8974-adsp-pil"; - - interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack"; - - cx-supply = <&pm8841_s2>; - - clocks = <&xo_board>; - clock-names = "xo"; - - memory-region = <&adsp_region>; - - qcom,smem-states = <&adsp_smp2p_out 0>; - qcom,smem-state-names = "stop"; - - smd-edge { - interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>; - - qcom,ipc = <&apcs 8 8>; - qcom,smd-edge = <1>; - - label = "lpass"; - }; - }; - smem { compatible = "qcom,smem";
@@ -1592,6 +1562,36 @@ dsi0_phy: dsi-phy@fd922a00 { }; }; + remoteproc_adsp: remoteproc@fe200000 { + compatible = "qcom,msm8974-adsp-pil"; + reg = <0xfe200000 0x100>; + + interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack"; + + clocks = <&xo_board>; + clock-names = "xo"; + + memory-region = <&adsp_region>; + + qcom,smem-states = <&adsp_smp2p_out 0>; + qcom,smem-state-names = "stop"; + + smd-edge { + interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>; + + qcom,ipc = <&apcs 8 8>; + qcom,smd-edge = <1>; + label = "lpass"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + imem: imem@fe805000 { status = "disabled"; compatible = "syscon", "simple-mfd";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 239/1095 ARM: dts: qcom-msm8974: Sort and clean up nodes
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit f300826d27be7f7f671c922bf57007c98c683590 ]
- Remove regulators from the SoC DTSI
- cpu_pmu{} -> pmu{}
- move modem/iris regulators out of here; only FP2 used them
- tcsr_mutex is moved out of /soc
--- .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 4 + .../boot/dts/qcom-msm8974-fairphone-fp2.dts | 12 + .../qcom-msm8974-lge-nexus5-hammerhead.dts | 7 + .../dts/qcom-msm8974-sony-xperia-castor.dts | 4 + .../dts/qcom-msm8974-sony-xperia-rhine.dtsi | 6 + arch/arm/boot/dts/qcom-msm8974.dtsi | 1414 ++++++++--------- 6 files changed, 709 insertions(+), 738 deletions(-)
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +4 -0
@@ -61,6 +61,8 @@ phy@b { &rpm_requests { pm8841-regulators { + compatible = "qcom,rpm-pm8841-regulators"; + pm8841_s1: s1 { regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>;
@@ -83,6 +85,8 @@ pm8841_s4: s4 { }; pm8941-regulators { + compatible = "qcom,rpm-pm8941-regulators"; + vdd_l1_l3-supply = <&pm8941_s1>; vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; vdd_l4_l11-supply = <&pm8941_s1>;
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +12 -0
@@ -109,10 +109,18 @@ &pronto { vddmx-supply = <&pm8841_s1>; vddcx-supply = <&pm8841_s2>; + vddpx-supply = <&pm8941_s3>; pinctrl-names = "default"; pinctrl-0 = <&wcnss_pin_a>; + iris { + vddxo-supply = <&pm8941_l6>; + vddrfa-supply = <&pm8941_l11>; + vddpa-supply = <&pm8941_l19>; + vdddig-supply = <&pm8941_s3>; + }; + smd-edge { qcom,remote-pid = <4>; label = "pronto";
@@ -125,6 +133,8 @@ wcnss { &rpm_requests { pm8841-regulators { + compatible = "qcom,rpm-pm8841-regulators"; + pm8841_s1: s1 { regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>;
@@ -142,6 +152,8 @@ pm8841_s3: s3 { }; pm8941-regulators { + compatible = "qcom,rpm-pm8941-regulators"; + vdd_l1_l3-supply = <&pm8941_s1>; vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; vdd_l4_l11-supply = <&pm8941_s1>;
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +7 -0
@@ -334,6 +334,8 @@ otg { &rpm_requests { pm8841-regulators { + compatible = "qcom,rpm-pm8841-regulators"; + pm8841_s1: s1 { regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>;
@@ -356,6 +358,8 @@ pm8841_s4: s4 { }; pm8941-regulators { + compatible = "qcom,rpm-pm8941-regulators"; + vdd_l1_l3-supply = <&pm8941_s1>; vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; vdd_l4_l11-supply = <&pm8941_s1>;
@@ -517,6 +521,9 @@ pm8941_l24: l24 { regulator-max-microvolt = <3075000>; regulator-boot-on; }; + + pm8941_lvs1: lvs1 {}; + pm8941_lvs3: lvs3 {}; }; };
arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts +4 -0
@@ -304,6 +304,8 @@ lcd_dcdc_en_pin_a: lcd-dcdc-en-active { &rpm_requests { pm8941-regulators { + compatible = "qcom,rpm-pm8941-regulators"; + vdd_l1_l3-supply = <&pm8941_s1>; vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; vdd_l4_l11-supply = <&pm8941_s1>;
@@ -465,6 +467,8 @@ pm8941_l24: l24 { regulator-max-microvolt = <3075000>; regulator-boot-on; }; + + pm8941_lvs3: lvs3 {}; }; };
arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi +6 -0
@@ -153,6 +153,8 @@ &pm8941_wled { &rpm_requests { pm8841-regulators { + compatible = "qcom,rpm-pm8841-regulators"; + pm8841_s1: s1 { regulator-min-microvolt = <675000>; regulator-max-microvolt = <1050000>;
@@ -175,6 +177,8 @@ pm8841_s4: s4 { }; pm8941-regulators { + compatible = "qcom,rpm-pm8941-regulators"; + vdd_l1_l3-supply = <&pm8941_s1>; vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; vdd_l4_l11-supply = <&pm8941_s1>;
@@ -335,6 +339,8 @@ pm8941_l24: l24 { regulator-max-microvolt = <3075000>; regulator-boot-on; }; + + pm8941_lvs3: lvs3 {}; }; };
arch/arm/boot/dts/qcom-msm8974.dtsi +676 -738
1,603 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 240/1095 ARM: dts: qcom-msm8974: fix irq type on blsp2_uart1
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit ab1489017aa7a9f02e24bee73cf9ec8079cd3909 ]
IRQ_TYPE_NONE is invalid, so use the correct interrupt type.
--- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-msm8974.dtsi +1 -1
@@ -562,7 +562,7 @@ blsp2_dma: dma-controller@f9944000 { blsp2_uart1: serial@f995d000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xf995d000 0x1000>; - interrupts = <GIC_SPI 113 IRQ_TYPE_NONE>; + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; clocks = <&gcc GCC_BLSP2_UART1_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>; clock-names = "core", "iface"; status = "disabled";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 241/1095 kbuild: Fix include path in scripts/Makefile.modpost
In reply to Greg Kroah-HartmanFrom: Jing Leng <[email protected]>
[ Upstream commit 23a0cb8e3225122496bfa79172005c587c2d64bf ]
When building an external module, if users don't need to separate the compilation output and source code, they run the following command:
"make -C $(LINUX_SRC_DIR) M=$(PWD)". At this point, "$(KBUILD_EXTMOD)" and "$(src)" are the same.
If they need to separate them, they run "make -C $(KERNEL_SRC_DIR) O=$(KERNEL_OUT_DIR) M=$(OUT_DIR) src=$(PWD)". Before running the command, they need to copy "Kbuild" or "Makefile" to "$(OUT_DIR)" to prevent compilation failure.
So the kernel should change the included path to avoid the copy operation.
[masahiro: I do not think "M=$(OUT_DIR) src=$(PWD)" is the official way, but this patch is a nice clean up anyway.]
--- scripts/Makefile.modpost | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/Makefile.modpost +1 -2
@@ -87,8 +87,7 @@ obj := $(KBUILD_EXTMOD) src := $(obj) # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS -include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ - $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) +include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, $(src)/Makefile) # modpost option for external modules MODPOST += -e
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 242/1095 iio: core: fix a few code style issues
In reply to Greg Kroah-HartmanFrom: Alexander Vorwerk <[email protected]>
[ Upstream commit f4decb4c6e374a4ded59a6a76b8236695e44d8bc ]
* Fix indent in else statement
* Remove unnecessary 'else' after 'break'
* Remove space in '* attr'
--- drivers/iio/industrialio-buffer.c | 4 ++-- drivers/iio/industrialio-core.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/iio/industrialio-buffer.c +2 -2
@@ -915,7 +915,7 @@ static int iio_verify_update(struct iio_dev *indio_dev,if (scan_mask ==NULL )return -EINVAL ; }else { - scan_mask = compound_mask; + scan_mask = compound_mask; } config->scan_bytes = iio_compute_scan_bytes(indio_dev,
@@ -1649,7 +1649,7 @@ static int __iio_buffer_alloc_sysfs_and_mask(struct iio_buffer *buffer, } attrn = buffer_attrcount + scan_el_attrcount +ARRAY_SIZE (iio_buffer_attrs); - attr =kcalloc (attrn +1 ,sizeof (* attr),GFP_KERNEL ); + attr =kcalloc (attrn +1 ,sizeof (*attr),GFP_KERNEL );if (!attr) { ret = -ENOMEM ; goto error_free_scan_mask;
drivers/iio/industrialio-core.c +1 -2
@@ -908,8 +908,7 @@ static int __iio_str_to_fixpoint(const char *str, int fract_mult, }else if (*str =='\n' ) {if (*(str +1 ) =='\0' )break ; -else -return -EINVAL ; +return -EINVAL ; }else if (!strncmp (str," dB" ,sizeof (" dB" ) -1 ) && scale_db) {/* Ignore the dB suffix */ str +=sizeof (" dB" ) -1 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 243/1095 ia64: fix typos in comments
In reply to Greg Kroah-HartmanFrom: Julia Lawall <[email protected]>
[ Upstream commit 0af96a024f524a5318485cbada73ab7d874895d4 ]
Various spelling mistakes in comments.
Detected with the help of Coccinelle.
--- arch/ia64/kernel/palinfo.c | 2 +- arch/ia64/kernel/traps.c | 2 +- arch/ia64/mm/init.c | 2 +- arch/ia64/mm/tlb.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
arch/ia64/kernel/palinfo.c +1 -1
@@ -120,7 +120,7 @@ static const char *mem_attrib[]={* Input: * - a pointer to a buffer to hold the string * - a 64-bit vector -* Ouput: +* Output: * - a pointer to the end of the buffer * */
arch/ia64/kernel/traps.c +1 -1
@@ -309,7 +309,7 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr)/* * Lower 4 bits are used as a count. Upper bits are a sequence * number that is updated when count is reset. The cmpxchg will -* fail is seqno has changed. This minimizes mutiple cpus +* fail is seqno has changed. This minimizes multiple cpus * resetting the count. */ if (current_jiffies > last.time)
arch/ia64/mm/init.c +1 -1
@@ -451,7 +451,7 @@ mem_init (void)memblock_free_all ();/* -* For fsyscall entrpoints with no light-weight handler, use the ordinary +* For fsyscall entrypoints with no light-weight handler, use the ordinary * (heavy-weight) handler, but mark it by setting bit 0, so the fsyscall entry * code can tell them apart. */
arch/ia64/mm/tlb.c +2 -2
@@ -174,7 +174,7 @@ __setup("nptcg=", set_nptcg);* override table (in which case we should ignore the value from * PAL_VM_SUMMARY). * -* Kernel parameter "nptcg=" overrides maximum number of simultanesous ptc.g +* Kernel parameter "nptcg=" overrides maximum number of simultaneous ptc.g * purges defined in either PAL_VM_SUMMARY or PAL override table. In this case, * we should ignore the value from either PAL_VM_SUMMARY or PAL override table. *
@@ -516,7 +516,7 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size)if (i >=per_cpu (ia64_tr_num, cpu))return -EBUSY ; -/*Record tr info for mca hander use!*/ +/*Record tr info for mca handler use!*/ if (i >per_cpu (ia64_tr_used, cpu))per_cpu (ia64_tr_used, cpu) = i;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 244/1095 soc: qcom: ocmem: Fix refcount leak in of_get_ocmem
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit 92a563fcf14b3093226fb36f12e9b5cf630c5a5d ]
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() will check NULL pointer.
--- drivers/soc/qcom/ocmem.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/qcom/ocmem.c +3 -0
@@ -194,14 +194,17 @@ struct ocmem *of_get_ocmem(struct device *dev) devnode =of_parse_phandle (dev->of_node,"sram" ,0 );if (!devnode || !devnode->parent) {dev_err (dev,"Cannot look up sram phandle\n" ); +of_node_put (devnode);return ERR_PTR (-ENODEV ); } pdev =of_find_device_by_node (devnode->parent);if (!pdev) {dev_err (dev,"Cannot find device node %s\n" , devnode->name); +of_node_put (devnode);return ERR_PTR (-EPROBE_DEFER ); } +of_node_put (devnode); ocmem =platform_get_drvdata (pdev);if (!ocmem) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 245/1095 soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit e6e0951414a314e7db3e9e24fd924b3e15515288 ]
Every iteration of for_each_available_child_of_node() decrements the reference count of the previous node.
When breaking early from a for_each_available_child_of_node() loop, we need to explicitly call of_node_put() on the child node. Add missing of_node_put() to avoid refcount leak.
--- drivers/soc/qcom/qcom_aoss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/soc/qcom/qcom_aoss.c +3 -1
@@ -399,8 +399,10 @@ static int qmp_cooling_devices_register(struct qmp *qmp)continue ; ret =qmp_cooling_device_add (qmp, &qmp->cooling_devs[count++], child); -if (ret) +if (ret) { +of_node_put (child); goto unroll; + } }if (!count)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 246/1095 ARM: dts: qcom: msm8974: add required ranges to OCMEM
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 7a16ea7f3a5ec0f30b146b058c273b7a9c8ceadf ]
The OCMEM bindings require ranges property.
--- arch/arm/boot/dts/qcom-msm8974.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-msm8974.dtsi +1 -0
@@ -1369,6 +1369,7 @@ ocmem@fdd00000 { reg = <0xfdd00000 0x2000>, <0xfec00000 0x180000>; reg-names = "ctrl", "mem"; + ranges = <0 0xfec00000 0x180000>; clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>, <&mmcc OCMEMCX_OCMEMNOC_CLK>; clock-names = "core", "iface";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 247/1095 ARM: dts: qcom: pm8841: add required thermal-sensor-cells
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit e2759fa0676c9a32bbddb9aff955b54bb35066ad ]
The PM8841 temperature sensor has to define thermal-sensor-cells.
--- arch/arm/boot/dts/qcom-pm8841.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-pm8841.dtsi +1 -0
@@ -24,6 +24,7 @@ temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>; + #thermal-sensor-cells = <0>; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 248/1095 bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 54872fea6a5ac967ec2272aea525d1438ac6735a ]
In error case in hisi_lpc_acpi_probe() after calling platform_device_add(), hisi_lpc_acpi_remove() can't release the failed 'pdev', so it will be leak, call platform_device_put() to fix this problem.
I'v constructed this error case and tested this patch on D05 board.
--- drivers/bus/hisi_lpc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/bus/hisi_lpc.c +6 -4
@@ -503,13 +503,13 @@ static int hisi_lpc_acpi_probe(struct device *hostdev) {struct acpi_device *adev =ACPI_COMPANION (hostdev);struct acpi_device *child; +struct platform_device *pdev;int ret;/* Only consider the children of the host */ list_for_each_entry (child, &adev->children, node) {const char *hid =acpi_device_hid (child);const struct hisi_lpc_acpi_cell *cell; -struct platform_device *pdev;const struct resource *res;bool found = false;int num_res;
@@ -571,22 +571,24 @@ static int hisi_lpc_acpi_probe(struct device *hostdev) ret =platform_device_add_resources (pdev, res, num_res);if (ret) - goto fail; + goto fail_put_device; ret =platform_device_add_data (pdev, cell->pdata, cell->pdata_size);if (ret) - goto fail; + goto fail_put_device; ret =platform_device_add (pdev);if (ret) - goto fail; + goto fail_put_device;acpi_device_set_enumerated (child); }return 0 ; +fail_put_device: +platform_device_put (pdev); fail:hisi_lpc_acpi_remove (hostdev);return ret;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 249/1095 lib: overflow: Do not define 64-bit tests on 32-bit
In reply to Greg Kroah-HartmanFrom: Kees Cook <[email protected]>
[ Upstream commit 6a022dd29f2cefbac4895a34e2e1f14b2d12d819 ]
The 64-bit overflow tests will trigger 64-bit division on 32-bit hosts, which is not currently used anywhere in the kernel, and tickles bugs in at least Clang 13 and earlier:
https://github.com/ClangBuiltLinux/linux/issues/1636
In reality, there shouldn't be a reason to not build the 64-bit test cases on 32-bit systems, so these #ifdefs can be removed once the minimum Clang version reaches 13.
In the meantime, silence W=1 warnings given by the current code:
../lib/overflow_kunit.c:191:19: warning: 's64_tests' defined but not used [-Wunused-const-variable=]
191 | DEFINE_TEST_ARRAY(s64) = {
| ^~~../lib/overflow_kunit.c:24:11: note: in definition of macro 'DEFINE_TEST_ARRAY'
24 | } t ## _tests[]
| ^../lib/overflow_kunit.c:94:19: warning: 'u64_tests' defined but not used [-Wunused-const-variable=]
94 | DEFINE_TEST_ARRAY(u64) = {
| ^~~../lib/overflow_kunit.c:24:11: note: in definition of macro 'DEFINE_TEST_ARRAY'
24 | } t ## _tests[]
| ^
--- lib/overflow_kunit.c | 6 ++++++ 1 file changed, 6 insertions(+)
lib/overflow_kunit.c +6 -0
@@ -91,6 +91,7 @@ DEFINE_TEST_ARRAY(u32) = { {-4U, 5U, 1U, -9U, -20U, true, false, true}, }; +#if BITS_PER_LONG ==64 DEFINE_TEST_ARRAY (u64) = { {0 ,0 ,0 ,0 ,0 , false, false, false}, {1, 1, 2, 0, 1, false, false, false},
@@ -114,6 +115,7 @@ DEFINE_TEST_ARRAY(u64) = { false, true, false}, {-15ULL, 10ULL, -5ULL, -25ULL, -150ULL, false, false, true}, }; +#endif DEFINE_TEST_ARRAY (s8) = { {0 ,0 ,0 ,0 ,0 , false, false, false},
@@ -188,6 +190,8 @@ DEFINE_TEST_ARRAY(s32) = { {S32_MIN, S32_MIN, 0, 0, 0, true, false, true}, {S32_MAX, S32_MAX, -2, 0, 1, true, false, true}, }; + +#if BITS_PER_LONG ==64 DEFINE_TEST_ARRAY (s64) = { {0, 0, 0, 0, 0, false, false, false},
@@ -216,6 +220,7 @@ DEFINE_TEST_ARRAY(s64) = { {-128, -1, -129, -127, 128, false, false, false}, {0, -S64_MAX, -S64_MAX, S64_MAX, 0, false, false, false}, }; +#endif #define check_one_op (t, fmt, op, sym, a, b, r, of) do { \ t _r; \
@@ -650,6 +655,7 @@ static struct kunit_case overflow_test_cases[] = {KUNIT_CASE (s16_overflow_test),KUNIT_CASE (u32_overflow_test),KUNIT_CASE (s32_overflow_test), +/* Clang 13 and earlier generate unwanted libcalls on 32-bit. */ #if BITS_PER_LONG == 64KUNIT_CASE (u64_overflow_test), KUNIT_CASE(s64_overflow_test),
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 250/1095 stack: Declare {randomize_,}kstack_offset to fix Sparse warnings
In reply to Greg Kroah-HartmanFrom: GONG, Ruiqi <[email protected]>
[ Upstream commit 375561bd6195a31bf4c109732bd538cb97a941f4 ]
Fix the following Sparse warnings that got noticed when the PPC-dev patchwork was checking another patch (see the link below):
init/main.c:862:1: warning: symbol 'randomize_kstack_offset' was not declared. Should it be static? init/main.c:864:1: warning: symbol 'kstack_offset' was not declared. Should it be static?
Which in fact are triggered on all architectures that have HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET support (for instances x86, arm64 etc).
--- init/main.c | 1 + 1 file changed, 1 insertion(+)
init/main.c +1 -0
@@ -99,6 +99,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/randomize_kstack.h> #include <net/net_namespace.h> #include <asm/io.h>
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 251/1095 arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
In reply to Greg Kroah-HartmanFrom: Sireesh Kodali <[email protected]>
[ Upstream commit 5458d6f2827cd30218570f266b8d238417461f2f ]
The smem-state properties for the pronto node were incorrectly labelled, reading qcom,state* rather than qcom,smem-state*. Fix that, allowing the stop state to be used.
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -2
@@ -1758,8 +1758,8 @@ pronto: remoteproc@a21b000 { <&rpmpd MSM8916_VDDMX>; power-domain-names = "cx", "mx"; - qcom,state = <&wcnss_smp2p_out 0>; - qcom,state-names = "stop"; + qcom,smem-states = <&wcnss_smp2p_out 0>; + qcom,smem-state-names = "stop"; pinctrl-names = "default"; pinctrl-0 = <&wcnss_pin_a>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 252/1095 perf/core: Add perf_clear_branch_entry_bitfields() helper
In reply to Greg Kroah-HartmanFrom: Stephane Eranian <[email protected]>
[ Upstream commit bfe4daf850f45d92dcd3da477f0b0456620294c3 ]
Make it simpler to reset all the info fields on the perf_branch_entry by adding a helper inline function.
The goal is to centralize the initialization to avoid missing a field in case more are added.
--- arch/x86/events/intel/lbr.c | 36 +++++++++++++++++------------------- include/linux/perf_event.h | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 19 deletions(-)
arch/x86/events/intel/lbr.c +17 -19
@@ -769,6 +769,7 @@ void intel_pmu_lbr_disable_all(void)void intel_pmu_lbr_read_32 (struct cpu_hw_events *cpuc) {unsigned long mask = x86_pmu.lbr_nr -1 ; +struct perf_branch_entry *br = cpuc->lbr_entries;u64 tos =intel_pmu_lbr_tos ();int i;
@@ -784,15 +785,11 @@ void intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc)rdmsrl (x86_pmu.lbr_from + lbr_idx, msr_lastbranch.lbr); - cpuc->lbr_entries[i].from = msr_lastbranch.from; - cpuc->lbr_entries[i].to = msr_lastbranch.to; - cpuc->lbr_entries[i].mispred =0 ; - cpuc->lbr_entries[i].predicted =0 ; - cpuc->lbr_entries[i].in_tx =0 ; - cpuc->lbr_entries[i].abort =0 ; - cpuc->lbr_entries[i].cycles =0 ; - cpuc->lbr_entries[i].type =0 ; - cpuc->lbr_entries[i].reserved =0 ; +perf_clear_branch_entry_bitfields (br); + + br->from = msr_lastbranch.from; + br->to = msr_lastbranch.to; + br++; } cpuc->lbr_stack.nr = i; cpuc->lbr_stack.hw_idx = tos;
@@ -807,6 +804,7 @@ void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc) {bool need_info = false, call_stack = false;unsigned long mask = x86_pmu.lbr_nr -1 ; +struct perf_branch_entry *br = cpuc->lbr_entries;u64 tos =intel_pmu_lbr_tos ();int i;int out =0 ;
@@ -878,15 +876,14 @@ void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc)if (abort && x86_pmu.lbr_double_abort && out >0 ) out--; - cpuc->lbr_entries[out].from = from; - cpuc->lbr_entries[out].to = to; - cpuc->lbr_entries[out].mispred = mis; - cpuc->lbr_entries[out].predicted = pred; - cpuc->lbr_entries[out].in_tx = in_tx; - cpuc->lbr_entries[out].abort = abort; - cpuc->lbr_entries[out].cycles = cycles; - cpuc->lbr_entries[out].type =0 ; - cpuc->lbr_entries[out].reserved =0 ; +perf_clear_branch_entry_bitfields (br+out); + br[out].from = from; + br[out].to = to; + br[out].mispred = mis; + br[out].predicted = pred; + br[out].in_tx = in_tx; + br[out].abort = abort; + br[out].cycles = cycles; out++; } cpuc->lbr_stack.nr = out;
@@ -951,6 +948,8 @@ static void intel_pmu_store_lbr(struct cpu_hw_events *cpuc, to =rdlbr_to (i, lbr); info =rdlbr_info (i, lbr); +perf_clear_branch_entry_bitfields (e); + e->from = from; e->to = to; e->mispred =get_lbr_mispred (info);
@@ -959,7 +958,6 @@ static void intel_pmu_store_lbr(struct cpu_hw_events *cpuc, e->abort = !!(info &LBR_INFO_ABORT ); e->cycles =get_lbr_cycles (info); e->type =get_lbr_br_type (info); - e->reserved =0 ; } cpuc->lbr_stack.nr = i;
include/linux/perf_event.h +16 -0
@@ -1063,6 +1063,22 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, data->txn =0 ; } +/* +* Clear all bitfields in the perf_branch_entry. +* The to and from fields are not cleared because they are +* systematically modified by caller. +*/ +static inline void perf_clear_branch_entry_bitfields (struct perf_branch_entry *br) +{ + br->mispred =0 ; + br->predicted =0 ; + br->in_tx =0 ; + br->abort =0 ; + br->cycles =0 ; + br->type =0 ; + br->reserved =0 ; +} + extern void perf_output_sample(struct perf_output_handle *handle, struct perf_event_header *header, struct perf_sample_data *data,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 253/1095 arm64: dts: exynosautov9: correct spi11 pin names
In reply to Greg Kroah-HartmanFrom: Chanho Park <[email protected]>
[ Upstream commit ba205449828f47f80532a1453beef5eed2982176 ]
They should be started with "gpp5-".
--- arch/arm64/boot/dts/exynos/exynosautov9-pinctrl.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/exynos/exynosautov9-pinctrl.dtsi +3 -3
@@ -1089,21 +1089,21 @@ spi10_cs_func: spi10-cs-func-pins { /* PERIC1 USI11_SPI */ spi11_bus: spi11-pins { - samsung,pins = "gpp3-6", "gpp3-5", "gpp3-4"; + samsung,pins = "gpp5-6", "gpp5-5", "gpp5-4"; samsung,pin-function = <EXYNOS_PIN_FUNC_2>; samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>; }; spi11_cs: spi11-cs-pins { - samsung,pins = "gpp3-7"; + samsung,pins = "gpp5-7"; samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>; }; spi11_cs_func: spi11-cs-func-pins { - samsung,pins = "gpp3-7"; + samsung,pins = "gpp5-7"; samsung,pin-function = <EXYNOS_PIN_FUNC_2>; samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 254/1095 ACPI: VIOT: Fix ACS setup
In reply to Greg Kroah-HartmanFrom: Eric Auger <[email protected]>
[ Upstream commit 3dcb861dbc6ab101838a1548b1efddd00ca3c3ec ]
Currently acpi_viot_init() gets called after the pci device has been scanned and pci_enable_acs() has been called. So pci_request_acs() fails to be taken into account leading to wrong single iommu group topologies when dealing with multi-function root ports for instance.
We cannot simply move the acpi_viot_init() earlier, similarly as the IORT init because the VIOT parsing relies on the pci scan. However we can detect VIOT is present earlier and in such a case, request ACS. Introduce a new acpi_viot_early_init() routine that allows to call pci_request_acs() before the scan.
While at it, guard the call to pci_request_acs() with #ifdef CONFIG_PCI.
--- drivers/acpi/bus.c | 1 + drivers/acpi/viot.c | 26 ++++++++++++++++++++------ include/linux/acpi_viot.h | 2 ++ 3 files changed, 23 insertions(+), 6 deletions(-)
drivers/acpi/bus.c +1 -0
@@ -1373,6 +1373,7 @@ static int __init acpi_init(void)pci_mmcfg_late_init ();acpi_iort_init (); +acpi_viot_early_init ();acpi_hest_init ();acpi_ghes_init ();acpi_scan_init ();
drivers/acpi/viot.c +20 -6
@@ -248,6 +248,26 @@ static int __init viot_parse_node(const struct acpi_viot_header *hdr)return ret; } +/** +* acpi_viot_early_init - Test the presence of VIOT and enable ACS +* +* If the VIOT does exist, ACS must be enabled. This cannot be +* done in acpi_viot_init() which is called after the bus scan +*/ +void __init acpi_viot_early_init (void ) +{ +#ifdef CONFIG_PCI +acpi_status status; +struct acpi_table_header *hdr; + + status =acpi_get_table (ACPI_SIG_VIOT ,0 , &hdr); +if (ACPI_FAILURE (status)) +return ; +pci_request_acs (); +acpi_put_table (hdr); +#endif +} +/** * acpi_viot_init - Parse the VIOT table *
@@ -319,12 +339,6 @@ static int viot_pci_dev_iommu_init(struct pci_dev *pdev, u16 dev_id, void *data) epid = ((domain_nr - ep->segment_start) <<16 ) + dev_id - ep->bdf_start + ep->endpoint_id; -/* -* If we found a PCI range managed by the viommu, we're -* the one that has to request ACS. -*/ -pci_request_acs (); -return viot_dev_iommu_init (&pdev->dev, ep->viommu, epid); }
include/linux/acpi_viot.h +2 -0
@@ -6,9 +6,11 @@#include <linux/acpi.h> #ifdef CONFIG_ACPI_VIOT +void __init acpi_viot_early_init (void );void __init acpi_viot_init (void );int viot_iommu_configure (struct device *dev);#else +static inline void acpi_viot_early_init (void ) {}static inline void acpi_viot_init (void ) {}static inline int viot_iommu_configure (struct device *dev) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 255/1095 arm64: dts: qcom: sm6125: Move sdc2 pinctrl from seine-pdx201 to sm6125
In reply to Greg Kroah-HartmanFrom: Marijn Suijten <[email protected]>
[ Upstream commit 6990640a93ba4e76dd62ca3ea1082a7354db09d7 ]
Both the sdc2-on and sdc2-off pinctrl nodes are used by the sdhci@4784000 node in sm6125.dtsi. Surprisingly sdc2-off is defined in sm6125, yet its sdc2-on counterpart is only defined in board-specific DT for the Sony Seine PDX201 board/device resulting in an "undefined label &sdc2_state_on" error if sm6125.dtsi were included elsewhere. This sm6125 base dtsi should not rely on externally defined labels; the properties referencing it should then also be written externally. Since the sdc2-on pin configuration is board-independent just like sdc2-off, move it from seine-pdx201.dts into sm6125.dtsi.
The SDCard-detect pin (gpio98) is however board-specific, and remains as an overwrite in seine-pdx201.dts for both the on and off state.
As a drive-by cleanup, reorder bias- and drive-strength properties.
--- .../qcom/sm6125-sony-xperia-seine-pdx201.dts | 34 +++++-------------- arch/arm64/boot/dts/qcom/sm6125.dtsi | 24 +++++++++++-- 2 files changed, 30 insertions(+), 28 deletions(-)
arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts +8 -26
@@ -91,8 +91,16 @@ &hsusb_phy1 { &sdc2_state_off { sd-cd { pins = "gpio98"; + drive-strength = <2>; bias-disable; + }; +}; + +&sdc2_state_on { + sd-cd { + pins = "gpio98"; drive-strength = <2>; + bias-pull-up; }; };
@@ -102,32 +110,6 @@ &sdhc_1 { &tlmm { gpio-reserved-ranges = <22 2>, <28 6>; - - sdc2_state_on: sdc2-on { - clk { - pins = "sdc2_clk"; - bias-disable; - drive-strength = <16>; - }; - - cmd { - pins = "sdc2_cmd"; - bias-pull-up; - drive-strength = <10>; - }; - - data { - pins = "sdc2_data"; - bias-pull-up; - drive-strength = <10>; - }; - - sd-cd { - pins = "gpio98"; - bias-pull-up; - drive-strength = <2>; - }; - }; }; &usb3 {
arch/arm64/boot/dts/qcom/sm6125.dtsi +22 -2
@@ -389,20 +389,40 @@ tlmm: pinctrl@500000 { sdc2_state_off: sdc2-off { clk { pins = "sdc2_clk"; - bias-disable; drive-strength = <2>; + bias-disable; }; cmd { pins = "sdc2_cmd"; + drive-strength = <2>; bias-pull-up; + }; + + data { + pins = "sdc2_data"; drive-strength = <2>; + bias-pull-up; + }; + }; + + sdc2_state_on: sdc2-on { + clk { + pins = "sdc2_clk"; + drive-strength = <16>; + bias-disable; + }; + + cmd { + pins = "sdc2_cmd"; + drive-strength = <10>; + bias-pull-up; }; data { pins = "sdc2_data"; + drive-strength = <10>; bias-pull-up; - drive-strength = <2>; }; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 256/1095 arm64: dts: qcom: sm6125: Append -state suffix to pinctrl nodes
In reply to Greg Kroah-HartmanFrom: Marijn Suijten <[email protected]>
[ Upstream commit cbfb5668aece448877fa7826cde81c9d06f4a4ac ]
According to qcom,sm6125-pinctrl.yaml all nodes inside the tlmm must be suffixed by -state:
qcom/sm6125-sony-xperia-seine-pdx201.dtb: pinctrl@500000: 'sdc2-off', 'sdc2-on' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
The label names have been updated to match, going from sdc2_state_X to sdc2_X_state.
--- .../boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm6125.dtsi | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts +2 -2
@@ -88,7 +88,7 @@ &hsusb_phy1 { status = "okay"; }; -&sdc2_state_off { +&sdc2_off_state { sd-cd { pins = "gpio98"; drive-strength = <2>;
@@ -96,7 +96,7 @@ sd-cd { }; }; -&sdc2_state_on { +&sdc2_on_state { sd-cd { pins = "gpio98"; drive-strength = <2>;
arch/arm64/boot/dts/qcom/sm6125.dtsi +4 -4
@@ -386,7 +386,7 @@ tlmm: pinctrl@500000 { interrupt-controller; #interrupt-cells = <2>; - sdc2_state_off: sdc2-off { + sdc2_off_state: sdc2-off-state { clk { pins = "sdc2_clk"; drive-strength = <2>;
@@ -406,7 +406,7 @@ data { }; }; - sdc2_state_on: sdc2-on { + sdc2_on_state: sdc2-on-state { clk { pins = "sdc2_clk"; drive-strength = <16>;
@@ -490,8 +490,8 @@ sdhc_2: sdhci@4784000 { <&xo_board>; clock-names = "iface", "core", "xo"; - pinctrl-0 = <&sdc2_state_on>; - pinctrl-1 = <&sdc2_state_off>; + pinctrl-0 = <&sdc2_on_state>; + pinctrl-1 = <&sdc2_off_state>; pinctrl-names = "default", "sleep"; power-domains = <&rpmpd SM6125_VDDCX>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 257/1095 arm64: dts: qcom: msm8996: correct #clock-cells for QMP PHY nodes
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit b874fff9a7683df30e5aff16d5a85b1f8a43aa5d ]
The commit 82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node") moved the '#clock-cells' properties to the child nodes. However it missed the fact that the property must have been set to <0> (as all pipe clocks use of_clk_hw_simple_get as the xlate function. Also the mentioned commit didn't add '#clock-cells' properties to second and third PCIe PHY nodes. Correct both these mistakes:
- Set '#clock-cells' to <0>,
- Add the property to pciephy_1 and pciephy_2 nodes.
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +4 -2
@@ -603,7 +603,7 @@ pciephy_0: phy@35000 { <0x00035400 0x1dc>; #phy-cells = <0>; - #clock-cells = <1>; + #clock-cells = <0>; clock-output-names = "pcie_0_pipe_clk_src"; clocks = <&gcc GCC_PCIE_0_PIPE_CLK>; clock-names = "pipe0";
@@ -617,6 +617,7 @@ pciephy_1: phy@36000 { <0x00036400 0x1dc>; #phy-cells = <0>; + #clock-cells = <0>; clock-output-names = "pcie_1_pipe_clk_src"; clocks = <&gcc GCC_PCIE_1_PIPE_CLK>; clock-names = "pipe1";
@@ -630,6 +631,7 @@ pciephy_2: phy@37000 { <0x00037400 0x1dc>; #phy-cells = <0>; + #clock-cells = <0>; clock-output-names = "pcie_2_pipe_clk_src"; clocks = <&gcc GCC_PCIE_2_PIPE_CLK>; clock-names = "pipe2";
@@ -2659,7 +2661,7 @@ ssusb_phy_0: phy@7410200 { <0x07410600 0x1a8>; #phy-cells = <0>; - #clock-cells = <1>; + #clock-cells = <0>; clock-output-names = "usb3_phy_pipe_clk_src"; clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>; clock-names = "pipe0";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 258/1095 arm64: dts: qcom: sc7280: drop PCIe PHY clock index
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 531c738fb36069d60aff267a0b25533a35d59fd0 ]
The QMP PCIe PHY provides a single clock so drop the redundant clock index.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -2
@@ -810,7 +810,7 @@ gcc: clock-controller@100000 { reg = <0 0x00100000 0 0x1f0000>; clocks = <&rpmhcc RPMH_CXO_CLK>, <&rpmhcc RPMH_CXO_CLK_A>, <&sleep_clk>, - <0>, <&pcie1_lane 0>, + <0>, <&pcie1_lane>, <0>, <0>, <0>, <0>; clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk", "pcie_0_pipe_clk", "pcie_1_pipe_clk",
@@ -1914,7 +1914,7 @@ pcie1_lane: lanes@1c0e200 { clock-names = "pipe0"; #phy-cells = <0>; - #clock-cells = <1>; + #clock-cells = <0>; clock-output-names = "pcie_1_pipe_clk"; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 259/1095 arm64: dts: qcom: sm8250: add missing PCIe PHY clock-cells
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit d9fd162ce764c227fcfd4242f6c1639895a9481f ]
Add the missing '#clock-cells' properties to the PCIe QMP PHY nodes.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +6 -0
@@ -1883,6 +1883,8 @@ pcie0_lane: phy@1c06200 { clock-names = "pipe0"; #phy-cells = <0>; + + #clock-cells = <0>; clock-output-names = "pcie_0_pipe_clk"; }; };
@@ -1989,6 +1991,8 @@ pcie1_lane: phy@1c0e200 { clock-names = "pipe0"; #phy-cells = <0>; + + #clock-cells = <0>; clock-output-names = "pcie_1_pipe_clk"; }; };
@@ -2095,6 +2099,8 @@ pcie2_lane: phy@1c16200 { clock-names = "pipe0"; #phy-cells = <0>; + + #clock-cells = <0>; clock-output-names = "pcie_2_pipe_clk"; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 260/1095 arm64: dts: mt7622: fix BPI-R64 WPS button
In reply to Greg Kroah-HartmanFrom: Nick Hainke <[email protected]>
[ Upstream commit c98e6e683632386a3bd284acda4342e68aec4c41 ]
The bananapi R64 (BPI-R64) experiences wrong WPS button signals. In OpenWrt pushing the WPS button while powering on the device will set it to recovery mode. Currently, this also happens without any user interaction. In particular, the wrong signals appear while booting the device or restarting it, e.g. after doing a system upgrade. If the device is in recovery mode the user needs to manually power cycle or restart it.
The official BPI-R64 sources set the WPS button to GPIO_ACTIVE_LOW in the device tree. This setting seems to suppress the unwanted WPS button press signals. So this commit changes the button from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW.
The official BPI-R64 sources can be found on
https://github.com/BPI-SINOVOIP/BPI-R64-openwrt
--- arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +1 -1
@@ -49,7 +49,7 @@ factory { wps { label = "wps"; linux,code = <KEY_WPS_BUTTON>; - gpios = <&pio 102 GPIO_ACTIVE_HIGH>; + gpios = <&pio 102 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 261/1095 arm64: tegra: Mark BPMP channels as no-memory-wc
In reply to Greg Kroah-HartmanFrom: Mikko Perttunen <[email protected]>
[ Upstream commit 61192a9d8a6367ae1b8234876941b037910a2459 ]
The Tegra SYSRAM contains regions access to which is restricted to certain hardware blocks on the system, and speculative accesses to those will cause issues.
Patch 'misc: sram: Only map reserved areas in Tegra SYSRAM' attempted to resolve this by only mapping the regions specified in the device tree on the assumption that there are no such restricted areas within the 64K-aligned area of memory that contains the memory we wish to map.
Turns out this assumption is wrong, as there are such areas above the 4K pages described in the device trees. As such, we need to use the bigger hammer that is no-memory-wc, which causes the memory to be mapped as Device memory to which speculative accesses are disallowed.
As such, the previous patch in the series,
'firmware: tegra: bpmp: do only aligned access to IPC memory area',
is required with this patch to make the BPMP driver only issue aligned memory accesses as those are also required with Device memory.
--- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra194.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 1 + 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/nvidia/tegra186.dtsi +1 -0
@@ -1807,6 +1807,7 @@ sram@30000000 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x30000000 0x50000>; + no-memory-wc; cpu_bpmp_tx: sram@4e000 { reg = <0x4e000 0x1000>;
arch/arm64/boot/dts/nvidia/tegra194.dtsi +1 -0
@@ -2648,6 +2648,7 @@ sram@40000000 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x40000000 0x50000>; + no-memory-wc; cpu_bpmp_tx: sram@4e000 { reg = <0x4e000 0x1000>;
arch/arm64/boot/dts/nvidia/tegra234.dtsi +1 -0
@@ -1264,6 +1264,7 @@ sram@40000000 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x40000000 0x80000>; + no-memory-wc; cpu_bpmp_tx: sram@70000 { reg = <0x70000 0x1000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 262/1095 arm64: tegra: Fix SDMMC1 CD on P2888
In reply to Greg Kroah-HartmanFrom: Tamás Szűcs <[email protected]>
[ Upstream commit b415bb7c976f1d595ed752001c0938f702645dab ]
Hook SDMMC1 CD up with CVM GPIO02 (SOC_GPIO11) used for card detection on J4 (uSD socket) on the carrier.
--- arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +1 -1
@@ -75,7 +75,7 @@ eeprom@50 { /* SDMMC1 (SD/MMC) */ mmc@3400000 { - cd-gpios = <&gpio TEGRA194_MAIN_GPIO(A, 0) GPIO_ACTIVE_LOW>; + cd-gpios = <&gpio TEGRA194_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>; }; /* SDMMC4 (eMMC) */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 263/1095 arm64: dts: qcom: sc7280: fix PCIe clock reference
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 330fc08dbdd913ac37a31f8aec1a88f68e39ae39 ]
The recent commit that dropped the PCIe PHY clock index failed to update the PCIe node reference.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -1
@@ -1839,7 +1839,7 @@ pcie1: pci@1c08000 { clocks = <&gcc GCC_PCIE_1_PIPE_CLK>, <&gcc GCC_PCIE_1_PIPE_CLK_SRC>, - <&pcie1_lane 0>, + <&pcie1_lane>, <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_PCIE_1_AUX_CLK>, <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 264/1095 erofs: wake up all waiters after z_erofs_lzma_head ready
In reply to Greg Kroah-HartmanFrom: Yuwen Chen <[email protected]>
[ Upstream commit 2df7c4bd7c1d2bc5ece5e9ed19dbd386810c2a65 ]
When the user mounts the erofs second times, the decompression thread may hung. The problem happens due to a sequence of steps like the following:
1) Task A called z_erofs_load_lzma_config which obtain all of the node from the z_erofs_lzma_head.
2) At this time, task B called the z_erofs_lzma_decompress and wanted to get a node. But the z_erofs_lzma_head was empty, the Task B had to sleep.
3) Task A release nodes and push nodes into the z_erofs_lzma_head. But task B was still sleeping.
One example report when the hung happens:
task:kworker/u3:1 state:D stack:14384 pid: 86 ppid: 2 flags:0x00004000
Workqueue: erofs_unzipd z_erofs_decompressqueue_work Call Trace: <TASK> __schedule+0x281/0x760 schedule+0x49/0xb0 z_erofs_lzma_decompress+0x4bc/0x580 ? cpu_core_flags+0x10/0x10 z_erofs_decompress_pcluster+0x49b/0xba0 ? __update_load_avg_se+0x2b0/0x330 ? __update_load_avg_se+0x2b0/0x330 ? update_load_avg+0x5f/0x690 ? update_load_avg+0x5f/0x690 ? set_next_entity+0xbd/0x110 ? _raw_spin_unlock+0xd/0x20 z_erofs_decompress_queue.isra.0+0x2e/0x50 z_erofs_decompressqueue_work+0x30/0x60 process_one_work+0x1d3/0x3a0 worker_thread+0x45/0x3a0 ? process_one_work+0x3a0/0x3a0 kthread+0xe2/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 </TASK>
--- fs/erofs/decompressor_lzma.c | 1 + 1 file changed, 1 insertion(+)
fs/erofs/decompressor_lzma.c +1 -0
@@ -143,6 +143,7 @@ int z_erofs_load_lzma_config(struct super_block *sb,DBG_BUGON (z_erofs_lzma_head); z_erofs_lzma_head = head;spin_unlock (&z_erofs_lzma_lock); +wake_up_all (&z_erofs_lzma_wq); z_erofs_lzma_max_dictsize = dict_size;mutex_unlock (&lzma_resize_mutex);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 265/1095 erofs: avoid consecutive detection for Highmem memory
In reply to Greg Kroah-HartmanFrom: Gao Xiang <[email protected]>
[ Upstream commit 448b5a1548d87c246c3d0c3df8480d3c6eb6c11a ]
Currently, vmap()s are avoided if physical addresses are consecutive for decompressed buffers.
I observed that is very common for 4KiB pclusters since the numbers of decompressed pages are almost 2 or 3.
However, such detection doesn't work for Highmem pages on 32-bit machines, let's fix it now.
--- fs/erofs/decompressor.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
fs/erofs/decompressor.c +10 -6
@@ -93,14 +93,18 @@ static int z_erofs_lz4_prepare_dstpages(struct z_erofs_lz4_decompress_ctx *ctx,if (page) {__clear_bit (j, bounced); -if (kaddr) { -if (kaddr +PAGE_SIZE ==page_address (page)) +if (!PageHighMem (page)) { +if (!i) { + kaddr =page_address (page); +continue ; + } +if (kaddr && + kaddr +PAGE_SIZE ==page_address (page)) { kaddr +=PAGE_SIZE ; -else - kaddr =NULL ; - }else if (!i) { - kaddr =page_address (page); +continue ; + } } + kaddr =NULL ;continue ; } kaddr =NULL ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 266/1095 spi: Return deferred probe error when controller isnt yet available
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit 9c22ec4ac27bcc5a54dd406da168f403327a5b55 ]
If the controller is not available, it might be in the future and we would like to re-probe the peripheral again. For that purpose return deferred probe.
--- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi.c +1 -1
@@ -2416,7 +2416,7 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data) ctlr =acpi_spi_find_controller_by_adev (adev);if (!ctlr) -return -ENODEV ; +return -EPROBE_DEFER ; lookup->ctlr = ctlr; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 267/1095 blk-mq: dont create hctx debugfs dir until q->debugfs_dir is created
In reply to Greg Kroah-HartmanFrom: Ming Lei <[email protected]>
[ Upstream commit f3ec5d11554778c24ac8915e847223ed71d104fc ]
blk_mq_debugfs_register_hctx() can be called by blk_mq_update_nr_hw_queues when gendisk isn't added yet, such as nvme tcp.
Fixes the warning of 'debugfs: Directory 'hctx0' with parent '/' already present!' which can be observed reliably when running blktests nvme/005.
--- block/blk-mq-debugfs.c | 3 +++ 1 file changed, 3 insertions(+)
block/blk-mq-debugfs.c +3 -0
@@ -737,6 +737,9 @@ void blk_mq_debugfs_register_hctx(struct request_queue *q,char name[20 ];int i; +if (!q->debugfs_dir) +return ; +snprintf (name,sizeof (name),"hctx%u" , hctx->queue_num); hctx->debugfs_dir =debugfs_create_dir (name, q->debugfs_dir);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 268/1095 spi: dw: Fix IP-core versions macro
In reply to Greg Kroah-HartmanFrom: Nandhini Srikandan <[email protected]>
[ Upstream commit 5d76b7509cb223e94ff73a672273e58f1957ac68 ]
Add the missing underscore in IP version macro to avoid compilation issue. The macro is used for IP version comparison in the current patchset.
--- drivers/spi/spi-dw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-dw.h +1 -1
@@ -23,7 +23,7 @@ ((_dws)->ip == DW_ ## _ip ## _ID)#define __dw_spi_ver_cmp (_dws, _ip, _ver, _op) \ - (dw_spi_ip_is(_dws, _ip) && (_dws)->ver _op DW_ ## _ip ## _ver) + (dw_spi_ip_is(_dws, _ip) && (_dws)->ver _op DW_ ## _ip ## _ ## _ver)#define dw_spi_ver_is (_dws, _ip, _ver) __dw_spi_ver_cmp(_dws, _ip, _ver, ==)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 269/1095 spi: Fix simplification of devm_spi_register_controller
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0 ]
This reverts commit 59ebbe40fb51 ("spi: simplifydevm_spi_register_controller").
If devm_add_action() fails in devm_add_action_or_reset(), devm_spi_unregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spi_put_controller() in error path.
--- drivers/spi/spi.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/spi/spi.c +14 -5
@@ -3068,9 +3068,9 @@ int spi_register_controller(struct spi_controller *ctlr) }EXPORT_SYMBOL_GPL (spi_register_controller); -static void devm_spi_unregister (void *ctlr) +static void devm_spi_unregister (struct device *dev,void *res) { -spi_unregister_controller (ctlr); +spi_unregister_controller (*(struct spi_controller **)res); }/**
@@ -3089,13 +3089,22 @@ static void devm_spi_unregister(void *ctlr)int devm_spi_register_controller (struct device *dev,struct spi_controller *ctlr) { +struct spi_controller **ptr;int ret; + ptr =devres_alloc (devm_spi_unregister,sizeof (*ptr),GFP_KERNEL ); +if (!ptr) +return -ENOMEM ; + ret =spi_register_controller (ctlr); -if (ret) -return ret; +if (!ret) { + *ptr = ctlr; +devres_add (dev, ptr); + }else { +devres_free (ptr); + } -return devm_add_action_or_reset (dev, devm_spi_unregister, ctlr); +return ret; }EXPORT_SYMBOL_GPL (devm_spi_register_controller);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 270/1095 spi: tegra20-slink: fix UAF in tegra_slink_remove()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 7e9984d183bb1e99e766c5c2b950ff21f7f7b6c0 ]
After calling spi_unregister_master(), the refcount of master will be decrease to 0, and it will be freed in spi_controller_release(), the device data also will be freed, so it will lead a UAF when using 'tspi'. To fix this, get the master before unregister and put it when finish using it.
--- drivers/spi/spi-tegra20-slink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-tegra20-slink.c +2 -1
@@ -1137,7 +1137,7 @@ static int tegra_slink_probe(struct platform_device *pdev)static int tegra_slink_remove (struct platform_device *pdev) { -struct spi_master *master =platform_get_drvdata (pdev); +struct spi_master *master =spi_master_get (platform_get_drvdata (pdev));struct tegra_slink_data *tspi =spi_master_get_devdata (master);spi_unregister_master (master);
@@ -1152,6 +1152,7 @@ static int tegra_slink_remove(struct platform_device *pdev)if (tspi->rx_dma_chan)tegra_slink_deinit_dma_param (tspi, true); +spi_master_put (master);return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 271/1095 hwmon: (sch56xx-common) Add DMI override table
In reply to Greg Kroah-HartmanFrom: Armin Wolf <[email protected]>
[ Upstream commit fd2d53c367ae9983c2100ac733a834e0c79d7537 ]
Some devices like the Fujitsu Celsius W380 do contain a working sch56xx hardware monitoring device, but do not contain the necessary DMI onboard device.
Do not check for the presence of an suitable onboard device on these machines. The list of affected machines was created using data collected by the Linux Hardware Project.
Tested on a Fujitsu Esprimo P720, but sadly not on a affected machine.
--- drivers/hwmon/sch56xx-common.c | 44 ++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-)
drivers/hwmon/sch56xx-common.c +34 -10
@@ -523,6 +523,28 @@ static int __init sch56xx_device_add(int address, const char *name)return PTR_ERR_OR_ZERO (sch56xx_pdev); } +static const struct dmi_system_id sch56xx_dmi_override_table[]__initconst = { + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"CELSIUS W380" ), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"ESPRIMO P710" ), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"ESPRIMO E9900" ), + }, + }, + { } +}; +/* For autoloading only */ static const struct dmi_system_id sch56xx_dmi_table[]__initconst = { {
@@ -543,16 +565,18 @@ static int __init sch56xx_init(void)if (!dmi_check_system (sch56xx_dmi_table))return -ENODEV ; -/* -* Some machines like the Esprimo P720 and Esprimo C700 have -* onboard devices named " Antiope"/" Theseus" instead of -* "Antiope"/"Theseus", so we need to check for both. -*/ -if (!dmi_find_device (DMI_DEV_TYPE_OTHER ,"Antiope" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ," Antiope" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ,"Theseus" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ," Theseus" ,NULL )) -return -ENODEV ; +if (!dmi_check_system (sch56xx_dmi_override_table)) { +/* +* Some machines like the Esprimo P720 and Esprimo C700 have +* onboard devices named " Antiope"/" Theseus" instead of +* "Antiope"/"Theseus", so we need to check for both. +*/ +if (!dmi_find_device (DMI_DEV_TYPE_OTHER ,"Antiope" ,NULL ) && + !dmi_find_device (DMI_DEV_TYPE_OTHER ," Antiope" ,NULL ) && + !dmi_find_device (DMI_DEV_TYPE_OTHER ,"Theseus" ,NULL ) && + !dmi_find_device (DMI_DEV_TYPE_OTHER ," Theseus" ,NULL )) +return -ENODEV ; + } }/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 272/1095 hwmon: (drivetemp) Add module alias
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit 5918036cfa8ded7aa8094db70295011ce2275447 ]
Adding a MODULE_ALIAS() to drivetemp will make the driver easier for modprobe to autoprobe.
--- drivers/hwmon/drivetemp.c | 1 + 1 file changed, 1 insertion(+)
drivers/hwmon/drivetemp.c +1 -0
@@ -621,3 +621,4 @@ module_exit(drivetemp_exit);MODULE_AUTHOR ("Guenter Roeck <[email protected]>" );MODULE_DESCRIPTION ("Hard drive temperature monitor" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:drivetemp" );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 273/1095 blktrace: Trace remapped requests correctly
In reply to Greg Kroah-HartmanFrom: Bart Van Assche <[email protected]>
[ Upstream commit 22c80aac882f712897b88b7ea8f5a74ea19019df ]
Trace the remapped operation and its flags instead of only the data direction of remapped operations. This issue was detected by analyzing the warnings reported by sparse related to the new blk_opf_t type.
--- kernel/trace/blktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/blktrace.c +1 -1
@@ -1059,7 +1059,7 @@ static void blk_add_trace_rq_remap(void *ignore, struct request *rq, dev_t dev, r.sector_from =cpu_to_be64 (from);__blk_add_trace (bt,blk_rq_pos (rq),blk_rq_bytes (rq), -rq_data_dir (rq),0 ,BLK_TA_REMAP ,0 , +req_op (rq), rq->cmd_flags,BLK_TA_REMAP ,0 ,sizeof (r), &r,blk_trace_request_get_cgid (rq));rcu_read_unlock (); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 274/1095 PM: domains: Ensure genpd_debugfs_dir exists before remove
In reply to Greg Kroah-HartmanFrom: Hsin-Yi Wang <[email protected]>
[ Upstream commit 37101d3c719386040ded735a5ec06974f1d94d1f ]
Both genpd_debug_add() and genpd_debug_remove() may be called indirectly by other drivers while genpd_debugfs_dir is not yet set. For example, drivers can call pm_genpd_init() in probe or pm_genpd_init() in probe fail/cleanup path:
pm_genpd_init()
--> genpd_debug_add()
pm_genpd_remove()
--> genpd_remove()
--> genpd_debug_remove()
At this time, genpd_debug_init() may not yet be called.
genpd_debug_add() checks that if genpd_debugfs_dir is NULL, it will return directly. Make sure this is also checked in pm_genpd_remove(), otherwise components under debugfs root which has the same name as other components under pm_genpd may be accidentally removed, since NULL represents debugfs root.
--- drivers/base/power/domain.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/base/power/domain.c +3 -0
@@ -219,6 +219,9 @@ static void genpd_debug_remove(struct generic_pm_domain *genpd) {struct dentry *d; +if (!genpd_debugfs_dir) +return ; + d =debugfs_lookup (genpd->name, genpd_debugfs_dir);debugfs_remove (d); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 275/1095 dm writecache: return void from functions
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
[ Upstream commit 9bc0c92e4b82adb017026dbb2aa816b1ac2bef31 ]
The functions writecache_map_remap_origin and writecache_bio_copy_ssd only return a single value, thus they can be made to return void.
This helps simplify the following IO accounting changes.
--- drivers/md/dm-writecache.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/md/dm-writecache.c +13 -13
@@ -1328,8 +1328,8 @@ enum wc_map_op { WC_MAP_ERROR, }; -static enum wc_map_op writecache_map_remap_origin (struct dm_writecache *wc,struct bio *bio, -struct wc_entry *e) +static void writecache_map_remap_origin (struct dm_writecache *wc,struct bio *bio, +struct wc_entry *e) {if (e) { sector_t next_boundary =
@@ -1337,8 +1337,6 @@ static enum wc_map_op writecache_map_remap_origin(struct dm_writecache *wc, struif (next_boundary < bio->bi_iter.bi_size >>SECTOR_SHIFT )dm_accept_partial_bio (bio, next_boundary); } - -return WC_MAP_REMAP_ORIGIN ; }static enum wc_map_op writecache_map_read (struct dm_writecache *wc,struct bio *bio)
@@ -1365,14 +1363,15 @@ static enum wc_map_op writecache_map_read(struct dm_writecache *wc, struct bio * map_op =WC_MAP_REMAP ; } }else { - map_op =writecache_map_remap_origin (wc, bio, e); +writecache_map_remap_origin (wc, bio, e); + map_op =WC_MAP_REMAP_ORIGIN ; }return map_op; } -static enum wc_map_op writecache_bio_copy_ssd (struct dm_writecache *wc,struct bio *bio, -struct wc_entry *e,bool search_used) +static void writecache_bio_copy_ssd (struct dm_writecache *wc,struct bio *bio, +struct wc_entry *e,bool search_used) {unsigned bio_size = wc->block_size;sector_t start_cache_sec =cache_sector (wc, e);
@@ -1418,8 +1417,6 @@ static enum wc_map_op writecache_bio_copy_ssd(struct dm_writecache *wc, struct b }else {writecache_schedule_autocommit (wc); } - -return WC_MAP_REMAP ; }static enum wc_map_op writecache_map_write (struct dm_writecache *wc,struct bio *bio)
@@ -1457,7 +1454,8 @@ static enum wc_map_op writecache_map_write(struct dm_writecache *wc, struct bio direct_write: wc->stats.writes_around++; e =writecache_find_entry (wc, bio->bi_iter.bi_sector,WFE_RETURN_FOLLOWING ); -return writecache_map_remap_origin (wc, bio, e); +writecache_map_remap_origin (wc, bio, e); +return WC_MAP_REMAP_ORIGIN ; } wc->stats.writes_blocked_on_freelist++;writecache_wait_on_freelist (wc);
@@ -1468,10 +1466,12 @@ static enum wc_map_op writecache_map_write(struct dm_writecache *wc, struct bio wc->uncommitted_blocks++; wc->stats.writes_allocate++; bio_copy: -if (WC_MODE_PMEM (wc)) +if (WC_MODE_PMEM (wc)) {bio_copy_block (wc, bio,memory_data (wc, e)); -else -return writecache_bio_copy_ssd (wc, bio, e, search_used); + }else { +writecache_bio_copy_ssd (wc, bio, e, search_used); +return WC_MAP_REMAP ; + } }while (bio->bi_iter.bi_size);if (unlikely (bio->bi_opf &REQ_FUA || wc->uncommitted_blocks >= wc->autocommit_blocks))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 276/1095 dm writecache: count number of blocks read, not number of read bios
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
[ Upstream commit 2c6e755b49d273243431f5f1184654e71221fc78 ]
Change dm-writecache, so that it counts the number of blocks read instead of the number of read bios. Bios can be split and requeued using the dm_accept_partial_bio function, so counting bios caused inaccurate results.
--- Documentation/admin-guide/device-mapper/writecache.rst | 4 ++-- drivers/md/dm-writecache.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
Documentation/admin-guide/device-mapper/writecache.rst +2 -2
@@ -78,8 +78,8 @@ Status: 2. the number of blocks 3. the number of free blocks 4. the number of blocks under writeback -5. the number of read requests -6. the number of read requests that hit the cache +5. the number of read blocks +6. the number of read blocks that hit the cache 7. the number of write requests 8. the number of write requests that hit uncommitted block 9. the number of write requests that hit committed block
drivers/md/dm-writecache.c +1 -0
@@ -1364,6 +1364,7 @@ static enum wc_map_op writecache_map_read(struct dm_writecache *wc, struct bio * } }else {writecache_map_remap_origin (wc, bio, e); + wc->stats.reads += (bio->bi_iter.bi_size - wc->block_size) >> wc->block_size_bits; map_op =WC_MAP_REMAP_ORIGIN ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 277/1095 dm writecache: count number of blocks written, not number of write bios
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
[ Upstream commit b2676e1482af89714af6988ce5d31a84692e2530 ]
Change dm-writecache, so that it counts the number of blocks written instead of the number of write bios. Bios can be split and requeued using the dm_accept_partial_bio function, so counting bios caused inaccurate results.
--- .../admin-guide/device-mapper/writecache.rst | 10 +++++----- drivers/md/dm-writecache.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-)
Documentation/admin-guide/device-mapper/writecache.rst +5 -5
@@ -80,11 +80,11 @@ Status: 4. the number of blocks under writeback 5. the number of read blocks 6. the number of read blocks that hit the cache -7. the number of write requests -8. the number of write requests that hit uncommitted block -9. the number of write requests that hit committed block -10. the number of write requests that bypass the cache -11. the number of write requests that are allocated in the cache +7. the number of write blocks +8. the number of write blocks that hit uncommitted block +9. the number of write blocks that hit committed block +10. the number of write blocks that bypass the cache +11. the number of write blocks that are allocated in the cache 12. the number of write requests that are blocked on the freelist 13. the number of flush requests 14. the number of discard requests
drivers/md/dm-writecache.c +9 -3
@@ -1412,6 +1412,9 @@ static void writecache_bio_copy_ssd(struct dm_writecache *wc, struct bio *bio, bio->bi_iter.bi_sector = start_cache_sec;dm_accept_partial_bio (bio, bio_size >>SECTOR_SHIFT ); + wc->stats.writes += bio->bi_iter.bi_size >> wc->block_size_bits; + wc->stats.writes_allocate += (bio->bi_iter.bi_size - wc->block_size) >> wc->block_size_bits; +if (unlikely (wc->uncommitted_blocks >= wc->autocommit_blocks)) { wc->uncommitted_blocks =0 ;queue_work (wc->writeback_wq, &wc->flush_work);
@@ -1427,9 +1430,10 @@ static enum wc_map_op writecache_map_write(struct dm_writecache *wc, struct bio do { bool found_entry = false; bool search_used = false; - wc->stats.writes++; - if (writecache_has_error(wc)) + if (writecache_has_error(wc)) { + wc->stats.writes += bio->bi_iter.bi_size >> wc->block_size_bits; return WC_MAP_ERROR; + } e = writecache_find_entry(wc, bio->bi_iter.bi_sector, 0); if (e) { if (!writecache_entry_is_committed(wc, e)) {
@@ -1453,9 +1457,10 @@ static enum wc_map_op writecache_map_write(struct dm_writecache *wc, struct bioif (unlikely (!e)) {if (!WC_MODE_PMEM (wc) && !found_entry) { direct_write: - wc->stats.writes_around++; e =writecache_find_entry (wc, bio->bi_iter.bi_sector,WFE_RETURN_FOLLOWING );writecache_map_remap_origin (wc, bio, e); + wc->stats.writes_around += bio->bi_iter.bi_size >> wc->block_size_bits; + wc->stats.writes += bio->bi_iter.bi_size >> wc->block_size_bits;return WC_MAP_REMAP_ORIGIN ; } wc->stats.writes_blocked_on_freelist++;
@@ -1469,6 +1474,7 @@ static enum wc_map_op writecache_map_write(struct dm_writecache *wc, struct bio bio_copy:if (WC_MODE_PMEM (wc)) {bio_copy_block (wc, bio,memory_data (wc, e)); + wc->stats.writes++; }else {writecache_bio_copy_ssd (wc, bio, e, search_used);return WC_MAP_REMAP ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 278/1095 dm writecache: count number of blocks discarded, not number of discard bios
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
[ Upstream commit 2ee73ef60db4d79b9f9b8cd501e8188b5179449f ]
Change dm-writecache, so that it counts the number of blocks discarded instead of the number of discard bios. Make it consistent with the read and write statistics counters that were changed to count the number of blocks instead of bios.
--- Documentation/admin-guide/device-mapper/writecache.rst | 2 +- drivers/md/dm-writecache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/admin-guide/device-mapper/writecache.rst +1 -1
@@ -87,7 +87,7 @@ Status: 11. the number of write blocks that are allocated in the cache 12. the number of write requests that are blocked on the freelist 13. the number of flush requests -14. the number of discard requests +14. the number of discarded blocks Messages: flush
drivers/md/dm-writecache.c +1 -1
@@ -1513,7 +1513,7 @@ static enum wc_map_op writecache_map_flush(struct dm_writecache *wc, struct biostatic enum wc_map_op writecache_map_discard (struct dm_writecache *wc,struct bio *bio) { - wc->stats.discards++; + wc->stats.discards += bio->bi_iter.bi_size >> wc->block_size_bits;if (writecache_has_error (wc))return WC_MAP_ERROR ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 279/1095 regulator: of: Fix refcount leak bug in of_get_regulation_constraints()
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
[ Upstream commit 66efb665cd5ad69b27dca8571bf89fc6b9c628a4 ]
We should call the of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount.
--- drivers/regulator/of_regulator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/regulator/of_regulator.c +5 -1
@@ -264,8 +264,12 @@ static int of_get_regulation_constraints(struct device *dev, } suspend_np =of_get_child_by_name (np, regulator_states[i]); -if (!suspend_np || !suspend_state) +if (!suspend_np)continue ; +if (!suspend_state) { +of_node_put (suspend_np); +continue ; + }if (!of_property_read_u32 (suspend_np,"regulator-mode" , &pval)) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 280/1095 soc: qcom: Make QCOM_RPMPD depend on PM
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit a6232f2aa99ce470799992e99e0012945bb5308f ]
QCOM_RPMPD requires PM_GENERIC_DOMAINS/_OF, which in turns requires CONFIG_PM. I forgot about the latter in my earlier patch (it's still in -next as of the time of committing, hence no Fixes: tag). Fix it.
--- drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/soc/qcom/Kconfig +1 -0
@@ -129,6 +129,7 @@ config QCOM_RPMHPD config QCOM_RPMPD tristate "Qualcomm RPM Power domain driver" + depends on PM depends on QCOM_SMD_RPM help QCOM RPM Power domain driver to support power-domains with
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 281/1095 soc: qcom: socinfo: Fix the id of SA8540P SoC
In reply to Greg Kroah-HartmanFrom: Parikshit Pareek <[email protected]>
[ Upstream commit 5bed21af0005cc7d8bb05d2c4a63afbcede23382 ]
Change the id of SA8540P to its correct value, i.e., 461. Also, map the id 460 to its correct values, i.e. SA8295P.
--- drivers/soc/qcom/socinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/qcom/socinfo.c +2 -1
@@ -328,7 +328,8 @@ static const struct soc_id soc_id[] = { { 455, "QRB5165" }, { 457, "SM8450" }, { 459, "SM7225" }, - { 460, "SA8540P" }, + { 460, "SA8295P" }, + { 461, "SA8540P" }, { 480, "SM8450" }, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 282/1095 arm64: dts: qcom: msm8998: Make regulator voltages multiple of step-size
In reply to Greg Kroah-HartmanFrom: Marijn Suijten <[email protected]>
[ Upstream commit 2aa54fa87cca1fa43870a9caf4fcce00eb087fa5 ]
These voltages are not a multiple of the given step-size 8000 (with base voltage 1664000) in pm8998_pldo, resulting in PLDO regulators l18 and l22 failing to validate and in turn not probing the rpm-pm8998-regulator driver:
l18: unsupportable voltage constraints 2856000-2848000uV
qcom_rpm_smd_regulator rpm-glink:rpm-requests:pm8998-regulators: l18: devm_regulator_register() failed, ret=-22
Round the voltages down for the sake of erring on the safe side, leaving a comment in place to document this discrepancy wrt downstream sources.
--- .../dts/qcom/msm8998-sony-xperia-yoshino-poplar.dts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino-poplar.dts +6 -4
@@ -26,11 +26,13 @@ &lab { }; &vreg_l18a_2p85 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; + /* Note: Round-down from 2850000 to be a multiple of PLDO step-size 8000 */ + regulator-min-microvolt = <2848000>; + regulator-max-microvolt = <2848000>; }; &vreg_l22a_2p85 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; + /* Note: Round-down from 2700000 to be a multiple of PLDO step-size 8000 */ + regulator-min-microvolt = <2696000>; + regulator-max-microvolt = <2696000>; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 283/1095 arm64: dts: qcom: qcs404: Fix incorrect USB2 PHYs assignment
In reply to Greg Kroah-HartmanFrom: Sumit Garg <[email protected]>
[ Upstream commit 58577966a42fc0b660b5e2c7c9e5a2241363ea83 ]
Currently the DT for QCS404 SoC has setup for 2 USB2 PHYs with one each assigned to USB3 controller and USB2 controller. This assignment is incorrect which only works by luck: as when each USB HCI comes up it configures the *other* controllers PHY which is enough to make them happy. If, for any reason, we were to disable one of the controllers then both would stop working.
This was a difficult inconsistency to be caught which was found while trying to enable USB support in u-boot. So with all the required drivers ported to u-boot, I couldn't get the same USB storage device enumerated in u-boot which was being enumerated fine by the kernel.
The root cause of the problem came out to be that I wasn't enabling USB2
PHY: "usb2_phy_prim" in u-boot. Then I realised that via simply disabling the same USB2 PHY currently assigned to USB2 host controller in the kernel disabled enumeration for USB3 host controller as well.
So fix this inconsistency by correctly assigning USB2 PHYs.
--- arch/arm64/boot/dts/qcom/qcs404.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/qcs404.dtsi +2 -2
@@ -548,7 +548,7 @@ dwc3@7580000 { compatible = "snps,dwc3"; reg = <0x07580000 0xcd00>; interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; - phys = <&usb2_phy_sec>, <&usb3_phy>; + phys = <&usb2_phy_prim>, <&usb3_phy>; phy-names = "usb2-phy", "usb3-phy"; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>;
@@ -577,7 +577,7 @@ dwc3@78c0000 { compatible = "snps,dwc3"; reg = <0x078c0000 0xcc00>; interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; - phys = <&usb2_phy_prim>; + phys = <&usb2_phy_sec>; phy-names = "usb2-phy"; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 284/1095 ARM: dts: qcom: msm8974-FP2: Add supplies for remoteprocs
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit fb5e339fb1bc9eb7f34b341d995e4ab39c03588e ]
Those were removed from msm8974.dtsi as part of a recent cleanup commit, so add them back for FP2.
--- arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +11 -0
@@ -131,6 +131,17 @@ wcnss { }; }; +&remoteproc_adsp { + cx-supply = <&pm8841_s2>; +}; + +&remoteproc_mss { + cx-supply = <&pm8841_s2>; + mss-supply = <&pm8841_s3>; + mx-supply = <&pm8841_s1>; + pll-supply = <&pm8941_l12>; +}; + &rpm_requests { pm8841-regulators { compatible = "qcom,rpm-pm8841-regulators";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 285/1095 ARM: dts: qcom: msm8974: Disable remoteprocs by default
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit 8d8be8dd7c1f5d50f84ecc7a6a41962da48c6164 ]
The remoteproc configuration in qcom-msm8974.dtsi is incomplete because it lacks the regulator supplies that should be added in the board DT files. Some of the msm8974 boards are currently missing the regulator supplies and should have the remoteprocs disabled to avoid making use of the incomplete configuration.
This also fixes dtbs_check warnings after moving "qcom,msm8974-mss-pil" to DT schema, which rightfully complains that the -supply properties are missing for some boards:
qcom-apq8074-dragonboard.dtb:
remoteproc@fc880000: 'pll-supply' is a required property
From schema: remoteproc/qcom,msm8916-mss-pil.yaml
remoteproc@fc880000: 'mss-supply' is a required property
From schema: remoteproc/qcom,msm8916-mss-pil.yaml
remoteproc@fc880000: 'oneOf' conditional failed, one must be fixed:
'power-domains' is a required property 'power-domain-names' is a required property, or 'cx-supply' is a required property
'mx-supply' is a required property
--- arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 2 ++ arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 2 ++ arch/arm/boot/dts/qcom-msm8974.dtsi | 4 ++++ 3 files changed, 8 insertions(+)
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +2 -0
@@ -132,10 +132,12 @@ wcnss { }; &remoteproc_adsp { + status = "okay"; cx-supply = <&pm8841_s2>; }; &remoteproc_mss { + status = "okay"; cx-supply = <&pm8841_s2>; mss-supply = <&pm8841_s3>; mx-supply = <&pm8841_s1>;
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +2 -0
@@ -467,10 +467,12 @@ fuelgauge_pin: fuelgauge-int-pin { }; &remoteproc_adsp { + status = "okay"; cx-supply = <&pma8084_s2>; }; &remoteproc_mss { + status = "okay"; cx-supply = <&pma8084_s2>; mss-supply = <&pma8084_s6>; mx-supply = <&pma8084_s1>;
arch/arm/boot/dts/qcom-msm8974.dtsi +4 -0
@@ -1150,6 +1150,8 @@ remoteproc_mss: remoteproc@fc880000 { qcom,smem-states = <&modem_smp2p_out 0>; qcom,smem-state-names = "stop"; + status = "disabled"; + mba { memory-region = <&mba_region>; };
@@ -1401,6 +1403,8 @@ remoteproc_adsp: remoteproc@fe200000 { qcom,smem-states = <&adsp_smp2p_out 0>; qcom,smem-state-names = "stop"; + status = "disabled"; + smd-edge { interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 286/1095 irqdomain: Report irq number for NOMAP domains
In reply to Greg Kroah-HartmanFrom: Xu Qiang <[email protected]>
[ Upstream commit 6f194c99f466147148cc08452718b46664112548 ]
When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value.
--- kernel/irq/irqdomain.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/irq/irqdomain.c +2 -0
@@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain, data =irq_domain_get_irq_data (domain, hwirq);if (data && data->hwirq == hwirq) desc =irq_data_to_desc (data); +if (irq && desc) + *irq = hwirq; }return desc;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 287/1095 perf: RISC-V: Add of_node_put() when breaking out of for_each_of_cpu_node()
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
[ Upstream commit 491f10d08fdae10a177edf6af4f43b83b293114b ]
In pmu_sbi_setup_irqs(), we should call of_node_put() for the 'cpu' when breaking out of for_each_of_cput_node() as its refcount will be automatically increased and decreased during the iteration.
--- drivers/perf/riscv_pmu_sbi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/perf/riscv_pmu_sbi.c +4 -1
@@ -682,12 +682,15 @@ static int pmu_sbi_setup_irqs(struct riscv_pmu *pmu, struct platform_device *pde child =of_get_compatible_child (cpu,"riscv,cpu-intc" );if (!child) {pr_err ("Failed to find INTC node\n" ); +of_node_put (cpu);return -ENODEV ; } domain =irq_find_host (child);of_node_put (child); -if (domain) +if (domain) { +of_node_put (cpu);break ; + } }if (!domain) {pr_err ("Failed to find INTC IRQ root domain\n" );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 288/1095 drivers/perf: arm_spe: Fix consistency of SYS_PMSCR_EL1.CX
In reply to Greg Kroah-HartmanFrom: Anshuman Khandual <[email protected]>
[ Upstream commit 92f2b8bafa3d6e89c750e9d301a8b7ab76aaa8b6 ]
The arm_spe_pmu driver will enable SYS_PMSCR_EL1.CX in order to add CONTEXT packets into the traces, if the owner of the perf event runs with required capabilities i.e CAP_PERFMON or CAP_SYS_ADMIN via perfmon_capable() helper.
The value of this bit is computed in the arm_spe_event_to_pmscr() function but the check for capabilities happens in the pmu event init callback i.e arm_spe_pmu_event_init(). This suggests that the value of the CX bit should remain consistent for the duration of the perf session.
However, the function arm_spe_event_to_pmscr() may be called later during the event start callback i.e arm_spe_pmu_start() when the "current" process is not the owner of the perf session, hence the CX bit setting is currently not consistent.
One way to fix this, is by caching the required value of the CX bit during the initialization of the PMU event, so that it remains consistent for the duration of the session. It uses currently unused 'event->hw.flags' element to cache perfmon_capable() value, which can be referred during event start callback to compute SYS_PMSCR_EL1.CX. This ensures consistent availability of context packets in the trace as per event owner capabilities.
Drop BIT(SYS_PMSCR_EL1_CX_SHIFT) check in arm_spe_pmu_event_init(), because now CX bit cannot be set in arm_spe_event_to_pmscr() with perfmon_capable() disabled.
--- drivers/perf/arm_spe_pmu.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/perf/arm_spe_pmu.c +20 -2
@@ -39,6 +39,24 @@#include <asm/mmu.h> #include <asm/sysreg.h> +/* +* Cache if the event is allowed to trace Context information. +* This allows us to perform the check, i.e, perfmon_capable(), +* in the context of the event owner, once, during the event_init(). +*/ +#define SPE_PMU_HW_FLAGS_CX BIT(0) + +static void set_spe_event_has_cx (struct perf_event *event) +{ +if (IS_ENABLED (CONFIG_PID_IN_CONTEXTIDR ) &&perfmon_capable ()) + event->hw.flags |=SPE_PMU_HW_FLAGS_CX ; +} + +static bool get_spe_event_has_cx (struct perf_event *event) +{ +return !!(event->hw.flags &SPE_PMU_HW_FLAGS_CX ); +} +#define ARM_SPE_BUF_PAD_BYTE 0struct arm_spe_pmu_buf {
@@ -272,7 +290,7 @@ static u64 arm_spe_event_to_pmscr(struct perf_event *event)if (!attr->exclude_kernel) reg |=BIT (SYS_PMSCR_EL1_E1SPE_SHIFT ); -if (IS_ENABLED (CONFIG_PID_IN_CONTEXTIDR ) &&perfmon_capable ()) +if (get_spe_event_has_cx (event)) reg |=BIT (SYS_PMSCR_EL1_CX_SHIFT );return reg;
@@ -709,10 +727,10 @@ static int arm_spe_pmu_event_init(struct perf_event *event) !(spe_pmu->features & SPE_PMU_FEAT_FILT_LAT))return -EOPNOTSUPP ; +set_spe_event_has_cx (event); reg =arm_spe_event_to_pmscr (event);if (!perfmon_capable () && (reg & (BIT (SYS_PMSCR_EL1_PA_SHIFT ) | -BIT (SYS_PMSCR_EL1_CX_SHIFT ) |BIT (SYS_PMSCR_EL1_PCT_SHIFT ))))return -EACCES ;
Signature · 9 lines
2.35.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Greg Kroah-Hartman
maintainerPATCH 289/1095 nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt()
In reply to Greg Kroah-HartmanFrom: Nicolas Saenz Julienne <[email protected]>
[ Upstream commit 5c66d1b9b30f737fcef85a0b75bfe0590e16b62a ]
dequeue_task_rt() only decrements 'rt_rq->rt_nr_running' after having called sched_update_tick_dependency() preventing it from re-enabling the tick on systems that no longer have pending SCHED_RT tasks but have multiple runnable SCHED_OTHER tasks:
dequeue_task_rt()
dequeue_rt_entity()
dequeue_rt_stack()
dequeue_top_rt_rq()
sub_nr_running() // decrements rq->nr_running
sched_update_tick_dependency()
sched_can_stop_tick() // checks rq->rt.rt_nr_running,
...
__dequeue_rt_entity()
dec_rt_tasks() // decrements rq->rt.rt_nr_running
...Every other scheduler class performs the operation in the opposite order, and sched_update_tick_dependency() expects the values to be updated as such. So avoid the misbehaviour by inverting the order in which the above operations are performed in the RT scheduler.
--- kernel/sched/rt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
kernel/sched/rt.c +9 -6
@@ -430,7 +430,7 @@ static inline void rt_queue_push_tasks(struct rq *rq)#endif /* CONFIG_SMP */ static void enqueue_top_rt_rq (struct rt_rq *rt_rq); -static void dequeue_top_rt_rq (struct rt_rq *rt_rq); +static void dequeue_top_rt_rq (struct rt_rq *rt_rq,unsigned int count);static inline int on_rt_rq (struct sched_rt_entity *rt_se) {
@@ -551,7 +551,7 @@ static void sched_rt_rq_dequeue(struct rt_rq *rt_rq) rt_se = rt_rq->tg->rt_se[cpu];if (!rt_se) { -dequeue_top_rt_rq (rt_rq); +dequeue_top_rt_rq (rt_rq, rt_rq->rt_nr_running);/* Kick cpufreq (see the comment in kernel/sched/sched.h). */ cpufreq_update_util (rq_of_rt_rq (rt_rq),0 ); }
@@ -637,7 +637,7 @@ static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq)static inline void sched_rt_rq_dequeue (struct rt_rq *rt_rq) { -dequeue_top_rt_rq (rt_rq); +dequeue_top_rt_rq (rt_rq, rt_rq->rt_nr_running); }static inline int rt_rq_throttled (struct rt_rq *rt_rq)
@@ -1039,7 +1039,7 @@ static void update_curr_rt(struct rq *rq) }static void -dequeue_top_rt_rq (struct rt_rq *rt_rq) +dequeue_top_rt_rq (struct rt_rq *rt_rq,unsigned int count) {struct rq *rq =rq_of_rt_rq (rt_rq);
@@ -1050,7 +1050,7 @@ dequeue_top_rt_rq(struct rt_rq *rt_rq)BUG_ON (!rq->nr_running); -sub_nr_running (rq, rt_rq->rt_nr_running); +sub_nr_running (rq, count); rt_rq->rt_queued =0 ; }
@@ -1436,18 +1436,21 @@ static void __dequeue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flagstatic void dequeue_rt_stack (struct sched_rt_entity *rt_se,unsigned int flags) {struct sched_rt_entity *back =NULL ; +unsigned int rt_nr_running;for_each_sched_rt_entity (rt_se) { rt_se->back = back; back = rt_se; } -dequeue_top_rt_rq (rt_rq_of_se (back)); + rt_nr_running =rt_rq_of_se (back)->rt_nr_running;for (rt_se = back; rt_se; rt_se = rt_se->back) {if (on_rt_rq (rt_se))__dequeue_rt_entity (rt_se, flags); } + +dequeue_top_rt_rq (rt_rq_of_se (back), rt_nr_running); }static void enqueue_rt_entity (struct sched_rt_entity *rt_se,unsigned int flags)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 290/1095 x86/extable: Fix ex_handler_msr() print condition
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit a1a5482a2c6e38a3ebed32e571625c56a8cc41a6 ]
Quoted 10 lines · Stephane Eranian
Some changes to the way invalid MSR accesses are reported by the kernel is causing some problems with messages printed on the console.
We have seen several cases of
ex_handler_msr()printing invalid MSR accesses once but the callstack multiple times causing confusion on the console.The problem here is that another earlier commit (5.13):
Quoted 7 lines
a358f40600b3("once: implementDO_ONCE_LITEfor non-fast-path "do once" functionality")Modifies all the pr_*_once() calls to always return true claiming that no caller is ever checking the return value of the functions.
This is why we are seeing the callstack printed without the associated
printk()msg.
Extract the ONCE_IF(cond) part into __ONCE_LTE_IF() and use that to implement DO_ONCE_LITE_IF() and fix the extable code.
--- arch/x86/mm/extable.c | 16 +++++++++------- include/linux/once_lite.h | 20 ++++++++++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-)
arch/x86/mm/extable.c +9 -7
@@ -94,16 +94,18 @@ static bool ex_handler_copy(const struct exception_table_entry *fixup,static bool ex_handler_msr (const struct exception_table_entry *fixup,struct pt_regs *regs,bool wrmsr,bool safe,int reg) { -if (!safe && wrmsr && -pr_warn_once ("unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pS)\n" , - (unsigned int )regs->cx, (unsigned int )regs->dx, - (unsigned int )regs->ax, regs->ip, (void *)regs->ip)) +if (__ONCE_LITE_IF (!safe && wrmsr)) { +pr_warn ("unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pS)\n" , + (unsigned int )regs->cx, (unsigned int )regs->dx, + (unsigned int )regs->ax, regs->ip, (void *)regs->ip);show_stack_regs (regs); + } -if (!safe && !wrmsr && -pr_warn_once ("unchecked MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pS)\n" , - (unsigned int )regs->cx, regs->ip, (void *)regs->ip)) +if (__ONCE_LITE_IF (!safe && !wrmsr)) { +pr_warn ("unchecked MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pS)\n" , + (unsigned int )regs->cx, regs->ip, (void *)regs->ip);show_stack_regs (regs); + }if (!wrmsr) {/* Pretend that the read succeeded and returned 0. */
include/linux/once_lite.h +16 -4
@@ -9,15 +9,27 @@*/ #define DO_ONCE_LITE (func, ...) \ DO_ONCE_LITE_IF(true, func, ##__VA_ARGS__) -#define DO_ONCE_LITE_IF (condition, func, ...) \ + +#define __ONCE_LITE_IF (condition) \ ({ \ static bool __section(".data.once") __already_done; \ - bool __ret_do_once = !!(condition); \ + bool __ret_cond = !!(condition); \ + bool __ret_once = false; \ \ - if (unlikely(__ret_do_once && !__already_done)) { \ + if (unlikely(__ret_cond && !__already_done)) { \ __already_done = true; \ - func(__VA_ARGS__); \ + __ret_once = true; \ } \ + unlikely(__ret_once); \ + }) + +#define DO_ONCE_LITE_IF (condition, func, ...) \ + ({ \ + bool __ret_do_once = !!(condition); \ + \ + if (__ONCE_LITE_IF(__ret_do_once)) \ + func(__VA_ARGS__); \ + \ unlikely(__ret_do_once); \ })
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 291/1095 io_uring: move to separate directory
In reply to Greg Kroah-HartmanFrom: Jens Axboe <[email protected]>
[ Upstream commit ed29b0b4fd835b058ddd151c49d021e28d631ee6 ]
In preparation for splitting io_uring up a bit, move it into its own top level directory. It didn't really belong in fs/ anyway, as it's not a file system only API.
This adds io_uring/ and moves the core files in there, and updates the MAINTAINERS file for the new location.
---
MAINTAINERS | 7 +------
Makefile | 1 +
fs/Makefile | 2 --
io_uring/Makefile | 6 ++++++
{fs => io_uring}/io-wq.c | 0
{fs => io_uring}/io-wq.h | 0
{fs => io_uring}/io_uring.c | 2 +-
kernel/sched/core.c | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
create mode 100644 io_uring/Makefile
rename {fs => io_uring}/io-wq.c (100%)
rename {fs => io_uring}/io-wq.h (100%)
rename {fs => io_uring}/io_uring.c (99%)MAINTAINERS +1 -6
@@ -7599,9 +7599,6 @@ F: include/linux/fs.h F: include/linux/fs_types.h F: include/uapi/linux/fs.h F: include/uapi/linux/openat2.h -X: fs/io-wq.c -X: fs/io-wq.h -X: fs/io_uring.c FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER M: Riku Voipio <[email protected]>
@@ -10277,9 +10274,7 @@ L: [email protected] S: Maintained T: git git://git.kernel.dk/linux-block T: git git://git.kernel.dk/liburing -F: fs/io-wq.c -F: fs/io-wq.h -F: fs/io_uring.c +F: io_uring/ F: include/linux/io_uring.h F: include/uapi/linux/io_uring.h F: tools/io_uring/
Makefile +1 -0
@@ -1100,6 +1100,7 @@ export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ core-$(CONFIG_BLOCK) += block/ +core-$(CONFIG_IO_URING) += io_uring/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
fs/Makefile +0 -2
@@ -34,8 +34,6 @@ obj-$(CONFIG_TIMERFD) += timerfd.o obj-$(CONFIG_EVENTFD) += eventfd.o obj-$(CONFIG_USERFAULTFD) += userfaultfd.o obj-$(CONFIG_AIO) += aio.o -obj-$(CONFIG_IO_URING) += io_uring.o -obj-$(CONFIG_IO_WQ) += io-wq.o obj-$(CONFIG_FS_DAX) += dax.o obj-$(CONFIG_FS_ENCRYPTION) += crypto/ obj-$(CONFIG_FS_VERITY) += verity/
io_uring/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for io_uring + +obj-$(CONFIG_IO_URING) += io_uring.o +obj-$(CONFIG_IO_WQ) += io-wq.o
io_uring/io-wq.c renamed from fs/io-wq.c +0 -0
io_uring/io-wq.h renamed from fs/io-wq.h +0 -0
io_uring/io_uring.c renamed from fs/io_uring.c +1 -1
@@ -86,7 +86,7 @@#include <uapi/linux/io_uring.h> -#include "internal.h" +#include "../fs/internal.h" #include "io-wq.h" #define IORING_MAX_ENTRIES 32768
kernel/sched/core.c +1 -1
@@ -88,7 +88,7 @@#include "stats.h" #include "../workqueue_internal.h" -#include "../../fs/io-wq.h" +#include "../../io_uring/io-wq.h" #include "../smpboot.h" /*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 292/1095 scsi: nvme-fc: Add new routine nvme_fc_io_getuuid()
In reply to Greg Kroah-HartmanFrom: Muneendra Kumar <[email protected]>
[ Upstream commit 827fc630e4c8087df5a8e8ee013b686bd6f13736 ]
Add nvme_fc_io_getuuid() to the nvme-fc transport. The routine is invoked by the FC LLDD on a per-I/O request basis. The routine translates from the FC-specific request structure to the bio and the cgroup structure in order to obtain the FC appid stored in the cgroup structure. If a value is not set or a bio is not found, a NULL appid (aka uuid) will be returned to the LLDD.
--- drivers/nvme/host/fc.c | 18 ++++++++++++++++++ include/linux/nvme-fc-driver.h | 14 ++++++++++++++ 2 files changed, 32 insertions(+)
drivers/nvme/host/fc.c +18 -0
@@ -1899,6 +1899,24 @@ nvme_fc_ctrl_ioerr_work(struct work_struct *work)nvme_fc_error_recovery (ctrl,"transport detected io error" ); } +/* +* nvme_fc_io_getuuid - Routine called to get the appid field +* associated with request by the lldd +* @req:IO request from nvme fc to driver +* Returns: UUID if there is an appid associated with VM or +* NULL if the user/libvirt has not set the appid to VM +*/ +char *nvme_fc_io_getuuid (struct nvmefc_fcp_req *req) +{ +struct nvme_fc_fcp_op *op =fcp_req_to_fcp_op (req); +struct request *rq = op->rq; + +if (!IS_ENABLED (CONFIG_BLK_CGROUP_FC_APPID ) || !rq->bio) +return NULL ; +return blkcg_get_fc_appid (rq->bio); +} +EXPORT_SYMBOL_GPL (nvme_fc_io_getuuid); +static void nvme_fc_fcpio_done (struct nvmefc_fcp_req *req) {
include/linux/nvme-fc-driver.h +14 -0
@@ -564,6 +564,15 @@ int nvme_fc_rcv_ls_req(struct nvme_fc_remote_port *remoteport, void *lsreqbuf, u32 lsreqbuf_len); +/* +* Routine called to get the appid field associated with request by the lldd +* +* If the return value is NULL : the user/libvirt has not set the appid to VM +* If the return value is non-zero: Returns the appid associated with VM +* +* @req: IO request from nvme fc to driver +*/ +char *nvme_fc_io_getuuid (struct nvmefc_fcp_req *req);/* * *************** LLDD FC-NVME Target/Subsystem API ***************
@@ -1048,5 +1057,10 @@ int nvmet_fc_rcv_fcp_req(struct nvmet_fc_target_port *tgtport,void nvmet_fc_rcv_fcp_abort (struct nvmet_fc_target_port *tgtport,struct nvmefc_tgt_fcp_req *fcpreq); +/* +* add a define, visible to the compiler, that indicates support +* for feature. Allows for conditional compilation in LLDDs. +*/ +#define NVME_FC_FEAT_UUID 0x0001#endif /* _NVME_FC_DRIVER_H */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 293/1095 arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definition
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
[ Upstream commit 6a437208cb942a2dd98f7e1c3fd347ed3d425ffc ]
Starting with FEAT_WFXT in ARMv8.7, the TI field in the ISS that is reported on a WFx trap is expanded by one bit to allow the description of WFET and WFIT.
Special care is taken to exclude the WFxT bit from the mask used to match WFI so that it also matches WFIT when trapped from EL0.
--- arch/arm64/include/asm/esr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/include/asm/esr.h +4 -2
@@ -133,7 +133,8 @@#define ESR_ELx_CV (UL(1) << 24)#define ESR_ELx_COND_SHIFT (20)#define ESR_ELx_COND_MASK (UL(0xF) << ESR_ELx_COND_SHIFT) -#define ESR_ELx_WFx_ISS_TI (UL(1) << 0) +#define ESR_ELx_WFx_ISS_TI (UL(3) << 0) +#define ESR_ELx_WFx_ISS_WFxT (UL(2) << 0)#define ESR_ELx_WFx_ISS_WFI (UL(0) << 0)#define ESR_ELx_WFx_ISS_WFE (UL(1) << 0)#define ESR_ELx_xVC_IMM_MASK ((1UL << 16) - 1)
@@ -146,7 +147,8 @@#define DISR_EL1_ESR_MASK (ESR_ELx_AET | ESR_ELx_EA | ESR_ELx_FSC)/* ESR value templates for specific events */ -#define ESR_ELx_WFx_MASK (ESR_ELx_EC_MASK | ESR_ELx_WFx_ISS_TI) +#define ESR_ELx_WFx_MASK (ESR_ELx_EC_MASK | \ + (ESR_ELx_WFx_ISS_TI & ~ESR_ELx_WFx_ISS_WFxT))#define ESR_ELx_WFx_WFI_VAL ((ESR_ELx_EC_WFx << ESR_ELx_EC_SHIFT) | \ ESR_ELx_WFx_ISS_WFI)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 294/1095 io_uring: Dont require reinitable percpu_ref
In reply to Greg Kroah-HartmanFrom: Michal Koutný <[email protected]>
[ Upstream commit 48904229928d941ce1db181b991948387ab463cd ]
The commit 8bb649ee1da3 ("io_uring: remove ring quiesce for io_uring_register") removed the worklow relying on reinit/resurrection of the percpu_ref, hence, initialization with that requested is a relic.
This is based on code review, this causes no real bug (and theoretically can't). Technically it's a revert of commit 214828962dea ("io_uring:
initialize percpu refcounters using PERCU_REF_ALLOW_REINIT") but since the flag omission is now justified, I'm not making this a revert.
--- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/io_uring.c +1 -1
@@ -1576,7 +1576,7 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)INIT_LIST_HEAD (&ctx->io_buffers[i]);if (percpu_ref_init (&ctx->refs, io_ring_ctx_ref_free, -PERCPU_REF_ALLOW_REINIT ,GFP_KERNEL )) +0 ,GFP_KERNEL )) goto err; ctx->flags = p->flags;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 295/1095 selftests/seccomp: Fix compile warning when CC=clang
In reply to Greg Kroah-HartmanFrom: YiFei Zhu <[email protected]>
[ Upstream commit 3ce4b78f73e8e00fb86bad67ee7f6fe12019707e ]
clang has -Wconstant-conversion by default, and the constant 0xAAAAAAAAA (9 As) being converted to an int, which is generally 32 bits, results in the compile warning:
clang -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/ -lpthread seccomp_bpf.c -lcap -o seccomp_bpf seccomp_bpf.c:812:67: warning: implicit conversion from 'long' to 'int' changes value from 45812984490 to -1431655766 [-Wconstant-conversion]
int kill = kill_how == KILL_PROCESS ? SECCOMP_RET_KILL_PROCESS : 0xAAAAAAAAA;
~~~~ ^~~~~~~~~~~1 warning generated.
-1431655766 is the expected truncation, 0xAAAAAAAA (8 As), so use this directly in the code to avoid the warning.
--- tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/seccomp/seccomp_bpf.c +1 -1
@@ -802,7 +802,7 @@ void kill_thread_or_group(struct __test_metadata *_metadata, .len = (unsigned short)ARRAY_SIZE(filter_thread), .filter = filter_thread, }; -int kill = kill_how ==KILL_PROCESS ?SECCOMP_RET_KILL_PROCESS :0xAAAAAAAAA ; +int kill = kill_how ==KILL_PROCESS ?SECCOMP_RET_KILL_PROCESS :0xAAAAAAAA ;struct sock_filter filter_process[] = {BPF_STMT (BPF_LD |BPF_W |BPF_ABS , offsetof(struct seccomp_data , nr)),
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 296/1095 thermal/tools/tmon: Include pthread and time headers in tmon.h
In reply to Greg Kroah-HartmanFrom: Markus Mayer <[email protected]>
[ Upstream commit 0cf51bfe999524377fbb71becb583b4ca6d07cfc ]
Include sys/time.h and pthread.h in tmon.h, so that types "pthread_mutex_t" and "struct timeval tv" are known when tmon.h references them.
Without these headers, compiling tmon against musl-libc will fail with these errors:
In file included from sysfs.c:31:0:
tmon.h:47:8: error: unknown type name 'pthread_mutex_t'
extern pthread_mutex_t input_lock;
^~~~~~~~~~~~~~~make[3]: *** [<builtin>: sysfs.o] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from tui.c:31:0:
tmon.h:54:17: error: field 'tv' has incomplete type
struct timeval tv;
^~make[3]: *** [<builtin>: tui.o] Error 1
make[2]: *** [Makefile:83: tmon] Error 2
--- tools/thermal/tmon/tmon.h | 3 +++ 1 file changed, 3 insertions(+)
tools/thermal/tmon/tmon.h +3 -0
@@ -27,6 +27,9 @@#define NR_LINES_TZDATA 1#define TMON_LOG_FILE "/var/tmp/tmon.log" +#include <sys/time.h> +#include <pthread.h> +extern unsigned long ticktime;extern double time_elapsed;extern unsigned long target_temp_user;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 297/1095 dm: return early from dm_pr_call() if DM device is suspended
In reply to Greg Kroah-HartmanFrom: Mike Snitzer <[email protected]>
[ Upstream commit e120a5f1e78fab6223544e425015f393d90d6f0d ]
Otherwise PR ops may be issued while the broader DM device is being reconfigured, etc.
--- drivers/md/dm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/md/dm.c +5 -0
@@ -2955,6 +2955,11 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn, goto out; ti =dm_table_get_target (table,0 ); +if (dm_suspended_md (md)) { + ret = -EAGAIN ; + goto out; + } + ret = -EINVAL ;if (!ti->type->iterate_devices) goto out;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 298/1095 pwm: sifive: Simplify offset calculation for PWMCMP registers
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit 20550a61880fc55e68a0d290ad195b74729c0e7b ]
Instead of explicitly using PWM_SIFIVE_PWMCMP0 + pwm->hwpwm * PWM_SIFIVE_SIZE_PWMCMP for each access to one of the PWMCMP registers, introduce a macro that takes the hwpwm id as parameter.
For the register definition using a plain 4 instead of the cpp constant PWM_SIFIVE_SIZE_PWMCMP is easier to read, so define the offset macro without the constant. The latter can then be dropped as there are no users left.
--- drivers/pwm/pwm-sifive.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/pwm/pwm-sifive.c +3 -7
@@ -23,7 +23,7 @@#define PWM_SIFIVE_PWMCFG 0x0#define PWM_SIFIVE_PWMCOUNT 0x8#define PWM_SIFIVE_PWMS 0x10 -#define PWM_SIFIVE_PWMCMP0 0x20 +#define PWM_SIFIVE_PWMCMP (i) (0x20 + 4 * (i))/* PWMCFG fields */ #define PWM_SIFIVE_PWMCFG_SCALE GENMASK(3, 0)
@@ -36,8 +36,6 @@#define PWM_SIFIVE_PWMCFG_GANG BIT(24)#define PWM_SIFIVE_PWMCFG_IP BIT(28) -/* PWM_SIFIVE_SIZE_PWMCMP is used to calculate offset for pwmcmpX registers */ -#define PWM_SIFIVE_SIZE_PWMCMP 4#define PWM_SIFIVE_CMPWIDTH 16#define PWM_SIFIVE_DEFAULT_PERIOD 10000000
@@ -112,8 +110,7 @@ static void pwm_sifive_get_state(struct pwm_chip *chip, struct pwm_device *pwm,struct pwm_sifive_ddata *ddata =pwm_sifive_chip_to_ddata (chip);u32 duty, val; - duty =readl (ddata->regs +PWM_SIFIVE_PWMCMP0 + - pwm->hwpwm *PWM_SIFIVE_SIZE_PWMCMP ); + duty =readl (ddata->regs +PWM_SIFIVE_PWMCMP (pwm->hwpwm)); state->enabled = duty >0 ;
@@ -194,8 +191,7 @@ static int pwm_sifive_apply(struct pwm_chip *chip, struct pwm_device *pwm,pwm_sifive_update_clock (ddata,clk_get_rate (ddata->clk)); } -writel (frac, ddata->regs +PWM_SIFIVE_PWMCMP0 + - pwm->hwpwm *PWM_SIFIVE_SIZE_PWMCMP ); +writel (frac, ddata->regs +PWM_SIFIVE_PWMCMP (pwm->hwpwm));if (state->enabled != enabled)pwm_sifive_enable (chip, state->enabled);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 299/1095 pwm: sifive: Ensure the clk is enabled exactly once per running PWM
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit ace41d7564e655c39f709a78c035188a460c7cbd ]
.apply() assumes the clk to be for a given PWM iff the PWM is enabled. So make sure this is the case when .probe() completes. And in .remove() disable the according number of times.
This fixes a clk enable/disable imbalance, if some PWMs are already running at probe time.
--- drivers/pwm/pwm-sifive.c | 46 ++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 9 deletions(-)
drivers/pwm/pwm-sifive.c +37 -9
@@ -229,6 +229,8 @@ static int pwm_sifive_probe(struct platform_device *pdev)struct pwm_sifive_ddata *ddata;struct pwm_chip *chip;int ret; +u32 val; +unsigned int enabled_pwms =0 , enabled_clks =1 ; ddata =devm_kzalloc (dev,sizeof (*ddata),GFP_KERNEL );if (!ddata)
@@ -255,6 +257,33 @@ static int pwm_sifive_probe(struct platform_device *pdev)return ret; } + val =readl (ddata->regs +PWM_SIFIVE_PWMCFG ); +if (val &PWM_SIFIVE_PWMCFG_EN_ALWAYS ) { +unsigned int i; + +for (i =0 ; i < chip->npwm; ++i) { + val =readl (ddata->regs +PWM_SIFIVE_PWMCMP (i)); +if (val >0 ) + ++enabled_pwms; + } + } + +/* The clk should be on once for each running PWM. */ +if (enabled_pwms) { +while (enabled_clks < enabled_pwms) { +/* This is not expected to fail as the clk is already on */ + ret =clk_enable (ddata->clk); +if (unlikely (ret)) { +dev_err_probe (dev, ret,"Failed to enable clk\n" ); + goto disable_clk; + } + ++enabled_clks; + } + }else { +clk_disable (ddata->clk); + enabled_clks =0 ; + } +/* Watch for changes to underlying clock frequency */ ddata->notifier.notifier_call = pwm_sifive_clock_notifier; ret =clk_notifier_register (ddata->clk, &ddata->notifier);
@@ -277,7 +306,11 @@ static int pwm_sifive_probe(struct platform_device *pdev) unregister_clk:clk_notifier_unregister (ddata->clk, &ddata->notifier); disable_clk: -clk_disable_unprepare (ddata->clk); +while (enabled_clks) { +clk_disable (ddata->clk); + --enabled_clks; + } +clk_unprepare (ddata->clk);return ret; }
@@ -285,21 +318,16 @@ static int pwm_sifive_probe(struct platform_device *pdev)static int pwm_sifive_remove (struct platform_device *dev) {struct pwm_sifive_ddata *ddata =platform_get_drvdata (dev); -bool is_enabled = false;struct pwm_device *pwm;int ch;for (ch =0 ; ch < ddata->chip.npwm; ch++) { pwm = &ddata->chip.pwms[ch]; -if (pwm->state.enabled) { - is_enabled = true; -break ; - } +if (pwm->state.enabled) +clk_disable (ddata->clk); } -if (is_enabled) -clk_disable (ddata->clk); -clk_disable_unprepare (ddata->clk); +clk_unprepare (ddata->clk);pwmchip_remove (&ddata->chip);clk_notifier_unregister (ddata->clk, &ddata->notifier);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 300/1095 pwm: sifive: Shut down hardware only after pwmchip_remove() completed
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit 2375e964d541bb09158cd2dff67b5d74e8de61cd ]
The PWMs are expected to be functional until pwmchip_remove() is called. So disable the clks only afterwards.
--- drivers/pwm/pwm-sifive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pwm/pwm-sifive.c +3 -2
@@ -321,6 +321,9 @@ static int pwm_sifive_remove(struct platform_device *dev)struct pwm_device *pwm;int ch; +pwmchip_remove (&ddata->chip); +clk_notifier_unregister (ddata->clk, &ddata->notifier); +for (ch =0 ; ch < ddata->chip.npwm; ch++) { pwm = &ddata->chip.pwms[ch];if (pwm->state.enabled)
@@ -328,8 +331,6 @@ static int pwm_sifive_remove(struct platform_device *dev) }clk_unprepare (ddata->clk); -pwmchip_remove (&ddata->chip); -clk_notifier_unregister (ddata->clk, &ddata->notifier);return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 301/1095 pwm: lpc18xx: Fix period handling
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit 8933d30c5f468d6cc1e4bf9bb535149da35f202e ]
The calculation:
val = (u64)NSEC_PER_SEC * LPC18XX_PWM_TIMER_MAX; do_div(val, lpc18xx_pwm->clk_rate); lpc18xx_pwm->max_period_ns = val;
is bogus because with NSEC_PER_SEC = 1000000000, LPC18XX_PWM_TIMER_MAX = 0xffffffff and clk_rate < NSEC_PER_SEC this overflows the (on lpc18xx (i.e. ARM32) 32 bit wide) unsigned int .max_period_ns. This results (dependant of the actual clk rate) in an arbitrary limitation of the maximal period. E.g. for clkrate = 333333333 (Hz) we get max_period_ns = 9 instead of 12884901897.
So make .max_period_ns an u64 and pass period and duty as u64 to not discard relevant digits. And also make use of mul_u64_u64_div_u64() which prevents all overflows assuming clk_rate < NSEC_PER_SEC.
--- drivers/pwm/pwm-lpc18xx-sct.c | 55 +++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 16 deletions(-)
drivers/pwm/pwm-lpc18xx-sct.c +39 -16
@@ -98,7 +98,7 @@ struct lpc18xx_pwm_chip {unsigned long clk_rate;unsigned int period_ns;unsigned int min_period_ns; -unsigned int max_period_ns; +u64 max_period_ns;unsigned int period_event;unsigned long event_map;struct mutex res_lock;
@@ -145,40 +145,48 @@ static void lpc18xx_pwm_set_conflict_res(struct lpc18xx_pwm_chip *lpc18xx_pwm,mutex_unlock (&lpc18xx_pwm->res_lock); } -static void lpc18xx_pwm_config_period (struct pwm_chip *chip,int period_ns) +static void lpc18xx_pwm_config_period (struct pwm_chip *chip,u64 period_ns) {struct lpc18xx_pwm_chip *lpc18xx_pwm =to_lpc18xx_pwm_chip (chip); -u64 val; +u32 val; - val = (u64 )period_ns * lpc18xx_pwm->clk_rate; -do_div (val,NSEC_PER_SEC ); +/* +* With clk_rate < NSEC_PER_SEC this cannot overflow. +* With period_ns < max_period_ns this also fits into an u32. +* As period_ns >= min_period_ns = DIV_ROUND_UP(NSEC_PER_SEC, lpc18xx_pwm->clk_rate); +* we have val >= 1. +*/ + val =mul_u64_u64_div_u64 (period_ns, lpc18xx_pwm->clk_rate,NSEC_PER_SEC );lpc18xx_pwm_writel (lpc18xx_pwm,LPC18XX_PWM_MATCH (lpc18xx_pwm->period_event), - (u32 )val -1 ); + val -1 );lpc18xx_pwm_writel (lpc18xx_pwm,LPC18XX_PWM_MATCHREL (lpc18xx_pwm->period_event), - (u32 )val -1 ); + val -1 ); }static void lpc18xx_pwm_config_duty (struct pwm_chip *chip, -struct pwm_device *pwm,int duty_ns) +struct pwm_device *pwm,u64 duty_ns) {struct lpc18xx_pwm_chip *lpc18xx_pwm =to_lpc18xx_pwm_chip (chip);struct lpc18xx_pwm_data *lpc18xx_data = &lpc18xx_pwm->channeldata[pwm->hwpwm]; -u64 val; +u32 val; - val = (u64 )duty_ns * lpc18xx_pwm->clk_rate; -do_div (val,NSEC_PER_SEC ); +/* +* With clk_rate < NSEC_PER_SEC this cannot overflow. +* With duty_ns <= period_ns < max_period_ns this also fits into an u32. +*/ + val =mul_u64_u64_div_u64 (duty_ns, lpc18xx_pwm->clk_rate,NSEC_PER_SEC );lpc18xx_pwm_writel (lpc18xx_pwm,LPC18XX_PWM_MATCH (lpc18xx_data->duty_event), - (u32 )val); + val);lpc18xx_pwm_writel (lpc18xx_pwm,LPC18XX_PWM_MATCHREL (lpc18xx_data->duty_event), - (u32 )val); + val); } static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -360,12 +368,27 @@ static int lpc18xx_pwm_probe(struct platform_device *pdev) goto disable_pwmclk; } +/* +* If clkrate is too fast, the calculations in .apply() might overflow. +*/ +if (lpc18xx_pwm->clk_rate >NSEC_PER_SEC ) { + ret =dev_err_probe (&pdev->dev, -EINVAL ,"pwm clock to fast\n" ); + goto disable_pwmclk; + } + +/* +* If clkrate is too fast, the calculations in .apply() might overflow. +*/ +if (lpc18xx_pwm->clk_rate >NSEC_PER_SEC ) { + ret =dev_err_probe (&pdev->dev, -EINVAL ,"pwm clock to fast\n" ); + goto disable_pwmclk; + } +mutex_init (&lpc18xx_pwm->res_lock);mutex_init (&lpc18xx_pwm->period_lock); - val = (u64 )NSEC_PER_SEC *LPC18XX_PWM_TIMER_MAX ; -do_div (val, lpc18xx_pwm->clk_rate); - lpc18xx_pwm->max_period_ns = val; + lpc18xx_pwm->max_period_ns = +mul_u64_u64_div_u64 (NSEC_PER_SEC ,LPC18XX_PWM_TIMER_MAX , lpc18xx_pwm->clk_rate); lpc18xx_pwm->min_period_ns =DIV_ROUND_UP (NSEC_PER_SEC , lpc18xx_pwm->clk_rate);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 302/1095 drm/meson: Fix refcount leak in meson_encoder_hdmi_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit 7381076809586528e2a812a709e2758916318a99 ]
of_find_device_by_node() takes reference, we should use put_device() to release it when not need anymore.
Add missing put_device() in error path to avoid refcount leak.
--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_encoder_hdmi.c +3 -1
@@ -435,8 +435,10 @@ int meson_encoder_hdmi_init(struct meson_drm *priv)cec_fill_conn_info_from_drm (&conn_info, meson_encoder_hdmi->connector); notifier =cec_notifier_conn_register (&pdev->dev,NULL , &conn_info); -if (!notifier) +if (!notifier) { +put_device (&pdev->dev);return -ENOMEM ; + } meson_encoder_hdmi->cec_notifier = notifier; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 303/1095 drm/dp: Export symbol / kerneldoc fixes for DP AUX bus
In reply to Greg Kroah-HartmanFrom: Douglas Anderson <[email protected]>
[ Upstream commit 39c28cdfb719f0e306b447f0827dfd712f81858b ]
While working on the DP AUX bus code I found a few small things that should be fixed. Namely the non-devm version of of_dp_aux_populate_ep_devices() was missing an export. There was also an extra blank line in a kerneldoc and a kerneldoc that incorrectly documented a return value. Fix these.
--- drivers/gpu/drm/dp/drm_dp_aux_bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/dp/drm_dp_aux_bus.c +1 -3
@@ -66,7 +66,6 @@ static int dp_aux_ep_probe(struct device *dev)* @dev: The device to remove. * * Calls through to the endpoint driver remove. -* */ static void dp_aux_ep_remove (struct device *dev) {
@@ -120,8 +119,6 @@ ATTRIBUTE_GROUPS(dp_aux_ep_dev);/** * dp_aux_ep_dev_release() - Free memory for the dp_aux_ep device * @dev: The device to free. -* -* Return: 0 if no error or negative error code. */ static void dp_aux_ep_dev_release (struct device *dev) {
@@ -256,6 +253,7 @@ int of_dp_aux_populate_ep_devices(struct drm_dp_aux *aux)return 0 ; } +EXPORT_SYMBOL_GPL (of_dp_aux_populate_ep_devices);static void of_dp_aux_depopulate_ep_devices_void (void *data) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 304/1095 drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 8478095a8c4bcea3c83b0767d6c9127434160761 ]
The TC358767/TC358867/TC9595 are all capable of operating in multiple modes, DPI-to-(e)DP, DSI-to-(e)DP, DSI-to-DPI. Only the first mode is currently supported. In order to support the rest of the modes without making the tc_probe() overly long, split the bridge endpoint parsing into dedicated function, where the necessary logic to detect the bridge mode based on which endpoints are connected, can be implemented.
--- drivers/gpu/drm/bridge/tc358767.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-)
drivers/gpu/drm/bridge/tc358767.c +21 -9
@@ -1549,19 +1549,12 @@ static irqreturn_t tc_irq_handler(int irq, void *arg)return IRQ_HANDLED ; } -static int tc_probe (struct i2c_client *client,const struct i2c_device_id *id) +static int tc_probe_edp_bridge_endpoint (struct tc_data *tc) { -struct device *dev = &client->dev; +struct device *dev = tc->dev;struct drm_panel *panel; -struct tc_data *tc;int ret; - tc =devm_kzalloc (dev,sizeof (*tc),GFP_KERNEL ); -if (!tc) -return -ENOMEM ; - - tc->dev = dev; -/* port@2 is the output port */ ret =drm_of_find_panel_or_bridge (dev->of_node,2 ,0 , &panel,NULL );if (ret && ret != -ENODEV )
@@ -1580,6 +1573,25 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id) tc->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; } +return ret; +} + +static int tc_probe (struct i2c_client *client,const struct i2c_device_id *id) +{ +struct device *dev = &client->dev; +struct tc_data *tc; +int ret; + + tc =devm_kzalloc (dev,sizeof (*tc),GFP_KERNEL ); +if (!tc) +return -ENOMEM ; + + tc->dev = dev; + + ret =tc_probe_edp_bridge_endpoint (tc); +if (ret) +return ret; +/* Shut down GPIO is optional */ tc->sd_gpio =devm_gpiod_get_optional (dev,"shutdown" ,GPIOD_OUT_HIGH );if (IS_ERR (tc->sd_gpio))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 305/1095 drm/bridge: tc358767: Make sure Refclk clock are enabled
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 0b4c48f3e315d172e4cc06e10f2c8ba180788baf ]
The Refclk may be supplied by SoC clock output instead of crystal oscillator, make sure the clock are enabled before any other action is performed with the bridge chip, otherwise it may either fail to operate at all, or miss reset GPIO toggle.
--- drivers/gpu/drm/bridge/tc358767.c | 32 ++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-)
drivers/gpu/drm/bridge/tc358767.c +25 -7
@@ -1576,6 +1576,13 @@ static int tc_probe_edp_bridge_endpoint(struct tc_data *tc)return ret; } +static void tc_clk_disable (void *data) +{ +struct clk *refclk = data; + +clk_disable_unprepare (refclk); +} +static int tc_probe (struct i2c_client *client,const struct i2c_device_id *id) {struct device *dev = &client->dev;
@@ -1592,6 +1599,24 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)if (ret)return ret; + tc->refclk =devm_clk_get (dev,"ref" ); +if (IS_ERR (tc->refclk)) { + ret =PTR_ERR (tc->refclk); +dev_err (dev,"Failed to get refclk: %d\n" , ret); +return ret; + } + + ret =clk_prepare_enable (tc->refclk); +if (ret) +return ret; + + ret =devm_add_action_or_reset (dev, tc_clk_disable, tc->refclk); +if (ret) +return ret; + +/* tRSTW = 100 cycles , at 13 MHz that is ~7.69 us */ +usleep_range (10 ,15 ); +/* Shut down GPIO is optional */ tc->sd_gpio =devm_gpiod_get_optional (dev,"shutdown" ,GPIOD_OUT_HIGH );if (IS_ERR (tc->sd_gpio))
@@ -1612,13 +1637,6 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)usleep_range (5000 ,10000 ); } - tc->refclk =devm_clk_get (dev,"ref" ); -if (IS_ERR (tc->refclk)) { - ret =PTR_ERR (tc->refclk); -dev_err (dev,"Failed to get refclk: %d\n" , ret); -return ret; - } - tc->regmap =devm_regmap_init_i2c (client, &tc_regmap_config);if (IS_ERR (tc->regmap)) { ret =PTR_ERR (tc->regmap);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 306/1095 ath10k: do not enforce interrupt trigger type
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 1ee6c5abebd3cacf2ac4378d0ed4f57fd4850421 ]
Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge rising - but instead rely on Devicetree to configure it.
All Qualcomm DTSI with WCN3990 define the interrupt type as level high, so the mismatch between DTSI and driver causes rebind issues:
$ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind [ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000! [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6
Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1
Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
--- drivers/net/wireless/ath/ath10k/snoc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/snoc.c +2 -3
@@ -1249,13 +1249,12 @@ static void ath10k_snoc_init_napi(struct ath10k *ar)static int ath10k_snoc_request_irq (struct ath10k *ar) {struct ath10k_snoc *ar_snoc =ath10k_snoc_priv (ar); -int irqflags =IRQF_TRIGGER_RISING ;int ret, id;for (id =0 ; id <CE_COUNT_MAX ; id++) { ret =request_irq (ar_snoc->ce_irqs[id].irq_line, - ath10k_snoc_per_engine_handler, - irqflags, ce_name[id], ar); + ath10k_snoc_per_engine_handler,0 , + ce_name[id], ar);if (ret) { ath10k_err(ar, "failed to register IRQ handler for CE %d: %d\n",
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 307/1095 drm/bridge: lt9611: Use both bits for HDMI sensing
In reply to Greg Kroah-HartmanFrom: John Stultz <[email protected]>
[ Upstream commit 649eb3828fb22e829e222ebd83f4e11dc503a565 ]
In commit 19cf41b64e3b ("lontium-lt9611: check a different register bit for HDMI sensing"), the bit flag used to detect HDMI cable connect was switched from BIT(2) to BIT(0) to improve compatibility with some monitors that didn't seem to set BIT(2).
However, with that change, I've seen occasional issues where the detection failed, because BIT(2) was set, but not BIT(0).
Unfortunately, as I understand it, the bits and their function was never clearly documented. So lets instead check both (BIT(2) | BIT(0)) when checking the register.
--- drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/lontium-lt9611.c +1 -1
@@ -586,7 +586,7 @@ lt9611_connector_detect(struct drm_connector *connector, bool force)int connected =0 ;regmap_read (lt9611->regmap,0x825e , ®_val); - connected = (reg_val &BIT (0 )); + connected = (reg_val & (BIT (2 ) |BIT (0 ))); lt9611->status = connected ? connector_status_connected : connector_status_disconnected;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 308/1095 drm/st7735r: Fix module autoloading for Okaya RH128128T
In reply to Greg Kroah-HartmanFrom: Javier Martinez Canillas <[email protected]>
[ Upstream commit 9ad6f181ad9a19a26bda73a7b199df44ccfcdaba ]
The SPI core always reports a "MODALIAS=spi:<foo>", even if the device was registered via OF. This means that the st7735r.ko module won't autoload if a DT has a node with a compatible "okaya,rh128128t" string.
In that case, kmod expects a "MODALIAS=of:N*T*Cokaya,rh128128t" uevent but instead will get a "MODALIAS=spi:rh128128t", which is not present in the list of aliases:
$ modinfo drivers/gpu/drm/tiny/st7735r.ko | grep alias alias: of:N*T*Cokaya,rh128128tC* alias: of:N*T*Cokaya,rh128128t alias: of:N*T*Cjianda,jd-t18003-t01C* alias: of:N*T*Cjianda,jd-t18003-t01 alias: spi:jd-t18003-t01
To workaround this issue, add in the SPI table an entry for that device.
--- drivers/gpu/drm/tiny/st7735r.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/tiny/st7735r.c +1 -0
@@ -174,6 +174,7 @@ MODULE_DEVICE_TABLE(of, st7735r_of_match);static const struct spi_device_id st7735r_id[] = { {"jd-t18003-t01" , (uintptr_t )&jd_t18003_t01_cfg }, + {"rh128128t" , (uintptr_t )&rh128128t_cfg }, { }, };MODULE_DEVICE_TABLE (spi, st7735r_id);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 309/1095 drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m
In reply to Greg Kroah-HartmanFrom: Gao Chao <[email protected]>
[ Upstream commit a67664860f7833015a683ea295f7c79ac2901332 ]
If CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m, bulding fails:
drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe':
panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to
`drm_panel_dp_aux_backlight'
make: *** [vmlinux] Error 1
Let CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 select DRM_DISPLAY_DP_HELPER and CONFIG_DRM_DISPLAY_HELPER to fix this error.
--- drivers/gpu/drm/panel/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/panel/Kconfig +2 -0
@@ -428,6 +428,8 @@ config DRM_PANEL_SAMSUNG_ATNA33XC20 depends on OF depends on BACKLIGHT_CLASS_DEVICE depends on PM + select DRM_DISPLAY_DP_HELPER + select DRM_DISPLAY_HELPER select DRM_DP_AUX_BUS help DRM panel driver for the Samsung ATNA33XC20 panel. This panel can't
Signature · 1 line
2.35.1
Re: [PATCH 5.18 0309/1095] drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m
Hi,
Quoted 23 lines · Greg Kroah-Hartman
From: Gao Chao <[email protected]>
[ Upstream commit
a67664860f7833015a683ea295f7c79ac2901332]If
CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y&&CONFIG_DRM_DISPLAY_HELPER=m, bulding fails:
drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe':
panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to
`drm_panel_dp_aux_backlight'
make: *** [vmlinux] Error 1Let
CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20selectDRM_DISPLAY_DP_HELPERandCONFIG_DRM_DISPLAY_HELPERto fix this error.Fixes 32ce3b320343 ("drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel")Reported-by Hulk Robot <[email protected]>Signed-off-by Gao Chao <[email protected]>Reviewed-by Douglas Anderson <[email protected]>Signed-off-by Douglas Anderson <[email protected]>Signed-off-by Sasha Levin <[email protected]>
Quoted 3 lines
--- drivers/gpu/drm/panel/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
While it doesn't hurt to land this patch as-is on 5.18 and older kernels, it's not quite right. The symbols that this patch 'select' don't actually exist on 5.18. ;-) Doing a git grep of DRM_DISPLAY_DP_HELPER shows no hits except the one introduced in this patch...
If you want the equivalent fix for v5.18 and older, I believe you'd want:
select DRM_DP_HELPER
select DRM_KMS_HELPER
See commit 3755d35ee1d2 ("drm/panel: Select DRM_DP_HELPER for DRM_PANEL_EDP") and commit 3c3384050d68 ("drm: Don't make DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS") which added those for the (very similar) panel-edp.
The first of those is what got changed in v5.19 in commit 1e0f66420b13 ("drm/display: Introduce a DRM display-helper module")
So I guess the tl;dr:
* If you leave this patch in 5.18 (and 5.15), nothing bad will happen but the broken "randconfig" won't be fixed.
* If you revert this patch in 5.18 (and 5.15) also nothing bad will happen but also the broken "randconfig" won't be fixed.
* If someone cares about the randconfig on 5.15 / 5.18, we need a backport that adapts what's selected to the old symbol names.
Greg Kroah-Hartman
maintainerRe: [PATCH 5.18 0309/1095] drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m
Quoted 52 lines · Doug Anderson
Hi,
Quoted 23 lines · Greg Kroah-Hartman
From: Gao Chao <[email protected]>
[ Upstream commit
a67664860f7833015a683ea295f7c79ac2901332]If
CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y&&CONFIG_DRM_DISPLAY_HELPER=m, bulding fails:
drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe':
panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to
`drm_panel_dp_aux_backlight'
make: *** [vmlinux] Error 1Let
CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20selectDRM_DISPLAY_DP_HELPERandCONFIG_DRM_DISPLAY_HELPERto fix this error.Fixes 32ce3b320343 ("drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel")Reported-by Hulk Robot <[email protected]>Signed-off-by Gao Chao <[email protected]>Reviewed-by Douglas Anderson <[email protected]>Signed-off-by Douglas Anderson <[email protected]>Signed-off-by Sasha Levin <[email protected]>Quoted 3 lines
--- drivers/gpu/drm/panel/Kconfig | 2 ++ 1 file changed, 2 insertions(+)While it doesn't hurt to land this patch as-is on 5.18 and older kernels, it's not quite right. The symbols that this patch 'select' don't actually exist on 5.18. ;-) Doing a
git grepofDRM_DISPLAY_DP_HELPERshows no hits except the one introduced in this patch...If you want the equivalent fix for v5.18 and older, I believe you'd want:
select
DRM_DP_HELPER
selectDRM_KMS_HELPERSee commit
3755d35ee1d2("drm/panel: SelectDRM_DP_HELPERforDRM_PANEL_EDP") and commit3c3384050d68("drm: Don't makeDRM_PANEL_BRIDGEdependent onDRM_KMS_HELPERS") which added those for the (very similar) panel-edp.The first of those is what got changed in v5.19 in commit
1e0f66420b13("drm/display: Introduce a DRM display-helper module")So I guess the tl;dr:
Quoted 8 lines
* If you leave this patch in 5.18 (and 5.15), nothing bad will happen but the broken "randconfig" won't be fixed.
* If you revert this patch in 5.18 (and 5.15) also nothing bad will happen but also the broken "randconfig" won't be fixed.
* If someone cares about the randconfig on 5.15 / 5.18, we need a backport that adapts what's selected to the old symbol names.
Thanks for letting us know, I'll leave it alone for now and see if anyone has problems.
greg k-h
Greg Kroah-Hartman
maintainerPATCH 310/1095 wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit b88d28146c30a8e14f0f012d56ebf19b68a348f4 ]
If the copy_from_user() fails or the user gives invalid date then the correct thing to do is to return a negative error code. (Currently it returns success).
I made a copy additional related cleanups:
1) There is no need to check "buffer" for NULL. That's handled by copy_from_user().
2) The "h2c_len" variable cannot be negative because it is unsigned and because sscanf() does not return negative error codes.
--- drivers/net/wireless/realtek/rtlwifi/debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtlwifi/debug.c +4 -4
@@ -329,8 +329,8 @@ static ssize_t rtl_debugfs_set_write_h2c(struct file *filp, tmp_len = (count >sizeof (tmp) -1 ?sizeof (tmp) -1 : count); -if (!buffer ||copy_from_user (tmp, buffer, tmp_len)) -return count; +if (copy_from_user (tmp, buffer, tmp_len)) +return -EFAULT ; tmp[tmp_len] ='\0' ;
@@ -340,8 +340,8 @@ static ssize_t rtl_debugfs_set_write_h2c(struct file *filp, &h2c_data[4 ], &h2c_data[5 ], &h2c_data[6], &h2c_data[7]); -if (h2c_len <=0 ) -return count; +if (h2c_len ==0 ) +return -EINVAL ;for (i =0 ; i < h2c_len; i++) h2c_data_packed[i] = (u8 )h2c_data[i];
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 311/1095 wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down
In reply to Greg Kroah-HartmanFrom: Ajay Singh <[email protected]>
[ Upstream commit fcf690b0b47494df51d214db5c5a714a400b0257 ]
For power-up sequence, WILC expects RESET set to high 5ms after making chip_en(enable) so corrected chip power-up sequence by making RESET high. For Power-Down sequence, the correct sequence make RESET and CHIP_EN low without any extra delay.
--- drivers/net/wireless/microchip/wilc1000/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/microchip/wilc1000/spi.c +3 -3
@@ -191,11 +191,11 @@ static void wilc_wlan_power(struct wilc *wilc, bool on)/* assert ENABLE: */ gpiod_set_value (gpios->enable,1 );mdelay (5 ); -/* deassert RESET: */ -gpiod_set_value (gpios->reset,0 ); - }else {/* assert RESET: */ gpiod_set_value (gpios->reset,1 ); + }else { +/* deassert RESET: */ +gpiod_set_value (gpios->reset,0 );/* deassert ENABLE: */ gpiod_set_value (gpios->enable,0 ); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 312/1095 ath11k: fix netdev open race
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit d4ba1ff87b17e81686ada8f429300876f55f95ad ]
Make sure to allocate resources needed before registering the device.
This specifically avoids having a racing open() trigger a BUG_ON() in mod_timer() when ath11k_mac_op_start() is called before the mon_reap_timer as been set up.
I did not see this issue with next-20220310, but I hit it on every probe with next-20220511. Perhaps some timing changed in between.
Here's the backtrace:
[ 51.346947] kernel BUG at kernel/time/timer.c:990! [ 51.346958] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ... [ 51.578225] Call trace: [ 51.583293] __mod_timer+0x298/0x390 [ 51.589518] mod_timer+0x14/0x20 [ 51.595368] ath11k_mac_op_start+0x41c/0x4a0 [ath11k] [ 51.603165] drv_start+0x38/0x60 [mac80211] [ 51.610110] ieee80211_do_open+0x29c/0x7d0 [mac80211] [ 51.617945] ieee80211_open+0x60/0xb0 [mac80211] [ 51.625311] __dev_open+0x100/0x1c0 [ 51.631420] __dev_change_flags+0x194/0x210 [ 51.638214] dev_change_flags+0x24/0x70 [ 51.644646] do_setlink+0x228/0xdb0 [ 51.650723] __rtnl_newlink+0x460/0x830 [ 51.657162] rtnl_newlink+0x4c/0x80 [ 51.663229] rtnetlink_rcv_msg+0x124/0x390 [ 51.669917] netlink_rcv_skb+0x58/0x130 [ 51.676314] rtnetlink_rcv+0x18/0x30 [ 51.682460] netlink_unicast+0x250/0x310 [ 51.688960] netlink_sendmsg+0x19c/0x3e0 [ 51.695458] ____sys_sendmsg+0x220/0x290 [ 51.701938] ___sys_sendmsg+0x7c/0xc0 [ 51.708148] __sys_sendmsg+0x68/0xd0 [ 51.714254] __arm64_sys_sendmsg+0x28/0x40 [ 51.720900] invoke_syscall+0x48/0x120
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
--- drivers/net/wireless/ath/ath11k/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +8 -8
@@ -903,23 +903,23 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab)return ret; } - ret =ath11k_mac_register (ab); + ret =ath11k_dp_pdev_alloc (ab);if (ret) { -ath11k_err (ab,"failed register the radio with mac80211: %d\n" , ret); +ath11k_err (ab,"failed to attach DP pdev: %d\n" , ret); goto err_pdev_debug; } - ret =ath11k_dp_pdev_alloc (ab); + ret =ath11k_mac_register (ab);if (ret) { -ath11k_err (ab,"failed to attach DP pdev: %d\n" , ret); - goto err_mac_unregister; +ath11k_err (ab,"failed register the radio with mac80211: %d\n" , ret); + goto err_dp_pdev_free; } ret =ath11k_thermal_register (ab);if (ret) {ath11k_err (ab,"could not register thermal device: %d\n" , ret); - goto err_dp_pdev_free; + goto err_mac_unregister; } ret =ath11k_spectral_init (ab);
@@ -932,10 +932,10 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab) err_thermal_unregister:ath11k_thermal_unregister (ab); -err_dp_pdev_free: -ath11k_dp_pdev_free (ab); err_mac_unregister:ath11k_mac_unregister (ab); +err_dp_pdev_free: +ath11k_dp_pdev_free (ab); err_pdev_debug:ath11k_debugfs_pdev_destroy (ab);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 313/1095 ath11k: fix IRQ affinity warning on shutdown
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 3bd0c69653ac636eae8872aacdcd4156f772f928 ]
Make sure to clear the IRQ affinity hint also on shutdown to avoid triggering a WARN_ON_ONCE() in __free_irq() when stopping MHI while using a single MSI vector.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
--- drivers/net/wireless/ath/ath11k/pci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/pci.c +2 -0
@@ -1566,7 +1566,9 @@ static void ath11k_pci_remove(struct pci_dev *pdev)static void ath11k_pci_shutdown (struct pci_dev *pdev) {struct ath11k_base *ab =pci_get_drvdata (pdev); +struct ath11k_pci *ab_pci =ath11k_pci_priv (ab); +ath11k_pci_set_irq_affinity_hint (ab_pci,NULL );ath11k_pci_power_down (ab); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 314/1095 drm/mipi-dbi: align max_chunk to 2 in spi_transfer
In reply to Greg Kroah-HartmanFrom: Yunhao Tian <[email protected]>
[ Upstream commit 435c249008cba04ed6a7975e9411f3b934620204 ]
In __spi_validate, there's a validation that no partial transfers are accepted (xfer->len % w_size must be zero). When max_chunk is not a multiple of bpw (e.g. max_chunk = 65535, bpw = 16), the transfer will be rejected.
This patch aligns max_chunk to 2 bytes (the maximum value of bpw is 16), so that no partial transfer will occur.
--- drivers/gpu/drm/drm_mipi_dbi.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/drm_mipi_dbi.c +7 -0
@@ -1199,6 +1199,13 @@ int mipi_dbi_spi_transfer(struct spi_device *spi, u32 speed_hz,size_t chunk;int ret; +/* In __spi_validate, there's a validation that no partial transfers +* are accepted (xfer->len % w_size must be zero). +* Here we align max_chunk to multiple of 2 (16bits), +* to prevent transfers from being rejected. +*/ + max_chunk =ALIGN_DOWN (max_chunk,2 ); +spi_message_init_with_transfers (&m, &tr,1 );while (len) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 315/1095 selftests/bpf: Fix test_run logic in fexit_stress.c
In reply to Greg Kroah-HartmanFrom: Yuntao Wang <[email protected]>
[ Upstream commit eb7b36ce47f830a01ad9405e673b563cc3638d5d ]
In the commit da00d2f117a0 ("bpf: Add test ops for BPF_PROG_TYPE_TRACING"), the bpf_fentry_test1 function was moved into bpf_prog_test_run_tracing(), which is the test_run function of the tracing BPF programs.
Thus calling 'bpf_prog_test_run_opts(filter_fd, &topts)' will not trigger bpf_fentry_test1 function as filter_fd is a sk_filter BPF program.
Fix it by replacing filter_fd with fexit_fd in the bpf_prog_test_run_opts() function.
--- .../selftests/bpf/prog_tests/fexit_stress.c | 32 +++---------------- 1 file changed, 4 insertions(+), 28 deletions(-)
tools/testing/selftests/bpf/prog_tests/fexit_stress.c +4 -28
@@ -7,11 +7,9 @@void test_fexit_stress (void ) { -char test_skb[128 ] = {};int fexit_fd[CNT ] = {};int link_fd[CNT ] = {}; -char error[4096 ]; -int err, i, filter_fd; +int err, i;const struct bpf_insn trace_program[] = {BPF_MOV64_IMM (BPF_REG_0 ,0 ),
@@ -20,25 +18,9 @@ void test_fexit_stress(void)LIBBPF_OPTS (bpf_prog_load_opts, trace_opts, .expected_attach_type = BPF_TRACE_FEXIT, - .log_buf = error, - .log_size = sizeof(error), ); -const struct bpf_insn skb_program[] = { -BPF_MOV64_IMM (BPF_REG_0 ,0 ), -BPF_EXIT_INSN (), - }; - -LIBBPF_OPTS (bpf_prog_load_opts, skb_opts, - .log_buf = error, - .log_size = sizeof(error), - ); - -LIBBPF_OPTS (bpf_test_run_opts, topts, - .data_in = test_skb, - .data_size_in = sizeof(test_skb), - .repeat = 1, - ); +LIBBPF_OPTS (bpf_test_run_opts, topts); err =libbpf_find_vmlinux_btf_id ("bpf_fentry_test1" , trace_opts.expected_attach_type);
@@ -58,15 +40,9 @@ void test_fexit_stress(void) goto out; } - filter_fd =bpf_prog_load (BPF_PROG_TYPE_SOCKET_FILTER ,NULL ,"GPL" , - skb_program,sizeof (skb_program) /sizeof (struct bpf_insn ), - &skb_opts); -if (!ASSERT_GE (filter_fd,0 ,"test_program_loaded" )) - goto out; + err =bpf_prog_test_run_opts (fexit_fd[0 ], &topts); +ASSERT_OK (err,"bpf_prog_test_run_opts" ); - err =bpf_prog_test_run_opts (filter_fd, &topts); -close (filter_fd); -CHECK_FAIL (err); out:for (i =0 ; i <CNT ; i++) {if (link_fd[i])
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 316/1095 selftests/bpf: Fix tc_redirect_dtime
In reply to Greg Kroah-HartmanFrom: Martin KaFai Lau <[email protected]>
[ Upstream commit e6ff92f41b65fce07365f1066fb13b5e42aca08d ]
tc_redirect_dtime was reported flaky from time to time. It always fails at the udp test and complains about the bpf@tc-ingress got a skb->tstamp when handling udp packet. It is unexpected because the skb->tstamp should have been cleared when crossing different netns.
The most likely cause is that the skb is actually a tcp packet from the earlier tcp test. It could be the final TCP_FIN handling.
This patch tightens the skb->tstamp check in the bpf prog. It ensures the skb is the current testing traffic. First, it checks that skb matches the IPPROTO of the running test (i.e. tcp vs udp). Second, it checks the server port (dst_ns_port). The server port is unique for each test (50000 + test_enum).
Also fixed a typo in test_udp_dtime(): s/P100/P101/
--- .../selftests/bpf/prog_tests/tc_redirect.c | 8 +-- .../selftests/bpf/progs/test_tc_dtime.c | 53 ++++++++++++++++++- 2 files changed, 55 insertions(+), 6 deletions(-)
tools/testing/selftests/bpf/prog_tests/tc_redirect.c +4 -4
@@ -646,7 +646,7 @@ static void test_tcp_clear_dtime(struct test_tc_dtime *skel)__u32 *errs = skel->bss->errs[t]; skel->bss->test = t; -test_inet_dtime (AF_INET6 ,SOCK_STREAM ,IP6_DST ,0 ); +test_inet_dtime (AF_INET6 ,SOCK_STREAM ,IP6_DST ,50000 + t);ASSERT_EQ (dtimes[INGRESS_FWDNS_P100 ],0 ,dtime_cnt_str (t,INGRESS_FWDNS_P100 ));
@@ -683,7 +683,7 @@ static void test_tcp_dtime(struct test_tc_dtime *skel, int family, bool bpf_fwd) errs = skel->bss->errs[t]; skel->bss->test = t; -test_inet_dtime (family,SOCK_STREAM , addr,0 ); +test_inet_dtime (family,SOCK_STREAM , addr,50000 + t);/* fwdns_prio100 prog does not read delivery_time_type, so * kernel puts the (rcv) timetamp in __sk_buff->tstamp
@@ -715,13 +715,13 @@ static void test_udp_dtime(struct test_tc_dtime *skel, int family, bool bpf_fwd) errs = skel->bss->errs[t]; skel->bss->test = t; -test_inet_dtime (family,SOCK_DGRAM , addr,0 ); +test_inet_dtime (family,SOCK_DGRAM , addr,50000 + t);ASSERT_EQ (dtimes[INGRESS_FWDNS_P100 ],0 ,dtime_cnt_str (t,INGRESS_FWDNS_P100 ));/* non mono delivery time is not forwarded */ ASSERT_EQ (dtimes[INGRESS_FWDNS_P101 ],0 , -dtime_cnt_str (t,INGRESS_FWDNS_P100 )); +dtime_cnt_str (t,INGRESS_FWDNS_P101 ));for (i =EGRESS_FWDNS_P100 ; i <SET_DTIME ; i++)ASSERT_GT (dtimes[i],0 ,dtime_cnt_str (t, i));
tools/testing/selftests/bpf/progs/test_tc_dtime.c +51 -2
95 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 317/1095 ath11k: fix missing skb drop on htc_tx_completion error
In reply to Greg Kroah-HartmanFrom: Christian 'Ansuel' Marangi <[email protected]>
[ Upstream commit e5646fe3b7ef739c392e59da7db6adf5e1fdef42 ]
On htc_tx_completion error the skb is not dropped. This is wrong since the completion_handler logic expect the skb to be consumed anyway even when an error is triggered. Not freeing the skb on error is a memory leak since the skb won't be freed anywere else. Correctly free the packet on eid >= ATH11K_HTC_EP_COUNT before returning.
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/htc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/htc.c +3 -1
@@ -258,8 +258,10 @@ void ath11k_htc_tx_completion_handler(struct ath11k_base *ab,u8 eid; eid =ATH11K_SKB_CB (skb)->eid; -if (eid >=ATH11K_HTC_EP_COUNT ) +if (eid >=ATH11K_HTC_EP_COUNT ) { +dev_kfree_skb_any (skb);return ; + } ep = &htc->endpoint[eid];spin_lock_bh (&htc->tx_lock);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 318/1095 ath11k: Fix incorrect debug_mask mappings
In reply to Greg Kroah-HartmanFrom: Manikanta Pubbisetty <[email protected]>
[ Upstream commit 9331f7d3c54a263bede5055e106e40b28d0bd937 ]
Currently a couple of debug_mask entries are mapped to the same value, this could enable unintended driver logging. If enabling DP_TX logs was the intention, then this could also enable PCI logs flooding the dmesg buffer or vice versa. Fix this by correctly assigning the debug masks.
Found during code review.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
--- drivers/net/wireless/ath/ath11k/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/debug.h +2 -2
@@ -23,8 +23,8 @@ enum ath11k_debug_mask {ATH11K_DBG_TESTMODE =0x00000400 , ATH11k_DBG_HAL =0x00000800 ,ATH11K_DBG_PCI =0x00001000 , -ATH11K_DBG_DP_TX =0x00001000 , -ATH11K_DBG_DP_RX =0x00002000 , +ATH11K_DBG_DP_TX =0x00002000 , +ATH11K_DBG_DP_RX =0x00004000 , ATH11K_DBG_ANY = 0xffffffff, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 319/1095 ath11k: Avoid REO CMD failed prints during firmware recovery
In reply to Greg Kroah-HartmanFrom: Manikanta Pubbisetty <[email protected]>
[ Upstream commit 0ab52b2bd7be8fd49c8ade7703c1faa15359c6c5 ]
Currently when firmware recovery is in progress, we do not queue REO commands to the firmware, instead -ESHUTDOWN will be returned to the caller leading to a failure print on the console. The REO command in the problem scenario is sent for all tids of a peer in which case we will have 16 failure prints on the console for a single peer. For an AP usecase, this count would be even higher in a worst case scenario. Since these commands are bound to fail during firmware recovery, it is better to avoid printing these failures and thereby avoid message flooding on the console.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +3 -2
@@ -835,8 +835,9 @@ void ath11k_peer_rx_tid_delete(struct ath11k *ar,HAL_REO_CMD_UPDATE_RX_QUEUE , &cmd, ath11k_dp_rx_tid_del_func);if (ret) { -ath11k_err (ar->ab,"failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n" , - tid, ret); +if (ret != -ESHUTDOWN ) +ath11k_err (ar->ab,"failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n" , + tid, ret);dma_unmap_single (ar->ab->dev, rx_tid->paddr, rx_tid->size,DMA_BIDIRECTIONAL );kfree (rx_tid->vaddr);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 320/1095 drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()
In reply to Greg Kroah-HartmanFrom: Alexey Kodanev <[email protected]>
[ Upstream commit 136f614931a2bb73616b292cf542da3a18daefd5 ]
The last case label can write two buffers 'mc_reg_address[j]' and 'mc_data[j]' with 'j' offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE since there are no checks for this value in both case labels after the last 'j++'.
Instead of changing '>' to '>=' there, add the bounds check at the start of the second 'case' (the first one already has it).
Also, remove redundant last checks for 'j' index bigger than array size. The expression is always false. Moreover, before or after the patch 'table->last' can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it seems it can be a valid value.
Detected using the static analysis tool - Svace.
--- drivers/gpu/drm/radeon/ni_dpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/ni_dpm.c +2 -4
@@ -2741,10 +2741,10 @@ static int ni_set_mc_special_registers(struct radeon_device *rdev, table->mc_reg_table_entry[k].mc_data[j] |=0x100 ; } j++; -if (j >SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ) -return -EINVAL ;break ;case MC_SEQ_RESERVE_M >>2 : +if (j >=SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ) +return -EINVAL ; temp_reg =RREG32 (MC_PMG_CMD_MRS1 ); table->mc_reg_address[j].s1 =MC_PMG_CMD_MRS1 >>2 ; table->mc_reg_address[j].s0 =MC_SEQ_PMG_CMD_MRS1_LP >>2 ;
@@ -2753,8 +2753,6 @@ static int ni_set_mc_special_registers(struct radeon_device *rdev, (temp_reg &0xffff0000 ) | (table->mc_reg_table_entry[k].mc_data[i] &0x0000ffff ); j++; -if (j >SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ) -return -EINVAL ;break ;default :break ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 321/1095 drm/mediatek: Modify dsi funcs to atomic operations
In reply to Greg Kroah-HartmanFrom: Xinlei Lee <[email protected]>
[ Upstream commit 7f6335c6a258edf4d5ff1b904bc033188dc7b48b ]
Because .enable & .disable are deprecated. Use .atomic_enable & .atomic_disable instead.
--- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/mediatek/mtk_dsi.c +6 -4
@@ -751,14 +751,16 @@ static void mtk_dsi_bridge_mode_set(struct drm_bridge *bridge,drm_display_mode_to_videomode (adjusted, &dsi->vm); } -static void mtk_dsi_bridge_disable (struct drm_bridge *bridge) +static void mtk_dsi_bridge_atomic_disable (struct drm_bridge *bridge, +struct drm_bridge_state *old_bridge_state) {struct mtk_dsi *dsi =bridge_to_dsi (bridge);mtk_output_dsi_disable (dsi); } -static void mtk_dsi_bridge_enable (struct drm_bridge *bridge) +static void mtk_dsi_bridge_atomic_enable (struct drm_bridge *bridge, +struct drm_bridge_state *old_bridge_state) {struct mtk_dsi *dsi =bridge_to_dsi (bridge);
@@ -767,8 +769,8 @@ static void mtk_dsi_bridge_enable(struct drm_bridge *bridge)static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = { .attach = mtk_dsi_bridge_attach, - .disable = mtk_dsi_bridge_disable, - .enable = mtk_dsi_bridge_enable, + .atomic_disable = mtk_dsi_bridge_atomic_disable, + .atomic_enable = mtk_dsi_bridge_atomic_enable, .mode_set = mtk_dsi_bridge_mode_set, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 322/1095 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs
In reply to Greg Kroah-HartmanFrom: Jitao Shi <[email protected]>
[ Upstream commit cde7e2e35c2866d22a3a012e72a41052dfcc255d ]
In order to match the changes of "Use the drm_panel_bridge API", the poweron/poweroff of dsi is extracted from enable/disable and defined as new funcs (atomic_pre_enable/atomic_post_disable).
Since dsi_poweron is moved from dsi_enable to pre_enable function, in order to avoid poweron failure, the operation of dsi register fails to cause bus hang. Therefore, the protection mechanism is added to the dsi_enable function.
--- drivers/gpu/drm/mediatek/mtk_dsi.c | 53 +++++++++++++++++++----------- 1 file changed, 34 insertions(+), 19 deletions(-)
drivers/gpu/drm/mediatek/mtk_dsi.c +34 -19
@@ -679,16 +679,6 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)if (--dsi->refcount !=0 )return ; -/* -* mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since -* mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), -* which needs irq for vblank, and mtk_dsi_stop() will disable irq. -* mtk_dsi_start() needs to be called in mtk_output_dsi_enable(), -* after dsi is fully set. -*/ -mtk_dsi_stop (dsi); - -mtk_dsi_switch_to_cmd_mode (dsi,VM_DONE_INT_FLAG ,500 );mtk_dsi_reset_engine (dsi);mtk_dsi_lane0_ulp_mode_enter (dsi);mtk_dsi_clk_ulp_mode_enter (dsi);
@@ -703,17 +693,9 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)static void mtk_output_dsi_enable (struct mtk_dsi *dsi) { -int ret; -if (dsi->enabled)return ; - ret =mtk_dsi_poweron (dsi); -if (ret <0 ) { -DRM_ERROR ("failed to power on dsi\n" ); -return ; - } -mtk_dsi_set_mode (dsi);mtk_dsi_clk_hs_mode (dsi,1 );
@@ -727,7 +709,16 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi)if (!dsi->enabled)return ; -mtk_dsi_poweroff (dsi); +/* +* mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since +* mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), +* which needs irq for vblank, and mtk_dsi_stop() will disable irq. +* mtk_dsi_start() needs to be called in mtk_output_dsi_enable(), +* after dsi is fully set. +*/ +mtk_dsi_stop (dsi); + +mtk_dsi_switch_to_cmd_mode (dsi,VM_DONE_INT_FLAG ,500 ); dsi->enabled = false; }
@@ -764,13 +755,37 @@ static void mtk_dsi_bridge_atomic_enable(struct drm_bridge *bridge, {struct mtk_dsi *dsi =bridge_to_dsi (bridge); +if (dsi->refcount ==0 ) +return ; +mtk_output_dsi_enable (dsi); } +static void mtk_dsi_bridge_atomic_pre_enable (struct drm_bridge *bridge, +struct drm_bridge_state *old_bridge_state) +{ +struct mtk_dsi *dsi =bridge_to_dsi (bridge); +int ret; + + ret =mtk_dsi_poweron (dsi); +if (ret <0 ) +DRM_ERROR ("failed to power on dsi\n" ); +} + +static void mtk_dsi_bridge_atomic_post_disable (struct drm_bridge *bridge, +struct drm_bridge_state *old_bridge_state) +{ +struct mtk_dsi *dsi =bridge_to_dsi (bridge); + +mtk_dsi_poweroff (dsi); +} +static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = { .attach = mtk_dsi_bridge_attach, .atomic_disable = mtk_dsi_bridge_atomic_disable, .atomic_enable = mtk_dsi_bridge_atomic_enable, + .atomic_pre_enable = mtk_dsi_bridge_atomic_pre_enable, + .atomic_post_disable = mtk_dsi_bridge_atomic_post_disable, .mode_set = mtk_dsi_bridge_mode_set, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 323/1095 drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
In reply to Greg Kroah-HartmanFrom: Xinlei Lee <[email protected]>
[ Upstream commit fa5d0a0205c34734c5b8daa77e39ac2817f63a10 ]
In the dsi_enable function, mtk_dsi_rxtx_control is to pull up the MIPI signal operation. Before dsi_disable, MIPI should also be pulled down by writing a register instead of disabling dsi.
If disable dsi without pulling the mipi signal low, the value of the register will still maintain the setting of the mipi signal being pulled high.
After resume, even if the mipi signal is not pulled high, it will still be in the high state.
--- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/mediatek/mtk_dsi.c +2 -0
@@ -682,6 +682,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)mtk_dsi_reset_engine (dsi);mtk_dsi_lane0_ulp_mode_enter (dsi);mtk_dsi_clk_ulp_mode_enter (dsi); +/* set the lane number as 0 to pull down mipi */ +writel (0 , dsi->regs +DSI_TXRX_CTRL );mtk_dsi_disable (dsi);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 324/1095 drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit 7d255ddbbf679aa47e041cbf68520fd985ed2279 ]
of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.
--- drivers/gpu/drm/meson/meson_encoder_cvbs.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/meson/meson_encoder_cvbs.c +1 -0
@@ -238,6 +238,7 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) } meson_encoder_cvbs->next_bridge =of_drm_find_bridge (remote); +of_node_put (remote);if (!meson_encoder_cvbs->next_bridge) {dev_err (priv->dev,"Failed to find CVBS Connector bridge\n" );return -EPROBE_DEFER ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 325/1095 drm/meson: encoder_hdmi: Fix refcount leak in meson_encoder_hdmi_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit d82a5a4aae9d0203234737caed1bf470aa317568 ]
of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.
--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/meson/meson_encoder_hdmi.c +11 -4
@@ -365,7 +365,8 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) meson_encoder_hdmi->next_bridge =of_drm_find_bridge (remote);if (!meson_encoder_hdmi->next_bridge) {dev_err (priv->dev,"Failed to find HDMI transceiver bridge\n" ); -return -EPROBE_DEFER ; + ret = -EPROBE_DEFER ; + goto err_put_node; }/* HDMI Encoder Bridge */
@@ -383,7 +384,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) DRM_MODE_ENCODER_TMDS);if (ret) {dev_err (priv->dev,"Failed to init HDMI encoder: %d\n" , ret); -return ret; + goto err_put_node; } meson_encoder_hdmi->encoder.possible_crtcs =BIT (0 );
@@ -393,7 +394,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) DRM_BRIDGE_ATTACH_NO_CONNECTOR);if (ret) {dev_err (priv->dev,"Failed to attach bridge: %d\n" , ret); -return ret; + goto err_put_node; }/* Initialize & attach Bridge Connector */
@@ -401,7 +402,8 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) &meson_encoder_hdmi->encoder);if (IS_ERR (meson_encoder_hdmi->connector)) {dev_err (priv->dev,"Unable to create HDMI bridge connector\n" ); -return PTR_ERR (meson_encoder_hdmi->connector); + ret =PTR_ERR (meson_encoder_hdmi->connector); + goto err_put_node; }drm_connector_attach_encoder (meson_encoder_hdmi->connector, &meson_encoder_hdmi->encoder);
@@ -428,6 +430,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv) meson_encoder_hdmi->connector->ycbcr_420_allowed = true; pdev =of_find_device_by_node (remote); +of_node_put (remote);if (pdev) {struct cec_connector_info conn_info;struct cec_notifier *notifier;
@@ -446,4 +449,8 @@ int meson_encoder_hdmi_init(struct meson_drm *priv)dev_dbg (priv->dev,"HDMI encoder initialized\n" );return 0 ; + +err_put_node: +of_node_put (remote); +return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 326/1095 drm/bridge: lt9611uxc: Cancel only drivers work
In reply to Greg Kroah-HartmanFrom: Bjorn Andersson <[email protected]>
[ Upstream commit dfa687bffc8a4a21ed929c7dececf01b8f1f52ee ]
During device remove care needs to be taken that no work is pending before it removes the underlying DRM bridge etc, but this can be done on the specific work rather than waiting for the flush of the system-wide workqueue.
--- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/lontium-lt9611uxc.c +1 -1
@@ -982,7 +982,7 @@ static int lt9611uxc_remove(struct i2c_client *client)struct lt9611uxc *lt9611uxc =i2c_get_clientdata (client);disable_irq (client->irq); -flush_scheduled_work (); +cancel_work_sync (<9611uxc->work);lt9611uxc_audio_exit (lt9611uxc);drm_bridge_remove (<9611uxc->bridge);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 327/1095 i2c: npcm: Remove own slave addresses 2:10
In reply to Greg Kroah-HartmanFrom: Tali Perry <[email protected]>
[ Upstream commit 47d506d1a28fd10a9fb1f33df5622d88fae72095 ]
NPCM can support up to 10 own slave addresses. In practice, only one address is actually being used. In order to access addresses 2 and above, need to switch register banks. The switch needs spinlock.
To avoid using spinlock for this useless feature removed support of SA >=
2. Also fix returned slave event enum.
Remove some comment since the bank selection is not required. The bank selection is not required since the supported slave addresses are reduced.
--- drivers/i2c/busses/i2c-npcm7xx.c | 41 +++++++++++++------------------- 1 file changed, 16 insertions(+), 25 deletions(-)
drivers/i2c/busses/i2c-npcm7xx.c +16 -25
@@ -123,11 +123,11 @@ enum i2c_addr {* Since the addr regs are sprinkled all over the address space, * use this array to get the address or each register. */ -#define I2C_NUM_OWN_ADDR 10 +#define I2C_NUM_OWN_ADDR 2 +#define I2C_NUM_OWN_ADDR_SUPPORTED 2 +static const int npcm_i2caddr[I2C_NUM_OWN_ADDR ] = { -NPCM_I2CADDR1 ,NPCM_I2CADDR2 ,NPCM_I2CADDR3 ,NPCM_I2CADDR4 , -NPCM_I2CADDR5 ,NPCM_I2CADDR6 ,NPCM_I2CADDR7 ,NPCM_I2CADDR8 , -NPCM_I2CADDR9 ,NPCM_I2CADDR10 , +NPCM_I2CADDR1 ,NPCM_I2CADDR2 , };#endif
@@ -391,14 +391,10 @@ static void npcm_i2c_disable(struct npcm_i2c *bus)#if IS_ENABLED (CONFIG_I2C_SLAVE )int i; -/* select bank 0 for I2C addresses */ -npcm_i2c_select_bank (bus,I2C_BANK_0 ); -/* Slave addresses removal */ -for (i =I2C_SLAVE_ADDR1 ; i <I2C_NUM_OWN_ADDR ; i++) +for (i =I2C_SLAVE_ADDR1 ; i <I2C_NUM_OWN_ADDR_SUPPORTED ; i++)iowrite8 (0 , bus->reg + npcm_i2caddr[i]); -npcm_i2c_select_bank (bus,I2C_BANK_1 );#endif /* Disable module */ i2cctl2 =ioread8 (bus->reg +NPCM_I2CCTL2 );
@@ -603,8 +599,7 @@ static int npcm_i2c_slave_enable(struct npcm_i2c *bus, enum i2c_addr addr_type, i2cctl1 &= ~NPCM_I2CCTL1_GCMEN ;iowrite8 (i2cctl1, bus->reg +NPCM_I2CCTL1 );return 0 ; - } -if (addr_type ==I2C_ARP_ADDR ) { + }else if (addr_type ==I2C_ARP_ADDR ) { i2cctl3 =ioread8 (bus->reg +NPCM_I2CCTL3 );if (enable) i2cctl3 |=I2CCTL3_ARPMEN ;
@@ -613,16 +608,16 @@ static int npcm_i2c_slave_enable(struct npcm_i2c *bus, enum i2c_addr addr_type,iowrite8 (i2cctl3, bus->reg +NPCM_I2CCTL3 ); return 0; } +if (addr_type >I2C_SLAVE_ADDR2 && addr_type <=I2C_SLAVE_ADDR10 ) +dev_err (bus->dev,"try to enable more than 2 SA not supported\n" ); +if (addr_type >=I2C_ARP_ADDR )return -EFAULT ; -/* select bank 0 for address 3 to 10 */ -if (addr_type >I2C_SLAVE_ADDR2 ) -npcm_i2c_select_bank (bus,I2C_BANK_0 ); +/* Set and enable the address */ iowrite8 (sa_reg, bus->reg + npcm_i2caddr[addr_type]);npcm_i2c_slave_int_enable (bus, enable); -if (addr_type >I2C_SLAVE_ADDR2 ) -npcm_i2c_select_bank (bus,I2C_BANK_1 ); +return 0 ; }#endif
@@ -843,15 +838,11 @@ static u8 npcm_i2c_get_slave_addr(struct npcm_i2c *bus, enum i2c_addr addr_type) {u8 slave_add; -/* select bank 0 for address 3 to 10 */ -if (addr_type >I2C_SLAVE_ADDR2 ) -npcm_i2c_select_bank (bus,I2C_BANK_0 ); +if (addr_type >I2C_SLAVE_ADDR2 && addr_type <=I2C_SLAVE_ADDR10 ) +dev_err (bus->dev,"get slave: try to use more than 2 SA not supported\n" ); slave_add =ioread8 (bus->reg + npcm_i2caddr[(int )addr_type]); -if (addr_type >I2C_SLAVE_ADDR2 ) -npcm_i2c_select_bank (bus,I2C_BANK_1 ); -return slave_add; }
@@ -861,12 +852,12 @@ static int npcm_i2c_remove_slave_addr(struct npcm_i2c *bus, u8 slave_add)/* Set the enable bit */ slave_add |=0x80 ; -npcm_i2c_select_bank (bus,I2C_BANK_0 ); -for (i =I2C_SLAVE_ADDR1 ; i <I2C_NUM_OWN_ADDR ; i++) { + +for (i =I2C_SLAVE_ADDR1 ; i <I2C_NUM_OWN_ADDR_SUPPORTED ; i++) {if (ioread8 (bus->reg + npcm_i2caddr[i]) == slave_add)iowrite8 (0 , bus->reg + npcm_i2caddr[i]); } -npcm_i2c_select_bank (bus,I2C_BANK_1 ); +return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 328/1095 i2c: npcm: Correct slave role behavior
In reply to Greg Kroah-HartmanFrom: Tali Perry <[email protected]>
[ Upstream commit d7aa1b149b8fc04d802879cf4662010aa4a42deb ]
Correct the slave transaction logic to be compatible with the generic slave backend driver.
--- drivers/i2c/busses/i2c-npcm7xx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-npcm7xx.c +6 -3
@@ -912,11 +912,15 @@ static int npcm_i2c_slave_get_wr_buf(struct npcm_i2c *bus)for (i =0 ; i <I2C_HW_FIFO_SIZE ; i++) {if (bus->slv_wr_size >=I2C_HW_FIFO_SIZE )break ; -i2c_slave_event (bus->slave,I2C_SLAVE_READ_REQUESTED , &value); +if (bus->state ==I2C_SLAVE_MATCH ) { +i2c_slave_event (bus->slave,I2C_SLAVE_READ_REQUESTED , &value); + bus->state =I2C_OPER_STARTED ; + }else { +i2c_slave_event (bus->slave,I2C_SLAVE_READ_PROCESSED , &value); + } ind = (bus->slv_wr_ind + bus->slv_wr_size) %I2C_HW_FIFO_SIZE ; bus->slv_wr_buf[ind] = value; bus->slv_wr_size++; -i2c_slave_event (bus->slave,I2C_SLAVE_READ_PROCESSED , &value); }return I2C_HW_FIFO_SIZE - ret; }
@@ -964,7 +968,6 @@ static void npcm_i2c_slave_xmit(struct npcm_i2c *bus, u16 nwrite,if (nwrite ==0 )return ; - bus->state =I2C_OPER_STARTED ; bus->operation =I2C_WRITE_OPER ;/* get the next buffer */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 329/1095 i2c: mxs: Silence a clang warning
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
[ Upstream commit 3d43273d7d1e1a5374d531e901d3c537b4c97bbf ]
Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning:
drivers/i2c/busses/i2c-mxs.c:802:18: warning: cast to smaller integer type 'enum mxs_i2c_devtype' from 'const void *' [-Wvoid-pointer-to-enum-cast]
--- drivers/i2c/busses/i2c-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mxs.c +1 -1
@@ -799,7 +799,7 @@ static int mxs_i2c_probe(struct platform_device *pdev)if (!i2c)return -ENOMEM ; - i2c->dev_type = (enum mxs_i2c_devtype )of_device_get_match_data (&pdev->dev); + i2c->dev_type = (uintptr_t )of_device_get_match_data (&pdev->dev); i2c->regs =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (i2c->regs))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 330/1095 virtio-gpu: fix a missing check to avoid NULL dereference
In reply to Greg Kroah-HartmanFrom: Xiaomeng Tong <[email protected]>
[ Upstream commit bd63f11f4c3c46afec07d821f74736161ff6e526 ]
'cache_ent' could be set NULL inside virtio_gpu_cmd_get_capset() and it will lead to a NULL dereference by a lately use of it (i.e., ptr = cache_ent->caps_cache). Fix it with a NULL check.
[ kraxel: minor codestyle fixup ]
--- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_ioctl.c +4 -2
@@ -579,8 +579,10 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,spin_unlock (&vgdev->display_info_lock);/* not in cache - need to talk to hw */ -virtio_gpu_cmd_get_capset (vgdev, found_valid, args->cap_set_ver, - &cache_ent); + ret =virtio_gpu_cmd_get_capset (vgdev, found_valid, args->cap_set_ver, + &cache_ent); +if (ret) +return ret;virtio_gpu_notify (vgdev); copy_exit:
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 331/1095 drm/virtio: Fix NULL vs IS_ERR checking in virtio_gpu_object_shmem_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit c24968734abfed81c8f93dc5f44a7b7a9aecadfa ]
Since drm_prime_pages_to_sg() function return error pointers. The drm_gem_shmem_get_sg_table() function returns error pointers too. Using IS_ERR() to check the return value to fix this.
--- drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_object.c +2 -2
@@ -168,9 +168,9 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,* since virtio_gpu doesn't support dma-buf import from other devices. */ shmem->pages =drm_gem_shmem_get_sg_table (&bo->base); -if (!shmem->pages) { +if (IS_ERR (shmem->pages)) {drm_gem_shmem_unpin (&bo->base); -return -EINVAL ; +return PTR_ERR (shmem->pages); }if (use_dma_api) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 332/1095 drm: adv7511: override i2c address of cec before accessing it
In reply to Greg Kroah-HartmanFrom: Antonio Borneo <[email protected]>
[ Upstream commit 9cc4853e4781bf0dd0f35355dc92d97c9da02f5d ]
Commit 680532c50bca ("drm: adv7511: Add support for i2c_new_secondary_device") allows a device tree node to override the default addresses of the secondary i2c devices. This is useful for solving address conflicts on the i2c bus.
In adv7511_init_cec_regmap() the new i2c address of cec device is read from device tree and immediately accessed, well before it is written in the proper register to override the default address. This can cause an i2c error during probe and a consequent probe failure.
Once the new i2c address is read from the device tree, override the default address before any attempt to access the cec.
Tested with adv7533 and stm32mp157f.
--- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +4 -3
@@ -1060,6 +1060,10 @@ static int adv7511_init_cec_regmap(struct adv7511 *adv) ADV7511_CEC_I2C_ADDR_DEFAULT);if (IS_ERR (adv->i2c_cec))return PTR_ERR (adv->i2c_cec); + +regmap_write (adv->regmap,ADV7511_REG_CEC_I2C_ADDR , + adv->i2c_cec->addr <<1 ); +i2c_set_clientdata (adv->i2c_cec, adv); adv->regmap_cec = devm_regmap_init_i2c(adv->i2c_cec,
@@ -1264,9 +1268,6 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)if (ret) goto err_i2c_unregister_packet; -regmap_write (adv7511->regmap,ADV7511_REG_CEC_I2C_ADDR , - adv7511->i2c_cec->addr <<1 ); -INIT_WORK (&adv7511->hpd_work, adv7511_hpd_work);if (i2c->irq) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 333/1095 crypto: sun8i-ss - do not allocate memory when handling hash requests
In reply to Greg Kroah-HartmanFrom: Corentin Labbe <[email protected]>
[ Upstream commit 8eec4563f152981a441693fc97c5459843dc5e6e ]
Instead of allocate memory on each requests, it is easier to pre-allocate buffers.
This made error path easier.
--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 10 ++++++++++ drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 15 +++------------ drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 4 ++++ 3 files changed, 17 insertions(+), 12 deletions(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c +10 -0
@@ -486,6 +486,16 @@ static int allocate_flows(struct sun8i_ss_dev *ss) goto error_engine; } +/* the padding could be up to two block. */ + ss->flows[i].pad =devm_kmalloc (ss->dev,SHA256_BLOCK_SIZE *2 , +GFP_KERNEL |GFP_DMA ); +if (!ss->flows[i].pad) + goto error_engine; + ss->flows[i].result =devm_kmalloc (ss->dev,SHA256_DIGEST_SIZE , +GFP_KERNEL |GFP_DMA ); +if (!ss->flows[i].result) + goto error_engine; + ss->flows[i].engine =crypto_engine_alloc_init (ss->dev, true);if (!ss->flows[i].engine) {dev_err (ss->dev,"Cannot allocate engine\n" );
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c +3 -12
@@ -342,18 +342,11 @@ int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq)if (digestsize ==SHA224_DIGEST_SIZE ) digestsize =SHA256_DIGEST_SIZE ; -/* the padding could be up to two block. */ - pad =kzalloc (algt->alg.hash.halg.base.cra_blocksize *2 ,GFP_KERNEL |GFP_DMA ); -if (!pad) -return -ENOMEM ; + result = ss->flows[rctx->flow].result; + pad = ss->flows[rctx->flow].pad; +memset (pad,0 , algt->alg.hash.halg.base.cra_blocksize *2 ); bf = (__le32 *)pad; - result =kzalloc (digestsize,GFP_KERNEL |GFP_DMA ); -if (!result) { -kfree (pad); -return -ENOMEM ; - } -for (i =0 ; i <MAX_SG ; i++) { rctx->t_dst[i].addr =0 ; rctx->t_dst[i].len =0 ;
@@ -449,8 +442,6 @@ int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq)memcpy (areq->result, result, algt->alg.hash.halg.digestsize); theend: -kfree (pad); -kfree (result);local_bh_disable ();crypto_finalize_hash_request (engine, breq, err);local_bh_enable ();
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h +4 -0
@@ -123,6 +123,8 @@ struct sginfo {* @stat_req: number of request done by this flow * @iv: list of IV to use for each step * @biv: buffer which contain the backuped IV +* @pad: padding buffer for hash operations +* @result: buffer for storing the result of hash operations */ struct sun8i_ss_flow {struct crypto_engine *engine;
@@ -130,6 +132,8 @@ struct sun8i_ss_flow {int status;u8 *iv[MAX_SG ];u8 *biv; +void *pad; +void *result;#ifdef CONFIG_CRYPTO_DEV_SUN8I_SS_DEBUG unsigned long stat_req;#endif
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 334/1095 crypto: sun8i-ss - fix error codes in allocate_flows()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit d2765e1b9ac4b2d5a5d5bf17f468c9b3566c3770 ]
These failure paths should return -ENOMEM. Currently they return success.
--- .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c +12 -4
@@ -476,25 +476,33 @@ static int allocate_flows(struct sun8i_ss_dev *ss) ss->flows[i].biv =devm_kmalloc (ss->dev,AES_BLOCK_SIZE ,GFP_KERNEL |GFP_DMA ); -if (!ss->flows[i].biv) +if (!ss->flows[i].biv) { + err = -ENOMEM ; goto error_engine; + }for (j =0 ; j <MAX_SG ; j++) { ss->flows[i].iv[j] =devm_kmalloc (ss->dev,AES_BLOCK_SIZE ,GFP_KERNEL |GFP_DMA ); -if (!ss->flows[i].iv[j]) +if (!ss->flows[i].iv[j]) { + err = -ENOMEM ; goto error_engine; + } }/* the padding could be up to two block. */ ss->flows[i].pad =devm_kmalloc (ss->dev,SHA256_BLOCK_SIZE *2 ,GFP_KERNEL |GFP_DMA ); -if (!ss->flows[i].pad) +if (!ss->flows[i].pad) { + err = -ENOMEM ; goto error_engine; + } ss->flows[i].result =devm_kmalloc (ss->dev,SHA256_DIGEST_SIZE ,GFP_KERNEL |GFP_DMA ); -if (!ss->flows[i].result) +if (!ss->flows[i].result) { + err = -ENOMEM ; goto error_engine; + } ss->flows[i].engine =crypto_engine_alloc_init (ss->dev, true);if (!ss->flows[i].engine) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 335/1095 net: fix sk_wmem_schedule() and sk_rmem_schedule() errors
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 7c80b038d23e1f4c7fcc311f43f83b8c60e7fb80 ]
If sk->sk_forward_alloc is 150000, and we need to schedule 150001 bytes, we want to allocate 1 byte more (rounded up to one page), instead of 150001 :/
--- include/net/sock.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
include/net/sock.h +8 -4
@@ -1557,19 +1557,23 @@ static inline bool sk_has_account(struct sock *sk)static inline bool sk_wmem_schedule (struct sock *sk,int size) { +int delta; +if (!sk_has_account (sk))return true; -return size <= sk->sk_forward_alloc || -__sk_mem_schedule (sk, size,SK_MEM_SEND ); + delta = size - sk->sk_forward_alloc; +return delta <=0 ||__sk_mem_schedule (sk, delta,SK_MEM_SEND ); }static inline bool sk_rmem_schedule (struct sock *sk,struct sk_buff *skb,int size) { +int delta; +if (!sk_has_account (sk))return true; -return size <= sk->sk_forward_alloc || -__sk_mem_schedule (sk, size,SK_MEM_RECV ) || + delta = size - sk->sk_forward_alloc; +return delta <=0 ||__sk_mem_schedule (sk, delta,SK_MEM_RECV ) ||skb_pfmemalloc (skb); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 336/1095 can: netlink: allow configuring of fixed bit rates without need for do_set_bittiming callback
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit 7e193a42c37cf40eba8ac5af2d5e8eeb8b9506f9 ]
Usually CAN devices support configurable bit rates. The limits are defined by struct can_priv::bittiming_const. Another way is to implement the struct can_priv::do_set_bittiming callback.
If the bit rate is configured via netlink, the can_changelink() function checks that either can_priv::bittiming_const or struct can_priv::do_set_bittiming is implemented.
In commit 431af779256c ("can: dev: add CAN interface API for fixed bitrates") an API for configuring bit rates on CAN interfaces that only support fixed bit rates was added. The supported bit rates are defined by struct can_priv::bitrate_const.
However the above mentioned commit forgot to add the struct can_priv::bitrate_const to the check in can_changelink().
In order to avoid to implement a no-op can_priv::do_set_bittiming callback on devices with fixed bit rates, extend the check in can_changelink() accordingly.
--- drivers/net/can/dev/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/dev/netlink.c +2 -1
@@ -176,7 +176,8 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[],* directly via do_set_bitrate(). Bail out if neither * is given. */ -if (!priv->bittiming_const && !priv->do_set_bittiming) +if (!priv->bittiming_const && !priv->do_set_bittiming && + !priv->bitrate_const)return -EOPNOTSUPP ;memcpy (&bt,nla_data (data[IFLA_CAN_BITTIMING ]),sizeof (bt));
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 337/1095 drm/vkms: check plane_composer->map[0] before using it
In reply to Greg Kroah-HartmanFrom: Tales Lelo da Aparecida <[email protected]>
[ Upstream commit 24f6fe3226c6f9f1b8406311a96b59c6e650b707 ]
Fix a copypasta error. The caller of compose_plane() already checks primary_composer->map. In contrast, plane_composer->map is never verified here before handling.
--- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vkms/vkms_composer.c +1 -1
@@ -157,7 +157,7 @@ static void compose_plane(struct vkms_composer *primary_composer,void *vaddr;void (*pixel_blend)(const u8 *p_src,u8 *p_dst); -if (WARN_ON (iosys_map_is_null (&primary_composer->map[0 ]))) +if (WARN_ON (iosys_map_is_null (&plane_composer->map[0 ])))return ; vaddr = plane_composer->map[0 ].vaddr;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 338/1095 can: netlink: allow configuring of fixed data bit rates without need for do_set_data_bittiming callback
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit ec30c109391c5eac9b1d689a61e4bfed88148947 ]
This patch is similar to 7e193a42c37c ("can: netlink: allow configuring of fixed bit rates without need for do_set_bittiming callback") but for data bit rates instead of bit rates.
Usually CAN devices support configurable data bit rates. The limits are defined by struct can_priv::data_bittiming_const. Another way is to implement the struct can_priv::do_set_data_bittiming callback.
If the bit rate is configured via netlink, the can_changelink() function checks that either can_priv::data_bittiming_const or struct can_priv::do_set_data_bittiming is implemented.
In commit 431af779256c ("can: dev: add CAN interface API for fixed bitrates") an API for configuring bit rates on CAN interfaces that only support fixed bit rates was added. The supported bit rates are defined by struct can_priv::bitrate_const.
However the above mentioned commit forgot to add the struct can_priv::data_bitrate_const to the check in can_changelink().
In order to avoid to implement a no-op can_priv::do_set_data_bittiming callback on devices with fixed data bit rates, extend the check in can_changelink() accordingly.
--- drivers/net/can/dev/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/dev/netlink.c +2 -1
@@ -279,7 +279,8 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[],* directly via do_set_bitrate(). Bail out if neither * is given. */ -if (!priv->data_bittiming_const && !priv->do_set_data_bittiming) +if (!priv->data_bittiming_const && !priv->do_set_data_bittiming && + !priv->data_bitrate_const)return -EOPNOTSUPP ; memcpy(&dbt, nla_data(data[IFLA_CAN_DATA_BITTIMING]),
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 339/1095 drm/bridge: it6505: Add missing CRYPTO_HASH dependency
In reply to Greg Kroah-HartmanFrom: Zheng Bin <[email protected]>
[ Upstream commit abf0ba5a34eae0d7359228f4319a6659676fbd0a ]
The driver uses crypto hash functions so it needs to select CRYPTO_HASH. This fixes build errors:
drivers/gpu/drm/bridge/ite-it6505.o: in function `it6505_hdcp_wait_ksv_list':
ite-it6505.c:(.text+0x4c26): undefined reference to crypto_alloc_shash' ite-it6505.c:(.text+0x4c6d): undefined reference to crypto_shash_digest' ite-it6505.c:(.text+0x4c7d): undefined reference to crypto_destroy_tfm' ite-it6505.c:(.text+0x4d69): undefined reference to crypto_destroy_tfm'
--- drivers/gpu/drm/bridge/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/bridge/Kconfig +2 -0
@@ -82,6 +82,8 @@ config DRM_ITE_IT6505 select DRM_KMS_HELPER select DRM_DP_HELPER select EXTCON + select CRYPTO + select CRYPTO_HASH help ITE IT6505 DisplayPort bridge chip driver.
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 340/1095 i2c: Fix a potential use after free
In reply to Greg Kroah-HartmanFrom: Xu Wang <[email protected]>
[ Upstream commit e4c72c06c367758a14f227c847f9d623f1994ecf ]
Free the adap structure only after we are done using it. This patch just moves the put_device() down a bit to avoid the use after free.
--- drivers/i2c/i2c-core-base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/i2c-core-base.c +2 -1
@@ -2467,8 +2467,9 @@ void i2c_put_adapter(struct i2c_adapter *adap)if (!adap)return ; -put_device (&adap->dev);module_put (adap->owner); +/* Should be last, otherwise we risk use-after-free with 'adap' */ +put_device (&adap->dev); }EXPORT_SYMBOL (i2c_put_adapter);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 341/1095 tcp: fix possible freeze in tx path under memory pressure
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 849b425cd091e1804af964b771761cfbefbafb43 ]
Blamed commit only dealt with applications issuing small writes.
Issue here is that we allow to force memory schedule for the sk_buff allocation, but we have no guarantee that sendmsg() is able to copy some payload in it.
In this patch, I make sure the socket can use up to tcp_wmem[0] bytes.
For example, if we consider tcp_wmem[0] = 4096 (default on x86), and initial skb->truesize being 1280, tcp_sendmsg() is able to copy up to 2816 bytes under memory pressure.
Before this patch a sendmsg() sending more than 2816 bytes would either block forever (if persistent memory pressure), or return -EAGAIN.
For bigger MTU networks, it is advised to increase tcp_wmem[0] to avoid sending too small packets.
v2: deal with zero copy paths.
--- net/ipv4/tcp.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-)
net/ipv4/tcp.c +29 -4
@@ -953,6 +953,23 @@ static int tcp_downgrade_zcopy_pure(struct sock *sk, struct sk_buff *skb)return 0 ; } +static int tcp_wmem_schedule (struct sock *sk,int copy) +{ +int left; + +if (likely (sk_wmem_schedule (sk, copy))) +return copy; + +/* We could be in trouble if we have nothing queued. +* Use whatever is left in sk->sk_forward_alloc and tcp_wmem[0] +* to guarantee some progress. +*/ + left =sock_net (sk)->ipv4.sysctl_tcp_wmem[0 ] - sk->sk_wmem_queued; +if (left >0 ) +sk_forced_mem_schedule (sk,min (left, copy)); +return min (copy, sk->sk_forward_alloc); +} +static struct sk_buff *tcp_build_frag (struct sock *sk,int size_goal,int flags,struct page *page,int offset,size_t *size) {
@@ -988,7 +1005,11 @@ static struct sk_buff *tcp_build_frag(struct sock *sk, int size_goal, int flags,tcp_mark_push (tp, skb); goto new_segment; } -if (tcp_downgrade_zcopy_pure (sk, skb) || !sk_wmem_schedule (sk, copy)) +if (tcp_downgrade_zcopy_pure (sk, skb)) +return NULL ; + + copy =tcp_wmem_schedule (sk, copy); +if (!copy)return NULL ;if (can_coalesce) {
@@ -1337,8 +1358,11 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) copy =min_t (int, copy, pfrag->size - pfrag->offset); -if (tcp_downgrade_zcopy_pure (sk, skb) || - !sk_wmem_schedule (sk, copy)) +if (tcp_downgrade_zcopy_pure (sk, skb)) + goto wait_for_space; + + copy =tcp_wmem_schedule (sk, copy); +if (!copy) goto wait_for_space; err = skb_copy_to_page_nocache(sk, &msg->msg_iter, skb,
@@ -1365,7 +1389,8 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)skb_shinfo (skb)->flags |=SKBFL_PURE_ZEROCOPY ;if (!skb_zcopy_pure (skb)) { -if (!sk_wmem_schedule (sk, copy)) + copy =tcp_wmem_schedule (sk, copy); +if (!copy) goto wait_for_space; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 342/1095 crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs()
In reply to Greg Kroah-HartmanFrom: Alexey Khoroshilov <[email protected]>
[ Upstream commit d61a7b3decf7f0cf4121a7204303deefd2c7151b ]
There is no i decrement in while (i >= 0) loop.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 + 1 file changed, 1 insertion(+)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +1 -0
@@ -151,6 +151,7 @@ static int sun8i_ss_setup_ivs(struct skcipher_request *areq)while (i >=0 ) {dma_unmap_single (ss->dev, rctx->p_iv[i], ivsize,DMA_TO_DEVICE );memzero_explicit (sf->iv[i], ivsize); + i--; }return err; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 343/1095 net: ag71xx: fix discards const qualifier warning
In reply to Greg Kroah-HartmanFrom: Oleksij Rempel <[email protected]>
[ Upstream commit 225b0ed27e6ac523e5e98e7395392446859c7f20 ]
Current kernel will compile this driver with warnings. This patch will fix it.
drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_fast_reset':drivers/net/ethernet/atheros/ag71xx.c:996:31: warning: passing argument 2 of 'ag71xx_hw_set _macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
996 | ag71xx_hw_set_macaddr(ag, dev->dev_addr);
| ~~~^~~~~~~~~~
drivers/net/ethernet/atheros/ag71xx.c:951:69: note: expected 'unsigned char *' but argument
is of type 'const unsigned char *'
951 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
| ~~~~~~~~~~~~~~~^~~
drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_open':
drivers/net/ethernet/atheros/ag71xx.c:1441:32: warning: passing argument 2 of 'ag71xx_hw_se
t_macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
1441 | ag71xx_hw_set_macaddr(ag, ndev->dev_addr);
| ~~~~^~~~~~~~~~
drivers/net/ethernet/atheros/ag71xx.c:951:69: note: expected 'unsigned char *' but argument
is of type 'const unsigned char *'
951 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
| ~~~~~~~~~~~~~~~^~~--- drivers/net/ethernet/atheros/ag71xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/atheros/ag71xx.c +1 -1
@@ -946,7 +946,7 @@ static unsigned int ag71xx_max_frame_len(unsigned int mtu)return ETH_HLEN +VLAN_HLEN + mtu +ETH_FCS_LEN ; } -static void ag71xx_hw_set_macaddr (struct ag71xx *ag,unsigned char *mac) +static void ag71xx_hw_set_macaddr (struct ag71xx *ag,const unsigned char *mac) {u32 t;
Signature · 1 line
2.35.1