Loading Documentation/arm/msm/qca1530.txt 0 → 100644 +128 −0 Original line number Diff line number Diff line Introduction ============ The qca1530 driver is required for configuration and control of qca1530 SoC hardware. The driver does not connect to the chip itself, however it provides control of reset line, power, clock and xLNA (external low-noise amplifier) facilties. Driver also exports control interface to user space. qca1530 is a System on Chip that enables GNSS position computation. The chip holds firmware for satellite signal reception and preprocessing. Usually the chip interfaces with serial or i2c interface. For proper operation, the chip might require optional configuration of power regulator, xLNA, clock and reset line. Hardware description ==================== The hardware requires serial or i2c connection, power supply, clock and reset line. In case xLNA is available, xLNA must be also configured. Software description ==================== When configured, the driver initializes GPIOs, clock, and power supplies for proper chip operation. Typical scenario: * Configure Reset GPIO * Configure RTC clock GPIO/power supply * Configure xLNA power supply * Configure qca1530 chip power supply After successful loading, the driver exports chip control functionality to user space (described below). In case of configuration error, driver releases acquired resources and fails to load. In case of error while performing service call from user space, driver signals error condition to client application. Design ====== Design goal is to provide flexible driver that can adapt to various hardware platforms and provide stable user space control interface for the following tasks: * Controlling reset * Controlling power * Controlling RTC * Controlling xLNA The driver uses ARM DTS configuration for all items except RTC. The following APIs are used: * Power regulator consumer API * GPIO API * Clock consumer API * sysfs Power Management ================ Driver can control power for the following components: * qca1530 chip * RTCs * xLNA When loading, driver configures and turns on power supply for all components. User space software may alter power supplies via interface. Interface ========= User with sufficient priviledges can perform following tasks: * Control the reset line (on/off) * Control power supply (on/off) * Control RTC (on/off) * Control xLNA (on/off) * Query status of any of the controlled items The following sysfs nodes are provided at /sys/class/gnss/qca1530: reset: This node is used to control and query the chip reset state. Valid values are: 0 - reset is off, 1 - reset is on. power: This node is used to control and query the chip power supply. Possible values are: 0 - off, 1 - on. rtc: This node is used to control and query RTC clock (SLEEP_CLK) and TCXO inputs. Possible values are: 0 - off, 1 - on. xlna: This node is used to control and query xLNA facility. Possible values are: 0 - off, 1 - on. If the control for particular item is not available, the respective sysfs node is not present. Driver parameters ================= No module or kernel command line parameters supported. Config options ============== This driver is enabled using the CONFIG_QCA1530 kernel config option. Dependencies ============ In case required, GPIO, RTC and Power Regulator modules must be present. To do ===== * Separate driver into platform-specific option and userspace interface part. Platform-specific part will contain platform integration code and provide internal interface for controlling qca1530. The common part will contain user space interface implementation. * Add voltage/current control options. Currently driver expects power supply to be preconfigured with proper voltage and current options. For better power management the driver will also need to support entering low-power mode. * Add clock configuration support via DTS. Documentation/devicetree/bindings/platform/msm/qca1530.txt 0 → 100644 +26 −0 Original line number Diff line number Diff line QCA1530 SoC QCA1530 is a SoC for position determination using navigation satellites. Typical scenario includes usage of GPS and GLONASS satellite navigation systems. Required properties - compatible: "qca,qca1530" Optional properties - qca,pwr-supply: handle to the regulator device tree node - qca,pwr-gpio: handle the power control using GPIO interface - qca,reset-gpio: GPIO for reset control - qca,reset-supply: handle to the regulator for reset control - qca,clk-gpio: handle the clock control using GPIO interface - qca,xlna-supply: handle to the regulator for xLNA - qca,xlna-gpio: handle to xLNA power control using GPIO interface Example: gnss_qca1530: qca,qca1530{ compatible = "qca,qca1530"; qca,pwr-supply = <&pma8084_l26>; /* Power regulator */ qca,reset-gpio = <&msmgpio 128 0>; /* Reset line */ }; arch/arm/mach-msm/board-8084.c +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ static struct of_dev_auxdata apq8084_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("qcom,sdhci-msm", 0xF9824900, "msm_sdcc.1", NULL), OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF98A4000, "msm_sdcc.2", NULL), OF_DEV_AUXDATA("qcom,sdhci-msm", 0xF98A4900, "msm_sdcc.2", NULL), OF_DEV_AUXDATA("qcom,qca1530", 0x00000000, "qca1530.1", NULL), OF_DEV_AUXDATA("qca,qca1530", 0x00000000, "qca1530.1", NULL), OF_DEV_AUXDATA("qcom,ufshc", 0xFC594000, "msm_ufs.1", NULL), OF_DEV_AUXDATA("qcom,xhci-msm-hsic", 0xf9c00000, "msm_hsic_host", NULL), OF_DEV_AUXDATA("qcom,msm_pcie", 0xFC520000, "msm_pcie", NULL), Loading arch/arm/mach-msm/clock-8084.c +1 −1 Original line number Diff line number Diff line Loading @@ -6581,7 +6581,7 @@ static struct clk_lookup apq_clocks_8084[] = { CLK_LOOKUP("pcie_1_ldo", pcie_1_phy_ldo.c, "msm_pcie"), CLK_LOOKUP("", sata_phy_ldo.c, ""), CLK_LOOKUP("rtc_clk", div_clk3.c, "qca1530.1"), CLK_LOOKUP("qca,rtc_clk", div_clk3.c, "qca1530.1"), }; static struct pll_config_regs mmpll0_regs __initdata = { Loading drivers/platform/msm/Kconfig +14 −0 Original line number Diff line number Diff line Loading @@ -130,4 +130,18 @@ config SSM This driver uses Secure Channel Manager interface for trustzone communication and communicates with modem over SMD channel. config QCA1530 tristate "QCA1530 SoC GNSS Driver" depends on REGULATOR && OF depends on GPIOLIB && OF_GPIO depends on CLKDEV_LOOKUP help Say Y here to include support for QCA1530 SOC chip. QCA1530 chip enables support for GPS- and GLONASS-based position determination. To compile this driver as a module, choose M here: the module will be called qca1530. endmenu Loading
Documentation/arm/msm/qca1530.txt 0 → 100644 +128 −0 Original line number Diff line number Diff line Introduction ============ The qca1530 driver is required for configuration and control of qca1530 SoC hardware. The driver does not connect to the chip itself, however it provides control of reset line, power, clock and xLNA (external low-noise amplifier) facilties. Driver also exports control interface to user space. qca1530 is a System on Chip that enables GNSS position computation. The chip holds firmware for satellite signal reception and preprocessing. Usually the chip interfaces with serial or i2c interface. For proper operation, the chip might require optional configuration of power regulator, xLNA, clock and reset line. Hardware description ==================== The hardware requires serial or i2c connection, power supply, clock and reset line. In case xLNA is available, xLNA must be also configured. Software description ==================== When configured, the driver initializes GPIOs, clock, and power supplies for proper chip operation. Typical scenario: * Configure Reset GPIO * Configure RTC clock GPIO/power supply * Configure xLNA power supply * Configure qca1530 chip power supply After successful loading, the driver exports chip control functionality to user space (described below). In case of configuration error, driver releases acquired resources and fails to load. In case of error while performing service call from user space, driver signals error condition to client application. Design ====== Design goal is to provide flexible driver that can adapt to various hardware platforms and provide stable user space control interface for the following tasks: * Controlling reset * Controlling power * Controlling RTC * Controlling xLNA The driver uses ARM DTS configuration for all items except RTC. The following APIs are used: * Power regulator consumer API * GPIO API * Clock consumer API * sysfs Power Management ================ Driver can control power for the following components: * qca1530 chip * RTCs * xLNA When loading, driver configures and turns on power supply for all components. User space software may alter power supplies via interface. Interface ========= User with sufficient priviledges can perform following tasks: * Control the reset line (on/off) * Control power supply (on/off) * Control RTC (on/off) * Control xLNA (on/off) * Query status of any of the controlled items The following sysfs nodes are provided at /sys/class/gnss/qca1530: reset: This node is used to control and query the chip reset state. Valid values are: 0 - reset is off, 1 - reset is on. power: This node is used to control and query the chip power supply. Possible values are: 0 - off, 1 - on. rtc: This node is used to control and query RTC clock (SLEEP_CLK) and TCXO inputs. Possible values are: 0 - off, 1 - on. xlna: This node is used to control and query xLNA facility. Possible values are: 0 - off, 1 - on. If the control for particular item is not available, the respective sysfs node is not present. Driver parameters ================= No module or kernel command line parameters supported. Config options ============== This driver is enabled using the CONFIG_QCA1530 kernel config option. Dependencies ============ In case required, GPIO, RTC and Power Regulator modules must be present. To do ===== * Separate driver into platform-specific option and userspace interface part. Platform-specific part will contain platform integration code and provide internal interface for controlling qca1530. The common part will contain user space interface implementation. * Add voltage/current control options. Currently driver expects power supply to be preconfigured with proper voltage and current options. For better power management the driver will also need to support entering low-power mode. * Add clock configuration support via DTS.
Documentation/devicetree/bindings/platform/msm/qca1530.txt 0 → 100644 +26 −0 Original line number Diff line number Diff line QCA1530 SoC QCA1530 is a SoC for position determination using navigation satellites. Typical scenario includes usage of GPS and GLONASS satellite navigation systems. Required properties - compatible: "qca,qca1530" Optional properties - qca,pwr-supply: handle to the regulator device tree node - qca,pwr-gpio: handle the power control using GPIO interface - qca,reset-gpio: GPIO for reset control - qca,reset-supply: handle to the regulator for reset control - qca,clk-gpio: handle the clock control using GPIO interface - qca,xlna-supply: handle to the regulator for xLNA - qca,xlna-gpio: handle to xLNA power control using GPIO interface Example: gnss_qca1530: qca,qca1530{ compatible = "qca,qca1530"; qca,pwr-supply = <&pma8084_l26>; /* Power regulator */ qca,reset-gpio = <&msmgpio 128 0>; /* Reset line */ };
arch/arm/mach-msm/board-8084.c +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ static struct of_dev_auxdata apq8084_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("qcom,sdhci-msm", 0xF9824900, "msm_sdcc.1", NULL), OF_DEV_AUXDATA("qcom,msm-sdcc", 0xF98A4000, "msm_sdcc.2", NULL), OF_DEV_AUXDATA("qcom,sdhci-msm", 0xF98A4900, "msm_sdcc.2", NULL), OF_DEV_AUXDATA("qcom,qca1530", 0x00000000, "qca1530.1", NULL), OF_DEV_AUXDATA("qca,qca1530", 0x00000000, "qca1530.1", NULL), OF_DEV_AUXDATA("qcom,ufshc", 0xFC594000, "msm_ufs.1", NULL), OF_DEV_AUXDATA("qcom,xhci-msm-hsic", 0xf9c00000, "msm_hsic_host", NULL), OF_DEV_AUXDATA("qcom,msm_pcie", 0xFC520000, "msm_pcie", NULL), Loading
arch/arm/mach-msm/clock-8084.c +1 −1 Original line number Diff line number Diff line Loading @@ -6581,7 +6581,7 @@ static struct clk_lookup apq_clocks_8084[] = { CLK_LOOKUP("pcie_1_ldo", pcie_1_phy_ldo.c, "msm_pcie"), CLK_LOOKUP("", sata_phy_ldo.c, ""), CLK_LOOKUP("rtc_clk", div_clk3.c, "qca1530.1"), CLK_LOOKUP("qca,rtc_clk", div_clk3.c, "qca1530.1"), }; static struct pll_config_regs mmpll0_regs __initdata = { Loading
drivers/platform/msm/Kconfig +14 −0 Original line number Diff line number Diff line Loading @@ -130,4 +130,18 @@ config SSM This driver uses Secure Channel Manager interface for trustzone communication and communicates with modem over SMD channel. config QCA1530 tristate "QCA1530 SoC GNSS Driver" depends on REGULATOR && OF depends on GPIOLIB && OF_GPIO depends on CLKDEV_LOOKUP help Say Y here to include support for QCA1530 SOC chip. QCA1530 chip enables support for GPS- and GLONASS-based position determination. To compile this driver as a module, choose M here: the module will be called qca1530. endmenu