On Mon, 2026-05-11 at 14:09 +0200, Alexander Feilke wrote:
> From: Alexander Feilke <[email protected]>
> 
> Sync definitions from upstream linux v6.19.
> 
> Signed-off-by: Alexander Feilke <[email protected]>

Reviewed-by: Alexander Sverdlin <[email protected]>

> ---
>  drivers/rtc/pcf85063.c | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/pcf85063.c b/drivers/rtc/pcf85063.c
> index 183a214a3e9..06c85d939e0 100644
> --- a/drivers/rtc/pcf85063.c
> +++ b/drivers/rtc/pcf85063.c
> @@ -11,11 +11,33 @@
>  #include <dm/device_compat.h>
>  
>  #define PCF85063_REG_CTRL1           0x00 /* status */
> -#define PCF85063_REG_CTRL1_SR                0x58
> +#define PCF85063_REG_CTRL1_CAP_SEL   BIT(0)
> +#define PCF85063_REG_CTRL1_STOP              BIT(5)
> +#define PCF85063_REG_CTRL1_EXT_TEST  BIT(7)
> +#define PCF85063_REG_CTRL1_SWR               0x58 /* Software reset command 
> */
> +
> +#define PCF85063_REG_CTRL2           0x01
> +#define PCF85063_CTRL2_AF            BIT(6)
> +#define PCF85063_CTRL2_AIE           BIT(7)
> +
> +#define PCF85063_REG_OFFSET          0x02
> +#define PCF85063_OFFSET_SIGN_BIT     6       /* 2's complement sign bit */
> +#define PCF85063_OFFSET_MODE         BIT(7)
> +#define PCF85063_OFFSET_STEP0                4340
> +#define PCF85063_OFFSET_STEP1                4069
> +
> +#define PCF85063_REG_CLKO_F_MASK     0x07 /* frequency mask */
> +#define PCF85063_REG_CLKO_F_32768HZ  0x00
> +#define PCF85063_REG_CLKO_F_OFF              0x07
> +
> +#define PCF85063_REG_RAM             0x03
>  
>  #define PCF85063_REG_SC                      0x04 /* datetime */
>  #define PCF85063_REG_SC_OS           0x80
>  
> +#define PCF85063_REG_ALM_S           0x0b
> +#define PCF85063_AEN                 BIT(7)
> +
>  static int pcf85063_get_time(struct udevice *dev, struct rtc_time *tm)
>  {
>       u8 regs[7];
> @@ -74,7 +96,7 @@ static int pcf85063_set_time(struct udevice *dev, const 
> struct rtc_time *tm)
>  
>  static int pcf85063_reset(struct udevice *dev)
>  {
> -     return dm_i2c_reg_write(dev, PCF85063_REG_CTRL1, PCF85063_REG_CTRL1_SR);
> +     return dm_i2c_reg_write(dev, PCF85063_REG_CTRL1, 
> PCF85063_REG_CTRL1_SWR);
>  }
>  
>  static int pcf85063_read(struct udevice *dev, unsigned int offset, u8 *buf,

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com

Reply via email to