mbox series

[v5,0/2] riscv: sophgo: Add pinctrl support for CV1800 series SoC

Message ID IA1PR20MB495374DB8C4208575AAC9675BB972@IA1PR20MB4953.namprd20.prod.outlook.com (mailing list archive)
Headers show
Series riscv: sophgo: Add pinctrl support for CV1800 series SoC | expand

Message

Inochi Amaoto Aug. 30, 2024, 10:38 p.m. UTC
Add basic pinctrl driver for Sophgo CV1800 series SoCs.
This patch series aims to replace the previous patch from Jisheng [1].
Since the pinctrl of cv1800 has nested mux and its pin definination
is discrete, it is not suitable to use "pinctrl-single" to cover the
pinctrl device.

This patch require another patch [2] that provides standard attribute
"input-schmitt-microvolt"

The v4 version is from [3]

Note: As current documentation is not enough to guess the pin
configuration of Huashan Pi, only the pinctrl node is added.

[1] https://lore.kernel.org/linux-riscv/20231113005702.2467-1-jszhang@kernel.org/
[2] https://lore.kernel.org/all/IA1PR20MB495346246245074234D337A6BBAC2@IA1PR20MB4953.namprd20.prod.outlook.com/
[3] https://lore.kernel.org/all/IA1PR20MB4953DC78BB0FE0C57EA94F91BBB32@IA1PR20MB4953.namprd20.prod.outlook.com/

Changed from v4:
1. remove the alreay applied patch
2. fix 1812h header file problem.

Changed from v3:
1. binding: drop unnecessary type
2. binding: use right ref for pin node.
3. binding: remove mixed spaces and tabs.

Changed from v2:
1. remove unused export function.
2. drop "drive-strength" and only use "drive-strength-microamp" in
the binding.
3. drop unnecessary ref in the binding.
4. drop unnecessary entry for binding example.

Changed from v1:
1. replace attribute "sophgo,bus-holder" with standard "bias-bus-hold".
2. replace attribute "input-schmitt" with "input-schmitt-microvolt".
3. add vddio operations support to report pin state.

Inochi Amaoto (2):
  riscv: dts: sophgo: cv1800b: add pinctrl support
  riscv: dts: sophgo: cv1812h: add pinctrl support

 .../boot/dts/sophgo/cv1800b-milkv-duo.dts     | 49 +++++++++++++++++++
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi       | 10 ++++
 arch/riscv/boot/dts/sophgo/cv1812h.dtsi       | 10 ++++
 3 files changed, 69 insertions(+)

--
2.46.0

Comments

Conor Dooley Sept. 9, 2024, 2:41 p.m. UTC | #1
On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> This patch series aims to replace the previous patch from Jisheng [1].
> Since the pinctrl of cv1800 has nested mux and its pin definination
> is discrete, it is not suitable to use "pinctrl-single" to cover the
> pinctrl device.
> 
> This patch require another patch [2] that provides standard attribute
> "input-schmitt-microvolt"
> 
> The v4 version is from [3]

Which version of this ended up in linux-next? I see a link to v4 in
what's been applied, but this v5 was sent before that code was
committed.

Either way, what's been applied and what's here produce warnings:
cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"

It's just a copy-paste error I would imagine, but please send a fix.

Thanks,
Conor.
Inochi Amaoto Sept. 9, 2024, 10:24 p.m. UTC | #2
On Mon, Sep 09, 2024 at 03:41:10PM GMT, Conor Dooley wrote:
> On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> > Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> > This patch series aims to replace the previous patch from Jisheng [1].
> > Since the pinctrl of cv1800 has nested mux and its pin definination
> > is discrete, it is not suitable to use "pinctrl-single" to cover the
> > pinctrl device.
> > 
> > This patch require another patch [2] that provides standard attribute
> > "input-schmitt-microvolt"
> > 
> > The v4 version is from [3]
> 
> Which version of this ended up in linux-next? I see a link to v4 in
> what's been applied, but this v5 was sent before that code was
> committed.
> 
> Either way, what's been applied and what's here produce warnings:
> cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> 
> It's just a copy-paste error I would imagine, but please send a fix.
> 
> Thanks,
> Conor.

Yes, it is like some copy-paste error, I will fix it.

Regards,
Inochi
Conor Dooley Sept. 10, 2024, 4:13 p.m. UTC | #3
On Tue, Sep 10, 2024 at 06:24:34AM +0800, Inochi Amaoto wrote:
> On Mon, Sep 09, 2024 at 03:41:10PM GMT, Conor Dooley wrote:
> > On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> > > Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> > > This patch series aims to replace the previous patch from Jisheng [1].
> > > Since the pinctrl of cv1800 has nested mux and its pin definination
> > > is discrete, it is not suitable to use "pinctrl-single" to cover the
> > > pinctrl device.
> > > 
> > > This patch require another patch [2] that provides standard attribute
> > > "input-schmitt-microvolt"
> > > 
> > > The v4 version is from [3]
> > 
> > Which version of this ended up in linux-next? I see a link to v4 in
> > what's been applied, but this v5 was sent before that code was
> > committed.
> > 
> > Either way, what's been applied and what's here produce warnings:
> > cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > 
> > It's just a copy-paste error I would imagine, but please send a fix.
> 
> Yes, it is like some copy-paste error, I will fix it.

