linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Markus Reichl <m.reichl@fivetechno.de>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree <devicetree@vger.kernel.org>,
	Da Xue <da@lessconfused.com>, Heiko Stuebner <heiko@sntech.de>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Rob Herring <robh+dt@kernel.org>,
	Akash Gajjar <akash@openedev.com>, Levin Du <djw@t-chip.com.cn>,
	linux-amarula <linux-amarula@amarulasolutions.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/6] arm64: dts: rockchip: Fix rk3399-roc-pc pwm2 pin
Date: Thu, 17 Oct 2019 19:19:04 +0530	[thread overview]
Message-ID: <CAMty3ZBu2WRJV9X6_ZAXBfpBs42p04Ph7amFpfO64iOQM-Sw_w@mail.gmail.com> (raw)
In-Reply-To: <109d708e-d182-fafa-44ad-0e6e0f813e0d@fivetechno.de>

Hi Markus,

On Thu, Oct 17, 2019 at 6:56 PM Markus Reichl <m.reichl@fivetechno.de> wrote:
>
> Hi Jagan,
>
> your patch fixes booting my rk3399-roc-pc with 5.4.0-rc3-next-20191017.
> Without your patch roc-pc hangs here:
> [    9.703526] pwm-regulator: supplied by regulator-dummy

Thanks for testing this.

Indeed the same change available in BSP
https://github.com/FireflyTeam/kernel/blob/stable-4.4-rk3399-linux/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi#L1184

I'm waiting for Levin response on this issue, need to update commit
information accordingly.

