页次: 1
根据f1c100s的数据手册,TCON0_Control_Register BIT23是 Swap RED and BLUE data at FIFO1
路径 linux/drivers/gpu/drm/sun4i/sun4i_tcon.c 添加如下语句
static void sun4i_tcon_channel_set_status(struct sun4i_tcon *tcon, int channel,
bool enabled)
{
struct clk *clk;
switch (channel) {
case 0:
regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,
SUN4I_TCON0_CTL_TCON_ENABLE,
enabled ? SUN4I_TCON0_CTL_TCON_ENABLE : 0);
regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,BIT(23),BIT(23));//SWAP R、B引脚
clk = tcon->dclk;
break;
case 1:
WARN_ON(!tcon->quirks->has_channel_1);
regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG,
SUN4I_TCON1_CTL_TCON_ENABLE,
enabled ? SUN4I_TCON1_CTL_TCON_ENABLE : 0);
clk = tcon->sclk1;
break;
default:
DRM_WARN("Unknown channel... doing nothing\n");
return;
}
if (enabled)
clk_prepare_enable(clk);
else
clk_disable_unprepare(clk);
}
我也在用模拟iic,请问启动了吗?
# dmesg | grep i2c
[ 0.120130] i2c-gpio i2c-gpio: error trying to get descriptor: -2
[ 0.981720] i2c /dev entries driver
[ 6.656316] goodix-ts 1-005d: GTP i2c test failed time 1
[ 11.086325] goodix-ts 1-005d: GTP i2c test failed time 2
[ 15.516320] goodix-ts 1-005d: GTP i2c test failed time 3
[ 15.544682] i2c-gpio i2c-gpio: using lines 3 (SDA) and 0 (SCL),-1
一直是这个错误
i2c0: i2c@1C27000 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x01C27000 0x400>;
interrupts = <7>;
clocks = <&ccu CLK_BUS_I2C0>; //mark
resets = <&ccu RST_BUS_I2C0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
你的设备树问题,clock 没有s
页次: 1