Lines Matching +full:pmic +full:- +full:arbiter

1 // SPDX-License-Identifier: BSD-3-Clause
19 /* PMIC Arbiter configuration registers */
63 return -EIO; in msm_spmi_write()
65 return -EIO; in msm_spmi_write()
67 channel = priv->channel_map[usid][pid]; in msm_spmi_write()
70 writel(0x0, priv->spmi_core + SPMI_CH_OFFSET(channel) + in msm_spmi_write()
74 writel(val, priv->spmi_core + SPMI_CH_OFFSET(channel) + SPMI_REG_WDATA); in msm_spmi_write()
84 writel(reg, priv->spmi_core + SPMI_CH_OFFSET(channel) + SPMI_REG_CMD0); in msm_spmi_write()
89 reg = readl(priv->spmi_core + SPMI_CH_OFFSET(channel) + in msm_spmi_write()
95 return -EIO; in msm_spmi_write()
108 return -EIO; in msm_spmi_read()
110 return -EIO; in msm_spmi_read()
112 channel = priv->channel_map[usid][pid]; in msm_spmi_read()
115 writel(0x0, priv->spmi_obs + SPMI_CH_OFFSET(channel) + SPMI_REG_CONFIG); in msm_spmi_read()
125 writel(reg, priv->spmi_obs + SPMI_CH_OFFSET(channel) + SPMI_REG_CMD0); in msm_spmi_read()
130 reg = readl(priv->spmi_obs + SPMI_CH_OFFSET(channel) + in msm_spmi_read()
136 return -EIO; in msm_spmi_read()
140 return readl(priv->spmi_obs + SPMI_CH_OFFSET(channel) + in msm_spmi_read()
151 struct udevice *parent = dev->parent; in msm_spmi_probe()
158 priv->arb_chnl = devfdt_get_addr(dev); in msm_spmi_probe()
159 priv->spmi_core = fdtdec_get_addr_size_auto_parent(gd->fdt_blob, in msm_spmi_probe()
161 priv->spmi_obs = fdtdec_get_addr_size_auto_parent(gd->fdt_blob, in msm_spmi_probe()
164 hw_ver = readl(priv->arb_chnl + PMIC_ARB_VERSION - 0x800); in msm_spmi_probe()
167 dev_dbg(dev, "PMIC Arb Version-%d (0x%x)\n", (is_v1 ? 1 : 2), hw_ver); in msm_spmi_probe()
169 if (priv->arb_chnl == FDT_ADDR_T_NONE || in msm_spmi_probe()
170 priv->spmi_core == FDT_ADDR_T_NONE || in msm_spmi_probe()
171 priv->spmi_obs == FDT_ADDR_T_NONE) in msm_spmi_probe()
172 return -EINVAL; in msm_spmi_probe()
176 uint32_t periph = readl(priv->arb_chnl + ARB_CHANNEL_OFFSET(i)); in msm_spmi_probe()
180 priv->channel_map[slave_id][pid] = i; in msm_spmi_probe()
186 { .compatible = "qcom,spmi-pmic-arb" },