>
> Am 16.10.19 um 19:09 schrieb Jagan Teki:
> > Hi Levin,
> >
> > On Tue, Oct 8, 2019 at 8:42 AM <djw@t-chip.com.cn> wrote:
> >>
> >> Jagan Teki <jagan@amarulasolutions.com> writes:
> >>
> >> > Hi Heiko,
> >> >
> >> > On Mon, Sep 30, 2019 at 2:51 AM Heiko Stuebner <heiko@sntech.de> wrote:
> >> >>
> >> >> Hi Jagan,
> >> >>
> >> >> Am Donnerstag, 19. September 2019, 07:28:17 CEST schrieb Jagan Teki:
> >> >> > ROC-PC is not able to boot linux console if PWM2_d is
> >> >> > unattached to any pinctrl logic.
> >> >> >
> >> >> > To be precise the linux boot hang with last logs as,
> >> >> > ...
> >> >> > .....
> >> >> > [    0.003367] Console: colour dummy device 80x25
> >> >> > [    0.003788] printk: console [tty0] enabled
> >> >> > [    0.004178] printk: bootconsole [uart8250] disabled
> >> >> >
> >> >> > In ROC-PC the PWM2_d pin is connected to LOG_DVS_PWM of
> >> >> > VDD_LOG. So, for normal working operations this needs to
> >> >> > active and pull-down.
> >> >> >
> >> >> > This patch fix, by attaching pinctrl active and pull-down
> >> >> > the pwm2.
> >> >>
> >> >> This looks highly dubious on first glance. The pwm subsystem nor
> >> >> the Rockchip pwm driver do not do any pinctrl handling.
> >> >>
> >> >> So I don't really see where that "active" pinctrl state is supposed
> >> >> to come from.
> >> >>
> >> >> Comparing with the pwm driver in the vendor tree I see that there
> >> >> is such a state defined there. But that code there also looks strange
> >> >> as that driver never again leaves this active state after entering it.
> >> >>
> >> >> Also for example all the Gru devices run with quite a number of pwm-
> >> >> regulators without needing additional fiddling with the pwm itself, so
> >> >> I don't really see why that should be different here.
> >> >
> >> > I deed, I was supposed to think the same. but the vendor kernel dts
> >> > from firefly do follow the pwm2 pinctrl [1]. I wouldn't find any
> >> > information other than this vensor information, ie one of the reason I
> >> > have marked "Levin Du" who initially supported this board.
> >> >
> >> > One, think I have seen was this pinctrl active fixed the boot hang.
> >> > any inputs from would be very helpful.
> >> >
> >> > Levin Du, any inputs?
> >> >
> >> > [1] https://github.com/FireflyTeam/kernel/blob/stable-4.4-rk3399-linux/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi#L1184
> >> >
> >>
> >> A grep of the `pwm2` shows that there's such block in rk3399-nanopi4.dtsi:
> >>
> >>     &pwm2 {
> >>             pinctrl-names = "active";
> >>             pinctrl-0 = <&pwm2_pin_pull_down>;
> >>             status = "okay";
> >>     };
> >>
> >> But last time I checked, using the mainline U-Boot (the roc-rk3399-pc is
> >> in mainline now) with mainline linux v5.2-rc7, no such setting is
> >> necessary, and the board boots happily.
> >>
> >> I cannot find the use of "active" pinctrl state in the
> >> `drivers/pwm/pwm-rockchip.c`. If the pinctrl state needs to be setup as
> >> default, the `pinctrl-names` needs to be "default" or "init" (see
> >> `drivers/base/pinctrl.c`) .
> >>
> >> Jagan, what version of board do you use? I checked with
> >> "ROC-RK3399-PC-V1.0-A 2018-07-12".
> >
> > I have ROC-RK3399-PC-V1.A 2018.09.25 and powering with TYPE-C0 port.
> >
> > And here the boot log
> >
> > [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
> > [    0.000000] Linux version 5.4.0-rc3-next-20191016
> > (jagan@jagan-XPS-13-9350) (gcc version 6.3.1 20170109 (Linaro GCC
> > 6.3-2017.02)) #1 SMP PREEMPT Wed Oct 16 21:17:23 IST 2019
> > [    0.000000] Machine model: Firefly ROC-RK3399-PC Board
> > [    0.000000] earlycon: uart8250 at MMIO32 0x00000000ff1a0000 (options '')
> > [    0.000000] printk: bootconsole [uart8250] enabled
> > [    0.000000] efi: Getting EFI parameters from FDT:
> > [    0.000000] efi: UEFI not found.
> > [    0.000000] cma: Reserved 32 MiB at 0x000000003e000000
> > [    0.000000] NUMA: No NUMA configuration found
> > [    0.000000] NUMA: Faking a node at [mem
> > 0x0000000000200000-0x00000000f7ffffff]
> > [    0.000000] NUMA: NODE_DATA [mem 0xf77ef100-0xf77f0fff]
> > [    0.000000] Zone ranges:
> > [    0.000000]   DMA      [mem 0x0000000000200000-0x000000003fffffff]
> > [    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000f7ffffff]
> > [    0.000000]   Normal   empty
> > [    0.000000] Movable zone start for each node
> > [    0.000000] Early memory node ranges
> > [    0.000000]   node   0: [mem 0x0000000000200000-0x00000000f7ffffff]
> > [    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]
> > [    0.000000] psci: probing for conduit method from DT.
> > [    0.000000] psci: PSCIv1.1 detected in firmware.
> > [    0.000000] psci: Using standard PSCI v0.2 function IDs
> > [    0.000000] psci: MIGRATE_INFO_TYPE not supported.
> > [    0.000000] psci: SMC Calling Convention v1.1
> > [    0.000000] percpu: Embedded 22 pages/cpu s52952 r8192 d28968 u90112
> > [    0.000000] Detected VIPT I-cache on CPU0
> > [    0.000000] CPU features: detected: ARM erratum 845719
> > [    0.000000] CPU features: detected: GIC system register CPU interface
> > [    0.000000] Speculative Store Bypass Disable mitigation not required
> > [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 999432
> > [    0.000000] Policy zone: DMA32
> > [    0.000000] Kernel command line:
> > earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p1 rootwait
> > [    0.000000] Dentry cache hash table entries: 524288 (order: 10,
> > 4194304 bytes, linear)
> > [    0.000000] Inode-cache hash table entries: 262144 (order: 9,
> > 2097152 bytes, linear)
> > [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
> > [    0.000000] software IO TLB: mapped [mem 0x3a000000-0x3e000000] (64MB)
> > [    0.000000] Memory: 3856004K/4061184K available (12028K kernel
> > code, 1870K rwdata, 6440K rodata, 5056K init, 451K bss, 172412K
> > reserved, 32768K cma-reserved)
> > [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
> > [    0.000000] rcu: Preemptible hierarchical RCU implementation.
> > [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=6.
> > [    0.000000]  Tasks RCU enabled.
> > [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay
> > is 25 jiffies.
> > [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
> > [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> > [    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
> > [    0.000000] GICv3: 256 SPIs implemented
> > [    0.000000] GICv3: 0 Extended SPIs implemented
> > [    0.000000] GICv3: Distributor has no Range Selector support
> > [    0.000000] GICv3: 16 PPIs implemented
> > [    0.000000] GICv3: no VLPI support, no direct LPI support
> > [    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fef00000
> > [    0.000000] ITS [mem 0xfee20000-0xfee3ffff]
> > [    0.000000] ITS@0x00000000fee20000: allocated 65536 Devices
> > @f6880000 (flat, esz 8, psz 64K, shr 0)
> > [    0.000000] ITS: using cache flushing for cmd queue
> > [    0.000000] GICv3: using LPI property table @0x00000000f6840000
> > [    0.000000] GIC: using cache flushing for LPI property table
> > [    0.000000] GICv3: CPU0: using allocated LPI pending table
> > @0x00000000f6850000
> > [    0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] {
> > /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] }
> > [    0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] {
> > /cpus/cpu@100[4] /cpus/cpu@101[5] }
> > [    0.000000] random: get_random_bytes called from
> > start_kernel+0x2b8/0x454 with crng_init=0
> > [    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
> > [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff
> > max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
> > [    0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps
> > every 4398046511097ns
> > [    0.003201] Console: colour dummy device 80x25
> > [    0.003624] printk: console [tty0] enabled
> > [    0.004020] printk: bootconsole [uart8250] disabled
>
> I had to put "console=ttyS2,1500000" in kernel command line to get further logging beyond this point.

Noted, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-17 13:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19  5:28 [PATCH 0/6] arm64: dts: rockchip: ROC-PC fixes Jagan Teki
2019-09-19  5:28 ` [PATCH 1/6] arm64: dts: rockchip: Fix rk3399-roc-pc pwm2 pin Jagan Teki
2019-09-29 21:21   ` Heiko Stuebner
2019-10-01 10:26     ` Jagan Teki
2019-10-01 10:34       ` Michael Nazzareno Trimarchi
2019-10-08  3:11       ` djw
2019-10-16 17:09         ` Jagan Teki
2019-10-17 13:26           ` Markus Reichl
2019-10-17 13:49             ` Jagan Teki [this message]
2019-10-17 23:33               ` Heiko Stuebner
2019-10-22  6:19                 ` djw
2019-09-19  5:28 ` [PATCH 2/6] dt-bindings: arm: rockchip: Use libretech for roc-pc binding Jagan Teki
2019-09-19  5:28 ` [PATCH 3/6] arm64: dts: rockchip: Use libretech model, compatible for ROC-PC Jagan Teki
2019-09-19  5:28 ` [PATCH 4/6] arm64: dts: rockchip: Rename roc-pc with libretech notation Jagan Teki
2019-09-29 21:32   ` Heiko Stuebner
2019-10-01 10:33     ` Jagan Teki
2019-10-01 11:01       ` Chen-Yu Tsai
2019-09-19  5:28 ` [PATCH 5/6] arm64: dts: rockchip: Rename vcc12v_sys into dc_12v for roc-rk3399-pc Jagan Teki
2019-10-03 22:49   ` Heiko Stuebner
2019-09-19  5:28 ` [PATCH 6/6] arm64: dts: rockchip: Fix roc-rk3399-pc regulator input rails Jagan Teki
2019-10-03 22:50   ` Heiko Stuebner
2019-10-16 17:11 ` [PATCH 0/6] arm64: dts: rockchip: ROC-PC fixes Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMty3ZBu2WRJV9X6_ZAXBfpBs42p04Ph7amFpfO64iOQM-Sw_w@mail.gmail.com \
    --to=jagan@amarulasolutions.com \
    --cc=akash@openedev.com \
    --cc=da@lessconfused.com \
    --cc=devicetree@vger.kernel.org \
    --cc=djw@t-chip.com.cn \
    --cc=heiko@sntech.de \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=m.reichl@fivetechno.de \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).