I'd rather you had sent some follow-up patches, than rebase your tree at
this point in the cycle. I assume you hadn't yet sent that stuff in a PR
to Arnd?

Cheers,
Conor.
Inochi Amaoto Sept. 10, 2024, 10:25 p.m. UTC | #4
On Tue, Sep 10, 2024 at 05:13:43PM GMT, Conor Dooley wrote:
> On Tue, Sep 10, 2024 at 06:24:34AM +0800, Inochi Amaoto wrote:
> > On Mon, Sep 09, 2024 at 03:41:10PM GMT, Conor Dooley wrote:
> > > On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> > > > Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> > > > This patch series aims to replace the previous patch from Jisheng [1].
> > > > Since the pinctrl of cv1800 has nested mux and its pin definination
> > > > is discrete, it is not suitable to use "pinctrl-single" to cover the
> > > > pinctrl device.
> > > > 
> > > > This patch require another patch [2] that provides standard attribute
> > > > "input-schmitt-microvolt"
> > > > 
> > > > The v4 version is from [3]
> > > 
> > > Which version of this ended up in linux-next? I see a link to v4 in
> > > what's been applied, but this v5 was sent before that code was
> > > committed.
> > > 
> > > Either way, what's been applied and what's here produce warnings:
> > > cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > 
> > > It's just a copy-paste error I would imagine, but please send a fix.
> > 
> > Yes, it is like some copy-paste error, I will fix it.
> 
> I'd rather you had sent some follow-up patches, than rebase your tree at
> this point in the cycle. I assume you hadn't yet sent that stuff in a PR
> to Arnd?
> 
> Cheers,
> Conor.

Yes, the pinctrl dts needs binding header, which is taken by Linus.
So we hadn't sent them. This is why I sent a new version to fix this.

Thanks,
Inochi
Conor Dooley Sept. 11, 2024, 7:11 p.m. UTC | #5
On Wed, Sep 11, 2024 at 06:25:49AM +0800, Inochi Amaoto wrote:
> On Tue, Sep 10, 2024 at 05:13:43PM GMT, Conor Dooley wrote:
> > On Tue, Sep 10, 2024 at 06:24:34AM +0800, Inochi Amaoto wrote:
> > > On Mon, Sep 09, 2024 at 03:41:10PM GMT, Conor Dooley wrote:
> > > > On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> > > > > Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> > > > > This patch series aims to replace the previous patch from Jisheng [1].
> > > > > Since the pinctrl of cv1800 has nested mux and its pin definination
> > > > > is discrete, it is not suitable to use "pinctrl-single" to cover the
> > > > > pinctrl device.
> > > > > 
> > > > > This patch require another patch [2] that provides standard attribute
> > > > > "input-schmitt-microvolt"
> > > > > 
> > > > > The v4 version is from [3]
> > > > 
> > > > Which version of this ended up in linux-next? I see a link to v4 in
> > > > what's been applied, but this v5 was sent before that code was
> > > > committed.
> > > > 
> > > > Either way, what's been applied and what's here produce warnings:
> > > > cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > > cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > > 
> > > > It's just a copy-paste error I would imagine, but please send a fix.
> > > 
> > > Yes, it is like some copy-paste error, I will fix it.
> > 
> > I'd rather you had sent some follow-up patches, than rebase your tree at
> > this point in the cycle. I assume you hadn't yet sent that stuff in a PR
> > to Arnd?
> > 
> Yes, the pinctrl dts needs binding header, which is taken by Linus.
> So we hadn't sent them. This is why I sent a new version to fix this.

