Skip to content

Commit e1aaeca

Browse files
cazoummind
authored andcommitted
soc: rockchip: grf: Add rk3576 default GRF values
Set SW controlled i3c weak pull up and disable JTAG function on SDMMC IO. The i3c weak pull up is activated to let all gpio banks be controlled by the pinctrl driver. Disabling the JTAG function lets the SDMMC core use its full IO width. Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Acked-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/20240822195706.920567-3-detlev.casanova@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent 4261b58 commit e1aaeca

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

  • drivers/soc/rockchip

drivers/soc/rockchip/grf.c

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,29 @@ static const struct rockchip_grf_info rk3566_pipegrf __initconst = {
123123
.num_values = ARRAY_SIZE(rk3566_defaults),
124124
};
125125

126+
#define RK3576_SYSGRF_SOC_CON1 0x0004
127+
128+
static const struct rockchip_grf_value rk3576_defaults_sys_grf[] __initconst = {
129+
{ "i3c0 weakpull", RK3576_SYSGRF_SOC_CON1, HIWORD_UPDATE(3, 3, 6) },
130+
{ "i3c1 weakpull", RK3576_SYSGRF_SOC_CON1, HIWORD_UPDATE(3, 3, 8) },
131+
};
132+
133+
static const struct rockchip_grf_info rk3576_sysgrf __initconst = {
134+
.values = rk3576_defaults_sys_grf,
135+
.num_values = ARRAY_SIZE(rk3576_defaults_sys_grf),
136+
};
137+
138+
#define RK3576_IOCGRF_MISC_CON 0x04F0
139+
140+
static const struct rockchip_grf_value rk3576_defaults_ioc_grf[] __initconst = {
141+
{ "jtag switching", RK3576_IOCGRF_MISC_CON, HIWORD_UPDATE(0, 1, 1) },
142+
};
143+
144+
static const struct rockchip_grf_info rk3576_iocgrf __initconst = {
145+
.values = rk3576_defaults_ioc_grf,
146+
.num_values = ARRAY_SIZE(rk3576_defaults_ioc_grf),
147+
};
148+
126149
#define RK3588_GRF_SOC_CON6 0x0318
127150

128151
static const struct rockchip_grf_value rk3588_defaults[] __initconst = {
@@ -134,7 +157,6 @@ static const struct rockchip_grf_info rk3588_sysgrf __initconst = {
134157
.num_values = ARRAY_SIZE(rk3588_defaults),
135158
};
136159

137-
138160
static const struct of_device_id rockchip_grf_dt_match[] __initconst = {
139161
{
140162
.compatible = "rockchip,rk3036-grf",
@@ -160,6 +182,12 @@ static const struct of_device_id rockchip_grf_dt_match[] __initconst = {
160182
}, {
161183
.compatible = "rockchip,rk3566-pipe-grf",
162184
.data = (void *)&rk3566_pipegrf,
185+
}, {
186+
.compatible = "rockchip,rk3576-sys-grf",
187+
.data = (void *)&rk3576_sysgrf,
188+
}, {
189+
.compatible = "rockchip,rk3576-ioc-grf",
190+
.data = (void *)&rk3576_iocgrf,
163191
}, {
164192
.compatible = "rockchip,rk3588-sys-grf",
165193
.data = (void *)&rk3588_sysgrf,

0 commit comments

Comments
 (0)