Hi Biju, On Mon, 14 Apr 2025 at 18:04, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > > 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. > > > > > --- 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? > > By default, the switch is set to GPIO8_PMOD, so, CAN_STB pulled low and the transceiver driver > is not used. > > If any system(for eg: low power design) want to make use of STB, then change the SW > and macro and then make use of transceiver driver. [...] > > Related, doesn't this need !SW_PDM_EN, too? > > SW_PDM_EN is only used for MUX between CAN1 Rx/Tx and PDM. It is not related > to CAN0 Rx/Tx. Thanks, Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> 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