Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2024 11:05:38 +0900
From:      =?UTF-8?B?6aKo5L6G5pWj5Lq6?= <furaisanjin@gmail.com>
To:        "Daniel O'Connor" <darius@dons.net.au>
Cc:        FreeBSD ARM List <freebsd-arm@freebsd.org>
Subject:   Re: DS1307 on rpi4B
Message-ID:  <CAJzLSnw5uuVhc9=HC5sCRv0nBzPXfbq_WVfYrmMg-h99hyRO-A@mail.gmail.com>
In-Reply-To: <431FB386-F515-4D77-A855-18055A48E432@dons.net.au>
References:  <CAJzLSnxOALkCztZUa-zpUH30g1O0nUfQb4X2=4o_VDv3WTEdaQ@mail.gmail.com> <431FB386-F515-4D77-A855-18055A48E432@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000062497a0628b8b186
Content-Type: text/plain; charset="UTF-8"

Hello Daniel.

Thank you for the suggestion. I created dtso file for my HW configuration
like this.

/dts-v1/;
/plugin/;

/ {
        compatible = "brcm,bcm2835";

        fragment@0 {
                target = <&i2c5>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";
                        ds1307: ds1307@68 {
                                compatible = "dallas,ds1307";
                                reg = <0x68>;
                                status = "okay";
                        };
                };
        };
        __overrides__ {
                ds1307 = <&ds1307>,"status";
        };
};

I modified config.txt to load this dtbo and add one more line to set GPIO
pins in [pi4]

gpio=12,13=a5,pu

This works fine and RTC starts working. One strange thing is that "gpioctl
-l -v" doesn't show correct pin setting somehow. I assumed there should be
PU on pin 12 and 13.

pin 12: 1       pin 12<>,
caps:<IN,OUT,PU,PD,INTRLL,INTRLH,INTRER,INTREF,INTREB>
pin 13: 1       pin 13<>,
caps:<IN,OUT,PU,PD,INTRLL,INTRLH,INTRER,INTREF,INTREB>

Best regards,
furaisanjin

--00000000000062497a0628b8b186
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: base64

PGRpdiBkaXI9Imx0ciI+PGRpdiBkaXI9Imx0ciI+PGRpdj5I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