arm64: dts: imx8mn-ddr4-evk: Add i2c1 support
Subsystems (5)
PATCH RESEND v2 1/7 arm64: dts: imx8mn-ddr4-evk: Add i2c1 support
Enable i2c1 on i.MX8MN DDR4 EVK board.
---
No changes.
--- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts +14 -0
@@ -50,6 +50,13 @@ >; }; + pinctrl_i2c1: i2c1grp { + fsl,pins = < + MX8MN_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3 + MX8MN_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3 + >; + }; + pinctrl_reg_usdhc2_vmmc: regusdhc2vmmc { fsl,pins = < MX8MN_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
@@ -182,6 +189,13 @@ }; }; +&i2c1 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "okay"; +}; + &snvs_pwrkey { status = "okay"; };
Signature · 1 line
2.7.4
PATCH RESEND v2 2/7 arm64: dts: imx8mn-ddr4-evk: Add rohm,bd71847 PMIC support
On i.MX8MN DDR4 EVK board, there is a rohm,bd71847 PMIC on i2c1 bus, enable it.
---
No changes.
--- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts +109 -0
@@ -57,6 +57,12 @@ >; }; + pinctrl_pmic: pmicirq { + fsl,pins = < + MX8MN_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41 + >; + }; + pinctrl_reg_usdhc2_vmmc: regusdhc2vmmc { fsl,pins = < MX8MN_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
@@ -194,6 +200,109 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c1>; status = "okay"; + + pmic@4b { + compatible = "rohm,bd71847"; + reg = <0x4b>; + pinctrl-0 = <&pinctrl_pmic>; + interrupt-parent = <&gpio1>; + interrupts = <3 GPIO_ACTIVE_LOW>; + rohm,reset-snvs-powered; + + regulators { + buck1_reg: BUCK1 { + regulator-name = "BUCK1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1300000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <1250>; + }; + + buck2_reg: BUCK2 { + regulator-name = "BUCK2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1300000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <1250>; + }; + + buck3_reg: BUCK3 { + // BUCK5 in datasheet + regulator-name = "BUCK3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1350000>; + }; + + buck4_reg: BUCK4 { + // BUCK6 in datasheet + regulator-name = "BUCK4"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + buck5_reg: BUCK5 { + // BUCK7 in datasheet + regulator-name = "BUCK5"; + regulator-min-microvolt = <1605000>; + regulator-max-microvolt = <1995000>; + regulator-boot-on; + regulator-always-on; + }; + + buck6_reg: BUCK6 { + // BUCK8 in datasheet + regulator-name = "BUCK6"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1400000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1_reg: LDO1 { + regulator-name = "LDO1"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo2_reg: LDO2 { + regulator-name = "LDO2"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo3_reg: LDO3 { + regulator-name = "LDO3"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo4_reg: LDO4 { + regulator-name = "LDO4"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo6_reg: LDO6 { + regulator-name = "LDO6"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; }; &snvs_pwrkey {
Signature · 1 line
2.7.4
Shawn Guo
AppliedRe: [PATCH RESEND V2 2/7] arm64: dts: imx8mn-ddr4-evk: Add rohm,bd71847 PMIC support
Quoted 4 lines · Anson Huang
On i.MX8MN DDR4 EVK board, there is a rohm,bd71847 PMIC on i2c1 bus, enable it.
Signed-off-by Anson Huang <[email protected]>
Applied, thanks.
PATCH RESEND v2 3/7 cpufreq: Use imx-cpufreq-dt for i.MX8MN's speed grading
In reply to Anson HuangAdd i.MX8MN to blacklist, so that imx-cpufreq-dt driver can handle speed grading bits just like other i.MX8M SoCs.
---
No changes.
--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
@@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "fsl,imx7d", }, { .compatible = "fsl,imx8mq", }, { .compatible = "fsl,imx8mm", }, + { .compatible = "fsl,imx8mn", }, { .compatible = "marvell,armadaxp", },
Signature · 1 line
2.7.4
Re: [PATCH RESEND V2 3/7] cpufreq: Use imx-cpufreq-dt for i.MX8MN's speed grading
Quoted 16 lines · Anson Huang
Add i.MX8MN to blacklist, so that imx-cpufreq-dt driver can handle speed grading bits just like other i.MX8M SoCs.
Signed-off-by Anson Huang <[email protected]>Reviewed-by Leonard Crestez <[email protected]>---
No changes.--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+)drivers/cpufreq/cpufreq-dt-platdev.c +0
-0
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id blacklist[] __initconst = { · line 115
Quoted 7 lines
drivers/cpufreq/cpufreq-dt-platdev.c +1
-0@@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "fsl,imx7d", }, { .compatible = "fsl,imx8mq", }, { .compatible = "fsl,imx8mm", }, + { .compatible = "fsl,imx8mn", }, { .compatible = "marvell,armadaxp", },
Applied. Thanks.
Signature · 1 line
viresh
PATCH RESEND v2 4/7 cpufreq: imx-cpufreq-dt: Add i.MX8MN support
In reply to Anson Huangi.MX8MN has different speed grading definition as below, it has 4 bits to define speed grading, add support for it.
SPEED_GRADE[3:0] MHz
0000 2300
0001 2200
0010 2100
0011 2000
0100 1900
0101 1800
0110 1700
0111 1600
1000 1500
1001 1400
1010 1300
1011 1200
1100 1100
1101 1000
1110 900
1111 800---
No changes.
--- drivers/cpufreq/imx-cpufreq-dt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/cpufreq/imx-cpufreq-dt.c +7 -1
@@ -16,6 +16,7 @@#define OCOTP_CFG3_SPEED_GRADE_SHIFT 8#define OCOTP_CFG3_SPEED_GRADE_MASK (0x3 << 8) +#define IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK (0xf << 8)#define OCOTP_CFG3_MKT_SEGMENT_SHIFT 6#define OCOTP_CFG3_MKT_SEGMENT_MASK (0x3 << 6)
@@ -34,7 +35,12 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)if (ret)return ret; - speed_grade = (cell_value &OCOTP_CFG3_SPEED_GRADE_MASK ) >>OCOTP_CFG3_SPEED_GRADE_SHIFT ; +if (of_machine_is_compatible ("fsl,imx8mn" )) + speed_grade = (cell_value &IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK ) + >>OCOTP_CFG3_SPEED_GRADE_SHIFT ; +else + speed_grade = (cell_value &OCOTP_CFG3_SPEED_GRADE_MASK ) + >>OCOTP_CFG3_SPEED_GRADE_SHIFT ; mkt_segment = (cell_value &OCOTP_CFG3_MKT_SEGMENT_MASK ) >>OCOTP_CFG3_MKT_SEGMENT_SHIFT ;/*
Signature · 1 line
2.7.4
Re: [PATCH RESEND V2 4/7] cpufreq: imx-cpufreq-dt: Add i.MX8MN support
Quoted 21 lines · Anson Huang
i.MX8MN has different speed grading definition as below, it has 4 bits to define speed grading, add support for it.
SPEED_GRADE[3:0] MHz
0000 2300 0001 2200 0010 2100 0011 2000 0100 1900 0101 1800 0110 1700 0111 1600 1000 1500 1001 1400 1010 1300 1011 1200 1100 1100 1101 1000 1110 900 1111 800
Quoted 7 lines
Signed-off-by Anson Huang <[email protected]>Reviewed-by Leonard Crestez <[email protected]>---
No changes.--- drivers/cpufreq/imx-cpufreq-dt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Applied. Thanks.
Signature · 1 line
viresh
PATCH RESEND v2 5/7 clk: imx8mn: Add missing rate_count assignment for each PLL structure
In reply to Anson HuangAdd .rate_count assignment which is necessary for searching required PLL rate from the each PLL table.
---
Changes since V1:
- split the patch into 2 patches, #1 fixed those missing .rate_count assignment, #2 add missing frequency points.
--- drivers/clk/imx/clk-imx8mn.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/clk/imx/clk-imx8mn.c +7 -0
@@ -67,36 +67,43 @@ static const struct imx_pll14xx_rate_table imx8mn_drampll_tbl[] = {static struct imx_pll14xx_clk imx8mn_audio_pll = { .type =PLL_1443X , .rate_table = imx8mn_audiopll_tbl, + .rate_count =ARRAY_SIZE (imx8mn_audiopll_tbl), };static struct imx_pll14xx_clk imx8mn_video_pll = { .type =PLL_1443X , .rate_table = imx8mn_videopll_tbl, + .rate_count =ARRAY_SIZE (imx8mn_videopll_tbl), };static struct imx_pll14xx_clk imx8mn_dram_pll = { .type =PLL_1443X , .rate_table = imx8mn_drampll_tbl, + .rate_count =ARRAY_SIZE (imx8mn_drampll_tbl), };static struct imx_pll14xx_clk imx8mn_arm_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static struct imx_pll14xx_clk imx8mn_gpu_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static struct imx_pll14xx_clk imx8mn_vpu_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static struct imx_pll14xx_clk imx8mn_sys_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static const char *const pll_ref_sels[] = {"osc_24m" ,"dummy" ,"dummy" ,"dummy" , };
Signature · 1 line
2.7.4
Re: [PATCH RESEND V2 5/7] clk: imx8mn: Add missing rate_count assignment for each PLL structure
Quoted 4 lines · Anson Huang
Add .rate_count assignment which is necessary for searching required PLL rate from the each PLL table.
Fixes 96d6392b54db ("clk: imx: Add support for i.MX8MN clock driver")
The commit ID is not stable before the commit lands on mainline, so I dropped it and applied the patch.
Shawn
Quoted 60 lines
Signed-off-by Anson Huang <[email protected]>---
Changes since V1:
- split the patch into 2 patches, #1 fixed those missing .rate_count assignment, #2 add missing frequency points.--- drivers/clk/imx/clk-imx8mn.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/clk/imx/clk-imx8mn.c +7
-0@@ -67,36 +67,43 @@ static const struct imx_pll14xx_rate_table imx8mn_drampll_tbl[] = {static struct imx_pll14xx_clk imx8mn_audio_pll = { .type =PLL_1443X , .rate_table = imx8mn_audiopll_tbl, + .rate_count =ARRAY_SIZE (imx8mn_audiopll_tbl), };static struct imx_pll14xx_clk imx8mn_video_pll = { .type =PLL_1443X , .rate_table = imx8mn_videopll_tbl, + .rate_count =ARRAY_SIZE (imx8mn_videopll_tbl), };static struct imx_pll14xx_clk imx8mn_dram_pll = { .type =PLL_1443X , .rate_table = imx8mn_drampll_tbl, + .rate_count =ARRAY_SIZE (imx8mn_drampll_tbl), };static struct imx_pll14xx_clk imx8mn_arm_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static struct imx_pll14xx_clk imx8mn_gpu_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static struct imx_pll14xx_clk imx8mn_vpu_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static struct imx_pll14xx_clk imx8mn_sys_pll = { .type =PLL_1416X , .rate_table = imx8mn_pll1416x_tbl, + .rate_count =ARRAY_SIZE (imx8mn_pll1416x_tbl), };static const char *const pll_ref_sels[] = {"osc_24m" ,"dummy" ,"dummy" ,"dummy" , };Signature · 1 line
2.7.4
PATCH RESEND v2 6/7 clk: imx8mn: Add necessary frequency support for ARM PLL table
In reply to Anson Huangi.MX8MN supports CPU running at 1.5GHz/1.4GHz/1.2GHz, add missing frequency for ARM PLL table.
---
Changes since V1:
- split the patch into 2 patches, #1 fixed those missing .rate_count assignment, #2 add missing frequency points.
--- drivers/clk/imx/clk-imx8mn.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/imx/clk-imx8mn.c +2 -0
@@ -42,6 +42,8 @@ enum {static const struct imx_pll14xx_rate_table imx8mn_pll1416x_tbl[] = {PLL_1416X_RATE (1800000000U ,225 ,3 ,0 ),PLL_1416X_RATE (1600000000U ,200 ,3 ,0 ), +PLL_1416X_RATE (1500000000U ,375 ,3 ,1 ), +PLL_1416X_RATE (1400000000U ,350 ,3 ,1 ),PLL_1416X_RATE (1200000000U ,300 ,3 ,1 ),PLL_1416X_RATE (1000000000U ,250 ,3 ,1 ),PLL_1416X_RATE (800000000U ,200 ,3 ,1 ),
Signature · 1 line
2.7.4
Shawn Guo
AppliedRe: [PATCH RESEND V2 6/7] clk: imx8mn: Add necessary frequency support for ARM PLL table
Quoted 4 lines · Anson Huang
i.MX8MN supports CPU running at 1.5GHz/1.4GHz/1.2GHz, add missing frequency for ARM PLL table.
Signed-off-by Anson Huang <[email protected]>
Applied, thanks.
PATCH RESEND v2 7/7 arm64: dts: imx8mn: Add cpu-freq support
In reply to Anson HuangAdd A53 OPP table, cpu regulator and speed grading node to support cpu-freq driver.
---
No changes.
--- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts | 4 +++ arch/arm64/boot/dts/freescale/imx8mn.dtsi | 41 +++++++++++++++++++++++ 2 files changed, 45 insertions(+)
arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts +4 -0
@@ -27,6 +27,10 @@ }; }; +&A53_0 { + cpu-supply = <&buck2_reg>; +}; + &iomuxc { pinctrl-names = "default";
arch/arm64/boot/dts/freescale/imx8mn.dtsi +41 -0
77 lines not on this page · raw message
Signature · 1 line
2.7.4
Shawn Guo
AppliedRe: [PATCH RESEND V2 7/7] arm64: dts: imx8mn: Add cpu-freq support
Quoted 4 lines · Anson Huang
Add A53 OPP table, cpu regulator and speed grading node to support cpu-freq driver.
Signed-off-by Anson Huang <[email protected]>
Applied, thanks.
Shawn Guo
AppliedQuoted 3 lines · Anson Huang
Enable i2c1 on i.MX8MN DDR4 EVK board.
Signed-off-by Anson Huang <[email protected]>
Applied, thanks.