diff --git a/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075-io.dts b/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075-io.dts index d8736e35a7f47..2f01d0579dfb1 100644 --- a/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075-io.dts +++ b/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075-io.dts @@ -89,14 +89,15 @@ regulator-always-on; }; - switch_to_ekey_usb_regulator: switch-to-ekey-usb-regulator { + vcc_1v8_io_regulator: vcc-1v8-io-regulator { compatible = "regulator-fixed"; - regulator-name = "switch_to_ekey_usb"; - gpio = <&pmm8654au_2_gpios 11 GPIO_ACTIVE_HIGH>; + regulator-name = "vcc_1v8_io"; + gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; - pinctrl-0 = <&switch_to_ekey_usb>; + pinctrl-0 = <&vcc_1v8_io_en_state>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; enable-active-high; - regulator-boot-on; regulator-always-on; }; @@ -113,6 +114,45 @@ debounce-interval = <30>; }; }; + + gpio_leds: leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pme_gpio_10_led>; + + blue_led { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pca 0 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + green_led { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pmm8654au_2_gpios 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "none"; + }; + }; + + fan_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + clocks = <&gcc GCC_GP1_CLK>; + gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&fan_pwm_clk_state>; + pinctrl-1 = <&fan_pwm_gpio_state>; + }; + + fan0: pwm-fan { + compatible = "pwm-fan"; + pwms = <&fan_pwm 0 100000>; + cooling-levels = <0 64 128 192 255>; + #cooling-cells = <2>; + status = "okay"; + }; }; &i2c1 { @@ -123,11 +163,22 @@ pca: pca@55 { compatible = "nxp,pca9685-pwm"; #pwm-cells = <2>; + #gpio-cells = <2>; + gpio-controller; reg = <0x55>; + + gpio-line-names = + /* GPIO0 ~ GPIO3 */ + "", "PIN_37", "PIN_7", "PIN_11", + /* GPIO4 ~ GPIO7 */ + "PIN_13", "PIN_15", "PIN_29", "PIN_31", + /* GPIO8 ~ GPIO11 */ + "PIN_36", "PIN_32", "PIN_22", "PIN_18", + /* GPIO12 ~ GPIO15 */ + "PIN_16", "PIN_10", "PIN_8", "PIN_33"; }; }; - &i2c7 { qcom,load-firmware; qcom,xfer-mode = <1>; @@ -142,6 +193,53 @@ }; }; +&qup_spi16_default { + pins = "gpio86", "gpio87", "gpio88"; + function = "qup2_se2"; + drive-strength = <6>; + bias-disable; +}; + +&spi16 { + qcom,load-firmware; + qcom,xfer-mode = <1>; + + num-cs = <2>; + cs-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>, + <&tlmm 90 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&qup_spi16_default &spi16_cs_gpio_state>; + + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + mcp2518fd_can2: can@0 { + compatible = "microchip,mcp2518fd"; + reg = <0>; + clock-frequency = <40000000>; + spi-max-frequency = <5000000>; + pinctrl-names = "default"; + pinctrl-0 = <&mcp2518fd_spi16_can0_int_state>; + interrupt-names = "can2_irq"; + interrupts-extended = <&tlmm 78 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; + + mcp2518fd_can3: can@1 { + compatible = "microchip,mcp2518fd"; + reg = <1>; + clock-frequency = <40000000>; + spi-max-frequency = <5000000>; + pinctrl-names = "default"; + pinctrl-0 = <&mcp2518fd_spi16_can1_int_state>; + interrupt-names = "can3_irq"; + interrupts-extended = <&tlmm 79 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; +}; + &uart9 { qcom,load-firmware; qcom,xfer-mode = <1>; @@ -158,6 +256,10 @@ status = "okay"; }; +&qup_uart17_rts { + bias-pull-down; +}; + &uart17 { qcom,load-firmware; qcom,xfer-mode = <1>; @@ -165,7 +267,6 @@ pinctrl-names = "default"; status = "okay"; linux,rs485-enabled-at-boot-time; - rs485-rts-active-low; }; &pmm8654au_1_gpios { @@ -221,15 +322,142 @@ output-high; bias-pull-high; }; + + pme_gpio_10_led: pme-gpio-10-led-state { + pins = "gpio10"; + function = "normal"; + output-low; + bias-disable; + }; }; &tlmm { + gpio-line-names = + /* GPIO0 ~ GPIO3 */ + "", "", "", "", + /* GPIO4 ~ GPIO7 */ + "", "", "", "", + /* GPIO8 ~ GPIO11 */ + "", "", "", "", + /* GPIO12 ~ GPIO15 */ + "", "PIN_21", "PIN_19", "PIN_23", + /* GPIO16 ~ GPIO19 */ + "PIN_24", "PIN_26", "", "", + /* GPIO20 ~ GPIO23 */ + "", "", "", "", + /* GPIO24 ~ GPIO27 */ + "", "", "", "", + /* GPIO28 ~ GPIO31 */ + "", "", "", "", + /* GPIO32 ~ GPIO35 */ + "", "", "", "", + /* GPIO36 ~ GPIO39 */ + "", "", "", "", + /* GPIO40 ~ GPIO43 */ + "PIN_3", "PIN_5", "", "", + /* GPIO44 ~ GPIO47 */ + "", "", "", "", + /* GPIO48 ~ GPIO51 */ + "", "", "", "", + /* GPIO52 ~ GPIO55 */ + "", "", "", "", + /* GPIO56 ~ GPIO59 */ + "", "", "", "", + /* GPIO60 ~ GPIO63 */ + "", "", "", "", + /* GPIO64 ~ GPIO67 */ + "", "", "", "", + /* GPIO68 ~ GPIO71 */ + "", "", "", "", + /* GPIO72 ~ GPIO75 */ + "", "", "", "", + /* GPIO76 ~ GPIO79 */ + "", "", "", "", + /* GPIO80 ~ GPIO83 */ + "", "", "", "", + /* GPIO84 ~ GPIO87 */ + "", "", "", "", + /* GPIO88 ~ GPIO91 */ + "", "", "", "", + /* GPIO92 ~ GPIO95 */ + "", "", "", "PIN_27", + /* GPIO96 ~ GPIO99 */ + "PIN_28", "", "", "", + /* GPIO100 ~ GPIO103 */ + "", "", "", "", + /* GPIO104 ~ GPIO107 */ + "", "", "", "", + /* GPIO108 ~ GPIO111 */ + "", "", "PIN_12", "PIN_35", + /* GPIO112 ~ GPIO115 */ + "PIN_38", "PIN_40", "", "", + /* GPIO116 ~ GPIO119 */ + "", "", "", "", + /* GPIO120 ~ GPIO123 */ + "", "", "", "", + /* GPIO124 ~ GPIO127 */ + "", "", "", "", + /* GPIO128 ~ GPIO131 */ + "", "", "", "", + /* GPIO132 ~ GPIO135 */ + "", "", "", "", + /* GPIO136 ~ GPIO139 */ + "", "", "", "", + /* GPIO140 ~ GPIO143 */ + "", "", "", "", + /* GPIO144 ~ GPIO147 */ + "", "", "", "", + /* GPIO148 ~ GPIO149 */ + "", ""; + gpio_keys_default: gpio-keys-default-state { pins = "gpio97"; function = "gpio"; drive-strength = <2>; bias-pull-up; }; -}; + fan_pwm_clk_state: fan-pwm-clk-state { + pins = "gpio51"; + function = "gcc_gp1"; + drive-strength = <2>; + bias-disable; + }; + + fan_pwm_gpio_state: fan-pwm-gpio-state { + pins = "gpio51"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + vcc_1v8_io_en_state: vcc-1v8-en-state { + pins = "gpio73"; + function = "normal"; + output-high; + bias-pull-up; + }; + + spi16_cs_gpio_state: spi16-cs-gpio-state { + pins = "gpio89", "gpio90"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + output-high; + }; + + mcp2518fd_spi16_can0_int_state: mcp2518fd-spi16-can0-int-state { + pins = "gpio78"; + function = "gpio"; + bias-pull-up; + input-enable; + }; + + mcp2518fd_spi16_can1_int_state: mcp2518fd-spi16-can1-int-state { + pins = "gpio79"; + function = "gpio"; + bias-pull-up; + input-enable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075.dtsi b/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075.dtsi index cd1c1b1e6bb45..628be2d2f1943 100644 --- a/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs9075-radxa-vmarc-q9075.dtsi @@ -705,17 +705,22 @@ }; &qupv3_id_0 { - firmware-name = "qupv3fw.elf"; + firmware-name = "qcom/sa8775p/qupv3fw.elf"; status = "okay"; }; &qupv3_id_1 { - firmware-name = "qupv3fw.elf"; + firmware-name = "qcom/sa8775p/qupv3fw.elf"; status = "okay"; }; &qupv3_id_2 { - firmware-name = "qupv3fw.elf"; + firmware-name = "qcom/sa8775p/qupv3fw.elf"; + status = "okay"; +}; + +&qupv3_id_3 { + firmware-name = "qcom/sa8775p/qupv3fw.elf"; status = "okay"; }; @@ -1180,6 +1185,12 @@ bias-disable; }; + dp2_hot_plug_det: dp2-hot-plug-det-state { + pins = "gpio104"; + function = "edp2_hot"; + bias-disable; + }; + ethernet0_default: ethernet0-default-state { ethernet0_mdc: ethernet0-mdc-pins { pins = "gpio8"; diff --git a/arch/arm64/configs/qcom_defconfig b/arch/arm64/configs/qcom_defconfig index bad36f3818f3e..797eda0ab6bfa 100644 --- a/arch/arm64/configs/qcom_defconfig +++ b/arch/arm64/configs/qcom_defconfig @@ -902,3 +902,5 @@ CONFIG_MAGIC_SYSRQ=y CONFIG_PAGE_OWNER=y CONFIG_PANIC_ON_OOPS=y CONFIG_SCHEDSTATS=y +CONFIG_PWM_CLK=m +VIDEO_CAMERA_SENSOR=y diff --git a/ubuntu/qcom/camera/camera/drivers/cam_req_mgr/cam_req_mgr_dev.c b/ubuntu/qcom/camera/camera/drivers/cam_req_mgr/cam_req_mgr_dev.c index 2e7c453eb51da..a08cb34ed652c 100644 --- a/ubuntu/qcom/camera/camera/drivers/cam_req_mgr/cam_req_mgr_dev.c +++ b/ubuntu/qcom/camera/camera/drivers/cam_req_mgr/cam_req_mgr_dev.c @@ -1189,6 +1189,18 @@ static int cam_req_mgr_probe(struct platform_device *pdev) } } + /* Also populate CCI children as platform devices */ + np = NULL; + while ((np = of_find_compatible_node(np, NULL, "qcom,cci"))) { + rc = of_platform_populate(np, cam_sensor_module_dt_match, NULL, NULL); + if (rc) { + CAM_ERR(CAM_CRM, + "Failed to populate CCI child nodes as platform devices for parent: %s, rc=%d", + np->full_name, rc); + goto end; + } + } + rc = camera_component_match_add_drivers(dev, &match_list); if (rc) { CAM_ERR(CAM_CRM, diff --git a/ubuntu/qcom/camera/camera/drivers/cam_sensor_module/cam_sensor/cam_sensor_soc.c b/ubuntu/qcom/camera/camera/drivers/cam_sensor_module/cam_sensor/cam_sensor_soc.c index 0b6f8be000c8a..0d5249cb1adee 100644 --- a/ubuntu/qcom/camera/camera/drivers/cam_sensor_module/cam_sensor/cam_sensor_soc.c +++ b/ubuntu/qcom/camera/camera/drivers/cam_sensor_module/cam_sensor/cam_sensor_soc.c @@ -263,9 +263,12 @@ static int32_t cam_sensor_driver_get_dt_data(struct cam_sensor_ctrl_t *s_ctrl) of_parent = of_get_parent(local_of_node); if (of_property_read_u32(of_parent, "cell-index", - &s_ctrl->cci_num) < 0) + &s_ctrl->cci_num) < 0 && + of_property_read_u32(of_node, "cci-device", + &s_ctrl->cci_num) < 0) { /* Set default master 0 */ s_ctrl->cci_num = CCI_DEVICE_0; + } s_ctrl->io_master_info.cci_client->cci_device = s_ctrl->cci_num;