大家好!
我使用的是STM32MP135DAE7,官方TF-A、OPTEE源码中使用I2C4挂载PMIC,我更改为I2C5后,程序下载失败,相关配置内容如下。请各位大神帮忙,看看哪有不妥?
1.TF-A中:
dts中与I2C4源码相比,更换了I2C5接口,指定I2C5时钟源CLK_I2C5_HSI
i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins_a>; i2c-scl-rising-time-ns = <185>; i2c-scl-falling-time-ns = <20>; clock-frequency = <400000>; status = "okay";
pmic: stpmic@33 {
compatible = "st,stpmic1";
reg = <0x33>;
status = "okay";
regulators {
compatible = "st,stpmic1-regulators";
buck1-supply = <&vin>;
buck2-supply = <&vin>;
buck3-supply = <&vin>;
buck4-supply = <&vin>;
ldo1-supply = <&vin>;
ldo2-supply = <&vin>;//llsdtest
ldo4-supply = <&vin>;
ldo5-supply = <&vin>;
ldo6-supply = <&vin>;
vref_ddr-supply = <&vin>;
pwr_sw1-supply = <&bst_out>;
pwr_sw2-supply = <&v3v3_ao>;
vddcpu: buck1 {
regulator-name = "vddcpu";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-over-current-protection;
};
vdd_ddr: buck2 {
regulator-name = "vdd_ddr";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-over-current-protection;
};
vdd: buck3 {
regulator-name = "vdd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
st,mask-reset;
regulator-over-current-protection;
};
vddcore: buck4 {
regulator-name = "vddcore";
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
regulator-always-on;
regulator-over-current-protection;
};
vdd_adc: ldo1 {
regulator-name = "vdd_adc";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <2500000>;
regulator-always-on;//llsdtest
};
/*llsdtest*/
vdd_v3v3: ldo2 {
regulator-name = "vdd_v3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
vdd_usb: ldo4 {
regulator-name = "vdd_usb";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
vdd_sd: ldo5 {
regulator-name = "vdd_sd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
//regulator-boot-on;
regulator-always-on;
};
v1v8_periph: ldo6 {
regulator-name = "v1v8_periph";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-always-on;
};
vref_ddr: vref_ddr {
regulator-name = "vref_ddr";
regulator-always-on;
};
bst_out: boost {
regulator-name = "bst_out";
};
v3v3_sw: pwr_sw2 {
regulator-name = "v3v3_sw";
regulator-active-discharge = <1>;
regulator-always-on;
};
};
};
};
rcc { //secure-status = "disable"; st,clksrc = < CLK_MPU_PLL1P CLK_AXI_PLL2P CLK_MLAHBS_PLL3 CLK_CKPER_HSE CLK_RTC_LSE CLK_SDMMC1_PLL4P CLK_SDMMC2_PLL4P CLK_STGEN_HSE CLK_USBPHY_HSE //CLK_I2C4_HSI//llsd CLK_I2C5_HSI//llsd CLK_USBO_USBPHY CLK_I2C12_HSI CLK_UART2_HSI CLK_UART4_HSI
; };
2.OPTEE中:
dts中与I2C4比,修改了节点&etzpc,加密的GPIO由I2C4改为I2C5,更换I2C接口,定义I2C5时钟源
&etzpc { st,decprot = < DECPROT(STM32MP1_ETZPC_ADC1_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_ADC2_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_DCMIPP_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_DDRCTRLPHY_ID, DECPROT_NS_R_S_W, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_ETH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_ETH2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_FMC_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_HASH_ID, DECPROT_S_RW, DECPROT_UNLOCK)//llsd
DECPROT(STM32MP1_ETZPC_I2C3_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
DECPROT(STM32MP1_ETZPC_I2C5_ID, DECPROT_S_RW, DECPROT_UNLOCK)//llsd1
......
>;
};
&gpiof { st,protreg = < (TZPROT(3)) >; };
&gpiod { st,protreg = < (TZPROT(7)) >; };
&gpioh { st,protreg = < (TZPROT(13)) >; };
&gpiof { st,protreg = < (TZPROT(8)) >; };
&i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins_a>; i2c-scl-rising-time-ns = <185>; i2c-scl-falling-time-ns = <20>; clock-frequency = <400000>; status = "okay";
/*llsd2*/
pmic: stpmic@33 {
......
};
};
&rcc { compatible = "st,stm32mp13-rcc", "syscon"; //pinctrl-0 = <&rcc_mco_pins_a>; pinctrl-names = "default";
st,clksrc = <
CLK_MPU_PLL1P
CLK_AXI_PLL2P
CLK_MLAHBS_PLL3
CLK_RTC_LSE
CLK_MCO1_HSE
CLK_MCO2_DISABLED
CLK_CKPER_HSE
CLK_ETH1_PLL4P
CLK_ETH2_PLL4P
CLK_SDMMC1_PLL4P
CLK_SDMMC2_PLL4P
CLK_STGEN_HSE
CLK_USBPHY_HSE
//CLK_I2C4_HSI//llsd
CLK_I2C5_HSI//llsd
......
>
...... };
比较怀疑是OPTEE配置问题,参照I2C4配置的,还未看出有什么不妥,麻烦大家了,谢谢 |
|