Oh, I'm surprised that you didn't get a shared branch from him for that
to be honest.
Inochi Amaoto Sept. 11, 2024, 10:43 p.m. UTC | #6
On Wed, Sep 11, 2024 at 08:11:15PM GMT, Conor Dooley wrote:
> On Wed, Sep 11, 2024 at 06:25:49AM +0800, Inochi Amaoto wrote:
> > On Tue, Sep 10, 2024 at 05:13:43PM GMT, Conor Dooley wrote:
> > > On Tue, Sep 10, 2024 at 06:24:34AM +0800, Inochi Amaoto wrote:
> > > > On Mon, Sep 09, 2024 at 03:41:10PM GMT, Conor Dooley wrote:
> > > > > On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> > > > > > Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> > > > > > This patch series aims to replace the previous patch from Jisheng [1].
> > > > > > Since the pinctrl of cv1800 has nested mux and its pin definination
> > > > > > is discrete, it is not suitable to use "pinctrl-single" to cover the
> > > > > > pinctrl device.
> > > > > > 
> > > > > > This patch require another patch [2] that provides standard attribute
> > > > > > "input-schmitt-microvolt"
> > > > > > 
> > > > > > The v4 version is from [3]
> > > > > 
> > > > > Which version of this ended up in linux-next? I see a link to v4 in
> > > > > what's been applied, but this v5 was sent before that code was
> > > > > committed.
> > > > > 
> > > > > Either way, what's been applied and what's here produce warnings:
> > > > > cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > > > cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > > > 
> > > > > It's just a copy-paste error I would imagine, but please send a fix.
> > > > 
> > > > Yes, it is like some copy-paste error, I will fix it.
> > > 
> > > I'd rather you had sent some follow-up patches, than rebase your tree at
> > > this point in the cycle. I assume you hadn't yet sent that stuff in a PR
> > > to Arnd?
> > > 
> > Yes, the pinctrl dts needs binding header, which is taken by Linus.
> > So we hadn't sent them. This is why I sent a new version to fix this.
> 
> Oh, I'm surprised that you didn't get a shared branch from him for that
> to be honest.

He did provide a shared branch, but I am not sure the right way to use 
it. He said it is used for SoC tree to pull it. So I think it is just 
used as dependency. Is it OK to just mention it in the PR and add the 
pinctrl dts? Or need some other git tags to tell the dependency?

Regards,
Inochi
Conor Dooley Sept. 11, 2024, 10:51 p.m. UTC | #7
On Thu, Sep 12, 2024 at 06:43:31AM +0800, Inochi Amaoto wrote:
> On Wed, Sep 11, 2024 at 08:11:15PM GMT, Conor Dooley wrote:
> > On Wed, Sep 11, 2024 at 06:25:49AM +0800, Inochi Amaoto wrote:
> > > On Tue, Sep 10, 2024 at 05:13:43PM GMT, Conor Dooley wrote:
> > > > On Tue, Sep 10, 2024 at 06:24:34AM +0800, Inochi Amaoto wrote:
> > > > > On Mon, Sep 09, 2024 at 03:41:10PM GMT, Conor Dooley wrote:
> > > > > > On Sat, Aug 31, 2024 at 06:38:40AM +0800, Inochi Amaoto wrote:
> > > > > > > Add basic pinctrl driver for Sophgo CV1800 series SoCs.
> > > > > > > This patch series aims to replace the previous patch from Jisheng [1].
> > > > > > > Since the pinctrl of cv1800 has nested mux and its pin definination
> > > > > > > is discrete, it is not suitable to use "pinctrl-single" to cover the
> > > > > > > pinctrl device.
> > > > > > > 
> > > > > > > This patch require another patch [2] that provides standard attribute
> > > > > > > "input-schmitt-microvolt"
> > > > > > > 
> > > > > > > The v4 version is from [3]
> > > > > > 
> > > > > > Which version of this ended up in linux-next? I see a link to v4 in
> > > > > > what's been applied, but this v5 was sent before that code was
> > > > > > committed.
> > > > > > 
> > > > > > Either way, what's been applied and what's here produce warnings:
> > > > > > cv1812h.dtsi:19.28-24.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > > > > cv1800b.dtsi:18.28-23.5: Warning (simple_bus_reg): /soc/pinctrl@3008000: simple-bus unit address format error, expected "3001000"
> > > > > > 
> > > > > > It's just a copy-paste error I would imagine, but please send a fix.
> > > > > 
> > > > > Yes, it is like some copy-paste error, I will fix it.
> > > > 
> > > > I'd rather you had sent some follow-up patches, than rebase your tree at
> > > > this point in the cycle. I assume you hadn't yet sent that stuff in a PR
> > > > to Arnd?
> > > > 
> > > Yes, the pinctrl dts needs binding header, which is taken by Linus.
> > > So we hadn't sent them. This is why I sent a new version to fix this.
> > 
> > Oh, I'm surprised that you didn't get a shared branch from him for that
> > to be honest.
> 
> He did provide a shared branch, but I am not sure the right way to use 
> it. He said it is used for SoC tree to pull it. So I think it is just 
> used as dependency. Is it OK to just mention it in the PR and add the 
> pinctrl dts? Or need some other git tags to tell the dependency?

It's a bit late now to be adding stuff for 6.12, but for next time what
you do is git pull the tag he gave you here
https://lore.kernel.org/all/CACRpkdZ5zAgQyo9y_nO8M0Z6b8zqbkg5H_3ceEJN6z6mHL4TOQ@mail.gmail.com/
into your for-next branch and then apply the dts patches to your tree
after that.

And then you make sure to write a commit message for the resulting
merge commit that explains why it was pulled.