Hi Biju, On Thu, 20 Mar 2025 at 17:41, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > Enable TCAN1046V-Q1 CAN Transceiver populated on RZ/G3E SMARC EVK by > modelling it as two instances of tcan1042. > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > --- > v1->v2: > * Replaced GPIO hog with CAN Transceiver. Thanks for the update! > --- a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts > +++ b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts > @@ -8,6 +8,8 @@ > /dts-v1/; > > /* Switch selection settings */ > +#define SW_GPIO8_CAN0_STB 0 > +#define SW_GPIO9_CAN1_STB 0 > #define SW_LCD_EN 0 > #define SW_PDM_EN 0 > #define SW_SD0_DEV_SEL 0 > @@ -42,16 +44,36 @@ &canfd { > #if (!SW_PDM_EN) > channel1 { > status = "okay"; > +#if (!SW_LCD_EN) && (SW_GPIO9_CAN1_STB) > + phys = <&can_transceiver1>; > +#endif > }; > #endif Do you need these two levels of #ifdefs? If CAN-FD doesn't work without the transceivers, wouldn't you just need a single #ifdef with the logical AND of all conditions above around the channel1 subnode? Am I missing something? > > #if (!SW_LCD_EN) > channel4 { > status = "okay"; > +#if (SW_GPIO8_CAN0_STB) > + phys = <&can_transceiver0>; > +#endif Same for the second channel. > }; > #endif > }; > > +#if (!SW_LCD_EN) && (SW_GPIO8_CAN0_STB) Related, doesn't this need !SW_PDM_EN, too? > +&can_transceiver0 { > + standby-gpios = <&pinctrl RZG3E_GPIO(5, 4) GPIO_ACTIVE_HIGH>; > + status = "okay"; > +}; > +#endif > + > +#if (!SW_LCD_EN) && (SW_GPIO9_CAN1_STB) > +&can_transceiver1 { > + standby-gpios = <&pinctrl RZG3E_GPIO(5, 5) GPIO_ACTIVE_HIGH>; > + status = "okay"; > +}; > +#endif > + > &pinctrl { > canfd_pins: canfd { > can1_pins: can1 { Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds