Add core MSM8956/76 SoC support drivers
Subsystems (9)
cover Add core MSM8956/76 SoC support drivers
From: AngeloGioacchino Del Regno <[email protected]>
This patch series adds support for the core components that are required to run the MSM8956 (and MSM8976) SoCs, such as pinctrl, GCC clocks, RPM power domains.
The personal aim is to upstream MSM8956 as much as possible.
This code has been tested on two Sony phones featuring the Qualcomm MSM8956 SoC.
Angelo G. Del Regno (5):
pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956
clk: qcom: Add MSM8976/56 Global Clock Controller (GCC) driver
soc: qcom: smd-rpm: Add MSM8976 compatible
dt-bindings: power: Add missing rpmpd smd performance level
soc: qcom: rpmpd: Add rpm power domains for msm8956
.../devicetree/bindings/clock/qcom,gcc.txt | 1 + .../bindings/pinctrl/qcom,msm8976-pinctrl.txt | 183 + .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + .../bindings/soc/qcom/qcom,smd-rpm.txt | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-msm8976.c | 4215 +++++++++++++++++ drivers/pinctrl/qcom/Kconfig | 10 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8976.c | 1128 +++++ drivers/soc/qcom/rpmpd.c | 23 + drivers/soc/qcom/smd-rpm.c | 1 + include/dt-bindings/clock/qcom,gcc-msm8976.h | 293 ++ include/dt-bindings/power/qcom-rpmpd.h | 9 + 14 files changed, 5875 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt create mode 100644 drivers/clk/qcom/gcc-msm8976.c create mode 100644 drivers/pinctrl/qcom/pinctrl-msm8976.c create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8976.h
Signature · 1 line
2.21.0
PATCH 3/5 soc: qcom: smd-rpm: Add MSM8976 compatible
From: "Angelo G. Del Regno" <[email protected]>
Add a compatible for the RPM on the Qualcomm MSM8976 platform:
this is also valid for MSM8956 and their APQ variants.
--- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 1 + drivers/soc/qcom/smd-rpm.c | 1 + 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt +1 -0
@@ -22,6 +22,7 @@ resources. "qcom,rpm-apq8084" "qcom,rpm-msm8916" "qcom,rpm-msm8974" + "qcom,rpm-msm8976" "qcom,rpm-msm8998" "qcom,rpm-sdm660" "qcom,rpm-qcs404"
drivers/soc/qcom/smd-rpm.c +1 -0
@@ -217,6 +217,7 @@ static const struct of_device_id qcom_smd_rpm_of_match[] = { { .compatible = "qcom,rpm-apq8084" }, { .compatible = "qcom,rpm-msm8916" }, { .compatible = "qcom,rpm-msm8974" }, + { .compatible = "qcom,rpm-msm8976" }, { .compatible = "qcom,rpm-msm8996" }, { .compatible = "qcom,rpm-msm8998" }, { .compatible = "qcom,rpm-sdm660" },
Signature · 1 line
2.21.0
PATCH 4/5 dt-bindings: power: Add missing rpmpd smd performance level
In reply to [email protected]From: "Angelo G. Del Regno" <[email protected]>
The RPM_SMD_LEVEL_TURBO_HIGH is used by MSM8956/8976 and APQ variants:
add the definition.
--- include/dt-bindings/power/qcom-rpmpd.h | 1 + 1 file changed, 1 insertion(+)
include/dt-bindings/power/qcom-rpmpd.h +1 -0
@@ -68,6 +68,7 @@#define RPM_SMD_LEVEL_NOM_PLUS 320#define RPM_SMD_LEVEL_TURBO 384#define RPM_SMD_LEVEL_TURBO_NO_CPR 416 +#define RPM_SMD_LEVEL_TURBO_HIGH 448#define RPM_SMD_LEVEL_BINNING 512#endif
Signature · 1 line
2.21.0
PATCH 5/5 soc: qcom: rpmpd: Add rpm power domains for msm8956
In reply to [email protected]From: "Angelo G. Del Regno" <[email protected]>
The MSM8956 SoC has two main voltage-level power domains, VDD_CX and VDD_MX, which also have their own voltage-floor-level (VFL) corner.
--- .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + drivers/soc/qcom/rpmpd.c | 23 +++++++++++++++++++ include/dt-bindings/power/qcom-rpmpd.h | 8 +++++++ 3 files changed, 32 insertions(+)
Documentation/devicetree/bindings/power/qcom,rpmpd.txt +1 -0
@@ -5,6 +5,7 @@ which then translates it into a corresponding voltage on a rail Required Properties: - compatible: Should be one of the following + * qcom,msm8956-rpmpd: RPM Power domain for the msm8956 family of SoC * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC * qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC
drivers/soc/qcom/rpmpd.c +23 -0
@@ -115,6 +115,28 @@ struct rpmpd_desc {static DEFINE_MUTEX (rpmpd_lock); +/* msm8956 RPM Power Domains */ +DEFINE_RPMPD_PAIR (msm8956, vddcx, vddcx_ao,SMPA ,LEVEL ,2 ); +DEFINE_RPMPD_PAIR (msm8956, vddmx, vddmx_ao,SMPA ,LEVEL ,6 ); + +DEFINE_RPMPD_VFL (msm8956, vddcx_vfl,RWSC ,2 ); +DEFINE_RPMPD_VFL (msm8956, vddmx_vfl,RWSM ,6 ); + +static struct rpmpd *msm8956_rpmpds[] = { + [MSM8956_VDDCX ] = &msm8956_vddcx, + [MSM8956_VDDCX_AO ] = &msm8956_vddcx_ao, + [MSM8956_VDDCX_VFL ] = &msm8956_vddcx_vfl, + [MSM8956_VDDMX ] = &msm8956_vddmx, + [MSM8956_VDDMX_AO ] = &msm8956_vddmx_ao, + [MSM8956_VDDMX_VFL ] = &msm8956_vddmx_vfl, +}; + +static const struct rpmpd_desc msm8956_desc = { + .rpmpds = msm8956_rpmpds, + .num_pds =ARRAY_SIZE (msm8956_rpmpds), + .max_state =RPM_SMD_LEVEL_TURBO_HIGH , +}; +/* msm8996 RPM Power domains */ DEFINE_RPMPD_PAIR (msm8996, vddcx, vddcx_ao,SMPA ,CORNER ,1 );DEFINE_RPMPD_PAIR (msm8996, vddmx, vddmx_ao,SMPA ,CORNER ,2 );
@@ -198,6 +220,7 @@ static const struct rpmpd_desc qcs404_desc = { };static const struct of_device_id rpmpd_match_table[] = { + { .compatible ="qcom,msm8956-rpmpd" , .data = &msm8956_desc }, { .compatible ="qcom,msm8996-rpmpd" , .data = &msm8996_desc }, { .compatible ="qcom,msm8998-rpmpd" , .data = &msm8998_desc }, { .compatible ="qcom,qcs404-rpmpd" , .data = &qcs404_desc },
include/dt-bindings/power/qcom-rpmpd.h +8 -0
@@ -27,6 +27,14 @@#define RPMH_REGULATOR_LEVEL_TURBO 384#define RPMH_REGULATOR_LEVEL_TURBO_L1 416 +/* MSM8956 Power Domain Indexes */ +#define MSM8956_VDDCX 0 +#define MSM8956_VDDCX_AO 1 +#define MSM8956_VDDCX_VFL 2 +#define MSM8956_VDDMX 3 +#define MSM8956_VDDMX_AO 4 +#define MSM8956_VDDMX_VFL 5 +/* MSM8996 Power Domain Indexes */ #define MSM8996_VDDCX 0#define MSM8996_VDDCX_AO 1
Signature · 1 line
2.21.0
PATCH 1/5 pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956
In reply to [email protected]From: "Angelo G. Del Regno" <[email protected]>
Add the pinctrl driver to support pin configuration with the pinctrl framework on MSM8976, MSM8956, APQ8056, APQ8076.
--- .../bindings/pinctrl/qcom,msm8976-pinctrl.txt | 183 +++ drivers/pinctrl/qcom/Kconfig | 10 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8976.c | 1128 +++++++++++++++++ 4 files changed, 1322 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt create mode 100644 drivers/pinctrl/qcom/pinctrl-msm8976.c
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +183 -0
@@ -0,0 +1,183 @@ +Qualcomm MSM8976 TLMM block + +This binding describes the Top Level Mode Multiplexer block found in the +MSM8956 and MSM8976 platforms. + +- compatible: + Usage: required + Value type: <string> + Definition: must be "qcom,msm8976-pinctrl" + +- reg: + Usage: required + Value type: <prop-encoded-array> + Definition: the base address and size of the TLMM register space. + +- interrupts: + Usage: required + Value type: <prop-encoded-array> + Definition: should specify the TLMM summary IRQ. + +- interrupt-controller: + Usage: required + Value type: <none> + Definition: identifies this node as an interrupt controller + +- #interrupt-cells: + Usage: required + Value type: <u32> + Definition: must be 2. Specifying the pin number and flags, as defined + in <dt-bindings/interrupt-controller/irq.h> + +- gpio-controller: + Usage: required + Value type: <none> + Definition: identifies this node as a gpio controller + +- #gpio-cells: + Usage: required + Value type: <u32> + Definition: must be 2. Specifying the pin number and flags, as defined + in <dt-bindings/gpio/gpio.h> + +- gpio-ranges: + Usage: required + Definition: see ../gpio/gpio.txt + +- gpio-reserved-ranges: + Usage: optional + Definition: see ../gpio/gpio.txt + +Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for +a general description of GPIO and interrupt bindings. + +Please refer to pinctrl-bindings.txt in this directory for details of the +common pinctrl bindings used by client devices, including the meaning of the +phrase "pin configuration node". + +The pin configuration nodes act as a container for an arbitrary number of +subnodes. Each of these subnodes represents some desired configuration for a +pin, a group, or a list of pins or groups. This configuration can include the +mux function to select on those pin(s)/group(s), and various pin configuration +parameters, such as pull-up, drive strength, etc. + + +PIN CONFIGURATION NODES: + +The name of each subnode is not important; all subnodes should be enumerated +and processed purely based on their content. + +Each subnode only affects those parameters that are explicitly listed. In +other words, a subnode that lists a mux function but no pin configuration +parameters implies no information about any pin configuration parameters. +Similarly, a pin subnode that describes a pullup parameter implies no +information about e.g. the mux function. + + +The following generic properties as defined in pinctrl-bindings.txt are valid +to specify in a pin configuration subnode: + +- pins: + Usage: required + Value type: <string-array> + Definition: List of gpio pins affected by the properties specified in + this subnode. + + Valid pins are: + gpio0-gpio145 + Supports mux, bias and drive-strength + + sdc1_clk, sdc1_cmd, sdc1_data, + sdc2_clk, sdc2_cmd, sdc2_data, + sdc3_clk, sdc3_cmd, sdc3_data + Supports bias and drive-strength + +- function: + Usage: required + Value type: <string> + Definition: Specify the alternative function to be configured for the + specified pins. Functions are only valid for gpio pins. + Valid values are: + + gpio, blsp_uart1, blsp_spi1, smb_int, blsp_i2c1, blsp_spi2, + blsp_uart2, blsp_i2c2, gcc_gp1_clk_b, blsp_spi3, + qdss_tracedata_b, blsp_i2c3, gcc_gp2_clk_b, gcc_gp3_clk_b, + blsp_spi4, cap_int, blsp_i2c4, blsp_spi5, blsp_uart5, + qdss_traceclk_a, m_voc, blsp_i2c5, qdss_tracectl_a, + qdss_tracedata_a, blsp_spi6, blsp_uart6, qdss_tracectl_b, + blsp_i2c6, qdss_traceclk_b, mdp_vsync, pri_mi2s_mclk_a, + sec_mi2s_mclk_a, cam_mclk, cci0_i2c, cci1_i2c, blsp1_spi, + blsp3_spi, gcc_gp1_clk_a, gcc_gp2_clk_a, gcc_gp3_clk_a, + uim_batt, sd_write, uim1_data, uim1_clk, uim1_reset, + uim1_present, uim2_data, uim2_clk, uim2_reset, + uim2_present, ts_xvdd, mipi_dsi0, us_euro, ts_resout, + ts_sample, sec_mi2s_mclk_b, pri_mi2s, codec_reset, + cdc_pdm0, us_emitter, pri_mi2s_mclk_b, pri_mi2s_mclk_c, + lpass_slimbus, lpass_slimbus0, lpass_slimbus1, codec_int1, + codec_int2, wcss_bt, sdc3, wcss_wlan2, wcss_wlan1, + wcss_wlan0, wcss_wlan, wcss_fm, key_volp, key_snapshot, + key_focus, key_home, pwr_down, dmic0_clk, hdmi_int, + dmic0_data, wsa_vi, wsa_en, blsp_spi8, wsa_irq, blsp_i2c8, + pa_indicator, modem_tsync, ssbi_wtr1, gsm1_tx, gsm0_tx, + sdcard_det, sec_mi2s, ss_switch, + +- bias-disable: + Usage: optional + Value type: <none> + Definition: The specified pins should be configured as no pull. + +- bias-pull-down: + Usage: optional + Value type: <none> + Definition: The specified pins should be configured as pull down. + +- bias-pull-up: + Usage: optional + Value type: <none> + Definition: The specified pins should be configured as pull up. + +- output-high: + Usage: optional + Value type: <none> + Definition: The specified pins are configured in output mode, driven + high. + Not valid for sdc pins. + +- output-low: + Usage: optional + Value type: <none> + Definition: The specified pins are configured in output mode, driven + low. + Not valid for sdc pins. + +- drive-strength: + Usage: optional + Value type: <u32> + Definition: Selects the drive strength for the specified pins, in mA. + Valid values are: 2, 4, 6, 8, 10, 12, 14 and 16 + +Example: + + tlmm: pinctrl@1000000 { + compatible = "qcom,msm8976-pinctrl"; + reg = <0x1000000 0x300000>; + interrupts = <0 208 0>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&tlmm 0 0 145>; + interrupt-controller; + #interrupt-cells = <2>; + + blsp1_uart2_active: blsp1_uart2_active { + mux { + pins = "gpio4", "gpio5", "gpio6", "gpio7"; + function = "blsp_uart2"; + }; + + config { + pins = "gpio4", "gpio5", "gpio6", "gpio7"; + drive-strength = <2>; + bias-disable; + }; + }; + };
drivers/pinctrl/qcom/Kconfig +10 -0
@@ -90,6 +90,16 @@ config PINCTRL_MSM8916 This is the pinctrl, pinmux, pinconf and gpiolib driver for the Qualcomm TLMM block found on the Qualcomm 8916 platform. +config PINCTRL_MSM8976 + tristate "Qualcomm 8976 pin controller driver" + depends on GPIOLIB && OF + select PINCTRL_MSM + help + This is the pinctrl, pinmux, pinconf and gpiolib driver for the + Qualcomm TLMM block found on the Qualcomm MSM8976 platform. + The Qualcomm MSM8956, APQ8056, APQ8076 platforms are also + supported by this driver. + config PINCTRL_MSM8994 tristate "Qualcomm 8994 pin controller driver" depends on GPIOLIB && OF
drivers/pinctrl/qcom/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_PINCTRL_MSM8660) += pinctrl-msm8660.o obj-$(CONFIG_PINCTRL_MSM8960) += pinctrl-msm8960.o obj-$(CONFIG_PINCTRL_MSM8X74) += pinctrl-msm8x74.o obj-$(CONFIG_PINCTRL_MSM8916) += pinctrl-msm8916.o +obj-$(CONFIG_PINCTRL_MSM8976) += pinctrl-msm8976.o obj-$(CONFIG_PINCTRL_MSM8994) += pinctrl-msm8994.o obj-$(CONFIG_PINCTRL_MSM8996) += pinctrl-msm8996.o obj-$(CONFIG_PINCTRL_MSM8998) += pinctrl-msm8998.o
drivers/pinctrl/qcom/pinctrl-msm8976.c new file +1128 -0
1,128 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH 2/5 clk: qcom: Add MSM8976/56 Global Clock Controller (GCC) driver
In reply to [email protected]From: "Angelo G. Del Regno" <[email protected]>
Add support for the global clock controller found on MSM8976 and MSM8976 SoCs.
Since the multimedia clocks are actually in the GCC on these SoCs, this will allow drivers to probe and control basically all the required clocks.
--- .../devicetree/bindings/clock/qcom,gcc.txt | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-msm8976.c | 4215 +++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8976.h | 293 ++ 5 files changed, 4518 insertions(+) create mode 100644 drivers/clk/qcom/gcc-msm8976.c create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8976.h
Documentation/devicetree/bindings/clock/qcom,gcc.txt +1 -0
@@ -15,6 +15,7 @@ Required properties : "qcom,gcc-msm8974" "qcom,gcc-msm8974pro" "qcom,gcc-msm8974pro-ac" + "qcom,gcc-msm8976" "qcom,gcc-msm8994" "qcom,gcc-msm8996" "qcom,gcc-msm8998"
drivers/clk/qcom/Kconfig +8 -0
@@ -190,6 +190,14 @@ config MSM_MMCC_8974 Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. +config MSM_GCC_8976 + tristate "MSM8956/76 Global Clock Controller" + select QCOM_GDSC + help + Support for the global clock controller on msm8956/76 devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, SD/eMMC, display, graphics, camera etc. + config MSM_GCC_8994 tristate "MSM8994 Global Clock Controller" help
drivers/clk/qcom/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o +obj-$(CONFIG_MSM_GCC_8976) += gcc-msm8976.o obj-$(CONFIG_MSM_GCC_8994) += gcc-msm8994.o obj-$(CONFIG_MSM_GCC_8996) += gcc-msm8996.o obj-$(CONFIG_MSM_LCC_8960) += lcc-msm8960.o
drivers/clk/qcom/gcc-msm8976.c new file +4215 -0
2,972 lines not on this page · raw message
include/dt-bindings/clock/qcom,gcc-msm8976.h new file +293 -0
293 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH 1/5] pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956
In reply to [email protected]Hi Angelo!
Thanks for your patch!
Quoted 6 lines · On Sat, Sep 21, 2019 at 12:12 PM <[email protected]> wrote:
From: "Angelo G. Del Regno" <[email protected]>
Add the pinctrl driver to support pin configuration with the pinctrl framework on MSM8976, MSM8956, APQ8056, APQ8076.
Signed-off-by Angelo G. Del Regno <[email protected]>
This changes device tree bindings so you need to Cc [email protected].
Usually they want the device tree changes in a separate patch.
It'd be great if I can apply the pinctrl patches separately from the rest of the series.
Also I need Bjorn's review on it first.
Yours,
Linus Walleij
Re: [PATCH 1/5] pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956
In reply to [email protected]Quoted 21 lines · On Sat 21 Sep 03:12 PDT 2019, [email protected] wrote:
From: "Angelo G. Del Regno" <[email protected]>
Add the pinctrl driver to support pin configuration with the pinctrl framework on MSM8976, MSM8956, APQ8056, APQ8076.
Signed-off-by Angelo G. Del Regno <[email protected]>--- .../bindings/pinctrl/qcom,msm8976-pinctrl.txt | 183 +++ drivers/pinctrl/qcom/Kconfig | 10 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8976.c | 1128 +++++++++++++++++ 4 files changed, 1322 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt create mode 100644 drivers/pinctrl/qcom/pinctrl-msm8976.cDocumentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +0
-0
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt line 1
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +1
-0@@ -0,0 +1,183 @@ +Qualcomm MSM8976 TLMM block
As Linus indicated, please send your the DT bindings in separate patches.
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +1
-0+
[..]
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt line 164
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +6
-0+Example: + + tlmm: pinctrl@1000000 { + compatible = "qcom,msm8976-pinctrl"; + reg = <0x1000000 0x300000>; + interrupts = <0 208 0>;
<GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>
Quoted 20 lines
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +19
-0+ gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&tlmm 0 0 145>; + interrupt-controller; + #interrupt-cells = <2>; + + blsp1_uart2_active: blsp1_uart2_active { + mux { + pins = "gpio4", "gpio5", "gpio6", "gpio7"; + function = "blsp_uart2"; + }; + + config { + pins = "gpio4", "gpio5", "gpio6", "gpio7"; + drive-strength = <2>; + bias-disable; + }; + }; + };drivers/pinctrl/qcom/Kconfig +0
-0
[..]
drivers/pinctrl/qcom/Kconfig
Quoted 4 lines
drivers/pinctrl/qcom/Kconfig +4
-0+static struct platform_driver msm8976_pinctrl_driver = { + .driver = { + .name = "msm8976-pinctrl", + .owner = THIS_MODULE,
No need to specify .onwer on platform_drivers anymore.
Apart from that, I think this patch looks good.
Regards,
Bjorn
Bjorn Andersson
AppliedRe: [PATCH 3/5] soc: qcom: smd-rpm: Add MSM8976 compatible
In reply to [email protected]Quoted 6 lines · On Sat 21 Sep 03:12 PDT 2019, [email protected] wrote:
From: "Angelo G. Del Regno" <[email protected]>
Add a compatible for the RPM on the Qualcomm MSM8976 platform:
this is also valid for MSM8956 and their APQ variants.Signed-off-by Angelo G. Del Regno <[email protected]>
Applied
Thanks,
Bjorn
Quoted 32 lines
--- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 1 + drivers/soc/qcom/smd-rpm.c | 1 + 2 files changed, 2 insertions(+)Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt +1
-0@@ -22,6 +22,7 @@ resources. "qcom,rpm-apq8084" "qcom,rpm-msm8916" "qcom,rpm-msm8974" + "qcom,rpm-msm8976" "qcom,rpm-msm8998" "qcom,rpm-sdm660" "qcom,rpm-qcs404"drivers/soc/qcom/smd-rpm.c +1
-0@@ -217,6 +217,7 @@ static const struct of_device_id qcom_smd_rpm_of_match[] = { { .compatible = "qcom,rpm-apq8084" }, { .compatible = "qcom,rpm-msm8916" }, { .compatible = "qcom,rpm-msm8974" }, + { .compatible = "qcom,rpm-msm8976" }, { .compatible = "qcom,rpm-msm8996" }, { .compatible = "qcom,rpm-msm8998" }, { .compatible = "qcom,rpm-sdm660" },Signature · 1 line
2.21.0
Re: [PATCH 5/5] soc: qcom: rpmpd: Add rpm power domains for msm8956
In reply to [email protected]Quoted 7 lines · On Sat 21 Sep 03:12 PDT 2019, [email protected] wrote:
From: "Angelo G. Del Regno" <[email protected]>
The MSM8956 SoC has two main voltage-level power domains,
VDD_CXandVDD_MX, which also have their own voltage-floor-level (VFL) corner.Signed-off-by Angelo G. Del Regno <[email protected]>
I was under the impression that 8956/76 can be used interchangeably, if so I would prefer if you pick one (8976 as that seems to be your common choice) and stick with that.
If not, I think it would be nice if all bindings came with both compatibles.
Regards,
Bjorn
Quoted 81 lines
--- .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + drivers/soc/qcom/rpmpd.c | 23 +++++++++++++++++++ include/dt-bindings/power/qcom-rpmpd.h | 8 +++++++ 3 files changed, 32 insertions(+)Documentation/devicetree/bindings/power/qcom,rpmpd.txt +1
-0@@ -5,6 +5,7 @@ which then translates it into a corresponding voltage on a rail Required Properties: - compatible: Should be one of the following + * qcom,msm8956-rpmpd: RPM Power domain for the msm8956 family of SoC * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC * qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoCdrivers/soc/qcom/rpmpd.c +23
-0@@ -115,6 +115,28 @@ struct rpmpd_desc {static DEFINE_MUTEX (rpmpd_lock); +/* msm8956 RPM Power Domains */ +DEFINE_RPMPD_PAIR (msm8956, vddcx, vddcx_ao,SMPA ,LEVEL ,2 ); +DEFINE_RPMPD_PAIR (msm8956, vddmx, vddmx_ao,SMPA ,LEVEL ,6 ); + +DEFINE_RPMPD_VFL (msm8956, vddcx_vfl,RWSC ,2 ); +DEFINE_RPMPD_VFL (msm8956, vddmx_vfl,RWSM ,6 ); + +static struct rpmpd *msm8956_rpmpds[] = { + [MSM8956_VDDCX ] = &msm8956_vddcx, + [MSM8956_VDDCX_AO ] = &msm8956_vddcx_ao, + [MSM8956_VDDCX_VFL ] = &msm8956_vddcx_vfl, + [MSM8956_VDDMX ] = &msm8956_vddmx, + [MSM8956_VDDMX_AO ] = &msm8956_vddmx_ao, + [MSM8956_VDDMX_VFL ] = &msm8956_vddmx_vfl, +}; + +static const struct rpmpd_desc msm8956_desc = { + .rpmpds = msm8956_rpmpds, + .num_pds =ARRAY_SIZE (msm8956_rpmpds), + .max_state =RPM_SMD_LEVEL_TURBO_HIGH , +}; +/* msm8996 RPM Power domains */ DEFINE_RPMPD_PAIR (msm8996, vddcx, vddcx_ao,SMPA ,CORNER ,1 );DEFINE_RPMPD_PAIR (msm8996, vddmx, vddmx_ao,SMPA ,CORNER ,2 );@@ -198,6 +220,7 @@ static const struct rpmpd_desc qcs404_desc = { };static const struct of_device_id rpmpd_match_table[] = { + { .compatible ="qcom,msm8956-rpmpd" , .data = &msm8956_desc }, { .compatible ="qcom,msm8996-rpmpd" , .data = &msm8996_desc }, { .compatible ="qcom,msm8998-rpmpd" , .data = &msm8998_desc }, { .compatible ="qcom,qcs404-rpmpd" , .data = &qcs404_desc },include/dt-bindings/power/qcom-rpmpd.h +8
-0@@ -27,6 +27,14 @@#define RPMH_REGULATOR_LEVEL_TURBO 384#define RPMH_REGULATOR_LEVEL_TURBO_L1 416 +/* MSM8956 Power Domain Indexes */ +#define MSM8956_VDDCX 0 +#define MSM8956_VDDCX_AO 1 +#define MSM8956_VDDCX_VFL 2 +#define MSM8956_VDDMX 3 +#define MSM8956_VDDMX_AO 4 +#define MSM8956_VDDMX_VFL 5 +/* MSM8996 Power Domain Indexes */ #define MSM8996_VDDCX 0#define MSM8996_VDDCX_AO 1Signature · 1 line
2.21.0
Bjorn Andersson
AppliedRe: [PATCH 4/5] dt-bindings: power: Add missing rpmpd smd performance level
In reply to [email protected]Quoted 6 lines · On Sat 21 Sep 03:12 PDT 2019, [email protected] wrote:
From: "Angelo G. Del Regno" <[email protected]>
The
RPM_SMD_LEVEL_TURBO_HIGHis used by MSM8956/8976 and APQ variants:
add the definition.Signed-off-by Angelo G. Del Regno <[email protected]>
Applied
Thanks,
Bjorn
Quoted 19 lines
--- include/dt-bindings/power/qcom-rpmpd.h | 1 + 1 file changed, 1 insertion(+)include/dt-bindings/power/qcom-rpmpd.h +1
-0@@ -68,6 +68,7 @@#define RPM_SMD_LEVEL_NOM_PLUS 320#define RPM_SMD_LEVEL_TURBO 384#define RPM_SMD_LEVEL_TURBO_NO_CPR 416 +#define RPM_SMD_LEVEL_TURBO_HIGH 448#define RPM_SMD_LEVEL_BINNING 512#endif Signature · 1 line
2.21.0
Re: [PATCH 1/5] pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956
In reply to Bjorn AnderssonIl giorno sab 5 ott 2019 alle ore 05:59 Bjorn Andersson <[email protected]> ha scritto:
Quoted 66 lines · On Sat 21 Sep 03:12 PDT 2019, [email protected] wrote:
Quoted 22 lines
From: "Angelo G. Del Regno" <[email protected]>
Add the pinctrl driver to support pin configuration with the pinctrl framework on MSM8976, MSM8956, APQ8056, APQ8076.
Signed-off-by Angelo G. Del Regno <[email protected]>--- .../bindings/pinctrl/qcom,msm8976-pinctrl.txt | 183 +++ drivers/pinctrl/qcom/Kconfig | 10 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8976.c | 1128 +++++++++++++++++ 4 files changed, 1322 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt create mode 100644 drivers/pinctrl/qcom/pinctrl-msm8976.cDocumentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +0
-0Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt line 1
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +1
-0@@ -0,0 +1,183 @@ +Qualcomm MSM8976 TLMM blockAs Linus indicated, please send your the DT bindings in separate patches.
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +1
-0+[..]
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt line 164
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +6
-0+Example: + + tlmm: pinctrl@1000000 { + compatible = "qcom,msm8976-pinctrl"; + reg = <0x1000000 0x300000>; + interrupts = <0 208 0>;<
GIC_SPI208IRQ_TYPE_LEVEL_HIGH>Quoted 20 lines
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt new file +19
-0+ gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&tlmm 0 0 145>; + interrupt-controller; + #interrupt-cells = <2>; + + blsp1_uart2_active: blsp1_uart2_active { + mux { + pins = "gpio4", "gpio5", "gpio6", "gpio7"; + function = "blsp_uart2"; + }; + + config { + pins = "gpio4", "gpio5", "gpio6", "gpio7"; + drive-strength = <2>; + bias-disable; + }; + }; + };drivers/pinctrl/qcom/Kconfig +0
-0[..]
drivers/pinctrl/qcom/Kconfig
Quoted 4 lines
drivers/pinctrl/qcom/Kconfig +4
-0+static struct platform_driver msm8976_pinctrl_driver = { + .driver = { + .name = "msm8976-pinctrl", + .owner = THIS_MODULE,
Quoted 7 lines
No need to specify .onwer on
platform_driversanymore.Apart from that, I think this patch looks good.
Regards,
Bjorn
Thanks guys for the review.
Well, I did it in one patch after seeing this practice on other patches, so I thought to replicate,
despite the well known rule... but yeah, of course, there's absolutely no problem, I'll send the
two separate patches in a separate series and I'll do the same for the GCC driver as well,
which doesn't seem that it got sent to the list for some obscure reason.
About the requested changes... sure, I will apply them and resend ASAP.
Thanks again!
Re: [PATCH 5/5] soc: qcom: rpmpd: Add rpm power domains for msm8956
In reply to Bjorn AnderssonIl giorno sab 5 ott 2019 alle ore 06:26 Bjorn Andersson <[email protected]> ha scritto:
Quoted 88 lines · On Sat 21 Sep 03:12 PDT 2019, [email protected] wrote:
Quoted 8 lines
From: "Angelo G. Del Regno" <[email protected]>
The MSM8956 SoC has two main voltage-level power domains,
VDD_CXandVDD_MX, which also have their own voltage-floor-level (VFL) corner.Signed-off-by Angelo G. Del Regno <[email protected]>I was under the impression that 8956/76 can be used interchangeably, if so I would prefer if you pick one (8976 as that seems to be your common choice) and stick with that.
If not, I think it would be nice if all bindings came with both compatibles.
Regards,
BjornQuoted 67 lines
--- .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + drivers/soc/qcom/rpmpd.c | 23 +++++++++++++++++++ include/dt-bindings/power/qcom-rpmpd.h | 8 +++++++ 3 files changed, 32 insertions(+)Documentation/devicetree/bindings/power/qcom,rpmpd.txt +1
-0@@ -5,6 +5,7 @@ which then translates it into a corresponding voltage on a rail Required Properties: - compatible: Should be one of the following + * qcom,msm8956-rpmpd: RPM Power domain for the msm8956 family of SoC * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC * qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoCdrivers/soc/qcom/rpmpd.c +23
-0@@ -115,6 +115,28 @@ struct rpmpd_desc {static DEFINE_MUTEX (rpmpd_lock); +/* msm8956 RPM Power Domains */ +DEFINE_RPMPD_PAIR (msm8956, vddcx, vddcx_ao,SMPA ,LEVEL ,2 ); +DEFINE_RPMPD_PAIR (msm8956, vddmx, vddmx_ao,SMPA ,LEVEL ,6 ); + +DEFINE_RPMPD_VFL (msm8956, vddcx_vfl,RWSC ,2 ); +DEFINE_RPMPD_VFL (msm8956, vddmx_vfl,RWSM ,6 ); + +static struct rpmpd *msm8956_rpmpds[] = { + [MSM8956_VDDCX ] = &msm8956_vddcx, + [MSM8956_VDDCX_AO ] = &msm8956_vddcx_ao, + [MSM8956_VDDCX_VFL ] = &msm8956_vddcx_vfl, + [MSM8956_VDDMX ] = &msm8956_vddmx, + [MSM8956_VDDMX_AO ] = &msm8956_vddmx_ao, + [MSM8956_VDDMX_VFL ] = &msm8956_vddmx_vfl, +}; + +static const struct rpmpd_desc msm8956_desc = { + .rpmpds = msm8956_rpmpds, + .num_pds =ARRAY_SIZE (msm8956_rpmpds), + .max_state =RPM_SMD_LEVEL_TURBO_HIGH , +}; +/* msm8996 RPM Power domains */ DEFINE_RPMPD_PAIR (msm8996, vddcx, vddcx_ao,SMPA ,CORNER ,1 );DEFINE_RPMPD_PAIR (msm8996, vddmx, vddmx_ao,SMPA ,CORNER ,2 );@@ -198,6 +220,7 @@ static const struct rpmpd_desc qcs404_desc = { };static const struct of_device_id rpmpd_match_table[] = { + { .compatible ="qcom,msm8956-rpmpd" , .data = &msm8956_desc }, { .compatible ="qcom,msm8996-rpmpd" , .data = &msm8996_desc }, { .compatible ="qcom,msm8998-rpmpd" , .data = &msm8998_desc }, { .compatible ="qcom,qcs404-rpmpd" , .data = &qcs404_desc },include/dt-bindings/power/qcom-rpmpd.h +0
-0@@ -27,6 +27,14 @@#define RPMH_REGULATOR_LEVEL_TURBO 384#define RPMH_REGULATOR_LEVEL_TURBO_L1 416
Quoted 14 lines
Quoted 12 lines
include/dt-bindings/power/qcom-rpmpd.h +8
-1+/* MSM8956 Power Domain Indexes */ +#define MSM8956_VDDCX 0 +#define MSM8956_VDDCX_AO 1 +#define MSM8956_VDDCX_VFL 2 +#define MSM8956_VDDMX 3 +#define MSM8956_VDDMX_AO 4 +#define MSM8956_VDDMX_VFL 5 +/* MSM8996 Power Domain Indexes */ #define MSM8996_VDDCX 0#define MSM8996_VDDCX_AO 1 --Quoted 2 lines
2.21.0
Yup. My brain stopped working for a minute on that patch :))) This is applicable to both MSM8956 and MSM8976... and the other drivers that I've sent are actually reporting a 8976 compatible, so, yes I'll resend that one as
8976 instead.