public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: Raymond Mao <raymondmaoca@gmail.com>
Cc: u-boot@lists.denx.de, uboot@riscstar.com,
	Raymond Mao <raymond.mao@riscstar.com>,
	Rick Chen <rick@andestech.com>, Leo <ycliang@andestech.com>,
	Tom Rini <trini@konsulko.com>, Lukasz Majewski <lukma@denx.de>,
	Heiko Schocher <hs@nabladev.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Peng Fan <peng.fan@nxp.com>,
	Jamie Gibbons <jamie.gibbons@microchip.com>,
	Randolph Sheng-Kai Lin <randolph@andestech.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Conor Dooley <conor.dooley@microchip.com>,
	Yu-Chien Peter Lin <peter.lin@sifive.com>,
	Eric Schikschneit <eric.schikschneit@novatechautomation.com>,
	Michal Simek <michal.simek@amd.com>,
	Junhui Liu <junhui.liu@pigmoral.tech>,
	Yixun Lan <dlan@gentoo.org>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Casey Connolly <casey.connolly@linaro.org>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Arturs Artamonovs <arturs.artamonovs@analog.com>,
	Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
	Vasileios Bimpikas <vasileios.bimpikas@analog.com>,
	Justin Swartz <justin.swartz@risingedge.co.za>,
	Aniket Limaye <a-limaye@ti.com>,
	Ian Roberts <ian.roberts@timesys.com>,
	Angelo Dureghello <angelo.dureghello@timesys.com>,
	Oliver Gaskell <Oliver.Gaskell@analog.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Henrik Grimler <henrik@grimler.se>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Anshul Dalal <anshuld@ti.com>,
	Paul Barker <paul.barker.ct@bp.renesas.com>,
	Justin Klaassen <justin@tidylabs.net>,
	Samuel Holland <samuel@sholland.org>,
	Rui Miguel Silva <rui.silva@linaro.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Gabriel Fernandez <gabriel.fernandez@foss.st.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Finley Xiao <finley.xiao@rock-chips.com>,
	Elaine Zhang <zhangqing@rock-chips.com>,
	Joseph Chen <chenjh@rock-chips.com>
