Hi Geert-san, > From: Geert Uytterhoeven, Sent: Thursday, January 12, 2023 1:20 AM > > Hi Shimoda-san, > > On Thu, Dec 22, 2022 at 10:33 AM Yoshihiro Shimoda > <yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote: > > Enable UFS device for R-Car S4-8 Spider CPU board. > > > > Note that the conditions of RC21012 on the Spider are: > > - OUT11 (for UFS30_REFCLK_V) is disabled as default. > > - OUT11 is controlled by GPIO0 pin. > > - The GPIO0 pin is inverted sense (low active) and pull-up enabled. > > Thanks for your patch! Thank you for your review! > > To output the clock, pin 4 of TCA9554 on the Spider board needs to > > output low level so that using "gpio-gate-clock" for it. > > Does this mean the GPIO setup was the only missing part, > and the i2c commands from [1] were not needed? You're correct. > I wanted to give this a try, but the remote Spider is offline. IIUC, Morimoto-san is preparing a new remote lab now... > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> > > --- > > .../boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 37 +++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi > b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi > > index 25b34d66061a..32625afc74bf 100644 > > --- a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi > > +++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi > > @@ -5,6 +5,7 @@ > > * Copyright (C) 2021 Renesas Electronics Corp. > > */ > > > > +#include <dt-bindings/gpio/gpio.h> > > #include "r8a779f0.dtsi" > > > > / { > > @@ -32,6 +33,12 @@ memory@480000000 { > > reg = <0x4 0x80000000 0x0 0x80000000>; > > }; > > > > + rc21012_ufs: clk-rc21012-ufs { > > + compatible = "fixed-clock"; > > + clock-frequency = <38400000>; > > + #clock-cells = <0>; > > + }; > > So you're modelling the RC21012 output as a fixed clock. Yes. > I guess that's acceptable until a proper driver is available. Good! > > +&ufs30_clk { > > + compatible = "gpio-gate-clock"; > > + clocks = <&rc21012_ufs>; > > + enable-gpios = <&gpio_exp_20 4 GPIO_ACTIVE_LOW>; > > Perhaps the "clock-frequency" property should be removed using > /delete-property/? I see. I'll fix it on v2. > > +}; > > Alternatively, you could have kept ufs30_clk as a fixed-clock, dropped > rc21012_ufs, and added a gpio hog. Yes, I had tried using a gpio hog, and it also worked. > But I do like your description, as it clearly shows how the GPIO interacts > with the RC21012. I got it. Thanks! > The i2c part LGTM, and is identical to [2]. Thanks! Best regards, Yoshihiro Shimoda