s32v234 uboot stage, we want to use Port PB5 and PB6 as GPIO function, we want to simulate i2c. Now we can set PB5 and PB6 to output high and low, set as below:
writel(config , SIUL2_MSCRn(19));
writel(config , SIUL2_MSCRn(20));
through the wavelet, we can get high and low.
Also we need to read the data input, I set below codes, but still can not read correct value.
u32 config1 = (0<<0 | 1<<19);
writel(config1 , SIUL2_IMCRn(273));
get_value = readl(SIUL2_IMCRn(273));
printf("Board: test_gpio_i2c get_value=%x\n",get_value);
Could you tell me how to set the input and read the input value? Thanks in advances!