Subject: Re: [PATCH 12/17] dt-bindings: pinctrl: add k1 support
Date: Thu, 22 Jan 2026 14:55:39 +0000	[thread overview]
Message-ID: <aXI6a9VRLqlElMKt@pie> (raw)
In-Reply-To: <CAMDkj5yRkgniJzFhywuQoQLWw-jGWgCpCNExHpjE-o+hTr49NQ@mail.gmail.com>

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 <me@ziyao.cc> wrote:
> 
> > On Sat, Jan 17, 2026 at 02:01:46PM -0500, Raymond Mao wrote:
> > > From: Raymond Mao <raymond.mao@riscstar.com>
> > >
> > > Add dt-binding file of pinctrl driver for Spacemit K1 SoC.
> > >
> > > Signed-off-by: Raymond Mao <raymond.mao@riscstar.com>
> > > ---
> > >  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

  reply	other threads:[~2026-01-22 15:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-17 19:01 [PATCH 00/17] Add board support for Spacemit K1 SoC in SPL Raymond Mao
2026-01-17 19:01 ` [PATCH 01/17] spacemit: k1: support multi-board infrastructure Raymond Mao
2026-01-23 10:27   ` Heinrich Schuchardt
2026-01-23 10:46     ` Heinrich Schuchardt
2026-01-17 19:01 ` [PATCH 02/17] spacemit: k1: enable SPL with debug UART Raymond Mao
2026-01-18  8:50   ` Yao Zi
2026-01-23 14:51   ` Heinrich Schuchardt
2026-02-03 14:24     ` Raymond Mao
2026-01-17 19:01 ` [PATCH 03/17] configs: k1: enable early timer support Raymond Mao
2026-01-17 19:01 ` [PATCH 04/17] reset: k1: add SPL support and enable TWSI8 reset Raymond Mao
2026-01-18  9:10   ` Yao Zi
2026-01-21 23:17     ` Raymond Mao
2026-01-17 19:01 ` [PATCH 05/17] dt-bindings: clock: import k1-syscon from upstream Raymond Mao
2026-01-17 19:01 ` [PATCH 06/17] dts: k1: import dts file from upstream folder Raymond Mao
2026-01-17 23:03   ` Yixun Lan
2026-01-18  8:56     ` Yao Zi
2026-01-17 19:01 ` [PATCH 07/17] clk: spacemit: Add support for K1 SoC Raymond Mao
2026-01-17 19:01 ` [PATCH 08/17] dts: k1: enable clocks in SPL Raymond Mao
2026-01-17 19:01 ` [PATCH 09/17] board: k1: initialize clock and serial devices " Raymond Mao
2026-01-17 19:01 ` [PATCH 10/17] configs: k1: add default option for clock driver " Raymond Mao
2026-01-17 19:01 ` [PATCH 11/17] i2c: k1: add I2C driver support Raymond Mao
2026-01-19  5:24   ` Heiko Schocher
2026-01-17 19:01 ` [PATCH 12/17] dt-bindings: pinctrl: add k1 support Raymond Mao
2026-01-18  9:26   ` Yao Zi
2026-01-21 23:20     ` Raymond Mao
2026-01-22 14:55       ` Yao Zi [this message]
2026-01-17 19:01 ` [PATCH 13/17] spacemit: k1: add TLV EEPROM support in SPL Raymond Mao
2026-01-17 19:01 ` [PATCH 14/17] spacemit: k1: Add DDR firmware support to SPL Raymond Mao
2026-01-19  9:40   ` Yao Zi
2026-01-21 23:24     ` Raymond Mao
2026-01-22 14:43       ` Yao Zi
2026-01-17 19:01 ` [PATCH 15/17] power: pmic: add support for Spacemit P1 PMIC Raymond Mao
2026-01-17 19:01 ` [PATCH 16/17] power: regulator: add support for Spacemit P1 SoC Raymond Mao
2026-01-17 19:01 ` [PATCH 17/17] board: k1: enable pmic in spl Raymond Mao
2026-01-17 23:13 ` [PATCH 00/17] Add board support for Spacemit K1 SoC in SPL Yixun Lan
2026-01-22  8:29 ` Heinrich Schuchardt
2026-01-23 14:58   ` Raymond Mao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aXI6a9VRLqlElMKt@pie \
    --to=me@ziyao.cc \
    --cc=Oliver.Gaskell@analog.com \
    --cc=a-limaye@ti.com \
    --cc=angelo.dureghello@timesys.com \
    --cc=anshuld@ti.com \
    --cc=ansuelsmth@gmail.com \
    --cc=arturs.artamonovs@analog.com \
    --cc=casey.connolly@linaro.org \
    --cc=chenjh@rock-chips.com \
    --cc=clamor95@gmail.com \
    --cc=conor.dooley@microchip.com \
    --cc=dlan@gentoo.org \
    --cc=eric.schikschneit@novatechautomation.com \
    --cc=finley.xiao@rock-chips.com \
    --cc=gabriel.fernandez@foss.st.com \
    --cc=henrik@grimler.se \
    --cc=hs@nabladev.com \
    --cc=ian.roberts@timesys.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jamie.gibbons@microchip.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=jonas@kwiboo.se \
    --cc=junhui.liu@pigmoral.tech \
    --cc=justin.swartz@risingedge.co.za \
    --cc=justin@tidylabs.net \
    --cc=kever.yang@rock-chips.com \
    --cc=lukma@denx.de \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=michal.simek@amd.com \
    --cc=nathan.morrison@timesys.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=peng.fan@nxp.com \
    --cc=peter.lin@sifive.com \
    --cc=quentin.schulz@cherry.de \
    --cc=randolph@andestech.com \
    --cc=raymond.mao@riscstar.com \
    --cc=raymondmaoca@gmail.com \
    --cc=rick@andestech.com \
    --cc=rui.silva@linaro.org \
    --cc=samuel@sholland.org \
    --cc=semen.protsenko@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot@riscstar.com \
    --cc=vasileios.bimpikas@analog.com \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox