[PATCH] riscv: dts: allwinner: d1: Specify default CAN pins

Chen-Yu Tsai wens at csie.org
Sat Aug 12 21:13:09 PDT 2023


On Fri, Aug 4, 2023 at 4:59 AM Jernej Škrabec <jernej.skrabec at gmail.com> wrote:
>
> /cc Marc
>
> Dne ponedeljek, 31. julij 2023 ob 04:36:59 CEST je John Watts napisal(a):
> > There are only one set of CAN pins available on these chips.
> > Specify these as the default to avoid redundancy in board device trees.
> >
> > Signed-off-by: John Watts <contact at jookia.org>
> > ---
> >  arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi
> > b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi index
> > 4086c0cc0f9d..b27c3fc13b0d 100644
> > --- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi
> > +++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi
> > @@ -898,6 +898,8 @@ can0: can at 2504000 {
> >                       interrupts = <SOC_PERIPHERAL_IRQ(21)
> IRQ_TYPE_LEVEL_HIGH>;
> >                       clocks = <&ccu CLK_BUS_CAN0>;
> >                       resets = <&ccu RST_BUS_CAN0>;
> > +                     pinctrl-names = "default";
> > +                     pinctrl-0 = <&can0_pins>;
> >                       status = "disabled";
> >               };
>
> pinctrl-names and pinctrl-0 are usually at the top. However, since there is no
> hard rule (I've seen it mixed), I'm fine with it.

AFAIK this only applies to board files where there are mostly none of the
resource (clocks, reg, resets, interrupts) properties. OOTH the compatible
property is always the first property. I would normally put the pinctrl
stuff after the internal resources, since it is an external property.
In the SoC dtsi files, they would end up after the resource properties
I mentioned above, and before the "status" property.

ChenYu

> Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
>
> Since original DT node entry goes through netdev tree, this should be picked
> there or it can be dropped there and I pick both patches or I can pick patch
> for later kernel version.
>
> Best regards,
> Jernej
>
> >
> > @@ -907,6 +909,8 @@ can1: can at 2504400 {
> >                       interrupts = <SOC_PERIPHERAL_IRQ(22)
> IRQ_TYPE_LEVEL_HIGH>;
> >                       clocks = <&ccu CLK_BUS_CAN1>;
> >                       resets = <&ccu RST_BUS_CAN1>;
> > +                     pinctrl-names = "default";
> > +                     pinctrl-0 = <&can1_pins>;
> >                       status = "disabled";
> >               };
> >       };
>
>
>
>



More information about the linux-arm-kernel mailing list