* [PATCH] i2c: hisi: Add I2C bus recovery support
@ 2026-08-25 3:31 Bowen Yu
2026-08-25 23:33 ` kernel test robot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bowen Yu @ 2026-08-25 3:31 UTC (permalink / raw)
To: linuxarm, liudingyuan, andi.shyti, linux-i2c, linux-kernel
Cc: zhanjie9, prime.zeng, wanghuiqiang, xuwei5, yubowen8
When the I2C bus is stuck due to a slave device holding SDA low
(e.g. during an incomplete transfer), the master has no way to recover
the bus through normal operation. Add bus recovery support using the
subctrl register to manually toggle SCL and generate clock pulses to
release the bus.
The recovery is performed via a second register resource (sctrl_base)
that provides direct control over SCL/SDA lines through mux and
output-enable bits. After recovery, the I2C controller is reset through
the ACPI _RST method and reconfigured.
Recovery is only registered when the subctrl resource is provided in
the firmware description, keeping backward compatibility with existing
platforms.
Signed-off-by: Bowen Yu <yubowen8@huawei.com>
---
drivers/i2c/busses/i2c-hisi.c | 139 ++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
diff --git a/drivers/i2c/busses/i2c-hisi.c b/drivers/i2c/busses/i2c-hisi.c
index 04d7978cae04..3f8e63be9f05 100644
--- a/drivers/i2c/busses/i2c-hisi.c
+++ b/drivers/i2c/busses/i2c-hisi.c
@@ -5,6 +5,7 @@
* Copyright (c) 2021 HiSilicon Technologies Co., Ltd.
*/
+#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/clk.h>
@@ -62,6 +63,8 @@
#define HISI_I2C_INT_CLR 0x0048
#define HISI_I2C_INT_MASK 0x004C
#define HISI_I2C_TRANS_STATE 0x0050
+#define HISI_I2C_TRANS_STATE_SDA_LEVEL BIT(5)
+#define HISI_I2C_TRANS_STATE_SCL_LEVEL BIT(6)
#define HISI_I2C_TRANS_ERR 0x0054
#define HISI_I2C_VERSION 0x0058
@@ -86,9 +89,26 @@
#define NSEC_TO_CYCLES(ns, clk_rate_khz) \
DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC)
+/*
+ * SUBCTRL SC_I2C_CTRL register
+ * Set HISI_I2C_CTRL_DAT_CFG_EN and HISI_I2C_CTRL_SCL_CFG_EN to control
+ * I2C pin behaviorhe by subctrl controller; use HISI_I2C_CTRL_DAT_OE and
+ * HISI_I2C_CTRL_CLK_OE to control input or output; use HISI_I2C_CTRL_SDA_OUT
+ * and HISI_I2C_CTRL_SCL_OUT to control output value.
+ */
+#define HISI_I2C_CTRL_DAT_CFG_EN BIT(5)
+#define HISI_I2C_CTRL_SCL_CFG_EN BIT(4)
+#define HISI_I2C_CTRL_DAT_OE BIT(3)
+#define HISI_I2C_CTRL_CLK_OE BIT(2)
+#define HISI_I2C_CTRL_SDA_OUT BIT(1)
+#define HISI_I2C_CTRL_SCL_OUT BIT(0)
+
+#define HISI_I2C_RECOVERY_REG_SIZE 4
+
struct hisi_i2c_controller {
struct i2c_adapter adapter;
void __iomem *iobase;
+ void __iomem *sctrl_addr;
struct device *dev;
struct clk *clk;
int irq;
@@ -108,8 +128,14 @@ struct hisi_i2c_controller {
struct i2c_timings t;
u32 clk_rate_khz;
u32 spk_len;
+
+ /* Bus recovery */
+ struct i2c_bus_recovery_info rinfo;
+ acpi_handle acpi_handle;
};
+static void hisi_i2c_configure_bus(struct hisi_i2c_controller *ctlr);
+
static void hisi_i2c_enable_int(struct hisi_i2c_controller *ctlr, u32 mask)
{
writel_relaxed(mask, ctlr->iobase + HISI_I2C_INT_MASK);
@@ -151,6 +177,115 @@ static void hisi_i2c_handle_errors(struct hisi_i2c_controller *ctlr)
}
}
+static int hisi_i2c_recovery_get_scl(struct i2c_adapter *adap)
+{
+ struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
+ u32 reg = readl(ctlr->iobase + HISI_I2C_TRANS_STATE);
+
+ return !!(reg & HISI_I2C_TRANS_STATE_SCL_LEVEL);
+}
+
+static int hisi_i2c_recovery_get_sda(struct i2c_adapter *adap)
+{
+ struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
+ u32 reg = readl(ctlr->iobase + HISI_I2C_TRANS_STATE);
+
+ return !!(reg & HISI_I2C_TRANS_STATE_SDA_LEVEL);
+}
+
+static void hisi_i2c_recovery_set_scl(struct i2c_adapter *adap, int val)
+{
+ struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
+ u32 reg;
+
+ reg = readl(ctlr->sctrl_addr);
+ if (val)
+ reg |= HISI_I2C_CTRL_SCL_OUT;
+ else
+ reg &= ~HISI_I2C_CTRL_SCL_OUT;
+ writel(reg, ctlr->sctrl_addr);
+}
+
+static void hisi_i2c_prepare_recovery(struct i2c_adapter *adap)
+{
+ struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
+ u32 reg;
+
+ reg = readl(ctlr->sctrl_addr);
+ reg |= HISI_I2C_CTRL_SCL_CFG_EN | HISI_I2C_CTRL_DAT_CFG_EN |
+ HISI_I2C_CTRL_CLK_OE | HISI_I2C_CTRL_SCL_OUT;
+ reg &= ~HISI_I2C_CTRL_DAT_OE;
+ writel(reg, ctlr->sctrl_addr);
+}
+
+static void hisi_i2c_unprepare_recovery(struct i2c_adapter *adap)
+{
+ struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
+ u32 reg;
+
+ reg = readl(ctlr->sctrl_addr);
+ reg &= ~(HISI_I2C_CTRL_SCL_CFG_EN | HISI_I2C_CTRL_DAT_CFG_EN);
+ writel(reg, ctlr->sctrl_addr);
+
+ /*
+ * Invokes the specific ACPI method "_RST" for trigger a soft
+ * reset of I2C controller in order to help on I2C controller recover from
+ * the abnormal state after bus recovery process.
+ */
+ if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
+ acpi_status status;
+
+ status = acpi_evaluate_object(ctlr->acpi_handle, "_RST", NULL, NULL);
+ if (ACPI_FAILURE(status))
+ dev_err(ctlr->dev, "_RST method failed: %s\n",
+ acpi_format_exception(status));
+ }
+
+ hisi_i2c_configure_bus(ctlr);
+}
+
+static int hisi_i2c_get_bus_recovery_res(struct hisi_i2c_controller *ctlr,
+ struct platform_device *pdev)
+{
+ struct resource *res;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+
+ if (!res || resource_size(res) != HISI_I2C_RECOVERY_REG_SIZE)
+ return -ENODEV;
+
+ ctlr->sctrl_addr = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(ctlr->sctrl_addr)) {
+ ctlr->sctrl_addr = NULL;
+ return -ENOMEM;
+ }
+
+ return 0;
+}
+
+static int hisi_i2c_recovery_init(struct hisi_i2c_controller *ctlr)
+{
+ struct platform_device *pdev = to_platform_device(ctlr->dev);
+ struct i2c_adapter *adapter = &ctlr->adapter;
+ int ret;
+
+ ret = hisi_i2c_get_bus_recovery_res(ctlr, pdev);
+ if (ret)
+ return ret;
+
+ ctlr->rinfo = (struct i2c_bus_recovery_info){
+ .get_scl = hisi_i2c_recovery_get_scl,
+ .get_sda = hisi_i2c_recovery_get_sda,
+ .set_scl = hisi_i2c_recovery_set_scl,
+ .prepare_recovery = hisi_i2c_prepare_recovery,
+ .unprepare_recovery = hisi_i2c_unprepare_recovery,
+ .recover_bus = i2c_generic_scl_recovery,
+ };
+ adapter->bus_recovery_info = &ctlr->rinfo;
+ ctlr->acpi_handle = ACPI_HANDLE(ctlr->dev);
+ return 0;
+}
+
static int hisi_i2c_start_xfer(struct hisi_i2c_controller *ctlr)
{
struct i2c_msg *msg = ctlr->msgs;
@@ -504,6 +639,10 @@ static int hisi_i2c_probe(struct platform_device *pdev)
adapter->dev.parent = dev;
i2c_set_adapdata(adapter, ctlr);
+ ret = hisi_i2c_recovery_init(ctlr);
+ if (ret)
+ dev_info(ctlr->dev, "I2C bus recovery not available\n");
+
ret = devm_i2c_add_adapter(dev, adapter);
if (ret)
return ret;
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: hisi: Add I2C bus recovery support
2026-08-25 3:31 [PATCH] i2c: hisi: Add I2C bus recovery support Bowen Yu
@ 2026-08-25 23:33 ` kernel test robot
2026-08-26 0:26 ` kernel test robot
2026-08-26 0:51 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-08-25 23:33 UTC (permalink / raw)
To: Bowen Yu, linuxarm, liudingyuan, andi.shyti, linux-i2c,
linux-kernel
Cc: oe-kbuild-all, zhanjie9, prime.zeng, wanghuiqiang, xuwei5,
yubowen8
Hi Bowen,
kernel test robot noticed the following build errors:
[auto build test ERROR on andi-shyti/i2c/i2c-host]
[also build test ERROR on linus/master v7.2 next-20260824]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Bowen-Yu/i2c-hisi-Add-I2C-bus-recovery-support/20260825-113125
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20260825033125.1893253-1-yubowen8%40huawei.com
patch subject: [PATCH] i2c: hisi: Add I2C bus recovery support
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260826/202608260721.whmqyiAk-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260826/202608260721.whmqyiAk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608260721.whmqyiAk-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/i2c/busses/i2c-hisi.c: In function 'hisi_i2c_unprepare_recovery':
>> drivers/i2c/busses/i2c-hisi.c:236:34: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
236 | if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
| ^~~~~~~~~~~~~~~
| acpi_has_watchdog
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from drivers/i2c/busses/i2c-hisi.c:8:
include/linux/dev_printk.h:154:31: warning: '%s' directive argument is null [-Wformat-overflow=]
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^
include/linux/dev_printk.h:110:17: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~
drivers/i2c/busses/i2c-hisi.c:241:25: note: in expansion of macro 'dev_err'
241 | dev_err(ctlr->dev, "_RST method failed: %s\n",
| ^~~~~~~
drivers/i2c/busses/i2c-hisi.c:241:65: note: format string is defined here
241 | dev_err(ctlr->dev, "_RST method failed: %s\n",
| ^~
cc1: some warnings being treated as errors
vim +236 drivers/i2c/busses/i2c-hisi.c
221
222 static void hisi_i2c_unprepare_recovery(struct i2c_adapter *adap)
223 {
224 struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
225 u32 reg;
226
227 reg = readl(ctlr->sctrl_addr);
228 reg &= ~(HISI_I2C_CTRL_SCL_CFG_EN | HISI_I2C_CTRL_DAT_CFG_EN);
229 writel(reg, ctlr->sctrl_addr);
230
231 /*
232 * Invokes the specific ACPI method "_RST" for trigger a soft
233 * reset of I2C controller in order to help on I2C controller recover from
234 * the abnormal state after bus recovery process.
235 */
> 236 if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
237 acpi_status status;
238
239 status = acpi_evaluate_object(ctlr->acpi_handle, "_RST", NULL, NULL);
240 if (ACPI_FAILURE(status))
241 dev_err(ctlr->dev, "_RST method failed: %s\n",
242 acpi_format_exception(status));
243 }
244
245 hisi_i2c_configure_bus(ctlr);
246 }
247
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: hisi: Add I2C bus recovery support
2026-08-25 3:31 [PATCH] i2c: hisi: Add I2C bus recovery support Bowen Yu
2026-08-25 23:33 ` kernel test robot
@ 2026-08-26 0:26 ` kernel test robot
2026-08-26 0:51 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-08-26 0:26 UTC (permalink / raw)
To: Bowen Yu, linuxarm, liudingyuan, andi.shyti, linux-i2c,
linux-kernel
Cc: llvm, oe-kbuild-all, zhanjie9, prime.zeng, wanghuiqiang, xuwei5,
yubowen8
Hi Bowen,
kernel test robot noticed the following build errors:
[auto build test ERROR on andi-shyti/i2c/i2c-host]
[also build test ERROR on linus/master v7.2 next-20260824]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Bowen-Yu/i2c-hisi-Add-I2C-bus-recovery-support/20260825-113125
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20260825033125.1893253-1-yubowen8%40huawei.com
patch subject: [PATCH] i2c: hisi: Add I2C bus recovery support
config: arm-randconfig-003-20260826 (https://download.01.org/0day-ci/archive/20260826/202608260816.YagBXzlX-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 771bdfdab2d66a4eb85b8ea7673cfa30152718b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260826/202608260816.YagBXzlX-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608260816.YagBXzlX-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-hisi.c:236:27: error: call to undeclared function 'acpi_has_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
236 | if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
| ^
drivers/i2c/busses/i2c-hisi.c:236:27: note: did you mean 'acpi_has_watchdog'?
include/linux/acpi.h:1528:20: note: 'acpi_has_watchdog' declared here
1528 | static inline bool acpi_has_watchdog(void) { return false; }
| ^
1 error generated.
vim +/acpi_has_method +236 drivers/i2c/busses/i2c-hisi.c
221
222 static void hisi_i2c_unprepare_recovery(struct i2c_adapter *adap)
223 {
224 struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
225 u32 reg;
226
227 reg = readl(ctlr->sctrl_addr);
228 reg &= ~(HISI_I2C_CTRL_SCL_CFG_EN | HISI_I2C_CTRL_DAT_CFG_EN);
229 writel(reg, ctlr->sctrl_addr);
230
231 /*
232 * Invokes the specific ACPI method "_RST" for trigger a soft
233 * reset of I2C controller in order to help on I2C controller recover from
234 * the abnormal state after bus recovery process.
235 */
> 236 if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
237 acpi_status status;
238
239 status = acpi_evaluate_object(ctlr->acpi_handle, "_RST", NULL, NULL);
240 if (ACPI_FAILURE(status))
241 dev_err(ctlr->dev, "_RST method failed: %s\n",
242 acpi_format_exception(status));
243 }
244
245 hisi_i2c_configure_bus(ctlr);
246 }
247
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: hisi: Add I2C bus recovery support
2026-08-25 3:31 [PATCH] i2c: hisi: Add I2C bus recovery support Bowen Yu
2026-08-25 23:33 ` kernel test robot
2026-08-26 0:26 ` kernel test robot
@ 2026-08-26 0:51 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-08-26 0:51 UTC (permalink / raw)
To: Bowen Yu, linuxarm, liudingyuan, andi.shyti, linux-i2c,
linux-kernel
Cc: oe-kbuild-all, zhanjie9, prime.zeng, wanghuiqiang, xuwei5,
yubowen8
Hi Bowen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on linus/master v7.2 next-20260824]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Bowen-Yu/i2c-hisi-Add-I2C-bus-recovery-support/20260825-113125
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20260825033125.1893253-1-yubowen8%40huawei.com
patch subject: [PATCH] i2c: hisi: Add I2C bus recovery support
config: sparc64-randconfig-001-20260826 (https://download.01.org/0day-ci/archive/20260826/202608260844.RKBd2Emp-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260826/202608260844.RKBd2Emp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608260844.RKBd2Emp-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/i2c/busses/i2c-hisi.c: In function 'hisi_i2c_unprepare_recovery':
drivers/i2c/busses/i2c-hisi.c:236:34: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
236 | if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
| ^~~~~~~~~~~~~~~
| acpi_has_watchdog
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from drivers/i2c/busses/i2c-hisi.c:8:
>> drivers/i2c/busses/i2c-hisi.c:241:44: warning: '%s' directive argument is null [-Wformat-overflow=]
241 | dev_err(ctlr->dev, "_RST method failed: %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/i2c/busses/i2c-hisi.c:241:25: note: in expansion of macro 'dev_err'
241 | dev_err(ctlr->dev, "_RST method failed: %s\n",
| ^~~~~~~
drivers/i2c/busses/i2c-hisi.c:241:65: note: format string is defined here
241 | dev_err(ctlr->dev, "_RST method failed: %s\n",
| ^~
cc1: some warnings being treated as errors
vim +241 drivers/i2c/busses/i2c-hisi.c
221
222 static void hisi_i2c_unprepare_recovery(struct i2c_adapter *adap)
223 {
224 struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
225 u32 reg;
226
227 reg = readl(ctlr->sctrl_addr);
228 reg &= ~(HISI_I2C_CTRL_SCL_CFG_EN | HISI_I2C_CTRL_DAT_CFG_EN);
229 writel(reg, ctlr->sctrl_addr);
230
231 /*
232 * Invokes the specific ACPI method "_RST" for trigger a soft
233 * reset of I2C controller in order to help on I2C controller recover from
234 * the abnormal state after bus recovery process.
235 */
236 if (ctlr->acpi_handle && acpi_has_method(ctlr->acpi_handle, "_RST")) {
237 acpi_status status;
238
239 status = acpi_evaluate_object(ctlr->acpi_handle, "_RST", NULL, NULL);
240 if (ACPI_FAILURE(status))
> 241 dev_err(ctlr->dev, "_RST method failed: %s\n",
242 acpi_format_exception(status));
243 }
244
245 hisi_i2c_configure_bus(ctlr);
246 }
247
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-26 0:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 3:31 [PATCH] i2c: hisi: Add I2C bus recovery support Bowen Yu
2026-08-25 23:33 ` kernel test robot
2026-08-26 0:26 ` kernel test robot
2026-08-26 0:51 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox