Merge bcea444ab4 ("clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe()") into android13-5.15-lts
Steps on the way to 5.15.121 Change-Id: I0ba883b0c43cf852f73e476f15fe4894133bf883 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
duplex-full;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
duplex-full;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
lcd_backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
|
||||
pwms = <&pwm3 0 5000000 0>;
|
||||
pwms = <&pwm3 0 5000000>;
|
||||
brightness-levels = <0 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <7>;
|
||||
enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -749,13 +749,13 @@
|
||||
|
||||
&uart_B {
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_C {
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
|
||||
@@ -137,10 +137,13 @@
|
||||
|
||||
sound {
|
||||
compatible = "audio-graph-card";
|
||||
routing =
|
||||
"MIC_IN", "Capture",
|
||||
"Capture", "Mic Bias",
|
||||
"Playback", "HP_OUT";
|
||||
widgets = "Headphone", "Headphone Jack",
|
||||
"Line", "Line In Jack",
|
||||
"Microphone", "Microphone Jack";
|
||||
routing = "Headphone Jack", "HP_OUT",
|
||||
"LINE_IN", "Line In Jack",
|
||||
"MIC_IN", "Microphone Jack",
|
||||
"Microphone Jack", "Mic Bias";
|
||||
dais = <&sai2a_port &sai2b_port>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
sound {
|
||||
compatible = "audio-graph-card";
|
||||
label = "STM32MP1-AV96-HDMI";
|
||||
label = "STM32-AV96-HDMI";
|
||||
dais = <&sai2a_port>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
i2s2_port: port {
|
||||
i2s2_endpoint: endpoint {
|
||||
remote-endpoint = <&sii9022_tx_endpoint>;
|
||||
format = "i2s";
|
||||
dai-format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include "soc.h"
|
||||
#include "platform.h"
|
||||
|
||||
/*************************************************************************
|
||||
* Timer handling for EP93xx
|
||||
@@ -60,7 +61,7 @@ static u64 notrace ep93xx_read_sched_clock(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
u64 ep93xx_clocksource_read(struct clocksource *c)
|
||||
static u64 ep93xx_clocksource_read(struct clocksource *c)
|
||||
{
|
||||
u64 ret;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clockchips.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
@@ -281,6 +281,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gic {
|
||||
mediatek,broken-save-restore-fw;
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&mt6358_vgpu_reg>;
|
||||
sram-supply = <&mt6358_vsram_gpu_reg>;
|
||||
|
||||
@@ -5,9 +5,847 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "apq8016-sbc.dtsi"
|
||||
#include "msm8916-pm8916.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
|
||||
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
|
||||
#include <dt-bindings/sound/apq8016-lpass.h>
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. APQ 8016 SBC";
|
||||
compatible = "qcom,apq8016-sbc", "qcom,apq8016";
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart2;
|
||||
serial1 = &blsp1_uart1;
|
||||
usid0 = &pm8916_0;
|
||||
i2c0 = &blsp_i2c2;
|
||||
i2c1 = &blsp_i2c6;
|
||||
i2c3 = &blsp_i2c4;
|
||||
spi0 = &blsp_spi5;
|
||||
spi1 = &blsp_spi3;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
camera_vdddo_1v8: camera-vdddo-1v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "camera_vdddo";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
camera_vdda_2v8: camera-vdda-2v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "camera_vdda";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
camera_vddd_1v5: camera-vddd-1v5 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "camera_vddd";
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
ramoops@bff00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0xbff00000 0x0 0x100000>;
|
||||
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
ftrace-size = <0x20000>;
|
||||
};
|
||||
};
|
||||
|
||||
usb2513 {
|
||||
compatible = "smsc,usb3503";
|
||||
reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
|
||||
initial-mode = <1>;
|
||||
};
|
||||
|
||||
usb_id: usb-id {
|
||||
compatible = "linux,extcon-usb-gpio";
|
||||
id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb_id_default>;
|
||||
};
|
||||
|
||||
hdmi-out {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con: endpoint {
|
||||
remote-endpoint = <&adv7533_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&msm_key_volp_n_default>;
|
||||
|
||||
button@0 {
|
||||
label = "Volume Up";
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&msmgpio_leds>,
|
||||
<&pm8916_gpios_leds>,
|
||||
<&pm8916_mpps_leds>;
|
||||
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@1 {
|
||||
label = "apq8016-sbc:green:user1";
|
||||
gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
label = "apq8016-sbc:green:user2";
|
||||
gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc0";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@3 {
|
||||
label = "apq8016-sbc:green:user3";
|
||||
gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc1";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@4 {
|
||||
label = "apq8016-sbc:green:user4";
|
||||
gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "none";
|
||||
panic-indicator;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@5 {
|
||||
label = "apq8016-sbc:yellow:wlan";
|
||||
gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tx";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@6 {
|
||||
label = "apq8016-sbc:blue:bt";
|
||||
gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "bluetooth-power";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp_i2c2 {
|
||||
/* On Low speed expansion */
|
||||
status = "okay";
|
||||
label = "LS-I2C0";
|
||||
};
|
||||
|
||||
&blsp_i2c4 {
|
||||
/* On High speed expansion */
|
||||
status = "okay";
|
||||
label = "HS-I2C2";
|
||||
|
||||
adv_bridge: bridge@39 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "adi,adv7533";
|
||||
reg = <0x39>;
|
||||
|
||||
interrupt-parent = <&msmgpio>;
|
||||
interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
adi,dsi-lanes = <4>;
|
||||
clocks = <&rpmcc RPM_SMD_BB_CLK2>;
|
||||
clock-names = "cec";
|
||||
|
||||
pd-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
avdd-supply = <&pm8916_l6>;
|
||||
v1p2-supply = <&pm8916_l6>;
|
||||
v3p3-supply = <&pm8916_l17>;
|
||||
|
||||
pinctrl-names = "default","sleep";
|
||||
pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
|
||||
pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
|
||||
#sound-dai-cells = <1>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
adv7533_in: endpoint {
|
||||
remote-endpoint = <&dsi0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
adv7533_out: endpoint {
|
||||
remote-endpoint = <&hdmi_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_i2c6 {
|
||||
/* On Low speed expansion */
|
||||
status = "okay";
|
||||
label = "LS-I2C1";
|
||||
};
|
||||
|
||||
&blsp_spi3 {
|
||||
/* On High speed expansion */
|
||||
status = "okay";
|
||||
label = "HS-SPI1";
|
||||
};
|
||||
|
||||
&blsp_spi5 {
|
||||
/* On Low speed expansion */
|
||||
status = "okay";
|
||||
label = "LS-SPI0";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "okay";
|
||||
label = "LS-UART0";
|
||||
};
|
||||
|
||||
&blsp1_uart2 {
|
||||
status = "okay";
|
||||
label = "LS-UART1";
|
||||
};
|
||||
|
||||
&camss {
|
||||
status = "okay";
|
||||
ports {
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
csiphy0_ep: endpoint {
|
||||
clock-lanes = <1>;
|
||||
data-lanes = <0 2>;
|
||||
remote-endpoint = <&ov5640_ep>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cci_i2c0 {
|
||||
camera_rear@3b {
|
||||
compatible = "ovti,ov5640";
|
||||
reg = <0x3b>;
|
||||
|
||||
enable-gpios = <&msmgpio 34 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&camera_rear_default>;
|
||||
|
||||
clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
|
||||
clock-names = "xclk";
|
||||
clock-frequency = <23880000>;
|
||||
|
||||
vdddo-supply = <&camera_vdddo_1v8>;
|
||||
vdda-supply = <&camera_vdda_2v8>;
|
||||
vddd-supply = <&camera_vddd_1v5>;
|
||||
|
||||
/* No camera mezzanine by default */
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
ov5640_ep: endpoint {
|
||||
clock-lanes = <1>;
|
||||
data-lanes = <0 2>;
|
||||
remote-endpoint = <&csiphy0_ep>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi0_out {
|
||||
data-lanes = <0 1 2 3>;
|
||||
remote-endpoint = <&adv7533_in>;
|
||||
};
|
||||
|
||||
&lpass {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdss {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mpss {
|
||||
status = "okay";
|
||||
|
||||
firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn";
|
||||
};
|
||||
|
||||
&pm8916_resin {
|
||||
status = "okay";
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
};
|
||||
|
||||
&pronto {
|
||||
status = "okay";
|
||||
|
||||
firmware-name = "qcom/apq8016/wcnss.mbn";
|
||||
};
|
||||
|
||||
&sdhc_1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
|
||||
pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
|
||||
};
|
||||
|
||||
&sdhc_2 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
|
||||
pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
|
||||
|
||||
cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&sound {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
|
||||
pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
qcom,model = "DB410c";
|
||||
qcom,audio-routing =
|
||||
"AMIC2", "MIC BIAS Internal2",
|
||||
"AMIC3", "MIC BIAS External1";
|
||||
|
||||
external-dai-link@0 {
|
||||
link-name = "ADV7533";
|
||||
cpu {
|
||||
sound-dai = <&lpass MI2S_QUATERNARY>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&adv_bridge 0>;
|
||||
};
|
||||
};
|
||||
|
||||
internal-codec-playback-dai-link@0 {
|
||||
link-name = "WCD";
|
||||
cpu {
|
||||
sound-dai = <&lpass MI2S_PRIMARY>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
|
||||
};
|
||||
};
|
||||
|
||||
internal-codec-capture-dai-link@0 {
|
||||
link-name = "WCD-Capture";
|
||||
cpu {
|
||||
sound-dai = <&lpass MI2S_TERTIARY>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
extcon = <&usb_id>, <&usb_id>;
|
||||
|
||||
pinctrl-names = "default", "device";
|
||||
pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
|
||||
pinctrl-1 = <&usb_sw_sel_pm_device &usb_hub_reset_pm_device>;
|
||||
};
|
||||
|
||||
&usb_hs_phy {
|
||||
extcon = <&usb_id>;
|
||||
};
|
||||
|
||||
&wcd_codec {
|
||||
clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
|
||||
clock-names = "mclk";
|
||||
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
|
||||
qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
|
||||
};
|
||||
|
||||
&wcnss_ctrl {
|
||||
firmware-name = "qcom/apq8016/WCNSS_qcom_wlan_nv_sbc.bin";
|
||||
};
|
||||
|
||||
/* Enable CoreSight */
|
||||
&cti0 { status = "okay"; };
|
||||
&cti1 { status = "okay"; };
|
||||
&cti12 { status = "okay"; };
|
||||
&cti13 { status = "okay"; };
|
||||
&cti14 { status = "okay"; };
|
||||
&cti15 { status = "okay"; };
|
||||
&debug0 { status = "okay"; };
|
||||
&debug1 { status = "okay"; };
|
||||
&debug2 { status = "okay"; };
|
||||
&debug3 { status = "okay"; };
|
||||
&etf { status = "okay"; };
|
||||
&etm0 { status = "okay"; };
|
||||
&etm1 { status = "okay"; };
|
||||
&etm2 { status = "okay"; };
|
||||
&etm3 { status = "okay"; };
|
||||
&etr { status = "okay"; };
|
||||
&funnel0 { status = "okay"; };
|
||||
&funnel1 { status = "okay"; };
|
||||
&replicator { status = "okay"; };
|
||||
&stm { status = "okay"; };
|
||||
&tpiu { status = "okay"; };
|
||||
|
||||
&smd_rpm_regulators {
|
||||
vdd_l1_l2_l3-supply = <&pm8916_s3>;
|
||||
vdd_l4_l5_l6-supply = <&pm8916_s4>;
|
||||
vdd_l7-supply = <&pm8916_s4>;
|
||||
|
||||
s3 {
|
||||
regulator-min-microvolt = <1250000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
};
|
||||
|
||||
s4 {
|
||||
regulator-min-microvolt = <1850000>;
|
||||
regulator-max-microvolt = <2150000>;
|
||||
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
l1 {
|
||||
regulator-min-microvolt = <1225000>;
|
||||
regulator-max-microvolt = <1225000>;
|
||||
};
|
||||
|
||||
l2 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
|
||||
l4 {
|
||||
regulator-min-microvolt = <2050000>;
|
||||
regulator-max-microvolt = <2050000>;
|
||||
};
|
||||
|
||||
l5 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
l6 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
l7 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
l8 {
|
||||
regulator-min-microvolt = <2900000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
};
|
||||
|
||||
l9 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
l10 {
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
};
|
||||
|
||||
l11 {
|
||||
regulator-min-microvolt = <2950000>;
|
||||
regulator-max-microvolt = <2950000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-system-load = <200000>;
|
||||
};
|
||||
|
||||
l12 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <2950000>;
|
||||
};
|
||||
|
||||
l13 {
|
||||
regulator-min-microvolt = <3075000>;
|
||||
regulator-max-microvolt = <3075000>;
|
||||
};
|
||||
|
||||
l14 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The 96Boards specification expects a 1.8V power rail on the low-speed
|
||||
* expansion connector that is able to provide at least 0.18W / 100 mA.
|
||||
* L15/L16 are connected in parallel to provide 55 mA each. A minimum load
|
||||
* must be specified to ensure the regulators are not put in LPM where they
|
||||
* would only provide 5 mA.
|
||||
*/
|
||||
l15 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-system-load = <50000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
l16 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-system-load = <50000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
l17 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
l18 {
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <2700000>;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* 2mA drive strength is not enough when connecting multiple
|
||||
* I2C devices with different pull up resistors.
|
||||
*/
|
||||
&i2c2_default {
|
||||
drive-strength = <16>;
|
||||
};
|
||||
|
||||
&i2c4_default {
|
||||
drive-strength = <16>;
|
||||
};
|
||||
|
||||
&i2c6_default {
|
||||
drive-strength = <16>;
|
||||
};
|
||||
|
||||
/*
|
||||
* GPIO name legend: proper name = the GPIO line is used as GPIO
|
||||
* NC = not connected (pin out but not routed from the chip to
|
||||
* anything the board)
|
||||
* "[PER]" = pin is muxed for [peripheral] (not GPIO)
|
||||
* LSEC = Low Speed External Connector
|
||||
* HSEC = High Speed External Connector
|
||||
*
|
||||
* Line names are taken from the schematic "DragonBoard410c"
|
||||
* dated monday, august 31, 2015. Page 5 in particular.
|
||||
*
|
||||
* For the lines routed to the external connectors the
|
||||
* lines are named after the 96Boards CE Specification 1.0,
|
||||
* Appendix "Expansion Connector Signal Description".
|
||||
*
|
||||
* When the 96Board naming of a line and the schematic name of
|
||||
* the same line are in conflict, the 96Board specification
|
||||
* takes precedence, which means that the external UART on the
|
||||
* LSEC is named UART0 while the schematic and SoC names this
|
||||
* UART3. This is only for the informational lines i.e. "[FOO]",
|
||||
* the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
|
||||
* ones actually used for GPIO.
|
||||
*/
|
||||
|
||||
&msmgpio {
|
||||
gpio-line-names =
|
||||
"[UART0_TX]", /* GPIO_0, LSEC pin 5 */
|
||||
"[UART0_RX]", /* GPIO_1, LSEC pin 7 */
|
||||
"[UART0_CTS_N]", /* GPIO_2, LSEC pin 3 */
|
||||
"[UART0_RTS_N]", /* GPIO_3, LSEC pin 9 */
|
||||
"[UART1_TX]", /* GPIO_4, LSEC pin 11 */
|
||||
"[UART1_RX]", /* GPIO_5, LSEC pin 13 */
|
||||
"[I2C0_SDA]", /* GPIO_8, LSEC pin 17 */
|
||||
"[I2C0_SCL]", /* GPIO_7, LSEC pin 15 */
|
||||
"[SPI1_DOUT]", /* SPI1_MOSI, HSEC pin 1 */
|
||||
"[SPI1_DIN]", /* SPI1_MISO, HSEC pin 11 */
|
||||
"[SPI1_CS]", /* SPI1_CS_N, HSEC pin 7 */
|
||||
"[SPI1_SCLK]", /* SPI1_CLK, HSEC pin 9 */
|
||||
"GPIO-B", /* LS_EXP_GPIO_B, LSEC pin 24 */
|
||||
"GPIO-C", /* LS_EXP_GPIO_C, LSEC pin 25 */
|
||||
"[I2C3_SDA]", /* HSEC pin 38 */
|
||||
"[I2C3_SCL]", /* HSEC pin 36 */
|
||||
"[SPI0_MOSI]", /* LSEC pin 14 */
|
||||
"[SPI0_MISO]", /* LSEC pin 10 */
|
||||
"[SPI0_CS_N]", /* LSEC pin 12 */
|
||||
"[SPI0_CLK]", /* LSEC pin 8 */
|
||||
"HDMI_HPD_N", /* GPIO 20 */
|
||||
"USR_LED_1_CTRL",
|
||||
"[I2C1_SDA]", /* GPIO_22, LSEC pin 21 */
|
||||
"[I2C1_SCL]", /* GPIO_23, LSEC pin 19 */
|
||||
"GPIO-G", /* LS_EXP_GPIO_G, LSEC pin 29 */
|
||||
"GPIO-H", /* LS_EXP_GPIO_H, LSEC pin 30 */
|
||||
"[CSI0_MCLK]", /* HSEC pin 15 */
|
||||
"[CSI1_MCLK]", /* HSEC pin 17 */
|
||||
"GPIO-K", /* LS_EXP_GPIO_K, LSEC pin 33 */
|
||||
"[I2C2_SDA]", /* HSEC pin 34 */
|
||||
"[I2C2_SCL]", /* HSEC pin 32 */
|
||||
"DSI2HDMI_INT_N",
|
||||
"DSI_SW_SEL_APQ",
|
||||
"GPIO-L", /* LS_EXP_GPIO_L, LSEC pin 34 */
|
||||
"GPIO-J", /* LS_EXP_GPIO_J, LSEC pin 32 */
|
||||
"GPIO-I", /* LS_EXP_GPIO_I, LSEC pin 31 */
|
||||
"GPIO-A", /* LS_EXP_GPIO_A, LSEC pin 23 */
|
||||
"FORCED_USB_BOOT",
|
||||
"SD_CARD_DET_N",
|
||||
"[WCSS_BT_SSBI]",
|
||||
"[WCSS_WLAN_DATA_2]", /* GPIO 40 */
|
||||
"[WCSS_WLAN_DATA_1]",
|
||||
"[WCSS_WLAN_DATA_0]",
|
||||
"[WCSS_WLAN_SET]",
|
||||
"[WCSS_WLAN_CLK]",
|
||||
"[WCSS_FM_SSBI]",
|
||||
"[WCSS_FM_SDI]",
|
||||
"[WCSS_BT_DAT_CTL]",
|
||||
"[WCSS_BT_DAT_STB]",
|
||||
"NC",
|
||||
"NC", /* GPIO 50 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 60 */
|
||||
"NC",
|
||||
"NC",
|
||||
"[CDC_PDM0_CLK]",
|
||||
"[CDC_PDM0_SYNC]",
|
||||
"[CDC_PDM0_TX0]",
|
||||
"[CDC_PDM0_RX0]",
|
||||
"[CDC_PDM0_RX1]",
|
||||
"[CDC_PDM0_RX2]",
|
||||
"GPIO-D", /* LS_EXP_GPIO_D, LSEC pin 26 */
|
||||
"NC", /* GPIO 70 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 74 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"BOOT_CONFIG_0", /* GPIO 80 */
|
||||
"BOOT_CONFIG_1",
|
||||
"BOOT_CONFIG_2",
|
||||
"BOOT_CONFIG_3",
|
||||
"NC",
|
||||
"NC",
|
||||
"BOOT_CONFIG_5",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 90 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 100 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"SSBI_GPS",
|
||||
"NC",
|
||||
"NC",
|
||||
"KEY_VOLP_N",
|
||||
"NC",
|
||||
"NC",
|
||||
"[LS_EXP_MI2S_WS]", /* GPIO 110 */
|
||||
"NC",
|
||||
"NC",
|
||||
"[LS_EXP_MI2S_SCK]",
|
||||
"[LS_EXP_MI2S_DATA0]",
|
||||
"GPIO-E", /* LS_EXP_GPIO_E, LSEC pin 27 */
|
||||
"NC",
|
||||
"[DSI2HDMI_MI2S_WS]",
|
||||
"[DSI2HDMI_MI2S_SCK]",
|
||||
"[DSI2HDMI_MI2S_DATA0]",
|
||||
"USR_LED_2_CTRL", /* GPIO 120 */
|
||||
"SB_HS_ID";
|
||||
|
||||
msmgpio_leds: msmgpio-leds {
|
||||
pins = "gpio21", "gpio120";
|
||||
function = "gpio";
|
||||
|
||||
output-low;
|
||||
};
|
||||
|
||||
usb_id_default: usb-id-default {
|
||||
pins = "gpio121";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <8>;
|
||||
input-enable;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
adv7533_int_active: adv533-int-active {
|
||||
pins = "gpio31";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
adv7533_int_suspend: adv7533-int-suspend {
|
||||
pins = "gpio31";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
adv7533_switch_active: adv7533-switch-active {
|
||||
pins = "gpio32";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
adv7533_switch_suspend: adv7533-switch-suspend {
|
||||
pins = "gpio32";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
msm_key_volp_n_default: msm-key-volp-n-default {
|
||||
pins = "gpio107";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <8>;
|
||||
input-enable;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
&pm8916_gpios {
|
||||
gpio-line-names =
|
||||
"USR_LED_3_CTRL",
|
||||
"USR_LED_4_CTRL",
|
||||
"USB_HUB_RESET_N_PM",
|
||||
"USB_SW_SEL_PM";
|
||||
|
||||
usb_hub_reset_pm: usb-hub-reset-pm {
|
||||
pins = "gpio3";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
input-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_hub_reset_pm_device: usb-hub-reset-pm-device {
|
||||
pins = "gpio3";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
output-low;
|
||||
};
|
||||
|
||||
usb_sw_sel_pm: usb-sw-sel-pm {
|
||||
pins = "gpio4";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
power-source = <PM8916_GPIO_VPH>;
|
||||
input-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_sw_sel_pm_device: usb-sw-sel-pm-device {
|
||||
pins = "gpio4";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
power-source = <PM8916_GPIO_VPH>;
|
||||
input-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
pm8916_gpios_leds: pm8916-gpios-leds {
|
||||
pins = "gpio1", "gpio2";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
&pm8916_mpps {
|
||||
gpio-line-names =
|
||||
"VDD_PX_BIAS",
|
||||
"WLAN_LED_CTRL",
|
||||
"BT_LED_CTRL",
|
||||
"GPIO-F"; /* LS_EXP_GPIO_F, LSEC pin 28 */
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ls_exp_gpio_f>;
|
||||
|
||||
ls_exp_gpio_f: pm8916-mpp4-state {
|
||||
pins = "mpp4";
|
||||
function = "digital";
|
||||
|
||||
output-low;
|
||||
power-source = <PM8916_MPP_L5>; // 1.8V
|
||||
};
|
||||
|
||||
pm8916_mpps_leds: pm8916-mpps-state {
|
||||
pins = "mpp2", "mpp3";
|
||||
function = "digital";
|
||||
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,826 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "msm8916-pm8916.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
|
||||
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
|
||||
#include <dt-bindings/sound/apq8016-lpass.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &blsp1_uart2;
|
||||
serial1 = &blsp1_uart1;
|
||||
usid0 = &pm8916_0;
|
||||
i2c0 = &blsp_i2c2;
|
||||
i2c1 = &blsp_i2c6;
|
||||
i2c3 = &blsp_i2c4;
|
||||
spi0 = &blsp_spi5;
|
||||
spi1 = &blsp_spi3;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
camera_vdddo_1v8: camera-vdddo-1v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "camera_vdddo";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
camera_vdda_2v8: camera-vdda-2v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "camera_vdda";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
camera_vddd_1v5: camera-vddd-1v5 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "camera_vddd";
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
ramoops@bff00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0xbff00000 0x0 0x100000>;
|
||||
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
ftrace-size = <0x20000>;
|
||||
};
|
||||
};
|
||||
|
||||
usb2513 {
|
||||
compatible = "smsc,usb3503";
|
||||
reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
|
||||
initial-mode = <1>;
|
||||
};
|
||||
|
||||
usb_id: usb-id {
|
||||
compatible = "linux,extcon-usb-gpio";
|
||||
id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb_id_default>;
|
||||
};
|
||||
|
||||
hdmi-out {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con: endpoint {
|
||||
remote-endpoint = <&adv7533_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&msm_key_volp_n_default>;
|
||||
|
||||
button@0 {
|
||||
label = "Volume Up";
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&msmgpio_leds>,
|
||||
<&pm8916_gpios_leds>,
|
||||
<&pm8916_mpps_leds>;
|
||||
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@1 {
|
||||
label = "apq8016-sbc:green:user1";
|
||||
gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
label = "apq8016-sbc:green:user2";
|
||||
gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc0";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@3 {
|
||||
label = "apq8016-sbc:green:user3";
|
||||
gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc1";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@4 {
|
||||
label = "apq8016-sbc:green:user4";
|
||||
gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "none";
|
||||
panic-indicator;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@5 {
|
||||
label = "apq8016-sbc:yellow:wlan";
|
||||
gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tx";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@6 {
|
||||
label = "apq8016-sbc:blue:bt";
|
||||
gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "bluetooth-power";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp_i2c2 {
|
||||
/* On Low speed expansion */
|
||||
status = "okay";
|
||||
label = "LS-I2C0";
|
||||
};
|
||||
|
||||
&blsp_i2c4 {
|
||||
/* On High speed expansion */
|
||||
status = "okay";
|
||||
label = "HS-I2C2";
|
||||
|
||||
adv_bridge: bridge@39 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "adi,adv7533";
|
||||
reg = <0x39>;
|
||||
|
||||
interrupt-parent = <&msmgpio>;
|
||||
interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
adi,dsi-lanes = <4>;
|
||||
clocks = <&rpmcc RPM_SMD_BB_CLK2>;
|
||||
clock-names = "cec";
|
||||
|
||||
pd-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
avdd-supply = <&pm8916_l6>;
|
||||
v1p2-supply = <&pm8916_l6>;
|
||||
v3p3-supply = <&pm8916_l17>;
|
||||
|
||||
pinctrl-names = "default","sleep";
|
||||
pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
|
||||
pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
|
||||
#sound-dai-cells = <1>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
adv7533_in: endpoint {
|
||||
remote-endpoint = <&dsi0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
adv7533_out: endpoint {
|
||||
remote-endpoint = <&hdmi_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_i2c6 {
|
||||
/* On Low speed expansion */
|
||||
status = "okay";
|
||||
label = "LS-I2C1";
|
||||
};
|
||||
|
||||
&blsp_spi3 {
|
||||
/* On High speed expansion */
|
||||
status = "okay";
|
||||
label = "HS-SPI1";
|
||||
};
|
||||
|
||||
&blsp_spi5 {
|
||||
/* On Low speed expansion */
|
||||
status = "okay";
|
||||
label = "LS-SPI0";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "okay";
|
||||
label = "LS-UART0";
|
||||
};
|
||||
|
||||
&blsp1_uart2 {
|
||||
status = "okay";
|
||||
label = "LS-UART1";
|
||||
};
|
||||
|
||||
&camss {
|
||||
status = "okay";
|
||||
ports {
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
csiphy0_ep: endpoint {
|
||||
clock-lanes = <1>;
|
||||
data-lanes = <0 2>;
|
||||
remote-endpoint = <&ov5640_ep>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cci_i2c0 {
|
||||
camera_rear@3b {
|
||||
compatible = "ovti,ov5640";
|
||||
reg = <0x3b>;
|
||||
|
||||
enable-gpios = <&msmgpio 34 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&camera_rear_default>;
|
||||
|
||||
clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
|
||||
clock-names = "xclk";
|
||||
clock-frequency = <23880000>;
|
||||
|
||||
vdddo-supply = <&camera_vdddo_1v8>;
|
||||
vdda-supply = <&camera_vdda_2v8>;
|
||||
vddd-supply = <&camera_vddd_1v5>;
|
||||
|
||||
/* No camera mezzanine by default */
|
||||
status = "disabled";
|
||||
|
||||
port {
|
||||
ov5640_ep: endpoint {
|
||||
clock-lanes = <1>;
|
||||
data-lanes = <0 2>;
|
||||
remote-endpoint = <&csiphy0_ep>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi0_out {
|
||||
data-lanes = <0 1 2 3>;
|
||||
remote-endpoint = <&adv7533_in>;
|
||||
};
|
||||
|
||||
&lpass {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdss {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pm8916_resin {
|
||||
status = "okay";
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
};
|
||||
|
||||
&pronto {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhc_1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
|
||||
pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
|
||||
};
|
||||
|
||||
&sdhc_2 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
|
||||
pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
|
||||
|
||||
cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&sound {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
|
||||
pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
qcom,model = "DB410c";
|
||||
qcom,audio-routing =
|
||||
"AMIC2", "MIC BIAS Internal2",
|
||||
"AMIC3", "MIC BIAS External1";
|
||||
|
||||
external-dai-link@0 {
|
||||
link-name = "ADV7533";
|
||||
cpu {
|
||||
sound-dai = <&lpass MI2S_QUATERNARY>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&adv_bridge 0>;
|
||||
};
|
||||
};
|
||||
|
||||
internal-codec-playback-dai-link@0 {
|
||||
link-name = "WCD";
|
||||
cpu {
|
||||
sound-dai = <&lpass MI2S_PRIMARY>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
|
||||
};
|
||||
};
|
||||
|
||||
internal-codec-capture-dai-link@0 {
|
||||
link-name = "WCD-Capture";
|
||||
cpu {
|
||||
sound-dai = <&lpass MI2S_TERTIARY>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
extcon = <&usb_id>, <&usb_id>;
|
||||
|
||||
pinctrl-names = "default", "device";
|
||||
pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
|
||||
pinctrl-1 = <&usb_sw_sel_pm_device &usb_hub_reset_pm_device>;
|
||||
};
|
||||
|
||||
&usb_hs_phy {
|
||||
extcon = <&usb_id>;
|
||||
};
|
||||
|
||||
&wcd_codec {
|
||||
clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
|
||||
clock-names = "mclk";
|
||||
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
|
||||
qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
|
||||
};
|
||||
|
||||
/* Enable CoreSight */
|
||||
&cti0 { status = "okay"; };
|
||||
&cti1 { status = "okay"; };
|
||||
&cti12 { status = "okay"; };
|
||||
&cti13 { status = "okay"; };
|
||||
&cti14 { status = "okay"; };
|
||||
&cti15 { status = "okay"; };
|
||||
&debug0 { status = "okay"; };
|
||||
&debug1 { status = "okay"; };
|
||||
&debug2 { status = "okay"; };
|
||||
&debug3 { status = "okay"; };
|
||||
&etf { status = "okay"; };
|
||||
&etm0 { status = "okay"; };
|
||||
&etm1 { status = "okay"; };
|
||||
&etm2 { status = "okay"; };
|
||||
&etm3 { status = "okay"; };
|
||||
&etr { status = "okay"; };
|
||||
&funnel0 { status = "okay"; };
|
||||
&funnel1 { status = "okay"; };
|
||||
&replicator { status = "okay"; };
|
||||
&stm { status = "okay"; };
|
||||
&tpiu { status = "okay"; };
|
||||
|
||||
&smd_rpm_regulators {
|
||||
vdd_l1_l2_l3-supply = <&pm8916_s3>;
|
||||
vdd_l4_l5_l6-supply = <&pm8916_s4>;
|
||||
vdd_l7-supply = <&pm8916_s4>;
|
||||
|
||||
s3 {
|
||||
regulator-min-microvolt = <375000>;
|
||||
regulator-max-microvolt = <1562000>;
|
||||
};
|
||||
|
||||
s4 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
l1 {
|
||||
regulator-min-microvolt = <375000>;
|
||||
regulator-max-microvolt = <1525000>;
|
||||
};
|
||||
|
||||
l2 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
|
||||
l4 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l5 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l6 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
l7 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l8 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l9 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l10 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l11 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-system-load = <200000>;
|
||||
};
|
||||
|
||||
l12 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l13 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l14 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
/**
|
||||
* 1.8v required on LS expansion
|
||||
* for mezzanine boards
|
||||
*/
|
||||
l15 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
l16 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
|
||||
l17 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
l18 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* 2mA drive strength is not enough when connecting multiple
|
||||
* I2C devices with different pull up resistors.
|
||||
*/
|
||||
&i2c2_default {
|
||||
drive-strength = <16>;
|
||||
};
|
||||
|
||||
&i2c4_default {
|
||||
drive-strength = <16>;
|
||||
};
|
||||
|
||||
&i2c6_default {
|
||||
drive-strength = <16>;
|
||||
};
|
||||
|
||||
/*
|
||||
* GPIO name legend: proper name = the GPIO line is used as GPIO
|
||||
* NC = not connected (pin out but not routed from the chip to
|
||||
* anything the board)
|
||||
* "[PER]" = pin is muxed for [peripheral] (not GPIO)
|
||||
* LSEC = Low Speed External Connector
|
||||
* HSEC = High Speed External Connector
|
||||
*
|
||||
* Line names are taken from the schematic "DragonBoard410c"
|
||||
* dated monday, august 31, 2015. Page 5 in particular.
|
||||
*
|
||||
* For the lines routed to the external connectors the
|
||||
* lines are named after the 96Boards CE Specification 1.0,
|
||||
* Appendix "Expansion Connector Signal Description".
|
||||
*
|
||||
* When the 96Board naming of a line and the schematic name of
|
||||
* the same line are in conflict, the 96Board specification
|
||||
* takes precedence, which means that the external UART on the
|
||||
* LSEC is named UART0 while the schematic and SoC names this
|
||||
* UART3. This is only for the informational lines i.e. "[FOO]",
|
||||
* the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
|
||||
* ones actually used for GPIO.
|
||||
*/
|
||||
|
||||
&msmgpio {
|
||||
gpio-line-names =
|
||||
"[UART0_TX]", /* GPIO_0, LSEC pin 5 */
|
||||
"[UART0_RX]", /* GPIO_1, LSEC pin 7 */
|
||||
"[UART0_CTS_N]", /* GPIO_2, LSEC pin 3 */
|
||||
"[UART0_RTS_N]", /* GPIO_3, LSEC pin 9 */
|
||||
"[UART1_TX]", /* GPIO_4, LSEC pin 11 */
|
||||
"[UART1_RX]", /* GPIO_5, LSEC pin 13 */
|
||||
"[I2C0_SDA]", /* GPIO_8, LSEC pin 17 */
|
||||
"[I2C0_SCL]", /* GPIO_7, LSEC pin 15 */
|
||||
"[SPI1_DOUT]", /* SPI1_MOSI, HSEC pin 1 */
|
||||
"[SPI1_DIN]", /* SPI1_MISO, HSEC pin 11 */
|
||||
"[SPI1_CS]", /* SPI1_CS_N, HSEC pin 7 */
|
||||
"[SPI1_SCLK]", /* SPI1_CLK, HSEC pin 9 */
|
||||
"GPIO-B", /* LS_EXP_GPIO_B, LSEC pin 24 */
|
||||
"GPIO-C", /* LS_EXP_GPIO_C, LSEC pin 25 */
|
||||
"[I2C3_SDA]", /* HSEC pin 38 */
|
||||
"[I2C3_SCL]", /* HSEC pin 36 */
|
||||
"[SPI0_MOSI]", /* LSEC pin 14 */
|
||||
"[SPI0_MISO]", /* LSEC pin 10 */
|
||||
"[SPI0_CS_N]", /* LSEC pin 12 */
|
||||
"[SPI0_CLK]", /* LSEC pin 8 */
|
||||
"HDMI_HPD_N", /* GPIO 20 */
|
||||
"USR_LED_1_CTRL",
|
||||
"[I2C1_SDA]", /* GPIO_22, LSEC pin 21 */
|
||||
"[I2C1_SCL]", /* GPIO_23, LSEC pin 19 */
|
||||
"GPIO-G", /* LS_EXP_GPIO_G, LSEC pin 29 */
|
||||
"GPIO-H", /* LS_EXP_GPIO_H, LSEC pin 30 */
|
||||
"[CSI0_MCLK]", /* HSEC pin 15 */
|
||||
"[CSI1_MCLK]", /* HSEC pin 17 */
|
||||
"GPIO-K", /* LS_EXP_GPIO_K, LSEC pin 33 */
|
||||
"[I2C2_SDA]", /* HSEC pin 34 */
|
||||
"[I2C2_SCL]", /* HSEC pin 32 */
|
||||
"DSI2HDMI_INT_N",
|
||||
"DSI_SW_SEL_APQ",
|
||||
"GPIO-L", /* LS_EXP_GPIO_L, LSEC pin 34 */
|
||||
"GPIO-J", /* LS_EXP_GPIO_J, LSEC pin 32 */
|
||||
"GPIO-I", /* LS_EXP_GPIO_I, LSEC pin 31 */
|
||||
"GPIO-A", /* LS_EXP_GPIO_A, LSEC pin 23 */
|
||||
"FORCED_USB_BOOT",
|
||||
"SD_CARD_DET_N",
|
||||
"[WCSS_BT_SSBI]",
|
||||
"[WCSS_WLAN_DATA_2]", /* GPIO 40 */
|
||||
"[WCSS_WLAN_DATA_1]",
|
||||
"[WCSS_WLAN_DATA_0]",
|
||||
"[WCSS_WLAN_SET]",
|
||||
"[WCSS_WLAN_CLK]",
|
||||
"[WCSS_FM_SSBI]",
|
||||
"[WCSS_FM_SDI]",
|
||||
"[WCSS_BT_DAT_CTL]",
|
||||
"[WCSS_BT_DAT_STB]",
|
||||
"NC",
|
||||
"NC", /* GPIO 50 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 60 */
|
||||
"NC",
|
||||
"NC",
|
||||
"[CDC_PDM0_CLK]",
|
||||
"[CDC_PDM0_SYNC]",
|
||||
"[CDC_PDM0_TX0]",
|
||||
"[CDC_PDM0_RX0]",
|
||||
"[CDC_PDM0_RX1]",
|
||||
"[CDC_PDM0_RX2]",
|
||||
"GPIO-D", /* LS_EXP_GPIO_D, LSEC pin 26 */
|
||||
"NC", /* GPIO 70 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 74 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"BOOT_CONFIG_0", /* GPIO 80 */
|
||||
"BOOT_CONFIG_1",
|
||||
"BOOT_CONFIG_2",
|
||||
"BOOT_CONFIG_3",
|
||||
"NC",
|
||||
"NC",
|
||||
"BOOT_CONFIG_5",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 90 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC", /* GPIO 100 */
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"SSBI_GPS",
|
||||
"NC",
|
||||
"NC",
|
||||
"KEY_VOLP_N",
|
||||
"NC",
|
||||
"NC",
|
||||
"[LS_EXP_MI2S_WS]", /* GPIO 110 */
|
||||
"NC",
|
||||
"NC",
|
||||
"[LS_EXP_MI2S_SCK]",
|
||||
"[LS_EXP_MI2S_DATA0]",
|
||||
"GPIO-E", /* LS_EXP_GPIO_E, LSEC pin 27 */
|
||||
"NC",
|
||||
"[DSI2HDMI_MI2S_WS]",
|
||||
"[DSI2HDMI_MI2S_SCK]",
|
||||
"[DSI2HDMI_MI2S_DATA0]",
|
||||
"USR_LED_2_CTRL", /* GPIO 120 */
|
||||
"SB_HS_ID";
|
||||
|
||||
msmgpio_leds: msmgpio-leds {
|
||||
pins = "gpio21", "gpio120";
|
||||
function = "gpio";
|
||||
|
||||
output-low;
|
||||
};
|
||||
|
||||
usb_id_default: usb-id-default {
|
||||
pins = "gpio121";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <8>;
|
||||
input-enable;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
adv7533_int_active: adv533-int-active {
|
||||
pins = "gpio31";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
adv7533_int_suspend: adv7533-int-suspend {
|
||||
pins = "gpio31";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
adv7533_switch_active: adv7533-switch-active {
|
||||
pins = "gpio32";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
adv7533_switch_suspend: adv7533-switch-suspend {
|
||||
pins = "gpio32";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
msm_key_volp_n_default: msm-key-volp-n-default {
|
||||
pins = "gpio107";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <8>;
|
||||
input-enable;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
&pm8916_gpios {
|
||||
gpio-line-names =
|
||||
"USR_LED_3_CTRL",
|
||||
"USR_LED_4_CTRL",
|
||||
"USB_HUB_RESET_N_PM",
|
||||
"USB_SW_SEL_PM";
|
||||
|
||||
usb_hub_reset_pm: usb-hub-reset-pm {
|
||||
pins = "gpio3";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
input-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_hub_reset_pm_device: usb-hub-reset-pm-device {
|
||||
pins = "gpio3";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
output-low;
|
||||
};
|
||||
|
||||
usb_sw_sel_pm: usb-sw-sel-pm {
|
||||
pins = "gpio4";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
power-source = <PM8916_GPIO_VPH>;
|
||||
input-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_sw_sel_pm_device: usb-sw-sel-pm-device {
|
||||
pins = "gpio4";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
power-source = <PM8916_GPIO_VPH>;
|
||||
input-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
pm8916_gpios_leds: pm8916-gpios-leds {
|
||||
pins = "gpio1", "gpio2";
|
||||
function = PMIC_GPIO_FUNC_NORMAL;
|
||||
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
&pm8916_mpps {
|
||||
gpio-line-names =
|
||||
"VDD_PX_BIAS",
|
||||
"WLAN_LED_CTRL",
|
||||
"BT_LED_CTRL",
|
||||
"GPIO-F"; /* LS_EXP_GPIO_F, LSEC pin 28 */
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ls_exp_gpio_f>;
|
||||
|
||||
ls_exp_gpio_f: pm8916-mpp4 {
|
||||
pins = "mpp4";
|
||||
function = "digital";
|
||||
|
||||
output-low;
|
||||
power-source = <PM8916_MPP_L5>; // 1.8V
|
||||
};
|
||||
|
||||
pm8916_mpps_leds: pm8916-mpps-leds {
|
||||
pins = "mpp2", "mpp3";
|
||||
function = "digital";
|
||||
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@
|
||||
|
||||
v1p05: v1p05-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
reglator-name = "v1p05";
|
||||
regulator-name = "v1p05";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
v12_poe: v12-poe-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
reglator-name = "v12_poe";
|
||||
regulator-name = "v12_poe";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
|
||||
@@ -5,9 +5,22 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8916-mtp.dtsi"
|
||||
#include "msm8916-pm8916.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8916 MTP";
|
||||
compatible = "qcom,msm8916-mtp", "qcom,msm8916-mtp/1", "qcom,msm8916";
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart2;
|
||||
usid0 = &pm8916_0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "msm8916-pm8916.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &blsp1_uart2;
|
||||
usid0 = &pm8916_0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1064,7 +1064,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
camss: camss@1b00000 {
|
||||
camss: camss@1b0ac00 {
|
||||
compatible = "qcom,msm8916-camss";
|
||||
reg = <0x01b0ac00 0x200>,
|
||||
<0x01b00030 0x4>,
|
||||
@@ -1771,7 +1771,7 @@
|
||||
|
||||
label = "pronto";
|
||||
|
||||
wcnss {
|
||||
wcnss_ctrl: wcnss {
|
||||
compatible = "qcom,wcnss";
|
||||
qcom,smd-channels = "WCNSS_CTRL";
|
||||
|
||||
|
||||
@@ -725,7 +725,7 @@
|
||||
reg = <0xfc4ab000 0x4>;
|
||||
};
|
||||
|
||||
spmi_bus: spmi@fc4c0000 {
|
||||
spmi_bus: spmi@fc4cf000 {
|
||||
compatible = "qcom,spmi-pmic-arb";
|
||||
reg = <0xfc4cf000 0x1000>,
|
||||
<0xfc4cb000 0x1000>,
|
||||
|
||||
@@ -5,9 +5,31 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8996-mtp.dtsi"
|
||||
#include "msm8996.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8996 MTP";
|
||||
compatible = "qcom,msm8996-mtp";
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp2_uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@75b0000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "msm8996.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &blsp2_uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@75b0000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_phy {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1228,6 +1228,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
blsp1_uart2_default: blsp1-uart2-default {
|
||||
pins = "gpio41", "gpio42", "gpio43", "gpio44";
|
||||
function = "blsp_uart2";
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
blsp1_uart2_sleep: blsp1-uart2-sleep {
|
||||
pins = "gpio41", "gpio42", "gpio43", "gpio44";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
blsp1_i2c3_default: blsp1-i2c2-default {
|
||||
pins = "gpio47", "gpio48";
|
||||
function = "blsp_i2c3";
|
||||
@@ -1771,7 +1785,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
camss: camss@a00000 {
|
||||
camss: camss@a34000 {
|
||||
compatible = "qcom,msm8996-camss";
|
||||
reg = <0x00a34000 0x1000>,
|
||||
<0x00a00030 0x4>,
|
||||
@@ -2724,6 +2738,9 @@
|
||||
clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
|
||||
<&gcc GCC_BLSP1_AHB_CLK>;
|
||||
clock-names = "core", "iface";
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&blsp1_uart2_default>;
|
||||
pinctrl-1 = <&blsp1_uart2_sleep>;
|
||||
dmas = <&blsp1_dma 2>, <&blsp1_dma 3>;
|
||||
dma-names = "tx", "rx";
|
||||
status = "disabled";
|
||||
|
||||
@@ -1834,7 +1834,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
camss: camss@ca00000 {
|
||||
camss: camss@ca00020 {
|
||||
compatible = "qcom,sdm660-camss";
|
||||
reg = <0x0c824000 0x1000>,
|
||||
<0x0ca00120 0x4>,
|
||||
|
||||
@@ -3921,7 +3921,7 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
camss: camss@a00000 {
|
||||
camss: camss@acb3000 {
|
||||
compatible = "qcom,sdm845-camss";
|
||||
|
||||
reg = <0 0xacb3000 0 0x1000>,
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
};
|
||||
|
||||
scif1_pins: scif1 {
|
||||
groups = "scif1_data_b", "scif1_ctrl";
|
||||
groups = "scif1_data_b";
|
||||
function = "scif1";
|
||||
};
|
||||
|
||||
@@ -330,7 +330,6 @@
|
||||
&scif1 {
|
||||
pinctrl-0 = <&scif1_pins>;
|
||||
pinctrl-names = "default";
|
||||
uart-has-rtscts;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -80,25 +80,25 @@
|
||||
&wkup_pmx2 {
|
||||
mcu_cpsw_pins_default: mcu-cpsw-pins-default {
|
||||
pinctrl-single,pins = <
|
||||
J721E_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
|
||||
J721E_WKUP_IOPAD(0x006c, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
|
||||
J721E_WKUP_IOPAD(0x0070, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
|
||||
J721E_WKUP_IOPAD(0x0074, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
|
||||
J721E_WKUP_IOPAD(0x0078, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
|
||||
J721E_WKUP_IOPAD(0x007c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
|
||||
J721E_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
|
||||
J721E_WKUP_IOPAD(0x008c, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
|
||||
J721E_WKUP_IOPAD(0x0090, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
|
||||
J721E_WKUP_IOPAD(0x0094, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
|
||||
J721E_WKUP_IOPAD(0x0080, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
|
||||
J721E_WKUP_IOPAD(0x0084, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
|
||||
J721E_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
|
||||
J721E_WKUP_IOPAD(0x0004, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
|
||||
J721E_WKUP_IOPAD(0x0008, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
|
||||
J721E_WKUP_IOPAD(0x000c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
|
||||
J721E_WKUP_IOPAD(0x0010, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
|
||||
J721E_WKUP_IOPAD(0x0014, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
|
||||
J721E_WKUP_IOPAD(0x0020, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
|
||||
J721E_WKUP_IOPAD(0x0024, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
|
||||
J721E_WKUP_IOPAD(0x0028, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
|
||||
J721E_WKUP_IOPAD(0x002c, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
|
||||
J721E_WKUP_IOPAD(0x0018, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
|
||||
J721E_WKUP_IOPAD(0x001c, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
|
||||
>;
|
||||
};
|
||||
|
||||
mcu_mdio_pins_default: mcu-mdio1-pins-default {
|
||||
pinctrl-single,pins = <
|
||||
J721E_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */
|
||||
J721E_WKUP_IOPAD(0x0098, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */
|
||||
J721E_WKUP_IOPAD(0x0034, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */
|
||||
J721E_WKUP_IOPAD(0x0030, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -299,7 +299,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
|
||||
void __iomem *base;
|
||||
int ret;
|
||||
|
||||
clk_hw_data = kzalloc(struct_size(clk_hw_data, hws,
|
||||
clk_hw_data = devm_kzalloc(dev, struct_size(clk_hw_data, hws,
|
||||
IMX8MN_CLK_END), GFP_KERNEL);
|
||||
if (WARN_ON(!clk_hw_data))
|
||||
return -ENOMEM;
|
||||
@@ -316,10 +316,10 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
|
||||
hws[IMX8MN_CLK_EXT4] = imx_obtain_fixed_clk_hw(np, "clk_ext4");
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mn-anatop");
|
||||
base = of_iomap(np, 0);
|
||||
base = devm_of_iomap(dev, np, 0, NULL);
|
||||
of_node_put(np);
|
||||
if (WARN_ON(!base)) {
|
||||
ret = -ENOMEM;
|
||||
if (WARN_ON(IS_ERR(base))) {
|
||||
ret = PTR_ERR(base);
|
||||
goto unregister_hws;
|
||||
}
|
||||
|
||||
|
||||
@@ -407,25 +407,22 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *np;
|
||||
void __iomem *anatop_base, *ccm_base;
|
||||
int err;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop");
|
||||
anatop_base = of_iomap(np, 0);
|
||||
anatop_base = devm_of_iomap(dev, np, 0, NULL);
|
||||
of_node_put(np);
|
||||
if (WARN_ON(!anatop_base))
|
||||
return -ENOMEM;
|
||||
if (WARN_ON(IS_ERR(anatop_base)))
|
||||
return PTR_ERR(anatop_base);
|
||||
|
||||
np = dev->of_node;
|
||||
ccm_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (WARN_ON(IS_ERR(ccm_base))) {
|
||||
iounmap(anatop_base);
|
||||
if (WARN_ON(IS_ERR(ccm_base)))
|
||||
return PTR_ERR(ccm_base);
|
||||
}
|
||||
|
||||
clk_hw_data = kzalloc(struct_size(clk_hw_data, hws, IMX8MP_CLK_END), GFP_KERNEL);
|
||||
if (WARN_ON(!clk_hw_data)) {
|
||||
iounmap(anatop_base);
|
||||
clk_hw_data = devm_kzalloc(dev, struct_size(clk_hw_data, hws, IMX8MP_CLK_END), GFP_KERNEL);
|
||||
if (WARN_ON(!clk_hw_data))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
clk_hw_data->num = IMX8MP_CLK_END;
|
||||
hws = clk_hw_data->hws;
|
||||
@@ -710,7 +707,12 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
|
||||
|
||||
imx_check_clk_hws(hws, IMX8MP_CLK_END);
|
||||
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
|
||||
err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "failed to register hws for i.MX8MP\n");
|
||||
imx_unregister_hw_clocks(hws, IMX8MP_CLK_END);
|
||||
return err;
|
||||
}
|
||||
|
||||
imx_register_uart_clocks(4);
|
||||
|
||||
|
||||
@@ -2334,14 +2334,14 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev,
|
||||
uint64_t eaddr;
|
||||
|
||||
/* validate the parameters */
|
||||
if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK ||
|
||||
size == 0 || size & ~PAGE_MASK)
|
||||
if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK || size & ~PAGE_MASK)
|
||||
return -EINVAL;
|
||||
if (saddr + size <= saddr || offset + size <= offset)
|
||||
return -EINVAL;
|
||||
|
||||
/* make sure object fit at this offset */
|
||||
eaddr = saddr + size - 1;
|
||||
if (saddr >= eaddr ||
|
||||
(bo && offset + size > amdgpu_bo_size(bo)) ||
|
||||
if ((bo && offset + size > amdgpu_bo_size(bo)) ||
|
||||
(eaddr >= adev->vm_manager.max_pfn << AMDGPU_GPU_PAGE_SHIFT))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2400,14 +2400,14 @@ int amdgpu_vm_bo_replace_map(struct amdgpu_device *adev,
|
||||
int r;
|
||||
|
||||
/* validate the parameters */
|
||||
if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK ||
|
||||
size == 0 || size & ~PAGE_MASK)
|
||||
if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK || size & ~PAGE_MASK)
|
||||
return -EINVAL;
|
||||
if (saddr + size <= saddr || offset + size <= offset)
|
||||
return -EINVAL;
|
||||
|
||||
/* make sure object fit at this offset */
|
||||
eaddr = saddr + size - 1;
|
||||
if (saddr >= eaddr ||
|
||||
(bo && offset + size > amdgpu_bo_size(bo)) ||
|
||||
if ((bo && offset + size > amdgpu_bo_size(bo)) ||
|
||||
(eaddr >= adev->vm_manager.max_pfn << AMDGPU_GPU_PAGE_SHIFT))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -113,18 +113,19 @@ static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd,
|
||||
&(mqd_mem_obj->gtt_mem),
|
||||
&(mqd_mem_obj->gpu_addr),
|
||||
(void *)&(mqd_mem_obj->cpu_ptr), true);
|
||||
|
||||
if (retval) {
|
||||
kfree(mqd_mem_obj);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
retval = kfd_gtt_sa_allocate(kfd, sizeof(struct v9_mqd),
|
||||
&mqd_mem_obj);
|
||||
}
|
||||
|
||||
if (retval) {
|
||||
kfree(mqd_mem_obj);
|
||||
return NULL;
|
||||
if (retval)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return mqd_mem_obj;
|
||||
|
||||
}
|
||||
|
||||
static void init_mqd(struct mqd_manager *mm, void **mqd,
|
||||
|
||||
@@ -10209,6 +10209,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
|
||||
|
||||
/* Now check if we should set freesync video mode */
|
||||
if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
|
||||
dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream) &&
|
||||
dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream) &&
|
||||
is_timing_unchanged_for_freesync(new_crtc_state,
|
||||
old_crtc_state)) {
|
||||
new_crtc_state->mode_changed = false;
|
||||
|
||||
@@ -1746,6 +1746,7 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct platform_device *pdev = priv->gpu_pdev;
|
||||
struct adreno_platform_config *config = pdev->dev.platform_data;
|
||||
struct a5xx_gpu *a5xx_gpu = NULL;
|
||||
struct adreno_gpu *adreno_gpu;
|
||||
struct msm_gpu *gpu;
|
||||
@@ -1772,7 +1773,7 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
||||
|
||||
nr_rings = 4;
|
||||
|
||||
if (adreno_is_a510(adreno_gpu))
|
||||
if (adreno_cmp_rev(ADRENO_REV(5, 1, 0, ANY_ID), config->rev))
|
||||
nr_rings = 1;
|
||||
|
||||
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, nr_rings);
|
||||
|
||||
@@ -890,8 +890,8 @@ static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
|
||||
.num_modes = 1,
|
||||
.bpc = 8,
|
||||
.size = {
|
||||
.width = 105,
|
||||
.height = 67,
|
||||
.width = 99,
|
||||
.height = 58,
|
||||
},
|
||||
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
|
||||
};
|
||||
|
||||
@@ -557,8 +557,12 @@ static int cypress_populate_mclk_value(struct radeon_device *rdev,
|
||||
ASIC_INTERNAL_MEMORY_SS, vco_freq)) {
|
||||
u32 reference_clock = rdev->clock.mpll.reference_freq;
|
||||
u32 decoded_ref = rv740_get_decoded_reference_divider(dividers.ref_div);
|
||||
u32 clk_s = reference_clock * 5 / (decoded_ref * ss.rate);
|
||||
u32 clk_v = ss.percentage *
|
||||
u32 clk_s, clk_v;
|
||||
|
||||
if (!decoded_ref)
|
||||
return -EINVAL;
|
||||
clk_s = reference_clock * 5 / (decoded_ref * ss.rate);
|
||||
clk_v = ss.percentage *
|
||||
(0x4000 * dividers.whole_fb_div + 0x800 * dividers.frac_fb_div) / (clk_s * 625);
|
||||
|
||||
mpll_ss1 &= ~CLKV_MASK;
|
||||
|
||||
@@ -2241,8 +2241,12 @@ static int ni_populate_mclk_value(struct radeon_device *rdev,
|
||||
ASIC_INTERNAL_MEMORY_SS, vco_freq)) {
|
||||
u32 reference_clock = rdev->clock.mpll.reference_freq;
|
||||
u32 decoded_ref = rv740_get_decoded_reference_divider(dividers.ref_div);
|
||||
u32 clk_s = reference_clock * 5 / (decoded_ref * ss.rate);
|
||||
u32 clk_v = ss.percentage *
|
||||
u32 clk_s, clk_v;
|
||||
|
||||
if (!decoded_ref)
|
||||
return -EINVAL;
|
||||
clk_s = reference_clock * 5 / (decoded_ref * ss.rate);
|
||||
clk_v = ss.percentage *
|
||||
(0x4000 * dividers.whole_fb_div + 0x800 * dividers.frac_fb_div) / (clk_s * 625);
|
||||
|
||||
mpll_ss1 &= ~CLKV_MASK;
|
||||
|
||||
@@ -249,8 +249,12 @@ int rv740_populate_mclk_value(struct radeon_device *rdev,
|
||||
ASIC_INTERNAL_MEMORY_SS, vco_freq)) {
|
||||
u32 reference_clock = rdev->clock.mpll.reference_freq;
|
||||
u32 decoded_ref = rv740_get_decoded_reference_divider(dividers.ref_div);
|
||||
u32 clk_s = reference_clock * 5 / (decoded_ref * ss.rate);
|
||||
u32 clk_v = 0x40000 * ss.percentage *
|
||||
u32 clk_s, clk_v;
|
||||
|
||||
if (!decoded_ref)
|
||||
return -EINVAL;
|
||||
clk_s = reference_clock * 5 / (decoded_ref * ss.rate);
|
||||
clk_v = 0x40000 * ss.percentage *
|
||||
(dividers.whole_fb_div + (dividers.frac_fb_div / 8)) / (clk_s * 10000);
|
||||
|
||||
mpll_ss1 &= ~CLKV_MASK;
|
||||
|
||||
@@ -82,8 +82,8 @@ static ssize_t pwm_auto_point_temp_store(struct device *dev,
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = clamp_val(temp, 0, 10000);
|
||||
temp = DIV_ROUND_CLOSEST(temp, 10);
|
||||
temp = clamp_val(temp, 0, 100000);
|
||||
temp = DIV_ROUND_CLOSEST(temp, 100);
|
||||
|
||||
regs[0] = temp & 0xff;
|
||||
regs[1] = (temp >> 8) & 0xff;
|
||||
@@ -100,7 +100,7 @@ static ssize_t pwm_auto_point_pwm_show(struct device *dev,
|
||||
{
|
||||
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
|
||||
|
||||
return sprintf(buf, "%d\n", 255 * (50 + (attr->index * 10)) / 100);
|
||||
return sprintf(buf, "%d\n", 255 * (50 + (attr->index * 10)));
|
||||
}
|
||||
|
||||
static SENSOR_DEVICE_ATTR_RO(pwm1_auto_point1_pwm, pwm_auto_point_pwm, 0);
|
||||
|
||||
@@ -37,10 +37,13 @@ enum chips { adm1075, adm1272, adm1275, adm1276, adm1278, adm1293, adm1294 };
|
||||
|
||||
#define ADM1272_IRANGE BIT(0)
|
||||
|
||||
#define ADM1278_TSFILT BIT(15)
|
||||
#define ADM1278_TEMP1_EN BIT(3)
|
||||
#define ADM1278_VIN_EN BIT(2)
|
||||
#define ADM1278_VOUT_EN BIT(1)
|
||||
|
||||
#define ADM1278_PMON_DEFCONFIG (ADM1278_VOUT_EN | ADM1278_TEMP1_EN | ADM1278_TSFILT)
|
||||
|
||||
#define ADM1293_IRANGE_25 0
|
||||
#define ADM1293_IRANGE_50 BIT(6)
|
||||
#define ADM1293_IRANGE_100 BIT(7)
|
||||
@@ -462,6 +465,22 @@ static const struct i2c_device_id adm1275_id[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adm1275_id);
|
||||
|
||||
/* Enable VOUT & TEMP1 if not enabled (disabled by default) */
|
||||
static int adm1275_enable_vout_temp(struct i2c_client *client, int config)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((config & ADM1278_PMON_DEFCONFIG) != ADM1278_PMON_DEFCONFIG) {
|
||||
config |= ADM1278_PMON_DEFCONFIG;
|
||||
ret = i2c_smbus_write_word_data(client, ADM1275_PMON_CONFIG, config);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev, "Failed to enable VOUT/TEMP1 monitoring\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adm1275_probe(struct i2c_client *client)
|
||||
{
|
||||
s32 (*config_read_fn)(const struct i2c_client *client, u8 reg);
|
||||
@@ -475,6 +494,7 @@ static int adm1275_probe(struct i2c_client *client)
|
||||
int vindex = -1, voindex = -1, cindex = -1, pindex = -1;
|
||||
int tindex = -1;
|
||||
u32 shunt;
|
||||
u32 avg;
|
||||
|
||||
if (!i2c_check_functionality(client->adapter,
|
||||
I2C_FUNC_SMBUS_READ_BYTE_DATA
|
||||
@@ -614,19 +634,10 @@ static int adm1275_probe(struct i2c_client *client)
|
||||
PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
|
||||
PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
|
||||
|
||||
/* Enable VOUT & TEMP1 if not enabled (disabled by default) */
|
||||
if ((config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN)) !=
|
||||
(ADM1278_VOUT_EN | ADM1278_TEMP1_EN)) {
|
||||
config |= ADM1278_VOUT_EN | ADM1278_TEMP1_EN;
|
||||
ret = i2c_smbus_write_byte_data(client,
|
||||
ADM1275_PMON_CONFIG,
|
||||
config);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Failed to enable VOUT monitoring\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
ret = adm1275_enable_vout_temp(client, config);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (config & ADM1278_VIN_EN)
|
||||
info->func[0] |= PMBUS_HAVE_VIN;
|
||||
break;
|
||||
@@ -683,19 +694,9 @@ static int adm1275_probe(struct i2c_client *client)
|
||||
PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
|
||||
PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
|
||||
|
||||
/* Enable VOUT & TEMP1 if not enabled (disabled by default) */
|
||||
if ((config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN)) !=
|
||||
(ADM1278_VOUT_EN | ADM1278_TEMP1_EN)) {
|
||||
config |= ADM1278_VOUT_EN | ADM1278_TEMP1_EN;
|
||||
ret = i2c_smbus_write_byte_data(client,
|
||||
ADM1275_PMON_CONFIG,
|
||||
config);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Failed to enable VOUT monitoring\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
ret = adm1275_enable_vout_temp(client, config);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (config & ADM1278_VIN_EN)
|
||||
info->func[0] |= PMBUS_HAVE_VIN;
|
||||
@@ -756,6 +757,43 @@ static int adm1275_probe(struct i2c_client *client)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (data->have_power_sampling &&
|
||||
of_property_read_u32(client->dev.of_node,
|
||||
"adi,power-sample-average", &avg) == 0) {
|
||||
if (!avg || avg > ADM1275_SAMPLES_AVG_MAX ||
|
||||
BIT(__fls(avg)) != avg) {
|
||||
dev_err(&client->dev,
|
||||
"Invalid number of power samples");
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = adm1275_write_pmon_config(data, client, true,
|
||||
ilog2(avg));
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Setting power sample averaging failed with error %d",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_u32(client->dev.of_node,
|
||||
"adi,volt-curr-sample-average", &avg) == 0) {
|
||||
if (!avg || avg > ADM1275_SAMPLES_AVG_MAX ||
|
||||
BIT(__fls(avg)) != avg) {
|
||||
dev_err(&client->dev,
|
||||
"Invalid number of voltage/current samples");
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = adm1275_write_pmon_config(data, client, false,
|
||||
ilog2(avg));
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Setting voltage and current sample averaging failed with error %d",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (voindex < 0)
|
||||
voindex = vindex;
|
||||
if (vindex >= 0) {
|
||||
|
||||
@@ -181,7 +181,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
|
||||
} while (size > 0);
|
||||
cmdq->seq_num++;
|
||||
|
||||
cmdq_prod = hwq->prod;
|
||||
cmdq_prod = hwq->prod & 0xFFFF;
|
||||
if (test_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags)) {
|
||||
/* The very first doorbell write
|
||||
* is required to set this flag
|
||||
@@ -299,7 +299,8 @@ static int bnxt_qplib_process_func_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
}
|
||||
|
||||
static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
struct creq_qp_event *qp_event)
|
||||
struct creq_qp_event *qp_event,
|
||||
u32 *num_wait)
|
||||
{
|
||||
struct creq_qp_error_notification *err_event;
|
||||
struct bnxt_qplib_hwq *hwq = &rcfw->cmdq.hwq;
|
||||
@@ -308,6 +309,7 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
u16 cbit, blocked = 0;
|
||||
struct pci_dev *pdev;
|
||||
unsigned long flags;
|
||||
u32 wait_cmds = 0;
|
||||
__le16 mcookie;
|
||||
u16 cookie;
|
||||
int rc = 0;
|
||||
@@ -367,9 +369,10 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
|
||||
crsqe->req_size = 0;
|
||||
|
||||
if (!blocked)
|
||||
wake_up(&rcfw->cmdq.waitq);
|
||||
wait_cmds++;
|
||||
spin_unlock_irqrestore(&hwq->lock, flags);
|
||||
}
|
||||
*num_wait += wait_cmds;
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -383,6 +386,7 @@ static void bnxt_qplib_service_creq(struct tasklet_struct *t)
|
||||
struct creq_base *creqe;
|
||||
u32 sw_cons, raw_cons;
|
||||
unsigned long flags;
|
||||
u32 num_wakeup = 0;
|
||||
|
||||
/* Service the CREQ until budget is over */
|
||||
spin_lock_irqsave(&hwq->lock, flags);
|
||||
@@ -401,7 +405,8 @@ static void bnxt_qplib_service_creq(struct tasklet_struct *t)
|
||||
switch (type) {
|
||||
case CREQ_BASE_TYPE_QP_EVENT:
|
||||
bnxt_qplib_process_qp_event
|
||||
(rcfw, (struct creq_qp_event *)creqe);
|
||||
(rcfw, (struct creq_qp_event *)creqe,
|
||||
&num_wakeup);
|
||||
creq->stats.creq_qp_event_processed++;
|
||||
break;
|
||||
case CREQ_BASE_TYPE_FUNC_EVENT:
|
||||
@@ -429,6 +434,8 @@ static void bnxt_qplib_service_creq(struct tasklet_struct *t)
|
||||
rcfw->res->cctx, true);
|
||||
}
|
||||
spin_unlock_irqrestore(&hwq->lock, flags);
|
||||
if (num_wakeup)
|
||||
wake_up_nr(&rcfw->cmdq.waitq, num_wakeup);
|
||||
}
|
||||
|
||||
static irqreturn_t bnxt_qplib_creq_irq(int irq, void *dev_instance)
|
||||
@@ -599,7 +606,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct bnxt_qplib_res *res,
|
||||
rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_8192;
|
||||
|
||||
sginfo.pgsize = bnxt_qplib_cmdqe_page_size(rcfw->cmdq_depth);
|
||||
hwq_attr.depth = rcfw->cmdq_depth;
|
||||
hwq_attr.depth = rcfw->cmdq_depth & 0x7FFFFFFF;
|
||||
hwq_attr.stride = BNXT_QPLIB_CMDQE_UNITS;
|
||||
hwq_attr.type = HWQ_TYPE_CTX;
|
||||
if (bnxt_qplib_alloc_init_hwq(&cmdq->hwq, &hwq_attr)) {
|
||||
|
||||
@@ -251,11 +251,11 @@ static int hfi1_ipoib_build_ulp_payload(struct ipoib_txreq *tx,
|
||||
const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
|
||||
|
||||
ret = sdma_txadd_page(dd,
|
||||
NULL,
|
||||
txreq,
|
||||
skb_frag_page(frag),
|
||||
frag->bv_offset,
|
||||
skb_frag_size(frag));
|
||||
skb_frag_size(frag),
|
||||
NULL, NULL, NULL);
|
||||
if (unlikely(ret))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@ static int mmu_notifier_range_start(struct mmu_notifier *,
|
||||
const struct mmu_notifier_range *);
|
||||
static struct mmu_rb_node *__mmu_rb_search(struct mmu_rb_handler *,
|
||||
unsigned long, unsigned long);
|
||||
static void do_remove(struct mmu_rb_handler *handler,
|
||||
struct list_head *del_list);
|
||||
static void release_immediate(struct kref *refcount);
|
||||
static void handle_remove(struct work_struct *work);
|
||||
|
||||
static const struct mmu_notifier_ops mn_opts = {
|
||||
@@ -103,7 +102,11 @@ void hfi1_mmu_rb_unregister(struct mmu_rb_handler *handler)
|
||||
}
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
|
||||
do_remove(handler, &del_list);
|
||||
while (!list_empty(&del_list)) {
|
||||
rbnode = list_first_entry(&del_list, struct mmu_rb_node, list);
|
||||
list_del(&rbnode->list);
|
||||
kref_put(&rbnode->refcount, release_immediate);
|
||||
}
|
||||
|
||||
/* Now the mm may be freed. */
|
||||
mmdrop(handler->mn.mm);
|
||||
@@ -131,12 +134,6 @@ int hfi1_mmu_rb_insert(struct mmu_rb_handler *handler,
|
||||
}
|
||||
__mmu_int_rb_insert(mnode, &handler->root);
|
||||
list_add_tail(&mnode->list, &handler->lru_list);
|
||||
|
||||
ret = handler->ops->insert(handler->ops_arg, mnode);
|
||||
if (ret) {
|
||||
__mmu_int_rb_remove(mnode, &handler->root);
|
||||
list_del(&mnode->list); /* remove from LRU list */
|
||||
}
|
||||
mnode->handler = handler;
|
||||
unlock:
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
@@ -180,6 +177,48 @@ static struct mmu_rb_node *__mmu_rb_search(struct mmu_rb_handler *handler,
|
||||
return node;
|
||||
}
|
||||
|
||||
/*
|
||||
* Must NOT call while holding mnode->handler->lock.
|
||||
* mnode->handler->ops->remove() may sleep and mnode->handler->lock is a
|
||||
* spinlock.
|
||||
*/
|
||||
static void release_immediate(struct kref *refcount)
|
||||
{
|
||||
struct mmu_rb_node *mnode =
|
||||
container_of(refcount, struct mmu_rb_node, refcount);
|
||||
mnode->handler->ops->remove(mnode->handler->ops_arg, mnode);
|
||||
}
|
||||
|
||||
/* Caller must hold mnode->handler->lock */
|
||||
static void release_nolock(struct kref *refcount)
|
||||
{
|
||||
struct mmu_rb_node *mnode =
|
||||
container_of(refcount, struct mmu_rb_node, refcount);
|
||||
list_move(&mnode->list, &mnode->handler->del_list);
|
||||
queue_work(mnode->handler->wq, &mnode->handler->del_work);
|
||||
}
|
||||
|
||||
/*
|
||||
* struct mmu_rb_node->refcount kref_put() callback.
|
||||
* Adds mmu_rb_node to mmu_rb_node->handler->del_list and queues
|
||||
* handler->del_work on handler->wq.
|
||||
* Does not remove mmu_rb_node from handler->lru_list or handler->rb_root.
|
||||
* Acquires mmu_rb_node->handler->lock; do not call while already holding
|
||||
* handler->lock.
|
||||
*/
|
||||
void hfi1_mmu_rb_release(struct kref *refcount)
|
||||
{
|
||||
struct mmu_rb_node *mnode =
|
||||
container_of(refcount, struct mmu_rb_node, refcount);
|
||||
struct mmu_rb_handler *handler = mnode->handler;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
list_move(&mnode->list, &mnode->handler->del_list);
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
queue_work(handler->wq, &handler->del_work);
|
||||
}
|
||||
|
||||
void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg)
|
||||
{
|
||||
struct mmu_rb_node *rbnode, *ptr;
|
||||
@@ -194,6 +233,10 @@ void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg)
|
||||
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
list_for_each_entry_safe(rbnode, ptr, &handler->lru_list, list) {
|
||||
/* refcount == 1 implies mmu_rb_handler has only rbnode ref */
|
||||
if (kref_read(&rbnode->refcount) > 1)
|
||||
continue;
|
||||
|
||||
if (handler->ops->evict(handler->ops_arg, rbnode, evict_arg,
|
||||
&stop)) {
|
||||
__mmu_int_rb_remove(rbnode, &handler->root);
|
||||
@@ -206,7 +249,7 @@ void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg)
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
|
||||
list_for_each_entry_safe(rbnode, ptr, &del_list, list) {
|
||||
handler->ops->remove(handler->ops_arg, rbnode);
|
||||
kref_put(&rbnode->refcount, release_immediate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +261,6 @@ static int mmu_notifier_range_start(struct mmu_notifier *mn,
|
||||
struct rb_root_cached *root = &handler->root;
|
||||
struct mmu_rb_node *node, *ptr = NULL;
|
||||
unsigned long flags;
|
||||
bool added = false;
|
||||
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
for (node = __mmu_int_rb_iter_first(root, range->start, range->end-1);
|
||||
@@ -227,38 +269,16 @@ static int mmu_notifier_range_start(struct mmu_notifier *mn,
|
||||
ptr = __mmu_int_rb_iter_next(node, range->start,
|
||||
range->end - 1);
|
||||
trace_hfi1_mmu_mem_invalidate(node->addr, node->len);
|
||||
if (handler->ops->invalidate(handler->ops_arg, node)) {
|
||||
__mmu_int_rb_remove(node, root);
|
||||
/* move from LRU list to delete list */
|
||||
list_move(&node->list, &handler->del_list);
|
||||
added = true;
|
||||
}
|
||||
/* Remove from rb tree and lru_list. */
|
||||
__mmu_int_rb_remove(node, root);
|
||||
list_del_init(&node->list);
|
||||
kref_put(&node->refcount, release_nolock);
|
||||
}
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
|
||||
if (added)
|
||||
queue_work(handler->wq, &handler->del_work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Call the remove function for the given handler and the list. This
|
||||
* is expected to be called with a delete list extracted from handler.
|
||||
* The caller should not be holding the handler lock.
|
||||
*/
|
||||
static void do_remove(struct mmu_rb_handler *handler,
|
||||
struct list_head *del_list)
|
||||
{
|
||||
struct mmu_rb_node *node;
|
||||
|
||||
while (!list_empty(del_list)) {
|
||||
node = list_first_entry(del_list, struct mmu_rb_node, list);
|
||||
list_del(&node->list);
|
||||
handler->ops->remove(handler->ops_arg, node);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Work queue function to remove all nodes that have been queued up to
|
||||
* be removed. The key feature is that mm->mmap_lock is not being held
|
||||
@@ -271,11 +291,16 @@ static void handle_remove(struct work_struct *work)
|
||||
del_work);
|
||||
struct list_head del_list;
|
||||
unsigned long flags;
|
||||
struct mmu_rb_node *node;
|
||||
|
||||
/* remove anything that is queued to get removed */
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
list_replace_init(&handler->del_list, &del_list);
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
|
||||
do_remove(handler, &del_list);
|
||||
while (!list_empty(&del_list)) {
|
||||
node = list_first_entry(&del_list, struct mmu_rb_node, list);
|
||||
list_del(&node->list);
|
||||
handler->ops->remove(handler->ops_arg, node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ struct mmu_rb_node {
|
||||
struct rb_node node;
|
||||
struct mmu_rb_handler *handler;
|
||||
struct list_head list;
|
||||
struct kref refcount;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -51,6 +52,8 @@ int hfi1_mmu_rb_register(void *ops_arg,
|
||||
void hfi1_mmu_rb_unregister(struct mmu_rb_handler *handler);
|
||||
int hfi1_mmu_rb_insert(struct mmu_rb_handler *handler,
|
||||
struct mmu_rb_node *mnode);
|
||||
void hfi1_mmu_rb_release(struct kref *refcount);
|
||||
|
||||
void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg);
|
||||
struct mmu_rb_node *hfi1_mmu_rb_get_first(struct mmu_rb_handler *handler,
|
||||
unsigned long addr,
|
||||
|
||||
@@ -1593,7 +1593,20 @@ static inline void sdma_unmap_desc(
|
||||
struct hfi1_devdata *dd,
|
||||
struct sdma_desc *descp)
|
||||
{
|
||||
system_descriptor_complete(dd, descp);
|
||||
switch (sdma_mapping_type(descp)) {
|
||||
case SDMA_MAP_SINGLE:
|
||||
dma_unmap_single(&dd->pcidev->dev, sdma_mapping_addr(descp),
|
||||
sdma_mapping_len(descp), DMA_TO_DEVICE);
|
||||
break;
|
||||
case SDMA_MAP_PAGE:
|
||||
dma_unmap_page(&dd->pcidev->dev, sdma_mapping_addr(descp),
|
||||
sdma_mapping_len(descp), DMA_TO_DEVICE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (descp->pinning_ctx && descp->ctx_put)
|
||||
descp->ctx_put(descp->pinning_ctx);
|
||||
descp->pinning_ctx = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3113,8 +3126,8 @@ int ext_coal_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx,
|
||||
|
||||
/* Add descriptor for coalesce buffer */
|
||||
tx->desc_limit = MAX_DESC;
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_SINGLE, NULL, tx,
|
||||
addr, tx->tlen);
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_SINGLE, tx,
|
||||
addr, tx->tlen, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -3157,9 +3170,9 @@ int _pad_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx)
|
||||
make_tx_sdma_desc(
|
||||
tx,
|
||||
SDMA_MAP_NONE,
|
||||
NULL,
|
||||
dd->sdma_pad_phys,
|
||||
sizeof(u32) - (tx->packet_len & (sizeof(u32) - 1)));
|
||||
sizeof(u32) - (tx->packet_len & (sizeof(u32) - 1)),
|
||||
NULL, NULL, NULL);
|
||||
tx->num_desc++;
|
||||
_sdma_close_tx(dd, tx);
|
||||
return rval;
|
||||
|
||||
@@ -594,9 +594,11 @@ static inline dma_addr_t sdma_mapping_addr(struct sdma_desc *d)
|
||||
static inline void make_tx_sdma_desc(
|
||||
struct sdma_txreq *tx,
|
||||
int type,
|
||||
void *pinning_ctx,
|
||||
dma_addr_t addr,
|
||||
size_t len)
|
||||
size_t len,
|
||||
void *pinning_ctx,
|
||||
void (*ctx_get)(void *),
|
||||
void (*ctx_put)(void *))
|
||||
{
|
||||
struct sdma_desc *desc = &tx->descp[tx->num_desc];
|
||||
|
||||
@@ -613,7 +615,11 @@ static inline void make_tx_sdma_desc(
|
||||
<< SDMA_DESC0_PHY_ADDR_SHIFT) |
|
||||
(((u64)len & SDMA_DESC0_BYTE_COUNT_MASK)
|
||||
<< SDMA_DESC0_BYTE_COUNT_SHIFT);
|
||||
|
||||
desc->pinning_ctx = pinning_ctx;
|
||||
desc->ctx_put = ctx_put;
|
||||
if (pinning_ctx && ctx_get)
|
||||
ctx_get(pinning_ctx);
|
||||
}
|
||||
|
||||
/* helper to extend txreq */
|
||||
@@ -645,18 +651,20 @@ static inline void _sdma_close_tx(struct hfi1_devdata *dd,
|
||||
static inline int _sdma_txadd_daddr(
|
||||
struct hfi1_devdata *dd,
|
||||
int type,
|
||||
void *pinning_ctx,
|
||||
struct sdma_txreq *tx,
|
||||
dma_addr_t addr,
|
||||
u16 len)
|
||||
u16 len,
|
||||
void *pinning_ctx,
|
||||
void (*ctx_get)(void *),
|
||||
void (*ctx_put)(void *))
|
||||
{
|
||||
int rval = 0;
|
||||
|
||||
make_tx_sdma_desc(
|
||||
tx,
|
||||
type,
|
||||
pinning_ctx,
|
||||
addr, len);
|
||||
addr, len,
|
||||
pinning_ctx, ctx_get, ctx_put);
|
||||
WARN_ON(len > tx->tlen);
|
||||
tx->num_desc++;
|
||||
tx->tlen -= len;
|
||||
@@ -676,11 +684,18 @@ static inline int _sdma_txadd_daddr(
|
||||
/**
|
||||
* sdma_txadd_page() - add a page to the sdma_txreq
|
||||
* @dd: the device to use for mapping
|
||||
* @pinning_ctx: context to be released at descriptor retirement
|
||||
* @tx: tx request to which the page is added
|
||||
* @page: page to map
|
||||
* @offset: offset within the page
|
||||
* @len: length in bytes
|
||||
* @pinning_ctx: context to be stored on struct sdma_desc .pinning_ctx. Not
|
||||
* added if coalesce buffer is used. E.g. pointer to pinned-page
|
||||
* cache entry for the sdma_desc.
|
||||
* @ctx_get: optional function to take reference to @pinning_ctx. Not called if
|
||||
* @pinning_ctx is NULL.
|
||||
* @ctx_put: optional function to release reference to @pinning_ctx after
|
||||
* sdma_desc completes. May be called in interrupt context so must
|
||||
* not sleep. Not called if @pinning_ctx is NULL.
|
||||
*
|
||||
* This is used to add a page/offset/length descriptor.
|
||||
*
|
||||
@@ -692,11 +707,13 @@ static inline int _sdma_txadd_daddr(
|
||||
*/
|
||||
static inline int sdma_txadd_page(
|
||||
struct hfi1_devdata *dd,
|
||||
void *pinning_ctx,
|
||||
struct sdma_txreq *tx,
|
||||
struct page *page,
|
||||
unsigned long offset,
|
||||
u16 len)
|
||||
u16 len,
|
||||
void *pinning_ctx,
|
||||
void (*ctx_get)(void *),
|
||||
void (*ctx_put)(void *))
|
||||
{
|
||||
dma_addr_t addr;
|
||||
int rval;
|
||||
@@ -720,7 +737,8 @@ static inline int sdma_txadd_page(
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_PAGE, pinning_ctx, tx, addr, len);
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_PAGE, tx, addr, len,
|
||||
pinning_ctx, ctx_get, ctx_put);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -754,8 +772,8 @@ static inline int sdma_txadd_daddr(
|
||||
return rval;
|
||||
}
|
||||
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_NONE, NULL, tx,
|
||||
addr, len);
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_NONE, tx, addr, len,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -801,7 +819,8 @@ static inline int sdma_txadd_kvaddr(
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_SINGLE, NULL, tx, addr, len);
|
||||
return _sdma_txadd_daddr(dd, SDMA_MAP_SINGLE, tx, addr, len,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
struct iowait_work;
|
||||
@@ -1034,6 +1053,4 @@ u16 sdma_get_descq_cnt(void);
|
||||
extern uint mod_num_sdma;
|
||||
|
||||
void sdma_update_lmc(struct hfi1_devdata *dd, u64 mask, u32 lid);
|
||||
|
||||
void system_descriptor_complete(struct hfi1_devdata *dd, struct sdma_desc *descp);
|
||||
#endif
|
||||
|
||||
@@ -20,6 +20,8 @@ struct sdma_desc {
|
||||
/* private: don't use directly */
|
||||
u64 qw[2];
|
||||
void *pinning_ctx;
|
||||
/* Release reference to @pinning_ctx. May be called in interrupt context. Must not sleep. */
|
||||
void (*ctx_put)(void *ctx);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,18 +62,14 @@ static int defer_packet_queue(
|
||||
static void activate_packet_queue(struct iowait *wait, int reason);
|
||||
static bool sdma_rb_filter(struct mmu_rb_node *node, unsigned long addr,
|
||||
unsigned long len);
|
||||
static int sdma_rb_insert(void *arg, struct mmu_rb_node *mnode);
|
||||
static int sdma_rb_evict(void *arg, struct mmu_rb_node *mnode,
|
||||
void *arg2, bool *stop);
|
||||
static void sdma_rb_remove(void *arg, struct mmu_rb_node *mnode);
|
||||
static int sdma_rb_invalidate(void *arg, struct mmu_rb_node *mnode);
|
||||
|
||||
static struct mmu_rb_ops sdma_rb_ops = {
|
||||
.filter = sdma_rb_filter,
|
||||
.insert = sdma_rb_insert,
|
||||
.evict = sdma_rb_evict,
|
||||
.remove = sdma_rb_remove,
|
||||
.invalidate = sdma_rb_invalidate
|
||||
};
|
||||
|
||||
static int add_system_pages_to_sdma_packet(struct user_sdma_request *req,
|
||||
@@ -161,9 +157,7 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt,
|
||||
if (!pq->reqs)
|
||||
goto pq_reqs_nomem;
|
||||
|
||||
pq->req_in_use = kcalloc(BITS_TO_LONGS(hfi1_sdma_comp_ring_size),
|
||||
sizeof(*pq->req_in_use),
|
||||
GFP_KERNEL);
|
||||
pq->req_in_use = bitmap_zalloc(hfi1_sdma_comp_ring_size, GFP_KERNEL);
|
||||
if (!pq->req_in_use)
|
||||
goto pq_reqs_no_in_use;
|
||||
|
||||
@@ -210,7 +204,7 @@ cq_comps_nomem:
|
||||
cq_nomem:
|
||||
kmem_cache_destroy(pq->txreq_cache);
|
||||
pq_txreq_nomem:
|
||||
kfree(pq->req_in_use);
|
||||
bitmap_free(pq->req_in_use);
|
||||
pq_reqs_no_in_use:
|
||||
kfree(pq->reqs);
|
||||
pq_reqs_nomem:
|
||||
@@ -249,15 +243,15 @@ int hfi1_user_sdma_free_queues(struct hfi1_filedata *fd,
|
||||
spin_unlock(&fd->pq_rcu_lock);
|
||||
synchronize_srcu(&fd->pq_srcu);
|
||||
/* at this point there can be no more new requests */
|
||||
if (pq->handler)
|
||||
hfi1_mmu_rb_unregister(pq->handler);
|
||||
iowait_sdma_drain(&pq->busy);
|
||||
/* Wait until all requests have been freed. */
|
||||
wait_event_interruptible(
|
||||
pq->wait,
|
||||
!atomic_read(&pq->n_reqs));
|
||||
kfree(pq->reqs);
|
||||
kfree(pq->req_in_use);
|
||||
if (pq->handler)
|
||||
hfi1_mmu_rb_unregister(pq->handler);
|
||||
bitmap_free(pq->req_in_use);
|
||||
kmem_cache_destroy(pq->txreq_cache);
|
||||
flush_pq_iowait(pq);
|
||||
kfree(pq);
|
||||
@@ -1277,25 +1271,17 @@ static void free_system_node(struct sdma_mmu_node *node)
|
||||
kfree(node);
|
||||
}
|
||||
|
||||
static inline void acquire_node(struct sdma_mmu_node *node)
|
||||
{
|
||||
atomic_inc(&node->refcount);
|
||||
WARN_ON(atomic_read(&node->refcount) < 0);
|
||||
}
|
||||
|
||||
static inline void release_node(struct mmu_rb_handler *handler,
|
||||
struct sdma_mmu_node *node)
|
||||
{
|
||||
atomic_dec(&node->refcount);
|
||||
WARN_ON(atomic_read(&node->refcount) < 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* kref_get()'s an additional kref on the returned rb_node to prevent rb_node
|
||||
* from being released until after rb_node is assigned to an SDMA descriptor
|
||||
* (struct sdma_desc) under add_system_iovec_to_sdma_packet(), even if the
|
||||
* virtual address range for rb_node is invalidated between now and then.
|
||||
*/
|
||||
static struct sdma_mmu_node *find_system_node(struct mmu_rb_handler *handler,
|
||||
unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
struct mmu_rb_node *rb_node;
|
||||
struct sdma_mmu_node *node;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
@@ -1304,11 +1290,12 @@ static struct sdma_mmu_node *find_system_node(struct mmu_rb_handler *handler,
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
return NULL;
|
||||
}
|
||||
node = container_of(rb_node, struct sdma_mmu_node, rb);
|
||||
acquire_node(node);
|
||||
|
||||
/* "safety" kref to prevent release before add_system_iovec_to_sdma_packet() */
|
||||
kref_get(&rb_node->refcount);
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
|
||||
return node;
|
||||
return container_of(rb_node, struct sdma_mmu_node, rb);
|
||||
}
|
||||
|
||||
static int pin_system_pages(struct user_sdma_request *req,
|
||||
@@ -1357,6 +1344,13 @@ retry:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* kref refcount on *node_p will be 2 on successful addition: one kref from
|
||||
* kref_init() for mmu_rb_handler and one kref to prevent *node_p from being
|
||||
* released until after *node_p is assigned to an SDMA descriptor (struct
|
||||
* sdma_desc) under add_system_iovec_to_sdma_packet(), even if the virtual
|
||||
* address range for *node_p is invalidated between now and then.
|
||||
*/
|
||||
static int add_system_pinning(struct user_sdma_request *req,
|
||||
struct sdma_mmu_node **node_p,
|
||||
unsigned long start, unsigned long len)
|
||||
@@ -1370,6 +1364,12 @@ static int add_system_pinning(struct user_sdma_request *req,
|
||||
if (!node)
|
||||
return -ENOMEM;
|
||||
|
||||
/* First kref "moves" to mmu_rb_handler */
|
||||
kref_init(&node->rb.refcount);
|
||||
|
||||
/* "safety" kref to prevent release before add_system_iovec_to_sdma_packet() */
|
||||
kref_get(&node->rb.refcount);
|
||||
|
||||
node->pq = pq;
|
||||
ret = pin_system_pages(req, start, len, node, PFN_DOWN(len));
|
||||
if (ret == 0) {
|
||||
@@ -1433,15 +1433,15 @@ static int get_system_cache_entry(struct user_sdma_request *req,
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDMA_DBG(req, "prepend: node->rb.addr %lx, node->refcount %d",
|
||||
node->rb.addr, atomic_read(&node->refcount));
|
||||
SDMA_DBG(req, "prepend: node->rb.addr %lx, node->rb.refcount %d",
|
||||
node->rb.addr, kref_read(&node->rb.refcount));
|
||||
prepend_len = node->rb.addr - start;
|
||||
|
||||
/*
|
||||
* This node will not be returned, instead a new node
|
||||
* will be. So release the reference.
|
||||
*/
|
||||
release_node(handler, node);
|
||||
kref_put(&node->rb.refcount, hfi1_mmu_rb_release);
|
||||
|
||||
/* Prepend a node to cover the beginning of the allocation */
|
||||
ret = add_system_pinning(req, node_p, start, prepend_len);
|
||||
@@ -1453,6 +1453,20 @@ static int get_system_cache_entry(struct user_sdma_request *req,
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_mmu_rb_node_get(void *ctx)
|
||||
{
|
||||
struct mmu_rb_node *node = ctx;
|
||||
|
||||
kref_get(&node->refcount);
|
||||
}
|
||||
|
||||
static void sdma_mmu_rb_node_put(void *ctx)
|
||||
{
|
||||
struct sdma_mmu_node *node = ctx;
|
||||
|
||||
kref_put(&node->rb.refcount, hfi1_mmu_rb_release);
|
||||
}
|
||||
|
||||
static int add_mapping_to_sdma_packet(struct user_sdma_request *req,
|
||||
struct user_sdma_txreq *tx,
|
||||
struct sdma_mmu_node *cache_entry,
|
||||
@@ -1496,9 +1510,12 @@ static int add_mapping_to_sdma_packet(struct user_sdma_request *req,
|
||||
ctx = cache_entry;
|
||||
}
|
||||
|
||||
ret = sdma_txadd_page(pq->dd, ctx, &tx->txreq,
|
||||
ret = sdma_txadd_page(pq->dd, &tx->txreq,
|
||||
cache_entry->pages[page_index],
|
||||
page_offset, from_this_page);
|
||||
page_offset, from_this_page,
|
||||
ctx,
|
||||
sdma_mmu_rb_node_get,
|
||||
sdma_mmu_rb_node_put);
|
||||
if (ret) {
|
||||
/*
|
||||
* When there's a failure, the entire request is freed by
|
||||
@@ -1520,8 +1537,6 @@ static int add_system_iovec_to_sdma_packet(struct user_sdma_request *req,
|
||||
struct user_sdma_iovec *iovec,
|
||||
size_t from_this_iovec)
|
||||
{
|
||||
struct mmu_rb_handler *handler = req->pq->handler;
|
||||
|
||||
while (from_this_iovec > 0) {
|
||||
struct sdma_mmu_node *cache_entry;
|
||||
size_t from_this_cache_entry;
|
||||
@@ -1542,15 +1557,15 @@ static int add_system_iovec_to_sdma_packet(struct user_sdma_request *req,
|
||||
|
||||
ret = add_mapping_to_sdma_packet(req, tx, cache_entry, start,
|
||||
from_this_cache_entry);
|
||||
|
||||
/*
|
||||
* Done adding cache_entry to zero or more sdma_desc. Can
|
||||
* kref_put() the "safety" kref taken under
|
||||
* get_system_cache_entry().
|
||||
*/
|
||||
kref_put(&cache_entry->rb.refcount, hfi1_mmu_rb_release);
|
||||
|
||||
if (ret) {
|
||||
/*
|
||||
* We're guaranteed that there will be no descriptor
|
||||
* completion callback that releases this node
|
||||
* because only the last descriptor referencing it
|
||||
* has a context attached, and a failure means the
|
||||
* last descriptor was never added.
|
||||
*/
|
||||
release_node(handler, cache_entry);
|
||||
SDMA_DBG(req, "add system segment failed %d", ret);
|
||||
return ret;
|
||||
}
|
||||
@@ -1601,42 +1616,12 @@ static int add_system_pages_to_sdma_packet(struct user_sdma_request *req,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void system_descriptor_complete(struct hfi1_devdata *dd,
|
||||
struct sdma_desc *descp)
|
||||
{
|
||||
switch (sdma_mapping_type(descp)) {
|
||||
case SDMA_MAP_SINGLE:
|
||||
dma_unmap_single(&dd->pcidev->dev, sdma_mapping_addr(descp),
|
||||
sdma_mapping_len(descp), DMA_TO_DEVICE);
|
||||
break;
|
||||
case SDMA_MAP_PAGE:
|
||||
dma_unmap_page(&dd->pcidev->dev, sdma_mapping_addr(descp),
|
||||
sdma_mapping_len(descp), DMA_TO_DEVICE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (descp->pinning_ctx) {
|
||||
struct sdma_mmu_node *node = descp->pinning_ctx;
|
||||
|
||||
release_node(node->rb.handler, node);
|
||||
}
|
||||
}
|
||||
|
||||
static bool sdma_rb_filter(struct mmu_rb_node *node, unsigned long addr,
|
||||
unsigned long len)
|
||||
{
|
||||
return (bool)(node->addr == addr);
|
||||
}
|
||||
|
||||
static int sdma_rb_insert(void *arg, struct mmu_rb_node *mnode)
|
||||
{
|
||||
struct sdma_mmu_node *node =
|
||||
container_of(mnode, struct sdma_mmu_node, rb);
|
||||
|
||||
atomic_inc(&node->refcount);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 to remove the node from the rb tree and call the remove op.
|
||||
*
|
||||
@@ -1649,10 +1634,6 @@ static int sdma_rb_evict(void *arg, struct mmu_rb_node *mnode,
|
||||
container_of(mnode, struct sdma_mmu_node, rb);
|
||||
struct evict_data *evict_data = evict_arg;
|
||||
|
||||
/* is this node still being used? */
|
||||
if (atomic_read(&node->refcount))
|
||||
return 0; /* keep this node */
|
||||
|
||||
/* this node will be evicted, add its pages to our count */
|
||||
evict_data->cleared += node->npages;
|
||||
|
||||
@@ -1670,13 +1651,3 @@ static void sdma_rb_remove(void *arg, struct mmu_rb_node *mnode)
|
||||
|
||||
free_system_node(node);
|
||||
}
|
||||
|
||||
static int sdma_rb_invalidate(void *arg, struct mmu_rb_node *mnode)
|
||||
{
|
||||
struct sdma_mmu_node *node =
|
||||
container_of(mnode, struct sdma_mmu_node, rb);
|
||||
|
||||
if (!atomic_read(&node->refcount))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,6 @@ struct hfi1_user_sdma_comp_q {
|
||||
struct sdma_mmu_node {
|
||||
struct mmu_rb_node rb;
|
||||
struct hfi1_user_sdma_pkt_q *pq;
|
||||
atomic_t refcount;
|
||||
struct page **pages;
|
||||
unsigned int npages;
|
||||
};
|
||||
|
||||
@@ -64,11 +64,11 @@ static noinline int build_vnic_ulp_payload(struct sdma_engine *sde,
|
||||
|
||||
/* combine physically continuous fragments later? */
|
||||
ret = sdma_txadd_page(sde->dd,
|
||||
NULL,
|
||||
&tx->txreq,
|
||||
skb_frag_page(frag),
|
||||
skb_frag_off(frag),
|
||||
skb_frag_size(frag));
|
||||
skb_frag_size(frag),
|
||||
NULL, NULL, NULL);
|
||||
if (unlikely(ret))
|
||||
goto bail_txadd;
|
||||
}
|
||||
|
||||
@@ -597,11 +597,12 @@ int hns_roce_table_get(struct hns_roce_dev *hr_dev,
|
||||
}
|
||||
|
||||
/* Set HEM base address(128K/page, pa) to Hardware */
|
||||
if (hr_dev->hw->set_hem(hr_dev, table, obj, HEM_HOP_STEP_DIRECT)) {
|
||||
ret = hr_dev->hw->set_hem(hr_dev, table, obj, HEM_HOP_STEP_DIRECT);
|
||||
if (ret) {
|
||||
hns_roce_free_hem(hr_dev, table->hem[i]);
|
||||
table->hem[i] = NULL;
|
||||
ret = -ENODEV;
|
||||
dev_err(dev, "set HEM base address to HW failed.\n");
|
||||
dev_err(dev, "set HEM base address to HW failed, ret = %d.\n",
|
||||
ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,16 +94,18 @@ static enum irdma_status_code irdma_nop_1(struct irdma_qp_uk *qp)
|
||||
*/
|
||||
void irdma_clr_wqes(struct irdma_qp_uk *qp, u32 qp_wqe_idx)
|
||||
{
|
||||
__le64 *wqe;
|
||||
struct irdma_qp_quanta *sq;
|
||||
u32 wqe_idx;
|
||||
|
||||
if (!(qp_wqe_idx & 0x7F)) {
|
||||
wqe_idx = (qp_wqe_idx + 128) % qp->sq_ring.size;
|
||||
wqe = qp->sq_base[wqe_idx].elem;
|
||||
sq = qp->sq_base + wqe_idx;
|
||||
if (wqe_idx)
|
||||
memset(wqe, qp->swqe_polarity ? 0 : 0xFF, 0x1000);
|
||||
memset(sq, qp->swqe_polarity ? 0 : 0xFF,
|
||||
128 * sizeof(*sq));
|
||||
else
|
||||
memset(wqe, qp->swqe_polarity ? 0xFF : 0, 0x1000);
|
||||
memset(sq, qp->swqe_polarity ? 0xFF : 0,
|
||||
128 * sizeof(*sq));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -434,15 +434,17 @@ static void __finalize_command(struct brcmstb_dpfe_priv *priv)
|
||||
static int __send_command(struct brcmstb_dpfe_priv *priv, unsigned int cmd,
|
||||
u32 result[])
|
||||
{
|
||||
const u32 *msg = priv->dpfe_api->command[cmd];
|
||||
void __iomem *regs = priv->regs;
|
||||
unsigned int i, chksum, chksum_idx;
|
||||
const u32 *msg;
|
||||
int ret = 0;
|
||||
u32 resp;
|
||||
|
||||
if (cmd >= DPFE_CMD_MAX)
|
||||
return -1;
|
||||
|
||||
msg = priv->dpfe_api->command[cmd];
|
||||
|
||||
mutex_lock(&priv->lock);
|
||||
|
||||
/* Wait for DCPU to become ready */
|
||||
|
||||
@@ -39,6 +39,7 @@ config QE_TDM
|
||||
|
||||
config QE_USB
|
||||
bool
|
||||
depends on QUICC_ENGINE
|
||||
default y if USB_FSL_QE
|
||||
help
|
||||
QE USB Controller support
|
||||
|
||||
@@ -563,11 +563,15 @@ static int mipid_spi_probe(struct spi_device *spi)
|
||||
|
||||
r = mipid_detect(md);
|
||||
if (r < 0)
|
||||
return r;
|
||||
goto free_md;
|
||||
|
||||
omapfb_register_panel(&md->panel);
|
||||
|
||||
return 0;
|
||||
|
||||
free_md:
|
||||
kfree(md);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int mipid_spi_remove(struct spi_device *spi)
|
||||
|
||||
@@ -52,7 +52,12 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9600, 50, 1);
|
||||
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_vol_tlv, -9600, 50, 1);
|
||||
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_max_gain_tlv, -650, 150, 0);
|
||||
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_min_gain_tlv, -1200, 150, 0);
|
||||
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_target_tlv, -1650, 150, 0);
|
||||
|
||||
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(alc_target_tlv,
|
||||
0, 10, TLV_DB_SCALE_ITEM(-1650, 150, 0),
|
||||
11, 11, TLV_DB_SCALE_ITEM(-150, 0, 0),
|
||||
);
|
||||
|
||||
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(hpmixer_gain_tlv,
|
||||
0, 4, TLV_DB_SCALE_ITEM(-1200, 150, 0),
|
||||
8, 11, TLV_DB_SCALE_ITEM(-450, 150, 0),
|
||||
@@ -115,7 +120,7 @@ static const struct snd_kcontrol_new es8316_snd_controls[] = {
|
||||
alc_max_gain_tlv),
|
||||
SOC_SINGLE_TLV("ALC Capture Min Volume", ES8316_ADC_ALC2, 0, 28, 0,
|
||||
alc_min_gain_tlv),
|
||||
SOC_SINGLE_TLV("ALC Capture Target Volume", ES8316_ADC_ALC3, 4, 10, 0,
|
||||
SOC_SINGLE_TLV("ALC Capture Target Volume", ES8316_ADC_ALC3, 4, 11, 0,
|
||||
alc_target_tlv),
|
||||
SOC_SINGLE("ALC Capture Hold Time", ES8316_ADC_ALC3, 0, 10, 0),
|
||||
SOC_SINGLE("ALC Capture Decay Time", ES8316_ADC_ALC4, 4, 10, 0),
|
||||
@@ -364,13 +369,11 @@ static int es8316_set_dai_sysclk(struct snd_soc_dai *codec_dai,
|
||||
int count = 0;
|
||||
|
||||
es8316->sysclk = freq;
|
||||
es8316->sysclk_constraints.list = NULL;
|
||||
es8316->sysclk_constraints.count = 0;
|
||||
|
||||
if (freq == 0) {
|
||||
es8316->sysclk_constraints.list = NULL;
|
||||
es8316->sysclk_constraints.count = 0;
|
||||
|
||||
if (freq == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = clk_set_rate(es8316->mclk, freq);
|
||||
if (ret)
|
||||
@@ -386,8 +389,10 @@ static int es8316_set_dai_sysclk(struct snd_soc_dai *codec_dai,
|
||||
es8316->allowed_rates[count++] = freq / ratio;
|
||||
}
|
||||
|
||||
es8316->sysclk_constraints.list = es8316->allowed_rates;
|
||||
es8316->sysclk_constraints.count = count;
|
||||
if (count) {
|
||||
es8316->sysclk_constraints.list = es8316->allowed_rates;
|
||||
es8316->sysclk_constraints.count = count;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user