On Wed, Jan 21, 2026 at 06:20:15PM -0500, Raymond Mao wrote: > Hi Yao Zi, > > On Sun, Jan 18, 2026 at 4:28 AM Yao Zi <[email protected]> wrote: > > > On Sat, Jan 17, 2026 at 02:01:46PM -0500, Raymond Mao wrote: > > > From: Raymond Mao <[email protected]> > > > > > > Add dt-binding file of pinctrl driver for Spacemit K1 SoC. > > > > > > Signed-off-by: Raymond Mao <[email protected]> > > > --- > > > include/dt-bindings/pinctrl/k1-pinctrl.h | 59 ++++++++++++++++++++++++ > > > 1 file changed, 59 insertions(+) > > > create mode 100644 include/dt-bindings/pinctrl/k1-pinctrl.h > > > > > > diff --git a/include/dt-bindings/pinctrl/k1-pinctrl.h > > b/include/dt-bindings/pinctrl/k1-pinctrl.h > > > new file mode 100644 > > > index 00000000000..6c6b223c969 > > > --- /dev/null > > > +++ b/include/dt-bindings/pinctrl/k1-pinctrl.h > > > @@ -0,0 +1,59 @@ > > > +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ > > > +/* > > > + * Copyright (C) 2025-2026 RISCStar Ltd. > > > + */ > > > + > > > +#ifndef __DT_BINDINGS_K1_PINCTRL_H > > > +#define __DT_BINDINGS_K1_PINCTRL_H > > > + > > > +/* pin mux */ > > > +#define MUX_MODE0 0 > > > +#define MUX_MODE1 1 > > > +#define MUX_MODE2 2 > > > +#define MUX_MODE3 3 > > > +#define MUX_MODE4 4 > > > +#define MUX_MODE5 5 > > > +#define MUX_MODE6 6 > > > +#define MUX_MODE7 7 > > > + > > > +/* strong pull resistor */ > > > +#define SPU_EN BIT(3) > > > + > > > +/* edge detect */ > > > +#define EDGE_NONE BIT(6) > > > +#define EDGE_RISE BIT(4) > > > +#define EDGE_FALL BIT(5) > > > +#define EDGE_BOTH (EDGE_RISE | EDGE_FALL) > > > + > > > +/* slew rate output control */ > > > +#define SLE_EN BIT(7) > > > + > > > +/* schmitter trigger input threshold */ > > > +#define ST00 (0 << 8) > > > +#define ST01 BIT(8) > > > +#define ST02 BIT(9) > > > +#define ST03 (BIT(8) | BIT(9)) > > > + > > > +/* driver strength*/ > > > +#define PAD_DS_3V BIT(10) > > > +#define PAD_DS_SLOW0 (0 << 11) > > > +#define PAD_DS_SLOW1 BIT(11) > > > +#define PAD_DS_MEDIUM BIT(12) > > > +#define PAD_DS_FAST (BIT(11) | BIT(12)) > > > + > > > +#define PAD_1V8_DS0 PAD_DS_SLOW0 > > > +#define PAD_1V8_DS1 PAD_DS_SLOW1 > > > +#define PAD_1V8_DS2 PAD_DS_MEDIUM > > > +#define PAD_1V8_DS3 PAD_DS_FAST > > > + > > > +#define PAD_3V_DS0 (PAD_DS_SLOW0 | PAD_DS_3V) > > > +#define PAD_3V_DS1 (PAD_DS_SLOW1 | PAD_DS_3V) > > > +#define PAD_3V_DS2 (PAD_DS_MEDIUM | PAD_DS_3V) > > > +#define PAD_3V_DS3 (PAD_DS_FAST | PAD_DS_3V) > > > + > > > +/* pull up/down */ > > > +#define PULL_DIS (0 << 13) /* bit[15:13] 000 */ > > > +#define PULL_UP (6 << 13) /* bit[15:13] 110 */ > > > +#define PULL_DOWN (5 << 13) /* bit[15:13] 101 */ > > > + > > > +#endif /* __DT_BINDINGS_K1_PINCTRL_H */ > > > > These definitions look like hardware bits instead of dt-bindings, and I > > don't see a binding file for the pinctrl driver of SpacemiT K1 in Linux > > upstream. If it's the case, please keep the definitions inside your > > driver, correct the commit description, and probably squash it into the > > driver patch. > > > > We'll use the pinctrl-single driver. So all pin configurations could be
But you removed the pinctrl-single node in PATCH 6, didn't you? And I don't think this "binding" file gets used in any devicetree after applying the series. And I suggest aligning with the upstream pinctrl binding. It eases migration to upstream device-tree, and makes it possible to share a single dtb between Linux and U-Boot, which is a nice feature. > filled in the DTS file, not in the dt-binding file. > But the pinmux configurations should be included in the dt-binding file. > Regards, > Raymond > > > > Thanks, > > Yao Zi > > Best regards, Yao Zi

